diff --git a/contract_variable_quantity/__manifest__.py b/contract_variable_quantity/__manifest__.py index 29aab21a..40108bc5 100644 --- a/contract_variable_quantity/__manifest__.py +++ b/contract_variable_quantity/__manifest__.py @@ -15,6 +15,9 @@ ], 'data': [ 'security/ir.model.access.csv', + 'views/abstract_contract_view.xml', + 'views/contract_line_formula.xml', + 'views/contract_template_view.xml', 'views/contract_view.xml', ], 'installable': True, diff --git a/contract_variable_quantity/views/abstract_contract_view.xml b/contract_variable_quantity/views/abstract_contract_view.xml new file mode 100644 index 00000000..90a9b12e --- /dev/null +++ b/contract_variable_quantity/views/abstract_contract_view.xml @@ -0,0 +1,28 @@ + + + + + Account Abstract Analytic Contract Line Form View + + account.abstract.analytic.contract.line + + + + + + + + + + {'required': [('qty_type', '=', + 'fixed')], 'invisible': [('qty_type', '!=', 'fixed')]} + + + + + + diff --git a/contract_variable_quantity/views/contract_line_formula.xml b/contract_variable_quantity/views/contract_line_formula.xml new file mode 100644 index 00000000..97791d0f --- /dev/null +++ b/contract_variable_quantity/views/contract_line_formula.xml @@ -0,0 +1,87 @@ + + + + + contract.line.qty.formula + + + + + + + + + contract.line.qty.formula + +
+ +
+

+ +

+
+ +
+ +

Help with Python expressions.

+

You have to insert valid Python code block that + stores at some moment a float/integer value of + the quantity to invoice in the variable + 'result'. +

+

You can use these variables to compute your + formula: +

+
    +
  • env: Environment variable for + getting other models. +
  • +
  • context: Current context dictionary. +
  • +
  • user: Current user. +
  • +
  • line: Contract recurring invoice + line that triggers this formula. +
  • +
  • contract: Contract whose line + belongs to. +
  • +
  • invoice: Invoice (header) being + created. +
  • +
+
+

Example of Python code

+ + result = + env['product.product'].search_count([('sale_ok', + '=', True)]) + +
+
+
+
+
+
+
+ + + Formulas (quantity) + contract.line.qty.formula + form + tree,form + +

+ Click to create a new formula for variable quantities. +

+
+
+ + + +
diff --git a/contract_variable_quantity/views/contract_template_view.xml b/contract_variable_quantity/views/contract_template_view.xml new file mode 100644 index 00000000..cd552957 --- /dev/null +++ b/contract_variable_quantity/views/contract_template_view.xml @@ -0,0 +1,23 @@ + + + + + Contract Template Variable Qty + account.analytic.contract + + + + + + + + + + {'required': [('qty_type', '=', 'fixed')], 'invisible': [('qty_type', '!=', 'fixed')]} + + + + + diff --git a/contract_variable_quantity/views/contract_view.xml b/contract_variable_quantity/views/contract_view.xml index 9479a854..fa777336 100644 --- a/contract_variable_quantity/views/contract_view.xml +++ b/contract_variable_quantity/views/contract_view.xml @@ -1,25 +1,6 @@ - - Contract Template Variable Qty - account.analytic.contract - - - - - - - - - - {'required': [('qty_type', '=', 'fixed')], 'invisible': [('qty_type', '!=', 'fixed')]} - - - - account.analytic.account @@ -41,67 +22,4 @@ - - contract.line.qty.formula - - - - - - - - - contract.line.qty.formula - -
- -
-

- -

-
- -
- -

Help with Python expressions.

-

You have to insert valid Python code block that stores at some moment a float/integer value of the quantity to invoice in the variable 'result'.

-

You can use these variables to compute your formula:

-
    -
  • env: Environment variable for getting other models.
  • -
  • context: Current context dictionary.
  • -
  • user: Current user.
  • -
  • line: Contract recurring invoice line that triggers this formula.
  • -
  • contract: Contract whose line belongs to.
  • -
  • invoice: Invoice (header) being created.
  • -
-
-

Example of Python code

- - result = env['product.product'].search_count([('sale_ok', '=', True)]) - -
-
-
-
-
-
-
- - - Formulas (quantity) - contract.line.qty.formula - form - tree,form - -

- Click to create a new formula for variable quantities. -

-
-
- - -