diff --git a/subscription_oca/README.rst b/subscription_oca/README.rst index 4511f0c68..8ebbec736 100644 --- a/subscription_oca/README.rst +++ b/subscription_oca/README.rst @@ -17,18 +17,20 @@ Subscription management :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :alt: License: AGPL-3 .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fcontract-lightgray.png?logo=github - :target: https://github.com/OCA/contract/tree/16.0/subscription_oca + :target: https://github.com/OCA/contract/tree/17.0/subscription_oca :alt: OCA/contract .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/contract-16-0/contract-16-0-subscription_oca + :target: https://translation.odoo-community.org/projects/contract-17-0/contract-17-0-subscription_oca :alt: Translate me on Weblate .. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png - :target: https://runboat.odoo-community.org/builds?repo=OCA/contract&target_branch=16.0 + :target: https://runboat.odoo-community.org/builds?repo=OCA/contract&target_branch=17.0 :alt: Try me on Runboat |badge1| |badge2| |badge3| |badge4| |badge5| -This module allows creating subscriptions that generate recurring invoices or orders. It also enables the sale of products that generate subscriptions. +This module allows creating subscriptions that generate recurring +invoices or orders. It also enables the sale of products that generate +subscriptions. **Table of contents** @@ -40,23 +42,37 @@ Usage To make a subscription: -#. Go to *Subscriptions > Configuration > Subscription templates*. -#. Create the templates you consider, choosing the billing frequency: daily, monthly... and the method of creating the invoice and/or order. -#. Go to *Subscription > Subscriptions*. -#. Create a subscription and indicate the start date. When the *Subscriptions Management* cron job is executed, the subscription will begin and the first invoice will be created if the execution date matches the start date. The invoice will also be created when the execution date matches the next invoice date. Additionally, you can manually change the subscription status and create an invoice by using the *Create Invoice* button. This action creates just an invoice even if the subscription template has the *Sale Order & Invoice* option selected, because the *Invoicing mode* option is triggered through the cron job. -#. The cron job will also end the subscription if its end date has been reached. +1. Go to *Subscriptions > Configuration > Subscription templates*. +2. Create the templates you consider, choosing the billing frequency: + daily, monthly... and the method of creating the invoice and/or + order. +3. Go to *Subscription > Subscriptions*. +4. Create a subscription and indicate the start date. When the + *Subscriptions Management* cron job is executed, the subscription + will begin and the first invoice will be created if the execution + date matches the start date. The invoice will also be created when + the execution date matches the next invoice date. Additionally, you + can manually change the subscription status and create an invoice by + using the *Create Invoice* button. This action creates just an + invoice even if the subscription template has the *Sale Order & + Invoice* option selected, because the *Invoicing mode* option is + triggered through the cron job. +5. The cron job will also end the subscription if its end date has been + reached. To create subscriptions with the sale of a product: -#. Go to *Subscriptions > Subscriptions > Products*. -#. Create the product and in the sales tab, complete the fields *Subscribable product* and *Subscription template* -#. Create a sales order with the product and confirm it. +1. Go to *Subscriptions > Subscriptions > Products*. +2. Create the product and in the sales tab, complete the fields + *Subscribable product* and *Subscription template* +3. Create a sales order with the product and confirm it. Known issues / Roadmap ====================== -* Refactor all the onchanges that have business logic to computed write-able fields when possible. Keep onchanges only for UI purposes. -* Add tests. +- Refactor all the onchanges that have business logic to computed + write-able fields when possible. Keep onchanges only for UI purposes. +- Add tests. Bug Tracker =========== @@ -64,7 +80,7 @@ Bug Tracker Bugs are tracked on `GitHub Issues `_. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us to smash it by providing a detailed and welcomed -`feedback `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -72,23 +88,21 @@ Credits ======= Authors -~~~~~~~ +------- * Domatix Contributors -~~~~~~~~~~~~ +------------ -* Carlos Martínez -* Carolina Ferrer +- Carlos Martínez +- Carolina Ferrer +- `Ooops404 `__: - -* `Ooops404 `__: - - * Ilyas + - Ilyas Maintainers -~~~~~~~~~~~ +----------- This module is maintained by the OCA. @@ -100,6 +114,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use. -This module is part of the `OCA/contract `_ project on GitHub. +This module is part of the `OCA/contract `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/subscription_oca/models/sale_subscription.py b/subscription_oca/models/sale_subscription.py index 684570684..abe3b9364 100644 --- a/subscription_oca/models/sale_subscription.py +++ b/subscription_oca/models/sale_subscription.py @@ -179,7 +179,7 @@ class SaleSubscription(models.Model): template_code = record.template_id.code if record.template_id.code else "" code = record.code if record.code else "" slash = "/" if template_code and code else "" - record.name = "{}{}{}".format(template_code, slash, code) + record.name = f"{template_code}{slash}{code}" @api.depends("template_id", "date_start") def _compute_rule_boundary(self): diff --git a/subscription_oca/pyproject.toml b/subscription_oca/pyproject.toml new file mode 100644 index 000000000..4231d0ccc --- /dev/null +++ b/subscription_oca/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["whool"] +build-backend = "whool.buildapi" diff --git a/subscription_oca/readme/CONTRIBUTORS.md b/subscription_oca/readme/CONTRIBUTORS.md new file mode 100644 index 000000000..355719e83 --- /dev/null +++ b/subscription_oca/readme/CONTRIBUTORS.md @@ -0,0 +1,4 @@ +- Carlos Martínez \<\> +- Carolina Ferrer \<\> +- [Ooops404](https://www.ooops404.com): + - Ilyas \<\> diff --git a/subscription_oca/readme/CONTRIBUTORS.rst b/subscription_oca/readme/CONTRIBUTORS.rst deleted file mode 100644 index 8ddfb0521..000000000 --- a/subscription_oca/readme/CONTRIBUTORS.rst +++ /dev/null @@ -1,7 +0,0 @@ -* Carlos Martínez -* Carolina Ferrer - - -* `Ooops404 `__: - - * Ilyas diff --git a/subscription_oca/readme/DESCRIPTION.md b/subscription_oca/readme/DESCRIPTION.md new file mode 100644 index 000000000..826775d35 --- /dev/null +++ b/subscription_oca/readme/DESCRIPTION.md @@ -0,0 +1,3 @@ +This module allows creating subscriptions that generate recurring +invoices or orders. It also enables the sale of products that generate +subscriptions. diff --git a/subscription_oca/readme/DESCRIPTION.rst b/subscription_oca/readme/DESCRIPTION.rst deleted file mode 100644 index 648d69835..000000000 --- a/subscription_oca/readme/DESCRIPTION.rst +++ /dev/null @@ -1 +0,0 @@ -This module allows creating subscriptions that generate recurring invoices or orders. It also enables the sale of products that generate subscriptions. diff --git a/subscription_oca/readme/ROADMAP.md b/subscription_oca/readme/ROADMAP.md new file mode 100644 index 000000000..0672540ca --- /dev/null +++ b/subscription_oca/readme/ROADMAP.md @@ -0,0 +1,3 @@ +- Refactor all the onchanges that have business logic to computed + write-able fields when possible. Keep onchanges only for UI purposes. +- Add tests. diff --git a/subscription_oca/readme/ROADMAP.rst b/subscription_oca/readme/ROADMAP.rst deleted file mode 100644 index c6355d44b..000000000 --- a/subscription_oca/readme/ROADMAP.rst +++ /dev/null @@ -1,2 +0,0 @@ -* Refactor all the onchanges that have business logic to computed write-able fields when possible. Keep onchanges only for UI purposes. -* Add tests. diff --git a/subscription_oca/readme/USAGE.md b/subscription_oca/readme/USAGE.md new file mode 100644 index 000000000..707414ff2 --- /dev/null +++ b/subscription_oca/readme/USAGE.md @@ -0,0 +1,26 @@ +To make a subscription: + +1. Go to *Subscriptions \> Configuration \> Subscription templates*. +2. Create the templates you consider, choosing the billing frequency: + daily, monthly... and the method of creating the invoice and/or + order. +3. Go to *Subscription \> Subscriptions*. +4. Create a subscription and indicate the start date. When the + *Subscriptions Management* cron job is executed, the subscription + will begin and the first invoice will be created if the execution + date matches the start date. The invoice will also be created when + the execution date matches the next invoice date. Additionally, you + can manually change the subscription status and create an invoice by + using the *Create Invoice* button. This action creates just an + invoice even if the subscription template has the *Sale Order & + Invoice* option selected, because the *Invoicing mode* option is + triggered through the cron job. +5. The cron job will also end the subscription if its end date has been + reached. + +To create subscriptions with the sale of a product: + +1. Go to *Subscriptions \> Subscriptions \> Products*. +2. Create the product and in the sales tab, complete the fields + *Subscribable product* and *Subscription template* +3. Create a sales order with the product and confirm it. diff --git a/subscription_oca/readme/USAGE.rst b/subscription_oca/readme/USAGE.rst deleted file mode 100644 index f3ef9cf85..000000000 --- a/subscription_oca/readme/USAGE.rst +++ /dev/null @@ -1,13 +0,0 @@ -To make a subscription: - -#. Go to *Subscriptions > Configuration > Subscription templates*. -#. Create the templates you consider, choosing the billing frequency: daily, monthly... and the method of creating the invoice and/or order. -#. Go to *Subscription > Subscriptions*. -#. Create a subscription and indicate the start date. When the *Subscriptions Management* cron job is executed, the subscription will begin and the first invoice will be created if the execution date matches the start date. The invoice will also be created when the execution date matches the next invoice date. Additionally, you can manually change the subscription status and create an invoice by using the *Create Invoice* button. This action creates just an invoice even if the subscription template has the *Sale Order & Invoice* option selected, because the *Invoicing mode* option is triggered through the cron job. -#. The cron job will also end the subscription if its end date has been reached. - -To create subscriptions with the sale of a product: - -#. Go to *Subscriptions > Subscriptions > Products*. -#. Create the product and in the sales tab, complete the fields *Subscribable product* and *Subscription template* -#. Create a sales order with the product and confirm it. diff --git a/subscription_oca/static/description/index.html b/subscription_oca/static/description/index.html index 2f09cbdd6..fd95e10e8 100644 --- a/subscription_oca/static/description/index.html +++ b/subscription_oca/static/description/index.html @@ -8,10 +8,11 @@ /* :Author: David Goodger (goodger@python.org) -:Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z milde $ +:Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $ :Copyright: This stylesheet has been placed in the public domain. Default cascading style sheet for the HTML output of Docutils. +Despite the name, some widely supported CSS2 features are used. See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to customize this style sheet. @@ -274,7 +275,7 @@ pre.literal-block, pre.doctest-block, pre.math, pre.code { margin-left: 2em ; margin-right: 2em } -pre.code .ln { color: grey; } /* line numbers */ +pre.code .ln { color: gray; } /* line numbers */ pre.code, code { background-color: #eeeeee } pre.code .comment, code .comment { color: #5C6576 } pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold } @@ -300,7 +301,7 @@ span.option { span.pre { white-space: pre } -span.problematic { +span.problematic, pre.problematic { color: red } span.section-subtitle { @@ -368,8 +369,10 @@ ul.auto-toc { !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! source digest: sha256:7f85e1d860d2d5332db014c46c57b9bece8f76a849049bda632499d422ba6dd8 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

Beta License: AGPL-3 OCA/contract Translate me on Weblate Try me on Runboat

-

This module allows creating subscriptions that generate recurring invoices or orders. It also enables the sale of products that generate subscriptions.

+

Beta License: AGPL-3 OCA/contract Translate me on Weblate Try me on Runboat

+

This module allows creating subscriptions that generate recurring +invoices or orders. It also enables the sale of products that generate +subscriptions.

Table of contents

    @@ -389,22 +392,36 @@ ul.auto-toc {

    To make a subscription:

    1. Go to Subscriptions > Configuration > Subscription templates.
    2. -
    3. Create the templates you consider, choosing the billing frequency: daily, monthly… and the method of creating the invoice and/or order.
    4. +
    5. Create the templates you consider, choosing the billing frequency: +daily, monthly… and the method of creating the invoice and/or +order.
    6. Go to Subscription > Subscriptions.
    7. -
    8. Create a subscription and indicate the start date. When the Subscriptions Management cron job is executed, the subscription will begin and the first invoice will be created if the execution date matches the start date. The invoice will also be created when the execution date matches the next invoice date. Additionally, you can manually change the subscription status and create an invoice by using the Create Invoice button. This action creates just an invoice even if the subscription template has the Sale Order & Invoice option selected, because the Invoicing mode option is triggered through the cron job.
    9. -
    10. The cron job will also end the subscription if its end date has been reached.
    11. +
    12. Create a subscription and indicate the start date. When the +Subscriptions Management cron job is executed, the subscription +will begin and the first invoice will be created if the execution +date matches the start date. The invoice will also be created when +the execution date matches the next invoice date. Additionally, you +can manually change the subscription status and create an invoice by +using the Create Invoice button. This action creates just an +invoice even if the subscription template has the Sale Order & +Invoice option selected, because the Invoicing mode option is +triggered through the cron job.
    13. +
    14. The cron job will also end the subscription if its end date has been +reached.

    To create subscriptions with the sale of a product:

    1. Go to Subscriptions > Subscriptions > Products.
    2. -
    3. Create the product and in the sales tab, complete the fields Subscribable product and Subscription template
    4. +
    5. Create the product and in the sales tab, complete the fields +Subscribable product and Subscription template
    6. Create a sales order with the product and confirm it.

Known issues / Roadmap

    -
  • Refactor all the onchanges that have business logic to computed write-able fields when possible. Keep onchanges only for UI purposes.
  • +
  • Refactor all the onchanges that have business logic to computed +write-able fields when possible. Keep onchanges only for UI purposes.
  • Add tests.
@@ -413,7 +430,7 @@ ul.auto-toc {

Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us to smash it by providing a detailed and welcomed -feedback.

+feedback.

Do not contact contributors directly about support or help with technical issues.

@@ -438,11 +455,13 @@ If you spotted it first, help us to smash it by providing a detailed and welcome

Maintainers

This module is maintained by the OCA.

-Odoo Community Association + +Odoo Community Association +

OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.

-

This module is part of the OCA/contract project on GitHub.

+

This module is part of the OCA/contract project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.