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.

76 lines
2.4 KiB

  1. .. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
  2. :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
  3. :alt: License: AGPL-3
  4. =================================================
  5. Variable quantity in contract recurrent invoicing
  6. =================================================
  7. With this module, you will be able to define in recurring contracts some
  8. lines with variable quantity according a provided formula.
  9. Configuration
  10. =============
  11. #. Go to Sales > Configuration > Contracts > Formulas (quantity).
  12. #. Define any formula based on Python code that stores at some moment a
  13. float/integer value of the quantity to invoice in the variable 'result'.
  14. You can use these variables to compute your formula:
  15. * *env*: Environment variable for getting other models.
  16. * *context*: Current context dictionary.
  17. * *user*: Current user.
  18. * *line*: Contract recurring invoice line that triggers this formula.
  19. * *contract*: Contract whose line belongs to.
  20. * *invoice*: Invoice (header) being created.
  21. .. figure:: images/formula_form.png
  22. :alt: Formula form
  23. :width: 600 px
  24. Usage
  25. =====
  26. To use this module, you need to:
  27. #. Go to Sales -> Contracts and select or create a new contract.
  28. #. Check *Generate recurring invoices automatically*.
  29. #. Add a new recurring invoicing line.
  30. #. Select "Variable quantity" in column "Qty. type".
  31. #. Select one of the possible formulas to use (previously created).
  32. .. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
  33. :alt: Try me on Runbot
  34. :target: https://runbot.odoo-community.org/runbot/110/9.0
  35. Bug Tracker
  36. ===========
  37. Bugs are tracked on `GitHub Issues
  38. <https://github.com/OCA/contract/issues>`_. In case of trouble, please
  39. check there if your issue has already been reported. If you spotted it first,
  40. help us smashing it by providing a detailed and welcomed feedback.
  41. Credits
  42. =======
  43. Contributors
  44. ------------
  45. * Pedro M. Baeza <pedro.baeza@tecnativa.com>
  46. Maintainer
  47. ----------
  48. .. image:: https://odoo-community.org/logo.png
  49. :alt: Odoo Community Association
  50. :target: https://odoo-community.org
  51. This module is maintained by the OCA.
  52. OCA, or the Odoo Community Association, is a nonprofit organization whose
  53. mission is to support the collaborative development of Odoo features and
  54. promote its widespread use.
  55. To contribute to this module, please visit https://odoo-community.org.