File tree Expand file tree Collapse file tree 5 files changed +109
-248
lines changed
Expand file tree Collapse file tree 5 files changed +109
-248
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ Purchase Product Pack
1111 !! This file is generated by oca-gen-addon-readme !!
1212 !! changes will be overwritten. !!
1313 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
14- !! source digest: sha256:c2dac7004783b8033eccca5252ad883ba2106fc36f774bb5680b539f372092be
14+ !! source digest: sha256:174830ce41fbd8cb9d00dc617945dbe3dbdf80407c03659afcd2516798284699
1515 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1616
1717.. |badge1 | image :: https://img.shields.io/badge/maturity-Beta-yellow.png
Original file line number Diff line number Diff line change 22# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl)
33{
44 "name" : "Purchase Product Pack" ,
5- "version" : "18.0.1.0.0 " ,
5+ "version" : "18.0.1.0.1 " ,
66 "category" : "Purchase" ,
77 "summary" : "This module allows you to buy product packs" ,
88 "website" : "https://github.com/OCA/product-pack" ,
Original file line number Diff line number Diff line change @@ -372,7 +372,7 @@ <h1>Purchase Product Pack</h1>
372372!! This file is generated by oca-gen-addon-readme !!
373373!! changes will be overwritten. !!
374374!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
375- !! source digest: sha256:c2dac7004783b8033eccca5252ad883ba2106fc36f774bb5680b539f372092be
375+ !! source digest: sha256:174830ce41fbd8cb9d00dc617945dbe3dbdf80407c03659afcd2516798284699
376376!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
377377< p > < a class ="reference external image-reference " href ="https://odoo-community.org/page/development-status "> < img alt ="Beta " src ="https://img.shields.io/badge/maturity-Beta-yellow.png " /> </ a > < a class ="reference external image-reference " href ="http://www.gnu.org/licenses/agpl-3.0-standalone.html "> < img alt ="License: AGPL-3 " src ="https://img.shields.io/badge/license-AGPL--3-blue.png " /> </ a > < a class ="reference external image-reference " href ="https://github.com/OCA/product-pack/tree/18.0/purchase_product_pack "> < img alt ="OCA/product-pack " src ="https://img.shields.io/badge/github-OCA%2Fproduct--pack-lightgray.png?logo=github " /> </ a > < a class ="reference external image-reference " href ="https://translation.odoo-community.org/projects/product-pack-18-0/product-pack-18-0-purchase_product_pack "> < img alt ="Translate me on Weblate " src ="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png " /> </ a > < a class ="reference external image-reference " href ="https://runboat.odoo-community.org/builds?repo=OCA/product-pack&target_branch=18.0 "> < img alt ="Try me on Runboat " src ="https://img.shields.io/badge/runboat-Try%20me-875A7B.png " /> </ a > </ p >
378378< p > This module adds < em > Product Pack</ em > functionality to purchase orders. You
Original file line number Diff line number Diff line change 1+ # Copyright 2025 Tecnativa - Pedro M. Baeza
2+ # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
3+
4+ from odoo .addons .product_pack .tests .common import ProductPackCommon
5+
6+
7+ class TestPurchaseProductPackBase (ProductPackCommon ):
8+ @classmethod
9+ def setUpClass (cls ):
10+ super ().setUpClass ()
11+ cls .partner = cls .env ["res.partner" ].create ({"name" : "Test purchase pack" })
12+ cls .pack .standard_price = 5
13+ cls .component1 .standard_price = 12
14+ cls .component2 .standard_price = 18
15+ cls .purchase_order = cls .env ["purchase.order" ].create (
16+ {"partner_id" : cls .partner .id }
17+ )
18+
19+ def _add_po_line (self , product = None , sequence = 10 ):
20+ product = product or self .pack
21+ return self .env ["purchase.order.line" ].create (
22+ {
23+ "order_id" : self .purchase_order .id ,
24+ "name" : product .name ,
25+ "product_id" : product .id ,
26+ "product_qty" : 1 ,
27+ "sequence" : sequence ,
28+ }
29+ )
You can’t perform that action at this time.
0 commit comments