diff --git a/purchase_order_secondary_unit/README.rst b/purchase_order_secondary_unit/README.rst index 217c79ee82a..f0dc2327682 100644 --- a/purchase_order_secondary_unit/README.rst +++ b/purchase_order_secondary_unit/README.rst @@ -1,7 +1,3 @@ -.. image:: https://odoo-community.org/readme-banner-image - :target: https://odoo-community.org/get-involved?utm_source=readme - :alt: Odoo Community Association - ============================= Purchase Order Secondary Unit ============================= @@ -17,7 +13,7 @@ Purchase Order Secondary Unit .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png :target: https://odoo-community.org/page/development-status :alt: Beta -.. |badge2| image:: https://img.shields.io/badge/license-AGPL--3-blue.png +.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :alt: License: AGPL-3 .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fpurchase--workflow-lightgray.png?logo=github @@ -54,6 +50,23 @@ For configuration of displaying secondary unit information in purchase reports and the Purchase Order portal, see the guidelines provided in product_secondary_unit. +Settings Visibility +------------------- + +When installing this module, all internal users are automatically added +to the ``product_secondary_unit.group_purchase_secondary_unit`` security +group. This makes the Purchase-related "Hide Secondary Qty Column" and +"Secondary Unit Price Display" settings visible in **Settings > Units of +Measure**. + +If you installed this module before these report presentation settings +were introduced in ``product_secondary_unit``, users may not see these +configuration options. To fix this: + +1. Go to **Settings > Users & Companies > Groups** +2. Search for "Purchase Secondary Unit" +3. Add the relevant users to that group + Usage ===== @@ -68,13 +81,13 @@ To use this module you need to: **Vendor Pricelist Integration** -- When adding a vendor to a product's pricelist (via *Purchase tab > - Vendors*), the secondary unit of measure is automatically defaulted - from the product variant's purchase secondary UOM, or from the product - template if not set on the variant. -- When a new vendor pricelist record is created from purchase order - confirmation, the secondary UOM from the purchase order line is - automatically stored in the vendor pricelist entry. +- When adding a vendor to a product's pricelist (via *Purchase tab > + Vendors*), the secondary unit of measure is automatically defaulted + from the product variant's purchase secondary UOM, or from the + product template if not set on the variant. +- When a new vendor pricelist record is created from purchase order + confirmation, the secondary UOM from the purchase order line is + automatically stored in the vendor pricelist entry. Known issues / Roadmap ====================== @@ -105,17 +118,17 @@ Authors Contributors ------------ -- `Tecnativa `__: +- `Tecnativa `__: - - Sergio Teruel - - Ernesto Tejeda + - Sergio Teruel + - Ernesto Tejeda -- Nikul Chaudhary -- Pimolnat Suntian -- Miguel Ángel Gómez -- `Quartile `__: +- Nikul Chaudhary +- Pimolnat Suntian +- Miguel Ángel Gómez +- `Quartile `__: - - Yoshi Tashiro + - Yoshi Tashiro Maintainers ----------- diff --git a/purchase_order_secondary_unit/__manifest__.py b/purchase_order_secondary_unit/__manifest__.py index 02f1fcad354..7368f53ff9d 100644 --- a/purchase_order_secondary_unit/__manifest__.py +++ b/purchase_order_secondary_unit/__manifest__.py @@ -14,6 +14,7 @@ "auto_install": True, "depends": ["purchase", "product_secondary_unit"], "data": [ + "security/purchase_order_secondary_unit_groups.xml", "views/product_views.xml", "views/product_supplierinfo_views.xml", "views/purchase_order_portal_templates.xml", diff --git a/purchase_order_secondary_unit/readme/CONFIGURE.md b/purchase_order_secondary_unit/readme/CONFIGURE.md index 2ba195bf886..d50c70c5cbc 100644 --- a/purchase_order_secondary_unit/readme/CONFIGURE.md +++ b/purchase_order_secondary_unit/readme/CONFIGURE.md @@ -1,2 +1,16 @@ For configuration of displaying secondary unit information in purchase reports and the Purchase Order portal, see the guidelines provided in product_secondary_unit. + +## Settings Visibility + +When installing this module, all internal users are automatically added to the +`product_secondary_unit.group_purchase_secondary_unit` security group. This makes +the Purchase-related "Hide Secondary Qty Column" and "Secondary Unit Price Display" +settings visible in **Settings > Units of Measure**. + +If you installed this module before these report presentation settings were introduced +in `product_secondary_unit`, users may not see these configuration options. To fix this: + +1. Go to **Settings > Users & Companies > Groups** +2. Search for "Purchase Secondary Unit" +3. Add the relevant users to that group diff --git a/purchase_order_secondary_unit/reports/purchase_order_templates.xml b/purchase_order_secondary_unit/reports/purchase_order_templates.xml index b79d2fc3b3c..86425de5766 100644 --- a/purchase_order_secondary_unit/reports/purchase_order_templates.xml +++ b/purchase_order_secondary_unit/reports/purchase_order_templates.xml @@ -6,16 +6,64 @@ > - + Second Qty - + + + + line.get_secondary_uom_display_mode() != 'secondary' + + + line.get_secondary_uom_display_mode() != 'secondary' + + + + + + + + + + + +
+ + ( + ) + +
+
+ + + line.get_secondary_uom_display_mode() != 'secondary' + + + + diff --git a/purchase_order_secondary_unit/reports/purchase_quotation_templates.xml b/purchase_order_secondary_unit/reports/purchase_quotation_templates.xml index ef64f13d1a1..41661d3a414 100644 --- a/purchase_order_secondary_unit/reports/purchase_quotation_templates.xml +++ b/purchase_order_secondary_unit/reports/purchase_quotation_templates.xml @@ -4,18 +4,57 @@ id="report_purchasequotation_document" inherit_id="purchase.report_purchasequotation_document" > - + - + Second Qty - + - + + + + order_line.get_secondary_uom_display_mode() != 'secondary' + + + order_line.get_secondary_uom_display_mode() != 'secondary' + + + + + + + + + + + +
+ + ( + ) + +
+
diff --git a/purchase_order_secondary_unit/security/purchase_order_secondary_unit_groups.xml b/purchase_order_secondary_unit/security/purchase_order_secondary_unit_groups.xml new file mode 100644 index 00000000000..3467b8cd48f --- /dev/null +++ b/purchase_order_secondary_unit/security/purchase_order_secondary_unit_groups.xml @@ -0,0 +1,9 @@ + + + + + + diff --git a/purchase_order_secondary_unit/static/description/index.html b/purchase_order_secondary_unit/static/description/index.html index df304240986..27a815ccce5 100644 --- a/purchase_order_secondary_unit/static/description/index.html +++ b/purchase_order_secondary_unit/static/description/index.html @@ -3,7 +3,7 @@ -README.rst +Purchase Order Secondary Unit -
+
+

Purchase Order Secondary Unit

- - -Odoo Community Association - -
-

Purchase Order Secondary Unit

-

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

+

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

This module extends the functionality of purchase orders to allow buy products in secondary unit of distinct category.

Users can enter quantities and prices in secondary units on purchase @@ -385,26 +380,45 @@

Purchase Order Secondary Unit

Table of contents

-

Configuration

+

Configuration

For configuration of displaying secondary unit information in purchase reports and the Purchase Order portal, see the guidelines provided in product_secondary_unit.

+
+

Settings Visibility

+

When installing this module, all internal users are automatically added +to the product_secondary_unit.group_purchase_secondary_unit security +group. This makes the Purchase-related “Hide Secondary Qty Column” and +“Secondary Unit Price Display” settings visible in Settings > Units of +Measure.

+

If you installed this module before these report presentation settings +were introduced in product_secondary_unit, users may not see these +configuration options. To fix this:

+
    +
  1. Go to Settings > Users & Companies > Groups
  2. +
  3. Search for “Purchase Secondary Unit”
  4. +
  5. Add the relevant users to that group
  6. +
+
-

Usage

+

Usage

To use this module you need to:

  1. Go to a Product > General Information tab.
  2. @@ -418,22 +432,22 @@

    Usage

    • When adding a vendor to a product’s pricelist (via Purchase tab > Vendors), the secondary unit of measure is automatically defaulted -from the product variant’s purchase secondary UOM, or from the product -template if not set on the variant.
    • +from the product variant’s purchase secondary UOM, or from the +product template if not set on the variant.
    • When a new vendor pricelist record is created from purchase order confirmation, the secondary UOM from the purchase order line is automatically stored in the vendor pricelist entry.
-

Known issues / Roadmap

+

Known issues / Roadmap

Updating existing vendor pricelist records from purchase order confirmation does not currently support secondary UOM or secondary UOM pricing. This is not included in the current scope and may be considered in future improvements.

-

Bug Tracker

+

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 @@ -441,15 +455,15 @@

Bug Tracker

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

-

Credits

+

Credits

-

Authors

+

Authors

  • Tecnativa
-

Contributors

+

Contributors

-

Maintainers

+

Maintainers

This module is maintained by the OCA.

Odoo Community Association @@ -479,6 +493,5 @@

Maintainers

-
diff --git a/purchase_order_secondary_unit/views/purchase_order_portal_templates.xml b/purchase_order_secondary_unit/views/purchase_order_portal_templates.xml index 8f2b5c910a6..3f01e80ef5f 100644 --- a/purchase_order_secondary_unit/views/purchase_order_portal_templates.xml +++ b/purchase_order_secondary_unit/views/purchase_order_portal_templates.xml @@ -12,7 +12,7 @@
- + ( / ) @@ -70,7 +70,7 @@
- + (