[tryton-debian-vcs] tryton-modules-account-invoice branch debian updated. debian/3.4.1-1-2-gd6255d5

Mathias Behrle tryton-debian-vcs at alioth.debian.org
Thu Apr 23 16:01:28 UTC 2015


The following commit has been merged in the debian branch:
https://alioth.debian.org/plugins/scmgit/cgi-bin/gitweb.cgi/?p=tryton/tryton-modules-account-invoice.git;a=commitdiff;h=debian/3.4.1-1-2-gd6255d5

commit d6255d5c42ac314a244c4650164f41f18e714ca0
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Thu Apr 23 16:59:50 2015 +0200

    Merging upstream version 3.6.0.

diff --git a/CHANGELOG b/CHANGELOG
index e03adc8..8ff458a 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,5 +1,9 @@
-Version 3.4.1 - 2015-03-02
+Version 3.6.0 - 2015-04-20
 * Bug fixes (see mercurial logs for details)
+* Add support for PyPy
+* Allow to define many relativedelta on payment term
+* Add test wizard for payment term
+* Use TaxableMixin
 
 Version 3.4.0 - 2014-10-20
 * Bug fixes (see mercurial logs for details)
diff --git a/MANIFEST.in b/MANIFEST.in
index ae867cc..05c3f79 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -8,4 +8,5 @@ include *.xml
 include view/*.xml
 include *.odt
 include locale/*.po
+include doc/*
 include tests/*.rst
diff --git a/PKG-INFO b/PKG-INFO
index 1a2d564..76a3eda 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,12 +1,12 @@
 Metadata-Version: 1.1
 Name: trytond_account_invoice
-Version: 3.4.1
+Version: 3.6.0
 Summary: Tryton module for invoicing
 Home-page: http://www.tryton.org/
 Author: Tryton
 Author-email: issue_tracker at tryton.org
 License: GPL-3
-Download-URL: http://downloads.tryton.org/3.4/
+Download-URL: http://downloads.tryton.org/3.6/
 Description: trytond_account_invoice
         =======================
         
@@ -64,5 +64,7 @@ Classifier: Natural Language :: Slovenian
 Classifier: Natural Language :: Spanish
 Classifier: Operating System :: OS Independent
 Classifier: Programming Language :: Python :: 2.7
+Classifier: Programming Language :: Python :: Implementation :: CPython
+Classifier: Programming Language :: Python :: Implementation :: PyPy
 Classifier: Topic :: Office/Business
 Classifier: Topic :: Office/Business :: Financial :: Accounting
diff --git a/__init__.py b/__init__.py
index e87051c..aa65f3a 100644
--- a/__init__.py
+++ b/__init__.py
@@ -1,5 +1,5 @@
-#This file is part of Tryton.  The COPYRIGHT file at the top level of
-#this repository contains the full copyright notices and license terms.
+# This file is part of Tryton.  The COPYRIGHT file at the top level of
+# this repository contains the full copyright notices and license terms.
 
 from trytond.pool import Pool
 from .payment_term import *
@@ -12,6 +12,9 @@ def register():
     Pool.register(
         PaymentTerm,
         PaymentTermLine,
+        PaymentTermLineRelativeDelta,
+        TestPaymentTermView,
+        TestPaymentTermViewResult,
         Invoice,
         InvoicePaymentLine,
         InvoiceLine,
@@ -31,6 +34,7 @@ def register():
         ConfigurationTaxRounding,
         module='account_invoice', type_='model')
     Pool.register(
+        TestPaymentTerm,
         PrintInvoice,
         PayInvoice,
         CreditInvoice,
diff --git a/account.py b/account.py
index 471f005..45205cf 100644
--- a/account.py
+++ b/account.py
@@ -1,5 +1,7 @@
-#This file is part of Tryton.  The COPYRIGHT file at the top level of
-#this repository contains the full copyright notices and license terms.
+# This file is part of Tryton.  The COPYRIGHT file at the top level of
+# this repository contains the full copyright notices and license terms.
+from sql import Null
+
 from trytond.model import ModelSQL, ModelView, MatchMixin, fields
 from trytond.pyson import Eval
 from trytond.pool import Pool, PoolMeta
@@ -57,7 +59,7 @@ class ConfigurationTaxRounding(ModelSQL, ModelView, MatchMixin):
     @staticmethod
     def order_sequence(tables):
         table, _ = tables[None]
-        return [table.sequence == None, table.sequence]
+        return [table.sequence == Null, table.sequence]
 
     @staticmethod
     def default_method():
@@ -125,11 +127,11 @@ class FiscalYear:
     def __setup__(cls):
         super(FiscalYear, cls).__setup__()
         cls._error_messages.update({
-                'change_invoice_sequence': 'You can not change '
+                'change_invoice_sequence': ('You can not change '
                     'invoice sequence in fiscal year "%s" because there are '
-                    'already posted invoices in this fiscal year.',
-                'different_invoice_sequence': 'Fiscal year "%(first)s" and '
-                    '"%(second)s" have the same invoice sequence.',
+                    'already posted invoices in this fiscal year.'),
+                'different_invoice_sequence': ('Fiscal year "%(first)s" and '
+                    '"%(second)s" have the same invoice sequence.'),
                 })
 
     @classmethod
@@ -217,14 +219,14 @@ class Period:
     def __setup__(cls):
         super(Period, cls).__setup__()
         cls._error_messages.update({
-                'change_invoice_sequence': 'You can not change the invoice '
+                'change_invoice_sequence': ('You can not change the invoice '
                     'sequence in period "%s" because there is already an '
-                    'invoice posted in this period',
-                'different_invoice_sequence': 'Period "%(first)s" and '
-                    '"%(second)s" have the same invoice sequence.',
-                'different_period_fiscalyear_company': 'Period "%(period)s" '
+                    'invoice posted in this period'),
+                'different_invoice_sequence': ('Period "%(first)s" and '
+                    '"%(second)s" have the same invoice sequence.'),
+                'different_period_fiscalyear_company': ('Period "%(period)s" '
                     'must have the same company as its fiscal year '
-                    '(%(fiscalyear)s).'
+                    '(%(fiscalyear)s).'),
                 })
 
     @classmethod
diff --git a/doc/index.rst b/doc/index.rst
new file mode 100644
index 0000000..3c2e696
--- /dev/null
+++ b/doc/index.rst
@@ -0,0 +1,126 @@
+Account Invoice Module
+######################
+
+The account_invoice module adds the invoice, payment term.
+
+Invoice
+*******
+
+There are 4 types of invoice: *Invoice*, *Supplier Invoice*, *Credit Note* and
+*Supplier Credit Note*. An invoice can be in *Draft*, *Validated*, *Posted*,
+*Paid* or *Canceled*.
+
+- Company: The company for which the invoice is created.
+- Number: The invoice number set on validation for supplier invoices and on
+  posting for others using the sequence defined on the period or fiscal year.
+- Reference: The internal reference of the invoice.
+- Party: The party for which or from which the invoice is issued.
+- Invoice Address: The address of the party.
+- Description: An optional description of the invoice.
+- Comment: A text fields to add custom comments.
+- Invoice Date: The date of the invoice. It is set on posting the invoice if not.
+- Accounting Date: The date to use for accounting if set otherwise it is the
+  invoice date.
+- Currency: The currency of the invoice.
+- Journal: The journal on which the accounting must be booked.
+- Account: The payable or receivable account.
+- Payment Term: The payment term to apply for the invoice
+  (default value comes from the party).
+- Lines: The lines invoiced.
+- Taxes: The taxes related to the lines.
+- Untaxed, Tax, Total Amount: The amounts computed by the invoice.
+- Move: The accounting move created by the invoice on validation for supplier
+  invoices and on posting for others.
+- Cancel Move: The accounting move created to cancel a posted invoice.
+
+The *Invoice* report is stored when the invoice is posted and thus it is always
+the same that is returned for consistency.
+
+A wizard allow to register a cash payment directly on the invoice. The payment
+could be partial or with write-off.
+
+An other wizard allow to create a credit note from the invoice with the option
+to refund the original invoice.
+
+Invoice Line
+************
+
+There are 4 types of lines: *Line*, *Subtotal*, *Title*, *Comment*.
+The *Line* are composed of:
+
+- Product: An optional reference to the product to invoice.
+- Account: The account to book the expense or revenue.
+- Quantity: The quantity invoiced.
+- Unit: The unit of measure in which is expressed the quantity.
+- Unit Price: The unit price of the quantity in the currency of the invoice.
+- Amount: The amount of the line (Unit Price multiplied by Quantity).
+- Description: The description of the product or the line.
+- Note: A text fields to add custom comments.
+- Taxes: The taxes to apply to the amount of the line.
+
+Invoice Tax
+***********
+
+It groups the taxes of all the lines.
+The rounding of the taxes is defined in the accounting configuration and can
+be: *Per Document* or *Per Line*.
+
+- Description: The description of the tax.
+- Account: The account on which the tax is booked.
+- Base: The base amount on which the tax is computed.
+- Base Code: The *Tax Code* to record the base amount.
+- Base Sign: The sign used to record the base amount on the tax code.
+- Amount: The amount of the tax.
+- Tax Code: The *Tax Code* to record the tax amount.
+- Tax Sing: The sign used to record the tax amount on the tax code.
+- Tax: The tax used for computation.
+- Manual: A boolean to define manual tax
+  (which is not linked to an invoice line).
+
+Payment Term
+************
+
+It defines the maximum dates of how an due amount should be paid.
+
+- Name: The name of the term.
+- Description: The long description of the term.
+- Lines:
+
+  - Relative Deltas:
+
+    - Day: The day of the month.
+    - Month: The month of the year.
+    - Day of the Week: One of the week day.
+    - Months: The number of months to add.
+    - Weeks: The number of weeks to add.
+    - Days: The number of days to add.
+
+  - Type:
+
+    - *Fixed*:
+
+      - Amount: The maximum fixed amount to pay at this date.
+      - Currency: The currency of the amount.
+
+    - *Percentage on Remainder*:
+
+      - Percentage: The percentage to use on the remainder amount.
+      - Divisor: The reversed percentage.
+
+    - *Percentage on Total*:
+
+      - Percentage: The percentage to use on the total amount.
+      - Divisor: The reversed percentage.
+
+    - *Remainder*
+
+The computation of relative delta is based on the `python-dateutil library`_.
+The payment term create a term for each line as far as there is still a
+remainder amount.
+
+A wizard is provided to test the behaviour of the payment term. It display
+computed terms base on an amount and a date.
+
+.. note:: The last line of payment term must be a remainder.
+
+.. _`python-dateutil library`: http://labix.org/python-dateutil#head-72c4689ec5608067d118b9143cef6bdffb6dad4e
diff --git a/invoice.odt b/invoice.odt
index 431267e..6b9adae 100644
Binary files a/invoice.odt and b/invoice.odt differ
diff --git a/invoice.py b/invoice.py
index fb515a7..dacca81 100644
--- a/invoice.py
+++ b/invoice.py
@@ -1,13 +1,13 @@
-#This file is part of Tryton.  The COPYRIGHT file at the top level of
-#this repository contains the full copyright notices and license terms.
+# This file is part of Tryton.  The COPYRIGHT file at the top level of
+# this repository contains the full copyright notices and license terms.
 from decimal import Decimal
 from collections import defaultdict
 import base64
 import itertools
-from sql import Literal
+
+from sql import Literal, Null
 from sql.aggregate import Count, Sum
 from sql.conditionals import Coalesce, Case
-from sql.functions import Abs, Sign
 
 from trytond.model import Workflow, ModelView, ModelSQL, fields
 from trytond.report import Report
@@ -20,6 +20,9 @@ from trytond.transaction import Transaction
 from trytond.pool import Pool
 from trytond.rpc import RPC
 
+from trytond.modules.account.tax import TaxableMixin
+from trytond.modules.product import price_digits
+
 __all__ = ['Invoice', 'InvoicePaymentLine', 'InvoiceLine',
     'InvoiceLineTax', 'InvoiceTax',
     'PrintInvoiceWarning', 'PrintInvoice', 'InvoiceReport',
@@ -56,7 +59,7 @@ _CREDIT_TYPE = {
     }
 
 
-class Invoice(Workflow, ModelSQL, ModelView):
+class Invoice(Workflow, ModelSQL, ModelView, TaxableMixin):
     'Invoice'
     __name__ = 'account.invoice'
     _order_name = 'number'
@@ -114,15 +117,23 @@ class Invoice(Workflow, ModelSQL, ModelView):
         'on_change_with_currency_date')
     journal = fields.Many2One('account.journal', 'Journal', required=True,
         states=_STATES, depends=_DEPENDS)
-    move = fields.Many2One('account.move', 'Move', readonly=True)
+    move = fields.Many2One('account.move', 'Move', readonly=True,
+        domain=[
+            ('company', '=', Eval('company', -1)),
+            ],
+        depends=['company'])
     cancel_move = fields.Many2One('account.move', 'Cancel Move', readonly=True,
+        domain=[
+            ('company', '=', Eval('company', -1)),
+            ],
         states={
             'invisible': Eval('type').in_(['out_invoice', 'out_credit_note']),
-            })
+            },
+        depends=['company'])
     account = fields.Many2One('account.account', 'Account', required=True,
-        states=_STATES, depends=_DEPENDS + ['type'],
+        states=_STATES, depends=_DEPENDS + ['type', 'company'],
         domain=[
-            ('company', '=', Eval('context', {}).get('company', -1)),
+            ('company', '=', Eval('company', -1)),
             If(Eval('type').in_(['out_invoice', 'out_credit_note']),
                 ('kind', '=', 'receivable'),
                 ('kind', '=', 'payable')),
@@ -130,7 +141,10 @@ class Invoice(Workflow, ModelSQL, ModelView):
     payment_term = fields.Many2One('account.invoice.payment_term',
         'Payment Term', required=True, states=_STATES, depends=_DEPENDS)
     lines = fields.One2Many('account.invoice.line', 'invoice', 'Lines',
-        states=_STATES, depends=['state', 'currency_date'])
+        domain=[
+            ('company', '=', Eval('company', -1)),
+            ],
+        states=_STATES, depends=['state', 'currency_date', 'company'])
     taxes = fields.One2Many('account.invoice.tax', 'invoice', 'Tax Lines',
         states=_STATES, depends=_DEPENDS)
     comment = fields.Text('Comment', states=_STATES, depends=_DEPENDS)
@@ -151,10 +165,13 @@ class Invoice(Workflow, ModelSQL, ModelView):
         'Lines to Pay'), 'get_lines_to_pay')
     payment_lines = fields.Many2Many('account.invoice-account.move.line',
         'invoice', 'line', readonly=True, string='Payment Lines',
+        domain=[
+            ('move.company', '=', Eval('company', -1)),
+            ],
         states={
             'invisible': (Eval('state') == 'paid') | ~Eval('payment_lines'),
             },
-        depends=['state'])
+        depends=['state', 'company'])
     amount_to_pay_today = fields.Function(fields.Numeric('Amount to Pay Today',
             digits=(16, Eval('currency_digits', 2)),
             depends=['currency_digits']), 'get_amount_to_pay')
@@ -169,8 +186,10 @@ class Invoice(Workflow, ModelSQL, ModelView):
         super(Invoice, cls).__setup__()
         cls._check_modify_exclude = ['state', 'payment_lines', 'cancel_move',
                 'invoice_report_cache', 'invoice_report_format']
-        cls._order.insert(0, ('number', 'DESC'))
-        cls._order.insert(1, ('id', 'DESC'))
+        cls._order = [
+            ('number', 'DESC'),
+            ('id', 'DESC'),
+            ]
         cls._error_messages.update({
                 'missing_tax_line': ('Invoice "%s" has taxes defined but not '
                     'on invoice lines.\nRe-compute the invoice.'),
@@ -194,10 +213,6 @@ class Invoice(Workflow, ModelSQL, ModelView):
                     'account.'),
                 'missing_credit_account': ('The credit account on journal %s" '
                     'is missing.'),
-                'account_different_company': ('You can not create invoice '
-                    '"%(invoice)s" on company "%(invoice_company)s because '
-                    'account "%(account)s has a different company '
-                    '(%(account_company)s.)'),
                 'same_account_on_line': ('Invoice "%(invoice)s" uses the same '
                     'account "%(account)s" for the invoice and in line '
                     '"%(line)s".'),
@@ -273,7 +288,8 @@ class Invoice(Workflow, ModelSQL, ModelView):
                         limit=limit, offset=offset))
                 for invoice_id, report in cursor.fetchall():
                     if report:
-                        report = buffer(base64.decodestring(str(report)))
+                        report = fields.Binary.cast(
+                            base64.decodestring(bytes(report)))
                         cursor.execute(*sql_table.update(
                                 columns=[sql_table.invoice_report_cache],
                                 values=[report],
@@ -333,63 +349,44 @@ class Invoice(Workflow, ModelSQL, ModelView):
         '''
         Return default account and payment term
         '''
-        account = None
-        payment_term = None
-        result = {
-            'account': None,
-            }
+        self.account = None
         if self.party:
             if self.type in ('out_invoice', 'out_credit_note'):
-                account = self.party.account_receivable
+                self.account = self.party.account_receivable
                 if (self.type == 'out_invoice'
                         and self.party.customer_payment_term):
-                    payment_term = self.party.customer_payment_term
+                    self.payment_term = self.party.customer_payment_term
             elif self.type in ('in_invoice', 'in_credit_note'):
-                account = self.party.account_payable
+                self.account = self.party.account_payable
                 if (self.type == 'in_invoice'
                         and self.party.supplier_payment_term):
-                    payment_term = self.party.supplier_payment_term
+                    self.payment_term = self.party.supplier_payment_term
         if self.company and self.type in ('out_credit_note', 'in_credit_note'):
-            if self.type == 'out_credit_note':
-                payment_term = self.company.party.customer_payment_term
-            else:
-                payment_term = self.company.party.supplier_payment_term
-        if account:
-            result['account'] = account.id
-            result['account.rec_name'] = account.rec_name
-        if payment_term:
-            result['payment_term'] = payment_term.id
-            result['payment_term.rec_name'] = payment_term.rec_name
-        return result
+            if (self.type == 'out_credit_note'
+                    and self.company.party.customer_payment_term):
+                self.payment_term = self.company.party.customer_payment_term
+            elif (self.type == 'in_credit_note'
+                    and self.company.party.supplier_payment_term):
+                self.payment_term = self.company.party.supplier_payment_term
 
     @fields.depends('type', 'party', 'company')
     def on_change_type(self):
         Journal = Pool().get('account.journal')
-        res = {}
         journals = Journal.search([
                 ('type', '=', _TYPE2JOURNAL.get(self.type or 'out_invoice',
                         'revenue')),
                 ], limit=1)
         if journals:
-            journal, = journals
-            res['journal'] = journal.id
-            res['journal.rec_name'] = journal.rec_name
-        res.update(self.__get_account_payment_term())
-        return res
+            self.journal, = journals
+        self.__get_account_payment_term()
 
     @fields.depends('party', 'payment_term', 'type', 'company')
     def on_change_party(self):
-        res = {
-            'invoice_address': None,
-            }
-        res.update(self.__get_account_payment_term())
+        self.invoice_address = None
+        self.__get_account_payment_term()
 
         if self.party:
-            invoice_address = self.party.address_get(type='invoice')
-            if invoice_address:
-                res['invoice_address'] = invoice_address.id
-                res['invoice_address.rec_name'] = invoice_address.rec_name
-        return res
+            self.invoice_address = self.party.address_get(type='invoice')
 
     @fields.depends('currency')
     def on_change_with_currency_digits(self, name=None):
@@ -424,124 +421,74 @@ class Invoice(Workflow, ModelSQL, ModelView):
     @fields.depends('lines', 'taxes', 'currency', 'party', 'type',
         'accounting_date', 'invoice_date')
     def on_change_lines(self):
-        return self._on_change_lines_taxes()
+        self._on_change_lines_taxes()
 
     @fields.depends('lines', 'taxes', 'currency', 'party', 'type',
         'accounting_date', 'invoice_date')
     def on_change_taxes(self):
-        return self._on_change_lines_taxes()
+        self._on_change_lines_taxes()
 
     def _on_change_lines_taxes(self):
         pool = Pool()
-        Tax = pool.get('account.tax')
         InvoiceTax = pool.get('account.invoice.tax')
-        Account = pool.get('account.account')
-        TaxCode = pool.get('account.tax.code')
-        Configuration = pool.get('account.configuration')
-
-        config = Configuration(1)
 
-        res = {
-            'untaxed_amount': Decimal('0.0'),
-            'tax_amount': Decimal('0.0'),
-            'total_amount': Decimal('0.0'),
-            'taxes': {},
-            }
+        self.untaxed_amount = Decimal('0.0')
+        self.tax_amount = Decimal('0.0')
+        self.total_amount = Decimal('0.0')
         computed_taxes = {}
 
-        def round_taxes():
-            if self.currency:
-                for value in computed_taxes.itervalues():
-                    for field in ('base', 'amount'):
-                        value[field] = self.currency.round(value[field])
-
         if self.lines:
-            context = self.get_tax_context()
             for line in self.lines:
-                if (line.type or 'line') != 'line':
-                    continue
-                res['untaxed_amount'] += getattr(line, 'amount', None) or 0
-                with Transaction().set_context(**context):
-                    taxes = Tax.compute(
-                        Tax.browse(getattr(line, 'taxes', []) or []),
-                        getattr(line, 'unit_price', None) or Decimal('0.0'),
-                        getattr(line, 'quantity', None) or 0.0,
-                        date=self.accounting_date or self.invoice_date)
-                for tax in taxes:
-                    key, val = self._compute_tax(tax,
-                        self.type or 'out_invoice')
-                    if key not in computed_taxes:
-                        computed_taxes[key] = val
-                    else:
-                        computed_taxes[key]['base'] += val['base']
-                        computed_taxes[key]['amount'] += val['amount']
-                if config.tax_rounding == 'line':
-                    round_taxes()
-        if config.tax_rounding == 'document':
-            round_taxes()
+                self.untaxed_amount += getattr(line, 'amount', None) or 0
+                for attribute, default_value in (
+                        ('taxes', []),
+                        ('unit_price', Decimal(0)),
+                        ('quantity', 0.),
+                        ):
+                    if not getattr(line, attribute, None):
+                        setattr(line, attribute, default_value)
+            computed_taxes = self._get_taxes()
+
+        def is_zero(amount):
+            if self.currency:
+                return self.currency.is_zero(amount)
+            else:
+                return amount != Decimal('0.0')
 
         tax_keys = []
+        taxes = list(self.taxes or [])
         for tax in (self.taxes or []):
             if tax.manual:
-                res['tax_amount'] += tax.amount or Decimal('0.0')
+                self.tax_amount += tax.amount or Decimal('0.0')
                 continue
             key = (tax.base_code.id if tax.base_code else None, tax.base_sign,
                 tax.tax_code.id if tax.tax_code else None, tax.tax_sign,
                 tax.account.id if tax.account else None,
                 tax.tax.id if tax.tax else None)
             if (key not in computed_taxes) or (key in tax_keys):
-                res['taxes'].setdefault('remove', [])
-                res['taxes']['remove'].append(tax.id)
+                taxes.remove(tax)
                 continue
             tax_keys.append(key)
-            if self.currency:
-                if not self.currency.is_zero(
-                        computed_taxes[key]['base']
-                        - (tax.base or Decimal('0.0'))):
-                    res['tax_amount'] += computed_taxes[key]['amount']
-                    res['taxes'].setdefault('update', [])
-                    res['taxes']['update'].append({
-                            'id': tax.id,
-                            'amount': computed_taxes[key]['amount'],
-                            'base': computed_taxes[key]['base'],
-                            })
-                else:
-                    res['tax_amount'] += tax.amount or Decimal('0.0')
+            if not is_zero(computed_taxes[key]['base']
+                    - (tax.base or Decimal('0.0'))):
+                self.tax_amount += computed_taxes[key]['amount']
+                tax.amount = computed_taxes[key]['amount']
+                tax.base = computed_taxes[key]['base']
             else:
-                if (computed_taxes[key]['base'] - (tax.base or Decimal('0.0'))
-                        != Decimal('0.0')):
-                    res['tax_amount'] += computed_taxes[key]['amount']
-                    res['taxes'].setdefault('update', [])
-                    res['taxes']['update'].append({
-                        'id': tax.id,
-                        'amount': computed_taxes[key]['amount'],
-                        'base': computed_taxes[key]['base'],
-                        })
-                else:
-                    res['tax_amount'] += tax.amount or Decimal('0.0')
+                self.tax_amount += tax.amount or Decimal('0.0')
         for key in computed_taxes:
             if key not in tax_keys:
-                res['tax_amount'] += computed_taxes[key]['amount']
-                res['taxes'].setdefault('add', [])
+                self.tax_amount += computed_taxes[key]['amount']
                 value = InvoiceTax.default_get(InvoiceTax._fields.keys())
                 value.update(computed_taxes[key])
-                for field, Target in (
-                        ('account', Account),
-                        ('base_code', TaxCode),
-                        ('tax_code', TaxCode),
-                        ('tax', Tax),
-                        ):
-                    if value.get(field):
-                        value[field + '.rec_name'] = \
-                            Target(value[field]).rec_name
-                res['taxes']['add'].append((-1, value))
+                taxes.append(InvoiceTax(**value))
+        self.taxes = taxes
         if self.currency:
-            res['untaxed_amount'] = self.currency.round(res['untaxed_amount'])
-            res['tax_amount'] = self.currency.round(res['tax_amount'])
-        res['total_amount'] = res['untaxed_amount'] + res['tax_amount']
+            self.untaxed_amount = self.currency.round(self.untaxed_amount)
+            self.tax_amount = self.currency.round(self.tax_amount)
+        self.total_amount = self.untaxed_amount + self.tax_amount
         if self.currency:
-            res['total_amount'] = self.currency.round(res['total_amount'])
-        return res
+            self.total_amount = self.currency.round(self.total_amount)
 
     @classmethod
     def get_amount(cls, invoices, names):
@@ -599,8 +546,7 @@ class Invoice(Workflow, ModelSQL, ModelView):
                     ).select(invoice.id,
                     Coalesce(Sum(
                             Case((line.second_currency == invoice.currency,
-                                    Abs(line.amount_second_currency)
-                                    * Sign(line.debit - line.credit)),
+                                    line.amount_second_currency),
                                 else_=line.debit - line.credit)),
                         0).cast(type_name),
                     where=(invoice.account == line.account) & red_sql,
@@ -654,17 +600,15 @@ class Invoice(Workflow, ModelSQL, ModelView):
         line = MoveLine.__table__()
         invoice = cls.__table__()
         cursor = Transaction().cursor
-        in_max = cursor.IN_MAX
 
         lines = defaultdict(list)
-        for i in range(0, len(invoices), in_max):
-            sub_ids = [i.id for i in invoices[i:i + in_max]]
+        for sub_ids in grouped_slice(invoices):
             red_sql = reduce_ids(invoice.id, sub_ids)
             cursor.execute(*invoice.join(line,
                 condition=((invoice.move == line.move)
                     & (invoice.account == line.account))).select(
                         invoice.id, line.id,
-                        where=(line.maturity_date != None) & red_sql,
+                        where=(line.maturity_date != Null) & red_sql,
                         order_by=(invoice.id, line.maturity_date)))
             for invoice_id, line_id in cursor.fetchall():
                 lines[invoice_id].append(line_id)
@@ -691,10 +635,7 @@ class Invoice(Workflow, ModelSQL, ModelView):
                     continue
                 if (line.second_currency
                         and line.second_currency == invoice.currency):
-                    if line.debit - line.credit > _ZERO:
-                        amount_currency += abs(line.amount_second_currency)
-                    else:
-                        amount_currency -= abs(line.amount_second_currency)
+                    amount_currency += line.amount_second_currency
                 else:
                     amount += line.debit - line.credit
             for line in invoice.payment_lines:
@@ -702,10 +643,7 @@ class Invoice(Workflow, ModelSQL, ModelView):
                     continue
                 if (line.second_currency
                         and line.second_currency == invoice.currency):
-                    if line.debit - line.credit > _ZERO:
-                        amount_currency += abs(line.amount_second_currency)
-                    else:
-                        amount_currency -= abs(line.amount_second_currency)
+                    amount_currency += line.amount_second_currency
                 else:
                     amount += line.debit - line.credit
             if invoice.type in ('in_invoice', 'out_credit_note'):
@@ -781,80 +719,29 @@ class Invoice(Workflow, ModelSQL, ModelView):
                 clause[2]))
         return [('id', 'in', query)]
 
-    def get_tax_context(self):
+    @property
+    def taxable_lines(self):
+        return [(l.taxes, l.unit_price, l.quantity) for l in self.lines
+            if l.type == 'line']
+
+    @property
+    def tax_type(self):
+        return self.type.split('_', 1)[1]
+
+    @property
+    def tax_date(self):
+        return self.accounting_date or self.invoice_date
+
+    def _get_tax_context(self):
         context = {}
         if self.party and self.party.lang:
             context['language'] = self.party.lang.code
         return context
 
-    @staticmethod
-    def _compute_tax(invoice_tax, invoice_type):
-        val = {}
-        tax = invoice_tax['tax']
-        val['manual'] = False
-        val['description'] = tax.description
-        val['base'] = invoice_tax['base']
-        val['amount'] = invoice_tax['amount']
-        val['tax'] = tax.id if tax else None
-
-        if invoice_type in ('out_invoice', 'in_invoice'):
-            val['base_code'] = (tax.invoice_base_code.id
-                if tax.invoice_base_code else None)
-            val['base_sign'] = tax.invoice_base_sign
-            val['tax_code'] = (tax.invoice_tax_code.id
-                if tax.invoice_tax_code else None)
-            val['tax_sign'] = tax.invoice_tax_sign
-            val['account'] = (tax.invoice_account.id
-                if tax.invoice_account else None)
-        else:
-            val['base_code'] = (tax.credit_note_base_code.id
-                if tax.credit_note_base_code else None)
-            val['base_sign'] = tax.credit_note_base_sign
-            val['tax_code'] = (tax.credit_note_tax_code.id
-                if tax.credit_note_tax_code else None)
-            val['tax_sign'] = tax.credit_note_tax_sign
-            val['account'] = (tax.credit_note_account.id
-                if tax.credit_note_account else None)
-        key = (val['base_code'], val['base_sign'],
-            val['tax_code'], val['tax_sign'],
-            val['account'], val['tax'])
-        return key, val
-
     def _compute_taxes(self):
-        pool = Pool()
-        Tax = pool.get('account.tax')
-        Configuration = pool.get('account.configuration')
-
-        config = Configuration(1)
-
-        context = self.get_tax_context()
-
-        taxes = {}
-
-        def round_taxes():
-            for value in taxes.itervalues():
-                for field in ('base', 'amount'):
-                    value[field] = self.currency.round(value[field])
-
-        for line in self.lines:
-            if line.type != 'line':
-                continue
-            with Transaction().set_context(**context):
-                tax_list = Tax.compute(Tax.browse(line.taxes),
-                    line.unit_price, line.quantity,
-                    date=self.accounting_date or self.invoice_date)
-            for tax in tax_list:
-                key, val = self._compute_tax(tax, self.type)
-                val['invoice'] = self.id
-                if key not in taxes:
-                    taxes[key] = val
-                else:
-                    taxes[key]['base'] += val['base']
-                    taxes[key]['amount'] += val['amount']
-            if config.tax_rounding == 'line':
-                round_taxes()
-        if config.tax_rounding == 'document':
-            round_taxes()
+        taxes = self._get_taxes()
+        for tax in taxes.itervalues():
+            tax['invoice'] = self.id
         return taxes
 
     @classmethod
@@ -880,7 +767,7 @@ class Invoice(Workflow, ModelSQL, ModelView):
                     key = (base_code_id, tax.base_sign,
                         tax_code_id, tax.tax_sign,
                         tax.account.id, tax_id)
-                    if (not key in computed_taxes) or (key in tax_keys):
+                    if (key not in computed_taxes) or (key in tax_keys):
                         if exception:
                             cls.raise_user_error('missing_tax_line',
                                 (invoice.rec_name,))
@@ -894,7 +781,7 @@ class Invoice(Workflow, ModelSQL, ModelView):
                                 (invoice.rec_name,))
                         to_write.extend(([tax], computed_taxes[key]))
                 for key in computed_taxes:
-                    if not key in tax_keys:
+                    if key not in tax_keys:
                         if exception:
                             cls.raise_user_error('missing_tax_line2',
                                 (invoice.rec_name,))
@@ -938,7 +825,7 @@ class Invoice(Workflow, ModelSQL, ModelView):
             with Transaction().set_context(date=self.currency_date):
                 res['amount_second_currency'] = Currency.compute(
                     self.company.currency, amount, self.currency)
-            res['amount_second_currency'] = abs(res['amount_second_currency'])
+            res['amount_second_currency'] = -res['amount_second_currency']
             res['second_currency'] = self.currency.id
         else:
             res['amount_second_currency'] = None
@@ -976,8 +863,7 @@ class Invoice(Workflow, ModelSQL, ModelView):
         for line in move_lines:
             total += line['debit'] - line['credit']
             if line['amount_second_currency']:
-                total_currency += line['amount_second_currency'].copy_sign(
-                    line['debit'] - line['credit'])
+                total_currency += line['amount_second_currency']
 
         term_lines = self.payment_term.compute(total, self.company.currency,
             self.invoice_date)
@@ -1001,6 +887,7 @@ class Invoice(Workflow, ModelSQL, ModelView):
                     'period': period_id,
                     'date': accounting_date,
                     'origin': str(self),
+                    'company': self.company.id,
                     'lines': [('create', move_lines)],
                     }])
         self.write([self], {
@@ -1061,7 +948,11 @@ class Invoice(Workflow, ModelSQL, ModelView):
 
     @classmethod
     def search_rec_name(cls, name, clause):
-        return ['OR',
+        if clause[1].startswith('!') or clause[1].startswith('not '):
+            bool_op = 'AND'
+        else:
+            bool_op = 'OR'
+        return [bool_op,
             ('number',) + tuple(clause[1:]),
             ('reference',) + tuple(clause[1:]),
             ('party',) + tuple(clause[1:]),
@@ -1072,6 +963,10 @@ class Invoice(Workflow, ModelSQL, ModelView):
                     (l.origin_name for l in self.lines))))
 
     @classmethod
+    def view_attributes(cls):
+        return [('//field[@name="comment"]', 'spell', Eval('party_lang'))]
+
+    @classmethod
     def delete(cls, invoices):
         cls.check_modify(invoices)
         # Cancel before delete
@@ -1117,19 +1012,9 @@ class Invoice(Workflow, ModelSQL, ModelView):
     def validate(cls, invoices):
         super(Invoice, cls).validate(invoices)
         for invoice in invoices:
-            invoice.check_account()
             invoice.check_same_account()
             invoice.check_cancel_move()
 
-    def check_account(self):
-        if self.account.company != self.company:
-            self.raise_user_error('check_account', {
-                    'invoice': self.rec_name,
-                    'invoice_company': self.company.rec_name,
-                    'account': self.account.rec_name,
-                    'account_company': self.account.company.rec_name,
-                    })
-
     def check_same_account(self):
         for line in self.lines:
             if (line.type == 'line'
@@ -1229,7 +1114,8 @@ class Invoice(Workflow, ModelSQL, ModelView):
                         if self.account.party_required else None),
                     'debit': Decimal('0.0'),
                     'credit': amount,
-                    'amount_second_currency': amount_second_currency,
+                    'amount_second_currency': (-amount_second_currency
+                        if amount_second_currency else amount_second_currency),
                     'second_currency': second_currency,
                     })
             lines.append({
@@ -1269,7 +1155,8 @@ class Invoice(Workflow, ModelSQL, ModelView):
                         if journal.credit_account.party_required else None),
                     'debit': Decimal('0.0'),
                     'credit': amount,
-                    'amount_second_currency': amount_second_currency,
+                    'amount_second_currency': (-amount_second_currency
+                        if amount_second_currency else amount_second_currency),
                     'second_currency': second_currency,
                     })
 
@@ -1279,6 +1166,7 @@ class Invoice(Workflow, ModelSQL, ModelView):
                     'journal': journal.id,
                     'period': period_id,
                     'date': date,
+                    'company': self.company.id,
                     'lines': [('create', lines)],
                     }])
         Move.post([move])
@@ -1461,7 +1349,7 @@ class InvoicePaymentLine(ModelSQL):
             ondelete='CASCADE', select=True, required=True)
 
 
-class InvoiceLine(ModelSQL, ModelView):
+class InvoiceLine(ModelSQL, ModelView, TaxableMixin):
     'Invoice Line'
     __name__ = 'account.invoice.line'
     _rec_name = 'description'
@@ -1493,16 +1381,11 @@ class InvoiceLine(ModelSQL, ModelView):
         depends=['invoice'])
     currency_digits = fields.Function(fields.Integer('Currency Digits'),
         'on_change_with_currency_digits')
-    company = fields.Many2One('company.company', 'Company',
-        states={
-            'required': ~Eval('invoice'),
-            },
+    company = fields.Many2One('company.company', 'Company', required=True,
         domain=[
             ('id', If(Eval('context', {}).contains('company'), '=', '!='),
                 Eval('context', {}).get('company', -1)),
-            ],
-        depends=['invoice'], select=True)
-
+            ], select=True)
     sequence = fields.Integer('Sequence',
         states={
             'invisible': Bool(Eval('context', {}).get('standalone')),
@@ -1544,25 +1427,12 @@ class InvoiceLine(ModelSQL, ModelView):
         fields.Many2One('product.uom.category', 'Product Uom Category'),
         'on_change_with_product_uom_category')
     account = fields.Many2One('account.account', 'Account',
-        domain=[
-            ('company', '=', Eval('_parent_invoice', {}).get('company',
-                    Eval('context', {}).get('company', -1))),
-            If(Bool(Eval('_parent_invoice')),
-                If(Eval('_parent_invoice', {}).get('type').in_(['out_invoice',
-                    'out_credit_note']),
-                    ('kind', '=', 'revenue'),
-                    ('kind', '=', 'expense')),
-                If(Eval('invoice_type').in_(['out_invoice',
-                            'out_credit_note']),
-                    ('kind', '=', 'revenue'),
-                    ('kind', '=', 'expense')))
-            ],
         states={
             'invisible': Eval('type') != 'line',
             'required': Eval('type') == 'line',
             },
-        depends=['type', 'invoice_type'])
-    unit_price = fields.Numeric('Unit Price', digits=(16, 4),
+        depends=['type', 'invoice_type', 'company'])
+    unit_price = fields.Numeric('Unit Price', digits=price_digits,
         states={
             'invisible': Eval('type') != 'line',
             'required': Eval('type') == 'line',
@@ -1579,6 +1449,7 @@ class InvoiceLine(ModelSQL, ModelView):
     note = fields.Text('Note')
     taxes = fields.Many2Many('account.invoice.line-account.tax',
         'line', 'tax', 'Taxes',
+        order=[('tax.sequence', 'ASC'), ('tax.id', 'ASC')],
         domain=[('parent', '=', None), ['OR',
                 ('group', '=', None),
                 ('group.kind', 'in',
@@ -1592,11 +1463,12 @@ class InvoiceLine(ModelSQL, ModelView):
                             ['sale', 'both'],
                             ['purchase', 'both']))
                     )],
+            ('company', '=', Eval('company', -1)),
             ],
         states={
             'invisible': Eval('type') != 'line',
             },
-        depends=['type', 'invoice_type'])
+        depends=['type', 'invoice_type', 'company'])
     invoice_taxes = fields.Function(fields.One2Many('account.invoice.tax',
         None, 'Invoice Taxes'), 'get_invoice_taxes')
     origin = fields.Reference('Origin', selection='get_origin', select=True,
@@ -1624,19 +1496,50 @@ class InvoiceLine(ModelSQL, ModelView):
                     '"%(invoice)s" that is posted or paid.'),
                 'create': ('You can not add a line to invoice "%(invoice)s" '
                     'that is posted, paid or cancelled.'),
-                'account_different_company': (
-                    'You can not create invoice line '
-                    '"%(line)s" on invoice "%(invoice)s of company '
-                    '"%(invoice_line_company)s because account "%(account)s '
-                    'has company "%(account_company)s".'),
                 'same_account_on_invoice': ('You can not create invoice line '
                     '"%(line)s" on invoice "%(invoice)s" because the invoice '
                     'uses the same account (%(account)s).'),
                 })
 
+        # Set account domain dynamically for kind
+        cls.account.domain = [
+            ('company', '=', Eval('company', -1)),
+            If(Bool(Eval('_parent_invoice')),
+                If(Eval('_parent_invoice', {}).get('type').in_(
+                        ['out_invoice', 'out_credit_note']),
+                    ('kind', 'in', cls._account_domain('out')),
+                    If(Eval('_parent_invoice', {}).get('type').in_(
+                            ['in_invoice', 'in_credit_note']),
+                        ('kind', 'in', cls._account_domain('in')),
+                        ('kind', 'in',
+                            cls._account_domain('out')
+                            + cls._account_domain('in')))),
+                If(Eval('invoice_type').in_(
+                        ['out_invoice', 'out_credit_note']),
+                    ('kind', 'in', cls._account_domain('out')),
+                    If(Eval('invoice_type').in_(
+                            ['in_invoice', 'in_credit_note']),
+                        ('kind', 'in', cls._account_domain('in')),
+                        ('kind', 'in',
+                            cls._account_domain('out')
+                            + cls._account_domain('in'))))),
+            ]
+        cls.account.depends += ['company', 'invoice_type']
+
+    @staticmethod
+    def _account_domain(type_):
+        if type_ == 'out':
+            return ['revenue']
+        elif type_ == 'in':
+            return ['expense']
+
     @classmethod
     def __register__(cls, module_name):
+        pool = Pool()
+        Invoice = pool.get('account.invoice')
+        invoice = Invoice.__table__()
         TableHandler = backend.get('TableHandler')
+        sql_table = cls.__table__()
         super(InvoiceLine, cls).__register__(module_name)
         cursor = Transaction().cursor
         table = TableHandler(cursor, cls, module_name)
@@ -1647,10 +1550,19 @@ class InvoiceLine(ModelSQL, ModelView):
         # Migration from 2.4: drop required on sequence
         table.not_null_action('sequence', action='remove')
 
+        # Migration from 3.4: company is required
+        cursor.execute(*sql_table.join(invoice,
+                condition=sql_table.invoice == invoice.id
+                ).select(sql_table.id, invoice.company,
+                where=sql_table.company == Null))
+        for line_id, company_id in cursor.fetchall():
+            cursor.execute(*sql_table.update([sql_table.company], [company_id],
+                    where=sql_table.id == line_id))
+
     @staticmethod
     def order_sequence(tables):
         table, _ = tables[None]
-        return [table.sequence == None, table.sequence]
+        return [table.sequence == Null, table.sequence]
 
     @staticmethod
     def default_currency():
@@ -1734,21 +1646,28 @@ class InvoiceLine(ModelSQL, ModelView):
             return self.origin.invoice.rec_name
         return self.origin.rec_name if self.origin else None
 
-    def get_invoice_taxes(self, name):
-        pool = Pool()
-        Tax = pool.get('account.tax')
-        Invoice = pool.get('account.invoice')
+    @property
+    def taxable_lines(self):
+        return [(self.taxes, self.unit_price, self.quantity)]
+
+    @property
+    def tax_type(self):
+        return self.invoice.tax_type
+
+    @property
+    def tax_date(self):
+        return self.invoice.tax_date
 
+    def _get_tax_context(self):
+        if self.invoice:
+            return self.invoice._get_tax_context()
+        else:
+            return {}
+
+    def get_invoice_taxes(self, name):
         if not self.invoice:
             return
-        context = self.invoice.get_tax_context()
-        taxes_keys = []
-        with Transaction().set_context(**context):
-            taxes = Tax.compute(Tax.browse(self.taxes),
-                self.unit_price, self.quantity)
-        for tax in taxes:
-            key, _ = Invoice._compute_tax(tax, self.invoice.type)
-            taxes_keys.append(key)
+        taxes_keys = self._get_taxes().keys()
         taxes = []
         for tax in self.invoice.taxes:
             if tax.manual:
@@ -1781,8 +1700,7 @@ class InvoiceLine(ModelSQL, ModelView):
         Date = pool.get('ir.date')
 
         if not self.product:
-            return {}
-        res = {}
+            return
 
         context = {}
         party = None
@@ -1800,7 +1718,7 @@ class InvoiceLine(ModelSQL, ModelView):
         currency_date = Date.today()
         if self.invoice and self.invoice.currency_date:
             currency_date = self.invoice.currency_date
-        #TODO check if today date is correct
+        # TODO check if today date is correct
         if self.invoice and self.invoice.currency:
             currency = self.invoice.currency
         elif self.currency:
@@ -1813,72 +1731,67 @@ class InvoiceLine(ModelSQL, ModelView):
         if type_ in ('in_invoice', 'in_credit_note'):
             if company and currency:
                 with Transaction().set_context(date=currency_date):
-                    res['unit_price'] = Currency.compute(
+                    self.unit_price = Currency.compute(
                         company.currency, self.product.cost_price,
                         currency, round=False)
             else:
-                res['unit_price'] = self.product.cost_price
+                self.unit_price = self.product.cost_price
             try:
-                account_expense = self.product.account_expense_used
-                res['account'] = account_expense.id
-                res['account.rec_name'] = account_expense.rec_name
+                self.account = self.product.account_expense_used
             except Exception:
                 pass
-            res['taxes'] = []
+            taxes = []
             pattern = self._get_tax_rule_pattern()
             for tax in self.product.supplier_taxes_used:
                 if party and party.supplier_tax_rule:
                     tax_ids = party.supplier_tax_rule.apply(tax, pattern)
                     if tax_ids:
-                        res['taxes'].extend(tax_ids)
+                        taxes.extend(tax_ids)
                     continue
-                res['taxes'].append(tax.id)
+                taxes.append(tax)
             if party and party.supplier_tax_rule:
                 tax_ids = party.supplier_tax_rule.apply(None, pattern)
                 if tax_ids:
-                    res['taxes'].extend(tax_ids)
+                    taxes.extend(tax_ids)
+            self.taxes = taxes
         else:
             if company and currency:
                 with Transaction().set_context(date=currency_date):
-                    res['unit_price'] = Currency.compute(
+                    self.unit_price = Currency.compute(
                         company.currency, self.product.list_price,
                         currency, round=False)
             else:
-                res['unit_price'] = self.product.list_price
+                self.unit_price = self.product.list_price
             try:
-                account_revenue = self.product.account_revenue_used
-                res['account'] = account_revenue.id
-                res['account.rec_name'] = account_revenue.rec_name
+                self.account = self.product.account_revenue_used
             except Exception:
                 pass
-            res['taxes'] = []
+            taxes = []
             pattern = self._get_tax_rule_pattern()
             for tax in self.product.customer_taxes_used:
                 if party and party.customer_tax_rule:
                     tax_ids = party.customer_tax_rule.apply(tax, pattern)
                     if tax_ids:
-                        res['taxes'].extend(tax_ids)
+                        taxes.extend(tax_ids)
                     continue
-                res['taxes'].append(tax.id)
+                taxes.append(tax.id)
             if party and party.customer_tax_rule:
                 tax_ids = party.customer_tax_rule.apply(None, pattern)
                 if tax_ids:
-                    res['taxes'].extend(tax_ids)
+                    taxes.extend(tax_ids)
+            self.taxes = taxes
 
         if not self.description:
             with Transaction().set_context(**context):
-                res['description'] = Product(self.product.id).rec_name
+                self.description = Product(self.product.id).rec_name
 
         category = self.product.default_uom.category
         if not self.unit or self.unit not in category.uoms:
-            res['unit'] = self.product.default_uom.id
-            res['unit.rec_name'] = self.product.default_uom.rec_name
-            res['unit_digits'] = self.product.default_uom.digits
+            self.unit = self.product.default_uom.id
+            self.unit_digits = self.product.default_uom.digits
 
-        self.unit_price = res['unit_price']
         self.type = 'line'
-        res['amount'] = self.on_change_with_amount()
-        return res
+        self.amount = self.on_change_with_amount()
 
     @fields.depends('product')
     def on_change_with_product_uom_category(self, name=None):
@@ -1891,9 +1804,6 @@ class InvoiceLine(ModelSQL, ModelView):
         if self.product:
             return {}
         taxes = []
-        result = {
-            'taxes': taxes,
-            }
         if (self.invoice and self.invoice.party
                 and self.invoice.type):
             party = self.invoice.party
@@ -1912,8 +1822,8 @@ class InvoiceLine(ModelSQL, ModelView):
                     if tax_ids:
                         taxes.extend(tax_ids)
                     continue
-                taxes.append(tax.id)
-        return result
+                taxes.append(tax)
+        self.taxes = taxes
 
     @classmethod
     def _get_origin(cls):
@@ -1943,6 +1853,13 @@ class InvoiceLine(ModelSQL, ModelView):
                         })
 
     @classmethod
+    def view_attributes(cls):
+        return [('//field[@name="note"]|//field[@name="description"]', 'spell',
+                If(Bool(Eval('_parent_invoice')),
+                    Eval('_parent_invoice', {}).get('party_lang'),
+                    Eval('party_lang')))]
+
+    @classmethod
     def delete(cls, lines):
         cls.check_modify(lines)
         super(InvoiceLine, cls).delete(lines)
@@ -1977,31 +1894,8 @@ class InvoiceLine(ModelSQL, ModelView):
     def validate(cls, lines):
         super(InvoiceLine, cls).validate(lines)
         for line in lines:
-            line.check_account_company()
             line.check_same_account()
 
-    def check_account_company(self):
-        if self.type == 'line':
-            if self.invoice:
-                if self.account.company != self.invoice.company:
-                    self.raise_user_error('account_different_company', {
-                            'line': self.rec_name,
-                            'invoice': self.invoice.rec_name,
-                            'invoice_line_company':
-                                self.invoice.company.rec_name,
-                            'account': self.account.rec_name,
-                            'account_company': self.account.company.rec_name,
-                            })
-            elif self.company:
-                if self.account.company != self.company:
-                    self.raise_user_error('account_different_company', {
-                            'line': self.rec_name,
-                            'invoice': '/',
-                            'invoice_line_company': self.company.rec_name,
-                            'account': self.account.rec_name,
-                            'account_company': self.account.company.rec_name,
-                            })
-
     def check_same_account(self):
         if self.type == 'line':
             if (self.invoice
@@ -2014,34 +1908,28 @@ class InvoiceLine(ModelSQL, ModelView):
 
     def _compute_taxes(self):
         pool = Pool()
-        Tax = pool.get('account.tax')
         Currency = pool.get('currency.currency')
 
-        context = self.invoice.get_tax_context()
         res = []
         if self.type != 'line':
             return res
-        with Transaction().set_context(**context):
-            taxes = Tax.compute(Tax.browse(self.taxes),
-                self.unit_price, self.quantity)
+        taxes = self._get_taxes().values()
         for tax in taxes:
             if self.invoice.type in ('out_invoice', 'in_invoice'):
-                base_code_id = (tax['tax'].invoice_base_code.id
-                    if tax['tax'].invoice_base_code else None)
-                amount = tax['base'] * tax['tax'].invoice_base_sign
+                base_code = tax['base_code']
+                amount = tax['base'] * tax['base_sign']
             else:
-                base_code_id = (tax['tax'].credit_note_base_code.id
-                    if tax['tax'].credit_note_base_code else None)
-                amount = tax['base'] * tax['tax'].credit_note_base_sign
-            if base_code_id:
+                base_code = tax['base_code']
+                amount = tax['base'] * tax['base_sign']
+            if base_code:
                 with Transaction().set_context(
                         date=self.invoice.currency_date):
                     amount = Currency.compute(self.invoice.currency,
                         amount, self.invoice.company.currency)
                 res.append({
-                        'code': base_code_id,
+                        'code': base_code,
                         'amount': amount,
-                        'tax': tax['tax'].id if tax['tax'] else None,
+                        'tax': tax['tax'],
                         })
         return res
 
@@ -2071,19 +1959,15 @@ class InvoiceLine(ModelSQL, ModelView):
             else:
                 res['debit'] = Decimal('0.0')
                 res['credit'] = - amount
-                if res['amount_second_currency']:
-                    res['amount_second_currency'] = \
-                        - res['amount_second_currency']
         else:
             if amount >= Decimal('0.0'):
                 res['debit'] = Decimal('0.0')
                 res['credit'] = amount
-                if res['amount_second_currency']:
-                    res['amount_second_currency'] = \
-                        - res['amount_second_currency']
             else:
                 res['debit'] = - amount
                 res['credit'] = Decimal('0.0')
+            if res['amount_second_currency']:
+                res['amount_second_currency'] *= -1
         res['account'] = self.account.id
         if self.account.party_required:
             res['party'] = self.invoice.party.id
@@ -2155,6 +2039,9 @@ class InvoiceTax(ModelSQL, ModelView):
             ])
     tax_sign = fields.Numeric('Tax Sign', digits=(2, 0), required=True)
     tax = fields.Many2One('account.tax', 'Tax',
+        domain=[
+            ('company', '=', Eval('_parent_invoice', {}).get('company', 0)),
+            ],
         states={
             'readonly': ~Eval('manual', False),
             },
@@ -2169,10 +2056,6 @@ class InvoiceTax(ModelSQL, ModelView):
                     '"%(invoice)s" because it is posted or paid.'),
                 'create': ('You can not add line "%(line)s" to invoice '
                     '"%(invoice)s" because it is posted, paid or canceled.'),
-                'invalid_account_company': ('You can not create invoice '
-                    '"%(invoice)s" on company "%(invoice_company)s" using '
-                    'account "%(account)s" from company '
-                    '"%(account_company)s".'),
                 'invalid_base_code_company': ('You can not create invoice '
                     '"%(invoice)s" on company "%(invoice_company)s" '
                     'using base tax code "%(base_code)s" from company '
@@ -2197,7 +2080,7 @@ class InvoiceTax(ModelSQL, ModelView):
     @staticmethod
     def order_sequence(tables):
         table, _ = tables[None]
-        return [table.sequence == None, table.sequence]
+        return [table.sequence == Null, table.sequence]
 
     @staticmethod
     def default_base():
@@ -2222,36 +2105,31 @@ class InvoiceTax(ModelSQL, ModelView):
     @fields.depends('tax', '_parent_invoice.party', '_parent_invoice.type')
     def on_change_tax(self):
         Tax = Pool().get('account.tax')
-        changes = {}
-        if self.tax:
-            if self.invoice:
-                context = self.invoice.get_tax_context()
-            else:
-                context = {}
-            with Transaction().set_context(**context):
-                tax = Tax(self.tax.id)
-            changes['description'] = tax.description
-            if self.invoice and self.invoice.type:
-                invoice_type = self.invoice.type
-            else:
-                invoice_type = 'out_invoice'
-            if invoice_type in ('out_invoice', 'in_invoice'):
-                changes['base_code'] = (tax.invoice_base_code.id
-                    if tax.invoice_base_code else None)
-                changes['base_sign'] = tax.invoice_base_sign
-                changes['tax_code'] = (tax.invoice_tax_code.id
-                    if tax.invoice_tax_code else None)
-                changes['tax_sign'] = tax.invoice_tax_sign
-                changes['account'] = tax.invoice_account.id
-            else:
-                changes['base_code'] = (tax.credit_note_base_code.id
-                    if tax.credit_note_base_code else None)
-                changes['base_sign'] = tax.credit_note_base_sign
-                changes['tax_code'] = (tax.credit_note_tax_code.id
-                    if tax.credit_note_tax_code else None)
-                changes['tax_sign'] = tax.credit_note_tax_sign
-                changes['account'] = tax.credit_note_account.id
-        return changes
+        if not self.tax:
+            return
+        if self.invoice:
+            context = self.invoice.get_tax_context()
+        else:
+            context = {}
+        with Transaction().set_context(**context):
+            tax = Tax(self.tax.id)
+        self.description = tax.description
+        if self.invoice and self.invoice.type:
+            invoice_type = self.invoice.type
+        else:
+            invoice_type = 'out_invoice'
+        if invoice_type in ('out_invoice', 'in_invoice'):
+            self.base_code = tax.invoice_base_code
+            self.base_sign = tax.invoice_base_sign
+            self.tax_code = tax.invoice_tax_code
+            self.tax_sign = tax.invoice_tax_sign
+            self.account = tax.invoice_account
+        else:
+            self.base_code = tax.credit_note_base_code
+            self.base_sign = tax.credit_note_base_sign
+            self.tax_code = tax.credit_note_tax_code
+            self.tax_sign = tax.credit_note_tax_sign
+            self.account = tax.credit_note_account
 
     @fields.depends('tax', 'base', 'amount', 'manual')
     def on_change_with_amount(self):
@@ -2305,38 +2183,6 @@ class InvoiceTax(ModelSQL, ModelView):
                 cls.raise_user_error('create')
         return super(InvoiceTax, cls).create(vlist)
 
-    @classmethod
-    def validate(cls, taxes):
-        super(InvoiceTax, cls).validate(taxes)
-        for tax in taxes:
-            tax.check_company()
-
-    def check_company(self):
-        company = self.invoice.company
-        if self.account.company != company:
-            self.raise_user_error('invalid_account_company', {
-                    'invoice': self.invoice.rec_name,
-                    'invoice_company': self.invoice.company.rec_name,
-                    'account': self.account.rec_name,
-                    'account_company': self.account.company.rec_name,
-                    })
-        if self.base_code:
-            if self.base_code.company != company:
-                self.raise_user_error('invalid_base_code_company', {
-                        'invoice': self.invoice.rec_name,
-                        'invoice_company': self.invoice.company.rec_name,
-                        'base_code': self.base_code.rec_name,
-                        'base_code_company': self.base_code.company.rec_name,
-                        })
-        if self.tax_code:
-            if self.tax_code.company != company:
-                self.raise_user_error('invalid_tax_code_company', {
-                        'invoice': self.invoice.rec_name,
-                        'invoice_company': self.invoice.company.rec_name,
-                        'tax_code': self.tax_code.rec_name,
-                        'tax_code_company': self.tax_code.company.rec_name,
-                        })
-
     def get_move_line(self):
         '''
         Return a list of move lines values for invoice tax
@@ -2363,19 +2209,15 @@ class InvoiceTax(ModelSQL, ModelView):
             else:
                 res['debit'] = Decimal('0.0')
                 res['credit'] = - amount
-                if res['amount_second_currency']:
-                    res['amount_second_currency'] = \
-                        - res['amount_second_currency']
         else:
             if amount >= Decimal('0.0'):
                 res['debit'] = Decimal('0.0')
                 res['credit'] = amount
-                if res['amount_second_currency']:
-                    res['amount_second_currency'] = \
-                        - res['amount_second_currency']
             else:
                 res['debit'] = - amount
                 res['credit'] = Decimal('0.0')
+            if res['amount_second_currency']:
+                res['amount_second_currency'] *= -1
         res['account'] = self.account.id
         if self.account.party_required:
             res['party'] = self.invoice.party.id
@@ -2447,14 +2289,28 @@ class InvoiceReport(Report):
     def execute(cls, ids, data):
         Invoice = Pool().get('account.invoice')
 
-        res = super(InvoiceReport, cls).execute(ids, data)
+        result = super(InvoiceReport, cls).execute(ids, data)
+        invoice = Invoice(ids[0])
+
         if len(ids) > 1:
-            res = (res[0], res[1], True, res[3])
+            result = result[:2] + (True,) + result[3:]
         else:
-            invoice = Invoice(ids[0])
             if invoice.number:
-                res = (res[0], res[1], res[2], res[3] + ' - ' + invoice.number)
-        return res
+                result = result[:3] + (result[3] + ' - ' + invoice.number,)
+
+        if invoice.invoice_report_cache:
+            result = (invoice.invoice_report_format,
+                invoice.invoice_report_cache) + result[2:]
+        else:
+            # If the invoice is posted or paid and the report not saved in
+            # invoice_report_cache there was an error somewhere. So we save it
+            # now in invoice_report_cache
+            if (invoice.state in ('posted', 'paid')
+                    and invoice.type in ('out_invoice', 'out_credit_note')):
+                invoice.invoice_report_format, invoice.invoice_report_cache = \
+                    result[:2]
+                invoice.save()
+        return result
 
     @classmethod
     def _get_records(cls, ids, model, data):
@@ -2462,31 +2318,10 @@ class InvoiceReport(Report):
             return super(InvoiceReport, cls)._get_records(ids[:1], model, data)
 
     @classmethod
-    def parse(cls, report, records, data, localcontext):
-        pool = Pool()
-        User = pool.get('res.user')
-        Invoice = pool.get('account.invoice')
-
-        invoice = records[0]
-
-        if invoice.invoice_report_cache:
-            return (invoice.invoice_report_format,
-                invoice.invoice_report_cache)
-
-        user = User(Transaction().user)
-        localcontext['company'] = user.company
-        res = super(InvoiceReport, cls).parse(report, records, data,
-                localcontext)
-        # If the invoice is posted or paid and the report not saved in
-        # invoice_report_cache there was an error somewhere. So we save it now
-        # in invoice_report_cache
-        if (invoice.state in ('posted', 'paid')
-                and invoice.type in ('out_invoice', 'out_credit_note')):
-            Invoice.write([Invoice(invoice.id)], {
-                'invoice_report_format': res[0],
-                'invoice_report_cache': buffer(res[1]),
-                })
-        return res
+    def get_context(cls, records, data):
+        report_context = super(InvoiceReport, cls).get_context(records, data)
+        report_context['company'] = report_context['user'].company
+        return report_context
 
 
 class PayInvoiceStart(ModelView):
@@ -2577,19 +2412,17 @@ class PayInvoiceAsk(ModelView):
     def on_change_lines(self):
         Currency = Pool().get('currency.currency')
 
-        res = {}
         with Transaction().set_context(date=self.invoice.currency_date):
             amount = Currency.compute(self.currency, self.amount,
                 self.currency_writeoff)
 
-        res['amount_writeoff'] = Decimal('0.0')
+        self.amount_writeoff = Decimal('0.0')
         for line in self.lines:
-            res['amount_writeoff'] += line.debit - line.credit
+            self.amount_writeoff += line.debit - line.credit
         if self.invoice.type in ('in_invoice', 'out_credit_note'):
-            res['amount_writeoff'] = - res['amount_writeoff'] - amount
+            self.amount_writeoff = - self.amount_writeoff - amount
         else:
-            res['amount_writeoff'] = res['amount_writeoff'] - amount
-        return res
+            self.amount_writeoff = self.amount_writeoff - amount
 
 
 class PayInvoice(Wizard):
@@ -2598,13 +2431,13 @@ class PayInvoice(Wizard):
     start = StateView('account.invoice.pay.start',
         'account_invoice.pay_start_view_form', [
             Button('Cancel', 'end', 'tryton-cancel'),
-            Button('Ok', 'choice', 'tryton-ok', default=True),
+            Button('OK', 'choice', 'tryton-ok', default=True),
             ])
     choice = StateTransition()
     ask = StateView('account.invoice.pay.ask',
         'account_invoice.pay_ask_view_form', [
             Button('Cancel', 'end', 'tryton-cancel'),
-            Button('Ok', 'pay', 'tryton-ok', default=True),
+            Button('OK', 'pay', 'tryton-ok', default=True),
             ])
     pay = StateTransition()
 
diff --git a/invoice.xml b/invoice.xml
index b38fdf0..cdf94bd 100644
--- a/invoice.xml
+++ b/invoice.xml
@@ -41,8 +41,8 @@ this repository contains the full copyright notices and license terms. -->
         <record model="ir.action.act_window" id="act_invoice_out_invoice_form">
             <field name="name">Invoices</field>
             <field name="res_model">account.invoice</field>
-            <field name="domain">[('type', '=', 'out_invoice')]</field>
-            <field name="context">{'type': 'out_invoice'}</field>
+            <field name="domain" eval="[('type', '=', 'out_invoice')]" pyson="1"/>
+            <field name="context" eval="{'type': 'out_invoice'}" pyson="1"/>
             <field name="search_value"></field>
         </record>
         <record model="ir.action.act_window.view" id="act_invoice_out_invoice_form_view1">
@@ -58,19 +58,19 @@ this repository contains the full copyright notices and license terms. -->
         <record model="ir.action.act_window.domain" id="act_invoice_out_invoice_domain_draft">
             <field name="name">Draft</field>
             <field name="sequence" eval="10"/>
-            <field name="domain">[('state', '=', 'draft')]</field>
+            <field name="domain" eval="[('state', '=', 'draft')]" pyson="1"/>
             <field name="act_window" ref="act_invoice_out_invoice_form"/>
         </record>
         <record model="ir.action.act_window.domain" id="act_invoice_out_invoice_domain_validated">
             <field name="name">Validated</field>
             <field name="sequence" eval="20"/>
-            <field name="domain">[('state', '=', 'validated')]</field>
+            <field name="domain" eval="[('state', '=', 'validated')]" pyson="1"/>
             <field name="act_window" ref="act_invoice_out_invoice_form"/>
         </record>
         <record model="ir.action.act_window.domain" id="act_invoice_out_invoice_domain_posted">
             <field name="name">Posted</field>
             <field name="sequence" eval="30"/>
-            <field name="domain">[('state', '=', 'posted')]</field>
+            <field name="domain" eval="[('state', '=', 'posted')]" pyson="1"/>
             <field name="act_window" ref="act_invoice_out_invoice_form"/>
         </record>
         <record model="ir.action.act_window.domain" id="act_invoice_out_invoice_domain_all">
@@ -85,8 +85,8 @@ this repository contains the full copyright notices and license terms. -->
         <record model="ir.action.act_window" id="act_invoice_out_credit_note_form">
             <field name="name">Credit Notes</field>
             <field name="res_model">account.invoice</field>
-            <field name="domain">[('type', '=', 'out_credit_note')]</field>
-            <field name="context">{'type': 'out_credit_note'}</field>
+            <field name="domain" eval="[('type', '=', 'out_credit_note')]" pyson="1"/>
+            <field name="context" eval="{'type': 'out_credit_note'}" pyson="1"/>
             <field name="search_value"></field>
         </record>
         <record model="ir.action.act_window.view" id="act_invoice_out_credit_note_form_view1">
@@ -102,19 +102,19 @@ this repository contains the full copyright notices and license terms. -->
         <record model="ir.action.act_window.domain" id="act_invoice_out_credit_note_domain_draft">
             <field name="name">Draft</field>
             <field name="sequence" eval="10"/>
-            <field name="domain">[('state', '=', 'draft')]</field>
+            <field name="domain" eval="[('state', '=', 'draft')]" pyson="1"/>
             <field name="act_window" ref="act_invoice_out_credit_note_form"/>
         </record>
         <record model="ir.action.act_window.domain" id="act_invoice_out_credit_note_domain_validated">
             <field name="name">Validated</field>
             <field name="sequence" eval="20"/>
-            <field name="domain">[('state', '=', 'validated')]</field>
+            <field name="domain" eval="[('state', '=', 'validated')]" pyson="1"/>
             <field name="act_window" ref="act_invoice_out_credit_note_form"/>
         </record>
         <record model="ir.action.act_window.domain" id="act_invoice_out_credit_note_domain_posted">
             <field name="name">Posted</field>
             <field name="sequence" eval="30"/>
-            <field name="domain">[('state', '=', 'posted')]</field>
+            <field name="domain" eval="[('state', '=', 'posted')]" pyson="1"/>
             <field name="act_window" ref="act_invoice_out_credit_note_form"/>
         </record>
         <record model="ir.action.act_window.domain" id="act_invoice_out_credit_note_domain_all">
@@ -129,8 +129,8 @@ this repository contains the full copyright notices and license terms. -->
         <record model="ir.action.act_window" id="act_invoice_in_invoice_form">
             <field name="name">Supplier Invoices</field>
             <field name="res_model">account.invoice</field>
-            <field name="domain">[('type', '=', 'in_invoice')]</field>
-            <field name="context">{'type': 'in_invoice'}</field>
+            <field name="domain" eval="[('type', '=', 'in_invoice')]" pyson="1"/>
+            <field name="context" eval="{'type': 'in_invoice'}" pyson="1"/>
             <field name="search_value"></field>
         </record>
         <record model="ir.action.act_window.view" id="act_invoice_in_invoice_form_view1">
@@ -146,19 +146,19 @@ this repository contains the full copyright notices and license terms. -->
         <record model="ir.action.act_window.domain" id="act_invoice_in_invoice_domain_draft">
             <field name="name">Draft</field>
             <field name="sequence" eval="10"/>
-            <field name="domain">[('state', '=', 'draft')]</field>
+            <field name="domain" eval="[('state', '=', 'draft')]" pyson="1"/>
             <field name="act_window" ref="act_invoice_in_invoice_form"/>
         </record>
         <record model="ir.action.act_window.domain" id="act_invoice_in_invoice_domain_validated">
             <field name="name">Validated</field>
             <field name="sequence" eval="20"/>
-            <field name="domain">[('state', '=', 'validated')]</field>
+            <field name="domain" eval="[('state', '=', 'validated')]" pyson="1"/>
             <field name="act_window" ref="act_invoice_in_invoice_form"/>
         </record>
         <record model="ir.action.act_window.domain" id="act_invoice_in_invoice_domain_posted">
             <field name="name">Posted</field>
             <field name="sequence" eval="30"/>
-            <field name="domain">[('state', '=', 'posted')]</field>
+            <field name="domain" eval="[('state', '=', 'posted')]" pyson="1"/>
             <field name="act_window" ref="act_invoice_in_invoice_form"/>
         </record>
         <record model="ir.action.act_window.domain" id="act_invoice_in_invoice_domain_all">
@@ -173,8 +173,8 @@ this repository contains the full copyright notices and license terms. -->
         <record model="ir.action.act_window" id="act_invoice_in_credit_note_form">
             <field name="name">Supplier Credit Notes</field>
             <field name="res_model">account.invoice</field>
-            <field name="domain">[('type', '=', 'in_credit_note')]</field>
-            <field name="context">{'type': 'in_credit_note'}</field>
+            <field name="domain" eval="[('type', '=', 'in_credit_note')]" pyson="1"/>
+            <field name="context" eval="{'type': 'in_credit_note'}" pyson="1"/>
             <field name="search_value"></field>
         </record>
         <record model="ir.action.act_window.view" id="act_invoice_in_credit_note_form_view1">
@@ -190,19 +190,19 @@ this repository contains the full copyright notices and license terms. -->
         <record model="ir.action.act_window.domain" id="act_invoice_in_credit_note_domain_draft">
             <field name="name">Draft</field>
             <field name="sequence" eval="10"/>
-            <field name="domain">[('state', '=', 'draft')]</field>
+            <field name="domain" eval="[('state', '=', 'draft')]" pyson="1"/>
             <field name="act_window" ref="act_invoice_in_credit_note_form"/>
         </record>
         <record model="ir.action.act_window.domain" id="act_invoice_in_credit_note_domain_validated">
             <field name="name">Validated</field>
             <field name="sequence" eval="20"/>
-            <field name="domain">[('state', '=', 'validated')]</field>
+            <field name="domain" eval="[('state', '=', 'validated')]" pyson="1"/>
             <field name="act_window" ref="act_invoice_in_credit_note_form"/>
         </record>
         <record model="ir.action.act_window.domain" id="act_invoice_in_credit_note_domain_posted">
             <field name="name">Posted</field>
             <field name="sequence" eval="30"/>
-            <field name="domain">[('state', '=', 'posted')]</field>
+            <field name="domain" eval="[('state', '=', 'posted')]" pyson="1"/>
             <field name="act_window" ref="act_invoice_in_credit_note_form"/>
         </record>
         <record model="ir.action.act_window.domain" id="act_invoice_in_credit_note_domain_all">
@@ -413,7 +413,9 @@ this repository contains the full copyright notices and license terms. -->
             <field name="global_p" eval="True"/>
         </record>
         <record model="ir.rule" id="rule_invoice1">
-            <field name="domain">[('company', '=', user.company.id if user.company else None)]</field>
+            <field name="domain"
+                eval="[('company', '=', Eval('user', {}).get('company', None))]"
+                pyson="1"/>
             <field name="rule_group" ref="rule_group_invoice"/>
         </record>
 
@@ -422,7 +424,9 @@ this repository contains the full copyright notices and license terms. -->
             <field name="global_p" eval="True"/>
         </record>
         <record model="ir.rule" id="rule_invoice_line1">
-            <field name="domain">[('company', '=', user.company.id if user.company else None)]</field>
+            <field name="domain"
+                eval="[('company', '=', Eval('user', {}).get('company', None))]"
+                pyson="1"/>
             <field name="rule_group" ref="rule_group_invoice_line"/>
         </record>
     </data>
diff --git a/locale/bg_BG.po b/locale/bg_BG.po
index 452e35e..a9d84ce 100644
--- a/locale/bg_BG.po
+++ b/locale/bg_BG.po
@@ -42,13 +42,6 @@ msgstr ""
 
 msgctxt "error:account.invoice.line:"
 msgid ""
-"You can not create invoice line \"%(line)s\" on invoice \"%(invoice)s of "
-"company \"%(invoice_line_company)s because account \"%(account)s has company"
-" \"%(account_company)s\"."
-msgstr ""
-
-msgctxt "error:account.invoice.line:"
-msgid ""
 "You can not create invoice line \"%(line)s\" on invoice \"%(invoice)s\" "
 "because the invoice uses the same account (%(account)s)."
 msgstr ""
@@ -66,10 +59,6 @@ msgid ""
 msgstr ""
 
 msgctxt "error:account.invoice.payment_term.line:"
-msgid "Day of month must be between 1 and 31."
-msgstr "Деня от месеца трябва да бъде между 1 и 31."
-
-msgctxt "error:account.invoice.payment_term.line:"
 msgid ""
 "Percentage and Divisor values are not consistent in line \"%(line)s\" of "
 "payment term \"%(term)s\"."
@@ -96,13 +85,6 @@ msgstr ""
 msgctxt "error:account.invoice.tax:"
 msgid ""
 "You can not create invoice \"%(invoice)s\" on company "
-"\"%(invoice_company)s\" using account \"%(account)s\" from company "
-"\"%(account_company)s\"."
-msgstr ""
-
-msgctxt "error:account.invoice.tax:"
-msgid ""
-"You can not create invoice \"%(invoice)s\" on company "
 "\"%(invoice_company)s\" using base tax code \"%(base_code)s\" from company "
 "\"%(base_code_company)s\"."
 msgstr ""
@@ -183,12 +165,6 @@ msgid ""
 msgstr ""
 
 msgctxt "error:account.invoice:"
-msgid ""
-"You can not create invoice \"%(invoice)s\" on company \"%(invoice_company)s "
-"because account \"%(account)s has a different company (%(account_company)s.)"
-msgstr ""
-
-msgctxt "error:account.invoice:"
 msgid "You can not modify invoice \"%s\" because it is posted, paid or cancelled."
 msgstr ""
 
@@ -772,14 +748,6 @@ msgctxt "field:account.invoice.payment_term.line,currency_digits:"
 msgid "Currency Digits"
 msgstr "Цифри за валута"
 
-msgctxt "field:account.invoice.payment_term.line,day:"
-msgid "Day of Month"
-msgstr "Ден от месеца"
-
-msgctxt "field:account.invoice.payment_term.line,days:"
-msgid "Number of Days"
-msgstr "Брой дни"
-
 msgctxt "field:account.invoice.payment_term.line,divisor:"
 msgid "Divisor"
 msgstr "Делител"
@@ -788,14 +756,6 @@ msgctxt "field:account.invoice.payment_term.line,id:"
 msgid "ID"
 msgstr "ID"
 
-msgctxt "field:account.invoice.payment_term.line,month:"
-msgid "Month"
-msgstr "Месец"
-
-msgctxt "field:account.invoice.payment_term.line,months:"
-msgid "Number of Months"
-msgstr "Брой месеци"
-
 msgctxt "field:account.invoice.payment_term.line,payment:"
 msgid "Payment Term"
 msgstr "Условие за плащане"
@@ -808,6 +768,10 @@ msgctxt "field:account.invoice.payment_term.line,rec_name:"
 msgid "Name"
 msgstr "Име"
 
+msgctxt "field:account.invoice.payment_term.line,relativedeltas:"
+msgid "Deltas"
+msgstr ""
+
 msgctxt "field:account.invoice.payment_term.line,sequence:"
 msgid "Sequence"
 msgstr "Последователност"
@@ -816,22 +780,133 @@ msgctxt "field:account.invoice.payment_term.line,type:"
 msgid "Type"
 msgstr "Вид"
 
-msgctxt "field:account.invoice.payment_term.line,weekday:"
+msgctxt "field:account.invoice.payment_term.line,write_date:"
+msgid "Write Date"
+msgstr "Променено на"
+
+msgctxt "field:account.invoice.payment_term.line,write_uid:"
+msgid "Write User"
+msgstr "Променено от"
+
+#, fuzzy
+msgctxt "field:account.invoice.payment_term.line.relativedelta,create_date:"
+msgid "Create Date"
+msgstr "Създадено на"
+
+#, fuzzy
+msgctxt "field:account.invoice.payment_term.line.relativedelta,create_uid:"
+msgid "Create User"
+msgstr "Създадено от"
+
+msgctxt "field:account.invoice.payment_term.line.relativedelta,day:"
+msgid "Day of Month"
+msgstr ""
+
+msgctxt "field:account.invoice.payment_term.line.relativedelta,days:"
+msgid "Number of Days"
+msgstr ""
+
+#, fuzzy
+msgctxt "field:account.invoice.payment_term.line.relativedelta,id:"
+msgid "ID"
+msgstr "ID"
+
+#, fuzzy
+msgctxt "field:account.invoice.payment_term.line.relativedelta,line:"
+msgid "Payment Term Line"
+msgstr "Ред от условие за плащане"
+
+#, fuzzy
+msgctxt "field:account.invoice.payment_term.line.relativedelta,month:"
+msgid "Month"
+msgstr "Месец"
+
+msgctxt "field:account.invoice.payment_term.line.relativedelta,months:"
+msgid "Number of Months"
+msgstr ""
+
+#, fuzzy
+msgctxt "field:account.invoice.payment_term.line.relativedelta,rec_name:"
+msgid "Name"
+msgstr "Условие за плащане"
+
+#, fuzzy
+msgctxt "field:account.invoice.payment_term.line.relativedelta,sequence:"
+msgid "Sequence"
+msgstr "Последователност"
+
+msgctxt "field:account.invoice.payment_term.line.relativedelta,weekday:"
 msgid "Day of Week"
-msgstr "Ден от седмицата"
+msgstr ""
 
-msgctxt "field:account.invoice.payment_term.line,weeks:"
+msgctxt "field:account.invoice.payment_term.line.relativedelta,weeks:"
 msgid "Number of Weeks"
-msgstr "Брой седмици"
+msgstr ""
 
-msgctxt "field:account.invoice.payment_term.line,write_date:"
+#, fuzzy
+msgctxt "field:account.invoice.payment_term.line.relativedelta,write_date:"
 msgid "Write Date"
 msgstr "Променено на"
 
-msgctxt "field:account.invoice.payment_term.line,write_uid:"
+#, fuzzy
+msgctxt "field:account.invoice.payment_term.line.relativedelta,write_uid:"
 msgid "Write User"
 msgstr "Променено от"
 
+#, fuzzy
+msgctxt "field:account.invoice.payment_term.test,amount:"
+msgid "Amount"
+msgstr "Сума"
+
+#, fuzzy
+msgctxt "field:account.invoice.payment_term.test,currency:"
+msgid "Currency"
+msgstr "Управление на валути"
+
+#, fuzzy
+msgctxt "field:account.invoice.payment_term.test,currency_digits:"
+msgid "Currency Digits"
+msgstr "Цифри за валута"
+
+#, fuzzy
+msgctxt "field:account.invoice.payment_term.test,date:"
+msgid "Date"
+msgstr "Дата"
+
+#, fuzzy
+msgctxt "field:account.invoice.payment_term.test,id:"
+msgid "ID"
+msgstr "ID"
+
+#, fuzzy
+msgctxt "field:account.invoice.payment_term.test,payment_term:"
+msgid "Payment Term"
+msgstr "Условие за плащане"
+
+msgctxt "field:account.invoice.payment_term.test,result:"
+msgid "Result"
+msgstr ""
+
+#, fuzzy
+msgctxt "field:account.invoice.payment_term.test.result,amount:"
+msgid "Amount"
+msgstr "Сума"
+
+#, fuzzy
+msgctxt "field:account.invoice.payment_term.test.result,currency_digits:"
+msgid "Currency Digits"
+msgstr "Цифри за валута"
+
+#, fuzzy
+msgctxt "field:account.invoice.payment_term.test.result,date:"
+msgid "Date"
+msgstr "Дата"
+
+#, fuzzy
+msgctxt "field:account.invoice.payment_term.test.result,id:"
+msgid "ID"
+msgstr "ID"
+
 msgctxt "field:account.invoice.print.warning,id:"
 msgid "ID"
 msgstr "ID"
@@ -989,6 +1064,18 @@ msgctxt "model:account.invoice.payment_term.line,name:"
 msgid "Payment Term Line"
 msgstr "Ред от условие за плащане"
 
+msgctxt "model:account.invoice.payment_term.line.relativedelta,name:"
+msgid "Payment Term Line Relative Delta"
+msgstr ""
+
+msgctxt "model:account.invoice.payment_term.test,name:"
+msgid "Test Payment Term"
+msgstr ""
+
+msgctxt "model:account.invoice.payment_term.test.result,name:"
+msgid "Test Payment Term"
+msgstr ""
+
 msgctxt "model:account.invoice.print.warning,name:"
 msgid "Print Invoice Report Warning"
 msgstr "Предупреждение при отпечатване на справка за фактура"
@@ -1042,6 +1129,10 @@ msgctxt "model:ir.action,name:wizard_pay"
 msgid "Pay Invoice"
 msgstr "Плащане на фактура"
 
+msgctxt "model:ir.action,name:wizard_payment_term_test"
+msgid "Test Payment Term"
+msgstr ""
+
 msgctxt ""
 "model:ir.action.act_window.domain,name:act_invoice_in_credit_note_domain_all"
 msgid "All"
@@ -1162,6 +1253,10 @@ msgctxt "model:ir.ui.menu,name:menu_payment_term_form"
 msgid "Payment Terms"
 msgstr "Условия за плащане"
 
+msgctxt "model:ir.ui.menu,name:menu_payment_term_test"
+msgid "Test Payment Term"
+msgstr ""
+
 msgctxt "model:ir.ui.menu,name:menu_payment_terms_configuration"
 msgid "Payment Terms"
 msgstr "Условия за плащане"
@@ -1394,103 +1489,110 @@ msgctxt "selection:account.invoice.pay.ask,type:"
 msgid "Write-Off"
 msgstr "Анулиран"
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line,type:"
+msgid "Fixed"
+msgstr "Фиксирана"
+
+msgctxt "selection:account.invoice.payment_term.line,type:"
+msgid "Percentage on Remainder"
+msgstr "Процент от остъчна стойност"
+
+msgctxt "selection:account.invoice.payment_term.line,type:"
+msgid "Percentage on Total"
+msgstr "Процент от общата сума"
+
+msgctxt "selection:account.invoice.payment_term.line,type:"
+msgid "Remainder"
+msgstr "Напомняне"
+
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid ""
 msgstr ""
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "April"
-msgstr "Април"
+msgstr ""
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "August"
-msgstr "Август"
+msgstr ""
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "December"
-msgstr "Декември"
+msgstr ""
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "February"
-msgstr "Февруари"
+msgstr ""
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "January"
-msgstr "Януари"
+msgstr ""
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "July"
-msgstr "Юли"
+msgstr ""
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "June"
-msgstr "Юни"
+msgstr ""
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "March"
-msgstr "Март"
+msgstr ""
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "May"
-msgstr "Май"
+msgstr ""
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "November"
-msgstr "Ноември"
+msgstr ""
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "October"
-msgstr "Октомври"
+msgstr ""
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "September"
-msgstr "Септември"
-
-msgctxt "selection:account.invoice.payment_term.line,type:"
-msgid "Fixed"
-msgstr "Фиксирана"
-
-msgctxt "selection:account.invoice.payment_term.line,type:"
-msgid "Percentage on Remainder"
-msgstr "Процент от остъчна стойност"
-
-msgctxt "selection:account.invoice.payment_term.line,type:"
-msgid "Percentage on Total"
-msgstr "Процент от общата сума"
-
-msgctxt "selection:account.invoice.payment_term.line,type:"
-msgid "Remainder"
-msgstr "Напомняне"
+msgstr ""
 
-msgctxt "selection:account.invoice.payment_term.line,weekday:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,weekday:"
 msgid ""
 msgstr ""
 
-msgctxt "selection:account.invoice.payment_term.line,weekday:"
+#, fuzzy
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,weekday:"
 msgid "Friday"
 msgstr "Петък"
 
-msgctxt "selection:account.invoice.payment_term.line,weekday:"
+#, fuzzy
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,weekday:"
 msgid "Monday"
 msgstr "Понеделник"
 
-msgctxt "selection:account.invoice.payment_term.line,weekday:"
+#, fuzzy
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,weekday:"
 msgid "Saturday"
 msgstr "Събота"
 
-msgctxt "selection:account.invoice.payment_term.line,weekday:"
+#, fuzzy
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,weekday:"
 msgid "Sunday"
 msgstr "Неделя"
 
-msgctxt "selection:account.invoice.payment_term.line,weekday:"
+#, fuzzy
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,weekday:"
 msgid "Thursday"
 msgstr "Четвъртък"
 
-msgctxt "selection:account.invoice.payment_term.line,weekday:"
+#, fuzzy
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,weekday:"
 msgid "Tuesday"
 msgstr "Вторник"
 
-msgctxt "selection:account.invoice.payment_term.line,weekday:"
+#, fuzzy
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,weekday:"
 msgid "Wednesday"
 msgstr "Сряда"
 
@@ -1660,17 +1762,22 @@ msgid "Cancel"
 msgstr "Отказ"
 
 msgctxt "wizard_button:account.invoice.pay,ask,pay:"
-msgid "Ok"
+msgid "OK"
 msgstr "Добре"
 
 msgctxt "wizard_button:account.invoice.pay,start,choice:"
-msgid "Ok"
+msgid "OK"
 msgstr "Добре"
 
 msgctxt "wizard_button:account.invoice.pay,start,end:"
 msgid "Cancel"
 msgstr "Отказ"
 
+#, fuzzy
+msgctxt "wizard_button:account.invoice.payment_term.test,test,end:"
+msgid "Close"
+msgstr "Затваряне"
+
 msgctxt "wizard_button:account.invoice.print,warning,end:"
 msgid "Cancel"
 msgstr "Отказ"
diff --git a/locale/ca_ES.po b/locale/ca_ES.po
index 5605caa..7e68043 100644
--- a/locale/ca_ES.po
+++ b/locale/ca_ES.po
@@ -14,7 +14,7 @@ msgid ""
 "already posted invoices in this fiscal year."
 msgstr ""
 "No podeu canviar la seqüència de factures a l'exercici fiscal \"%s\" perquè "
-"ja hi ha factures confirmades en aquest exercici fiscal."
+"ja hi ha factures comptabilitzades en aquest exercici fiscal."
 
 msgctxt "error:account.invoice.credit:"
 msgid "You can not credit with refund invoice \"%s\" because it has payments."
@@ -31,7 +31,8 @@ msgstr ""
 msgctxt "error:account.invoice.credit:"
 msgid "You can not credit with refund invoice \"%s\" because it is not posted."
 msgstr ""
-"No podeu pagar amb la factura de devolució \"%s\" perquè no està confirmada."
+"No podeu pagar amb la factura de devolució \"%s\" perquè no està "
+"comptabilitzada."
 
 msgctxt "error:account.invoice.line:"
 msgid "Line with \"line\" type must have an account."
@@ -46,18 +47,8 @@ msgid ""
 "You can not add a line to invoice \"%(invoice)s\" that is posted, paid or "
 "cancelled."
 msgstr ""
-"No podeu afegir una línia a la factura \"%(invoice)s\" confirmada, pagada o "
-"cancel·lada."
-
-msgctxt "error:account.invoice.line:"
-msgid ""
-"You can not create invoice line \"%(line)s\" on invoice \"%(invoice)s of "
-"company \"%(invoice_line_company)s because account \"%(account)s has company"
-" \"%(account_company)s\"."
-msgstr ""
-"No podeu crear la línia de factura \"%(line)s\" a la factura \"%(Invoice)s\""
-" de l'empresa \"%(invoice_line_company)s\" perquè el compte \"%(account)s\" "
-"té l'empresa \"%(account_company)s \"."
+"No podeu afegir una línia a la factura \"%(invoice)s\" comptabilitzada, "
+"pagada o cancel·lada."
 
 msgctxt "error:account.invoice.line:"
 msgid ""
@@ -72,8 +63,8 @@ msgid ""
 "You can not modify line \"%(line)s\" from invoice \"%(invoice)s\" that is "
 "posted or paid."
 msgstr ""
-"No podeu modificar la línia \"%(line)s\" de la factura \"%(invoice)s\", "
-"confirmada o pagada."
+"No podeu modificar la línia \"%(line)s\" de la factura \"%(invoice)s\" que "
+"està comptabilitzada o pagada."
 
 msgctxt "error:account.invoice.pay:"
 msgid ""
@@ -84,10 +75,6 @@ msgstr ""
 "gran que l'import a pagar."
 
 msgctxt "error:account.invoice.payment_term.line:"
-msgid "Day of month must be between 1 and 31."
-msgstr "El dia del mes ha d'estar entre 1 i 31."
-
-msgctxt "error:account.invoice.payment_term.line:"
 msgid ""
 "Percentage and Divisor values are not consistent in line \"%(line)s\" of "
 "payment term \"%(term)s\"."
@@ -114,17 +101,7 @@ msgid ""
 "posted, paid or canceled."
 msgstr ""
 "No podeu afegir la línia \"%(line)s\" a la factura \"%(invoice)s\" perquè "
-"està confirmada, pagada o cancel·lada."
-
-msgctxt "error:account.invoice.tax:"
-msgid ""
-"You can not create invoice \"%(invoice)s\" on company "
-"\"%(invoice_company)s\" using account \"%(account)s\" from company "
-"\"%(account_company)s\"."
-msgstr ""
-"No podeu crear la factura \"%(Invoice)s\" a l'empresa "
-"\"%(invoice_company)s\" utilitzant el compte \"%(account)s\" de l'empresa "
-"\"%(account_company)s\"."
+"està comptabilitzada, pagada o cancel·lada."
 
 msgctxt "error:account.invoice.tax:"
 msgid ""
@@ -152,13 +129,13 @@ msgid ""
 "is posted or paid."
 msgstr ""
 "No podeu modificar l'impost \"%(tax)s\" de la factura \"%(invoice)s\" perquè"
-" està confirmada o pagada."
+" està comptabilitzada o pagada."
 
 msgctxt "error:account.invoice:"
 msgid "Customer invoice/credit note \"%s\" can not be cancelled once posted."
 msgstr ""
 "La factura de client o abonament \"%s\" no es pot cancel·lar si ja està "
-"confirmada."
+"comptabilitzada."
 
 msgctxt "error:account.invoice:"
 msgid ""
@@ -222,7 +199,7 @@ msgstr "Falta el compte deure del diari \"%s\"."
 
 msgctxt "error:account.invoice:"
 msgid "The numbered invoice \"%s\" can not be deleted."
-msgstr "No es pot esborrar la factura numerada \"%s\"."
+msgstr "No es pot eliminar la factura numerada \"%s\"."
 
 msgctxt "error:account.invoice:"
 msgid ""
@@ -233,18 +210,9 @@ msgstr ""
 "període/exercici fiscal \"%(period)s\"."
 
 msgctxt "error:account.invoice:"
-msgid ""
-"You can not create invoice \"%(invoice)s\" on company \"%(invoice_company)s "
-"because account \"%(account)s has a different company (%(account_company)s.)"
-msgstr ""
-"No podeu crear la factura \"%(invoice)s\" a l'empresa "
-"\"%(invoice_company)s\" perquè el compte \"%(account)s\" té una empresa "
-"(%(account_company)s) diferent."
-
-msgctxt "error:account.invoice:"
 msgid "You can not modify invoice \"%s\" because it is posted, paid or cancelled."
 msgstr ""
-"No podeu modificar la factura \"%s\" perquè està confirmada, pagada o "
+"No podeu modificar la factura \"%s\" perquè està comptabilitzada, pagada o "
 "cancel·lada."
 
 msgctxt "error:account.period:"
@@ -267,7 +235,7 @@ msgid ""
 "already an invoice posted in this period"
 msgstr ""
 "No podeu canviar la seqüència de factures al període \"%s\" perquè ja hi ha "
-"factures confirmades en aquest període."
+"factures comptabilitzades en aquest període."
 
 msgctxt "field:account.configuration,tax_rounding:"
 msgid "Tax Rounding"
@@ -695,7 +663,7 @@ msgstr "Moneda de pagament"
 
 msgctxt "field:account.invoice.pay.ask,currency_digits:"
 msgid "Payment Currency Digits"
-msgstr "Decimals moneda de pagament"
+msgstr "Decimals de la moneda de pagament"
 
 msgctxt "field:account.invoice.pay.ask,currency_digits_writeoff:"
 msgid "Write-Off Currency Digits"
@@ -821,14 +789,6 @@ msgctxt "field:account.invoice.payment_term.line,currency_digits:"
 msgid "Currency Digits"
 msgstr "Decimals de la moneda"
 
-msgctxt "field:account.invoice.payment_term.line,day:"
-msgid "Day of Month"
-msgstr "Dia del mes"
-
-msgctxt "field:account.invoice.payment_term.line,days:"
-msgid "Number of Days"
-msgstr "Número de dies"
-
 msgctxt "field:account.invoice.payment_term.line,divisor:"
 msgid "Divisor"
 msgstr "Divisor"
@@ -837,14 +797,6 @@ msgctxt "field:account.invoice.payment_term.line,id:"
 msgid "ID"
 msgstr "ID"
 
-msgctxt "field:account.invoice.payment_term.line,month:"
-msgid "Month"
-msgstr "Mes"
-
-msgctxt "field:account.invoice.payment_term.line,months:"
-msgid "Number of Months"
-msgstr "Número de mesos"
-
 msgctxt "field:account.invoice.payment_term.line,payment:"
 msgid "Payment Term"
 msgstr "Termini de pagament"
@@ -857,6 +809,10 @@ msgctxt "field:account.invoice.payment_term.line,rec_name:"
 msgid "Name"
 msgstr "Nom"
 
+msgctxt "field:account.invoice.payment_term.line,relativedeltas:"
+msgid "Deltas"
+msgstr "Increments"
+
 msgctxt "field:account.invoice.payment_term.line,sequence:"
 msgid "Sequence"
 msgstr "Seqüència"
@@ -865,22 +821,114 @@ msgctxt "field:account.invoice.payment_term.line,type:"
 msgid "Type"
 msgstr "Tipus"
 
-msgctxt "field:account.invoice.payment_term.line,weekday:"
+msgctxt "field:account.invoice.payment_term.line,write_date:"
+msgid "Write Date"
+msgstr "Data modificació"
+
+msgctxt "field:account.invoice.payment_term.line,write_uid:"
+msgid "Write User"
+msgstr "Usuari modificació"
+
+msgctxt "field:account.invoice.payment_term.line.relativedelta,create_date:"
+msgid "Create Date"
+msgstr "Data creació"
+
+msgctxt "field:account.invoice.payment_term.line.relativedelta,create_uid:"
+msgid "Create User"
+msgstr "Usuari creació"
+
+msgctxt "field:account.invoice.payment_term.line.relativedelta,day:"
+msgid "Day of Month"
+msgstr "Dia del mes"
+
+msgctxt "field:account.invoice.payment_term.line.relativedelta,days:"
+msgid "Number of Days"
+msgstr "Número de dies"
+
+msgctxt "field:account.invoice.payment_term.line.relativedelta,id:"
+msgid "ID"
+msgstr "ID"
+
+msgctxt "field:account.invoice.payment_term.line.relativedelta,line:"
+msgid "Payment Term Line"
+msgstr "Línia termini de pagament"
+
+msgctxt "field:account.invoice.payment_term.line.relativedelta,month:"
+msgid "Month"
+msgstr "Mes"
+
+msgctxt "field:account.invoice.payment_term.line.relativedelta,months:"
+msgid "Number of Months"
+msgstr "Número de mesos"
+
+msgctxt "field:account.invoice.payment_term.line.relativedelta,rec_name:"
+msgid "Name"
+msgstr "Nom"
+
+msgctxt "field:account.invoice.payment_term.line.relativedelta,sequence:"
+msgid "Sequence"
+msgstr "Seqüència"
+
+msgctxt "field:account.invoice.payment_term.line.relativedelta,weekday:"
 msgid "Day of Week"
 msgstr "Dia de la setmana"
 
-msgctxt "field:account.invoice.payment_term.line,weeks:"
+msgctxt "field:account.invoice.payment_term.line.relativedelta,weeks:"
 msgid "Number of Weeks"
-msgstr "Número de setmanes"
+msgstr "Número de semanas"
 
-msgctxt "field:account.invoice.payment_term.line,write_date:"
+msgctxt "field:account.invoice.payment_term.line.relativedelta,write_date:"
 msgid "Write Date"
 msgstr "Data modificació"
 
-msgctxt "field:account.invoice.payment_term.line,write_uid:"
+msgctxt "field:account.invoice.payment_term.line.relativedelta,write_uid:"
 msgid "Write User"
 msgstr "Usuari modificació"
 
+msgctxt "field:account.invoice.payment_term.test,amount:"
+msgid "Amount"
+msgstr "Import"
+
+msgctxt "field:account.invoice.payment_term.test,currency:"
+msgid "Currency"
+msgstr "Moneda"
+
+msgctxt "field:account.invoice.payment_term.test,currency_digits:"
+msgid "Currency Digits"
+msgstr "Decimals de la moneda"
+
+msgctxt "field:account.invoice.payment_term.test,date:"
+msgid "Date"
+msgstr "Data"
+
+msgctxt "field:account.invoice.payment_term.test,id:"
+msgid "ID"
+msgstr "ID"
+
+msgctxt "field:account.invoice.payment_term.test,payment_term:"
+msgid "Payment Term"
+msgstr "Termini de pagament"
+
+msgctxt "field:account.invoice.payment_term.test,result:"
+msgid "Result"
+msgstr "Resultat"
+
+msgctxt "field:account.invoice.payment_term.test.result,amount:"
+msgid "Amount"
+msgstr "Import"
+
+msgctxt "field:account.invoice.payment_term.test.result,currency_digits:"
+msgid "Currency Digits"
+msgstr "Decimals de la moneda"
+
+msgctxt "field:account.invoice.payment_term.test.result,date:"
+msgid "Date"
+msgstr "Data"
+
+msgctxt "field:account.invoice.payment_term.test.result,id:"
+msgid "ID"
+msgstr "ID"
+
 msgctxt "field:account.invoice.print.warning,id:"
 msgid "ID"
 msgstr "ID"
@@ -1037,6 +1085,18 @@ msgctxt "model:account.invoice.payment_term.line,name:"
 msgid "Payment Term Line"
 msgstr "Línia termini de pagament"
 
+msgctxt "model:account.invoice.payment_term.line.relativedelta,name:"
+msgid "Payment Term Line Relative Delta"
+msgstr "Increment relatiu línia de termini de pagament"
+
+msgctxt "model:account.invoice.payment_term.test,name:"
+msgid "Test Payment Term"
+msgstr "Prova termini de pagament"
+
+msgctxt "model:account.invoice.payment_term.test.result,name:"
+msgid "Test Payment Term"
+msgstr "Prova termini de pagament"
+
 msgctxt "model:account.invoice.print.warning,name:"
 msgid "Print Invoice Report Warning"
 msgstr "Imprimeix avís informe de factura"
@@ -1089,10 +1149,14 @@ msgctxt "model:ir.action,name:wizard_pay"
 msgid "Pay Invoice"
 msgstr "Paga factura"
 
+msgctxt "model:ir.action,name:wizard_payment_term_test"
+msgid "Test Payment Term"
+msgstr "Prova termini de pagament"
+
 msgctxt ""
 "model:ir.action.act_window.domain,name:act_invoice_in_credit_note_domain_all"
 msgid "All"
-msgstr "Tot"
+msgstr "Totes"
 
 msgctxt ""
 "model:ir.action.act_window.domain,name:act_invoice_in_credit_note_domain_draft"
@@ -1102,17 +1166,17 @@ msgstr "Esborrany"
 msgctxt ""
 "model:ir.action.act_window.domain,name:act_invoice_in_credit_note_domain_posted"
 msgid "Posted"
-msgstr "Confirmat"
+msgstr "Comptabilitzada"
 
 msgctxt ""
 "model:ir.action.act_window.domain,name:act_invoice_in_credit_note_domain_validated"
 msgid "Validated"
-msgstr "Validat"
+msgstr "Validada"
 
 msgctxt ""
 "model:ir.action.act_window.domain,name:act_invoice_in_invoice_domain_all"
 msgid "All"
-msgstr "Tot"
+msgstr "Totes"
 
 msgctxt ""
 "model:ir.action.act_window.domain,name:act_invoice_in_invoice_domain_draft"
@@ -1122,17 +1186,17 @@ msgstr "Esborrany"
 msgctxt ""
 "model:ir.action.act_window.domain,name:act_invoice_in_invoice_domain_posted"
 msgid "Posted"
-msgstr "Confirmat"
+msgstr "Comptabilitzada"
 
 msgctxt ""
 "model:ir.action.act_window.domain,name:act_invoice_in_invoice_domain_validated"
 msgid "Validated"
-msgstr "Validat"
+msgstr "Validada"
 
 msgctxt ""
 "model:ir.action.act_window.domain,name:act_invoice_out_credit_note_domain_all"
 msgid "All"
-msgstr "Tot"
+msgstr "Totes"
 
 msgctxt ""
 "model:ir.action.act_window.domain,name:act_invoice_out_credit_note_domain_draft"
@@ -1142,17 +1206,17 @@ msgstr "Esborrany"
 msgctxt ""
 "model:ir.action.act_window.domain,name:act_invoice_out_credit_note_domain_posted"
 msgid "Posted"
-msgstr "Confirmat"
+msgstr "Comptabilitzada"
 
 msgctxt ""
 "model:ir.action.act_window.domain,name:act_invoice_out_credit_note_domain_validated"
 msgid "Validated"
-msgstr "Validat"
+msgstr "Validada"
 
 msgctxt ""
 "model:ir.action.act_window.domain,name:act_invoice_out_invoice_domain_all"
 msgid "All"
-msgstr "Tot"
+msgstr "Totes"
 
 msgctxt ""
 "model:ir.action.act_window.domain,name:act_invoice_out_invoice_domain_draft"
@@ -1162,12 +1226,12 @@ msgstr "Esborrany"
 msgctxt ""
 "model:ir.action.act_window.domain,name:act_invoice_out_invoice_domain_posted"
 msgid "Posted"
-msgstr "Confirmat"
+msgstr "Comptabilitzada"
 
 msgctxt ""
 "model:ir.action.act_window.domain,name:act_invoice_out_invoice_domain_validated"
 msgid "Validated"
-msgstr "Validat"
+msgstr "Validada"
 
 msgctxt "model:ir.sequence.type,name:sequence_type_account_invoice"
 msgid "Invoice"
@@ -1197,6 +1261,10 @@ msgctxt "model:ir.ui.menu,name:menu_payment_term_form"
 msgid "Payment Terms"
 msgstr "Terminis de pagament"
 
+msgctxt "model:ir.ui.menu,name:menu_payment_term_test"
+msgid "Test Payment Term"
+msgstr "Prova termini de pagament"
+
 msgctxt "model:ir.ui.menu,name:menu_payment_terms_configuration"
 msgid "Payment Terms"
 msgstr "Terminis de pagament"
@@ -1359,7 +1427,7 @@ msgstr "Pagada"
 
 msgctxt "selection:account.invoice,state:"
 msgid "Posted"
-msgstr "Confirmada"
+msgstr "Comptabilitzada"
 
 msgctxt "selection:account.invoice,state:"
 msgid "Validated"
@@ -1425,103 +1493,103 @@ msgctxt "selection:account.invoice.pay.ask,type:"
 msgid "Write-Off"
 msgstr "Desajust"
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line,type:"
+msgid "Fixed"
+msgstr "Fix"
+
+msgctxt "selection:account.invoice.payment_term.line,type:"
+msgid "Percentage on Remainder"
+msgstr "Percentatge sobre romanent"
+
+msgctxt "selection:account.invoice.payment_term.line,type:"
+msgid "Percentage on Total"
+msgstr "Percentatge sobre total"
+
+msgctxt "selection:account.invoice.payment_term.line,type:"
+msgid "Remainder"
+msgstr "Romanent"
+
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid ""
 msgstr ""
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "April"
 msgstr "Abril"
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "August"
 msgstr "Agost"
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "December"
-msgstr "Desembre"
+msgstr "Decembre"
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "February"
 msgstr "Febrer"
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "January"
 msgstr "Gener"
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "July"
 msgstr "Juliol"
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "June"
 msgstr "Juny"
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "March"
 msgstr "Març"
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "May"
 msgstr "Maig"
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "November"
 msgstr "Novembre"
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "October"
 msgstr "Octubre"
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "September"
-msgstr "Setembre"
-
-msgctxt "selection:account.invoice.payment_term.line,type:"
-msgid "Fixed"
-msgstr "Fix"
-
-msgctxt "selection:account.invoice.payment_term.line,type:"
-msgid "Percentage on Remainder"
-msgstr "Percentatge sobre romanent"
-
-msgctxt "selection:account.invoice.payment_term.line,type:"
-msgid "Percentage on Total"
-msgstr "Percentatge sobre total"
+msgstr "Septembre"
 
-msgctxt "selection:account.invoice.payment_term.line,type:"
-msgid "Remainder"
-msgstr "Romanent"
-
-msgctxt "selection:account.invoice.payment_term.line,weekday:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,weekday:"
 msgid ""
 msgstr ""
 
-msgctxt "selection:account.invoice.payment_term.line,weekday:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,weekday:"
 msgid "Friday"
 msgstr "Divendres"
 
-msgctxt "selection:account.invoice.payment_term.line,weekday:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,weekday:"
 msgid "Monday"
 msgstr "Dilluns"
 
-msgctxt "selection:account.invoice.payment_term.line,weekday:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,weekday:"
 msgid "Saturday"
 msgstr "Dissabte"
 
-msgctxt "selection:account.invoice.payment_term.line,weekday:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,weekday:"
 msgid "Sunday"
 msgstr "Diumenge"
 
-msgctxt "selection:account.invoice.payment_term.line,weekday:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,weekday:"
 msgid "Thursday"
 msgstr "Dijous"
 
-msgctxt "selection:account.invoice.payment_term.line,weekday:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,weekday:"
 msgid "Tuesday"
 msgstr "Dimarts"
 
-msgctxt "selection:account.invoice.payment_term.line,weekday:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,weekday:"
 msgid "Wednesday"
 msgstr "Dimecres"
 
@@ -1565,13 +1633,25 @@ msgctxt "view:account.invoice.pay.start:"
 msgid "Pay Invoice"
 msgstr "Paga factura"
 
+msgctxt "view:account.invoice.payment_term.line.relativedelta:"
+msgid "Payment Term Line Relative Delta"
+msgstr "Increment relatiu línia de termini de pagament"
+
+msgctxt "view:account.invoice.payment_term.line.relativedelta:"
+msgid "Payment Term Line Relative Deltas"
+msgstr "Increments relatius línia de termini de pagament"
+
 msgctxt "view:account.invoice.payment_term.line:"
 msgid "Payment Term Line"
 msgstr "Línia termini de pagament"
 
-msgctxt "view:account.invoice.payment_term.line:"
-msgid "Payment Term Lines"
-msgstr "Línies termini de pagament"
+msgctxt "view:account.invoice.payment_term.test.result:"
+msgid "Payment Term Test Results"
+msgstr "Resultats de la prova del termini de pagament"
+
+msgctxt "view:account.invoice.payment_term.test:"
+msgid "Payment Term Test"
+msgstr "Prova termini de pagament"
 
 msgctxt "view:account.invoice.payment_term:"
 msgid "Payment Term"
@@ -1618,6 +1698,14 @@ msgid "Are you sure to cancel the invoice?"
 msgstr "Esteu segur de cancel·lar la factura?"
 
 msgctxt "view:account.invoice:"
+msgid "Cancel"
+msgstr "Cancel·la"
+
+msgctxt "view:account.invoice:"
+msgid "Draft"
+msgstr "Esborrany"
+
+msgctxt "view:account.invoice:"
 msgid "Invoice"
 msgstr "Factura"
 
@@ -1634,6 +1722,10 @@ msgid "Payment"
 msgstr "Pagament"
 
 msgctxt "view:account.invoice:"
+msgid "Post"
+msgstr "Comptabilitza"
+
+msgctxt "view:account.invoice:"
 msgid "Validate"
 msgstr "Valida"
 
@@ -1651,7 +1743,7 @@ msgstr "_Paga"
 
 msgctxt "view:account.invoice:"
 msgid "_Post"
-msgstr "Co_nfirma"
+msgstr "Co_mptabilitza"
 
 msgctxt "view:account.move.line:"
 msgid "Amount Second Currency"
@@ -1690,17 +1782,21 @@ msgid "Cancel"
 msgstr "Cancel·la"
 
 msgctxt "wizard_button:account.invoice.pay,ask,pay:"
-msgid "Ok"
+msgid "OK"
 msgstr "Accepta"
 
 msgctxt "wizard_button:account.invoice.pay,start,choice:"
-msgid "Ok"
+msgid "OK"
 msgstr "Accepta"
 
 msgctxt "wizard_button:account.invoice.pay,start,end:"
 msgid "Cancel"
 msgstr "Cancel·la"
 
+msgctxt "wizard_button:account.invoice.payment_term.test,test,end:"
+msgid "Close"
+msgstr "Tanca"
+
 msgctxt "wizard_button:account.invoice.print,warning,end:"
 msgid "Cancel"
 msgstr "Cancel·la"
diff --git a/locale/cs_CZ.po b/locale/cs_CZ.po
index 506d632..c8aed9f 100644
--- a/locale/cs_CZ.po
+++ b/locale/cs_CZ.po
@@ -42,13 +42,6 @@ msgstr ""
 
 msgctxt "error:account.invoice.line:"
 msgid ""
-"You can not create invoice line \"%(line)s\" on invoice \"%(invoice)s of "
-"company \"%(invoice_line_company)s because account \"%(account)s has company"
-" \"%(account_company)s\"."
-msgstr ""
-
-msgctxt "error:account.invoice.line:"
-msgid ""
 "You can not create invoice line \"%(line)s\" on invoice \"%(invoice)s\" "
 "because the invoice uses the same account (%(account)s)."
 msgstr ""
@@ -66,10 +59,6 @@ msgid ""
 msgstr ""
 
 msgctxt "error:account.invoice.payment_term.line:"
-msgid "Day of month must be between 1 and 31."
-msgstr ""
-
-msgctxt "error:account.invoice.payment_term.line:"
 msgid ""
 "Percentage and Divisor values are not consistent in line \"%(line)s\" of "
 "payment term \"%(term)s\"."
@@ -96,13 +85,6 @@ msgstr ""
 msgctxt "error:account.invoice.tax:"
 msgid ""
 "You can not create invoice \"%(invoice)s\" on company "
-"\"%(invoice_company)s\" using account \"%(account)s\" from company "
-"\"%(account_company)s\"."
-msgstr ""
-
-msgctxt "error:account.invoice.tax:"
-msgid ""
-"You can not create invoice \"%(invoice)s\" on company "
 "\"%(invoice_company)s\" using base tax code \"%(base_code)s\" from company "
 "\"%(base_code_company)s\"."
 msgstr ""
@@ -183,12 +165,6 @@ msgid ""
 msgstr ""
 
 msgctxt "error:account.invoice:"
-msgid ""
-"You can not create invoice \"%(invoice)s\" on company \"%(invoice_company)s "
-"because account \"%(account)s has a different company (%(account_company)s.)"
-msgstr ""
-
-msgctxt "error:account.invoice:"
 msgid "You can not modify invoice \"%s\" because it is posted, paid or cancelled."
 msgstr ""
 
@@ -760,14 +736,6 @@ msgctxt "field:account.invoice.payment_term.line,currency_digits:"
 msgid "Currency Digits"
 msgstr ""
 
-msgctxt "field:account.invoice.payment_term.line,day:"
-msgid "Day of Month"
-msgstr ""
-
-msgctxt "field:account.invoice.payment_term.line,days:"
-msgid "Number of Days"
-msgstr ""
-
 msgctxt "field:account.invoice.payment_term.line,divisor:"
 msgid "Divisor"
 msgstr ""
@@ -776,14 +744,6 @@ msgctxt "field:account.invoice.payment_term.line,id:"
 msgid "ID"
 msgstr ""
 
-msgctxt "field:account.invoice.payment_term.line,month:"
-msgid "Month"
-msgstr ""
-
-msgctxt "field:account.invoice.payment_term.line,months:"
-msgid "Number of Months"
-msgstr ""
-
 msgctxt "field:account.invoice.payment_term.line,payment:"
 msgid "Payment Term"
 msgstr ""
@@ -796,6 +756,10 @@ msgctxt "field:account.invoice.payment_term.line,rec_name:"
 msgid "Name"
 msgstr ""
 
+msgctxt "field:account.invoice.payment_term.line,relativedeltas:"
+msgid "Deltas"
+msgstr ""
+
 msgctxt "field:account.invoice.payment_term.line,sequence:"
 msgid "Sequence"
 msgstr ""
@@ -804,22 +768,114 @@ msgctxt "field:account.invoice.payment_term.line,type:"
 msgid "Type"
 msgstr ""
 
-msgctxt "field:account.invoice.payment_term.line,weekday:"
+msgctxt "field:account.invoice.payment_term.line,write_date:"
+msgid "Write Date"
+msgstr ""
+
+msgctxt "field:account.invoice.payment_term.line,write_uid:"
+msgid "Write User"
+msgstr ""
+
+msgctxt "field:account.invoice.payment_term.line.relativedelta,create_date:"
+msgid "Create Date"
+msgstr ""
+
+msgctxt "field:account.invoice.payment_term.line.relativedelta,create_uid:"
+msgid "Create User"
+msgstr ""
+
+msgctxt "field:account.invoice.payment_term.line.relativedelta,day:"
+msgid "Day of Month"
+msgstr ""
+
+msgctxt "field:account.invoice.payment_term.line.relativedelta,days:"
+msgid "Number of Days"
+msgstr ""
+
+msgctxt "field:account.invoice.payment_term.line.relativedelta,id:"
+msgid "ID"
+msgstr ""
+
+msgctxt "field:account.invoice.payment_term.line.relativedelta,line:"
+msgid "Payment Term Line"
+msgstr ""
+
+msgctxt "field:account.invoice.payment_term.line.relativedelta,month:"
+msgid "Month"
+msgstr ""
+
+msgctxt "field:account.invoice.payment_term.line.relativedelta,months:"
+msgid "Number of Months"
+msgstr ""
+
+msgctxt "field:account.invoice.payment_term.line.relativedelta,rec_name:"
+msgid "Name"
+msgstr ""
+
+msgctxt "field:account.invoice.payment_term.line.relativedelta,sequence:"
+msgid "Sequence"
+msgstr ""
+
+msgctxt "field:account.invoice.payment_term.line.relativedelta,weekday:"
 msgid "Day of Week"
 msgstr ""
 
-msgctxt "field:account.invoice.payment_term.line,weeks:"
+msgctxt "field:account.invoice.payment_term.line.relativedelta,weeks:"
 msgid "Number of Weeks"
 msgstr ""
 
-msgctxt "field:account.invoice.payment_term.line,write_date:"
+msgctxt "field:account.invoice.payment_term.line.relativedelta,write_date:"
 msgid "Write Date"
 msgstr ""
 
-msgctxt "field:account.invoice.payment_term.line,write_uid:"
+msgctxt "field:account.invoice.payment_term.line.relativedelta,write_uid:"
 msgid "Write User"
 msgstr ""
 
+msgctxt "field:account.invoice.payment_term.test,amount:"
+msgid "Amount"
+msgstr ""
+
+msgctxt "field:account.invoice.payment_term.test,currency:"
+msgid "Currency"
+msgstr ""
+
+msgctxt "field:account.invoice.payment_term.test,currency_digits:"
+msgid "Currency Digits"
+msgstr ""
+
+msgctxt "field:account.invoice.payment_term.test,date:"
+msgid "Date"
+msgstr ""
+
+msgctxt "field:account.invoice.payment_term.test,id:"
+msgid "ID"
+msgstr ""
+
+msgctxt "field:account.invoice.payment_term.test,payment_term:"
+msgid "Payment Term"
+msgstr ""
+
+msgctxt "field:account.invoice.payment_term.test,result:"
+msgid "Result"
+msgstr ""
+
+msgctxt "field:account.invoice.payment_term.test.result,amount:"
+msgid "Amount"
+msgstr ""
+
+msgctxt "field:account.invoice.payment_term.test.result,currency_digits:"
+msgid "Currency Digits"
+msgstr ""
+
+msgctxt "field:account.invoice.payment_term.test.result,date:"
+msgid "Date"
+msgstr ""
+
+msgctxt "field:account.invoice.payment_term.test.result,id:"
+msgid "ID"
+msgstr ""
+
 msgctxt "field:account.invoice.print.warning,id:"
 msgid "ID"
 msgstr ""
@@ -976,6 +1032,18 @@ msgctxt "model:account.invoice.payment_term.line,name:"
 msgid "Payment Term Line"
 msgstr ""
 
+msgctxt "model:account.invoice.payment_term.line.relativedelta,name:"
+msgid "Payment Term Line Relative Delta"
+msgstr ""
+
+msgctxt "model:account.invoice.payment_term.test,name:"
+msgid "Test Payment Term"
+msgstr ""
+
+msgctxt "model:account.invoice.payment_term.test.result,name:"
+msgid "Test Payment Term"
+msgstr ""
+
 msgctxt "model:account.invoice.print.warning,name:"
 msgid "Print Invoice Report Warning"
 msgstr ""
@@ -1028,6 +1096,10 @@ msgctxt "model:ir.action,name:wizard_pay"
 msgid "Pay Invoice"
 msgstr ""
 
+msgctxt "model:ir.action,name:wizard_payment_term_test"
+msgid "Test Payment Term"
+msgstr ""
+
 msgctxt ""
 "model:ir.action.act_window.domain,name:act_invoice_in_credit_note_domain_all"
 msgid "All"
@@ -1136,6 +1208,10 @@ msgctxt "model:ir.ui.menu,name:menu_payment_term_form"
 msgid "Payment Terms"
 msgstr ""
 
+msgctxt "model:ir.ui.menu,name:menu_payment_term_test"
+msgid "Test Payment Term"
+msgstr ""
+
 msgctxt "model:ir.ui.menu,name:menu_payment_terms_configuration"
 msgid "Payment Terms"
 msgstr ""
@@ -1364,103 +1440,103 @@ msgctxt "selection:account.invoice.pay.ask,type:"
 msgid "Write-Off"
 msgstr ""
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line,type:"
+msgid "Fixed"
+msgstr ""
+
+msgctxt "selection:account.invoice.payment_term.line,type:"
+msgid "Percentage on Remainder"
+msgstr ""
+
+msgctxt "selection:account.invoice.payment_term.line,type:"
+msgid "Percentage on Total"
+msgstr ""
+
+msgctxt "selection:account.invoice.payment_term.line,type:"
+msgid "Remainder"
+msgstr ""
+
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid ""
 msgstr ""
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "April"
 msgstr ""
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "August"
 msgstr ""
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "December"
 msgstr ""
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "February"
 msgstr ""
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "January"
 msgstr ""
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "July"
 msgstr ""
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "June"
 msgstr ""
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "March"
 msgstr ""
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "May"
 msgstr ""
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "November"
 msgstr ""
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "October"
 msgstr ""
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "September"
 msgstr ""
 
-msgctxt "selection:account.invoice.payment_term.line,type:"
-msgid "Fixed"
-msgstr ""
-
-msgctxt "selection:account.invoice.payment_term.line,type:"
-msgid "Percentage on Remainder"
-msgstr ""
-
-msgctxt "selection:account.invoice.payment_term.line,type:"
-msgid "Percentage on Total"
-msgstr ""
-
-msgctxt "selection:account.invoice.payment_term.line,type:"
-msgid "Remainder"
-msgstr ""
-
-msgctxt "selection:account.invoice.payment_term.line,weekday:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,weekday:"
 msgid ""
 msgstr ""
 
-msgctxt "selection:account.invoice.payment_term.line,weekday:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,weekday:"
 msgid "Friday"
 msgstr ""
 
-msgctxt "selection:account.invoice.payment_term.line,weekday:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,weekday:"
 msgid "Monday"
 msgstr ""
 
-msgctxt "selection:account.invoice.payment_term.line,weekday:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,weekday:"
 msgid "Saturday"
 msgstr ""
 
-msgctxt "selection:account.invoice.payment_term.line,weekday:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,weekday:"
 msgid "Sunday"
 msgstr ""
 
-msgctxt "selection:account.invoice.payment_term.line,weekday:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,weekday:"
 msgid "Thursday"
 msgstr ""
 
-msgctxt "selection:account.invoice.payment_term.line,weekday:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,weekday:"
 msgid "Tuesday"
 msgstr ""
 
-msgctxt "selection:account.invoice.payment_term.line,weekday:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,weekday:"
 msgid "Wednesday"
 msgstr ""
 
@@ -1629,17 +1705,21 @@ msgid "Cancel"
 msgstr ""
 
 msgctxt "wizard_button:account.invoice.pay,ask,pay:"
-msgid "Ok"
+msgid "OK"
 msgstr ""
 
 msgctxt "wizard_button:account.invoice.pay,start,choice:"
-msgid "Ok"
+msgid "OK"
 msgstr ""
 
 msgctxt "wizard_button:account.invoice.pay,start,end:"
 msgid "Cancel"
 msgstr ""
 
+msgctxt "wizard_button:account.invoice.payment_term.test,test,end:"
+msgid "Close"
+msgstr ""
+
 msgctxt "wizard_button:account.invoice.print,warning,end:"
 msgid "Cancel"
 msgstr ""
diff --git a/locale/de_DE.po b/locale/de_DE.po
index 13bead6..5fb176d 100644
--- a/locale/de_DE.po
+++ b/locale/de_DE.po
@@ -59,16 +59,6 @@ msgstr ""
 
 msgctxt "error:account.invoice.line:"
 msgid ""
-"You can not create invoice line \"%(line)s\" on invoice \"%(invoice)s of "
-"company \"%(invoice_line_company)s because account \"%(account)s has company"
-" \"%(account_company)s\"."
-msgstr ""
-"Erstellung von Rechnungsposition \"%(line)s\" in Rechnung \"%(invoice)s\" "
-"von Unternehmen \"%(invoice_line_company)s\" nicht möglich, weil das Konto "
-"\"%(account)s\" zu Unternehmen \"%(account_company)s\" gehört."
-
-msgctxt "error:account.invoice.line:"
-msgid ""
 "You can not create invoice line \"%(line)s\" on invoice \"%(invoice)s\" "
 "because the invoice uses the same account (%(account)s)."
 msgstr ""
@@ -92,10 +82,6 @@ msgstr ""
 "größer als der zu zahlende Betrag ist."
 
 msgctxt "error:account.invoice.payment_term.line:"
-msgid "Day of month must be between 1 and 31."
-msgstr "Tag des Monats muss zwischen 1 und 31 sein."
-
-msgctxt "error:account.invoice.payment_term.line:"
 msgid ""
 "Percentage and Divisor values are not consistent in line \"%(line)s\" of "
 "payment term \"%(term)s\"."
@@ -128,16 +114,6 @@ msgstr ""
 msgctxt "error:account.invoice.tax:"
 msgid ""
 "You can not create invoice \"%(invoice)s\" on company "
-"\"%(invoice_company)s\" using account \"%(account)s\" from company "
-"\"%(account_company)s\"."
-msgstr ""
-"Rechnungserstellung für \"%(invoice)s\" in Unternehmen "
-"\"%(invoice_company)s\" nicht möglich, weil Konto \"%(account)s\" zu einem "
-"anderen Unternehmen gehört (%(account_company)s)."
-
-msgctxt "error:account.invoice.tax:"
-msgid ""
-"You can not create invoice \"%(invoice)s\" on company "
 "\"%(invoice_company)s\" using base tax code \"%(base_code)s\" from company "
 "\"%(base_code_company)s\"."
 msgstr ""
@@ -244,15 +220,6 @@ msgstr ""
 "Buchungsperiode/Geschäftsjahr \"%(period)s\"."
 
 msgctxt "error:account.invoice:"
-msgid ""
-"You can not create invoice \"%(invoice)s\" on company \"%(invoice_company)s "
-"because account \"%(account)s has a different company (%(account_company)s.)"
-msgstr ""
-"Rechnungserstellung für \"%(invoice)s\" in Unternehmen "
-"\"%(invoice_company)s\" nicht möglich, weil Konto \"%(account)s\" zu einem "
-"anderen Unternehmen gehört (%(account_company)s)."
-
-msgctxt "error:account.invoice:"
 msgid "You can not modify invoice \"%s\" because it is posted, paid or cancelled."
 msgstr ""
 "Änderung von Rechnung \"%s\" nicht möglich, weil sie in Status "
@@ -261,7 +228,7 @@ msgstr ""
 msgctxt "error:account.period:"
 msgid "Period \"%(first)s\" and \"%(second)s\" have the same invoice sequence."
 msgstr ""
-"Für die Buchungsperioden \"%(first)s\" und \"%(second)s\" ist derselbe "
+"Für die Buchungszeiträume \"%(first)s\" und \"%(second)s\" ist derselbe "
 "Rechnungsnummernkreis eingetragen."
 
 msgctxt "error:account.period:"
@@ -269,8 +236,8 @@ msgid ""
 "Period \"%(period)s\" must have the same company as its fiscal year "
 "(%(fiscalyear)s)."
 msgstr ""
-"Buchungsperioden \"%(period)s\" müssen demselben Unternehmen zugeordnet sein"
-" wie das Geschäftsjahr (%(fiscalyear)s)."
+"Buchungszeiträume \"%(period)s\" müssen demselben Unternehmen zugeordnet "
+"sein wie das Geschäftsjahr (%(fiscalyear)s)."
 
 msgctxt "error:account.period:"
 msgid ""
@@ -751,7 +718,7 @@ msgstr "Betrag"
 
 msgctxt "field:account.invoice.pay.start,currency:"
 msgid "Currency"
-msgstr "Währungen"
+msgstr "Währung"
 
 msgctxt "field:account.invoice.pay.start,currency_digits:"
 msgid "Currency Digits"
@@ -833,14 +800,6 @@ msgctxt "field:account.invoice.payment_term.line,currency_digits:"
 msgid "Currency Digits"
 msgstr "Nachkommastellen Währung"
 
-msgctxt "field:account.invoice.payment_term.line,day:"
-msgid "Day of Month"
-msgstr "Tag des Monats"
-
-msgctxt "field:account.invoice.payment_term.line,days:"
-msgid "Number of Days"
-msgstr "Anzahl an Tagen"
-
 msgctxt "field:account.invoice.payment_term.line,divisor:"
 msgid "Divisor"
 msgstr "Divisor"
@@ -849,14 +808,6 @@ msgctxt "field:account.invoice.payment_term.line,id:"
 msgid "ID"
 msgstr "ID"
 
-msgctxt "field:account.invoice.payment_term.line,month:"
-msgid "Month"
-msgstr "Monat"
-
-msgctxt "field:account.invoice.payment_term.line,months:"
-msgid "Number of Months"
-msgstr "Anzahl an Monaten"
-
 msgctxt "field:account.invoice.payment_term.line,payment:"
 msgid "Payment Term"
 msgstr "Zahlungsbedingung"
@@ -869,6 +820,10 @@ msgctxt "field:account.invoice.payment_term.line,rec_name:"
 msgid "Name"
 msgstr "Name"
 
+msgctxt "field:account.invoice.payment_term.line,relativedeltas:"
+msgid "Deltas"
+msgstr "Zeitspannen"
+
 msgctxt "field:account.invoice.payment_term.line,sequence:"
 msgid "Sequence"
 msgstr "Reihenfolge"
@@ -877,22 +832,114 @@ msgctxt "field:account.invoice.payment_term.line,type:"
 msgid "Type"
 msgstr "Typ"
 
-msgctxt "field:account.invoice.payment_term.line,weekday:"
+msgctxt "field:account.invoice.payment_term.line,write_date:"
+msgid "Write Date"
+msgstr "Zuletzt geändert"
+
+msgctxt "field:account.invoice.payment_term.line,write_uid:"
+msgid "Write User"
+msgstr "Letzte Änderung durch"
+
+msgctxt "field:account.invoice.payment_term.line.relativedelta,create_date:"
+msgid "Create Date"
+msgstr "Erstellungsdatum"
+
+msgctxt "field:account.invoice.payment_term.line.relativedelta,create_uid:"
+msgid "Create User"
+msgstr "Erstellt durch"
+
+msgctxt "field:account.invoice.payment_term.line.relativedelta,day:"
+msgid "Day of Month"
+msgstr "Tag des Monats"
+
+msgctxt "field:account.invoice.payment_term.line.relativedelta,days:"
+msgid "Number of Days"
+msgstr "Anzahl an Tagen"
+
+msgctxt "field:account.invoice.payment_term.line.relativedelta,id:"
+msgid "ID"
+msgstr "ID"
+
+msgctxt "field:account.invoice.payment_term.line.relativedelta,line:"
+msgid "Payment Term Line"
+msgstr "Zahlungsbedingungsposition"
+
+msgctxt "field:account.invoice.payment_term.line.relativedelta,month:"
+msgid "Month"
+msgstr "Monat"
+
+msgctxt "field:account.invoice.payment_term.line.relativedelta,months:"
+msgid "Number of Months"
+msgstr "Anzahl an Monaten"
+
+msgctxt "field:account.invoice.payment_term.line.relativedelta,rec_name:"
+msgid "Name"
+msgstr "Name"
+
+msgctxt "field:account.invoice.payment_term.line.relativedelta,sequence:"
+msgid "Sequence"
+msgstr "Reihenfolge"
+
+msgctxt "field:account.invoice.payment_term.line.relativedelta,weekday:"
 msgid "Day of Week"
 msgstr "Wochentag"
 
-msgctxt "field:account.invoice.payment_term.line,weeks:"
+msgctxt "field:account.invoice.payment_term.line.relativedelta,weeks:"
 msgid "Number of Weeks"
 msgstr "Anzahl an Wochen"
 
-msgctxt "field:account.invoice.payment_term.line,write_date:"
+msgctxt "field:account.invoice.payment_term.line.relativedelta,write_date:"
 msgid "Write Date"
 msgstr "Zuletzt geändert"
 
-msgctxt "field:account.invoice.payment_term.line,write_uid:"
+msgctxt "field:account.invoice.payment_term.line.relativedelta,write_uid:"
 msgid "Write User"
 msgstr "Letzte Änderung durch"
 
+msgctxt "field:account.invoice.payment_term.test,amount:"
+msgid "Amount"
+msgstr "Betrag"
+
+msgctxt "field:account.invoice.payment_term.test,currency:"
+msgid "Currency"
+msgstr "Währung"
+
+msgctxt "field:account.invoice.payment_term.test,currency_digits:"
+msgid "Currency Digits"
+msgstr "Nachkommastellen Währung"
+
+msgctxt "field:account.invoice.payment_term.test,date:"
+msgid "Date"
+msgstr "Zeitpunkt"
+
+msgctxt "field:account.invoice.payment_term.test,id:"
+msgid "ID"
+msgstr "ID"
+
+msgctxt "field:account.invoice.payment_term.test,payment_term:"
+msgid "Payment Term"
+msgstr "Zahlungsbedingung"
+
+msgctxt "field:account.invoice.payment_term.test,result:"
+msgid "Result"
+msgstr "Ergebnis"
+
+msgctxt "field:account.invoice.payment_term.test.result,amount:"
+msgid "Amount"
+msgstr "Betrag"
+
+msgctxt "field:account.invoice.payment_term.test.result,currency_digits:"
+msgid "Currency Digits"
+msgstr "Nachkommastellen Währung"
+
+msgctxt "field:account.invoice.payment_term.test.result,date:"
+msgid "Date"
+msgstr "Zeitpunkt"
+
+msgctxt "field:account.invoice.payment_term.test.result,id:"
+msgid "ID"
+msgstr "ID"
+
 msgctxt "field:account.invoice.print.warning,id:"
 msgid "ID"
 msgstr "ID"
@@ -995,7 +1042,7 @@ msgstr "Rechnungsadresse"
 
 msgctxt "field:party.party,customer_payment_term:"
 msgid "Customer Payment Term"
-msgstr "Zahlungsbedingung Kunde"
+msgstr "Zahlungsbedingung Verkauf"
 
 msgctxt "field:party.party,supplier_payment_term:"
 msgid "Supplier Payment Term"
@@ -1051,6 +1098,18 @@ msgctxt "model:account.invoice.payment_term.line,name:"
 msgid "Payment Term Line"
 msgstr "Zahlungsbedingungsposition"
 
+msgctxt "model:account.invoice.payment_term.line.relativedelta,name:"
+msgid "Payment Term Line Relative Delta"
+msgstr "Zahlungsbedingungsposition Relatives Delta"
+
+msgctxt "model:account.invoice.payment_term.test,name:"
+msgid "Test Payment Term"
+msgstr "Zahlungsbedingung testen"
+
+msgctxt "model:account.invoice.payment_term.test.result,name:"
+msgid "Test Payment Term"
+msgstr "Zahlungsbedingung testen"
+
 msgctxt "model:account.invoice.print.warning,name:"
 msgid "Print Invoice Report Warning"
 msgstr "Druck Rechnungsbericht Warnung"
@@ -1061,11 +1120,11 @@ msgstr "Rechnung Steuer"
 
 msgctxt "model:ir.action,name:act_invoice_form"
 msgid "Invoices"
-msgstr "Rechnungsausgang"
+msgstr "Rechnungen"
 
 msgctxt "model:ir.action,name:act_invoice_form2"
 msgid "Invoices"
-msgstr "Rechnungsausgang"
+msgstr "Rechnungen"
 
 msgctxt "model:ir.action,name:act_invoice_in_credit_note_form"
 msgid "Supplier Credit Notes"
@@ -1081,7 +1140,7 @@ msgstr "Gutschriften an Kunden"
 
 msgctxt "model:ir.action,name:act_invoice_out_invoice_form"
 msgid "Invoices"
-msgstr "Rechnungsausgang"
+msgstr "Rechnungen"
 
 msgctxt "model:ir.action,name:act_payment_term_form"
 msgid "Payment Terms"
@@ -1103,6 +1162,10 @@ msgctxt "model:ir.action,name:wizard_pay"
 msgid "Pay Invoice"
 msgstr "Rechnung bezahlen"
 
+msgctxt "model:ir.action,name:wizard_payment_term_test"
+msgid "Test Payment Term"
+msgstr "Zahlungsbedingung testen"
+
 msgctxt ""
 "model:ir.action.act_window.domain,name:act_invoice_in_credit_note_domain_all"
 msgid "All"
@@ -1211,6 +1274,10 @@ msgctxt "model:ir.ui.menu,name:menu_payment_term_form"
 msgid "Payment Terms"
 msgstr "Zahlungsbedingungen"
 
+msgctxt "model:ir.ui.menu,name:menu_payment_term_test"
+msgid "Test Payment Term"
+msgstr "Zahlungsbedingung testen"
+
 msgctxt "model:ir.ui.menu,name:menu_payment_terms_configuration"
 msgid "Payment Terms"
 msgstr "Zahlungsbedingungen"
@@ -1439,103 +1506,103 @@ msgctxt "selection:account.invoice.pay.ask,type:"
 msgid "Write-Off"
 msgstr "Ausbuchung"
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line,type:"
+msgid "Fixed"
+msgstr "Fix"
+
+msgctxt "selection:account.invoice.payment_term.line,type:"
+msgid "Percentage on Remainder"
+msgstr "Prozentsatz auf Restbetrag"
+
+msgctxt "selection:account.invoice.payment_term.line,type:"
+msgid "Percentage on Total"
+msgstr "Prozentsatz auf Gesamtbetrag"
+
+msgctxt "selection:account.invoice.payment_term.line,type:"
+msgid "Remainder"
+msgstr "Restbetrag"
+
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid ""
 msgstr ""
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "April"
 msgstr "April"
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "August"
 msgstr "August"
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "December"
 msgstr "Dezember"
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "February"
 msgstr "Februar"
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "January"
 msgstr "Januar"
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "July"
 msgstr "Juli"
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "June"
 msgstr "Juni"
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "March"
 msgstr "März"
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "May"
 msgstr "Mai"
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "November"
 msgstr "November"
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "October"
 msgstr "Oktober"
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "September"
 msgstr "September"
 
-msgctxt "selection:account.invoice.payment_term.line,type:"
-msgid "Fixed"
-msgstr "Fix"
-
-msgctxt "selection:account.invoice.payment_term.line,type:"
-msgid "Percentage on Remainder"
-msgstr "Prozentsatz auf Restbetrag"
-
-msgctxt "selection:account.invoice.payment_term.line,type:"
-msgid "Percentage on Total"
-msgstr "Prozentsatz auf Gesamtbetrag"
-
-msgctxt "selection:account.invoice.payment_term.line,type:"
-msgid "Remainder"
-msgstr "Restbetrag"
-
-msgctxt "selection:account.invoice.payment_term.line,weekday:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,weekday:"
 msgid ""
 msgstr ""
 
-msgctxt "selection:account.invoice.payment_term.line,weekday:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,weekday:"
 msgid "Friday"
 msgstr "Freitag"
 
-msgctxt "selection:account.invoice.payment_term.line,weekday:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,weekday:"
 msgid "Monday"
 msgstr "Montag"
 
-msgctxt "selection:account.invoice.payment_term.line,weekday:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,weekday:"
 msgid "Saturday"
 msgstr "Samstag"
 
-msgctxt "selection:account.invoice.payment_term.line,weekday:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,weekday:"
 msgid "Sunday"
 msgstr "Sonntag"
 
-msgctxt "selection:account.invoice.payment_term.line,weekday:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,weekday:"
 msgid "Thursday"
 msgstr "Donnerstag"
 
-msgctxt "selection:account.invoice.payment_term.line,weekday:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,weekday:"
 msgid "Tuesday"
 msgstr "Dienstag"
 
-msgctxt "selection:account.invoice.payment_term.line,weekday:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,weekday:"
 msgid "Wednesday"
 msgstr "Mittwoch"
 
@@ -1579,13 +1646,25 @@ msgctxt "view:account.invoice.pay.start:"
 msgid "Pay Invoice"
 msgstr "Rechnung bezahlen"
 
+msgctxt "view:account.invoice.payment_term.line.relativedelta:"
+msgid "Payment Term Line Relative Delta"
+msgstr "Zahlungsbedingungsposition Zeitspanne"
+
+msgctxt "view:account.invoice.payment_term.line.relativedelta:"
+msgid "Payment Term Line Relative Deltas"
+msgstr "Zahlungsbedingungsposition Zeitspannen"
+
 msgctxt "view:account.invoice.payment_term.line:"
 msgid "Payment Term Line"
 msgstr "Zahlungsbedingungsposition"
 
-msgctxt "view:account.invoice.payment_term.line:"
-msgid "Payment Term Lines"
-msgstr "Zahlungsbedingungspositionen"
+msgctxt "view:account.invoice.payment_term.test.result:"
+msgid "Payment Term Test Results"
+msgstr "Testergebnisse Zahlungsbedingung"
+
+msgctxt "view:account.invoice.payment_term.test:"
+msgid "Payment Term Test"
+msgstr "Test Zahlungsbedingung"
 
 msgctxt "view:account.invoice.payment_term:"
 msgid "Payment Term"
@@ -1632,6 +1711,14 @@ msgid "Are you sure to cancel the invoice?"
 msgstr "Wollen Sie die Rechnung wirklich stornieren?"
 
 msgctxt "view:account.invoice:"
+msgid "Cancel"
+msgstr "Annullieren"
+
+msgctxt "view:account.invoice:"
+msgid "Draft"
+msgstr "Entwurf"
+
+msgctxt "view:account.invoice:"
 msgid "Invoice"
 msgstr "Rechnung"
 
@@ -1648,6 +1735,10 @@ msgid "Payment"
 msgstr "Zahlung"
 
 msgctxt "view:account.invoice:"
+msgid "Post"
+msgstr "Festschreiben"
+
+msgctxt "view:account.invoice:"
 msgid "Validate"
 msgstr "Prüfen"
 
@@ -1704,17 +1795,21 @@ msgid "Cancel"
 msgstr "Abbrechen"
 
 msgctxt "wizard_button:account.invoice.pay,ask,pay:"
-msgid "Ok"
+msgid "OK"
 msgstr "OK"
 
 msgctxt "wizard_button:account.invoice.pay,start,choice:"
-msgid "Ok"
+msgid "OK"
 msgstr "OK"
 
 msgctxt "wizard_button:account.invoice.pay,start,end:"
 msgid "Cancel"
 msgstr "Abbrechen"
 
+msgctxt "wizard_button:account.invoice.payment_term.test,test,end:"
+msgid "Close"
+msgstr "Schließen"
+
 msgctxt "wizard_button:account.invoice.print,warning,end:"
 msgid "Cancel"
 msgstr "Abbrechen"
diff --git a/locale/es_AR.po b/locale/es_AR.po
index 7c96cbc..0056db3 100644
--- a/locale/es_AR.po
+++ b/locale/es_AR.po
@@ -51,16 +51,6 @@ msgstr ""
 
 msgctxt "error:account.invoice.line:"
 msgid ""
-"You can not create invoice line \"%(line)s\" on invoice \"%(invoice)s of "
-"company \"%(invoice_line_company)s because account \"%(account)s has company"
-" \"%(account_company)s\"."
-msgstr ""
-"No puede crear la línea de factura «%(line)s» en la factura «%(invoice)s» de"
-" la empresa «%(invoice_line_company)s» porque la cuenta «%(account)s» tiene "
-"la empresa «%(account_company)s»."
-
-msgctxt "error:account.invoice.line:"
-msgid ""
 "You can not create invoice line \"%(line)s\" on invoice \"%(invoice)s\" "
 "because the invoice uses the same account (%(account)s)."
 msgstr ""
@@ -84,10 +74,6 @@ msgstr ""
 "importe a pagar."
 
 msgctxt "error:account.invoice.payment_term.line:"
-msgid "Day of month must be between 1 and 31."
-msgstr "El día del mes debe estar entre 1 y 31."
-
-msgctxt "error:account.invoice.payment_term.line:"
 msgid ""
 "Percentage and Divisor values are not consistent in line \"%(line)s\" of "
 "payment term \"%(term)s\"."
@@ -118,15 +104,6 @@ msgstr ""
 msgctxt "error:account.invoice.tax:"
 msgid ""
 "You can not create invoice \"%(invoice)s\" on company "
-"\"%(invoice_company)s\" using account \"%(account)s\" from company "
-"\"%(account_company)s\"."
-msgstr ""
-"No puede crear la factura «%(invoice)s» en la empresa «%(invoice_company)s» "
-"utilizando la cuenta «%(account)s» de la empresa «%(account_company)s»."
-
-msgctxt "error:account.invoice.tax:"
-msgid ""
-"You can not create invoice \"%(invoice)s\" on company "
 "\"%(invoice_company)s\" using base tax code \"%(base_code)s\" from company "
 "\"%(base_code_company)s\"."
 msgstr ""
@@ -229,15 +206,6 @@ msgstr ""
 "fiscal «%(period)s»."
 
 msgctxt "error:account.invoice:"
-msgid ""
-"You can not create invoice \"%(invoice)s\" on company \"%(invoice_company)s "
-"because account \"%(account)s has a different company (%(account_company)s.)"
-msgstr ""
-"No puede crear la factura «%(invoice)s» en la empresa «%(invoice_company)s» "
-"porque la cuenta «%(account)s» tiene una empresa (%(account_company)s) "
-"diferente."
-
-msgctxt "error:account.invoice:"
 msgid "You can not modify invoice \"%s\" because it is posted, paid or cancelled."
 msgstr ""
 "No puede modificar la factura «%(invoice)s» porque está confirmada, pagada o"
@@ -347,7 +315,7 @@ msgstr "Importe a pagar hoy"
 
 msgctxt "field:account.invoice,cancel_move:"
 msgid "Cancel Move"
-msgstr "Cancela asiento"
+msgstr "Asiento cancelación"
 
 msgctxt "field:account.invoice,comment:"
 msgid "Comment"
@@ -375,7 +343,7 @@ msgstr "Fecha moneda"
 
 msgctxt "field:account.invoice,currency_digits:"
 msgid "Currency Digits"
-msgstr "Dígitos de moneda"
+msgstr "Decimales de moneda"
 
 msgctxt "field:account.invoice,description:"
 msgid "Description"
@@ -555,7 +523,7 @@ msgstr "Moneda"
 
 msgctxt "field:account.invoice.line,currency_digits:"
 msgid "Currency Digits"
-msgstr "Dígitos de moneda"
+msgstr "Decimales de moneda"
 
 msgctxt "field:account.invoice.line,description:"
 msgid "Description"
@@ -627,7 +595,7 @@ msgstr "Unidad"
 
 msgctxt "field:account.invoice.line,unit_digits:"
 msgid "Unit Digits"
-msgstr "Dígitos de unidad"
+msgstr "Decimales de unidad"
 
 msgctxt "field:account.invoice.line,unit_price:"
 msgid "Unit Price"
@@ -739,7 +707,7 @@ msgstr "Moneda"
 
 msgctxt "field:account.invoice.pay.start,currency_digits:"
 msgid "Currency Digits"
-msgstr "Dígitos de moneda"
+msgstr "Decimales de moneda"
 
 msgctxt "field:account.invoice.pay.start,date:"
 msgid "Date"
@@ -815,15 +783,7 @@ msgstr "Moneda"
 
 msgctxt "field:account.invoice.payment_term.line,currency_digits:"
 msgid "Currency Digits"
-msgstr "Dígitos de moneda"
-
-msgctxt "field:account.invoice.payment_term.line,day:"
-msgid "Day of Month"
-msgstr "Día del mes"
-
-msgctxt "field:account.invoice.payment_term.line,days:"
-msgid "Number of Days"
-msgstr "Número de días"
+msgstr "Decimales de moneda"
 
 msgctxt "field:account.invoice.payment_term.line,divisor:"
 msgid "Divisor"
@@ -833,14 +793,6 @@ msgctxt "field:account.invoice.payment_term.line,id:"
 msgid "ID"
 msgstr "ID"
 
-msgctxt "field:account.invoice.payment_term.line,month:"
-msgid "Month"
-msgstr "Mes"
-
-msgctxt "field:account.invoice.payment_term.line,months:"
-msgid "Number of Months"
-msgstr "Número de meses"
-
 msgctxt "field:account.invoice.payment_term.line,payment:"
 msgid "Payment Term"
 msgstr "Término de pago"
@@ -853,6 +805,10 @@ msgctxt "field:account.invoice.payment_term.line,rec_name:"
 msgid "Name"
 msgstr "Nombre"
 
+msgctxt "field:account.invoice.payment_term.line,relativedeltas:"
+msgid "Deltas"
+msgstr "Incrementos"
+
 msgctxt "field:account.invoice.payment_term.line,sequence:"
 msgid "Sequence"
 msgstr "Secuencia"
@@ -861,22 +817,114 @@ msgctxt "field:account.invoice.payment_term.line,type:"
 msgid "Type"
 msgstr "Tipo"
 
-msgctxt "field:account.invoice.payment_term.line,weekday:"
+msgctxt "field:account.invoice.payment_term.line,write_date:"
+msgid "Write Date"
+msgstr "Fecha modificación"
+
+msgctxt "field:account.invoice.payment_term.line,write_uid:"
+msgid "Write User"
+msgstr "Usuario modificación"
+
+msgctxt "field:account.invoice.payment_term.line.relativedelta,create_date:"
+msgid "Create Date"
+msgstr "Fecha creación"
+
+msgctxt "field:account.invoice.payment_term.line.relativedelta,create_uid:"
+msgid "Create User"
+msgstr "Usuario creación"
+
+msgctxt "field:account.invoice.payment_term.line.relativedelta,day:"
+msgid "Day of Month"
+msgstr "Día del Mes"
+
+msgctxt "field:account.invoice.payment_term.line.relativedelta,days:"
+msgid "Number of Days"
+msgstr "Número de Días"
+
+msgctxt "field:account.invoice.payment_term.line.relativedelta,id:"
+msgid "ID"
+msgstr "ID"
+
+msgctxt "field:account.invoice.payment_term.line.relativedelta,line:"
+msgid "Payment Term Line"
+msgstr "Línea del término de pago"
+
+msgctxt "field:account.invoice.payment_term.line.relativedelta,month:"
+msgid "Month"
+msgstr "Mes"
+
+msgctxt "field:account.invoice.payment_term.line.relativedelta,months:"
+msgid "Number of Months"
+msgstr "Número de Meses"
+
+msgctxt "field:account.invoice.payment_term.line.relativedelta,rec_name:"
+msgid "Name"
+msgstr "Nombre"
+
+msgctxt "field:account.invoice.payment_term.line.relativedelta,sequence:"
+msgid "Sequence"
+msgstr "Secuencia"
+
+msgctxt "field:account.invoice.payment_term.line.relativedelta,weekday:"
 msgid "Day of Week"
-msgstr "Día de la semana"
+msgstr "Día de la Semana"
 
-msgctxt "field:account.invoice.payment_term.line,weeks:"
+msgctxt "field:account.invoice.payment_term.line.relativedelta,weeks:"
 msgid "Number of Weeks"
-msgstr "Número de semanas"
+msgstr "Número de Semanas"
 
-msgctxt "field:account.invoice.payment_term.line,write_date:"
+msgctxt "field:account.invoice.payment_term.line.relativedelta,write_date:"
 msgid "Write Date"
 msgstr "Fecha modificación"
 
-msgctxt "field:account.invoice.payment_term.line,write_uid:"
+msgctxt "field:account.invoice.payment_term.line.relativedelta,write_uid:"
 msgid "Write User"
 msgstr "Usuario modificación"
 
+msgctxt "field:account.invoice.payment_term.test,amount:"
+msgid "Amount"
+msgstr "Importe"
+
+msgctxt "field:account.invoice.payment_term.test,currency:"
+msgid "Currency"
+msgstr "Moneda"
+
+msgctxt "field:account.invoice.payment_term.test,currency_digits:"
+msgid "Currency Digits"
+msgstr "Decimales de moneda"
+
+msgctxt "field:account.invoice.payment_term.test,date:"
+msgid "Date"
+msgstr "Fecha"
+
+msgctxt "field:account.invoice.payment_term.test,id:"
+msgid "ID"
+msgstr "ID"
+
+msgctxt "field:account.invoice.payment_term.test,payment_term:"
+msgid "Payment Term"
+msgstr "Término de pago"
+
+msgctxt "field:account.invoice.payment_term.test,result:"
+msgid "Result"
+msgstr "Resultado"
+
+msgctxt "field:account.invoice.payment_term.test.result,amount:"
+msgid "Amount"
+msgstr "Importe"
+
+msgctxt "field:account.invoice.payment_term.test.result,currency_digits:"
+msgid "Currency Digits"
+msgstr "Decimales de moneda"
+
+msgctxt "field:account.invoice.payment_term.test.result,date:"
+msgid "Date"
+msgstr "Fecha"
+
+msgctxt "field:account.invoice.payment_term.test.result,id:"
+msgid "ID"
+msgstr "ID"
+
 msgctxt "field:account.invoice.print.warning,id:"
 msgid "ID"
 msgstr "ID"
@@ -1033,6 +1081,18 @@ msgctxt "model:account.invoice.payment_term.line,name:"
 msgid "Payment Term Line"
 msgstr "Línea del término de pago"
 
+msgctxt "model:account.invoice.payment_term.line.relativedelta,name:"
+msgid "Payment Term Line Relative Delta"
+msgstr "Línea de término de pago - Incremento relativo"
+
+msgctxt "model:account.invoice.payment_term.test,name:"
+msgid "Test Payment Term"
+msgstr "Prueba de término de pago"
+
+msgctxt "model:account.invoice.payment_term.test.result,name:"
+msgid "Test Payment Term"
+msgstr "Prueba de término de pago"
+
 msgctxt "model:account.invoice.print.warning,name:"
 msgid "Print Invoice Report Warning"
 msgstr "Imprimir aviso informe de factura"
@@ -1085,6 +1145,10 @@ msgctxt "model:ir.action,name:wizard_pay"
 msgid "Pay Invoice"
 msgstr "Pagar factura"
 
+msgctxt "model:ir.action,name:wizard_payment_term_test"
+msgid "Test Payment Term"
+msgstr "Prueba de término de pago"
+
 msgctxt ""
 "model:ir.action.act_window.domain,name:act_invoice_in_credit_note_domain_all"
 msgid "All"
@@ -1193,6 +1257,10 @@ msgctxt "model:ir.ui.menu,name:menu_payment_term_form"
 msgid "Payment Terms"
 msgstr "Términos de pago"
 
+msgctxt "model:ir.ui.menu,name:menu_payment_term_test"
+msgid "Test Payment Term"
+msgstr "Prueba de término de pago"
+
 msgctxt "model:ir.ui.menu,name:menu_payment_terms_configuration"
 msgid "Payment Terms"
 msgstr "Términos de pago"
@@ -1421,103 +1489,103 @@ msgctxt "selection:account.invoice.pay.ask,type:"
 msgid "Write-Off"
 msgstr "Desajuste"
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line,type:"
+msgid "Fixed"
+msgstr "Fijo"
+
+msgctxt "selection:account.invoice.payment_term.line,type:"
+msgid "Percentage on Remainder"
+msgstr "Porcentaje sobre remanente"
+
+msgctxt "selection:account.invoice.payment_term.line,type:"
+msgid "Percentage on Total"
+msgstr "Porcentaje sobre total"
+
+msgctxt "selection:account.invoice.payment_term.line,type:"
+msgid "Remainder"
+msgstr "Remanente"
+
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid ""
 msgstr ""
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "April"
 msgstr "Abril"
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "August"
 msgstr "Agosto"
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "December"
 msgstr "Diciembre"
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "February"
 msgstr "Febrero"
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "January"
 msgstr "Enero"
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "July"
 msgstr "Julio"
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "June"
 msgstr "Junio"
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "March"
 msgstr "Marzo"
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "May"
 msgstr "Mayo"
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "November"
 msgstr "Noviembre"
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "October"
 msgstr "Octubre"
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "September"
 msgstr "Septiembre"
 
-msgctxt "selection:account.invoice.payment_term.line,type:"
-msgid "Fixed"
-msgstr "Fijo"
-
-msgctxt "selection:account.invoice.payment_term.line,type:"
-msgid "Percentage on Remainder"
-msgstr "Porcentaje sobre remanente"
-
-msgctxt "selection:account.invoice.payment_term.line,type:"
-msgid "Percentage on Total"
-msgstr "Porcentaje sobre total"
-
-msgctxt "selection:account.invoice.payment_term.line,type:"
-msgid "Remainder"
-msgstr "Remanente"
-
-msgctxt "selection:account.invoice.payment_term.line,weekday:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,weekday:"
 msgid ""
 msgstr ""
 
-msgctxt "selection:account.invoice.payment_term.line,weekday:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,weekday:"
 msgid "Friday"
 msgstr "Viernes"
 
-msgctxt "selection:account.invoice.payment_term.line,weekday:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,weekday:"
 msgid "Monday"
 msgstr "Lunes"
 
-msgctxt "selection:account.invoice.payment_term.line,weekday:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,weekday:"
 msgid "Saturday"
 msgstr "Sábado"
 
-msgctxt "selection:account.invoice.payment_term.line,weekday:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,weekday:"
 msgid "Sunday"
 msgstr "Domingo"
 
-msgctxt "selection:account.invoice.payment_term.line,weekday:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,weekday:"
 msgid "Thursday"
 msgstr "Jueves"
 
-msgctxt "selection:account.invoice.payment_term.line,weekday:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,weekday:"
 msgid "Tuesday"
 msgstr "Martes"
 
-msgctxt "selection:account.invoice.payment_term.line,weekday:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,weekday:"
 msgid "Wednesday"
 msgstr "Miércoles"
 
@@ -1561,13 +1629,25 @@ msgctxt "view:account.invoice.pay.start:"
 msgid "Pay Invoice"
 msgstr "Pagar factura"
 
+msgctxt "view:account.invoice.payment_term.line.relativedelta:"
+msgid "Payment Term Line Relative Delta"
+msgstr "Línea de término de pago - Incremento relativo"
+
+msgctxt "view:account.invoice.payment_term.line.relativedelta:"
+msgid "Payment Term Line Relative Deltas"
+msgstr "Línea de término de pago - Incrementos relativos"
+
 msgctxt "view:account.invoice.payment_term.line:"
 msgid "Payment Term Line"
 msgstr "Línea del término de pago"
 
-msgctxt "view:account.invoice.payment_term.line:"
-msgid "Payment Term Lines"
-msgstr "Línea del término de pago"
+msgctxt "view:account.invoice.payment_term.test.result:"
+msgid "Payment Term Test Results"
+msgstr "Término de pago - Resultados de prueba"
+
+msgctxt "view:account.invoice.payment_term.test:"
+msgid "Payment Term Test"
+msgstr "Término de pago - Prueba"
 
 msgctxt "view:account.invoice.payment_term:"
 msgid "Payment Term"
@@ -1614,6 +1694,14 @@ msgid "Are you sure to cancel the invoice?"
 msgstr "¿Está seguro de cancelar la factura?"
 
 msgctxt "view:account.invoice:"
+msgid "Cancel"
+msgstr "Cancelar"
+
+msgctxt "view:account.invoice:"
+msgid "Draft"
+msgstr "Borrador"
+
+msgctxt "view:account.invoice:"
 msgid "Invoice"
 msgstr "Factura"
 
@@ -1630,6 +1718,10 @@ msgid "Payment"
 msgstr "Pago"
 
 msgctxt "view:account.invoice:"
+msgid "Post"
+msgstr "Confirmar"
+
+msgctxt "view:account.invoice:"
 msgid "Validate"
 msgstr "Validar"
 
@@ -1686,17 +1778,21 @@ msgid "Cancel"
 msgstr "Cancelar"
 
 msgctxt "wizard_button:account.invoice.pay,ask,pay:"
-msgid "Ok"
+msgid "OK"
 msgstr "Aceptar"
 
 msgctxt "wizard_button:account.invoice.pay,start,choice:"
-msgid "Ok"
+msgid "OK"
 msgstr "Aceptar"
 
 msgctxt "wizard_button:account.invoice.pay,start,end:"
 msgid "Cancel"
 msgstr "Cancelar"
 
+msgctxt "wizard_button:account.invoice.payment_term.test,test,end:"
+msgid "Close"
+msgstr "Cerrar"
+
 msgctxt "wizard_button:account.invoice.print,warning,end:"
 msgid "Cancel"
 msgstr "Cancelar"
diff --git a/locale/es_CO.po b/locale/es_CO.po
index 2e2bff7..12fff8b 100644
--- a/locale/es_CO.po
+++ b/locale/es_CO.po
@@ -53,16 +53,6 @@ msgstr ""
 
 msgctxt "error:account.invoice.line:"
 msgid ""
-"You can not create invoice line \"%(line)s\" on invoice \"%(invoice)s of "
-"company \"%(invoice_line_company)s because account \"%(account)s has company"
-" \"%(account_company)s\"."
-msgstr ""
-"No puede crear la línea de factura \"%(line)s\" en la factura "
-"\"%(invoice)s\" de la compañia \"%(invoice_line_company)s\" porque la cuenta"
-" \"%(account)s\" tiene la compañia \"%(account_company)s\"."
-
-msgctxt "error:account.invoice.line:"
-msgid ""
 "You can not create invoice line \"%(line)s\" on invoice \"%(invoice)s\" "
 "because the invoice uses the same account (%(account)s)."
 msgstr ""
@@ -86,10 +76,6 @@ msgstr ""
 "mayor a la cantidad total a pagar."
 
 msgctxt "error:account.invoice.payment_term.line:"
-msgid "Day of month must be between 1 and 31."
-msgstr "Día del mes debe estar ente 1 y 31."
-
-msgctxt "error:account.invoice.payment_term.line:"
 msgid ""
 "Percentage and Divisor values are not consistent in line \"%(line)s\" of "
 "payment term \"%(term)s\"."
@@ -120,16 +106,6 @@ msgstr ""
 msgctxt "error:account.invoice.tax:"
 msgid ""
 "You can not create invoice \"%(invoice)s\" on company "
-"\"%(invoice_company)s\" using account \"%(account)s\" from company "
-"\"%(account_company)s\"."
-msgstr ""
-"No puede crear la factura \"%(invoice)s\" en la compañia "
-"\"%(invoice_company)s\" usando la cuenta \"%(account)s\" desde la compañia "
-"\"%(account_company)s\"."
-
-msgctxt "error:account.invoice.tax:"
-msgid ""
-"You can not create invoice \"%(invoice)s\" on company "
 "\"%(invoice_company)s\" using base tax code \"%(base_code)s\" from company "
 "\"%(base_code_company)s\"."
 msgstr ""
@@ -234,15 +210,6 @@ msgstr ""
 "periodo/año fiscal \"%(period)s\"."
 
 msgctxt "error:account.invoice:"
-msgid ""
-"You can not create invoice \"%(invoice)s\" on company \"%(invoice_company)s "
-"because account \"%(account)s has a different company (%(account_company)s.)"
-msgstr ""
-"No puede crear la factura \"%(invoice)s\" en la compañia "
-"\"%(invoice_company)\" porque la cuenta \"%(account)s\" tiene una compañia "
-"diferente (%(account_company)s.)"
-
-msgctxt "error:account.invoice:"
 msgid "You can not modify invoice \"%s\" because it is posted, paid or cancelled."
 msgstr ""
 "No puede modificar la factura \"%s\" porque esta contabilizada, pagada o "
@@ -310,7 +277,7 @@ msgstr "Secuencia"
 
 msgctxt "field:account.configuration.tax_rounding,write_date:"
 msgid "Write Date"
-msgstr "Modificado por Usuario"
+msgstr "Fecha de Modificación"
 
 msgctxt "field:account.configuration.tax_rounding,write_uid:"
 msgid "Write User"
@@ -820,14 +787,6 @@ msgctxt "field:account.invoice.payment_term.line,currency_digits:"
 msgid "Currency Digits"
 msgstr "Decimales de Moneda"
 
-msgctxt "field:account.invoice.payment_term.line,day:"
-msgid "Day of Month"
-msgstr "Día del Mes"
-
-msgctxt "field:account.invoice.payment_term.line,days:"
-msgid "Number of Days"
-msgstr "Cantidad de Días"
-
 msgctxt "field:account.invoice.payment_term.line,divisor:"
 msgid "Divisor"
 msgstr "Divisor"
@@ -836,14 +795,6 @@ msgctxt "field:account.invoice.payment_term.line,id:"
 msgid "ID"
 msgstr "ID"
 
-msgctxt "field:account.invoice.payment_term.line,month:"
-msgid "Month"
-msgstr "Mes"
-
-msgctxt "field:account.invoice.payment_term.line,months:"
-msgid "Number of Months"
-msgstr "Número de Meses"
-
 msgctxt "field:account.invoice.payment_term.line,payment:"
 msgid "Payment Term"
 msgstr "Forma de Pago"
@@ -856,6 +807,10 @@ msgctxt "field:account.invoice.payment_term.line,rec_name:"
 msgid "Name"
 msgstr "Nombre"
 
+msgctxt "field:account.invoice.payment_term.line,relativedeltas:"
+msgid "Deltas"
+msgstr "Deltas"
+
 msgctxt "field:account.invoice.payment_term.line,sequence:"
 msgid "Sequence"
 msgstr "Secuencia"
@@ -864,22 +819,114 @@ msgctxt "field:account.invoice.payment_term.line,type:"
 msgid "Type"
 msgstr "Tipo"
 
-msgctxt "field:account.invoice.payment_term.line,weekday:"
+msgctxt "field:account.invoice.payment_term.line,write_date:"
+msgid "Write Date"
+msgstr "Fecha de Modificación"
+
+msgctxt "field:account.invoice.payment_term.line,write_uid:"
+msgid "Write User"
+msgstr "Modificado por Usuario"
+
+msgctxt "field:account.invoice.payment_term.line.relativedelta,create_date:"
+msgid "Create Date"
+msgstr "Fecha de Creación"
+
+msgctxt "field:account.invoice.payment_term.line.relativedelta,create_uid:"
+msgid "Create User"
+msgstr "Creado por Usuario"
+
+msgctxt "field:account.invoice.payment_term.line.relativedelta,day:"
+msgid "Day of Month"
+msgstr "Día del Mes"
+
+msgctxt "field:account.invoice.payment_term.line.relativedelta,days:"
+msgid "Number of Days"
+msgstr "Número de Días"
+
+msgctxt "field:account.invoice.payment_term.line.relativedelta,id:"
+msgid "ID"
+msgstr "ID"
+
+msgctxt "field:account.invoice.payment_term.line.relativedelta,line:"
+msgid "Payment Term Line"
+msgstr "Línea de Forma de Pago"
+
+msgctxt "field:account.invoice.payment_term.line.relativedelta,month:"
+msgid "Month"
+msgstr "Mes"
+
+msgctxt "field:account.invoice.payment_term.line.relativedelta,months:"
+msgid "Number of Months"
+msgstr "Número de Meses"
+
+msgctxt "field:account.invoice.payment_term.line.relativedelta,rec_name:"
+msgid "Name"
+msgstr "Nombre"
+
+msgctxt "field:account.invoice.payment_term.line.relativedelta,sequence:"
+msgid "Sequence"
+msgstr "Secuencia"
+
+msgctxt "field:account.invoice.payment_term.line.relativedelta,weekday:"
 msgid "Day of Week"
 msgstr "Día de la Semana"
 
-msgctxt "field:account.invoice.payment_term.line,weeks:"
+msgctxt "field:account.invoice.payment_term.line.relativedelta,weeks:"
 msgid "Number of Weeks"
 msgstr "Número de Semanas"
 
-msgctxt "field:account.invoice.payment_term.line,write_date:"
+msgctxt "field:account.invoice.payment_term.line.relativedelta,write_date:"
 msgid "Write Date"
 msgstr "Fecha de Modificación"
 
-msgctxt "field:account.invoice.payment_term.line,write_uid:"
+msgctxt "field:account.invoice.payment_term.line.relativedelta,write_uid:"
 msgid "Write User"
 msgstr "Modificado por Usuario"
 
+msgctxt "field:account.invoice.payment_term.test,amount:"
+msgid "Amount"
+msgstr "Valor"
+
+msgctxt "field:account.invoice.payment_term.test,currency:"
+msgid "Currency"
+msgstr "Monedas"
+
+msgctxt "field:account.invoice.payment_term.test,currency_digits:"
+msgid "Currency Digits"
+msgstr "Decimales de Moneda"
+
+msgctxt "field:account.invoice.payment_term.test,date:"
+msgid "Date"
+msgstr "Fecha"
+
+msgctxt "field:account.invoice.payment_term.test,id:"
+msgid "ID"
+msgstr "ID"
+
+msgctxt "field:account.invoice.payment_term.test,payment_term:"
+msgid "Payment Term"
+msgstr "Forma de Pago"
+
+msgctxt "field:account.invoice.payment_term.test,result:"
+msgid "Result"
+msgstr "Resultado"
+
+msgctxt "field:account.invoice.payment_term.test.result,amount:"
+msgid "Amount"
+msgstr "Valor"
+
+msgctxt "field:account.invoice.payment_term.test.result,currency_digits:"
+msgid "Currency Digits"
+msgstr "Decimales de Moneda"
+
+msgctxt "field:account.invoice.payment_term.test.result,date:"
+msgid "Date"
+msgstr "Fecha"
+
+msgctxt "field:account.invoice.payment_term.test.result,id:"
+msgid "ID"
+msgstr "ID"
+
 msgctxt "field:account.invoice.print.warning,id:"
 msgid "ID"
 msgstr "ID"
@@ -1036,6 +1083,18 @@ msgctxt "model:account.invoice.payment_term.line,name:"
 msgid "Payment Term Line"
 msgstr "Línea de Forma de Pago"
 
+msgctxt "model:account.invoice.payment_term.line.relativedelta,name:"
+msgid "Payment Term Line Relative Delta"
+msgstr "Delta Relativo de Forma de Pago"
+
+msgctxt "model:account.invoice.payment_term.test,name:"
+msgid "Test Payment Term"
+msgstr "Test de Forma de Pago"
+
+msgctxt "model:account.invoice.payment_term.test.result,name:"
+msgid "Test Payment Term"
+msgstr "Test de Forma de Pago"
+
 msgctxt "model:account.invoice.print.warning,name:"
 msgid "Print Invoice Report Warning"
 msgstr "Advertencia Imprimir Factura"
@@ -1088,6 +1147,10 @@ msgctxt "model:ir.action,name:wizard_pay"
 msgid "Pay Invoice"
 msgstr "Pagar Factura"
 
+msgctxt "model:ir.action,name:wizard_payment_term_test"
+msgid "Test Payment Term"
+msgstr "Test de Forma de Pago"
+
 msgctxt ""
 "model:ir.action.act_window.domain,name:act_invoice_in_credit_note_domain_all"
 msgid "All"
@@ -1196,6 +1259,10 @@ msgctxt "model:ir.ui.menu,name:menu_payment_term_form"
 msgid "Payment Terms"
 msgstr "Formas de Pago"
 
+msgctxt "model:ir.ui.menu,name:menu_payment_term_test"
+msgid "Test Payment Term"
+msgstr "Test de Forma de Pago"
+
 msgctxt "model:ir.ui.menu,name:menu_payment_terms_configuration"
 msgid "Payment Terms"
 msgstr "Formas de Pago"
@@ -1424,103 +1491,103 @@ msgctxt "selection:account.invoice.pay.ask,type:"
 msgid "Write-Off"
 msgstr "Anulado"
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line,type:"
+msgid "Fixed"
+msgstr "Fijo"
+
+msgctxt "selection:account.invoice.payment_term.line,type:"
+msgid "Percentage on Remainder"
+msgstr "Porcentaje del Resto"
+
+msgctxt "selection:account.invoice.payment_term.line,type:"
+msgid "Percentage on Total"
+msgstr "Porcentaje del Total"
+
+msgctxt "selection:account.invoice.payment_term.line,type:"
+msgid "Remainder"
+msgstr "Saldo"
+
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid ""
 msgstr ""
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "April"
 msgstr "Abril"
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "August"
-msgstr "Agosto"
+msgstr ""
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "December"
 msgstr "Diciembre"
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "February"
 msgstr "Febrero"
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "January"
 msgstr "Enero"
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "July"
 msgstr "Julio"
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "June"
 msgstr "Junio"
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "March"
 msgstr "Marzo"
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "May"
 msgstr "Mayo"
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "November"
 msgstr "Noviembre"
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "October"
-msgstr "Octubre"
+msgstr ""
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "September"
 msgstr "Septiembre"
 
-msgctxt "selection:account.invoice.payment_term.line,type:"
-msgid "Fixed"
-msgstr "Fijo"
-
-msgctxt "selection:account.invoice.payment_term.line,type:"
-msgid "Percentage on Remainder"
-msgstr "Porcentaje del Resto"
-
-msgctxt "selection:account.invoice.payment_term.line,type:"
-msgid "Percentage on Total"
-msgstr "Porcentaje del Total"
-
-msgctxt "selection:account.invoice.payment_term.line,type:"
-msgid "Remainder"
-msgstr "Saldo"
-
-msgctxt "selection:account.invoice.payment_term.line,weekday:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,weekday:"
 msgid ""
 msgstr ""
 
-msgctxt "selection:account.invoice.payment_term.line,weekday:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,weekday:"
 msgid "Friday"
 msgstr "Viernes"
 
-msgctxt "selection:account.invoice.payment_term.line,weekday:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,weekday:"
 msgid "Monday"
 msgstr "Lunes"
 
-msgctxt "selection:account.invoice.payment_term.line,weekday:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,weekday:"
 msgid "Saturday"
 msgstr "Sábado"
 
-msgctxt "selection:account.invoice.payment_term.line,weekday:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,weekday:"
 msgid "Sunday"
 msgstr "Domingo"
 
-msgctxt "selection:account.invoice.payment_term.line,weekday:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,weekday:"
 msgid "Thursday"
 msgstr "Jueves"
 
-msgctxt "selection:account.invoice.payment_term.line,weekday:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,weekday:"
 msgid "Tuesday"
 msgstr "Martes"
 
-msgctxt "selection:account.invoice.payment_term.line,weekday:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,weekday:"
 msgid "Wednesday"
 msgstr "Miércoles"
 
@@ -1564,13 +1631,25 @@ msgctxt "view:account.invoice.pay.start:"
 msgid "Pay Invoice"
 msgstr "Pagar Factura"
 
+msgctxt "view:account.invoice.payment_term.line.relativedelta:"
+msgid "Payment Term Line Relative Delta"
+msgstr "Delta Relativo en Forma de Pago"
+
+msgctxt "view:account.invoice.payment_term.line.relativedelta:"
+msgid "Payment Term Line Relative Deltas"
+msgstr "Deltas Relativos de Forma de Pago"
+
 msgctxt "view:account.invoice.payment_term.line:"
 msgid "Payment Term Line"
 msgstr "Línea de Forma de Pago"
 
-msgctxt "view:account.invoice.payment_term.line:"
-msgid "Payment Term Lines"
-msgstr "Líneas de Forma de Pago"
+msgctxt "view:account.invoice.payment_term.test.result:"
+msgid "Payment Term Test Results"
+msgstr "Resultados del Test de Forma de Pago"
+
+msgctxt "view:account.invoice.payment_term.test:"
+msgid "Payment Term Test"
+msgstr "Test de Forma de Pago"
 
 msgctxt "view:account.invoice.payment_term:"
 msgid "Payment Term"
@@ -1614,7 +1693,15 @@ msgstr "Tambien conocido como ProForma"
 
 msgctxt "view:account.invoice:"
 msgid "Are you sure to cancel the invoice?"
-msgstr "Esta seguro que desea cancelar la factura?"
+msgstr "Esta seguro que desea anular la factura?"
+
+msgctxt "view:account.invoice:"
+msgid "Cancel"
+msgstr "Anular"
+
+msgctxt "view:account.invoice:"
+msgid "Draft"
+msgstr "Borrador"
 
 msgctxt "view:account.invoice:"
 msgid "Invoice"
@@ -1633,12 +1720,16 @@ msgid "Payment"
 msgstr "Pago"
 
 msgctxt "view:account.invoice:"
+msgid "Post"
+msgstr "Contabilizar"
+
+msgctxt "view:account.invoice:"
 msgid "Validate"
 msgstr "Validar"
 
 msgctxt "view:account.invoice:"
 msgid "_Cancel"
-msgstr "_Cancelar"
+msgstr "_Anular"
 
 msgctxt "view:account.invoice:"
 msgid "_Draft"
@@ -1689,17 +1780,21 @@ msgid "Cancel"
 msgstr "Cancelar"
 
 msgctxt "wizard_button:account.invoice.pay,ask,pay:"
-msgid "Ok"
+msgid "OK"
 msgstr "Aceptar"
 
 msgctxt "wizard_button:account.invoice.pay,start,choice:"
-msgid "Ok"
+msgid "OK"
 msgstr "Aceptar"
 
 msgctxt "wizard_button:account.invoice.pay,start,end:"
 msgid "Cancel"
 msgstr "Cancelar"
 
+msgctxt "wizard_button:account.invoice.payment_term.test,test,end:"
+msgid "Close"
+msgstr "Cerrar"
+
 msgctxt "wizard_button:account.invoice.print,warning,end:"
 msgid "Cancel"
 msgstr "Cancelar"
diff --git a/locale/es_EC.po b/locale/es_EC.po
index 1b41a72..c9e93ee 100644
--- a/locale/es_EC.po
+++ b/locale/es_EC.po
@@ -14,7 +14,7 @@ msgid ""
 "already posted invoices in this fiscal year."
 msgstr ""
 "No puede cambiar la secuencia de factura en el año fiscal \"%s\" porque ya "
-"hay facturas confirmadas en este año fiscal."
+"hay facturas contabilizadas en este año fiscal."
 
 msgctxt "error:account.invoice.credit:"
 msgid "You can not credit with refund invoice \"%s\" because it has payments."
@@ -52,16 +52,6 @@ msgstr ""
 
 msgctxt "error:account.invoice.line:"
 msgid ""
-"You can not create invoice line \"%(line)s\" on invoice \"%(invoice)s of "
-"company \"%(invoice_line_company)s because account \"%(account)s has company"
-" \"%(account_company)s\"."
-msgstr ""
-"No puede crear la línea de factura \"%(line)s\" en la factura "
-"\"%(invoice)s\" de la empresa \"%(invoice_line_company)s\" porque la cuenta "
-"\"%(account)s\" tiene la empresa \"%(account_company)s\"."
-
-msgctxt "error:account.invoice.line:"
-msgid ""
 "You can not create invoice line \"%(line)s\" on invoice \"%(invoice)s\" "
 "because the invoice uses the same account (%(account)s)."
 msgstr ""
@@ -81,32 +71,28 @@ msgid ""
 "On invoice \"%s\" you can not create a partial payment with an amount "
 "greater than the amount to pay."
 msgstr ""
-"En la factura \"%s\" usted no puede crear un pago parcial con una cantidad "
-"mayor que la cantidad a pagar."
-
-msgctxt "error:account.invoice.payment_term.line:"
-msgid "Day of month must be between 1 and 31."
-msgstr "El día del mes debe estar ente 1 y 31."
+"No puede crear un pago parcial en la factura \"%s\" con un importe mayor al "
+"importe a pagar."
 
 msgctxt "error:account.invoice.payment_term.line:"
 msgid ""
 "Percentage and Divisor values are not consistent in line \"%(line)s\" of "
 "payment term \"%(term)s\"."
 msgstr ""
-"Porcentaje y Divisor no son consistentes en la línea \"%(line)s\" del plazo "
-"de pago \"%(term)s\"."
+"Porcentaje y Divisor no son consistentes en la línea \"%(line)s\" del "
+"término de pago \"%(term)s\"."
 
 msgctxt "error:account.invoice.payment_term:"
 msgid "Invalid line \"%(line)s\" in payment term \"%(term)s\"."
-msgstr "La línea \"%(line)s\" del plazo de pago \"%(term)s\" no es válida."
+msgstr "La línea \"%(line)s\" del término de pago \"%(term)s\" no es válida."
 
 msgctxt "error:account.invoice.payment_term:"
 msgid "Last line of payment term \"%s\" must be of type remainder."
-msgstr "La última línea del plazo de pago \"%s\" debe ser del tipo \"resto\"."
+msgstr "La última línea del término de pago \"%s\" debe ser de tipo remanente."
 
 msgctxt "error:account.invoice.payment_term:"
 msgid "Missing remainder line in payment term \"%s\"."
-msgstr "Falta la línea de resto en el plazo de pago \"%s\"."
+msgstr "Falta la línea de remanente en el término de pago \"%s\"."
 
 msgctxt "error:account.invoice.tax:"
 msgid ""
@@ -114,17 +100,7 @@ msgid ""
 "posted, paid or canceled."
 msgstr ""
 "No puede añadir la línea \"%(line)s\" a la factura \"%(invoice)s\" porque "
-"está confirmada, pagada o cancelada\""
-
-msgctxt "error:account.invoice.tax:"
-msgid ""
-"You can not create invoice \"%(invoice)s\" on company "
-"\"%(invoice_company)s\" using account \"%(account)s\" from company "
-"\"%(account_company)s\"."
-msgstr ""
-"No puede crear la factura \"%(invoice)s\" en la empresa "
-"\"%(invoice_company)s\" utilizando la cuenta \"%(account)s\" de la empresa "
-"\"%(account_company)s\"."
+"está contabilizada, pagada o cancelada\""
 
 msgctxt "error:account.invoice.tax:"
 msgid ""
@@ -151,14 +127,14 @@ msgid ""
 "You can not modify tax \"%(tax)s\" from invoice \"%(invoice)s\" because it "
 "is posted or paid."
 msgstr ""
-"No puede modificar los impuestos \"%(tax)s\" de la factura \"%(invoice)s\" "
+"No puede modificar el impuesto \"%(tax)s\" de la factura \"%(invoice)s\" "
 "porque está contabilizada o pagada."
 
 msgctxt "error:account.invoice:"
 msgid "Customer invoice/credit note \"%s\" can not be cancelled once posted."
 msgstr ""
-"No se puede cancelar la factura/nota crédito \"%s\" de cliente  una vez "
-"confirmada."
+"No se puede cancelar la factura/nota crédito \"%s\" de cliente  porque ya "
+"está contabilizada."
 
 msgctxt "error:account.invoice:"
 msgid ""
@@ -186,7 +162,7 @@ msgstr ""
 
 msgctxt "error:account.invoice:"
 msgid "Invoice \"%s\" must be cancelled before deletion."
-msgstr "La factura \"%s\" debe ser cancelada antes de ser eliminada."
+msgstr "Debe cancelar la factura \"%s\" antes de eliminarla."
 
 msgctxt "error:account.invoice:"
 msgid ""
@@ -201,24 +177,24 @@ msgid ""
 "The credit account on journal \"%(journal)s\" is the same as invoice "
 "\"%(invoice)s\"'s account."
 msgstr ""
-"La cuenta crédito en el libro diario \"%(journal)s\" es la misma que la "
-"cuenta de factura \"%(invoice)s\"."
+"La cuenta de crédito del libro diario \"%(journal)s\" tiene la misma cuenta "
+"de la factura \"%(invoice)s\"."
 
 msgctxt "error:account.invoice:"
 msgid "The credit account on journal %s\" is missing."
-msgstr "Falta la cuenta crédito del libro diario \"%s\"."
+msgstr "Falta la cuenta de crédito del libro diario \"%s\"."
 
 msgctxt "error:account.invoice:"
 msgid ""
 "The debit account on journal \"%(journal)s\" is the same as invoice "
 "\"%(invoice)s\"'s account."
 msgstr ""
-"La cuenta débito en el libro diario \"%(journal)s\" es la misma que la "
+"La cuenta de débito en el libro diario \"%(journal)s\" es la misma que la "
 "cuenta de la factura \"%(invoice)s\""
 
 msgctxt "error:account.invoice:"
 msgid "The debit account on journal \"%s\" is missing."
-msgstr "Falta la cuenta débito del libro diario \"%s\"."
+msgstr "Falta la cuenta de débito del libro diario \"%s\"."
 
 msgctxt "error:account.invoice:"
 msgid "The numbered invoice \"%s\" can not be deleted."
@@ -233,15 +209,6 @@ msgstr ""
 "período/año fiscal \"%(period)s\"."
 
 msgctxt "error:account.invoice:"
-msgid ""
-"You can not create invoice \"%(invoice)s\" on company \"%(invoice_company)s "
-"because account \"%(account)s has a different company (%(account_company)s.)"
-msgstr ""
-"No puede crear la factura \"%(invoice)s\" en la empresa "
-"\"%(invoice_company)\" porque la cuenta \"%(account)s\" tiene una empresa "
-"diferente (%(account_company)s.)"
-
-msgctxt "error:account.invoice:"
 msgid "You can not modify invoice \"%s\" because it is posted, paid or cancelled."
 msgstr ""
 "No puede modificar la factura \"%s\" porque está contabilizada, pagada o "
@@ -266,8 +233,8 @@ msgid ""
 "You can not change the invoice sequence in period \"%s\" because there is "
 "already an invoice posted in this period"
 msgstr ""
-"No puede cambiar la secuencia de factura en el período \"%s\" porque hay una"
-" factura confirmada en este período"
+"No puede cambiar la secuencia de factura en el período \"%s\" porque ya hay "
+"una factura contabilizada en este período"
 
 msgctxt "field:account.configuration,tax_rounding:"
 msgid "Tax Rounding"
@@ -443,7 +410,7 @@ msgstr "Líneas de Pago"
 
 msgctxt "field:account.invoice,payment_term:"
 msgid "Payment Term"
-msgstr "Plazo de Pago"
+msgstr "Término de Pago"
 
 msgctxt "field:account.invoice,rec_name:"
 msgid "Name"
@@ -603,7 +570,7 @@ msgstr "Producto"
 
 msgctxt "field:account.invoice.line,product_uom_category:"
 msgid "Product Uom Category"
-msgstr "Categoría UdM del Producto"
+msgstr "Categoría de UdM del Producto"
 
 msgctxt "field:account.invoice.line,quantity:"
 msgid "Quantity"
@@ -679,7 +646,7 @@ msgstr "Modificado por Usuario"
 
 msgctxt "field:account.invoice.pay.ask,amount:"
 msgid "Payment Amount"
-msgstr "Valor del Pago"
+msgstr "Importe del Pago"
 
 msgctxt "field:account.invoice.pay.ask,amount_writeoff:"
 msgid "Write-Off Amount"
@@ -821,14 +788,6 @@ msgctxt "field:account.invoice.payment_term.line,currency_digits:"
 msgid "Currency Digits"
 msgstr "Decimales de Moneda"
 
-msgctxt "field:account.invoice.payment_term.line,day:"
-msgid "Day of Month"
-msgstr "Día del Mes"
-
-msgctxt "field:account.invoice.payment_term.line,days:"
-msgid "Number of Days"
-msgstr "Cantidad de Días"
-
 msgctxt "field:account.invoice.payment_term.line,divisor:"
 msgid "Divisor"
 msgstr "Divisor"
@@ -837,17 +796,9 @@ msgctxt "field:account.invoice.payment_term.line,id:"
 msgid "ID"
 msgstr "ID"
 
-msgctxt "field:account.invoice.payment_term.line,month:"
-msgid "Month"
-msgstr "Mes"
-
-msgctxt "field:account.invoice.payment_term.line,months:"
-msgid "Number of Months"
-msgstr "Número de Meses"
-
 msgctxt "field:account.invoice.payment_term.line,payment:"
 msgid "Payment Term"
-msgstr "Plazo de Pago"
+msgstr "Término de Pago"
 
 msgctxt "field:account.invoice.payment_term.line,percentage:"
 msgid "Percentage"
@@ -857,6 +808,10 @@ msgctxt "field:account.invoice.payment_term.line,rec_name:"
 msgid "Name"
 msgstr "Nombre"
 
+msgctxt "field:account.invoice.payment_term.line,relativedeltas:"
+msgid "Deltas"
+msgstr "Incrementos"
+
 msgctxt "field:account.invoice.payment_term.line,sequence:"
 msgid "Sequence"
 msgstr "Secuencia"
@@ -865,22 +820,114 @@ msgctxt "field:account.invoice.payment_term.line,type:"
 msgid "Type"
 msgstr "Tipo"
 
-msgctxt "field:account.invoice.payment_term.line,weekday:"
+msgctxt "field:account.invoice.payment_term.line,write_date:"
+msgid "Write Date"
+msgstr "Fecha de Modificación"
+
+msgctxt "field:account.invoice.payment_term.line,write_uid:"
+msgid "Write User"
+msgstr "Modificado por Usuario"
+
+msgctxt "field:account.invoice.payment_term.line.relativedelta,create_date:"
+msgid "Create Date"
+msgstr "Fecha de Creación"
+
+msgctxt "field:account.invoice.payment_term.line.relativedelta,create_uid:"
+msgid "Create User"
+msgstr "Creado por Usuario"
+
+msgctxt "field:account.invoice.payment_term.line.relativedelta,day:"
+msgid "Day of Month"
+msgstr "Día del Mes"
+
+msgctxt "field:account.invoice.payment_term.line.relativedelta,days:"
+msgid "Number of Days"
+msgstr "Número de Días"
+
+msgctxt "field:account.invoice.payment_term.line.relativedelta,id:"
+msgid "ID"
+msgstr "ID"
+
+msgctxt "field:account.invoice.payment_term.line.relativedelta,line:"
+msgid "Payment Term Line"
+msgstr "Línea del Término de Pago"
+
+msgctxt "field:account.invoice.payment_term.line.relativedelta,month:"
+msgid "Month"
+msgstr "Mes"
+
+msgctxt "field:account.invoice.payment_term.line.relativedelta,months:"
+msgid "Number of Months"
+msgstr "Número de Meses"
+
+msgctxt "field:account.invoice.payment_term.line.relativedelta,rec_name:"
+msgid "Name"
+msgstr "Nombre"
+
+msgctxt "field:account.invoice.payment_term.line.relativedelta,sequence:"
+msgid "Sequence"
+msgstr "Secuencia"
+
+msgctxt "field:account.invoice.payment_term.line.relativedelta,weekday:"
 msgid "Day of Week"
 msgstr "Día de la Semana"
 
-msgctxt "field:account.invoice.payment_term.line,weeks:"
+msgctxt "field:account.invoice.payment_term.line.relativedelta,weeks:"
 msgid "Number of Weeks"
 msgstr "Número de Semanas"
 
-msgctxt "field:account.invoice.payment_term.line,write_date:"
+msgctxt "field:account.invoice.payment_term.line.relativedelta,write_date:"
 msgid "Write Date"
 msgstr "Fecha de Modificación"
 
-msgctxt "field:account.invoice.payment_term.line,write_uid:"
+msgctxt "field:account.invoice.payment_term.line.relativedelta,write_uid:"
 msgid "Write User"
 msgstr "Modificado por Usuario"
 
+msgctxt "field:account.invoice.payment_term.test,amount:"
+msgid "Amount"
+msgstr "Valor"
+
+msgctxt "field:account.invoice.payment_term.test,currency:"
+msgid "Currency"
+msgstr "Moneda"
+
+msgctxt "field:account.invoice.payment_term.test,currency_digits:"
+msgid "Currency Digits"
+msgstr "Decimales de Moneda"
+
+msgctxt "field:account.invoice.payment_term.test,date:"
+msgid "Date"
+msgstr "Fecha"
+
+msgctxt "field:account.invoice.payment_term.test,id:"
+msgid "ID"
+msgstr "ID"
+
+msgctxt "field:account.invoice.payment_term.test,payment_term:"
+msgid "Payment Term"
+msgstr "Término de Pago"
+
+msgctxt "field:account.invoice.payment_term.test,result:"
+msgid "Result"
+msgstr "Resultado"
+
+msgctxt "field:account.invoice.payment_term.test.result,amount:"
+msgid "Amount"
+msgstr "Valor"
+
+msgctxt "field:account.invoice.payment_term.test.result,currency_digits:"
+msgid "Currency Digits"
+msgstr "Decimales de Moneda"
+
+msgctxt "field:account.invoice.payment_term.test.result,date:"
+msgid "Date"
+msgstr "Fecha"
+
+msgctxt "field:account.invoice.payment_term.test.result,id:"
+msgid "ID"
+msgstr "ID"
+
 msgctxt "field:account.invoice.print.warning,id:"
 msgid "ID"
 msgstr "ID"
@@ -983,11 +1030,11 @@ msgstr "Factura"
 
 msgctxt "field:party.party,customer_payment_term:"
 msgid "Customer Payment Term"
-msgstr "Plazo de Pago del Cliente"
+msgstr "Término de Pago del Cliente"
 
 msgctxt "field:party.party,supplier_payment_term:"
 msgid "Supplier Payment Term"
-msgstr "Plazo de Pago a Proveedor"
+msgstr "Término de Pago al Proveedor"
 
 msgctxt "help:account.invoice.credit.start,with_refund:"
 msgid "If true, the current invoice(s) will be paid."
@@ -1031,11 +1078,23 @@ msgstr "Pagar Factura"
 
 msgctxt "model:account.invoice.payment_term,name:"
 msgid "Payment Term"
-msgstr "Plazo de Pago"
+msgstr "Término de Pago"
 
 msgctxt "model:account.invoice.payment_term.line,name:"
 msgid "Payment Term Line"
-msgstr "Línea de Plazo de Pago"
+msgstr "Línea del Término de Pago"
+
+msgctxt "model:account.invoice.payment_term.line.relativedelta,name:"
+msgid "Payment Term Line Relative Delta"
+msgstr "Incremento relativo de línea de término de pago"
+
+msgctxt "model:account.invoice.payment_term.test,name:"
+msgid "Test Payment Term"
+msgstr "Prueba de término de pago"
+
+msgctxt "model:account.invoice.payment_term.test.result,name:"
+msgid "Test Payment Term"
+msgstr "Prueba de término de pago"
 
 msgctxt "model:account.invoice.print.warning,name:"
 msgid "Print Invoice Report Warning"
@@ -1071,7 +1130,7 @@ msgstr "Facturas"
 
 msgctxt "model:ir.action,name:act_payment_term_form"
 msgid "Payment Terms"
-msgstr "Plazos de Pago"
+msgstr "Términos de Pago"
 
 msgctxt "model:ir.action,name:credit"
 msgid "Credit"
@@ -1089,6 +1148,10 @@ msgctxt "model:ir.action,name:wizard_pay"
 msgid "Pay Invoice"
 msgstr "Pagar Factura"
 
+msgctxt "model:ir.action,name:wizard_payment_term_test"
+msgid "Test Payment Term"
+msgstr "Prueba de término de pago"
+
 msgctxt ""
 "model:ir.action.act_window.domain,name:act_invoice_in_credit_note_domain_all"
 msgid "All"
@@ -1107,7 +1170,7 @@ msgstr "Contabilizado"
 msgctxt ""
 "model:ir.action.act_window.domain,name:act_invoice_in_credit_note_domain_validated"
 msgid "Validated"
-msgstr "Validado"
+msgstr "Validada"
 
 msgctxt ""
 "model:ir.action.act_window.domain,name:act_invoice_in_invoice_domain_all"
@@ -1127,7 +1190,7 @@ msgstr "Contabilizado"
 msgctxt ""
 "model:ir.action.act_window.domain,name:act_invoice_in_invoice_domain_validated"
 msgid "Validated"
-msgstr "Validado"
+msgstr "Validada"
 
 msgctxt ""
 "model:ir.action.act_window.domain,name:act_invoice_out_credit_note_domain_all"
@@ -1147,7 +1210,7 @@ msgstr "Contabilizado"
 msgctxt ""
 "model:ir.action.act_window.domain,name:act_invoice_out_credit_note_domain_validated"
 msgid "Validated"
-msgstr "Validado"
+msgstr "Validada"
 
 msgctxt ""
 "model:ir.action.act_window.domain,name:act_invoice_out_invoice_domain_all"
@@ -1167,7 +1230,7 @@ msgstr "Contabilizado"
 msgctxt ""
 "model:ir.action.act_window.domain,name:act_invoice_out_invoice_domain_validated"
 msgid "Validated"
-msgstr "Validado"
+msgstr "Validada"
 
 msgctxt "model:ir.sequence.type,name:sequence_type_account_invoice"
 msgid "Invoice"
@@ -1195,11 +1258,15 @@ msgstr "Facturas"
 
 msgctxt "model:ir.ui.menu,name:menu_payment_term_form"
 msgid "Payment Terms"
-msgstr "Plazos de Pago"
+msgstr "Términos de Pago"
+
+msgctxt "model:ir.ui.menu,name:menu_payment_term_test"
+msgid "Test Payment Term"
+msgstr "Prueba de término de pago"
 
 msgctxt "model:ir.ui.menu,name:menu_payment_terms_configuration"
 msgid "Payment Terms"
-msgstr "Plazos de Pago"
+msgstr "Términos de Pago"
 
 msgctxt "odt:account.invoice:"
 msgid ":"
@@ -1259,7 +1326,7 @@ msgstr "Factura N°:"
 
 msgctxt "odt:account.invoice:"
 msgid "Payment Term"
-msgstr "Plazo de Pago"
+msgstr "Término de Pago"
 
 msgctxt "odt:account.invoice:"
 msgid "Phone:"
@@ -1359,11 +1426,11 @@ msgstr "Pagada"
 
 msgctxt "selection:account.invoice,state:"
 msgid "Posted"
-msgstr "Contabilizado"
+msgstr "Contabilizada"
 
 msgctxt "selection:account.invoice,state:"
 msgid "Validated"
-msgstr "Validado"
+msgstr "Validada"
 
 msgctxt "selection:account.invoice,type:"
 msgid "Credit Note"
@@ -1425,103 +1492,103 @@ msgctxt "selection:account.invoice.pay.ask,type:"
 msgid "Write-Off"
 msgstr "Desajuste"
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line,type:"
+msgid "Fixed"
+msgstr "Fijo"
+
+msgctxt "selection:account.invoice.payment_term.line,type:"
+msgid "Percentage on Remainder"
+msgstr "Porcentaje sobre el remanente"
+
+msgctxt "selection:account.invoice.payment_term.line,type:"
+msgid "Percentage on Total"
+msgstr "Porcentaje del Total"
+
+msgctxt "selection:account.invoice.payment_term.line,type:"
+msgid "Remainder"
+msgstr "Remanente"
+
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid ""
 msgstr ""
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "April"
 msgstr "Abril"
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "August"
 msgstr "Agosto"
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "December"
 msgstr "Diciembre"
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "February"
 msgstr "Febrero"
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "January"
 msgstr "Enero"
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "July"
 msgstr "Julio"
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "June"
 msgstr "Junio"
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "March"
 msgstr "Marzo"
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "May"
 msgstr "Mayo"
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "November"
 msgstr "Noviembre"
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "October"
 msgstr "Octubre"
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "September"
 msgstr "Septiembre"
 
-msgctxt "selection:account.invoice.payment_term.line,type:"
-msgid "Fixed"
-msgstr "Fijo"
-
-msgctxt "selection:account.invoice.payment_term.line,type:"
-msgid "Percentage on Remainder"
-msgstr "Porcentaje del Resto"
-
-msgctxt "selection:account.invoice.payment_term.line,type:"
-msgid "Percentage on Total"
-msgstr "Porcentaje del Total"
-
-msgctxt "selection:account.invoice.payment_term.line,type:"
-msgid "Remainder"
-msgstr "Resto"
-
-msgctxt "selection:account.invoice.payment_term.line,weekday:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,weekday:"
 msgid ""
 msgstr ""
 
-msgctxt "selection:account.invoice.payment_term.line,weekday:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,weekday:"
 msgid "Friday"
 msgstr "Viernes"
 
-msgctxt "selection:account.invoice.payment_term.line,weekday:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,weekday:"
 msgid "Monday"
 msgstr "Lunes"
 
-msgctxt "selection:account.invoice.payment_term.line,weekday:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,weekday:"
 msgid "Saturday"
 msgstr "Sábado"
 
-msgctxt "selection:account.invoice.payment_term.line,weekday:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,weekday:"
 msgid "Sunday"
 msgstr "Domingo"
 
-msgctxt "selection:account.invoice.payment_term.line,weekday:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,weekday:"
 msgid "Thursday"
 msgstr "Jueves"
 
-msgctxt "selection:account.invoice.payment_term.line,weekday:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,weekday:"
 msgid "Tuesday"
 msgstr "Martes"
 
-msgctxt "selection:account.invoice.payment_term.line,weekday:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,weekday:"
 msgid "Wednesday"
 msgstr "Miércoles"
 
@@ -1565,21 +1632,33 @@ msgctxt "view:account.invoice.pay.start:"
 msgid "Pay Invoice"
 msgstr "Pagar Factura"
 
+msgctxt "view:account.invoice.payment_term.line.relativedelta:"
+msgid "Payment Term Line Relative Delta"
+msgstr "Incremento relativo de línea de término de pago"
+
+msgctxt "view:account.invoice.payment_term.line.relativedelta:"
+msgid "Payment Term Line Relative Deltas"
+msgstr "Incrementos relativos de línea de término de pago"
+
 msgctxt "view:account.invoice.payment_term.line:"
 msgid "Payment Term Line"
-msgstr "Línea del Plazo de Pago"
+msgstr "Línea del Término de Pago"
 
-msgctxt "view:account.invoice.payment_term.line:"
-msgid "Payment Term Lines"
-msgstr "Líneas del Plazo de Pago"
+msgctxt "view:account.invoice.payment_term.test.result:"
+msgid "Payment Term Test Results"
+msgstr "Resultados de la prueba de término de pago"
+
+msgctxt "view:account.invoice.payment_term.test:"
+msgid "Payment Term Test"
+msgstr "Prueba de término de pago"
 
 msgctxt "view:account.invoice.payment_term:"
 msgid "Payment Term"
-msgstr "Plazo de Pago"
+msgstr "Término de Pago"
 
 msgctxt "view:account.invoice.payment_term:"
 msgid "Payment Terms"
-msgstr "Plazos de Pago"
+msgstr "Términos de Pago"
 
 msgctxt "view:account.invoice.print.warning:"
 msgid "Print Invoice"
@@ -1618,6 +1697,14 @@ msgid "Are you sure to cancel the invoice?"
 msgstr "¿Está seguro que desea cancelar la factura?"
 
 msgctxt "view:account.invoice:"
+msgid "Cancel"
+msgstr "Cancelar"
+
+msgctxt "view:account.invoice:"
+msgid "Draft"
+msgstr "Borrador"
+
+msgctxt "view:account.invoice:"
 msgid "Invoice"
 msgstr "Factura"
 
@@ -1634,6 +1721,10 @@ msgid "Payment"
 msgstr "Pago"
 
 msgctxt "view:account.invoice:"
+msgid "Post"
+msgstr "Contabilizar"
+
+msgctxt "view:account.invoice:"
 msgid "Validate"
 msgstr "Validar"
 
@@ -1675,7 +1766,7 @@ msgstr "Líneas de Pago"
 
 msgctxt "view:party.party:"
 msgid "Payment Terms"
-msgstr "Plazos de Pago"
+msgstr "Términos de Pago"
 
 msgctxt "wizard_button:account.invoice.credit,start,credit:"
 msgid "Credit"
@@ -1690,17 +1781,21 @@ msgid "Cancel"
 msgstr "Cancelar"
 
 msgctxt "wizard_button:account.invoice.pay,ask,pay:"
-msgid "Ok"
+msgid "OK"
 msgstr "Aceptar"
 
 msgctxt "wizard_button:account.invoice.pay,start,choice:"
-msgid "Ok"
+msgid "OK"
 msgstr "Aceptar"
 
 msgctxt "wizard_button:account.invoice.pay,start,end:"
 msgid "Cancel"
 msgstr "Cancelar"
 
+msgctxt "wizard_button:account.invoice.payment_term.test,test,end:"
+msgid "Close"
+msgstr "Cerrar"
+
 msgctxt "wizard_button:account.invoice.print,warning,end:"
 msgid "Cancel"
 msgstr "Cancelar"
diff --git a/locale/es_ES.po b/locale/es_ES.po
index 59cbdef..4f1aac8 100644
--- a/locale/es_ES.po
+++ b/locale/es_ES.po
@@ -14,7 +14,7 @@ msgid ""
 "already posted invoices in this fiscal year."
 msgstr ""
 "No puede cambiar la secuencia de factura en el ejercicio fiscal \"%s\" "
-"porque ya hay facturas confirmadas en este ejercicio fiscal."
+"porque ya hay facturas contabilizadas en este ejercicio fiscal."
 
 msgctxt "error:account.invoice.credit:"
 msgid "You can not credit with refund invoice \"%s\" because it has payments."
@@ -30,7 +30,7 @@ msgstr ""
 
 msgctxt "error:account.invoice.credit:"
 msgid "You can not credit with refund invoice \"%s\" because it is not posted."
-msgstr "No puede abonar de la factura \"%s\" porque no está confirmada."
+msgstr "No puede abonar de la factura \"%s\" porque no está contabilizada."
 
 msgctxt "error:account.invoice.line:"
 msgid "Line with \"line\" type must have an account."
@@ -46,17 +46,7 @@ msgid ""
 "cancelled."
 msgstr ""
 "No puede añadir una línea a la factura \"%(invoice)s\" porque está "
-"confirmada, pagada o cancelada."
-
-msgctxt "error:account.invoice.line:"
-msgid ""
-"You can not create invoice line \"%(line)s\" on invoice \"%(invoice)s of "
-"company \"%(invoice_line_company)s because account \"%(account)s has company"
-" \"%(account_company)s\"."
-msgstr ""
-"No puede crear la línea de factura \"%(line)s\" en la factura "
-"\"%(invoice)s\" de la empresa \"%(invoice_line_company)s\" porque la cuenta "
-"\"%(account)s\" tiene la empresa \"%(account_company)s\"."
+"contabilizada, pagada o cancelada."
 
 msgctxt "error:account.invoice.line:"
 msgid ""
@@ -72,7 +62,7 @@ msgid ""
 "posted or paid."
 msgstr ""
 "No puede modificar la línea \"%(line)s\" de la factura \"%(invoice)s\", "
-"porque está confirmada o pagada."
+"porque está contabilizada o pagada."
 
 msgctxt "error:account.invoice.pay:"
 msgid ""
@@ -83,10 +73,6 @@ msgstr ""
 "importe a pagar."
 
 msgctxt "error:account.invoice.payment_term.line:"
-msgid "Day of month must be between 1 and 31."
-msgstr "El día del mes debe estar entre 1 y 31."
-
-msgctxt "error:account.invoice.payment_term.line:"
 msgid ""
 "Percentage and Divisor values are not consistent in line \"%(line)s\" of "
 "payment term \"%(term)s\"."
@@ -112,17 +98,7 @@ msgid ""
 "posted, paid or canceled."
 msgstr ""
 "No puede añadir la línea \"%(line)s\" a la factura \"%(invoice)s\" porque "
-"está confirmada, pagada o cancelada."
-
-msgctxt "error:account.invoice.tax:"
-msgid ""
-"You can not create invoice \"%(invoice)s\" on company "
-"\"%(invoice_company)s\" using account \"%(account)s\" from company "
-"\"%(account_company)s\"."
-msgstr ""
-"No puede crear la factura \"%(invoice)s\" en la empresa "
-"\"%(invoice_company)s\" utilizando la cuenta \"%(account)s\" de la empresa "
-"\"%(account_company)s\"."
+"está contabilizada, pagada o cancelada."
 
 msgctxt "error:account.invoice.tax:"
 msgid ""
@@ -150,11 +126,13 @@ msgid ""
 "is posted or paid."
 msgstr ""
 "No puede modificar el impuesto \"%(tax)s\" de la factura \"%(invoice)s\" "
-"porque está confirmada o pagada."
+"porque está contabilizada o pagada."
 
 msgctxt "error:account.invoice:"
 msgid "Customer invoice/credit note \"%s\" can not be cancelled once posted."
-msgstr "No se puede cancelar la factura  \"%s\" porque ya está confirmada."
+msgstr ""
+"No se puede cancelar la factura o abono  \"%s\" porque ya está "
+"contabilizada."
 
 msgctxt "error:account.invoice:"
 msgid ""
@@ -218,7 +196,7 @@ msgstr "Falta la cuenta debe del diario \"%s\"."
 
 msgctxt "error:account.invoice:"
 msgid "The numbered invoice \"%s\" can not be deleted."
-msgstr "No se puede borrar la factura numerada \"%s\"."
+msgstr "No se puede eliminar la factura numerada \"%s\"."
 
 msgctxt "error:account.invoice:"
 msgid ""
@@ -229,18 +207,9 @@ msgstr ""
 "período/ejercicio fiscal \"%(period)s\"."
 
 msgctxt "error:account.invoice:"
-msgid ""
-"You can not create invoice \"%(invoice)s\" on company \"%(invoice_company)s "
-"because account \"%(account)s has a different company (%(account_company)s.)"
-msgstr ""
-"No puede crear la factura \"%(Invoice)s\" en la empresa "
-"\"%(invoice_company)s\" porque la cuenta \"%(account)s\" tiene una empresa "
-"(%(account_company)s) diferente."
-
-msgctxt "error:account.invoice:"
 msgid "You can not modify invoice \"%s\" because it is posted, paid or cancelled."
 msgstr ""
-"No puede modificar la factura \"%s\" porque está confirmada, pagada o "
+"No puede modificar la factura \"%s\" porque está contabilizada, pagada o "
 "cancelada."
 
 msgctxt "error:account.period:"
@@ -263,7 +232,7 @@ msgid ""
 "already an invoice posted in this period"
 msgstr ""
 "No puede cambiar la secuencia de facturas en el período \"%s\" porque ya hay"
-" facturas confirmadas en este período."
+" facturas contabilizadas en este período."
 
 msgctxt "field:account.configuration,tax_rounding:"
 msgid "Tax Rounding"
@@ -691,11 +660,11 @@ msgstr "Moneda de pago"
 
 msgctxt "field:account.invoice.pay.ask,currency_digits:"
 msgid "Payment Currency Digits"
-msgstr "Decimales moneda de pago"
+msgstr "Decimales de la moneda de pago"
 
 msgctxt "field:account.invoice.pay.ask,currency_digits_writeoff:"
 msgid "Write-Off Currency Digits"
-msgstr "Decimales moneda del desajuste"
+msgstr "Decimales de la moneda del desajuste"
 
 msgctxt "field:account.invoice.pay.ask,currency_writeoff:"
 msgid "Write-Off Currency"
@@ -817,14 +786,6 @@ msgctxt "field:account.invoice.payment_term.line,currency_digits:"
 msgid "Currency Digits"
 msgstr "Decimales de la moneda"
 
-msgctxt "field:account.invoice.payment_term.line,day:"
-msgid "Day of Month"
-msgstr "Día del mes"
-
-msgctxt "field:account.invoice.payment_term.line,days:"
-msgid "Number of Days"
-msgstr "Número de días"
-
 msgctxt "field:account.invoice.payment_term.line,divisor:"
 msgid "Divisor"
 msgstr "Divisor"
@@ -833,14 +794,6 @@ msgctxt "field:account.invoice.payment_term.line,id:"
 msgid "ID"
 msgstr "ID"
 
-msgctxt "field:account.invoice.payment_term.line,month:"
-msgid "Month"
-msgstr "Mes"
-
-msgctxt "field:account.invoice.payment_term.line,months:"
-msgid "Number of Months"
-msgstr "Número de meses"
-
 msgctxt "field:account.invoice.payment_term.line,payment:"
 msgid "Payment Term"
 msgstr "Plazo de pago"
@@ -853,6 +806,10 @@ msgctxt "field:account.invoice.payment_term.line,rec_name:"
 msgid "Name"
 msgstr "Nombre"
 
+msgctxt "field:account.invoice.payment_term.line,relativedeltas:"
+msgid "Deltas"
+msgstr "Incrementos"
+
 msgctxt "field:account.invoice.payment_term.line,sequence:"
 msgid "Sequence"
 msgstr "Secuencia"
@@ -861,22 +818,114 @@ msgctxt "field:account.invoice.payment_term.line,type:"
 msgid "Type"
 msgstr "Tipo"
 
-msgctxt "field:account.invoice.payment_term.line,weekday:"
+msgctxt "field:account.invoice.payment_term.line,write_date:"
+msgid "Write Date"
+msgstr "Fecha modificación"
+
+msgctxt "field:account.invoice.payment_term.line,write_uid:"
+msgid "Write User"
+msgstr "Usuario modificación"
+
+msgctxt "field:account.invoice.payment_term.line.relativedelta,create_date:"
+msgid "Create Date"
+msgstr "Fecha creación"
+
+msgctxt "field:account.invoice.payment_term.line.relativedelta,create_uid:"
+msgid "Create User"
+msgstr "Usuario creación"
+
+msgctxt "field:account.invoice.payment_term.line.relativedelta,day:"
+msgid "Day of Month"
+msgstr "Día del mes"
+
+msgctxt "field:account.invoice.payment_term.line.relativedelta,days:"
+msgid "Number of Days"
+msgstr "Número de días"
+
+msgctxt "field:account.invoice.payment_term.line.relativedelta,id:"
+msgid "ID"
+msgstr "ID"
+
+msgctxt "field:account.invoice.payment_term.line.relativedelta,line:"
+msgid "Payment Term Line"
+msgstr "Línea del plazo de pago"
+
+msgctxt "field:account.invoice.payment_term.line.relativedelta,month:"
+msgid "Month"
+msgstr "Mes"
+
+msgctxt "field:account.invoice.payment_term.line.relativedelta,months:"
+msgid "Number of Months"
+msgstr "Número de meses"
+
+msgctxt "field:account.invoice.payment_term.line.relativedelta,rec_name:"
+msgid "Name"
+msgstr "Nombre"
+
+msgctxt "field:account.invoice.payment_term.line.relativedelta,sequence:"
+msgid "Sequence"
+msgstr "Secuencia"
+
+msgctxt "field:account.invoice.payment_term.line.relativedelta,weekday:"
 msgid "Day of Week"
 msgstr "Día de la semana"
 
-msgctxt "field:account.invoice.payment_term.line,weeks:"
+msgctxt "field:account.invoice.payment_term.line.relativedelta,weeks:"
 msgid "Number of Weeks"
 msgstr "Número de semanas"
 
-msgctxt "field:account.invoice.payment_term.line,write_date:"
+msgctxt "field:account.invoice.payment_term.line.relativedelta,write_date:"
 msgid "Write Date"
 msgstr "Fecha modificación"
 
-msgctxt "field:account.invoice.payment_term.line,write_uid:"
+msgctxt "field:account.invoice.payment_term.line.relativedelta,write_uid:"
 msgid "Write User"
 msgstr "Usuario modificación"
 
+msgctxt "field:account.invoice.payment_term.test,amount:"
+msgid "Amount"
+msgstr "Importe"
+
+msgctxt "field:account.invoice.payment_term.test,currency:"
+msgid "Currency"
+msgstr "Moneda"
+
+msgctxt "field:account.invoice.payment_term.test,currency_digits:"
+msgid "Currency Digits"
+msgstr "Decimales de la moneda"
+
+msgctxt "field:account.invoice.payment_term.test,date:"
+msgid "Date"
+msgstr "Fecha"
+
+msgctxt "field:account.invoice.payment_term.test,id:"
+msgid "ID"
+msgstr "ID"
+
+msgctxt "field:account.invoice.payment_term.test,payment_term:"
+msgid "Payment Term"
+msgstr "Plazo de pago"
+
+msgctxt "field:account.invoice.payment_term.test,result:"
+msgid "Result"
+msgstr "Resultado"
+
+msgctxt "field:account.invoice.payment_term.test.result,amount:"
+msgid "Amount"
+msgstr "Importe"
+
+msgctxt "field:account.invoice.payment_term.test.result,currency_digits:"
+msgid "Currency Digits"
+msgstr "Decimales de la moneda"
+
+msgctxt "field:account.invoice.payment_term.test.result,date:"
+msgid "Date"
+msgstr "Fecha"
+
+msgctxt "field:account.invoice.payment_term.test.result,id:"
+msgid "ID"
+msgstr "ID"
+
 msgctxt "field:account.invoice.print.warning,id:"
 msgid "ID"
 msgstr "ID"
@@ -1033,6 +1082,18 @@ msgctxt "model:account.invoice.payment_term.line,name:"
 msgid "Payment Term Line"
 msgstr "Línea del plazo de pago"
 
+msgctxt "model:account.invoice.payment_term.line.relativedelta,name:"
+msgid "Payment Term Line Relative Delta"
+msgstr "Incremento relativo línea de plazo de pago"
+
+msgctxt "model:account.invoice.payment_term.test,name:"
+msgid "Test Payment Term"
+msgstr "Probar plazo de pago"
+
+msgctxt "model:account.invoice.payment_term.test.result,name:"
+msgid "Test Payment Term"
+msgstr "Probar plazo de pago"
+
 msgctxt "model:account.invoice.print.warning,name:"
 msgid "Print Invoice Report Warning"
 msgstr "Aviso al imprimir la factura"
@@ -1085,6 +1146,10 @@ msgctxt "model:ir.action,name:wizard_pay"
 msgid "Pay Invoice"
 msgstr "Pagar factura"
 
+msgctxt "model:ir.action,name:wizard_payment_term_test"
+msgid "Test Payment Term"
+msgstr "Probar plazo de pago"
+
 msgctxt ""
 "model:ir.action.act_window.domain,name:act_invoice_in_credit_note_domain_all"
 msgid "All"
@@ -1098,7 +1163,7 @@ msgstr "Borrador"
 msgctxt ""
 "model:ir.action.act_window.domain,name:act_invoice_in_credit_note_domain_posted"
 msgid "Posted"
-msgstr "Confirmada"
+msgstr "Contabilizada"
 
 msgctxt ""
 "model:ir.action.act_window.domain,name:act_invoice_in_credit_note_domain_validated"
@@ -1118,7 +1183,7 @@ msgstr "Borrador"
 msgctxt ""
 "model:ir.action.act_window.domain,name:act_invoice_in_invoice_domain_posted"
 msgid "Posted"
-msgstr "Confirmada"
+msgstr "Contabilizada"
 
 msgctxt ""
 "model:ir.action.act_window.domain,name:act_invoice_in_invoice_domain_validated"
@@ -1138,7 +1203,7 @@ msgstr "Borrador"
 msgctxt ""
 "model:ir.action.act_window.domain,name:act_invoice_out_credit_note_domain_posted"
 msgid "Posted"
-msgstr "Confirmada"
+msgstr "Contabilizada"
 
 msgctxt ""
 "model:ir.action.act_window.domain,name:act_invoice_out_credit_note_domain_validated"
@@ -1158,7 +1223,7 @@ msgstr "Borrador"
 msgctxt ""
 "model:ir.action.act_window.domain,name:act_invoice_out_invoice_domain_posted"
 msgid "Posted"
-msgstr "Confirmada"
+msgstr "Contabilizada"
 
 msgctxt ""
 "model:ir.action.act_window.domain,name:act_invoice_out_invoice_domain_validated"
@@ -1193,6 +1258,10 @@ msgctxt "model:ir.ui.menu,name:menu_payment_term_form"
 msgid "Payment Terms"
 msgstr "Plazos de pago"
 
+msgctxt "model:ir.ui.menu,name:menu_payment_term_test"
+msgid "Test Payment Term"
+msgstr "Probar plazo de pago"
+
 msgctxt "model:ir.ui.menu,name:menu_payment_terms_configuration"
 msgid "Payment Terms"
 msgstr "Plazos de pago"
@@ -1355,7 +1424,7 @@ msgstr "Pagada"
 
 msgctxt "selection:account.invoice,state:"
 msgid "Posted"
-msgstr "Confirmada"
+msgstr "Contabilizada"
 
 msgctxt "selection:account.invoice,state:"
 msgid "Validated"
@@ -1421,103 +1490,103 @@ msgctxt "selection:account.invoice.pay.ask,type:"
 msgid "Write-Off"
 msgstr "Desajuste"
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line,type:"
+msgid "Fixed"
+msgstr "Fijo"
+
+msgctxt "selection:account.invoice.payment_term.line,type:"
+msgid "Percentage on Remainder"
+msgstr "Porcentaje sobre el remanente"
+
+msgctxt "selection:account.invoice.payment_term.line,type:"
+msgid "Percentage on Total"
+msgstr "Porcentaje sobre total"
+
+msgctxt "selection:account.invoice.payment_term.line,type:"
+msgid "Remainder"
+msgstr "Remanente"
+
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid ""
 msgstr ""
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "April"
 msgstr "Abril"
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "August"
 msgstr "Agosto"
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "December"
 msgstr "Diciembre"
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "February"
 msgstr "Febrero"
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "January"
 msgstr "Enero"
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "July"
 msgstr "Julio"
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "June"
 msgstr "Junio"
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "March"
 msgstr "Marzo"
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "May"
 msgstr "Mayo"
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "November"
 msgstr "Noviembre"
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "October"
 msgstr "Octubre"
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "September"
 msgstr "Septiembre"
 
-msgctxt "selection:account.invoice.payment_term.line,type:"
-msgid "Fixed"
-msgstr "Fijo"
-
-msgctxt "selection:account.invoice.payment_term.line,type:"
-msgid "Percentage on Remainder"
-msgstr "Porcentaje sobre el remanente"
-
-msgctxt "selection:account.invoice.payment_term.line,type:"
-msgid "Percentage on Total"
-msgstr "Porcentaje sobre total"
-
-msgctxt "selection:account.invoice.payment_term.line,type:"
-msgid "Remainder"
-msgstr "Remanente"
-
-msgctxt "selection:account.invoice.payment_term.line,weekday:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,weekday:"
 msgid ""
 msgstr ""
 
-msgctxt "selection:account.invoice.payment_term.line,weekday:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,weekday:"
 msgid "Friday"
 msgstr "Viernes"
 
-msgctxt "selection:account.invoice.payment_term.line,weekday:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,weekday:"
 msgid "Monday"
 msgstr "Lunes"
 
-msgctxt "selection:account.invoice.payment_term.line,weekday:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,weekday:"
 msgid "Saturday"
 msgstr "Sábado"
 
-msgctxt "selection:account.invoice.payment_term.line,weekday:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,weekday:"
 msgid "Sunday"
 msgstr "Domingo"
 
-msgctxt "selection:account.invoice.payment_term.line,weekday:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,weekday:"
 msgid "Thursday"
 msgstr "Jueves"
 
-msgctxt "selection:account.invoice.payment_term.line,weekday:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,weekday:"
 msgid "Tuesday"
 msgstr "Martes"
 
-msgctxt "selection:account.invoice.payment_term.line,weekday:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,weekday:"
 msgid "Wednesday"
 msgstr "Miércoles"
 
@@ -1561,13 +1630,25 @@ msgctxt "view:account.invoice.pay.start:"
 msgid "Pay Invoice"
 msgstr "Pagar factura"
 
+msgctxt "view:account.invoice.payment_term.line.relativedelta:"
+msgid "Payment Term Line Relative Delta"
+msgstr "Incremento relativo línea de plazo de pago"
+
+msgctxt "view:account.invoice.payment_term.line.relativedelta:"
+msgid "Payment Term Line Relative Deltas"
+msgstr "Incrementos relativos línea de plazo de pago"
+
 msgctxt "view:account.invoice.payment_term.line:"
 msgid "Payment Term Line"
 msgstr "Línea del plazo de pago"
 
-msgctxt "view:account.invoice.payment_term.line:"
-msgid "Payment Term Lines"
-msgstr "Líneas del plazo de pago"
+msgctxt "view:account.invoice.payment_term.test.result:"
+msgid "Payment Term Test Results"
+msgstr "Resultados de la prueba de plazo de pago"
+
+msgctxt "view:account.invoice.payment_term.test:"
+msgid "Payment Term Test"
+msgstr "Prueba plazo de pago"
 
 msgctxt "view:account.invoice.payment_term:"
 msgid "Payment Term"
@@ -1614,6 +1695,14 @@ msgid "Are you sure to cancel the invoice?"
 msgstr "¿Está seguro de cancelar la factura?"
 
 msgctxt "view:account.invoice:"
+msgid "Cancel"
+msgstr "Cancelar"
+
+msgctxt "view:account.invoice:"
+msgid "Draft"
+msgstr "Borrador"
+
+msgctxt "view:account.invoice:"
 msgid "Invoice"
 msgstr "Factura"
 
@@ -1630,6 +1719,10 @@ msgid "Payment"
 msgstr "Pago"
 
 msgctxt "view:account.invoice:"
+msgid "Post"
+msgstr "Contabilizar"
+
+msgctxt "view:account.invoice:"
 msgid "Validate"
 msgstr "Validar"
 
@@ -1647,7 +1740,7 @@ msgstr "_Pagar"
 
 msgctxt "view:account.invoice:"
 msgid "_Post"
-msgstr "Co_nfirmar"
+msgstr "Co_ntabilizar"
 
 msgctxt "view:account.move.line:"
 msgid "Amount Second Currency"
@@ -1686,17 +1779,21 @@ msgid "Cancel"
 msgstr "Cancelar"
 
 msgctxt "wizard_button:account.invoice.pay,ask,pay:"
-msgid "Ok"
+msgid "OK"
 msgstr "Aceptar"
 
 msgctxt "wizard_button:account.invoice.pay,start,choice:"
-msgid "Ok"
+msgid "OK"
 msgstr "Aceptar"
 
 msgctxt "wizard_button:account.invoice.pay,start,end:"
 msgid "Cancel"
 msgstr "Cancelar"
 
+msgctxt "wizard_button:account.invoice.payment_term.test,test,end:"
+msgid "Close"
+msgstr "Cerrar"
+
 msgctxt "wizard_button:account.invoice.print,warning,end:"
 msgid "Cancel"
 msgstr "Cancelar"
diff --git a/locale/fr_FR.po b/locale/fr_FR.po
index 4f247d1..7c40fca 100644
--- a/locale/fr_FR.po
+++ b/locale/fr_FR.po
@@ -55,16 +55,6 @@ msgstr ""
 
 msgctxt "error:account.invoice.line:"
 msgid ""
-"You can not create invoice line \"%(line)s\" on invoice \"%(invoice)s of "
-"company \"%(invoice_line_company)s because account \"%(account)s has company"
-" \"%(account_company)s\"."
-msgstr ""
-"Vous ne pouvez créer la ligne de facture « %(line)s » sur la facture « "
-"%(invoice)s » de la société « %(invoice_line_company)s » car le compte « "
-"%(account)s » a comme société: « %(account_company)s »."
-
-msgctxt "error:account.invoice.line:"
-msgid ""
 "You can not create invoice line \"%(line)s\" on invoice \"%(invoice)s\" "
 "because the invoice uses the same account (%(account)s)."
 msgstr ""
@@ -88,10 +78,6 @@ msgstr ""
 " montant qu'il reste à payer."
 
 msgctxt "error:account.invoice.payment_term.line:"
-msgid "Day of month must be between 1 and 31."
-msgstr "Le jour du mois doit être entre 1 et 31"
-
-msgctxt "error:account.invoice.payment_term.line:"
 msgid ""
 "Percentage and Divisor values are not consistent in line \"%(line)s\" of "
 "payment term \"%(term)s\"."
@@ -127,16 +113,6 @@ msgstr ""
 msgctxt "error:account.invoice.tax:"
 msgid ""
 "You can not create invoice \"%(invoice)s\" on company "
-"\"%(invoice_company)s\" using account \"%(account)s\" from company "
-"\"%(account_company)s\"."
-msgstr ""
-"Vous ne pouvez créer la facture « %(invoice)s » pour la société « "
-"%(invoice_company)s » avec le compte « %(account)s » de la société « "
-"%(account_company)s »."
-
-msgctxt "error:account.invoice.tax:"
-msgid ""
-"You can not create invoice \"%(invoice)s\" on company "
 "\"%(invoice_company)s\" using base tax code \"%(base_code)s\" from company "
 "\"%(base_code_company)s\"."
 msgstr ""
@@ -241,15 +217,6 @@ msgstr ""
 "période/année fiscale « %(period)s »."
 
 msgctxt "error:account.invoice:"
-msgid ""
-"You can not create invoice \"%(invoice)s\" on company \"%(invoice_company)s "
-"because account \"%(account)s has a different company (%(account_company)s.)"
-msgstr ""
-"Vous ne pouvez créer la facture « %(invoice)s » pour la société « "
-"%(invoice_company)s » car le compte « %(account)s » a une société différente"
-" (%(account_company)s)."
-
-msgctxt "error:account.invoice:"
 msgid "You can not modify invoice \"%s\" because it is posted, paid or cancelled."
 msgstr ""
 "Vous ne pouvez modifier la facture « %s » car elle est postée, payée ou "
@@ -828,14 +795,6 @@ msgctxt "field:account.invoice.payment_term.line,currency_digits:"
 msgid "Currency Digits"
 msgstr "Décimales de la devise"
 
-msgctxt "field:account.invoice.payment_term.line,day:"
-msgid "Day of Month"
-msgstr "Jour du mois"
-
-msgctxt "field:account.invoice.payment_term.line,days:"
-msgid "Number of Days"
-msgstr "Nombre de jours"
-
 msgctxt "field:account.invoice.payment_term.line,divisor:"
 msgid "Divisor"
 msgstr "Diviseur"
@@ -844,14 +803,6 @@ msgctxt "field:account.invoice.payment_term.line,id:"
 msgid "ID"
 msgstr "ID"
 
-msgctxt "field:account.invoice.payment_term.line,month:"
-msgid "Month"
-msgstr "Mois"
-
-msgctxt "field:account.invoice.payment_term.line,months:"
-msgid "Number of Months"
-msgstr "Nombre de mois"
-
 msgctxt "field:account.invoice.payment_term.line,payment:"
 msgid "Payment Term"
 msgstr "Condition de paiement"
@@ -864,6 +815,10 @@ msgctxt "field:account.invoice.payment_term.line,rec_name:"
 msgid "Name"
 msgstr "Nom"
 
+msgctxt "field:account.invoice.payment_term.line,relativedeltas:"
+msgid "Deltas"
+msgstr "Deltas"
+
 msgctxt "field:account.invoice.payment_term.line,sequence:"
 msgid "Sequence"
 msgstr "Séquence"
@@ -872,22 +827,114 @@ msgctxt "field:account.invoice.payment_term.line,type:"
 msgid "Type"
 msgstr "Type"
 
-msgctxt "field:account.invoice.payment_term.line,weekday:"
+msgctxt "field:account.invoice.payment_term.line,write_date:"
+msgid "Write Date"
+msgstr "Date de mise à jour"
+
+msgctxt "field:account.invoice.payment_term.line,write_uid:"
+msgid "Write User"
+msgstr "Mis à jour par"
+
+msgctxt "field:account.invoice.payment_term.line.relativedelta,create_date:"
+msgid "Create Date"
+msgstr "Date de création"
+
+msgctxt "field:account.invoice.payment_term.line.relativedelta,create_uid:"
+msgid "Create User"
+msgstr "Créé par"
+
+msgctxt "field:account.invoice.payment_term.line.relativedelta,day:"
+msgid "Day of Month"
+msgstr "Jour du mois"
+
+msgctxt "field:account.invoice.payment_term.line.relativedelta,days:"
+msgid "Number of Days"
+msgstr "Nombre de jours"
+
+msgctxt "field:account.invoice.payment_term.line.relativedelta,id:"
+msgid "ID"
+msgstr "ID"
+
+msgctxt "field:account.invoice.payment_term.line.relativedelta,line:"
+msgid "Payment Term Line"
+msgstr "Ligne de condition de paiement"
+
+msgctxt "field:account.invoice.payment_term.line.relativedelta,month:"
+msgid "Month"
+msgstr "Mois"
+
+msgctxt "field:account.invoice.payment_term.line.relativedelta,months:"
+msgid "Number of Months"
+msgstr "Nombre de mois"
+
+msgctxt "field:account.invoice.payment_term.line.relativedelta,rec_name:"
+msgid "Name"
+msgstr "Nom"
+
+msgctxt "field:account.invoice.payment_term.line.relativedelta,sequence:"
+msgid "Sequence"
+msgstr "Séquence"
+
+msgctxt "field:account.invoice.payment_term.line.relativedelta,weekday:"
 msgid "Day of Week"
 msgstr "Jour de la semaine"
 
-msgctxt "field:account.invoice.payment_term.line,weeks:"
+msgctxt "field:account.invoice.payment_term.line.relativedelta,weeks:"
 msgid "Number of Weeks"
 msgstr "Nombre de semaines"
 
-msgctxt "field:account.invoice.payment_term.line,write_date:"
+msgctxt "field:account.invoice.payment_term.line.relativedelta,write_date:"
 msgid "Write Date"
 msgstr "Date de mise à jour"
 
-msgctxt "field:account.invoice.payment_term.line,write_uid:"
+msgctxt "field:account.invoice.payment_term.line.relativedelta,write_uid:"
 msgid "Write User"
 msgstr "Mis à jour par"
 
+msgctxt "field:account.invoice.payment_term.test,amount:"
+msgid "Amount"
+msgstr "Montant"
+
+msgctxt "field:account.invoice.payment_term.test,currency:"
+msgid "Currency"
+msgstr "Devise"
+
+msgctxt "field:account.invoice.payment_term.test,currency_digits:"
+msgid "Currency Digits"
+msgstr "Décimales de la devise"
+
+msgctxt "field:account.invoice.payment_term.test,date:"
+msgid "Date"
+msgstr "Date"
+
+msgctxt "field:account.invoice.payment_term.test,id:"
+msgid "ID"
+msgstr "ID"
+
+msgctxt "field:account.invoice.payment_term.test,payment_term:"
+msgid "Payment Term"
+msgstr "Conditions de paiement"
+
+msgctxt "field:account.invoice.payment_term.test,result:"
+msgid "Result"
+msgstr "Résultat"
+
+msgctxt "field:account.invoice.payment_term.test.result,amount:"
+msgid "Amount"
+msgstr "Montant"
+
+msgctxt "field:account.invoice.payment_term.test.result,currency_digits:"
+msgid "Currency Digits"
+msgstr "Décimales de la devise"
+
+msgctxt "field:account.invoice.payment_term.test.result,date:"
+msgid "Date"
+msgstr "Date"
+
+msgctxt "field:account.invoice.payment_term.test.result,id:"
+msgid "ID"
+msgstr "ID"
+
 msgctxt "field:account.invoice.print.warning,id:"
 msgid "ID"
 msgstr "ID"
@@ -1044,6 +1091,18 @@ msgctxt "model:account.invoice.payment_term.line,name:"
 msgid "Payment Term Line"
 msgstr "Ligne de condition de paiement"
 
+msgctxt "model:account.invoice.payment_term.line.relativedelta,name:"
+msgid "Payment Term Line Relative Delta"
+msgstr "Delta relatif de ligne de condition de paiement"
+
+msgctxt "model:account.invoice.payment_term.test,name:"
+msgid "Test Payment Term"
+msgstr "Test de condition de paiement"
+
+msgctxt "model:account.invoice.payment_term.test.result,name:"
+msgid "Test Payment Term"
+msgstr "Test de condition de paiement"
+
 msgctxt "model:account.invoice.print.warning,name:"
 msgid "Print Invoice Report Warning"
 msgstr "Avertissement impression facture"
@@ -1096,6 +1155,10 @@ msgctxt "model:ir.action,name:wizard_pay"
 msgid "Pay Invoice"
 msgstr "Payer la facture"
 
+msgctxt "model:ir.action,name:wizard_payment_term_test"
+msgid "Test Payment Term"
+msgstr "Test de condition de paiement"
+
 msgctxt ""
 "model:ir.action.act_window.domain,name:act_invoice_in_credit_note_domain_all"
 msgid "All"
@@ -1204,6 +1267,10 @@ msgctxt "model:ir.ui.menu,name:menu_payment_term_form"
 msgid "Payment Terms"
 msgstr "Conditions de paiement"
 
+msgctxt "model:ir.ui.menu,name:menu_payment_term_test"
+msgid "Test Payment Term"
+msgstr "Test de condition de paiement"
+
 msgctxt "model:ir.ui.menu,name:menu_payment_terms_configuration"
 msgid "Payment Terms"
 msgstr "Conditions de paiement"
@@ -1432,103 +1499,103 @@ msgctxt "selection:account.invoice.pay.ask,type:"
 msgid "Write-Off"
 msgstr "Pertes et profits"
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line,type:"
+msgid "Fixed"
+msgstr "Fixe"
+
+msgctxt "selection:account.invoice.payment_term.line,type:"
+msgid "Percentage on Remainder"
+msgstr "Pourcentage du reste"
+
+msgctxt "selection:account.invoice.payment_term.line,type:"
+msgid "Percentage on Total"
+msgstr "Pourcentage du total"
+
+msgctxt "selection:account.invoice.payment_term.line,type:"
+msgid "Remainder"
+msgstr "Reste"
+
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid ""
 msgstr ""
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "April"
 msgstr "Avril"
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "August"
 msgstr "Août"
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "December"
 msgstr "Décembre"
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "February"
 msgstr "Février"
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "January"
 msgstr "Janvier"
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "July"
 msgstr "Juillet"
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "June"
 msgstr "Juin"
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "March"
 msgstr "Mars"
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "May"
 msgstr "Mai"
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "November"
 msgstr "Novembre"
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "October"
 msgstr "Octobre"
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "September"
 msgstr "Septembre"
 
-msgctxt "selection:account.invoice.payment_term.line,type:"
-msgid "Fixed"
-msgstr "Fixe"
-
-msgctxt "selection:account.invoice.payment_term.line,type:"
-msgid "Percentage on Remainder"
-msgstr "Pourcentage du reste"
-
-msgctxt "selection:account.invoice.payment_term.line,type:"
-msgid "Percentage on Total"
-msgstr "Pourcentage du total"
-
-msgctxt "selection:account.invoice.payment_term.line,type:"
-msgid "Remainder"
-msgstr "Reste"
-
-msgctxt "selection:account.invoice.payment_term.line,weekday:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,weekday:"
 msgid ""
 msgstr ""
 
-msgctxt "selection:account.invoice.payment_term.line,weekday:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,weekday:"
 msgid "Friday"
 msgstr "Vendredi"
 
-msgctxt "selection:account.invoice.payment_term.line,weekday:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,weekday:"
 msgid "Monday"
 msgstr "Lundi"
 
-msgctxt "selection:account.invoice.payment_term.line,weekday:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,weekday:"
 msgid "Saturday"
 msgstr "Samedi"
 
-msgctxt "selection:account.invoice.payment_term.line,weekday:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,weekday:"
 msgid "Sunday"
 msgstr "Dimanche"
 
-msgctxt "selection:account.invoice.payment_term.line,weekday:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,weekday:"
 msgid "Thursday"
 msgstr "Jeudi"
 
-msgctxt "selection:account.invoice.payment_term.line,weekday:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,weekday:"
 msgid "Tuesday"
 msgstr "Mardi"
 
-msgctxt "selection:account.invoice.payment_term.line,weekday:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,weekday:"
 msgid "Wednesday"
 msgstr "Mercredi"
 
@@ -1572,13 +1639,25 @@ msgctxt "view:account.invoice.pay.start:"
 msgid "Pay Invoice"
 msgstr "Payer la facture"
 
+msgctxt "view:account.invoice.payment_term.line.relativedelta:"
+msgid "Payment Term Line Relative Delta"
+msgstr "Delta relatif de ligne de condition de paiement"
+
+msgctxt "view:account.invoice.payment_term.line.relativedelta:"
+msgid "Payment Term Line Relative Deltas"
+msgstr "Deltas relatifs de ligne de condition de paiement"
+
 msgctxt "view:account.invoice.payment_term.line:"
 msgid "Payment Term Line"
 msgstr "Ligne de condition de paiement"
 
-msgctxt "view:account.invoice.payment_term.line:"
-msgid "Payment Term Lines"
-msgstr "Lignes de condition de paiement"
+msgctxt "view:account.invoice.payment_term.test.result:"
+msgid "Payment Term Test Results"
+msgstr "Résultats du test de la condition de paiement"
+
+msgctxt "view:account.invoice.payment_term.test:"
+msgid "Payment Term Test"
+msgstr "Test de condition de paiement"
 
 msgctxt "view:account.invoice.payment_term:"
 msgid "Payment Term"
@@ -1625,6 +1704,14 @@ msgid "Are you sure to cancel the invoice?"
 msgstr "Êtes-vous sûr d'annuler la facture ?"
 
 msgctxt "view:account.invoice:"
+msgid "Cancel"
+msgstr "Annulée"
+
+msgctxt "view:account.invoice:"
+msgid "Draft"
+msgstr "Brouillon"
+
+msgctxt "view:account.invoice:"
 msgid "Invoice"
 msgstr "Facture"
 
@@ -1641,6 +1728,10 @@ msgid "Payment"
 msgstr "Paiement"
 
 msgctxt "view:account.invoice:"
+msgid "Post"
+msgstr "Poster"
+
+msgctxt "view:account.invoice:"
 msgid "Validate"
 msgstr "Valider"
 
@@ -1701,17 +1792,21 @@ msgid "Cancel"
 msgstr "Annuler"
 
 msgctxt "wizard_button:account.invoice.pay,ask,pay:"
-msgid "Ok"
-msgstr "Ok"
+msgid "OK"
+msgstr "OK"
 
 msgctxt "wizard_button:account.invoice.pay,start,choice:"
-msgid "Ok"
-msgstr "Ok"
+msgid "OK"
+msgstr "OK"
 
 msgctxt "wizard_button:account.invoice.pay,start,end:"
 msgid "Cancel"
 msgstr "Annuler"
 
+msgctxt "wizard_button:account.invoice.payment_term.test,test,end:"
+msgid "Close"
+msgstr "Fermer"
+
 msgctxt "wizard_button:account.invoice.print,warning,end:"
 msgid "Cancel"
 msgstr "Annuler"
diff --git a/locale/nl_NL.po b/locale/nl_NL.po
index 3320b4f..74c99af 100644
--- a/locale/nl_NL.po
+++ b/locale/nl_NL.po
@@ -42,13 +42,6 @@ msgstr ""
 
 msgctxt "error:account.invoice.line:"
 msgid ""
-"You can not create invoice line \"%(line)s\" on invoice \"%(invoice)s of "
-"company \"%(invoice_line_company)s because account \"%(account)s has company"
-" \"%(account_company)s\"."
-msgstr ""
-
-msgctxt "error:account.invoice.line:"
-msgid ""
 "You can not create invoice line \"%(line)s\" on invoice \"%(invoice)s\" "
 "because the invoice uses the same account (%(account)s)."
 msgstr ""
@@ -66,10 +59,6 @@ msgid ""
 msgstr ""
 
 msgctxt "error:account.invoice.payment_term.line:"
-msgid "Day of month must be between 1 and 31."
-msgstr ""
-
-msgctxt "error:account.invoice.payment_term.line:"
 msgid ""
 "Percentage and Divisor values are not consistent in line \"%(line)s\" of "
 "payment term \"%(term)s\"."
@@ -96,13 +85,6 @@ msgstr ""
 msgctxt "error:account.invoice.tax:"
 msgid ""
 "You can not create invoice \"%(invoice)s\" on company "
-"\"%(invoice_company)s\" using account \"%(account)s\" from company "
-"\"%(account_company)s\"."
-msgstr ""
-
-msgctxt "error:account.invoice.tax:"
-msgid ""
-"You can not create invoice \"%(invoice)s\" on company "
 "\"%(invoice_company)s\" using base tax code \"%(base_code)s\" from company "
 "\"%(base_code_company)s\"."
 msgstr ""
@@ -183,12 +165,6 @@ msgid ""
 msgstr ""
 
 msgctxt "error:account.invoice:"
-msgid ""
-"You can not create invoice \"%(invoice)s\" on company \"%(invoice_company)s "
-"because account \"%(account)s has a different company (%(account_company)s.)"
-msgstr ""
-
-msgctxt "error:account.invoice:"
 msgid "You can not modify invoice \"%s\" because it is posted, paid or cancelled."
 msgstr ""
 
@@ -777,14 +753,6 @@ msgctxt "field:account.invoice.payment_term.line,currency_digits:"
 msgid "Currency Digits"
 msgstr "Valuta decimalen"
 
-msgctxt "field:account.invoice.payment_term.line,day:"
-msgid "Day of Month"
-msgstr ""
-
-msgctxt "field:account.invoice.payment_term.line,days:"
-msgid "Number of Days"
-msgstr "Aantal dagen"
-
 msgctxt "field:account.invoice.payment_term.line,divisor:"
 msgid "Divisor"
 msgstr ""
@@ -793,15 +761,6 @@ msgctxt "field:account.invoice.payment_term.line,id:"
 msgid "ID"
 msgstr ""
 
-#, fuzzy
-msgctxt "field:account.invoice.payment_term.line,month:"
-msgid "Month"
-msgstr "Maand"
-
-msgctxt "field:account.invoice.payment_term.line,months:"
-msgid "Number of Months"
-msgstr ""
-
 msgctxt "field:account.invoice.payment_term.line,payment:"
 msgid "Payment Term"
 msgstr "Betalingstermijn"
@@ -814,6 +773,10 @@ msgctxt "field:account.invoice.payment_term.line,rec_name:"
 msgid "Name"
 msgstr "Naam"
 
+msgctxt "field:account.invoice.payment_term.line,relativedeltas:"
+msgid "Deltas"
+msgstr ""
+
 msgctxt "field:account.invoice.payment_term.line,sequence:"
 msgid "Sequence"
 msgstr "Reeks"
@@ -822,22 +785,126 @@ msgctxt "field:account.invoice.payment_term.line,type:"
 msgid "Type"
 msgstr "Type"
 
-msgctxt "field:account.invoice.payment_term.line,weekday:"
+msgctxt "field:account.invoice.payment_term.line,write_date:"
+msgid "Write Date"
+msgstr ""
+
+msgctxt "field:account.invoice.payment_term.line,write_uid:"
+msgid "Write User"
+msgstr ""
+
+msgctxt "field:account.invoice.payment_term.line.relativedelta,create_date:"
+msgid "Create Date"
+msgstr ""
+
+msgctxt "field:account.invoice.payment_term.line.relativedelta,create_uid:"
+msgid "Create User"
+msgstr ""
+
+msgctxt "field:account.invoice.payment_term.line.relativedelta,day:"
+msgid "Day of Month"
+msgstr ""
+
+msgctxt "field:account.invoice.payment_term.line.relativedelta,days:"
+msgid "Number of Days"
+msgstr ""
+
+msgctxt "field:account.invoice.payment_term.line.relativedelta,id:"
+msgid "ID"
+msgstr ""
+
+#, fuzzy
+msgctxt "field:account.invoice.payment_term.line.relativedelta,line:"
+msgid "Payment Term Line"
+msgstr "Betalingstermijn regel"
+
+#, fuzzy
+msgctxt "field:account.invoice.payment_term.line.relativedelta,month:"
+msgid "Month"
+msgstr "Maand"
+
+msgctxt "field:account.invoice.payment_term.line.relativedelta,months:"
+msgid "Number of Months"
+msgstr ""
+
+#, fuzzy
+msgctxt "field:account.invoice.payment_term.line.relativedelta,rec_name:"
+msgid "Name"
+msgstr "Naam bijlage"
+
+#, fuzzy
+msgctxt "field:account.invoice.payment_term.line.relativedelta,sequence:"
+msgid "Sequence"
+msgstr "Reeks"
+
+msgctxt "field:account.invoice.payment_term.line.relativedelta,weekday:"
 msgid "Day of Week"
 msgstr ""
 
-msgctxt "field:account.invoice.payment_term.line,weeks:"
+msgctxt "field:account.invoice.payment_term.line.relativedelta,weeks:"
 msgid "Number of Weeks"
 msgstr ""
 
-msgctxt "field:account.invoice.payment_term.line,write_date:"
+msgctxt "field:account.invoice.payment_term.line.relativedelta,write_date:"
 msgid "Write Date"
 msgstr ""
 
-msgctxt "field:account.invoice.payment_term.line,write_uid:"
+msgctxt "field:account.invoice.payment_term.line.relativedelta,write_uid:"
 msgid "Write User"
 msgstr ""
 
+#, fuzzy
+msgctxt "field:account.invoice.payment_term.test,amount:"
+msgid "Amount"
+msgstr "Bedrag"
+
+#, fuzzy
+msgctxt "field:account.invoice.payment_term.test,currency:"
+msgid "Currency"
+msgstr "Valuta"
+
+#, fuzzy
+msgctxt "field:account.invoice.payment_term.test,currency_digits:"
+msgid "Currency Digits"
+msgstr "Valuta decimalen"
+
+#, fuzzy
+msgctxt "field:account.invoice.payment_term.test,date:"
+msgid "Date"
+msgstr "Vervaldatum"
+
+msgctxt "field:account.invoice.payment_term.test,id:"
+msgid "ID"
+msgstr ""
+
+#, fuzzy
+msgctxt "field:account.invoice.payment_term.test,payment_term:"
+msgid "Payment Term"
+msgstr "Betalingstermijn"
+
+msgctxt "field:account.invoice.payment_term.test,result:"
+msgid "Result"
+msgstr ""
+
+#, fuzzy
+msgctxt "field:account.invoice.payment_term.test.result,amount:"
+msgid "Amount"
+msgstr "Bedrag"
+
+#, fuzzy
+msgctxt "field:account.invoice.payment_term.test.result,currency_digits:"
+msgid "Currency Digits"
+msgstr "Valuta decimalen"
+
+#, fuzzy
+msgctxt "field:account.invoice.payment_term.test.result,date:"
+msgid "Date"
+msgstr "Vervaldatum"
+
+msgctxt "field:account.invoice.payment_term.test.result,id:"
+msgid "ID"
+msgstr ""
+
 msgctxt "field:account.invoice.print.warning,id:"
 msgid "ID"
 msgstr ""
@@ -994,6 +1061,18 @@ msgctxt "model:account.invoice.payment_term.line,name:"
 msgid "Payment Term Line"
 msgstr "Betalingstermijn regel"
 
+msgctxt "model:account.invoice.payment_term.line.relativedelta,name:"
+msgid "Payment Term Line Relative Delta"
+msgstr ""
+
+msgctxt "model:account.invoice.payment_term.test,name:"
+msgid "Test Payment Term"
+msgstr ""
+
+msgctxt "model:account.invoice.payment_term.test.result,name:"
+msgid "Test Payment Term"
+msgstr ""
+
 msgctxt "model:account.invoice.print.warning,name:"
 msgid "Print Invoice Report Warning"
 msgstr ""
@@ -1049,6 +1128,10 @@ msgctxt "model:ir.action,name:wizard_pay"
 msgid "Pay Invoice"
 msgstr ""
 
+msgctxt "model:ir.action,name:wizard_payment_term_test"
+msgid "Test Payment Term"
+msgstr ""
+
 msgctxt ""
 "model:ir.action.act_window.domain,name:act_invoice_in_credit_note_domain_all"
 msgid "All"
@@ -1169,6 +1252,10 @@ msgctxt "model:ir.ui.menu,name:menu_payment_term_form"
 msgid "Payment Terms"
 msgstr "Betalingstermijnen"
 
+msgctxt "model:ir.ui.menu,name:menu_payment_term_test"
+msgid "Test Payment Term"
+msgstr ""
+
 msgctxt "model:ir.ui.menu,name:menu_payment_terms_configuration"
 msgid "Payment Terms"
 msgstr "Betalingstermijnen"
@@ -1401,104 +1488,104 @@ msgctxt "selection:account.invoice.pay.ask,type:"
 msgid "Write-Off"
 msgstr "Afschrijven"
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+#, fuzzy
+msgctxt "selection:account.invoice.payment_term.line,type:"
+msgid "Fixed"
+msgstr "Vast"
+
+msgctxt "selection:account.invoice.payment_term.line,type:"
+msgid "Percentage on Remainder"
+msgstr ""
+
+msgctxt "selection:account.invoice.payment_term.line,type:"
+msgid "Percentage on Total"
+msgstr ""
+
+msgctxt "selection:account.invoice.payment_term.line,type:"
+msgid "Remainder"
+msgstr ""
+
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid ""
 msgstr ""
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "April"
 msgstr ""
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "August"
 msgstr ""
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "December"
 msgstr ""
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "February"
 msgstr ""
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "January"
 msgstr ""
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "July"
 msgstr ""
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "June"
 msgstr ""
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "March"
 msgstr ""
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "May"
 msgstr ""
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "November"
 msgstr ""
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "October"
 msgstr ""
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "September"
 msgstr ""
 
-#, fuzzy
-msgctxt "selection:account.invoice.payment_term.line,type:"
-msgid "Fixed"
-msgstr "Vast"
-
-msgctxt "selection:account.invoice.payment_term.line,type:"
-msgid "Percentage on Remainder"
-msgstr ""
-
-msgctxt "selection:account.invoice.payment_term.line,type:"
-msgid "Percentage on Total"
-msgstr ""
-
-msgctxt "selection:account.invoice.payment_term.line,type:"
-msgid "Remainder"
-msgstr ""
-
-msgctxt "selection:account.invoice.payment_term.line,weekday:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,weekday:"
 msgid ""
 msgstr ""
 
-msgctxt "selection:account.invoice.payment_term.line,weekday:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,weekday:"
 msgid "Friday"
 msgstr ""
 
-msgctxt "selection:account.invoice.payment_term.line,weekday:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,weekday:"
 msgid "Monday"
 msgstr ""
 
-msgctxt "selection:account.invoice.payment_term.line,weekday:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,weekday:"
 msgid "Saturday"
 msgstr ""
 
-msgctxt "selection:account.invoice.payment_term.line,weekday:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,weekday:"
 msgid "Sunday"
 msgstr ""
 
-msgctxt "selection:account.invoice.payment_term.line,weekday:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,weekday:"
 msgid "Thursday"
 msgstr ""
 
-msgctxt "selection:account.invoice.payment_term.line,weekday:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,weekday:"
 msgid "Tuesday"
 msgstr ""
 
-msgctxt "selection:account.invoice.payment_term.line,weekday:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,weekday:"
 msgid "Wednesday"
 msgstr ""
 
@@ -1680,12 +1767,12 @@ msgstr "Annuleren"
 
 #, fuzzy
 msgctxt "wizard_button:account.invoice.pay,ask,pay:"
-msgid "Ok"
+msgid "OK"
 msgstr "Oké"
 
 #, fuzzy
 msgctxt "wizard_button:account.invoice.pay,start,choice:"
-msgid "Ok"
+msgid "OK"
 msgstr "Oké"
 
 #, fuzzy
@@ -1694,6 +1781,11 @@ msgid "Cancel"
 msgstr "Annuleren"
 
 #, fuzzy
+msgctxt "wizard_button:account.invoice.payment_term.test,test,end:"
+msgid "Close"
+msgstr "Sluiten"
+
+#, fuzzy
 msgctxt "wizard_button:account.invoice.print,warning,end:"
 msgid "Cancel"
 msgstr "Annuleren"
diff --git a/locale/ru_RU.po b/locale/ru_RU.po
index ed6a519..37b33b6 100644
--- a/locale/ru_RU.po
+++ b/locale/ru_RU.po
@@ -50,16 +50,6 @@ msgstr ""
 
 msgctxt "error:account.invoice.line:"
 msgid ""
-"You can not create invoice line \"%(line)s\" on invoice \"%(invoice)s of "
-"company \"%(invoice_line_company)s because account \"%(account)s has company"
-" \"%(account_company)s\"."
-msgstr ""
-"Вы не можете создать строку \"%(line)s\" у инвойса \"%(invoice)s организации"
-" \"%(invoice_line_company)s так как счет \"%(account)s\" принадлежит "
-"организации \"%(account_company)s\"."
-
-msgctxt "error:account.invoice.line:"
-msgid ""
 "You can not create invoice line \"%(line)s\" on invoice \"%(invoice)s\" "
 "because the invoice uses the same account (%(account)s)."
 msgstr ""
@@ -82,10 +72,6 @@ msgstr ""
 "У инвойса \"%s\" нельзя создать частичную оплату превышающую общую оплату."
 
 msgctxt "error:account.invoice.payment_term.line:"
-msgid "Day of month must be between 1 and 31."
-msgstr "День месяца должен быть между 1 и 31."
-
-msgctxt "error:account.invoice.payment_term.line:"
 msgid ""
 "Percentage and Divisor values are not consistent in line \"%(line)s\" of "
 "payment term \"%(term)s\"."
@@ -116,16 +102,6 @@ msgstr ""
 msgctxt "error:account.invoice.tax:"
 msgid ""
 "You can not create invoice \"%(invoice)s\" on company "
-"\"%(invoice_company)s\" using account \"%(account)s\" from company "
-"\"%(account_company)s\"."
-msgstr ""
-"Вы не можете создать инвойс \"%(invoice)s\" для организации "
-"\"%(invoice_company)s\" используя счет \"%(account)s\" от организации "
-"\"%(account_company)s\"."
-
-msgctxt "error:account.invoice.tax:"
-msgid ""
-"You can not create invoice \"%(invoice)s\" on company "
 "\"%(invoice_company)s\" using base tax code \"%(base_code)s\" from company "
 "\"%(base_code_company)s\"."
 msgstr ""
@@ -228,15 +204,6 @@ msgstr ""
 "период/финансовый год \"%(period)s\"."
 
 msgctxt "error:account.invoice:"
-msgid ""
-"You can not create invoice \"%(invoice)s\" on company \"%(invoice_company)s "
-"because account \"%(account)s has a different company (%(account_company)s.)"
-msgstr ""
-"Вы не можете создать инвойс \"%(invoice)s\" для организации "
-"\"%(invoice_company)s так как счет \"%(account)s принадлежит другой "
-"организации (%(account_company)s.)"
-
-msgctxt "error:account.invoice:"
 msgid "You can not modify invoice \"%s\" because it is posted, paid or cancelled."
 msgstr ""
 "Вы не можете изменить инвойс \"%s\" так как он \"Отправлен\", \"Оплачен\" "
@@ -827,14 +794,6 @@ msgctxt "field:account.invoice.payment_term.line,currency_digits:"
 msgid "Currency Digits"
 msgstr "Кол-во цифр валюты"
 
-msgctxt "field:account.invoice.payment_term.line,day:"
-msgid "Day of Month"
-msgstr "День месяца"
-
-msgctxt "field:account.invoice.payment_term.line,days:"
-msgid "Number of Days"
-msgstr "Кол-во дней"
-
 msgctxt "field:account.invoice.payment_term.line,divisor:"
 msgid "Divisor"
 msgstr "Делитель"
@@ -843,14 +802,6 @@ msgctxt "field:account.invoice.payment_term.line,id:"
 msgid "ID"
 msgstr "ID"
 
-msgctxt "field:account.invoice.payment_term.line,month:"
-msgid "Month"
-msgstr "Месяц"
-
-msgctxt "field:account.invoice.payment_term.line,months:"
-msgid "Number of Months"
-msgstr "Кол-во месяцев"
-
 msgctxt "field:account.invoice.payment_term.line,payment:"
 msgid "Payment Term"
 msgstr "Правило оплаты"
@@ -863,6 +814,10 @@ msgctxt "field:account.invoice.payment_term.line,rec_name:"
 msgid "Name"
 msgstr "Наименование"
 
+msgctxt "field:account.invoice.payment_term.line,relativedeltas:"
+msgid "Deltas"
+msgstr ""
+
 msgctxt "field:account.invoice.payment_term.line,sequence:"
 msgid "Sequence"
 msgstr "Нумерация"
@@ -871,22 +826,133 @@ msgctxt "field:account.invoice.payment_term.line,type:"
 msgid "Type"
 msgstr "Тип"
 
-msgctxt "field:account.invoice.payment_term.line,weekday:"
+msgctxt "field:account.invoice.payment_term.line,write_date:"
+msgid "Write Date"
+msgstr "Дата изменения"
+
+msgctxt "field:account.invoice.payment_term.line,write_uid:"
+msgid "Write User"
+msgstr "Изменено пользователем"
+
+#, fuzzy
+msgctxt "field:account.invoice.payment_term.line.relativedelta,create_date:"
+msgid "Create Date"
+msgstr "Дата создания"
+
+#, fuzzy
+msgctxt "field:account.invoice.payment_term.line.relativedelta,create_uid:"
+msgid "Create User"
+msgstr "Создано пользователем"
+
+msgctxt "field:account.invoice.payment_term.line.relativedelta,day:"
+msgid "Day of Month"
+msgstr ""
+
+msgctxt "field:account.invoice.payment_term.line.relativedelta,days:"
+msgid "Number of Days"
+msgstr ""
+
+#, fuzzy
+msgctxt "field:account.invoice.payment_term.line.relativedelta,id:"
+msgid "ID"
+msgstr "ID"
+
+#, fuzzy
+msgctxt "field:account.invoice.payment_term.line.relativedelta,line:"
+msgid "Payment Term Line"
+msgstr "Строка правила оплаты"
+
+#, fuzzy
+msgctxt "field:account.invoice.payment_term.line.relativedelta,month:"
+msgid "Month"
+msgstr "Месяц"
+
+msgctxt "field:account.invoice.payment_term.line.relativedelta,months:"
+msgid "Number of Months"
+msgstr ""
+
+#, fuzzy
+msgctxt "field:account.invoice.payment_term.line.relativedelta,rec_name:"
+msgid "Name"
+msgstr "Правило оплаты"
+
+#, fuzzy
+msgctxt "field:account.invoice.payment_term.line.relativedelta,sequence:"
+msgid "Sequence"
+msgstr "Последовательность"
+
+msgctxt "field:account.invoice.payment_term.line.relativedelta,weekday:"
 msgid "Day of Week"
-msgstr "День недели"
+msgstr ""
 
-msgctxt "field:account.invoice.payment_term.line,weeks:"
+msgctxt "field:account.invoice.payment_term.line.relativedelta,weeks:"
 msgid "Number of Weeks"
-msgstr "Кол-во недель"
+msgstr ""
 
-msgctxt "field:account.invoice.payment_term.line,write_date:"
+#, fuzzy
+msgctxt "field:account.invoice.payment_term.line.relativedelta,write_date:"
 msgid "Write Date"
 msgstr "Дата изменения"
 
-msgctxt "field:account.invoice.payment_term.line,write_uid:"
+#, fuzzy
+msgctxt "field:account.invoice.payment_term.line.relativedelta,write_uid:"
 msgid "Write User"
 msgstr "Изменено пользователем"
 
+#, fuzzy
+msgctxt "field:account.invoice.payment_term.test,amount:"
+msgid "Amount"
+msgstr "Сумма"
+
+#, fuzzy
+msgctxt "field:account.invoice.payment_term.test,currency:"
+msgid "Currency"
+msgstr "Валюты"
+
+#, fuzzy
+msgctxt "field:account.invoice.payment_term.test,currency_digits:"
+msgid "Currency Digits"
+msgstr "Кол-во цифр валюты"
+
+#, fuzzy
+msgctxt "field:account.invoice.payment_term.test,date:"
+msgid "Date"
+msgstr "Дата"
+
+#, fuzzy
+msgctxt "field:account.invoice.payment_term.test,id:"
+msgid "ID"
+msgstr "ID"
+
+#, fuzzy
+msgctxt "field:account.invoice.payment_term.test,payment_term:"
+msgid "Payment Term"
+msgstr "Правило оплаты"
+
+msgctxt "field:account.invoice.payment_term.test,result:"
+msgid "Result"
+msgstr ""
+
+#, fuzzy
+msgctxt "field:account.invoice.payment_term.test.result,amount:"
+msgid "Amount"
+msgstr "Сумма"
+
+#, fuzzy
+msgctxt "field:account.invoice.payment_term.test.result,currency_digits:"
+msgid "Currency Digits"
+msgstr "Кол-во цифр валюты"
+
+#, fuzzy
+msgctxt "field:account.invoice.payment_term.test.result,date:"
+msgid "Date"
+msgstr "Дата"
+
+#, fuzzy
+msgctxt "field:account.invoice.payment_term.test.result,id:"
+msgid "ID"
+msgstr "ID"
+
 msgctxt "field:account.invoice.print.warning,id:"
 msgid "ID"
 msgstr "ID"
@@ -1044,6 +1110,18 @@ msgctxt "model:account.invoice.payment_term.line,name:"
 msgid "Payment Term Line"
 msgstr "Строка правила оплаты"
 
+msgctxt "model:account.invoice.payment_term.line.relativedelta,name:"
+msgid "Payment Term Line Relative Delta"
+msgstr ""
+
+msgctxt "model:account.invoice.payment_term.test,name:"
+msgid "Test Payment Term"
+msgstr ""
+
+msgctxt "model:account.invoice.payment_term.test.result,name:"
+msgid "Test Payment Term"
+msgstr ""
+
 msgctxt "model:account.invoice.print.warning,name:"
 msgid "Print Invoice Report Warning"
 msgstr "Предупреждение при распечатке отчета Инвойса"
@@ -1096,6 +1174,10 @@ msgctxt "model:ir.action,name:wizard_pay"
 msgid "Pay Invoice"
 msgstr "Оплата инвойса"
 
+msgctxt "model:ir.action,name:wizard_payment_term_test"
+msgid "Test Payment Term"
+msgstr ""
+
 msgctxt ""
 "model:ir.action.act_window.domain,name:act_invoice_in_credit_note_domain_all"
 msgid "All"
@@ -1204,6 +1286,10 @@ msgctxt "model:ir.ui.menu,name:menu_payment_term_form"
 msgid "Payment Terms"
 msgstr "Правила оплаты"
 
+msgctxt "model:ir.ui.menu,name:menu_payment_term_test"
+msgid "Test Payment Term"
+msgstr ""
+
 msgctxt "model:ir.ui.menu,name:menu_payment_terms_configuration"
 msgid "Payment Terms"
 msgstr "Правила оплаты"
@@ -1433,103 +1519,110 @@ msgctxt "selection:account.invoice.pay.ask,type:"
 msgid "Write-Off"
 msgstr "Списание"
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line,type:"
+msgid "Fixed"
+msgstr "Фиксированная"
+
+msgctxt "selection:account.invoice.payment_term.line,type:"
+msgid "Percentage on Remainder"
+msgstr "Процент от остатка"
+
+msgctxt "selection:account.invoice.payment_term.line,type:"
+msgid "Percentage on Total"
+msgstr "Процент от общей суммы"
+
+msgctxt "selection:account.invoice.payment_term.line,type:"
+msgid "Remainder"
+msgstr "Остаток"
+
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid ""
 msgstr ""
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "April"
-msgstr "Апрель"
+msgstr ""
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "August"
-msgstr "Август"
+msgstr ""
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "December"
-msgstr "Декабрь"
+msgstr ""
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "February"
-msgstr "Февраль"
+msgstr ""
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "January"
-msgstr "Январь"
+msgstr ""
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "July"
-msgstr "Июль"
+msgstr ""
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "June"
-msgstr "Июнь"
+msgstr ""
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "March"
-msgstr "Март"
+msgstr ""
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "May"
-msgstr "Май"
+msgstr ""
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "November"
-msgstr "Ноябрь"
+msgstr ""
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "October"
-msgstr "Октябрь"
+msgstr ""
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "September"
-msgstr "Сентябрь"
-
-msgctxt "selection:account.invoice.payment_term.line,type:"
-msgid "Fixed"
-msgstr "Фиксированная"
-
-msgctxt "selection:account.invoice.payment_term.line,type:"
-msgid "Percentage on Remainder"
-msgstr "Процент от остатка"
-
-msgctxt "selection:account.invoice.payment_term.line,type:"
-msgid "Percentage on Total"
-msgstr "Процент от общей суммы"
-
-msgctxt "selection:account.invoice.payment_term.line,type:"
-msgid "Remainder"
-msgstr "Остаток"
+msgstr ""
 
-msgctxt "selection:account.invoice.payment_term.line,weekday:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,weekday:"
 msgid ""
 msgstr ""
 
-msgctxt "selection:account.invoice.payment_term.line,weekday:"
+#, fuzzy
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,weekday:"
 msgid "Friday"
 msgstr "Пятница"
 
-msgctxt "selection:account.invoice.payment_term.line,weekday:"
+#, fuzzy
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,weekday:"
 msgid "Monday"
 msgstr "Понедельник"
 
-msgctxt "selection:account.invoice.payment_term.line,weekday:"
+#, fuzzy
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,weekday:"
 msgid "Saturday"
 msgstr "Суббота"
 
-msgctxt "selection:account.invoice.payment_term.line,weekday:"
+#, fuzzy
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,weekday:"
 msgid "Sunday"
 msgstr "Воскресенье"
 
-msgctxt "selection:account.invoice.payment_term.line,weekday:"
+#, fuzzy
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,weekday:"
 msgid "Thursday"
 msgstr "Четверг"
 
-msgctxt "selection:account.invoice.payment_term.line,weekday:"
+#, fuzzy
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,weekday:"
 msgid "Tuesday"
 msgstr "Вторник"
 
-msgctxt "selection:account.invoice.payment_term.line,weekday:"
+#, fuzzy
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,weekday:"
 msgid "Wednesday"
 msgstr "Среда"
 
@@ -1698,17 +1791,22 @@ msgid "Cancel"
 msgstr "Отменить"
 
 msgctxt "wizard_button:account.invoice.pay,ask,pay:"
-msgid "Ok"
+msgid "OK"
 msgstr "Ок"
 
 msgctxt "wizard_button:account.invoice.pay,start,choice:"
-msgid "Ok"
+msgid "OK"
 msgstr "Ок"
 
 msgctxt "wizard_button:account.invoice.pay,start,end:"
 msgid "Cancel"
 msgstr "Отменить"
 
+#, fuzzy
+msgctxt "wizard_button:account.invoice.payment_term.test,test,end:"
+msgid "Close"
+msgstr "Закрыть"
+
 msgctxt "wizard_button:account.invoice.print,warning,end:"
 msgid "Cancel"
 msgstr "Отменить"
diff --git a/locale/sl_SI.po b/locale/sl_SI.po
index 3508d11..0f9c030 100644
--- a/locale/sl_SI.po
+++ b/locale/sl_SI.po
@@ -52,16 +52,6 @@ msgstr ""
 
 msgctxt "error:account.invoice.line:"
 msgid ""
-"You can not create invoice line \"%(line)s\" on invoice \"%(invoice)s of "
-"company \"%(invoice_line_company)s because account \"%(account)s has company"
-" \"%(account_company)s\"."
-msgstr ""
-"Pri računu \"%(invoice)s\" družbe \"%(invoice_line_company)s\" ni možno "
-"izdelati postavke \"%(line)s\", ker je konto \"%(account)s\" od družbe "
-"\"%(account_company)s\"."
-
-msgctxt "error:account.invoice.line:"
-msgid ""
 "You can not create invoice line \"%(line)s\" on invoice \"%(invoice)s\" "
 "because the invoice uses the same account (%(account)s)."
 msgstr ""
@@ -85,10 +75,6 @@ msgstr ""
 "od zneska za plačilo."
 
 msgctxt "error:account.invoice.payment_term.line:"
-msgid "Day of month must be between 1 and 31."
-msgstr "Dan v mesecu je lahko med 1 in 31."
-
-msgctxt "error:account.invoice.payment_term.line:"
 msgid ""
 "Percentage and Divisor values are not consistent in line \"%(line)s\" of "
 "payment term \"%(term)s\"."
@@ -119,15 +105,6 @@ msgstr ""
 msgctxt "error:account.invoice.tax:"
 msgid ""
 "You can not create invoice \"%(invoice)s\" on company "
-"\"%(invoice_company)s\" using account \"%(account)s\" from company "
-"\"%(account_company)s\"."
-msgstr ""
-"Računa \"%(invoice)s\" pri družbi \"%(invoice_company)s\" ni možno izdelati "
-"z uporabo konta \"%(account)s\" iz družbe \"%(account_company)s\"."
-
-msgctxt "error:account.invoice.tax:"
-msgid ""
-"You can not create invoice \"%(invoice)s\" on company "
 "\"%(invoice_company)s\" using base tax code \"%(base_code)s\" from company "
 "\"%(base_code_company)s\"."
 msgstr ""
@@ -229,14 +206,6 @@ msgstr ""
 "štetje računov."
 
 msgctxt "error:account.invoice:"
-msgid ""
-"You can not create invoice \"%(invoice)s\" on company \"%(invoice_company)s "
-"because account \"%(account)s has a different company (%(account_company)s.)"
-msgstr ""
-"Računa \"%(invoice)s\" v družbi \"%(invoice_company)s ni možno izdelati, ker"
-" je družba (%(account_company)s) na kontu \"%(account)s drugačna. "
-
-msgctxt "error:account.invoice:"
 msgid "You can not modify invoice \"%s\" because it is posted, paid or cancelled."
 msgstr ""
 "Računa \"%s\" ni možno popravljati, ker je bodisi knjiženo ali plačano "
@@ -814,14 +783,6 @@ msgctxt "field:account.invoice.payment_term.line,currency_digits:"
 msgid "Currency Digits"
 msgstr "Decimalke"
 
-msgctxt "field:account.invoice.payment_term.line,day:"
-msgid "Day of Month"
-msgstr "Dan v mesecu"
-
-msgctxt "field:account.invoice.payment_term.line,days:"
-msgid "Number of Days"
-msgstr "Število dni"
-
 msgctxt "field:account.invoice.payment_term.line,divisor:"
 msgid "Divisor"
 msgstr "Delitelj"
@@ -830,14 +791,6 @@ msgctxt "field:account.invoice.payment_term.line,id:"
 msgid "ID"
 msgstr "ID"
 
-msgctxt "field:account.invoice.payment_term.line,month:"
-msgid "Month"
-msgstr "mesec"
-
-msgctxt "field:account.invoice.payment_term.line,months:"
-msgid "Number of Months"
-msgstr "Število mesecev"
-
 msgctxt "field:account.invoice.payment_term.line,payment:"
 msgid "Payment Term"
 msgstr "Plačilni rok"
@@ -850,6 +803,10 @@ msgctxt "field:account.invoice.payment_term.line,rec_name:"
 msgid "Name"
 msgstr "Ime"
 
+msgctxt "field:account.invoice.payment_term.line,relativedeltas:"
+msgid "Deltas"
+msgstr "Obroki"
+
 msgctxt "field:account.invoice.payment_term.line,sequence:"
 msgid "Sequence"
 msgstr "Zap.št."
@@ -858,22 +815,114 @@ msgctxt "field:account.invoice.payment_term.line,type:"
 msgid "Type"
 msgstr "Tip"
 
-msgctxt "field:account.invoice.payment_term.line,weekday:"
+msgctxt "field:account.invoice.payment_term.line,write_date:"
+msgid "Write Date"
+msgstr "Zapisano"
+
+msgctxt "field:account.invoice.payment_term.line,write_uid:"
+msgid "Write User"
+msgstr "Zapisal"
+
+msgctxt "field:account.invoice.payment_term.line.relativedelta,create_date:"
+msgid "Create Date"
+msgstr "Izdelano"
+
+msgctxt "field:account.invoice.payment_term.line.relativedelta,create_uid:"
+msgid "Create User"
+msgstr "Izdelal"
+
+msgctxt "field:account.invoice.payment_term.line.relativedelta,day:"
+msgid "Day of Month"
+msgstr "Dan v mesecu"
+
+msgctxt "field:account.invoice.payment_term.line.relativedelta,days:"
+msgid "Number of Days"
+msgstr "Število dni"
+
+msgctxt "field:account.invoice.payment_term.line.relativedelta,id:"
+msgid "ID"
+msgstr "ID"
+
+msgctxt "field:account.invoice.payment_term.line.relativedelta,line:"
+msgid "Payment Term Line"
+msgstr "Postavka plačilnega roka"
+
+msgctxt "field:account.invoice.payment_term.line.relativedelta,month:"
+msgid "Month"
+msgstr "mesec"
+
+msgctxt "field:account.invoice.payment_term.line.relativedelta,months:"
+msgid "Number of Months"
+msgstr "Število mesecev"
+
+msgctxt "field:account.invoice.payment_term.line.relativedelta,rec_name:"
+msgid "Name"
+msgstr "Ime"
+
+msgctxt "field:account.invoice.payment_term.line.relativedelta,sequence:"
+msgid "Sequence"
+msgstr "Zap.št."
+
+msgctxt "field:account.invoice.payment_term.line.relativedelta,weekday:"
 msgid "Day of Week"
 msgstr "Dan v tednu"
 
-msgctxt "field:account.invoice.payment_term.line,weeks:"
+msgctxt "field:account.invoice.payment_term.line.relativedelta,weeks:"
 msgid "Number of Weeks"
 msgstr "Število tednov"
 
-msgctxt "field:account.invoice.payment_term.line,write_date:"
+msgctxt "field:account.invoice.payment_term.line.relativedelta,write_date:"
 msgid "Write Date"
 msgstr "Zapisano"
 
-msgctxt "field:account.invoice.payment_term.line,write_uid:"
+msgctxt "field:account.invoice.payment_term.line.relativedelta,write_uid:"
 msgid "Write User"
 msgstr "Zapisal"
 
+msgctxt "field:account.invoice.payment_term.test,amount:"
+msgid "Amount"
+msgstr "Znesek"
+
+msgctxt "field:account.invoice.payment_term.test,currency:"
+msgid "Currency"
+msgstr "Valuta"
+
+msgctxt "field:account.invoice.payment_term.test,currency_digits:"
+msgid "Currency Digits"
+msgstr "Decimalke"
+
+msgctxt "field:account.invoice.payment_term.test,date:"
+msgid "Date"
+msgstr "Datum"
+
+msgctxt "field:account.invoice.payment_term.test,id:"
+msgid "ID"
+msgstr "ID"
+
+msgctxt "field:account.invoice.payment_term.test,payment_term:"
+msgid "Payment Term"
+msgstr "Plačilni rok"
+
+msgctxt "field:account.invoice.payment_term.test,result:"
+msgid "Result"
+msgstr "Rezultat"
+
+msgctxt "field:account.invoice.payment_term.test.result,amount:"
+msgid "Amount"
+msgstr "Znesek"
+
+msgctxt "field:account.invoice.payment_term.test.result,currency_digits:"
+msgid "Currency Digits"
+msgstr "Decimalke"
+
+msgctxt "field:account.invoice.payment_term.test.result,date:"
+msgid "Date"
+msgstr "Datum"
+
+msgctxt "field:account.invoice.payment_term.test.result,id:"
+msgid "ID"
+msgstr "ID"
+
 msgctxt "field:account.invoice.print.warning,id:"
 msgid "ID"
 msgstr "ID"
@@ -1030,6 +1079,18 @@ msgctxt "model:account.invoice.payment_term.line,name:"
 msgid "Payment Term Line"
 msgstr "Postavka plačilnega roka"
 
+msgctxt "model:account.invoice.payment_term.line.relativedelta,name:"
+msgid "Payment Term Line Relative Delta"
+msgstr "Obrok postavke plačilnega roka"
+
+msgctxt "model:account.invoice.payment_term.test,name:"
+msgid "Test Payment Term"
+msgstr "Preizkus plačilnega roka"
+
+msgctxt "model:account.invoice.payment_term.test.result,name:"
+msgid "Test Payment Term"
+msgstr "Preizkus plačilnega roka"
+
 msgctxt "model:account.invoice.print.warning,name:"
 msgid "Print Invoice Report Warning"
 msgstr "Opozorilo pri izpisu računa"
@@ -1082,6 +1143,10 @@ msgctxt "model:ir.action,name:wizard_pay"
 msgid "Pay Invoice"
 msgstr "Plačilo računa"
 
+msgctxt "model:ir.action,name:wizard_payment_term_test"
+msgid "Test Payment Term"
+msgstr "Preizkus plačilnega roka"
+
 msgctxt ""
 "model:ir.action.act_window.domain,name:act_invoice_in_credit_note_domain_all"
 msgid "All"
@@ -1190,6 +1255,10 @@ msgctxt "model:ir.ui.menu,name:menu_payment_term_form"
 msgid "Payment Terms"
 msgstr "Plačilni roki"
 
+msgctxt "model:ir.ui.menu,name:menu_payment_term_test"
+msgid "Test Payment Term"
+msgstr "Preizkus plačilnega roka"
+
 msgctxt "model:ir.ui.menu,name:menu_payment_terms_configuration"
 msgid "Payment Terms"
 msgstr "Plačilni roki"
@@ -1418,103 +1487,103 @@ msgctxt "selection:account.invoice.pay.ask,type:"
 msgid "Write-Off"
 msgstr "Odpis"
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line,type:"
+msgid "Fixed"
+msgstr "Fiksno"
+
+msgctxt "selection:account.invoice.payment_term.line,type:"
+msgid "Percentage on Remainder"
+msgstr "Odstotek preostanka"
+
+msgctxt "selection:account.invoice.payment_term.line,type:"
+msgid "Percentage on Total"
+msgstr "Odstotek zneska"
+
+msgctxt "selection:account.invoice.payment_term.line,type:"
+msgid "Remainder"
+msgstr "Preostanek"
+
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid ""
 msgstr ""
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "April"
 msgstr "April"
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "August"
 msgstr "Avgust"
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "December"
 msgstr "December"
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "February"
 msgstr "Februar"
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "January"
 msgstr "Januar"
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "July"
 msgstr "Julij"
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "June"
 msgstr "Junij"
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "March"
 msgstr "Marec"
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "May"
 msgstr "Maj"
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "November"
 msgstr "November"
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "October"
 msgstr "Oktober"
 
-msgctxt "selection:account.invoice.payment_term.line,month:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,month:"
 msgid "September"
 msgstr "September"
 
-msgctxt "selection:account.invoice.payment_term.line,type:"
-msgid "Fixed"
-msgstr "Fiksna cena"
-
-msgctxt "selection:account.invoice.payment_term.line,type:"
-msgid "Percentage on Remainder"
-msgstr "Odstotek preostanka"
-
-msgctxt "selection:account.invoice.payment_term.line,type:"
-msgid "Percentage on Total"
-msgstr "Odstotek zneska"
-
-msgctxt "selection:account.invoice.payment_term.line,type:"
-msgid "Remainder"
-msgstr "Preostanek"
-
-msgctxt "selection:account.invoice.payment_term.line,weekday:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,weekday:"
 msgid ""
 msgstr ""
 
-msgctxt "selection:account.invoice.payment_term.line,weekday:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,weekday:"
 msgid "Friday"
 msgstr "Petek"
 
-msgctxt "selection:account.invoice.payment_term.line,weekday:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,weekday:"
 msgid "Monday"
 msgstr "Ponedeljek"
 
-msgctxt "selection:account.invoice.payment_term.line,weekday:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,weekday:"
 msgid "Saturday"
 msgstr "Sobota"
 
-msgctxt "selection:account.invoice.payment_term.line,weekday:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,weekday:"
 msgid "Sunday"
 msgstr "Nedelja"
 
-msgctxt "selection:account.invoice.payment_term.line,weekday:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,weekday:"
 msgid "Thursday"
 msgstr "Četrtek"
 
-msgctxt "selection:account.invoice.payment_term.line,weekday:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,weekday:"
 msgid "Tuesday"
 msgstr "Torek"
 
-msgctxt "selection:account.invoice.payment_term.line,weekday:"
+msgctxt "selection:account.invoice.payment_term.line.relativedelta,weekday:"
 msgid "Wednesday"
 msgstr "Sreda"
 
@@ -1558,13 +1627,25 @@ msgctxt "view:account.invoice.pay.start:"
 msgid "Pay Invoice"
 msgstr "Plačilo računa"
 
+msgctxt "view:account.invoice.payment_term.line.relativedelta:"
+msgid "Payment Term Line Relative Delta"
+msgstr "Obrok postavke plačilnega roka"
+
+msgctxt "view:account.invoice.payment_term.line.relativedelta:"
+msgid "Payment Term Line Relative Deltas"
+msgstr "Obroki postavk plačilnega roka"
+
 msgctxt "view:account.invoice.payment_term.line:"
 msgid "Payment Term Line"
 msgstr "Postavka plačilnega roka"
 
-msgctxt "view:account.invoice.payment_term.line:"
-msgid "Payment Term Lines"
-msgstr "Postavke plačilnih rokov"
+msgctxt "view:account.invoice.payment_term.test.result:"
+msgid "Payment Term Test Results"
+msgstr "Rezultati preizkusa plačilnega roka"
+
+msgctxt "view:account.invoice.payment_term.test:"
+msgid "Payment Term Test"
+msgstr "Preizkus plačilnega roka"
 
 msgctxt "view:account.invoice.payment_term:"
 msgid "Payment Term"
@@ -1611,6 +1692,14 @@ msgid "Are you sure to cancel the invoice?"
 msgstr "Ali res želite preklicati račun?"
 
 msgctxt "view:account.invoice:"
+msgid "Cancel"
+msgstr "Prekliči"
+
+msgctxt "view:account.invoice:"
+msgid "Draft"
+msgstr "Priprava"
+
+msgctxt "view:account.invoice:"
 msgid "Invoice"
 msgstr "Račun"
 
@@ -1627,6 +1716,10 @@ msgid "Payment"
 msgstr "Plačilo"
 
 msgctxt "view:account.invoice:"
+msgid "Post"
+msgstr "Vknjižba"
+
+msgctxt "view:account.invoice:"
 msgid "Validate"
 msgstr "Odobritev"
 
@@ -1683,17 +1776,21 @@ msgid "Cancel"
 msgstr "Prekliči"
 
 msgctxt "wizard_button:account.invoice.pay,ask,pay:"
-msgid "Ok"
+msgid "OK"
 msgstr "V redu"
 
 msgctxt "wizard_button:account.invoice.pay,start,choice:"
-msgid "Ok"
+msgid "OK"
 msgstr "V redu"
 
 msgctxt "wizard_button:account.invoice.pay,start,end:"
 msgid "Cancel"
 msgstr "Prekliči"
 
+msgctxt "wizard_button:account.invoice.payment_term.test,test,end:"
+msgid "Close"
+msgstr "Zapri"
+
 msgctxt "wizard_button:account.invoice.print,warning,end:"
 msgid "Cancel"
 msgstr "Prekliči"
diff --git a/party.py b/party.py
index ebbf2af..769f514 100644
--- a/party.py
+++ b/party.py
@@ -1,5 +1,5 @@
-#This file is part of Tryton.  The COPYRIGHT file at the top level of
-#this repository contains the full copyright notices and license terms.
+# This file is part of Tryton.  The COPYRIGHT file at the top level of
+# this repository contains the full copyright notices and license terms.
 from trytond.model import ModelView, ModelSQL, fields
 from trytond.pool import Pool, PoolMeta
 
diff --git a/party.xml b/party.xml
index 46a2f46..9bacb57 100644
--- a/party.xml
+++ b/party.xml
@@ -23,7 +23,8 @@ this repository contains the full copyright notices and license terms. -->
         <record model="ir.action.act_window" id="act_invoice_form2">
             <field name="name">Invoices</field>
             <field name="res_model">account.invoice</field>
-            <field name="domain">[('party', 'in', Eval('active_ids'))]</field>
+            <field name="domain"
+                eval="[('party', 'in', Eval('active_ids'))]" pyson="1"/>
         </record>
         <record model="ir.action.keyword"
                 id="act_open_invoice_keyword1">
diff --git a/payment_term.py b/payment_term.py
index 7fe4162..55a9c0c 100644
--- a/payment_term.py
+++ b/payment_term.py
@@ -1,14 +1,19 @@
-#This file is part of Tryton.  The COPYRIGHT file at the top level of
-#this repository contains the full copyright notices and license terms.
+# This file is part of Tryton.  The COPYRIGHT file at the top level of
+# this repository contains the full copyright notices and license terms.
 from decimal import Decimal
 from dateutil.relativedelta import relativedelta
+
+from sql import Null, Column
+
 from trytond.model import ModelView, ModelSQL, fields
 from trytond import backend
 from trytond.pyson import Eval
 from trytond.transaction import Transaction
 from trytond.pool import Pool
+from trytond.wizard import Wizard, StateView, Button
 
-__all__ = ['PaymentTerm', 'PaymentTermLine']
+__all__ = ['PaymentTerm', 'PaymentTermLine', 'PaymentTermLineRelativeDelta',
+    'TestPaymentTerm', 'TestPaymentTermView', 'TestPaymentTermViewResult']
 
 
 class PaymentTerm(ModelSQL, ModelView):
@@ -55,7 +60,7 @@ class PaymentTerm(ModelSQL, ModelView):
         If specified, date will be used as the start date, otherwise current
         date will be used.
         """
-        #TODO implement business_days
+        # TODO implement business_days
         # http://pypi.python.org/pypi/BusinessHours/
         Date = Pool().get('ir.date')
 
@@ -121,44 +126,13 @@ class PaymentTermLine(ModelSQL, ModelView):
             }, depends=['type'])
     currency_digits = fields.Function(fields.Integer('Currency Digits'),
         'on_change_with_currency_digits')
-    day = fields.Integer('Day of Month')
-    month = fields.Selection([
-            (None, ''),
-            ('1', 'January'),
-            ('2', 'February'),
-            ('3', 'March'),
-            ('4', 'April'),
-            ('5', 'May'),
-            ('6', 'June'),
-            ('7', 'July'),
-            ('8', 'August'),
-            ('9', 'September'),
-            ('10', 'October'),
-            ('11', 'November'),
-            ('12', 'December'),
-            ], 'Month', sort=False)
-    weekday = fields.Selection([
-            (None, ''),
-            ('0', 'Monday'),
-            ('1', 'Tuesday'),
-            ('2', 'Wednesday'),
-            ('3', 'Thursday'),
-            ('4', 'Friday'),
-            ('5', 'Saturday'),
-            ('6', 'Sunday'),
-            ], 'Day of Week', sort=False)
-    months = fields.Integer('Number of Months', required=True)
-    weeks = fields.Integer('Number of Weeks', required=True)
-    days = fields.Integer('Number of Days', required=True)
+    relativedeltas = fields.One2Many(
+        'account.invoice.payment_term.line.relativedelta', 'line', 'Deltas')
 
     @classmethod
     def __setup__(cls):
         super(PaymentTermLine, cls).__setup__()
         cls._order.insert(0, ('sequence', 'ASC'))
-        cls._sql_constraints += [
-            ('day', 'CHECK(day BETWEEN 1 AND 31)',
-                'Day of month must be between 1 and 31.'),
-            ]
         cls._error_messages.update({
                 'invalid_percentage_and_divisor': ('Percentage and '
                     'Divisor values are not consistent in line "%(line)s" '
@@ -201,7 +175,7 @@ class PaymentTermLine(ModelSQL, ModelView):
     @staticmethod
     def order_sequence(tables):
         table, _ = tables[None]
-        return [table.sequence == None, table.sequence]
+        return [table.sequence == Null, table.sequence]
 
     @staticmethod
     def default_currency_digits():
@@ -211,46 +185,30 @@ class PaymentTermLine(ModelSQL, ModelView):
     def default_type():
         return 'remainder'
 
-    @staticmethod
-    def default_months():
-        return 0
-
-    @staticmethod
-    def default_weeks():
-        return 0
-
-    @staticmethod
-    def default_days():
-        return 0
-
     @fields.depends('type')
     def on_change_type(self):
-        res = {}
         if self.type != 'fixed':
-            res['amount'] = Decimal('0.0')
-            res['currency'] = None
+            self.amount = Decimal('0.0')
+            self.currency = None
         if self.type not in ('percent', 'percent_on_total'):
-            res['percentage'] = Decimal('0.0')
-            res['divisor'] = Decimal('0.0')
-        return res
+            self.percentage = Decimal('0.0')
+            self.divisor = Decimal('0.0')
 
     @fields.depends('percentage')
     def on_change_percentage(self):
         if not self.percentage:
-            return {'divisor': 0.0}
-        return {
-            'divisor': self.round(Decimal('100.0') / self.percentage,
-                self.__class__.divisor.digits[1]),
-            }
+            self.divisor = 0.0
+        else:
+            self.divisor = self.round(Decimal('100.0') / self.percentage,
+                self.__class__.divisor.digits[1])
 
     @fields.depends('divisor')
     def on_change_divisor(self):
         if not self.divisor:
-            return {'percentage': 0.0}
-        return {
-            'percentage': self.round(Decimal('100.0') / self.divisor,
-                self.__class__.percentage.digits[1]),
-            }
+            self.percentage = 0.0
+        else:
+            self.percentage = self.round(Decimal('100.0') / self.divisor,
+                self.__class__.percentage.digits[1])
 
     @fields.depends('currency')
     def on_change_with_currency_digits(self, name=None):
@@ -269,7 +227,9 @@ class PaymentTermLine(ModelSQL, ModelView):
             }
 
     def get_date(self, date):
-        return date + relativedelta(**self.get_delta())
+        for relativedelta_ in self.relativedeltas:
+            date += relativedelta_.get()
+        return date
 
     def get_value(self, remainder, amount, currency):
         Currency = Pool().get('currency.currency')
@@ -323,3 +283,169 @@ class PaymentTermLine(ModelSQL, ModelView):
                         'line': line.rec_name,
                         'term': line.payment.rec_name,
                         })
+
+
+class PaymentTermLineRelativeDelta(ModelSQL, ModelView):
+    'Payment Term Line Relative Delta'
+    __name__ = 'account.invoice.payment_term.line.relativedelta'
+    sequence = fields.Integer('Sequence')
+    line = fields.Many2One('account.invoice.payment_term.line',
+        'Payment Term Line', required=True, ondelete='CASCADE')
+    day = fields.Integer('Day of Month',
+        domain=['OR',
+            ('day', '=', None),
+            [('day', '>=', 1), ('day', '<=', 31)],
+            ])
+    month = fields.Selection([
+            (None, ''),
+            ('1', 'January'),
+            ('2', 'February'),
+            ('3', 'March'),
+            ('4', 'April'),
+            ('5', 'May'),
+            ('6', 'June'),
+            ('7', 'July'),
+            ('8', 'August'),
+            ('9', 'September'),
+            ('10', 'October'),
+            ('11', 'November'),
+            ('12', 'December'),
+            ], 'Month', sort=False)
+    weekday = fields.Selection([
+            (None, ''),
+            ('0', 'Monday'),
+            ('1', 'Tuesday'),
+            ('2', 'Wednesday'),
+            ('3', 'Thursday'),
+            ('4', 'Friday'),
+            ('5', 'Saturday'),
+            ('6', 'Sunday'),
+            ], 'Day of Week', sort=False)
+    months = fields.Integer('Number of Months', required=True)
+    weeks = fields.Integer('Number of Weeks', required=True)
+    days = fields.Integer('Number of Days', required=True)
+
+    @classmethod
+    def __setup__(cls):
+        super(PaymentTermLineRelativeDelta, cls).__setup__()
+        cls._order.insert(0, ('sequence', 'ASC'))
+
+    @classmethod
+    def __register__(cls, module_name):
+        TableHandler = backend.get('TableHandler')
+        cursor = Transaction().cursor
+        pool = Pool()
+        Line = pool.get('account.invoice.payment_term.line')
+        sql_table = cls.__table__()
+        line = Line.__table__()
+
+        super(PaymentTermLineRelativeDelta, cls).__register__(module_name)
+
+        line_table = TableHandler(cursor, Line, module_name)
+
+        # Migration from 3.4
+        fields = ['day', 'month', 'weekday', 'months', 'weeks', 'days']
+        if any(line_table.column_exist(f) for f in fields):
+            columns = ([line.id.as_('line')]
+                + [Column(line, f) for f in fields])
+            cursor.execute(*sql_table.insert(
+                    columns=[sql_table.line]
+                    + [Column(sql_table, f) for f in fields],
+                    values=line.select(*columns)))
+            for field in fields:
+                line_table.drop_column(field, exception=True)
+
+    @staticmethod
+    def order_sequence(tables):
+        table, _ = tables[None]
+        return [table.sequence == Null, table.sequence]
+
+    @staticmethod
+    def default_months():
+        return 0
+
+    @staticmethod
+    def default_weeks():
+        return 0
+
+    @staticmethod
+    def default_days():
+        return 0
+
+    def get(self):
+        "Return the relativedelta"
+        return relativedelta(
+            day=self.day,
+            month=int(self.month) if self.month else None,
+            days=self.days,
+            weeks=self.weeks,
+            months=self.months,
+            weekday=int(self.weekday) if self.weekday else None,
+            )
+
+
+class TestPaymentTerm(Wizard):
+    'Test Payment Term'
+    __name__ = 'account.invoice.payment_term.test'
+    start_state = 'test'
+    test = StateView('account.invoice.payment_term.test',
+        'account_invoice.payment_term_test_view_form',
+        [Button('Close', 'end', 'tryton-close', default=True)])
+
+    def default_test(self, fields):
+        context = Transaction().context
+        default = {}
+        if context['active_model'] == 'account.invoice.payment_term':
+            default['payment_term'] = context['active_id']
+        return default
+
+
+class TestPaymentTermView(ModelView):
+    'Test Payment Term'
+    __name__ = 'account.invoice.payment_term.test'
+    payment_term = fields.Many2One('account.invoice.payment_term',
+        'Payment Term', required=True)
+    date = fields.Date('Date')
+    amount = fields.Numeric('Amount', required=True,
+        digits=(16, Eval('currency_digits', 2)), depends=['currency_digits'])
+    currency = fields.Many2One('currency.currency', 'Currency', required=True)
+    currency_digits = fields.Integer('Currency Digits')
+    result = fields.One2Many('account.invoice.payment_term.test.result',
+        None, 'Result', readonly=True)
+
+    @staticmethod
+    def default_currency():
+        pool = Pool()
+        Company = pool.get('company.company')
+        company = Transaction().context.get('company')
+        if company:
+            return Company(company).currency.id
+
+    @fields.depends('currency')
+    def on_change_with_currency_digits(self):
+        if self.currency:
+            return self.currency.digits
+        return 2
+
+    @fields.depends('payment_term', 'date', 'amount', 'currency', 'result')
+    def on_change_with_result(self):
+        pool = Pool()
+        Result = pool.get('account.invoice.payment_term.test.result')
+        result = []
+        if (self.payment_term and self.amount and self.currency):
+            for date, amount in self.payment_term.compute(
+                    self.amount, self.currency, self.date):
+                result.append(Result(
+                        date=date, amount=amount,
+                        currency_digits=self.currency.digits))
+        self.result = result
+        return self._changed_values.get('result', [])
+
+
+class TestPaymentTermViewResult(ModelView):
+    'Test Payment Term'
+    __name__ = 'account.invoice.payment_term.test.result'
+    date = fields.Date('Date', readonly=True)
+    amount = fields.Numeric('Amount', readonly=True,
+        digits=(16, Eval('currency_digits', 2)), depends=['currency_digits'])
+    currency_digits = fields.Integer('Currency Digits')
diff --git a/payment_term.xml b/payment_term.xml
index 9d13d89..948ac76 100644
--- a/payment_term.xml
+++ b/payment_term.xml
@@ -85,5 +85,68 @@ this repository contains the full copyright notices and license terms. -->
             <field name="perm_delete" eval="True"/>
         </record>
 
+        <record model="ir.ui.view"
+            id="payment_term_line_relativedelta_view_list">
+            <field name="model">account.invoice.payment_term.line.relativedelta</field>
+            <field name="type">tree</field>
+            <field name="priority" eval="10"/>
+            <field name="name">payment_term_line_relativedelta_list</field>
+        </record>
+        <record model="ir.ui.view"
+            id="payment_term_line_relativedelta_view_list_sequence">
+            <field name="model">account.invoice.payment_term.line.relativedelta</field>
+            <field name="type">tree</field>
+            <field name="priority" eval="20"/>
+            <field name="name">payment_term_line_relativedelta_list_sequence</field>
+        </record>
+
+        <record model="ir.ui.view" id="payment_term_line_relativedelta_view_form">
+            <field name="model">account.invoice.payment_term.line.relativedelta</field>
+            <field name="type">form</field>
+            <field name="name">payment_term_line_relativedelta_form</field>
+        </record>
+
+        <record model="ir.model.access" id="access_payment_term_line_relativedelta">
+            <field name="model"
+                search="[('model', '=', 'account.invoice.payment_term.line.relativedelta')]"/>
+            <field name="perm_read" eval="True"/>
+            <field name="perm_write" eval="False"/>
+            <field name="perm_create" eval="False"/>
+            <field name="perm_delete" eval="False"/>
+        </record>
+        <record model="ir.model.access"
+            id="access_payment_term_line_relativedelta_account_admin">
+            <field name="model"
+                search="[('model', '=', 'account.invoice.payment_term.line.relativedelta')]"/>
+            <field name="group" ref="account.group_account_admin"/>
+            <field name="perm_read" eval="True"/>
+            <field name="perm_write" eval="True"/>
+            <field name="perm_create" eval="True"/>
+            <field name="perm_delete" eval="True"/>
+        </record>
+
+        <record model="ir.action.wizard" id="wizard_payment_term_test">
+            <field name="name">Test Payment Term</field>
+            <field name="wiz_name">account.invoice.payment_term.test</field>
+        </record>
+        <record model="ir.action.keyword"
+            id="wizard_payment_term_test_keyword1">
+            <field name="keyword">form_action</field>
+            <field name="model">account.invoice.payment_term,-1</field>
+            <field name="action" ref="wizard_payment_term_test"/>
+        </record>
+        <menuitem parent="menu_payment_terms_configuration"
+            action="wizard_payment_term_test" id="menu_payment_term_test"/>
+
+        <record model="ir.ui.view" id="payment_term_test_view_form">
+            <field name="model">account.invoice.payment_term.test</field>
+            <field name="type">form</field>
+            <field name="name">payment_term_test_form</field>
+        </record>
+        <record model="ir.ui.view" id="payment_term_test_result_view_list">
+            <field name="model">account.invoice.payment_term.test.result</field>
+            <field name="type">tree</field>
+            <field name="name">payment_term_test_result_list</field>
+        </record>
     </data>
 </tryton>
diff --git a/setup.py b/setup.py
index a943651..a49de91 100644
--- a/setup.py
+++ b/setup.py
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
-#This file is part of Tryton.  The COPYRIGHT file at the top level of
-#this repository contains the full copyright notices and license terms.
+# This file is part of Tryton.  The COPYRIGHT file at the top level of
+# this repository contains the full copyright notices and license terms.
 
 from setuptools import setup
 import re
@@ -41,7 +41,7 @@ if minor_version % 2:
         'hg+http://hg.tryton.org/modules/%s#egg=%s-%s' % (
             name[8:], name, version))
 
-requires = ['python-dateutil', 'python-sql']
+requires = ['python-dateutil', 'python-sql >= 0.4']
 for dep in info.get('depends', []):
     if not re.match(r'(ir|res|webdav)(\W|$)', dep):
         requires.append(get_require_version('trytond_%s' % dep))
@@ -92,6 +92,8 @@ setup(name=name,
         'Natural Language :: Spanish',
         'Operating System :: OS Independent',
         'Programming Language :: Python :: 2.7',
+        'Programming Language :: Python :: Implementation :: CPython',
+        'Programming Language :: Python :: Implementation :: PyPy',
         'Topic :: Office/Business',
         'Topic :: Office/Business :: Financial :: Accounting',
         ],
diff --git a/tests/__init__.py b/tests/__init__.py
index bea5dec..b2f4e54 100644
--- a/tests/__init__.py
+++ b/tests/__init__.py
@@ -1,5 +1,5 @@
-#This file is part of Tryton.  The COPYRIGHT file at the top level of
-#this repository contains the full copyright notices and license terms.
+# This file is part of Tryton.  The COPYRIGHT file at the top level of
+# this repository contains the full copyright notices and license terms.
 
 from .test_account_invoice import suite
 
diff --git a/tests/scenario_invoice.rst b/tests/scenario_invoice.rst
index cfe3bae..1f56443 100644
--- a/tests/scenario_invoice.rst
+++ b/tests/scenario_invoice.rst
@@ -8,6 +8,12 @@ Imports::
     >>> from decimal import Decimal
     >>> from operator import attrgetter
     >>> from proteus import config, Model, Wizard
+    >>> from trytond.modules.company.tests.tools import create_company, \
+    ...     get_company
+    >>> from trytond.modules.account.tests.tools import create_fiscalyear, \
+    ...     create_chart, get_accounts, create_tax, set_tax_code
+    >>> from.trytond.modules.account_invoice.tests.tools import \
+    ...     set_fiscalyear_invoice_sequences
     >>> today = datetime.date.today()
 
 Create database::
@@ -20,122 +26,38 @@ Install account_invoice::
     >>> Module = Model.get('ir.module.module')
     >>> account_invoice_module, = Module.find(
     ...     [('name', '=', 'account_invoice')])
-    >>> Module.install([account_invoice_module.id], config.context)
+    >>> account_invoice_module.click('install')
     >>> Wizard('ir.module.module.install_upgrade').execute('upgrade')
 
 Create company::
 
-    >>> Currency = Model.get('currency.currency')
-    >>> CurrencyRate = Model.get('currency.currency.rate')
-    >>> currencies = Currency.find([('code', '=', 'USD')])
-    >>> if not currencies:
-    ...     currency = Currency(name='US Dollar', symbol=u'$', code='USD',
-    ...         rounding=Decimal('0.01'), mon_grouping='[]',
-    ...         mon_decimal_point='.')
-    ...     currency.save()
-    ...     CurrencyRate(date=today + relativedelta(month=1, day=1),
-    ...         rate=Decimal('1.0'), currency=currency).save()
-    ... else:
-    ...     currency, = currencies
-    >>> Company = Model.get('company.company')
-    >>> Party = Model.get('party.party')
-    >>> company_config = Wizard('company.company.config')
-    >>> company_config.execute('company')
-    >>> company = company_config.form
-    >>> party = Party(name='Dunder Mifflin')
-    >>> party.save()
-    >>> company.party = party
-    >>> company.currency = currency
-    >>> company_config.execute('add')
-    >>> company, = Company.find([])
-
-Reload the context::
-
-    >>> User = Model.get('res.user')
-    >>> config._context = User.get_preferences(True, config.context)
+    >>> _ = create_company()
+    >>> company = get_company()
 
 Create fiscal year::
 
-    >>> FiscalYear = Model.get('account.fiscalyear')
-    >>> Sequence = Model.get('ir.sequence')
-    >>> SequenceStrict = Model.get('ir.sequence.strict')
-    >>> fiscalyear = FiscalYear(name=str(today.year))
-    >>> fiscalyear.start_date = today + relativedelta(month=1, day=1)
-    >>> fiscalyear.end_date = today + relativedelta(month=12, day=31)
-    >>> fiscalyear.company = company
-    >>> post_move_seq = Sequence(name=str(today.year), code='account.move',
-    ...     company=company)
-    >>> post_move_seq.save()
-    >>> fiscalyear.post_move_sequence = post_move_seq
-    >>> invoice_seq = SequenceStrict(name=str(today.year),
-    ...     code='account.invoice', company=company)
-    >>> invoice_seq.save()
-    >>> fiscalyear.out_invoice_sequence = invoice_seq
-    >>> fiscalyear.in_invoice_sequence = invoice_seq
-    >>> fiscalyear.out_credit_note_sequence = invoice_seq
-    >>> fiscalyear.in_credit_note_sequence = invoice_seq
-    >>> fiscalyear.save()
-    >>> FiscalYear.create_period([fiscalyear.id], config.context)
+    >>> fiscalyear = set_fiscalyear_invoice_sequences(
+    ...     create_fiscalyear(company))
+    >>> fiscalyear.click('create_period')
+    >>> period = fiscalyear.periods[0]
 
 Create chart of accounts::
 
-    >>> AccountTemplate = Model.get('account.account.template')
-    >>> Account = Model.get('account.account')
-    >>> account_template, = AccountTemplate.find([('parent', '=', None)])
-    >>> create_chart = Wizard('account.create_chart')
-    >>> create_chart.execute('account')
-    >>> create_chart.form.account_template = account_template
-    >>> create_chart.form.company = company
-    >>> create_chart.execute('create_account')
-    >>> receivable, = Account.find([
-    ...         ('kind', '=', 'receivable'),
-    ...         ('company', '=', company.id),
-    ...         ])
-    >>> payable, = Account.find([
-    ...         ('kind', '=', 'payable'),
-    ...         ('company', '=', company.id),
-    ...         ])
-    >>> revenue, = Account.find([
-    ...         ('kind', '=', 'revenue'),
-    ...         ('company', '=', company.id),
-    ...         ])
-    >>> expense, = Account.find([
-    ...         ('kind', '=', 'expense'),
-    ...         ('company', '=', company.id),
-    ...         ])
-    >>> account_tax, = Account.find([
-    ...         ('kind', '=', 'other'),
-    ...         ('company', '=', company.id),
-    ...         ('name', '=', 'Main Tax'),
-    ...         ])
-    >>> create_chart.form.account_receivable = receivable
-    >>> create_chart.form.account_payable = payable
-    >>> create_chart.execute('create_properties')
+    >>> _ = create_chart(company)
+    >>> accounts = get_accounts(company)
+    >>> receivable = accounts['receivable']
+    >>> revenue = accounts['revenue']
+    >>> expense = accounts['expense']
+    >>> account_tax = accounts['tax']
 
 Create tax::
 
-    >>> TaxCode = Model.get('account.tax.code')
-    >>> Tax = Model.get('account.tax')
-    >>> tax = Tax()
-    >>> tax.name = 'Tax'
-    >>> tax.description = 'Tax'
-    >>> tax.type = 'percentage'
-    >>> tax.rate = Decimal('.10')
-    >>> tax.invoice_account = account_tax
-    >>> tax.credit_note_account = account_tax
-    >>> invoice_base_code = TaxCode(name='invoice base')
-    >>> invoice_base_code.save()
-    >>> tax.invoice_base_code = invoice_base_code
-    >>> invoice_tax_code = TaxCode(name='invoice tax')
-    >>> invoice_tax_code.save()
-    >>> tax.invoice_tax_code = invoice_tax_code
-    >>> credit_note_base_code = TaxCode(name='credit note base')
-    >>> credit_note_base_code.save()
-    >>> tax.credit_note_base_code = credit_note_base_code
-    >>> credit_note_tax_code = TaxCode(name='credit note tax')
-    >>> credit_note_tax_code.save()
-    >>> tax.credit_note_tax_code = credit_note_tax_code
+    >>> tax = set_tax_code(create_tax(Decimal('.10')))
     >>> tax.save()
+    >>> invoice_base_code = tax.invoice_base_code
+    >>> invoice_tax_code = tax.invoice_tax_code
+    >>> credit_note_base_code = tax.credit_note_base_code
+    >>> credit_note_tax_code = tax.credit_note_tax_code
 
 Create party::
 
@@ -166,13 +88,11 @@ Create product::
 Create payment term::
 
     >>> PaymentTerm = Model.get('account.invoice.payment_term')
-    >>> PaymentTermLine = Model.get('account.invoice.payment_term.line')
     >>> payment_term = PaymentTerm(name='Term')
-    >>> payment_term_line = PaymentTermLine(type='percent', days=20,
-    ...     percentage=Decimal(50))
-    >>> payment_term.lines.append(payment_term_line)
-    >>> payment_term_line = PaymentTermLine(type='remainder', days=40)
-    >>> payment_term.lines.append(payment_term_line)
+    >>> line = payment_term.lines.new(type='percent', percentage=Decimal(50))
+    >>> delta = line.relativedeltas.new(days=20)
+    >>> line = payment_term.lines.new(type='remainder')
+    >>> delta = line.relativedeltas.new(days=40)
     >>> payment_term.save()
 
 Create invoice::
@@ -198,9 +118,7 @@ Create invoice::
     Decimal('20.00')
     >>> invoice.total_amount
     Decimal('240.00')
-    >>> invoice.save()
-    >>> Invoice.post([invoice.id], config.context)
-    >>> invoice.reload()
+    >>> invoice.click('post')
     >>> invoice.state
     u'posted'
     >>> invoice.untaxed_amount
@@ -278,8 +196,6 @@ Create empty invoice::
     >>> invoice = Invoice()
     >>> invoice.party = party
     >>> invoice.payment_term = payment_term
-    >>> invoice.save()
-    >>> Invoice.post([invoice.id], config.context)
-    >>> invoice.reload()
+    >>> invoice.click('post')
     >>> invoice.state
     u'paid'
diff --git a/tests/scenario_invoice_alternate_currency.rst b/tests/scenario_invoice_alternate_currency.rst
index 20bc91e..0a9d849 100644
--- a/tests/scenario_invoice_alternate_currency.rst
+++ b/tests/scenario_invoice_alternate_currency.rst
@@ -9,6 +9,13 @@ Imports::
     >>> from decimal import Decimal
     >>> from operator import attrgetter
     >>> from proteus import config, Model, Wizard
+    >>> from trytond.modules.currency.tests.tools import get_currency
+    >>> from trytond.modules.company.tests.tools import create_company, \
+    ...     get_company
+    >>> from trytond.modules.account.tests.tools import create_fiscalyear, \
+    ...     create_chart, get_accounts, create_tax, set_tax_code
+    >>> from.trytond.modules.account_invoice.tests.tools import \
+    ...     set_fiscalyear_invoice_sequences
     >>> today = datetime.date.today()
 
 Create database::
@@ -21,133 +28,38 @@ Install account_invoice::
     >>> Module = Model.get('ir.module.module')
     >>> account_invoice_module, = Module.find(
     ...     [('name', '=', 'account_invoice')])
-    >>> Module.install([account_invoice_module.id], config.context)
+    >>> account_invoice_module.click('install')
     >>> Wizard('ir.module.module.install_upgrade').execute('upgrade')
 
 Create company::
 
-    >>> Currency = Model.get('currency.currency')
-    >>> CurrencyRate = Model.get('currency.currency.rate')
-    >>> currencies = Currency.find([('code', '=', 'USD')])
-    >>> if not currencies:
-    ...     currency = Currency(name='US Dollar', symbol=u'$', code='USD',
-    ...         rounding=Decimal('0.01'), mon_grouping='[]',
-    ...         mon_decimal_point='.')
-    ...     currency.save()
-    ...     CurrencyRate(date=today + relativedelta(month=1, day=1),
-    ...         rate=Decimal('1.0'), currency=currency).save()
-    ... else:
-    ...     currency, = currencies
-    >>> currencies = Currency.find([('code', '=', 'EUR')])
-    >>> if not currencies:
-    ...     eur = Currency(name='Euro', symbol=u'€', code='EUR',
-    ...         rounding=Decimal('0.01'), mon_grouping='[]',
-    ...         mon_decimal_point='.')
-    ...     eur.save()
-    ...     CurrencyRate(date=today + relativedelta(month=1, day=1),
-    ...         rate=Decimal('2.0'), currency=eur).save()
-    ... else:
-    ...     eur, = currencies
-
-    >>> Company = Model.get('company.company')
-    >>> Party = Model.get('party.party')
-    >>> company_config = Wizard('company.company.config')
-    >>> company_config.execute('company')
-    >>> company = company_config.form
-    >>> party = Party(name='Dunder Mifflin')
-    >>> party.save()
-    >>> company.party = party
-    >>> company.currency = currency
-    >>> company_config.execute('add')
-    >>> company, = Company.find([])
-
-Reload the context::
-
-    >>> User = Model.get('res.user')
-    >>> config._context = User.get_preferences(True, config.context)
+    >>> currency = get_currency('USD')
+    >>> eur = get_currency('EUR')
+    >>> _ = create_company(currency=currency)
+    >>> company = get_company()
 
 Create fiscal year::
 
-    >>> FiscalYear = Model.get('account.fiscalyear')
-    >>> Sequence = Model.get('ir.sequence')
-    >>> SequenceStrict = Model.get('ir.sequence.strict')
-    >>> fiscalyear = FiscalYear(name=str(today.year))
-    >>> fiscalyear.start_date = today + relativedelta(month=1, day=1)
-    >>> fiscalyear.end_date = today + relativedelta(month=12, day=31)
-    >>> fiscalyear.company = company
-    >>> post_move_seq = Sequence(name=str(today.year), code='account.move',
-    ...     company=company)
-    >>> post_move_seq.save()
-    >>> fiscalyear.post_move_sequence = post_move_seq
-    >>> invoice_seq = SequenceStrict(name=str(today.year),
-    ...     code='account.invoice', company=company)
-    >>> invoice_seq.save()
-    >>> fiscalyear.out_invoice_sequence = invoice_seq
-    >>> fiscalyear.in_invoice_sequence = invoice_seq
-    >>> fiscalyear.out_credit_note_sequence = invoice_seq
-    >>> fiscalyear.in_credit_note_sequence = invoice_seq
-    >>> fiscalyear.save()
-    >>> FiscalYear.create_period([fiscalyear.id], config.context)
+    >>> fiscalyear = set_fiscalyear_invoice_sequences(
+    ...     create_fiscalyear(company))
+    >>> fiscalyear.click('create_period')
 
 Create chart of accounts::
 
-    >>> AccountTemplate = Model.get('account.account.template')
-    >>> Account = Model.get('account.account')
-    >>> account_template, = AccountTemplate.find([('parent', '=', None)])
-    >>> create_chart = Wizard('account.create_chart')
-    >>> create_chart.execute('account')
-    >>> create_chart.form.account_template = account_template
-    >>> create_chart.form.company = company
-    >>> create_chart.execute('create_account')
-    >>> receivable, = Account.find([
-    ...         ('kind', '=', 'receivable'),
-    ...         ('company', '=', company.id),
-    ...         ])
-    >>> payable, = Account.find([
-    ...         ('kind', '=', 'payable'),
-    ...         ('company', '=', company.id),
-    ...         ])
-    >>> revenue, = Account.find([
-    ...         ('kind', '=', 'revenue'),
-    ...         ('company', '=', company.id),
-    ...         ])
-    >>> expense, = Account.find([
-    ...         ('kind', '=', 'expense'),
-    ...         ('company', '=', company.id),
-    ...         ])
-    >>> account_tax, = Account.find([
-    ...         ('kind', '=', 'other'),
-    ...         ('company', '=', company.id),
-    ...         ('name', '=', 'Main Tax'),
-    ...         ])
-    >>> create_chart.form.account_receivable = receivable
-    >>> create_chart.form.account_payable = payable
-    >>> create_chart.execute('create_properties')
+    >>> _ = create_chart(company)
+    >>> accounts = get_accounts(company)
+    >>> revenue = accounts['revenue']
+    >>> expense = accounts['expense']
+    >>> account_tax = accounts['tax']
 
 Create tax::
 
-    >>> TaxCode = Model.get('account.tax.code')
-    >>> Tax = Model.get('account.tax')
-    >>> tax = Tax()
-    >>> tax.name = 'Tax'
-    >>> tax.description = 'Tax'
-    >>> tax.type = 'percentage'
-    >>> tax.rate = Decimal('.10')
-    >>> tax.invoice_account = account_tax
-    >>> tax.credit_note_account = account_tax
-    >>> invoice_base_code = TaxCode(name='invoice base')
-    >>> invoice_base_code.save()
-    >>> tax.invoice_base_code = invoice_base_code
-    >>> invoice_tax_code = TaxCode(name='invoice tax')
-    >>> invoice_tax_code.save()
-    >>> tax.invoice_tax_code = invoice_tax_code
-    >>> credit_note_base_code = TaxCode(name='credit note base')
-    >>> credit_note_base_code.save()
-    >>> tax.credit_note_base_code = credit_note_base_code
-    >>> credit_note_tax_code = TaxCode(name='credit note tax')
-    >>> credit_note_tax_code.save()
-    >>> tax.credit_note_tax_code = credit_note_tax_code
+    >>> tax = set_tax_code(create_tax(Decimal('.10')))
     >>> tax.save()
+    >>> invoice_base_code = tax.invoice_base_code
+    >>> invoice_tax_code = tax.invoice_tax_code
+    >>> credit_note_base_code = tax.credit_note_base_code
+    >>> credit_note_tax_code = tax.credit_note_tax_code
 
 Create party::
 
@@ -178,13 +90,11 @@ Create product::
 Create payment term::
 
     >>> PaymentTerm = Model.get('account.invoice.payment_term')
-    >>> PaymentTermLine = Model.get('account.invoice.payment_term.line')
     >>> payment_term = PaymentTerm(name='Term')
-    >>> payment_term_line = PaymentTermLine(type='percent', days=20,
-    ...     percentage=Decimal(50))
-    >>> payment_term.lines.append(payment_term_line)
-    >>> payment_term_line = PaymentTermLine(type='remainder', days=40)
-    >>> payment_term.lines.append(payment_term_line)
+    >>> line = payment_term.lines.new(type='percent', percentage=Decimal(50))
+    >>> delta = line.relativedeltas.new(days=20)
+    >>> line = payment_term.lines.new(type='remainder')
+    >>> delta = line.relativedeltas.new(days=40)
     >>> payment_term.save()
 
 Create invoice with alternate currency::
@@ -224,17 +134,7 @@ Create invoice with alternate currency::
 
 Create negative tax::
 
-    >>> negative_tax = Tax()
-    >>> negative_tax.name = 'Negative Tax'
-    >>> negative_tax.description = 'Negative Tax'
-    >>> negative_tax.type = 'percentage'
-    >>> negative_tax.rate = Decimal('-.10')
-    >>> negative_tax.invoice_account = account_tax
-    >>> negative_tax.credit_note_account = account_tax
-    >>> negative_tax.invoice_base_code = invoice_base_code
-    >>> negative_tax.invoice_tax_code = invoice_tax_code
-    >>> negative_tax.credit_note_base_code = credit_note_base_code
-    >>> negative_tax.credit_note_tax_code = credit_note_tax_code
+    >>> negative_tax = set_tax_code(create_tax(Decimal('-.10')))
     >>> negative_tax.save()
 
 Create invoice with alternate currency and negative taxes::
diff --git a/tests/scenario_invoice_supplier.rst b/tests/scenario_invoice_supplier.rst
index 03c6ec9..ed2192d 100644
--- a/tests/scenario_invoice_supplier.rst
+++ b/tests/scenario_invoice_supplier.rst
@@ -8,6 +8,12 @@ Imports::
     >>> from decimal import Decimal
     >>> from operator import attrgetter
     >>> from proteus import config, Model, Wizard
+    >>> from trytond.modules.company.tests.tools import create_company, \
+    ...     get_company
+    >>> from trytond.modules.account.tests.tools import create_fiscalyear, \
+    ...     create_chart, get_accounts, create_tax, set_tax_code
+    >>> from.trytond.modules.account_invoice.tests.tools import \
+    ...     set_fiscalyear_invoice_sequences
     >>> today = datetime.date.today()
 
 Create database::
@@ -20,122 +26,37 @@ Install account_invoice::
     >>> Module = Model.get('ir.module.module')
     >>> account_invoice_module, = Module.find(
     ...     [('name', '=', 'account_invoice')])
-    >>> Module.install([account_invoice_module.id], config.context)
+    >>> account_invoice_module.click('install')
     >>> Wizard('ir.module.module.install_upgrade').execute('upgrade')
 
 Create company::
 
-    >>> Currency = Model.get('currency.currency')
-    >>> CurrencyRate = Model.get('currency.currency.rate')
-    >>> currencies = Currency.find([('code', '=', 'USD')])
-    >>> if not currencies:
-    ...     currency = Currency(name='US Dollar', symbol=u'$', code='USD',
-    ...         rounding=Decimal('0.01'), mon_grouping='[]',
-    ...         mon_decimal_point='.')
-    ...     currency.save()
-    ...     CurrencyRate(date=today + relativedelta(month=1, day=1),
-    ...         rate=Decimal('1.0'), currency=currency).save()
-    ... else:
-    ...     currency, = currencies
-    >>> Company = Model.get('company.company')
-    >>> Party = Model.get('party.party')
-    >>> company_config = Wizard('company.company.config')
-    >>> company_config.execute('company')
-    >>> company = company_config.form
-    >>> party = Party(name='Dunder Mifflin')
-    >>> party.save()
-    >>> company.party = party
-    >>> company.currency = currency
-    >>> company_config.execute('add')
-    >>> company, = Company.find([])
-
-Reload the context::
-
-    >>> User = Model.get('res.user')
-    >>> config._context = User.get_preferences(True, config.context)
+    >>> _ = create_company()
+    >>> company = get_company()
 
 Create fiscal year::
 
-    >>> FiscalYear = Model.get('account.fiscalyear')
-    >>> Sequence = Model.get('ir.sequence')
-    >>> SequenceStrict = Model.get('ir.sequence.strict')
-    >>> fiscalyear = FiscalYear(name=str(today.year))
-    >>> fiscalyear.start_date = today + relativedelta(month=1, day=1)
-    >>> fiscalyear.end_date = today + relativedelta(month=12, day=31)
-    >>> fiscalyear.company = company
-    >>> post_move_seq = Sequence(name=str(today.year), code='account.move',
-    ...     company=company)
-    >>> post_move_seq.save()
-    >>> fiscalyear.post_move_sequence = post_move_seq
-    >>> invoice_seq = SequenceStrict(name=str(today.year),
-    ...     code='account.invoice', company=company)
-    >>> invoice_seq.save()
-    >>> fiscalyear.out_invoice_sequence = invoice_seq
-    >>> fiscalyear.in_invoice_sequence = invoice_seq
-    >>> fiscalyear.out_credit_note_sequence = invoice_seq
-    >>> fiscalyear.in_credit_note_sequence = invoice_seq
-    >>> fiscalyear.save()
-    >>> FiscalYear.create_period([fiscalyear.id], config.context)
+    >>> fiscalyear = set_fiscalyear_invoice_sequences(
+    ...     create_fiscalyear(company))
+    >>> fiscalyear.click('create_period')
 
 Create chart of accounts::
 
-    >>> AccountTemplate = Model.get('account.account.template')
-    >>> Account = Model.get('account.account')
-    >>> account_template, = AccountTemplate.find([('parent', '=', None)])
-    >>> create_chart = Wizard('account.create_chart')
-    >>> create_chart.execute('account')
-    >>> create_chart.form.account_template = account_template
-    >>> create_chart.form.company = company
-    >>> create_chart.execute('create_account')
-    >>> receivable, = Account.find([
-    ...         ('kind', '=', 'receivable'),
-    ...         ('company', '=', company.id),
-    ...         ])
-    >>> payable, = Account.find([
-    ...         ('kind', '=', 'payable'),
-    ...         ('company', '=', company.id),
-    ...         ])
-    >>> revenue, = Account.find([
-    ...         ('kind', '=', 'revenue'),
-    ...         ('company', '=', company.id),
-    ...         ])
-    >>> expense, = Account.find([
-    ...         ('kind', '=', 'expense'),
-    ...         ('company', '=', company.id),
-    ...         ])
-    >>> account_tax, = Account.find([
-    ...         ('kind', '=', 'other'),
-    ...         ('company', '=', company.id),
-    ...         ('name', '=', 'Main Tax'),
-    ...         ])
-    >>> create_chart.form.account_receivable = receivable
-    >>> create_chart.form.account_payable = payable
-    >>> create_chart.execute('create_properties')
+    >>> _ = create_chart(company)
+    >>> accounts = get_accounts(company)
+    >>> payable = accounts['payable']
+    >>> revenue = accounts['revenue']
+    >>> expense = accounts['expense']
+    >>> account_tax = accounts['tax']
 
 Create tax::
 
-    >>> TaxCode = Model.get('account.tax.code')
-    >>> Tax = Model.get('account.tax')
-    >>> tax = Tax()
-    >>> tax.name = 'Tax'
-    >>> tax.description = 'Tax'
-    >>> tax.type = 'percentage'
-    >>> tax.rate = Decimal('.10')
-    >>> tax.invoice_account = account_tax
-    >>> tax.credit_note_account = account_tax
-    >>> invoice_base_code = TaxCode(name='invoice base')
-    >>> invoice_base_code.save()
-    >>> tax.invoice_base_code = invoice_base_code
-    >>> invoice_tax_code = TaxCode(name='invoice tax')
-    >>> invoice_tax_code.save()
-    >>> tax.invoice_tax_code = invoice_tax_code
-    >>> credit_note_base_code = TaxCode(name='credit note base')
-    >>> credit_note_base_code.save()
-    >>> tax.credit_note_base_code = credit_note_base_code
-    >>> credit_note_tax_code = TaxCode(name='credit note tax')
-    >>> credit_note_tax_code.save()
-    >>> tax.credit_note_tax_code = credit_note_tax_code
+    >>> tax = set_tax_code(create_tax(Decimal('.10')))
     >>> tax.save()
+    >>> invoice_base_code = tax.invoice_base_code
+    >>> invoice_tax_code = tax.invoice_tax_code
+    >>> credit_note_base_code = tax.credit_note_base_code
+    >>> credit_note_tax_code = tax.credit_note_tax_code
 
 Create party::
 
@@ -166,10 +87,8 @@ Create product::
 Create payment term::
 
     >>> PaymentTerm = Model.get('account.invoice.payment_term')
-    >>> PaymentTermLine = Model.get('account.invoice.payment_term.line')
     >>> payment_term = PaymentTerm(name='Term')
-    >>> payment_term_line = PaymentTermLine(type='remainder')
-    >>> payment_term.lines.append(payment_term_line)
+    >>> line = payment_term.lines.new(type='remainder')
     >>> payment_term.save()
 
 Create invoice::
@@ -197,9 +116,7 @@ Create invoice::
     Decimal('10.00')
     >>> invoice.total_amount
     Decimal('120.00')
-    >>> invoice.save()
-    >>> Invoice.post([invoice.id], config.context)
-    >>> invoice.reload()
+    >>> invoice.click('post')
     >>> invoice.state
     u'posted'
     >>> invoice.untaxed_amount
@@ -261,9 +178,8 @@ Create a posted and a draft invoice  to cancel::
     >>> line = invoice.lines.new()
     >>> line.product = product
     >>> line.quantity = 1
-    >>> invoice.save()
     >>> invoice.click('post')
-    >>> invoice_draft = Invoice(Invoice.copy([invoice.id], config.context)[0])
+    >>> invoice_draft, = Invoice.duplicate([invoice])
 
 Cancel draft invoice::
 
diff --git a/tests/test_account_invoice.py b/tests/test_account_invoice.py
index c2b770e..a9cc686 100644
--- a/tests/test_account_invoice.py
+++ b/tests/test_account_invoice.py
@@ -1,32 +1,25 @@
-#This file is part of Tryton.  The COPYRIGHT file at the top level of
-#this repository contains the full copyright notices and license terms.
+# This file is part of Tryton.  The COPYRIGHT file at the top level of
+# this repository contains the full copyright notices and license terms.
 import unittest
 import doctest
 import datetime
 from decimal import Decimal
 import trytond.tests.test_tryton
-from trytond.tests.test_tryton import POOL, DB_NAME, USER, CONTEXT, test_view,\
-    test_depends
+from trytond.tests.test_tryton import ModuleTestCase
+from trytond.tests.test_tryton import POOL, DB_NAME, USER, CONTEXT
 from trytond.tests.test_tryton import doctest_setup, doctest_teardown
 from trytond.transaction import Transaction
 
 
-class AccountInvoiceTestCase(unittest.TestCase):
+class AccountInvoiceTestCase(ModuleTestCase):
     'Test AccountInvoice module'
+    module = 'account_invoice'
 
     def setUp(self):
-        trytond.tests.test_tryton.install_module('account_invoice')
+        super(AccountInvoiceTestCase, self).setUp()
         self.payment_term = POOL.get('account.invoice.payment_term')
         self.currency = POOL.get('currency.currency')
 
-    def test0005views(self):
-        'Test views'
-        test_view('account_invoice')
-
-    def test0006depends(self):
-        'Test depends'
-        test_depends()
-
     def test0010payment_term(self):
         'Test payment_term'
         with Transaction().start(DB_NAME, USER, context=CONTEXT):
@@ -44,26 +37,42 @@ class AccountInvoiceTestCase(unittest.TestCase):
                                         'type': 'percent',
                                         'divisor': 4,
                                         'percentage': 25,
-                                        'days': 30,
+                                        'relativedeltas': [('create', [{
+                                                        'days': 30,
+                                                        },
+                                                    ]),
+                                            ],
                                         }, {
                                         'sequence': 1,
                                         'type': 'percent_on_total',
                                         'divisor': 4,
                                         'percentage': 25,
-                                        'months': 1,
+                                        'relativedeltas': [('create', [{
+                                                        'months': 1,
+                                                        },
+                                                    ]),
+                                            ],
                                         }, {
                                         'sequence': 2,
                                         'type': 'fixed',
-                                        'months': 1,
-                                        'days': 30,
                                         'amount': Decimal('396.84'),
                                         'currency': cu1.id,
+                                        'relativedeltas': [('create', [{
+                                                        'months': 1,
+                                                        'days': 30,
+                                                        },
+                                                    ]),
+                                            ],
                                         }, {
                                         'sequence': 3,
                                         'type': 'remainder',
-                                        'months': 2,
-                                        'days': 30,
-                                        'day': 15,
+                                        'relativedeltas': [('create', [{
+                                                        'months': 2,
+                                                        'days': 30,
+                                                        'day': 15,
+                                                        },
+                                                    ]),
+                                            ],
                                         }])]
                         }])
             terms = term.compute(Decimal('1587.35'), cu1,
diff --git a/tests/tools.py b/tests/tools.py
new file mode 100644
index 0000000..10fceb2
--- /dev/null
+++ b/tests/tools.py
@@ -0,0 +1,28 @@
+# This file is part of Tryton.  The COPYRIGHT file at the top level of
+# this repository contains the full copyright notices and license terms.
+from proteus import Model
+
+__all__ = ['set_fiscalyear_invoice_sequences']
+
+
+def set_fiscalyear_invoice_sequences(fiscalyear, config=None):
+    "Set invoice sequences to fiscalyear"
+    SequenceStrict = Model.get('ir.sequence.strict', config=config)
+
+    invoice_seq = SequenceStrict(name=fiscalyear.name, code='account.invoice',
+        company=fiscalyear.company)
+    invoice_seq.save()
+    fiscalyear.out_invoice_sequence = invoice_seq
+    fiscalyear.in_invoice_sequence = invoice_seq
+    fiscalyear.out_credit_note_sequence = invoice_seq
+    fiscalyear.in_credit_note_sequence = invoice_seq
+    return fiscalyear
+
+
+def create_payment_term(config=None):
+    "Create a direct payment term"
+    PaymentTerm = Model.get('account.invoice.payment_term')
+
+    payment_term = PaymentTerm(name='Direct')
+    payment_term.lines.new(type='remainder')
+    return payment_term
diff --git a/tryton.cfg b/tryton.cfg
index 84e53cb..399d600 100644
--- a/tryton.cfg
+++ b/tryton.cfg
@@ -1,5 +1,5 @@
 [tryton]
-version=3.4.1
+version=3.6.0
 depends:
     account
     account_product
diff --git a/trytond_account_invoice.egg-info/PKG-INFO b/trytond_account_invoice.egg-info/PKG-INFO
index a684e0d..b7e733b 100644
--- a/trytond_account_invoice.egg-info/PKG-INFO
+++ b/trytond_account_invoice.egg-info/PKG-INFO
@@ -1,12 +1,12 @@
 Metadata-Version: 1.1
 Name: trytond-account-invoice
-Version: 3.4.1
+Version: 3.6.0
 Summary: Tryton module for invoicing
 Home-page: http://www.tryton.org/
 Author: Tryton
 Author-email: issue_tracker at tryton.org
 License: GPL-3
-Download-URL: http://downloads.tryton.org/3.4/
+Download-URL: http://downloads.tryton.org/3.6/
 Description: trytond_account_invoice
         =======================
         
@@ -64,5 +64,7 @@ Classifier: Natural Language :: Slovenian
 Classifier: Natural Language :: Spanish
 Classifier: Operating System :: OS Independent
 Classifier: Programming Language :: Python :: 2.7
+Classifier: Programming Language :: Python :: Implementation :: CPython
+Classifier: Programming Language :: Python :: Implementation :: PyPy
 Classifier: Topic :: Office/Business
 Classifier: Topic :: Office/Business :: Financial :: Accounting
diff --git a/trytond_account_invoice.egg-info/SOURCES.txt b/trytond_account_invoice.egg-info/SOURCES.txt
index ef565a2..dd5c10b 100644
--- a/trytond_account_invoice.egg-info/SOURCES.txt
+++ b/trytond_account_invoice.egg-info/SOURCES.txt
@@ -39,6 +39,7 @@ tryton.cfg
 ./tests/scenario_invoice_alternate_currency.rst
 ./tests/scenario_invoice_supplier.rst
 ./tests/test_account_invoice.py
+./tests/tools.py
 ./view/address_form.xml
 ./view/address_tree.xml
 ./view/configuration_form.xml
@@ -63,9 +64,15 @@ tryton.cfg
 ./view/payment_term_line_form.xml
 ./view/payment_term_line_list.xml
 ./view/payment_term_line_list_sequence.xml
+./view/payment_term_line_relativedelta_form.xml
+./view/payment_term_line_relativedelta_list.xml
+./view/payment_term_line_relativedelta_list_sequence.xml
+./view/payment_term_test_form.xml
+./view/payment_term_test_result_list.xml
 ./view/payment_term_tree.xml
 ./view/period_form.xml
 ./view/print_warning_form.xml
+doc/index.rst
 locale/bg_BG.po
 locale/ca_ES.po
 locale/cs_CZ.po
@@ -112,6 +119,11 @@ view/payment_term_form.xml
 view/payment_term_line_form.xml
 view/payment_term_line_list.xml
 view/payment_term_line_list_sequence.xml
+view/payment_term_line_relativedelta_form.xml
+view/payment_term_line_relativedelta_list.xml
+view/payment_term_line_relativedelta_list_sequence.xml
+view/payment_term_test_form.xml
+view/payment_term_test_result_list.xml
 view/payment_term_tree.xml
 view/period_form.xml
 view/print_warning_form.xml
\ No newline at end of file
diff --git a/trytond_account_invoice.egg-info/requires.txt b/trytond_account_invoice.egg-info/requires.txt
index c451a91..ca484e7 100644
--- a/trytond_account_invoice.egg-info/requires.txt
+++ b/trytond_account_invoice.egg-info/requires.txt
@@ -1,9 +1,9 @@
 python-dateutil
-python-sql
-trytond_account >= 3.4, < 3.5
-trytond_account_product >= 3.4, < 3.5
-trytond_company >= 3.4, < 3.5
-trytond_currency >= 3.4, < 3.5
-trytond_party >= 3.4, < 3.5
-trytond_product >= 3.4, < 3.5
-trytond >= 3.4, < 3.5
\ No newline at end of file
+python-sql >= 0.4
+trytond_account >= 3.6, < 3.7
+trytond_account_product >= 3.6, < 3.7
+trytond_company >= 3.6, < 3.7
+trytond_currency >= 3.6, < 3.7
+trytond_party >= 3.6, < 3.7
+trytond_product >= 3.6, < 3.7
+trytond >= 3.6, < 3.7
\ No newline at end of file
diff --git a/view/invoice_form.xml b/view/invoice_form.xml
index 6d9f1ee..bcd5fe4 100644
--- a/view/invoice_form.xml
+++ b/view/invoice_form.xml
@@ -28,18 +28,16 @@ this repository contains the full copyright notices and license terms. -->
             <field name="lines" colspan="6"
                 view_ids="account_invoice.invoice_line_view_tree_sequence"/>
             <group col="2" colspan="6" id="taxes_amount_state_buttons">
-                <group col="1" colspan="1" id="taxes">
-                    <field name="taxes"
-                        view_ids="account_invoice.invoice_tax_view_tree_sequence"/>
-                </group>
-                <group col="4" colspan="1" id="amount_state_buttons">
-                    <group col="2" colspan="2" id="reconciled_state">
+                <field name="taxes"
+                    view_ids="account_invoice.invoice_tax_view_tree_sequence"/>
+                <group col="4" colspan="1" id="amount_state_buttons" yfill="1">
+                    <group col="2" colspan="2" id="reconciled_state" yfill="1">
                         <label name="reconciled"/>
                         <field name="reconciled" xexpand="0"/>
                         <label name="state"/>
                         <field name="state"/>
                     </group>
-                    <group col="2" colspan="2" id="amount">
+                    <group col="2" colspan="2" id="amount" yfill="1">
                         <label name="untaxed_amount" xalign="1.0" xexpand="1"/>
                         <field name="untaxed_amount" xalign="1.0" xexpand="0"/>
                         <label name="tax_amount" xalign="1.0" xexpand="1"/>
@@ -78,8 +76,7 @@ this repository contains the full copyright notices and license terms. -->
             <label name="cancel_move"/>
             <field name="cancel_move"/>
             <separator name="comment" colspan="4"/>
-            <field name="comment" colspan="4"
-                spell="Eval('party_lang')"/>
+            <field name="comment" colspan="4"/>
         </page>
         <page string="Payment" id="payment">
             <label name="amount_to_pay_today"/>
diff --git a/view/invoice_line_form.xml b/view/invoice_line_form.xml
index 85fcb78..3c670ac 100644
--- a/view/invoice_line_form.xml
+++ b/view/invoice_line_form.xml
@@ -4,20 +4,19 @@ this repository contains the full copyright notices and license terms. -->
 <form string="Invoice Line" cursor="product">
     <label name="invoice"/>
     <field name="invoice" colspan="3"/>
+    <label name="type"/>
+    <field name="type"/>
+    <label name="sequence"/>
+    <field name="sequence"/>
     <notebook colspan="4">
         <page string="General" id="general">
-            <label name="type"/>
-            <field name="type"/>
-            <label name="sequence"/>
-            <field name="sequence"/>
             <label name="product"/>
             <field name="product"/>
             <label name="account"/>
             <field name="account"/>
             <newline/>
             <label name="description"/>
-            <field name="description" colspan="3"
-                spell="If(Bool(Eval('_parent_invoice')), Get(Eval('_parent_invoice', {}), 'party_lang'), Eval('party_lang'))"/>
+            <field name="description" colspan="3" yexpand="0"/>
             <label name="quantity"/>
             <field name="quantity"/>
             <label name="unit"/>
@@ -30,8 +29,7 @@ this repository contains the full copyright notices and license terms. -->
         </page>
         <page string="Notes" id="notes">
             <separator name="note" colspan="4"/>
-            <field name="note" colspan="4"
-                spell="If(Bool(Eval('_parent_invoice')), Get(Eval('_parent_invoice', {}), 'party_lang'), Eval('party_lang'))"/>
+            <field name="note" colspan="4"/>
         </page>
     </notebook>
     <field name="party_lang" invisible="1" colspan="4"/>
diff --git a/view/invoice_tree.xml b/view/invoice_tree.xml
index 61f8c83..5685702 100644
--- a/view/invoice_tree.xml
+++ b/view/invoice_tree.xml
@@ -14,4 +14,9 @@ this repository contains the full copyright notices and license terms. -->
     <field name="state"/>
     <field name="amount_to_pay_today"/>
     <field name="description"/>
+    <button name="cancel" string="Cancel" tree_invisible="1"
+        confirm="Are you sure to cancel the invoice?"/>
+    <button name="draft" string="Draft" tree_invisible="1"/>
+    <button name="validate_invoice" string="Validate" tree_invisible="1"/>
+    <button name="post" string="Post" tree_invisible="1"/>
 </tree>
diff --git a/view/payment_term_line_form.xml b/view/payment_term_line_form.xml
index 232d579..ccdf112 100644
--- a/view/payment_term_line_form.xml
+++ b/view/payment_term_line_form.xml
@@ -1,29 +1,19 @@
 <?xml version="1.0"?>
 <!-- This file is part of Tryton.  The COPYRIGHT file at the top level of
 this repository contains the full copyright notices and license terms. -->
-<form string="Payment Term Lines">
+<form string="Payment Term Line">
     <label name="type"/>
     <field name="type"/>
-    <newline/>
+    <label name="sequence"/>
+    <field name="sequence"/>
     <label name="amount"/>
     <field name="amount"/>
     <label name="currency"/>
     <field name="currency"/>
-    <newline/>
     <label name="percentage"/>
     <field name="percentage"/>
     <label name="divisor"/>
     <field name="divisor"/>
-    <label name="months"/>
-    <field name="months"/>
-    <label name="month"/>
-    <field name="month"/>
-    <label name="weeks"/>
-    <field name="weeks"/>
-    <label name="weekday"/>
-    <field name="weekday"/>
-    <label name="days"/>
-    <field name="days"/>
-    <label name="day"/>
-    <field name="day"/>
+    <field name="relativedeltas" mode="form,tree" colspan="4"
+        view_ids="account_invoice.payment_term_line_relativedelta_view_form,account_invoice.payment_term_line_relativedelta_view_list_sequence"/>
 </form>
diff --git a/view/payment_term_line_list.xml b/view/payment_term_line_list.xml
index 04e09b6..7d91ed6 100644
--- a/view/payment_term_line_list.xml
+++ b/view/payment_term_line_list.xml
@@ -7,12 +7,4 @@ this repository contains the full copyright notices and license terms. -->
     <field name="percentage"/>
     <field name="amount"/>
     <field name="currency"/>
-    <field name="months"/>
-    <field name="month"/>
-    <field name="weeks"/>
-    <field name="weekday"/>
-    <field name="days"/>
-    <field name="day"/>
-    <field name="sequence" tree_invisible="1"/>
-    <field name="currency_digits" tree_invisible="1"/>
 </tree>
diff --git a/view/payment_term_line_list_sequence.xml b/view/payment_term_line_list_sequence.xml
index 8f2b00f..8499bdd 100644
--- a/view/payment_term_line_list_sequence.xml
+++ b/view/payment_term_line_list_sequence.xml
@@ -6,12 +6,4 @@ this repository contains the full copyright notices and license terms. -->
     <field name="percentage"/>
     <field name="amount"/>
     <field name="currency"/>
-    <field name="months"/>
-    <field name="month"/>
-    <field name="weeks"/>
-    <field name="weekday"/>
-    <field name="days"/>
-    <field name="day"/>
-    <field name="sequence" tree_invisible="1"/>
-    <field name="currency_digits" tree_invisible="1"/>
 </tree>
diff --git a/view/payment_term_line_form.xml b/view/payment_term_line_relativedelta_form.xml
similarity index 58%
copy from view/payment_term_line_form.xml
copy to view/payment_term_line_relativedelta_form.xml
index 232d579..5344d93 100644
--- a/view/payment_term_line_form.xml
+++ b/view/payment_term_line_relativedelta_form.xml
@@ -1,19 +1,11 @@
 <?xml version="1.0"?>
 <!-- This file is part of Tryton.  The COPYRIGHT file at the top level of
 this repository contains the full copyright notices and license terms. -->
-<form string="Payment Term Lines">
-    <label name="type"/>
-    <field name="type"/>
-    <newline/>
-    <label name="amount"/>
-    <field name="amount"/>
-    <label name="currency"/>
-    <field name="currency"/>
-    <newline/>
-    <label name="percentage"/>
-    <field name="percentage"/>
-    <label name="divisor"/>
-    <field name="divisor"/>
+<form string="Payment Term Line Relative Delta">
+    <label name="line"/>
+    <field name="line"/>
+    <label name="sequence"/>
+    <field name="sequence"/>
     <label name="months"/>
     <field name="months"/>
     <label name="month"/>
diff --git a/view/payment_term_line_list_sequence.xml b/view/payment_term_line_relativedelta_list.xml
similarity index 55%
copy from view/payment_term_line_list_sequence.xml
copy to view/payment_term_line_relativedelta_list.xml
index 8f2b00f..60e6a4c 100644
--- a/view/payment_term_line_list_sequence.xml
+++ b/view/payment_term_line_relativedelta_list.xml
@@ -1,17 +1,12 @@
 <?xml version="1.0"?>
 <!-- This file is part of Tryton.  The COPYRIGHT file at the top level of
 this repository contains the full copyright notices and license terms. -->
-<tree string="Payment Term Line" sequence="sequence">
-    <field name="type"/>
-    <field name="percentage"/>
-    <field name="amount"/>
-    <field name="currency"/>
+<tree string="Payment Term Line Relative Deltas">
+    <field name="line"/>
     <field name="months"/>
     <field name="month"/>
     <field name="weeks"/>
     <field name="weekday"/>
     <field name="days"/>
     <field name="day"/>
-    <field name="sequence" tree_invisible="1"/>
-    <field name="currency_digits" tree_invisible="1"/>
 </tree>
diff --git a/view/payment_term_line_list_sequence.xml b/view/payment_term_line_relativedelta_list_sequence.xml
similarity index 55%
copy from view/payment_term_line_list_sequence.xml
copy to view/payment_term_line_relativedelta_list_sequence.xml
index 8f2b00f..4199526 100644
--- a/view/payment_term_line_list_sequence.xml
+++ b/view/payment_term_line_relativedelta_list_sequence.xml
@@ -1,17 +1,12 @@
 <?xml version="1.0"?>
 <!-- This file is part of Tryton.  The COPYRIGHT file at the top level of
 this repository contains the full copyright notices and license terms. -->
-<tree string="Payment Term Line" sequence="sequence">
-    <field name="type"/>
-    <field name="percentage"/>
-    <field name="amount"/>
-    <field name="currency"/>
+<tree string="Payment Term Line Relative Deltas" sequence="sequence">
+    <field name="line"/>
     <field name="months"/>
     <field name="month"/>
     <field name="weeks"/>
     <field name="weekday"/>
     <field name="days"/>
     <field name="day"/>
-    <field name="sequence" tree_invisible="1"/>
-    <field name="currency_digits" tree_invisible="1"/>
 </tree>
diff --git a/view/payment_term_test_form.xml b/view/payment_term_test_form.xml
new file mode 100644
index 0000000..2159319
--- /dev/null
+++ b/view/payment_term_test_form.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0"?>
+<!-- This file is part of Tryton.  The COPYRIGHT file at the top level of
+this repository contains the full copyright notices and license terms. -->
+<form string="Payment Term Test" cursor="amount">
+    <label name="payment_term"/>
+    <field name="payment_term"/>
+    <label name="date"/>
+    <field name="date"/>
+    <label name="amount"/>
+    <field name="amount"/>
+    <label name="currency"/>
+    <field name="currency"/>
+    <field name="result" mode="tree" colspan="4"/>
+</form>
diff --git a/view/payment_term_test_result_list.xml b/view/payment_term_test_result_list.xml
new file mode 100644
index 0000000..f02d0d3
--- /dev/null
+++ b/view/payment_term_test_result_list.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0"?>
+<!-- This file is part of Tryton.  The COPYRIGHT file at the top level of
+this repository contains the full copyright notices and license terms. -->
+<tree string="Payment Term Test Results">
+    <field name="date"/>
+    <field name="amount"/>
+</tree>
-- 
tryton-modules-account-invoice



More information about the tryton-debian-vcs mailing list