diff --git a/contract_variable_quantity/README.rst b/contract_variable_quantity/README.rst index 43b19cbe3..33b59bc87 100644 --- a/contract_variable_quantity/README.rst +++ b/contract_variable_quantity/README.rst @@ -64,8 +64,8 @@ Usage To use this module, you need to: -1. Go to Invoicing > Sales > Contracts and select or create a new - contract. +1. Go to Invoicing > Customers > Customers Contracts and select or + create a new contract. 2. Check *Generate recurring invoices automatically*. 3. Add a new recurring invoicing line. 4. Select "Variable quantity" in column "Qty. type". @@ -98,6 +98,7 @@ Contributors - Carlos Roca - Víctor Martínez - Carolina Fernandez + - Juan José Seguí - Dave Lasley diff --git a/contract_variable_quantity/__manifest__.py b/contract_variable_quantity/__manifest__.py index 7c30c42bb..8cd0705d1 100644 --- a/contract_variable_quantity/__manifest__.py +++ b/contract_variable_quantity/__manifest__.py @@ -6,7 +6,7 @@ { "name": "Variable quantity in contract recurrent invoicing", - "version": "16.0.1.1.0", + "version": "17.0.1.0.0", "category": "Contract Management", "license": "AGPL-3", "author": "Tecnativa, Odoo Community Association (OCA)", diff --git a/contract_variable_quantity/models/contract_line.py b/contract_variable_quantity/models/contract_line.py index 6a1bb94d5..61ed2b642 100644 --- a/contract_variable_quantity/models/contract_line.py +++ b/contract_variable_quantity/models/contract_line.py @@ -33,7 +33,7 @@ class AccountAnalyticInvoiceLine(models.Model): "contract": self.contract_id, } safe_eval( - self.qty_formula_id.code.strip(), + str(self.qty_formula_id.code).strip(), eval_context, mode="exec", nocopy=True, diff --git a/contract_variable_quantity/readme/CONTRIBUTORS.md b/contract_variable_quantity/readme/CONTRIBUTORS.md index b4af30c20..16d30dd99 100644 --- a/contract_variable_quantity/readme/CONTRIBUTORS.md +++ b/contract_variable_quantity/readme/CONTRIBUTORS.md @@ -4,6 +4,8 @@ > - Carlos Roca > - Víctor Martínez > - Carolina Fernandez + > - Juan José Seguí + - Dave Lasley \<\> diff --git a/contract_variable_quantity/readme/USAGE.md b/contract_variable_quantity/readme/USAGE.md index d2a4a2e57..98729964d 100644 --- a/contract_variable_quantity/readme/USAGE.md +++ b/contract_variable_quantity/readme/USAGE.md @@ -1,6 +1,6 @@ To use this module, you need to: -1. Go to Invoicing \> Sales \> Contracts and select or create a new +1. Go to Invoicing \> Customers \> Customers Contracts and select or create a new contract. 2. Check *Generate recurring invoices automatically*. 3. Add a new recurring invoicing line. diff --git a/contract_variable_quantity/static/description/index.html b/contract_variable_quantity/static/description/index.html index 9a17e2509..b932677c2 100644 --- a/contract_variable_quantity/static/description/index.html +++ b/contract_variable_quantity/static/description/index.html @@ -412,8 +412,8 @@ formula.

Usage

To use this module, you need to:

    -
  1. Go to Invoicing > Sales > Contracts and select or create a new -contract.
  2. +
  3. Go to Invoicing > Customers > Customers Contracts and select or +create a new contract.
  4. Check Generate recurring invoices automatically.
  5. Add a new recurring invoicing line.
  6. Select “Variable quantity” in column “Qty. type”.
  7. @@ -446,6 +446,7 @@ If you spotted it first, help us to smash it by providing a detailed and welcome
  8. Carlos Roca
  9. Víctor Martínez
  10. Carolina Fernandez
  11. +
  12. Juan José Seguí
  13. diff --git a/contract_variable_quantity/views/abstract_contract_line.xml b/contract_variable_quantity/views/abstract_contract_line.xml index 3273573c4..98cb40e89 100644 --- a/contract_variable_quantity/views/abstract_contract_line.xml +++ b/contract_variable_quantity/views/abstract_contract_line.xml @@ -14,13 +14,13 @@ - {'required': [('qty_type', '=', - 'fixed')], 'invisible': [('qty_type', '!=', 'fixed')]} - + "qty_type == 'fixed'" + "qty_type != 'fixed'" diff --git a/contract_variable_quantity/views/contract.xml b/contract_variable_quantity/views/contract.xml index c47ad0f2b..4650cb8fe 100644 --- a/contract_variable_quantity/views/contract.xml +++ b/contract_variable_quantity/views/contract.xml @@ -12,37 +12,27 @@ position="before" > - + - {'invisible': [('qty_type', '!=', 'fixed')]} + "qty_type != 'fixed'" - + - {'invisible': [('qty_type', '!=', 'fixed')]} - + qty_type != 'fixed' + diff --git a/contract_variable_quantity/views/contract_line_formula.xml b/contract_variable_quantity/views/contract_line_formula.xml index 8408323bf..6509094de 100644 --- a/contract_variable_quantity/views/contract_line_formula.xml +++ b/contract_variable_quantity/views/contract_line_formula.xml @@ -19,7 +19,7 @@ -
    +
    - + - {'invisible': [('qty_type', '!=', 'fixed')]} + "qty_type != 'fixed'" diff --git a/contract_variable_quantity/views/contract_template.xml b/contract_variable_quantity/views/contract_template.xml index 72964a3ef..6f85acb25 100644 --- a/contract_variable_quantity/views/contract_template.xml +++ b/contract_variable_quantity/views/contract_template.xml @@ -17,16 +17,16 @@ > - {'required': [('qty_type', '=', 'fixed')], 'invisible': [('qty_type', '!=', 'fixed')]} + "qty_type == 'fixed'" + "qty_type != 'fixed'"