Skip to content

Commit

Permalink
[MIG] product_pack: Migration to 18.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ALopez-Adhoc committed Dec 30, 2024
1 parent 6f321f0 commit 9f8a482
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 17 deletions.
2 changes: 1 addition & 1 deletion product_pack/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Product Pack",
"version": "17.0.2.0.0",
"version": "18.0.1.0.0",
"category": "Product",
"summary": "This module allows you to set a product as a Pack",
"website": "https://github.com/OCA/product-pack",
Expand Down
1 change: 0 additions & 1 deletion product_pack/models/product_pack_line.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ def _pack_line_price_compute(
# If the component is a pack
for pack in packs:
pack_prices[pack.id] = pack.lst_price

Check warning on line 77 in product_pack/models/product_pack_line.py

View check run for this annotation

Codecov / codecov/patch

product_pack/models/product_pack_line.py#L77

Added line #L77 was not covered by tests

# else
no_pack_prices = no_packs._price_compute(
price_type, uom, currency, company, date
Expand Down
8 changes: 4 additions & 4 deletions product_pack/views/product_pack_line_views.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@
</form>
</field>
</record>
<record id="product_pack_line_tree" model="ir.ui.view">
<field name="name">product.pack.line.tree</field>
<record id="product_pack_line_list" model="ir.ui.view">
<field name="name">product.pack.line.list</field>
<field name="model">product.pack.line</field>
<field name="arch" type="xml">
<tree editable="bottom">
<list editable="bottom">
<field name="product_id" />
<field name="quantity" />
</tree>
</list>
</field>
</record>
</odoo>
17 changes: 6 additions & 11 deletions product_pack/views/product_template_views.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,18 +46,13 @@
name="invisible"
>product_variant_count &gt; 1 or not pack_ok</attribute>
</page>
<group name="group_pack">
<group string="Pack Products" colspan="4">
<field name="id" invisible="1" />
<p invisible="id">You must save first to add pack lines</p>
</group>
<field
name="pack_line_ids"
nolabel="1"
colspan="4"
readonly="not id"
/>
<group name="group_pack">
<group string="Pack Products" colspan="4">
<field name="id" invisible="1" />
<p invisible="id">You must save first to add pack lines</p>
</group>
<field name="pack_line_ids" nolabel="1" colspan="4" readonly="not id" />
</group>
</field>
</record>
</odoo>

0 comments on commit 9f8a482

Please sign in to comment.