From 16499ce5390f261fe1084d86a3a53e20b90cd309 Mon Sep 17 00:00:00 2001 From: Carlos Lopez Date: Thu, 9 Jan 2025 08:07:57 -0500 Subject: [PATCH] [IMP] website_sale_secondary_unit: pre-commit auto fixes --- website_sale_secondary_unit/README.rst | 49 ++++++++++--------- .../models/sale_order.py | 4 +- website_sale_secondary_unit/pyproject.toml | 3 ++ .../readme/CONFIGURE.md | 2 + .../readme/CONFIGURE.rst | 2 - .../readme/CONTRIBUTORS.md | 4 ++ .../readme/CONTRIBUTORS.rst | 5 -- .../readme/DESCRIPTION.md | 2 + .../readme/DESCRIPTION.rst | 2 - website_sale_secondary_unit/readme/USAGE.md | 11 +++++ website_sale_secondary_unit/readme/USAGE.rst | 10 ---- .../static/description/index.html | 37 +++++++------- 12 files changed, 69 insertions(+), 62 deletions(-) create mode 100644 website_sale_secondary_unit/pyproject.toml create mode 100644 website_sale_secondary_unit/readme/CONFIGURE.md delete mode 100644 website_sale_secondary_unit/readme/CONFIGURE.rst create mode 100644 website_sale_secondary_unit/readme/CONTRIBUTORS.md delete mode 100644 website_sale_secondary_unit/readme/CONTRIBUTORS.rst create mode 100644 website_sale_secondary_unit/readme/DESCRIPTION.md delete mode 100644 website_sale_secondary_unit/readme/DESCRIPTION.rst create mode 100644 website_sale_secondary_unit/readme/USAGE.md delete mode 100644 website_sale_secondary_unit/readme/USAGE.rst diff --git a/website_sale_secondary_unit/README.rst b/website_sale_secondary_unit/README.rst index 607ea589fe..1afbd42da1 100644 --- a/website_sale_secondary_unit/README.rst +++ b/website_sale_secondary_unit/README.rst @@ -17,19 +17,19 @@ Website Sale Secondary Unit :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :alt: License: AGPL-3 .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fe--commerce-lightgray.png?logo=github - :target: https://github.com/OCA/e-commerce/tree/15.0/website_sale_secondary_unit + :target: https://github.com/OCA/e-commerce/tree/17.0/website_sale_secondary_unit :alt: OCA/e-commerce .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/e-commerce-15-0/e-commerce-15-0-website_sale_secondary_unit + :target: https://translation.odoo-community.org/projects/e-commerce-17-0/e-commerce-17-0-website_sale_secondary_unit :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/e-commerce&target_branch=15.0 + :target: https://runboat.odoo-community.org/builds?repo=OCA/e-commerce&target_branch=17.0 :alt: Try me on Runboat |badge1| |badge2| |badge3| |badge4| |badge5| -This module extends the functionality of sale_order_secondary_unit module to -allow sell products in online store in secondary units defined. +This module extends the functionality of saleorder_secondary_unit module +to allow sell products in online store in secondary units defined. **Table of contents** @@ -39,22 +39,23 @@ allow sell products in online store in secondary units defined. Configuration ============= -For define the secondary units, you should active *Manage multiples units of measure* on -the user that will be responsable of this function. +For define the secondary units, you should active *Manage multiples +units of measure* on the user that will be responsable of this function. Usage ===== To use this module you need to: -* Go to *'Website > Products > Products'*. -* Select a template. -* Set the secondary units that you need. -* Go to Website Shop and buy this product, you will see a selectable option - with all secondary units defined in the product and visible in website. -* If you do not want to sell in a base product unit and only allow sell in a - secondary unit you can disable the option *'Allow to sell in unit of - measure'* in a product sale tab. +- Go to *'Website > Products > Products'*. +- Select a template. +- Set the secondary units that you need. +- Go to Website Shop and buy this product, you will see a selectable + option with all secondary units defined in the product and visible in + website. +- If you do not want to sell in a base product unit and only allow sell + in a secondary unit you can disable the option *'Allow to sell in unit + of measure'* in a product sale tab. Bug Tracker =========== @@ -62,7 +63,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. @@ -70,21 +71,21 @@ Credits ======= Authors -~~~~~~~ +------- * Tecnativa Contributors -~~~~~~~~~~~~ +------------ -* `Tecnativa `_: +- `Tecnativa `__: - * Sergio Teruel - * Carlos Roca - * Pilar Vargas + - Sergio Teruel + - Carlos Roca + - Pilar Vargas Maintainers -~~~~~~~~~~~ +----------- This module is maintained by the OCA. @@ -96,6 +97,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/e-commerce `_ project on GitHub. +This module is part of the `OCA/e-commerce `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/website_sale_secondary_unit/models/sale_order.py b/website_sale_secondary_unit/models/sale_order.py index 1db4623bcf..61ca51dd57 100644 --- a/website_sale_secondary_unit/models/sale_order.py +++ b/website_sale_secondary_unit/models/sale_order.py @@ -41,7 +41,7 @@ def _cart_update( add_qty=0, set_qty=0, attributes=None, - **kwargs + **kwargs, ): if line_id: sol = self.env["sale.order.line"].browse(line_id) @@ -72,7 +72,7 @@ def _cart_update( add_qty=add_qty, set_qty=set_qty, attributes=attributes, - **kwargs + **kwargs, ) def _compute_cart_info(self): diff --git a/website_sale_secondary_unit/pyproject.toml b/website_sale_secondary_unit/pyproject.toml new file mode 100644 index 0000000000..4231d0cccb --- /dev/null +++ b/website_sale_secondary_unit/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["whool"] +build-backend = "whool.buildapi" diff --git a/website_sale_secondary_unit/readme/CONFIGURE.md b/website_sale_secondary_unit/readme/CONFIGURE.md new file mode 100644 index 0000000000..98a223ffb7 --- /dev/null +++ b/website_sale_secondary_unit/readme/CONFIGURE.md @@ -0,0 +1,2 @@ +For define the secondary units, you should active *Manage multiples +units of measure* on the user that will be responsable of this function. diff --git a/website_sale_secondary_unit/readme/CONFIGURE.rst b/website_sale_secondary_unit/readme/CONFIGURE.rst deleted file mode 100644 index d904421958..0000000000 --- a/website_sale_secondary_unit/readme/CONFIGURE.rst +++ /dev/null @@ -1,2 +0,0 @@ -For define the secondary units, you should active *Manage multiples units of measure* on -the user that will be responsable of this function. diff --git a/website_sale_secondary_unit/readme/CONTRIBUTORS.md b/website_sale_secondary_unit/readme/CONTRIBUTORS.md new file mode 100644 index 0000000000..91dff99b67 --- /dev/null +++ b/website_sale_secondary_unit/readme/CONTRIBUTORS.md @@ -0,0 +1,4 @@ +- [Tecnativa](https://www.tecnativa.com): + - Sergio Teruel + - Carlos Roca + - Pilar Vargas diff --git a/website_sale_secondary_unit/readme/CONTRIBUTORS.rst b/website_sale_secondary_unit/readme/CONTRIBUTORS.rst deleted file mode 100644 index 9321aaf14e..0000000000 --- a/website_sale_secondary_unit/readme/CONTRIBUTORS.rst +++ /dev/null @@ -1,5 +0,0 @@ -* `Tecnativa `_: - - * Sergio Teruel - * Carlos Roca - * Pilar Vargas diff --git a/website_sale_secondary_unit/readme/DESCRIPTION.md b/website_sale_secondary_unit/readme/DESCRIPTION.md new file mode 100644 index 0000000000..498cf4e510 --- /dev/null +++ b/website_sale_secondary_unit/readme/DESCRIPTION.md @@ -0,0 +1,2 @@ +This module extends the functionality of saleorder_secondary_unit module +to allow sell products in online store in secondary units defined. diff --git a/website_sale_secondary_unit/readme/DESCRIPTION.rst b/website_sale_secondary_unit/readme/DESCRIPTION.rst deleted file mode 100644 index 9c64f39cc2..0000000000 --- a/website_sale_secondary_unit/readme/DESCRIPTION.rst +++ /dev/null @@ -1,2 +0,0 @@ -This module extends the functionality of sale_order_secondary_unit module to -allow sell products in online store in secondary units defined. diff --git a/website_sale_secondary_unit/readme/USAGE.md b/website_sale_secondary_unit/readme/USAGE.md new file mode 100644 index 0000000000..508a9b8b58 --- /dev/null +++ b/website_sale_secondary_unit/readme/USAGE.md @@ -0,0 +1,11 @@ +To use this module you need to: + +- Go to *'Website \> Products \> Products'*. +- Select a template. +- Set the secondary units that you need. +- Go to Website Shop and buy this product, you will see a selectable + option with all secondary units defined in the product and visible in + website. +- If you do not want to sell in a base product unit and only allow sell + in a secondary unit you can disable the option *'Allow to sell in unit + of measure'* in a product sale tab. diff --git a/website_sale_secondary_unit/readme/USAGE.rst b/website_sale_secondary_unit/readme/USAGE.rst deleted file mode 100644 index b42f8d3ebf..0000000000 --- a/website_sale_secondary_unit/readme/USAGE.rst +++ /dev/null @@ -1,10 +0,0 @@ -To use this module you need to: - -* Go to *'Website > Products > Products'*. -* Select a template. -* Set the secondary units that you need. -* Go to Website Shop and buy this product, you will see a selectable option - with all secondary units defined in the product and visible in website. -* If you do not want to sell in a base product unit and only allow sell in a - secondary unit you can disable the option *'Allow to sell in unit of - measure'* in a product sale tab. diff --git a/website_sale_secondary_unit/static/description/index.html b/website_sale_secondary_unit/static/description/index.html index ac9a6c7506..3b8a08f248 100644 --- a/website_sale_secondary_unit/static/description/index.html +++ b/website_sale_secondary_unit/static/description/index.html @@ -1,4 +1,3 @@ - @@ -9,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. @@ -275,7 +275,7 @@ 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 } @@ -301,7 +301,7 @@ span.pre { white-space: pre } -span.problematic { +span.problematic, pre.problematic { color: red } span.section-subtitle { @@ -369,9 +369,9 @@

Website Sale Secondary Unit

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! source digest: sha256:b22305a090cabad4fd64b941824c90c602eec985747acf0fc3039558a4b22968 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

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

-

This module extends the functionality of sale_order_secondary_unit module to -allow sell products in online store in secondary units defined.

+

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

+

This module extends the functionality of saleorder_secondary_unit module +to allow sell products in online store in secondary units defined.

Table of contents

    @@ -388,8 +388,8 @@

    Website Sale Secondary Unit

Configuration

-

For define the secondary units, you should active Manage multiples units of measure on -the user that will be responsable of this function.

+

For define the secondary units, you should active Manage multiples +units of measure on the user that will be responsable of this function.

Usage

@@ -398,11 +398,12 @@

Usage

  • Go to ‘Website > Products > Products’.
  • Select a template.
  • Set the secondary units that you need.
  • -
  • Go to Website Shop and buy this product, you will see a selectable option -with all secondary units defined in the product and visible in website.
  • -
  • If you do not want to sell in a base product unit and only allow sell in a -secondary unit you can disable the option ‘Allow to sell in unit of -measure’ in a product sale tab.
  • +
  • Go to Website Shop and buy this product, you will see a selectable +option with all secondary units defined in the product and visible in +website.
  • +
  • If you do not want to sell in a base product unit and only allow sell +in a secondary unit you can disable the option ‘Allow to sell in unit +of measure’ in a product sale tab.
  • @@ -410,7 +411,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.

    @@ -435,11 +436,13 @@

    Contributors

    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/e-commerce project on GitHub.

    +

    This module is part of the OCA/e-commerce project on GitHub.

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