From 65cfcc8769ff3021506fb916e6de750a64a5534d Mon Sep 17 00:00:00 2001 From: terrence Date: Mon, 30 Sep 2019 16:48:10 +0300 Subject: [PATCH 01/16] [ADD] stock_brand: brand stock picking documents --- stock_brand/README.rst | 97 +++++ stock_brand/__init__.py | 5 + stock_brand/__manifest__.py | 20 + stock_brand/models/__init__.py | 5 + stock_brand/models/sale_order.py | 15 + stock_brand/models/stock_picking.py | 12 + stock_brand/readme/CONFIGURE.rst | 2 + stock_brand/readme/CONTRIBUTORS.rst | 1 + stock_brand/readme/CREDITS.rst | 1 + stock_brand/readme/DESCRIPTION.rst | 3 + stock_brand/readme/USAGE.rst | 7 + stock_brand/static/description/icon.png | Bin 0 -> 9455 bytes stock_brand/static/description/index.html | 452 ++++++++++++++++++++++ stock_brand/tests/__init__.py | 4 + stock_brand/tests/test_sale_order.py | 33 ++ stock_brand/views/sale_views.xml | 12 + 16 files changed, 669 insertions(+) create mode 100644 stock_brand/README.rst create mode 100644 stock_brand/__init__.py create mode 100644 stock_brand/__manifest__.py create mode 100644 stock_brand/models/__init__.py create mode 100644 stock_brand/models/sale_order.py create mode 100644 stock_brand/models/stock_picking.py create mode 100644 stock_brand/readme/CONFIGURE.rst create mode 100644 stock_brand/readme/CONTRIBUTORS.rst create mode 100644 stock_brand/readme/CREDITS.rst create mode 100644 stock_brand/readme/DESCRIPTION.rst create mode 100644 stock_brand/readme/USAGE.rst create mode 100644 stock_brand/static/description/icon.png create mode 100644 stock_brand/static/description/index.html create mode 100644 stock_brand/tests/__init__.py create mode 100644 stock_brand/tests/test_sale_order.py create mode 100644 stock_brand/views/sale_views.xml diff --git a/stock_brand/README.rst b/stock_brand/README.rst new file mode 100644 index 000000000..27ca4ed38 --- /dev/null +++ b/stock_brand/README.rst @@ -0,0 +1,97 @@ +=========== +Stock Brand +=========== + +.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |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/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%2Fbrand-lightgray.png?logo=github + :target: https://github.com/OCA/brand/tree/12.0/sale_brand + :alt: OCA/brand +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/brand-12-0/brand-12-0-sale_brand + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png + :target: https://runbot.odoo-community.org/runbot/284/12.0 + :alt: Try me on Runbot + +|badge1| |badge2| |badge3| |badge4| |badge5| + +This module allows you to send or print branded delivery slips and operation documents. +It adds a brand field on the procurement group to propagate the value on +the stock picking documents. + +**Table of contents** + +.. contents:: + :local: + +Configuration +============= + +To configure this module, please refer to the documentation of +`partner_brand `_. + +Usage +===== + +To use this module, you need to: + +#. Go to Sales > Sale Orders +#. Select or create a sale order +#. Enter the information and the brand +#. Confirm Sale order to create pickings +#. Print the delivery slip PDF report. It includes the information of the brand. + +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 smashing it by providing a detailed and welcomed +`feedback `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +~~~~~~~ + +* Sunflower IT + +Contributors +~~~~~~~~~~~~ + +* Terrence Nzaywa + +Other credits +~~~~~~~~~~~~~ + +* Open Source Integrators + +Maintainers +~~~~~~~~~~~ + +This module is maintained by the OCA. + +.. image:: https://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: https://odoo-community.org + +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/brand `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/stock_brand/__init__.py b/stock_brand/__init__.py new file mode 100644 index 000000000..4e9990cb3 --- /dev/null +++ b/stock_brand/__init__.py @@ -0,0 +1,5 @@ +# Copyright (C) 2019 Sunflower IT +# License GNU Affero General Public License . + + +from . import models diff --git a/stock_brand/__manifest__.py b/stock_brand/__manifest__.py new file mode 100644 index 000000000..bfe55eb38 --- /dev/null +++ b/stock_brand/__manifest__.py @@ -0,0 +1,20 @@ +# Copyright (C) 2019 Sunflower IT +# License GNU Affero General Public License . + +{ + "name": "Stock Brand", + "summary": "Manage branded delivery orders", + "version": "12.0.1.0.0", + "category": "Stock Management", + "website": "https://github.com/OCA/stock-logistics-workflow", + "author": "Sunflower IT, Odoo Community Association (OCA)", + "license": "AGPL-3", + "depends": [ + 'sale_stock', + ], + "data": [ + "views/sale_views.xml", + ], + "installable": True, + "development_status": "Beta" +} diff --git a/stock_brand/models/__init__.py b/stock_brand/models/__init__.py new file mode 100644 index 000000000..69e02d1b5 --- /dev/null +++ b/stock_brand/models/__init__.py @@ -0,0 +1,5 @@ +# Copyright (C) 2019 Sunflower IT +# License GNU Affero General Public License . + +from . import stock_picking +from . import sale_order \ No newline at end of file diff --git a/stock_brand/models/sale_order.py b/stock_brand/models/sale_order.py new file mode 100644 index 000000000..6f5a65a11 --- /dev/null +++ b/stock_brand/models/sale_order.py @@ -0,0 +1,15 @@ +# Copyright (C) 2019 Sunflower IT +# License GNU Affero General Public License . + +from odoo import api, models + + +class SaleOrder(models.Model): + _inherit = 'sale.order' + + @api.multi + def action_confirm(self): + ret = super(SaleOrder, self).action_confirm() + for order in self: + order.picking_ids.write({'brand_id': order.brand_id.id}) + return ret diff --git a/stock_brand/models/stock_picking.py b/stock_brand/models/stock_picking.py new file mode 100644 index 000000000..21cf26d6d --- /dev/null +++ b/stock_brand/models/stock_picking.py @@ -0,0 +1,12 @@ +# Copyright (C) 2019 Sunflower IT +# License GNU Affero General Public License . + +from odoo import fields, models + + +class StockPicking(models.Model): + _inherit = 'stock.picking' + + brand_id = fields.Many2one( + 'res.brand', string='Brand', + help="Brand to use for this picking") diff --git a/stock_brand/readme/CONFIGURE.rst b/stock_brand/readme/CONFIGURE.rst new file mode 100644 index 000000000..a20e2200f --- /dev/null +++ b/stock_brand/readme/CONFIGURE.rst @@ -0,0 +1,2 @@ +To configure this module, please refer to the documentation of +`partner_brand `_. diff --git a/stock_brand/readme/CONTRIBUTORS.rst b/stock_brand/readme/CONTRIBUTORS.rst new file mode 100644 index 000000000..26ddb33a7 --- /dev/null +++ b/stock_brand/readme/CONTRIBUTORS.rst @@ -0,0 +1 @@ +* Terrence Nzaywa \ No newline at end of file diff --git a/stock_brand/readme/CREDITS.rst b/stock_brand/readme/CREDITS.rst new file mode 100644 index 000000000..8ced9caf4 --- /dev/null +++ b/stock_brand/readme/CREDITS.rst @@ -0,0 +1 @@ +* Sunflower IT \ No newline at end of file diff --git a/stock_brand/readme/DESCRIPTION.rst b/stock_brand/readme/DESCRIPTION.rst new file mode 100644 index 000000000..61070a3a9 --- /dev/null +++ b/stock_brand/readme/DESCRIPTION.rst @@ -0,0 +1,3 @@ +This module allows you to send or print branded delivery slips and operation documents. +It adds a brand field on the procurement group to propagate the value on +the stock picking documents. diff --git a/stock_brand/readme/USAGE.rst b/stock_brand/readme/USAGE.rst new file mode 100644 index 000000000..2a2861cc6 --- /dev/null +++ b/stock_brand/readme/USAGE.rst @@ -0,0 +1,7 @@ +To use this module, you need to: + +#. Go to Sales > Sale Orders +#. Select or create a sale order +#. Enter the information and the brand +#. Confirm Sale order to create pickings +#. Print the delivery slip PDF report. It includes the information of the brand. diff --git a/stock_brand/static/description/icon.png b/stock_brand/static/description/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..3a0328b516c4980e8e44cdb63fd945757ddd132d GIT binary patch literal 9455 zcmW++2RxMjAAjx~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o(tp)qli|NeV( z@H_=R8V39rt5J5YB2Ky?4eJJ#b`_iBe2ot~6%7mLt5t8Vwi^Jy7|jWXqa3amOIoRb zOr}WVFP--DsS`1WpN%~)t3R!arKF^Q$e12KEqU36AWwnCBICpH4XCsfnyrHr>$I$4 z!DpKX$OKLWarN7nv@!uIA+~RNO)l$$w}p(;b>mx8pwYvu;dD_unryX_NhT8*Tj>BTrTTL&!?O+%Rv;b?B??gSzdp?6Uug9{ zd@V08Z$BdI?fpoCS$)t4mg4rT8Q_I}h`0d-vYZ^|dOB*Q^S|xqTV*vIg?@fVFSmMpaw0qtTRbx} z({Pg?#{2`sc9)M5N$*N|4;^t$+QP?#mov zGVC@I*lBVrOU-%2y!7%)fAKjpEFsgQc4{amtiHb95KQEwvf<(3T<9-Zm$xIew#P22 zc2Ix|App^>v6(3L_MCU0d3W##AB0M~3D00EWoKZqsJYT(#@w$Y_H7G22M~ApVFTRHMI_3be)Lkn#0F*V8Pq zc}`Cjy$bE;FJ6H7p=0y#R>`}-m4(0F>%@P|?7fx{=R^uFdISRnZ2W_xQhD{YuR3t< z{6yxu=4~JkeA;|(J6_nv#>Nvs&FuLA&PW^he@t(UwFFE8)|a!R{`E`K`i^ZnyE4$k z;(749Ix|oi$c3QbEJ3b~D_kQsPz~fIUKym($a_7dJ?o+40*OLl^{=&oq$<#Q(yyrp z{J-FAniyAw9tPbe&IhQ|a`DqFTVQGQ&Gq3!C2==4x{6EJwiPZ8zub-iXoUtkJiG{} zPaR&}_fn8_z~(=;5lD-aPWD3z8PZS@AaUiomF!G8I}Mf>e~0g#BelA-5#`cj;O5>N Xviia!U7SGha1wx#SCgwmn*{w2TRX*I literal 0 HcmV?d00001 diff --git a/stock_brand/static/description/index.html b/stock_brand/static/description/index.html new file mode 100644 index 000000000..8c94aa7c2 --- /dev/null +++ b/stock_brand/static/description/index.html @@ -0,0 +1,452 @@ + + + + + + +Sale Brand + + + +
+

Sale Brand

+ + +

Beta License: AGPL-3 OCA/brand Translate me on Weblate Try me on Runbot

+

This module allows you to send branded quotations and sales orders to your +customers. +It adds a brand field on the quotation and propagate the value on +the invoices.

+

Table of contents

+ +
+

Configuration

+

To configure this module, please refer to the documentation of +partner_brand.

+
+
+

Usage

+

To use this module, you need to:

+
    +
  1. Go to Sales > Quotations
  2. +
  3. Select or create a quotation
  4. +
  5. Enter the information and the brand
  6. +
  7. Print the PDF report. It includes the information of the brand.
  8. +
  9. Confirm the quotation and generate an invoice
  10. +
  11. Print the PDF report. It includes the information of the brand.
  12. +
+
+
+

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 smashing it by providing a detailed and welcomed +feedback.

+

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

+
+
+

Credits

+
+

Authors

+
    +
  • Open Source Integrators
  • +
+
+ +
+

Other credits

+ +
+
+

Maintainers

+

This module is maintained by the OCA.

+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.

+

Current maintainer:

+

osi-scampbell

+

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

+

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

+
+
+
+ + diff --git a/stock_brand/tests/__init__.py b/stock_brand/tests/__init__.py new file mode 100644 index 000000000..f4ec1ce96 --- /dev/null +++ b/stock_brand/tests/__init__.py @@ -0,0 +1,4 @@ +# Copyright (C) 2019 Sunflower IT +# License GNU Affero General Public License . + +from . import test_sale_order \ No newline at end of file diff --git a/stock_brand/tests/test_sale_order.py b/stock_brand/tests/test_sale_order.py new file mode 100644 index 000000000..1d6c5ab0a --- /dev/null +++ b/stock_brand/tests/test_sale_order.py @@ -0,0 +1,33 @@ +from odoo.tests import common + + +class TestSaleOrderStockPickingBrandID(common.TransactionCase): + def test_stock_picking_brand_id(self): + """ + Test stock.picking brand_id is same as sale.order's brand_id + """ + product = self.env.ref('product.product_order_01') + brand_id = self.env['res.brand'].create({'name': 'Brand1'}) + product.type = 'product' + vals = { + 'partner_id': self.partner.id, + 'partner_invoice_id': self.partner.id, + 'partner_shipping_id': self.partner.id, + 'brand_id': brand_id.id, + 'order_line': [(0, 0, {'name': product.name, + 'product_id': product.id, + 'product_uom_qty': 2, + 'product_uom': product.uom_id.id, + 'price_unit': product.list_price})], + 'pricelist_id': self.env.ref('product.list0').id, + 'picking_policy': 'direct', + } + self.so = self.env['sale.order'].create(vals) + + # confirm our standard so, check the picking brand id + self.so.action_confirm() + self.assertTrue(self.so.picking_ids, 'Sale Stock: no picking created') + self.assertEqual( + self.so.picking_ids[0].brand_id.id, + self.so.brand_id.id + ) diff --git a/stock_brand/views/sale_views.xml b/stock_brand/views/sale_views.xml new file mode 100644 index 000000000..c0f7bd27d --- /dev/null +++ b/stock_brand/views/sale_views.xml @@ -0,0 +1,12 @@ + + + stock.picking.form.brand + stock.picking + + + + + + + + From d4815bfb2e901e0ff4b63ed3dbb333794650f238 Mon Sep 17 00:00:00 2001 From: bosd Date: Mon, 7 Apr 2025 20:14:47 +0200 Subject: [PATCH 02/16] [IMP] stock_brand: pre-commit auto fixes --- stock_brand/README.rst | 54 +++++++------- stock_brand/__manifest__.py | 6 +- stock_brand/models/__init__.py | 2 +- stock_brand/models/sale_order.py | 6 +- stock_brand/models/stock_picking.py | 6 +- stock_brand/pyproject.toml | 3 + stock_brand/readme/CONFIGURE.md | 2 + stock_brand/readme/CONFIGURE.rst | 2 - stock_brand/readme/CONTRIBUTORS.md | 2 + stock_brand/readme/CONTRIBUTORS.rst | 1 - stock_brand/readme/CREDITS.md | 1 + stock_brand/readme/CREDITS.rst | 1 - stock_brand/readme/DESCRIPTION.md | 3 + stock_brand/readme/DESCRIPTION.rst | 3 - stock_brand/readme/USAGE.md | 8 ++ stock_brand/readme/USAGE.rst | 7 -- stock_brand/static/description/index.html | 91 +++++++++++------------ stock_brand/tests/__init__.py | 2 +- stock_brand/tests/test_sale_order.py | 45 ++++++----- stock_brand/views/sale_views.xml | 4 +- 20 files changed, 131 insertions(+), 118 deletions(-) create mode 100644 stock_brand/pyproject.toml create mode 100644 stock_brand/readme/CONFIGURE.md delete mode 100644 stock_brand/readme/CONFIGURE.rst create mode 100644 stock_brand/readme/CONTRIBUTORS.md delete mode 100644 stock_brand/readme/CONTRIBUTORS.rst create mode 100644 stock_brand/readme/CREDITS.md delete mode 100644 stock_brand/readme/CREDITS.rst create mode 100644 stock_brand/readme/DESCRIPTION.md delete mode 100644 stock_brand/readme/DESCRIPTION.rst create mode 100644 stock_brand/readme/USAGE.md delete mode 100644 stock_brand/readme/USAGE.rst diff --git a/stock_brand/README.rst b/stock_brand/README.rst index 27ca4ed38..2d4165425 100644 --- a/stock_brand/README.rst +++ b/stock_brand/README.rst @@ -2,10 +2,13 @@ Stock Brand =========== -.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:71051ac6c93c02153f7f61f6ce2eaa52824eed2c487bfb611d1ce06abf7df9a3 + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png :target: https://odoo-community.org/page/development-status @@ -14,20 +17,20 @@ Stock Brand :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :alt: License: AGPL-3 .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fbrand-lightgray.png?logo=github - :target: https://github.com/OCA/brand/tree/12.0/sale_brand + :target: https://github.com/OCA/brand/tree/18.0/stock_brand :alt: OCA/brand .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/brand-12-0/brand-12-0-sale_brand + :target: https://translation.odoo-community.org/projects/brand-18-0/brand-18-0-stock_brand :alt: Translate me on Weblate -.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png - :target: https://runbot.odoo-community.org/runbot/284/12.0 - :alt: Try me on Runbot +.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png + :target: https://runboat.odoo-community.org/builds?repo=OCA/brand&target_branch=18.0 + :alt: Try me on Runboat -|badge1| |badge2| |badge3| |badge4| |badge5| +|badge1| |badge2| |badge3| |badge4| |badge5| -This module allows you to send or print branded delivery slips and operation documents. -It adds a brand field on the procurement group to propagate the value on -the stock picking documents. +This module allows you to send or print branded delivery slips and +operation documents. It adds a brand field on the procurement group to +propagate the value on the stock picking documents. **Table of contents** @@ -38,26 +41,27 @@ Configuration ============= To configure this module, please refer to the documentation of -`partner_brand `_. +`partner_brand `__. Usage ===== To use this module, you need to: -#. Go to Sales > Sale Orders -#. Select or create a sale order -#. Enter the information and the brand -#. Confirm Sale order to create pickings -#. Print the delivery slip PDF report. It includes the information of the brand. +1. Go to Sales > Sale Orders +2. Select or create a sale order +3. Enter the information and the brand +4. Confirm Sale order to create pickings +5. Print the delivery slip PDF report. It includes the information of + the brand. 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 smashing it by providing a detailed and welcomed -`feedback `_. +If you spotted it first, help us to smash it by providing a detailed and welcomed +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -65,22 +69,22 @@ Credits ======= Authors -~~~~~~~ +------- * Sunflower IT Contributors -~~~~~~~~~~~~ +------------ -* Terrence Nzaywa +- Terrence Nzaywa Other credits -~~~~~~~~~~~~~ +------------- -* Open Source Integrators +- Sunflower IT Maintainers -~~~~~~~~~~~ +----------- This module is maintained by the OCA. @@ -92,6 +96,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/brand `_ project on GitHub. +This module is part of the `OCA/brand `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/stock_brand/__manifest__.py b/stock_brand/__manifest__.py index bfe55eb38..8fc3f6c87 100644 --- a/stock_brand/__manifest__.py +++ b/stock_brand/__manifest__.py @@ -6,15 +6,15 @@ "summary": "Manage branded delivery orders", "version": "12.0.1.0.0", "category": "Stock Management", - "website": "https://github.com/OCA/stock-logistics-workflow", + "website": "https://github.com/OCA/brand", "author": "Sunflower IT, Odoo Community Association (OCA)", "license": "AGPL-3", "depends": [ - 'sale_stock', + "sale_stock", ], "data": [ "views/sale_views.xml", ], "installable": True, - "development_status": "Beta" + "development_status": "Beta", } diff --git a/stock_brand/models/__init__.py b/stock_brand/models/__init__.py index 69e02d1b5..ddd15007e 100644 --- a/stock_brand/models/__init__.py +++ b/stock_brand/models/__init__.py @@ -2,4 +2,4 @@ # License GNU Affero General Public License . from . import stock_picking -from . import sale_order \ No newline at end of file +from . import sale_order diff --git a/stock_brand/models/sale_order.py b/stock_brand/models/sale_order.py index 6f5a65a11..e39df2597 100644 --- a/stock_brand/models/sale_order.py +++ b/stock_brand/models/sale_order.py @@ -5,11 +5,11 @@ class SaleOrder(models.Model): - _inherit = 'sale.order' + _inherit = "sale.order" @api.multi def action_confirm(self): - ret = super(SaleOrder, self).action_confirm() + ret = super().action_confirm() for order in self: - order.picking_ids.write({'brand_id': order.brand_id.id}) + order.picking_ids.write({"brand_id": order.brand_id.id}) return ret diff --git a/stock_brand/models/stock_picking.py b/stock_brand/models/stock_picking.py index 21cf26d6d..0b1eeff5c 100644 --- a/stock_brand/models/stock_picking.py +++ b/stock_brand/models/stock_picking.py @@ -5,8 +5,8 @@ class StockPicking(models.Model): - _inherit = 'stock.picking' + _inherit = "stock.picking" brand_id = fields.Many2one( - 'res.brand', string='Brand', - help="Brand to use for this picking") + "res.brand", string="Brand", help="Brand to use for this picking" + ) diff --git a/stock_brand/pyproject.toml b/stock_brand/pyproject.toml new file mode 100644 index 000000000..4231d0ccc --- /dev/null +++ b/stock_brand/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["whool"] +build-backend = "whool.buildapi" diff --git a/stock_brand/readme/CONFIGURE.md b/stock_brand/readme/CONFIGURE.md new file mode 100644 index 000000000..cefb67bd9 --- /dev/null +++ b/stock_brand/readme/CONFIGURE.md @@ -0,0 +1,2 @@ +To configure this module, please refer to the documentation of +[partner_brand](https://github.com/OCA/partner-contact/blob/12.0/partner_brand/README.rst). diff --git a/stock_brand/readme/CONFIGURE.rst b/stock_brand/readme/CONFIGURE.rst deleted file mode 100644 index a20e2200f..000000000 --- a/stock_brand/readme/CONFIGURE.rst +++ /dev/null @@ -1,2 +0,0 @@ -To configure this module, please refer to the documentation of -`partner_brand `_. diff --git a/stock_brand/readme/CONTRIBUTORS.md b/stock_brand/readme/CONTRIBUTORS.md new file mode 100644 index 000000000..674ca1a30 --- /dev/null +++ b/stock_brand/readme/CONTRIBUTORS.md @@ -0,0 +1,2 @@ +- Terrence Nzaywa \<, + \> diff --git a/stock_brand/readme/CONTRIBUTORS.rst b/stock_brand/readme/CONTRIBUTORS.rst deleted file mode 100644 index 26ddb33a7..000000000 --- a/stock_brand/readme/CONTRIBUTORS.rst +++ /dev/null @@ -1 +0,0 @@ -* Terrence Nzaywa \ No newline at end of file diff --git a/stock_brand/readme/CREDITS.md b/stock_brand/readme/CREDITS.md new file mode 100644 index 000000000..f14262882 --- /dev/null +++ b/stock_brand/readme/CREDITS.md @@ -0,0 +1 @@ +- Sunflower IT \<\> diff --git a/stock_brand/readme/CREDITS.rst b/stock_brand/readme/CREDITS.rst deleted file mode 100644 index 8ced9caf4..000000000 --- a/stock_brand/readme/CREDITS.rst +++ /dev/null @@ -1 +0,0 @@ -* Sunflower IT \ No newline at end of file diff --git a/stock_brand/readme/DESCRIPTION.md b/stock_brand/readme/DESCRIPTION.md new file mode 100644 index 000000000..73746f594 --- /dev/null +++ b/stock_brand/readme/DESCRIPTION.md @@ -0,0 +1,3 @@ +This module allows you to send or print branded delivery slips and +operation documents. It adds a brand field on the procurement group to +propagate the value on the stock picking documents. diff --git a/stock_brand/readme/DESCRIPTION.rst b/stock_brand/readme/DESCRIPTION.rst deleted file mode 100644 index 61070a3a9..000000000 --- a/stock_brand/readme/DESCRIPTION.rst +++ /dev/null @@ -1,3 +0,0 @@ -This module allows you to send or print branded delivery slips and operation documents. -It adds a brand field on the procurement group to propagate the value on -the stock picking documents. diff --git a/stock_brand/readme/USAGE.md b/stock_brand/readme/USAGE.md new file mode 100644 index 000000000..35951ea9d --- /dev/null +++ b/stock_brand/readme/USAGE.md @@ -0,0 +1,8 @@ +To use this module, you need to: + +1. Go to Sales \> Sale Orders +2. Select or create a sale order +3. Enter the information and the brand +4. Confirm Sale order to create pickings +5. Print the delivery slip PDF report. It includes the information of + the brand. diff --git a/stock_brand/readme/USAGE.rst b/stock_brand/readme/USAGE.rst deleted file mode 100644 index 2a2861cc6..000000000 --- a/stock_brand/readme/USAGE.rst +++ /dev/null @@ -1,7 +0,0 @@ -To use this module, you need to: - -#. Go to Sales > Sale Orders -#. Select or create a sale order -#. Enter the information and the brand -#. Confirm Sale order to create pickings -#. Print the delivery slip PDF report. It includes the information of the brand. diff --git a/stock_brand/static/description/index.html b/stock_brand/static/description/index.html index 8c94aa7c2..f84223047 100644 --- a/stock_brand/static/description/index.html +++ b/stock_brand/static/description/index.html @@ -1,20 +1,20 @@ - - -Sale Brand + +Stock Brand -
-

Sale Brand

+
+

Stock Brand

-

Beta License: AGPL-3 OCA/brand Translate me on Weblate Try me on Runbot

-

This module allows you to send branded quotations and sales orders to your -customers. -It adds a brand field on the quotation and propagate the value on -the invoices.

+

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

+

This module allows you to send or print branded delivery slips and +operation documents. It adds a brand field on the procurement group to +propagate the value on the stock picking documents.

Table of contents

-

Configuration

+

Configuration

To configure this module, please refer to the documentation of partner_brand.

-

Usage

+

Usage

To use this module, you need to:

    -
  1. Go to Sales > Quotations
  2. -
  3. Select or create a quotation
  4. +
  5. Go to Sales > Sale Orders
  6. +
  7. Select or create a sale order
  8. Enter the information and the brand
  9. -
  10. Print the PDF report. It includes the information of the brand.
  11. -
  12. Confirm the quotation and generate an invoice
  13. -
  14. Print the PDF report. It includes the information of the brand.
  15. +
  16. Confirm Sale order to create pickings
  17. +
  18. Print the delivery slip PDF report. It includes the information of +the brand.
-

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 smashing it by providing a detailed and welcomed -feedback.

+If you spotted it first, help us to smash it by providing a detailed and welcomed +feedback.

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

-

Credits

+

Credits

-

Authors

+

Authors

    -
  • Open Source Integrators
  • +
  • Sunflower IT
-

Maintainers

+

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.

-

Current maintainer:

-

osi-scampbell

-

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

+

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

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

diff --git a/stock_brand/tests/__init__.py b/stock_brand/tests/__init__.py index f4ec1ce96..7b41c988a 100644 --- a/stock_brand/tests/__init__.py +++ b/stock_brand/tests/__init__.py @@ -1,4 +1,4 @@ # Copyright (C) 2019 Sunflower IT # License GNU Affero General Public License . -from . import test_sale_order \ No newline at end of file +from . import test_sale_order diff --git a/stock_brand/tests/test_sale_order.py b/stock_brand/tests/test_sale_order.py index 1d6c5ab0a..770e7294a 100644 --- a/stock_brand/tests/test_sale_order.py +++ b/stock_brand/tests/test_sale_order.py @@ -6,28 +6,33 @@ def test_stock_picking_brand_id(self): """ Test stock.picking brand_id is same as sale.order's brand_id """ - product = self.env.ref('product.product_order_01') - brand_id = self.env['res.brand'].create({'name': 'Brand1'}) - product.type = 'product' + product = self.env.ref("product.product_order_01") + brand_id = self.env["res.brand"].create({"name": "Brand1"}) + product.type = "product" vals = { - 'partner_id': self.partner.id, - 'partner_invoice_id': self.partner.id, - 'partner_shipping_id': self.partner.id, - 'brand_id': brand_id.id, - 'order_line': [(0, 0, {'name': product.name, - 'product_id': product.id, - 'product_uom_qty': 2, - 'product_uom': product.uom_id.id, - 'price_unit': product.list_price})], - 'pricelist_id': self.env.ref('product.list0').id, - 'picking_policy': 'direct', + "partner_id": self.partner.id, + "partner_invoice_id": self.partner.id, + "partner_shipping_id": self.partner.id, + "brand_id": brand_id.id, + "order_line": [ + ( + 0, + 0, + { + "name": product.name, + "product_id": product.id, + "product_uom_qty": 2, + "product_uom": product.uom_id.id, + "price_unit": product.list_price, + }, + ) + ], + "pricelist_id": self.env.ref("product.list0").id, + "picking_policy": "direct", } - self.so = self.env['sale.order'].create(vals) + self.so = self.env["sale.order"].create(vals) # confirm our standard so, check the picking brand id self.so.action_confirm() - self.assertTrue(self.so.picking_ids, 'Sale Stock: no picking created') - self.assertEqual( - self.so.picking_ids[0].brand_id.id, - self.so.brand_id.id - ) + self.assertTrue(self.so.picking_ids, "Sale Stock: no picking created") + self.assertEqual(self.so.picking_ids[0].brand_id.id, self.so.brand_id.id) diff --git a/stock_brand/views/sale_views.xml b/stock_brand/views/sale_views.xml index c0f7bd27d..0afbbbeb4 100644 --- a/stock_brand/views/sale_views.xml +++ b/stock_brand/views/sale_views.xml @@ -2,10 +2,10 @@ stock.picking.form.brand stock.picking - + - + From 998741dd017628efc448a1d4e57ec19e7658f3f5 Mon Sep 17 00:00:00 2001 From: bosd Date: Mon, 7 Apr 2025 20:16:43 +0200 Subject: [PATCH 03/16] stock_brand: Migration to version 18.0 stock_brand: Fix Brand use level Fix the inheritance, use brand use level should be working now. [IMP] stock_brand: Brand is not required for interal or manufacturing stock_brand: Add Missing po files [IMP] stock_brand: Improve readme, reference brand_external_report_layout --- stock_brand/README.rst | 19 ++++---- stock_brand/__manifest__.py | 9 ++-- stock_brand/i18n/nl.po | 46 +++++++++++++++++++ stock_brand/i18n/stock_brand.pot | 46 +++++++++++++++++++ stock_brand/models/sale_order.py | 7 ++- stock_brand/models/stock_picking.py | 11 ++++- stock_brand/readme/CONFIGURE.md | 2 - stock_brand/readme/DESCRIPTION.md | 4 +- stock_brand/readme/USAGE.md | 2 + stock_brand/static/description/index.html | 46 +++++++++---------- stock_brand/tests/test_sale_order.py | 8 +++- ...sale_views.xml => stock_picking_views.xml} | 2 +- 12 files changed, 150 insertions(+), 52 deletions(-) create mode 100644 stock_brand/i18n/nl.po create mode 100644 stock_brand/i18n/stock_brand.pot delete mode 100644 stock_brand/readme/CONFIGURE.md rename stock_brand/views/{sale_views.xml => stock_picking_views.xml} (84%) diff --git a/stock_brand/README.rst b/stock_brand/README.rst index 2d4165425..20b71ee7d 100644 --- a/stock_brand/README.rst +++ b/stock_brand/README.rst @@ -7,7 +7,7 @@ Stock Brand !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:71051ac6c93c02153f7f61f6ce2eaa52824eed2c487bfb611d1ce06abf7df9a3 + !! source digest: sha256:9788d71466838aa704e296f4cc11004f6f1f044f232c617cc61ce263b3976524 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png @@ -28,21 +28,16 @@ Stock Brand |badge1| |badge2| |badge3| |badge4| |badge5| -This module allows you to send or print branded delivery slips and -operation documents. It adds a brand field on the procurement group to -propagate the value on the stock picking documents. +This module streamlines the branding of shipping documents. It ensures +that the brand selected on a sale order is automatically applied to the +corresponding stock picking documents, providing consistent branding on +delivery slips and other related paperwork. **Table of contents** .. contents:: :local: -Configuration -============= - -To configure this module, please refer to the documentation of -`partner_brand `__. - Usage ===== @@ -55,6 +50,10 @@ To use this module, you need to: 5. Print the delivery slip PDF report. It includes the information of the brand. +To do point 5, the `Brand External Report +Layout `__ +OCA module must be installed. + Bug Tracker =========== diff --git a/stock_brand/__manifest__.py b/stock_brand/__manifest__.py index 8fc3f6c87..8fbbe2494 100644 --- a/stock_brand/__manifest__.py +++ b/stock_brand/__manifest__.py @@ -3,17 +3,18 @@ { "name": "Stock Brand", - "summary": "Manage branded delivery orders", - "version": "12.0.1.0.0", - "category": "Stock Management", + "summary": "Manage brands on stock picking documents", + "version": "18.0.1.0.0", + "category": "Warehouse", "website": "https://github.com/OCA/brand", "author": "Sunflower IT, Odoo Community Association (OCA)", "license": "AGPL-3", "depends": [ + "sale_brand", "sale_stock", ], "data": [ - "views/sale_views.xml", + "views/stock_picking_views.xml", ], "installable": True, "development_status": "Beta", diff --git a/stock_brand/i18n/nl.po b/stock_brand/i18n/nl.po new file mode 100644 index 000000000..7a3a4b732 --- /dev/null +++ b/stock_brand/i18n/nl.po @@ -0,0 +1,46 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * stock_brand +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 18.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-04-13 11:48+0000\n" +"PO-Revision-Date: 2025-04-13 11:48+0000\n" +"Last-Translator: \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: stock_brand +#: model:ir.model.fields,field_description:stock_brand.field_stock_picking__brand_id +msgid "Brand" +msgstr "Merk" + +#. module: stock_brand +#: model:ir.model.fields,field_description:stock_brand.field_stock_picking__brand_use_level +msgid "Brand Use Level" +msgstr "Merkgebruiksniveau" + +#. module: stock_brand +#: model:ir.model.fields,help:stock_brand.field_stock_picking__brand_id +msgid "Brand to use for this picking." +msgstr "Merk dat voor deze picking moet worden gebruikt." + +#. module: stock_brand +#: model:ir.model.fields,field_description:stock_brand.field_stock_picking__company_id +msgid "Company" +msgstr "Bedrijf" + +#. module: stock_brand +#: model:ir.model,name:stock_brand.model_sale_order +msgid "Sales Order" +msgstr "Verkooporder" + +#. module: stock_brand +#: model:ir.model,name:stock_brand.model_stock_picking +msgid "Transfer" +msgstr "Overdracht" diff --git a/stock_brand/i18n/stock_brand.pot b/stock_brand/i18n/stock_brand.pot new file mode 100644 index 000000000..d2d8cf14c --- /dev/null +++ b/stock_brand/i18n/stock_brand.pot @@ -0,0 +1,46 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * stock_brand +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 18.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2025-04-13 11:48+0000\n" +"PO-Revision-Date: 2025-04-13 11:48+0000\n" +"Last-Translator: \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: stock_brand +#: model:ir.model.fields,field_description:stock_brand.field_stock_picking__brand_id +msgid "Brand" +msgstr "" + +#. module: stock_brand +#: model:ir.model.fields,field_description:stock_brand.field_stock_picking__brand_use_level +msgid "Brand Use Level" +msgstr "" + +#. module: stock_brand +#: model:ir.model.fields,help:stock_brand.field_stock_picking__brand_id +msgid "Brand to use for this picking." +msgstr "" + +#. module: stock_brand +#: model:ir.model.fields,field_description:stock_brand.field_stock_picking__company_id +msgid "Company" +msgstr "" + +#. module: stock_brand +#: model:ir.model,name:stock_brand.model_sale_order +msgid "Sales Order" +msgstr "" + +#. module: stock_brand +#: model:ir.model,name:stock_brand.model_stock_picking +msgid "Transfer" +msgstr "" diff --git a/stock_brand/models/sale_order.py b/stock_brand/models/sale_order.py index e39df2597..7630a8b82 100644 --- a/stock_brand/models/sale_order.py +++ b/stock_brand/models/sale_order.py @@ -1,15 +1,14 @@ # Copyright (C) 2019 Sunflower IT # License GNU Affero General Public License . -from odoo import api, models +from odoo import models class SaleOrder(models.Model): _inherit = "sale.order" - @api.multi def action_confirm(self): - ret = super().action_confirm() + res = super().action_confirm() for order in self: order.picking_ids.write({"brand_id": order.brand_id.id}) - return ret + return res diff --git a/stock_brand/models/stock_picking.py b/stock_brand/models/stock_picking.py index 0b1eeff5c..f1bc09680 100644 --- a/stock_brand/models/stock_picking.py +++ b/stock_brand/models/stock_picking.py @@ -5,8 +5,15 @@ class StockPicking(models.Model): - _inherit = "stock.picking" + _name = "stock.picking" + _inherit = ["stock.picking", "res.brand.mixin"] brand_id = fields.Many2one( - "res.brand", string="Brand", help="Brand to use for this picking" + help="Brand to use for this picking.", ) + + def _is_brand_required(self): + self.ensure_one() + if self.picking_type_id.code in ("internal", "mrp_operation"): + return False + return super()._is_brand_required() diff --git a/stock_brand/readme/CONFIGURE.md b/stock_brand/readme/CONFIGURE.md deleted file mode 100644 index cefb67bd9..000000000 --- a/stock_brand/readme/CONFIGURE.md +++ /dev/null @@ -1,2 +0,0 @@ -To configure this module, please refer to the documentation of -[partner_brand](https://github.com/OCA/partner-contact/blob/12.0/partner_brand/README.rst). diff --git a/stock_brand/readme/DESCRIPTION.md b/stock_brand/readme/DESCRIPTION.md index 73746f594..a4eb5f510 100644 --- a/stock_brand/readme/DESCRIPTION.md +++ b/stock_brand/readme/DESCRIPTION.md @@ -1,3 +1 @@ -This module allows you to send or print branded delivery slips and -operation documents. It adds a brand field on the procurement group to -propagate the value on the stock picking documents. +This module streamlines the branding of shipping documents. It ensures that the brand selected on a sale order is automatically applied to the corresponding stock picking documents, providing consistent branding on delivery slips and other related paperwork. diff --git a/stock_brand/readme/USAGE.md b/stock_brand/readme/USAGE.md index 35951ea9d..be47d76d2 100644 --- a/stock_brand/readme/USAGE.md +++ b/stock_brand/readme/USAGE.md @@ -6,3 +6,5 @@ To use this module, you need to: 4. Confirm Sale order to create pickings 5. Print the delivery slip PDF report. It includes the information of the brand. + +To do point 5, the [Brand External Report Layout](https://github.com/OCA/brand/tree/18.0/brand_external_report_layout/README.rst) OCA module must be installed. diff --git a/stock_brand/static/description/index.html b/stock_brand/static/description/index.html index f84223047..264db800f 100644 --- a/stock_brand/static/description/index.html +++ b/stock_brand/static/description/index.html @@ -367,34 +367,29 @@

Stock Brand

!! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!! source digest: sha256:71051ac6c93c02153f7f61f6ce2eaa52824eed2c487bfb611d1ce06abf7df9a3 +!! source digest: sha256:9788d71466838aa704e296f4cc11004f6f1f044f232c617cc61ce263b3976524 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->

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

-

This module allows you to send or print branded delivery slips and -operation documents. It adds a brand field on the procurement group to -propagate the value on the stock picking documents.

+

This module streamlines the branding of shipping documents. It ensures +that the brand selected on a sale order is automatically applied to the +corresponding stock picking documents, providing consistent branding on +delivery slips and other related paperwork.

Table of contents

-
-

Configuration

-

To configure this module, please refer to the documentation of -partner_brand.

-
-

Usage

+

Usage

To use this module, you need to:

  1. Go to Sales > Sale Orders
  2. @@ -404,9 +399,12 @@

    Usage

  3. Print the delivery slip PDF report. It includes the information of the brand.
+

To do point 5, the Brand External Report +Layout +OCA module must be installed.

-

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 @@ -414,27 +412,27 @@

Bug Tracker

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

-

Credits

+

Credits

-

Authors

+

Authors

  • Sunflower IT
-

Maintainers

+

Maintainers

This module is maintained by the OCA.

Odoo Community Association diff --git a/stock_brand/tests/test_sale_order.py b/stock_brand/tests/test_sale_order.py index 770e7294a..4ab466e69 100644 --- a/stock_brand/tests/test_sale_order.py +++ b/stock_brand/tests/test_sale_order.py @@ -2,13 +2,18 @@ class TestSaleOrderStockPickingBrandID(common.TransactionCase): + @classmethod + def setUpClass(cls): + super().setUpClass() + cls.partner = cls.env["res.partner"].create({"name": "Test Partner"}) + def test_stock_picking_brand_id(self): """ Test stock.picking brand_id is same as sale.order's brand_id """ product = self.env.ref("product.product_order_01") brand_id = self.env["res.brand"].create({"name": "Brand1"}) - product.type = "product" + product.type = "consu" vals = { "partner_id": self.partner.id, "partner_invoice_id": self.partner.id, @@ -27,7 +32,6 @@ def test_stock_picking_brand_id(self): }, ) ], - "pricelist_id": self.env.ref("product.list0").id, "picking_policy": "direct", } self.so = self.env["sale.order"].create(vals) diff --git a/stock_brand/views/sale_views.xml b/stock_brand/views/stock_picking_views.xml similarity index 84% rename from stock_brand/views/sale_views.xml rename to stock_brand/views/stock_picking_views.xml index 0afbbbeb4..ac64485b2 100644 --- a/stock_brand/views/sale_views.xml +++ b/stock_brand/views/stock_picking_views.xml @@ -5,7 +5,7 @@ - + From b2c91852910a1c8ae9d0efb57c486a6b6c0d78f0 Mon Sep 17 00:00:00 2001 From: oca-ci Date: Tue, 20 May 2025 12:42:52 +0000 Subject: [PATCH 04/16] [UPD] Update stock_brand.pot --- stock_brand/i18n/stock_brand.pot | 2 -- 1 file changed, 2 deletions(-) diff --git a/stock_brand/i18n/stock_brand.pot b/stock_brand/i18n/stock_brand.pot index d2d8cf14c..26fd8e282 100644 --- a/stock_brand/i18n/stock_brand.pot +++ b/stock_brand/i18n/stock_brand.pot @@ -6,8 +6,6 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server 18.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-04-13 11:48+0000\n" -"PO-Revision-Date: 2025-04-13 11:48+0000\n" "Last-Translator: \n" "Language-Team: \n" "MIME-Version: 1.0\n" From 0df0fd7fe1a37d132685bf2bafeb19459e8f448b Mon Sep 17 00:00:00 2001 From: OCA-git-bot Date: Tue, 20 May 2025 12:45:43 +0000 Subject: [PATCH 05/16] [BOT] post-merge updates --- stock_brand/README.rst | 6 +++--- stock_brand/static/description/index.html | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/stock_brand/README.rst b/stock_brand/README.rst index 20b71ee7d..48a111005 100644 --- a/stock_brand/README.rst +++ b/stock_brand/README.rst @@ -7,7 +7,7 @@ Stock Brand !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:9788d71466838aa704e296f4cc11004f6f1f044f232c617cc61ce263b3976524 + !! source digest: sha256:75bd15db099354f8668d20db77de49e30457831a285cb53eb1a4cfe13ee05ec4 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png @@ -75,12 +75,12 @@ Authors Contributors ------------ -- Terrence Nzaywa +- Terrence Nzaywa Other credits ------------- -- Sunflower IT +- Sunflower IT Maintainers ----------- diff --git a/stock_brand/static/description/index.html b/stock_brand/static/description/index.html index 264db800f..b422150d4 100644 --- a/stock_brand/static/description/index.html +++ b/stock_brand/static/description/index.html @@ -367,7 +367,7 @@

Stock Brand

!! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!! source digest: sha256:9788d71466838aa704e296f4cc11004f6f1f044f232c617cc61ce263b3976524 +!! source digest: sha256:75bd15db099354f8668d20db77de49e30457831a285cb53eb1a4cfe13ee05ec4 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->

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

This module streamlines the branding of shipping documents. It ensures From 9a395dc9efc59d786c2ad39827388dd13a35bed4 Mon Sep 17 00:00:00 2001 From: mymage Date: Thu, 22 May 2025 06:47:28 +0000 Subject: [PATCH 06/16] Added translation using Weblate (Italian) --- stock_brand/i18n/it.po | 45 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 stock_brand/i18n/it.po diff --git a/stock_brand/i18n/it.po b/stock_brand/i18n/it.po new file mode 100644 index 000000000..048c9bf86 --- /dev/null +++ b/stock_brand/i18n/it.po @@ -0,0 +1,45 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * stock_brand +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 18.0\n" +"Report-Msgid-Bugs-To: \n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: it\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" + +#. module: stock_brand +#: model:ir.model.fields,field_description:stock_brand.field_stock_picking__brand_id +msgid "Brand" +msgstr "" + +#. module: stock_brand +#: model:ir.model.fields,field_description:stock_brand.field_stock_picking__brand_use_level +msgid "Brand Use Level" +msgstr "" + +#. module: stock_brand +#: model:ir.model.fields,help:stock_brand.field_stock_picking__brand_id +msgid "Brand to use for this picking." +msgstr "" + +#. module: stock_brand +#: model:ir.model.fields,field_description:stock_brand.field_stock_picking__company_id +msgid "Company" +msgstr "" + +#. module: stock_brand +#: model:ir.model,name:stock_brand.model_sale_order +msgid "Sales Order" +msgstr "" + +#. module: stock_brand +#: model:ir.model,name:stock_brand.model_stock_picking +msgid "Transfer" +msgstr "" From 032bfe08c6531229bb9446e1abd17afb292fa6d4 Mon Sep 17 00:00:00 2001 From: mymage Date: Thu, 22 May 2025 06:48:29 +0000 Subject: [PATCH 07/16] Translated using Weblate (Italian) Currently translated at 100.0% (6 of 6 strings) Translation: brand-18.0/brand-18.0-stock_brand Translate-URL: https://translation.odoo-community.org/projects/brand-18-0/brand-18-0-stock_brand/it/ --- stock_brand/i18n/it.po | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/stock_brand/i18n/it.po b/stock_brand/i18n/it.po index 048c9bf86..3a10aad9a 100644 --- a/stock_brand/i18n/it.po +++ b/stock_brand/i18n/it.po @@ -6,40 +6,42 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server 18.0\n" "Report-Msgid-Bugs-To: \n" -"Last-Translator: Automatically generated\n" +"PO-Revision-Date: 2025-05-22 09:26+0000\n" +"Last-Translator: mymage \n" "Language-Team: none\n" "Language: it\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" "Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 5.10.4\n" #. module: stock_brand #: model:ir.model.fields,field_description:stock_brand.field_stock_picking__brand_id msgid "Brand" -msgstr "" +msgstr "Marca" #. module: stock_brand #: model:ir.model.fields,field_description:stock_brand.field_stock_picking__brand_use_level msgid "Brand Use Level" -msgstr "" +msgstr "Livello uso marca" #. module: stock_brand #: model:ir.model.fields,help:stock_brand.field_stock_picking__brand_id msgid "Brand to use for this picking." -msgstr "" +msgstr "Marca da usare per questo prelievo." #. module: stock_brand #: model:ir.model.fields,field_description:stock_brand.field_stock_picking__company_id msgid "Company" -msgstr "" +msgstr "Azienda" #. module: stock_brand #: model:ir.model,name:stock_brand.model_sale_order msgid "Sales Order" -msgstr "" +msgstr "Ordine di vendita" #. module: stock_brand #: model:ir.model,name:stock_brand.model_stock_picking msgid "Transfer" -msgstr "" +msgstr "Trasferimento" From b42d409eb99b5d7c5ed405ec5dbac7abcc682fb9 Mon Sep 17 00:00:00 2001 From: oca-ci Date: Tue, 29 Jul 2025 10:09:54 +0000 Subject: [PATCH 08/16] [UPD] Update stock_brand.pot --- stock_brand/i18n/stock_brand.pot | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/stock_brand/i18n/stock_brand.pot b/stock_brand/i18n/stock_brand.pot index 26fd8e282..715e63254 100644 --- a/stock_brand/i18n/stock_brand.pot +++ b/stock_brand/i18n/stock_brand.pot @@ -13,6 +13,11 @@ msgstr "" "Content-Transfer-Encoding: \n" "Plural-Forms: \n" +#. module: stock_brand +#: model:ir.model.fields,field_description:stock_brand.field_stock_picking__allowed_payment_mode_ids +msgid "Allowed Payment Mode" +msgstr "" + #. module: stock_brand #: model:ir.model.fields,field_description:stock_brand.field_stock_picking__brand_id msgid "Brand" From cb894a1ec981e0345e816b4bbf02548a8193bbf7 Mon Sep 17 00:00:00 2001 From: Weblate Date: Tue, 29 Jul 2025 10:12:40 +0000 Subject: [PATCH 09/16] Update translation files Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: brand-18.0/brand-18.0-stock_brand Translate-URL: https://translation.odoo-community.org/projects/brand-18-0/brand-18-0-stock_brand/ --- stock_brand/i18n/it.po | 5 +++++ stock_brand/i18n/nl.po | 6 ++++++ 2 files changed, 11 insertions(+) diff --git a/stock_brand/i18n/it.po b/stock_brand/i18n/it.po index 3a10aad9a..f843f54ea 100644 --- a/stock_brand/i18n/it.po +++ b/stock_brand/i18n/it.po @@ -16,6 +16,11 @@ msgstr "" "Plural-Forms: nplurals=2; plural=n != 1;\n" "X-Generator: Weblate 5.10.4\n" +#. module: stock_brand +#: model:ir.model.fields,field_description:stock_brand.field_stock_picking__allowed_payment_mode_ids +msgid "Allowed Payment Mode" +msgstr "" + #. module: stock_brand #: model:ir.model.fields,field_description:stock_brand.field_stock_picking__brand_id msgid "Brand" diff --git a/stock_brand/i18n/nl.po b/stock_brand/i18n/nl.po index 7a3a4b732..41e87ae6f 100644 --- a/stock_brand/i18n/nl.po +++ b/stock_brand/i18n/nl.po @@ -10,11 +10,17 @@ msgstr "" "PO-Revision-Date: 2025-04-13 11:48+0000\n" "Last-Translator: \n" "Language-Team: \n" +"Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" "Plural-Forms: \n" +#. module: stock_brand +#: model:ir.model.fields,field_description:stock_brand.field_stock_picking__allowed_payment_mode_ids +msgid "Allowed Payment Mode" +msgstr "" + #. module: stock_brand #: model:ir.model.fields,field_description:stock_brand.field_stock_picking__brand_id msgid "Brand" From e9c91c1b840f6fabe2cf64c4627122a38fb34d62 Mon Sep 17 00:00:00 2001 From: mymage Date: Wed, 30 Jul 2025 09:13:31 +0000 Subject: [PATCH 10/16] Translated using Weblate (Italian) Currently translated at 100.0% (7 of 7 strings) Translation: brand-18.0/brand-18.0-stock_brand Translate-URL: https://translation.odoo-community.org/projects/brand-18-0/brand-18-0-stock_brand/it/ --- stock_brand/i18n/it.po | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stock_brand/i18n/it.po b/stock_brand/i18n/it.po index f843f54ea..b5e1872ee 100644 --- a/stock_brand/i18n/it.po +++ b/stock_brand/i18n/it.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server 18.0\n" "Report-Msgid-Bugs-To: \n" -"PO-Revision-Date: 2025-05-22 09:26+0000\n" +"PO-Revision-Date: 2025-07-30 09:46+0000\n" "Last-Translator: mymage \n" "Language-Team: none\n" "Language: it\n" @@ -19,7 +19,7 @@ msgstr "" #. module: stock_brand #: model:ir.model.fields,field_description:stock_brand.field_stock_picking__allowed_payment_mode_ids msgid "Allowed Payment Mode" -msgstr "" +msgstr "Metodo pagamento consentiti" #. module: stock_brand #: model:ir.model.fields,field_description:stock_brand.field_stock_picking__brand_id From 8ad371a2d2ce2dc19348994dfbea1d7c42e404b1 Mon Sep 17 00:00:00 2001 From: mymage Date: Wed, 30 Jul 2025 12:11:05 +0000 Subject: [PATCH 11/16] Translated using Weblate (Italian) Currently translated at 100.0% (7 of 7 strings) Translation: brand-18.0/brand-18.0-stock_brand Translate-URL: https://translation.odoo-community.org/projects/brand-18-0/brand-18-0-stock_brand/it/ --- stock_brand/i18n/it.po | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stock_brand/i18n/it.po b/stock_brand/i18n/it.po index b5e1872ee..cf14fac8a 100644 --- a/stock_brand/i18n/it.po +++ b/stock_brand/i18n/it.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server 18.0\n" "Report-Msgid-Bugs-To: \n" -"PO-Revision-Date: 2025-07-30 09:46+0000\n" +"PO-Revision-Date: 2025-07-30 14:25+0000\n" "Last-Translator: mymage \n" "Language-Team: none\n" "Language: it\n" @@ -19,7 +19,7 @@ msgstr "" #. module: stock_brand #: model:ir.model.fields,field_description:stock_brand.field_stock_picking__allowed_payment_mode_ids msgid "Allowed Payment Mode" -msgstr "Metodo pagamento consentiti" +msgstr "Metodo di pagamento consentito" #. module: stock_brand #: model:ir.model.fields,field_description:stock_brand.field_stock_picking__brand_id From 82a2b3a3e085ee01dc41b27276cb891ccade8fe2 Mon Sep 17 00:00:00 2001 From: oca-ci Date: Mon, 15 Sep 2025 08:58:11 +0000 Subject: [PATCH 12/16] [UPD] Update stock_brand.pot --- stock_brand/i18n/stock_brand.pot | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/stock_brand/i18n/stock_brand.pot b/stock_brand/i18n/stock_brand.pot index 715e63254..9defacd23 100644 --- a/stock_brand/i18n/stock_brand.pot +++ b/stock_brand/i18n/stock_brand.pot @@ -38,6 +38,11 @@ msgstr "" msgid "Company" msgstr "" +#. module: stock_brand +#: model:ir.model.fields,field_description:stock_brand.field_stock_picking__is_brand_required +msgid "Is Brand Required" +msgstr "" + #. module: stock_brand #: model:ir.model,name:stock_brand.model_sale_order msgid "Sales Order" From e43be93d528071bbd6b2af95cda56bb0f340f284 Mon Sep 17 00:00:00 2001 From: Weblate Date: Mon, 15 Sep 2025 09:01:49 +0000 Subject: [PATCH 13/16] Update translation files Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: brand-18.0/brand-18.0-stock_brand Translate-URL: https://translation.odoo-community.org/projects/brand-18-0/brand-18-0-stock_brand/ --- stock_brand/i18n/it.po | 5 +++++ stock_brand/i18n/nl.po | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/stock_brand/i18n/it.po b/stock_brand/i18n/it.po index cf14fac8a..78e9c8916 100644 --- a/stock_brand/i18n/it.po +++ b/stock_brand/i18n/it.po @@ -41,6 +41,11 @@ msgstr "Marca da usare per questo prelievo." msgid "Company" msgstr "Azienda" +#. module: stock_brand +#: model:ir.model.fields,field_description:stock_brand.field_stock_picking__is_brand_required +msgid "Is Brand Required" +msgstr "" + #. module: stock_brand #: model:ir.model,name:stock_brand.model_sale_order msgid "Sales Order" diff --git a/stock_brand/i18n/nl.po b/stock_brand/i18n/nl.po index 41e87ae6f..8786f2b7b 100644 --- a/stock_brand/i18n/nl.po +++ b/stock_brand/i18n/nl.po @@ -41,6 +41,11 @@ msgstr "Merk dat voor deze picking moet worden gebruikt." msgid "Company" msgstr "Bedrijf" +#. module: stock_brand +#: model:ir.model.fields,field_description:stock_brand.field_stock_picking__is_brand_required +msgid "Is Brand Required" +msgstr "" + #. module: stock_brand #: model:ir.model,name:stock_brand.model_sale_order msgid "Sales Order" From 3c88c112c0434e211feafdfeca2eadc829ee5eca Mon Sep 17 00:00:00 2001 From: mymage Date: Tue, 16 Sep 2025 08:44:08 +0000 Subject: [PATCH 14/16] Translated using Weblate (Italian) Currently translated at 100.0% (8 of 8 strings) Translation: brand-18.0/brand-18.0-stock_brand Translate-URL: https://translation.odoo-community.org/projects/brand-18-0/brand-18-0-stock_brand/it/ --- stock_brand/i18n/it.po | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stock_brand/i18n/it.po b/stock_brand/i18n/it.po index 78e9c8916..c6b974bd7 100644 --- a/stock_brand/i18n/it.po +++ b/stock_brand/i18n/it.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server 18.0\n" "Report-Msgid-Bugs-To: \n" -"PO-Revision-Date: 2025-07-30 14:25+0000\n" +"PO-Revision-Date: 2025-09-16 11:42+0000\n" "Last-Translator: mymage \n" "Language-Team: none\n" "Language: it\n" @@ -44,7 +44,7 @@ msgstr "Azienda" #. module: stock_brand #: model:ir.model.fields,field_description:stock_brand.field_stock_picking__is_brand_required msgid "Is Brand Required" -msgstr "" +msgstr "La marca รจ richiesta" #. module: stock_brand #: model:ir.model,name:stock_brand.model_sale_order From d92381f13f509b488b3eec0bd031ef6d5f0b28b8 Mon Sep 17 00:00:00 2001 From: Bhavesh Heliconia Date: Tue, 19 May 2026 17:11:40 +0530 Subject: [PATCH 15/16] [MIG] stock_brand: Migration to 19.0 --- stock_brand/README.rst | 19 ++++++++---- stock_brand/__manifest__.py | 2 +- stock_brand/readme/CONTRIBUTORS.md | 2 ++ stock_brand/static/description/index.html | 36 +++++++++++++++-------- stock_brand/tests/test_sale_order.py | 20 +++++-------- 5 files changed, 47 insertions(+), 32 deletions(-) diff --git a/stock_brand/README.rst b/stock_brand/README.rst index 48a111005..bbe1473b1 100644 --- a/stock_brand/README.rst +++ b/stock_brand/README.rst @@ -1,3 +1,7 @@ +.. image:: https://odoo-community.org/readme-banner-image + :target: https://odoo-community.org/get-involved?utm_source=readme + :alt: Odoo Community Association + =========== Stock Brand =========== @@ -13,17 +17,17 @@ Stock Brand .. |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/licence-AGPL--3-blue.png +.. |badge2| image:: https://img.shields.io/badge/license-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%2Fbrand-lightgray.png?logo=github - :target: https://github.com/OCA/brand/tree/18.0/stock_brand + :target: https://github.com/OCA/brand/tree/19.0/stock_brand :alt: OCA/brand .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/brand-18-0/brand-18-0-stock_brand + :target: https://translation.odoo-community.org/projects/brand-19-0/brand-19-0-stock_brand :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/brand&target_branch=18.0 + :target: https://runboat.odoo-community.org/builds?repo=OCA/brand&target_branch=19.0 :alt: Try me on Runboat |badge1| |badge2| |badge3| |badge4| |badge5| @@ -60,7 +64,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. @@ -76,6 +80,9 @@ Contributors ------------ - Terrence Nzaywa +- `Heliconia Solutions Pvt. Ltd. `__ + + - Bhavesh Heliconia Other credits ------------- @@ -95,6 +102,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/brand `_ project on GitHub. +This module is part of the `OCA/brand `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/stock_brand/__manifest__.py b/stock_brand/__manifest__.py index 8fbbe2494..cdf65b23f 100644 --- a/stock_brand/__manifest__.py +++ b/stock_brand/__manifest__.py @@ -4,7 +4,7 @@ { "name": "Stock Brand", "summary": "Manage brands on stock picking documents", - "version": "18.0.1.0.0", + "version": "19.0.1.0.0", "category": "Warehouse", "website": "https://github.com/OCA/brand", "author": "Sunflower IT, Odoo Community Association (OCA)", diff --git a/stock_brand/readme/CONTRIBUTORS.md b/stock_brand/readme/CONTRIBUTORS.md index 674ca1a30..ea520fc7b 100644 --- a/stock_brand/readme/CONTRIBUTORS.md +++ b/stock_brand/readme/CONTRIBUTORS.md @@ -1,2 +1,4 @@ - Terrence Nzaywa \<, \> +- [Heliconia Solutions Pvt. Ltd.](https://www.heliconia.io) + - Bhavesh Heliconia diff --git a/stock_brand/static/description/index.html b/stock_brand/static/description/index.html index b422150d4..aacd55b53 100644 --- a/stock_brand/static/description/index.html +++ b/stock_brand/static/description/index.html @@ -3,7 +3,7 @@ -Stock Brand +README.rst -

-

Stock Brand

+
+ + +Odoo Community Association + +
+

Stock Brand

-

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

+

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

This module streamlines the branding of shipping documents. It ensures that the brand selected on a sale order is automatically applied to the corresponding stock picking documents, providing consistent branding on @@ -389,7 +394,7 @@

Stock Brand

-

Usage

+

Usage

To use this module, you need to:

  1. Go to Sales > Sale Orders
  2. @@ -404,35 +409,39 @@

    Usage

    OCA module must be installed.

-

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 -feedback.

+feedback.

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

-

Credits

+

Credits

-

Authors

+

Authors

  • Sunflower IT
-

Maintainers

+

Maintainers

This module is maintained by the OCA.

Odoo Community Association @@ -440,10 +449,11 @@

Maintainers

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

+

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

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

+
diff --git a/stock_brand/tests/test_sale_order.py b/stock_brand/tests/test_sale_order.py index 4ab466e69..7fb31356e 100644 --- a/stock_brand/tests/test_sale_order.py +++ b/stock_brand/tests/test_sale_order.py @@ -1,33 +1,29 @@ -from odoo.tests import common +from odoo import Command +from odoo.addons.base.tests.common import BaseCommon -class TestSaleOrderStockPickingBrandID(common.TransactionCase): - @classmethod - def setUpClass(cls): - super().setUpClass() - cls.partner = cls.env["res.partner"].create({"name": "Test Partner"}) +class TestSaleOrderStockPickingBrandID(BaseCommon): def test_stock_picking_brand_id(self): """ Test stock.picking brand_id is same as sale.order's brand_id """ - product = self.env.ref("product.product_order_01") + product = self.env["product.product"].create( + {"name": "Test Product", "type": "consu"} + ) brand_id = self.env["res.brand"].create({"name": "Brand1"}) - product.type = "consu" vals = { "partner_id": self.partner.id, "partner_invoice_id": self.partner.id, "partner_shipping_id": self.partner.id, "brand_id": brand_id.id, "order_line": [ - ( - 0, - 0, + Command.create( { "name": product.name, "product_id": product.id, "product_uom_qty": 2, - "product_uom": product.uom_id.id, + "product_uom_id": product.uom_id.id, "price_unit": product.list_price, }, ) From 864770aca3e5cd66de6aea371fc7f6271c9b6367 Mon Sep 17 00:00:00 2001 From: Bhavesh Heliconia Date: Tue, 19 May 2026 17:17:09 +0530 Subject: [PATCH 16/16] [DON'T MERGE] test-requirements.txt --- test-requirements.txt | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 test-requirements.txt diff --git a/test-requirements.txt b/test-requirements.txt new file mode 100644 index 000000000..dd6bb08d8 --- /dev/null +++ b/test-requirements.txt @@ -0,0 +1,2 @@ +odoo-addon-account_brand @ git+https://github.com/OCA/brand.git@refs/pull/303/head#subdirectory=account_brand +odoo-addon-sale_brand @ git+https://github.com/OCA/brand.git@refs/pull/305/head#subdirectory=sale_brand