You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
652 B

  1. #. Go to Invoicing > Configuration > Contracts > Formulas (quantity).
  2. #. Define any formula based on Python code that stores at some moment a
  3. float/integer value of the quantity to invoice in the variable 'result'.
  4. You can use these variables to compute your formula:
  5. * *env*: Environment variable for getting other models.
  6. * *context*: Current context dictionary.
  7. * *user*: Current user.
  8. * *line*: Contract recurring invoice line that triggers this formula.
  9. * *contract*: Contract whose line belongs to.
  10. * *invoice*: Invoice (header) being created.
  11. .. figure:: images/formula_form.png
  12. :alt: Formula form
  13. :width: 600 px