Skip to content

Commit

Permalink
[MIG] purchase_receipt_expectation_manual: Migration to 18.0
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinkhao committed Jan 24, 2025
1 parent 71ab96f commit 727131a
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 14 deletions.
1 change: 1 addition & 0 deletions purchase_receipt_expectation_manual/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ Contributors

- Silvio Gregorini <[email protected]>
- Dhara Solanki <[email protected]>
- Kevin Khao <[email protected]>

Maintainers
-----------
Expand Down
2 changes: 1 addition & 1 deletion purchase_receipt_expectation_manual/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

{
"name": "Purchase Receipt Expectation - Manual",
"version": "16.0.1.0.0",
"version": "18.0.1.0.0",
"category": "Purchase Management",
"author": "Camptocamp SA, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/purchase-workflow",
Expand Down
1 change: 1 addition & 0 deletions purchase_receipt_expectation_manual/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
- Silvio Gregorini \<<[email protected]>\>
- Dhara Solanki \<<[email protected]>\>
- Kevin Khao \<<[email protected]>\>
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,7 @@ <h2><a class="toc-backref" href="#toc-entry-5">Contributors</a></h2>
<ul class="simple">
<li>Silvio Gregorini &lt;<a class="reference external" href="mailto:silvio.gregorini&#64;camptocamp.com">silvio.gregorini&#64;camptocamp.com</a>&gt;</li>
<li>Dhara Solanki &lt;<a class="reference external" href="mailto:dhara.solanki&#64;initos.com">dhara.solanki&#64;initos.com</a>&gt;</li>
<li>Kevin Khao &lt;<a class="reference external" href="mailto:kevinkhao&#64;gmail.com">kevinkhao&#64;gmail.com</a>&gt;</li>
</ul>
</div>
<div class="section" id="maintainers">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@

from datetime import datetime, timedelta

from odoo.tests.common import Form
from odoo.tests import Form

from odoo.addons.purchase_receipt_expectation.tests.test_purchase_receipt_expectation import (
from odoo.addons.purchase_receipt_expectation.tests\
.test_purchase_receipt_expectation import (
TestPurchaseReceiptExpectation,
)

Expand Down
8 changes: 4 additions & 4 deletions purchase_receipt_expectation_manual/views/purchase_order.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
string="Manual Receipt"
class="oe_highlight"
type="object"
attrs="{'invisible': ['|', ('receipt_expectation', '!=', 'manual'), ('state', 'not in', ('purchase', 'done'))]}"
invisible="receipt_expectation != 'manual' or state not in ('purchase', 'done')"
groups="stock.group_stock_user"
/>
</xpath>
Expand All @@ -27,13 +27,13 @@
<field name="inherit_id" ref="purchase.purchase_order_form" />
<field name="arch" type="xml">
<xpath
expr="//field[@name='order_line']/tree//field[@name='qty_received']"
expr="//field[@name='order_line']/list//field[@name='qty_received']"
position="after"
>
<field
name="manually_received_qty_uom"
string="In Manual Receipts"
attrs="{'column_invisible': ['|', ('parent.state', 'not in', ('purchase', 'done')), ('parent.receipt_expectation', '!=', 'manual')]}"
column_invisible="parent.state not in ('purchase', 'done') or parent.receipt_expectation != 'manual'"
optional="show"
/>
</xpath>
Expand All @@ -44,7 +44,7 @@
<field
name="manually_received_qty_uom"
string="Manually Received"
attrs="{'invisible': ['|', ('parent.state', 'not in', ('purchase', 'done')), ('parent.receipt_expectation', '!=', 'manual')]}"
invisible="parent.state not in ('purchase', 'done') or parent.receipt_expectation != 'manual'"
/>
</xpath>
</field>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,16 @@
role="alert"
class="alert alert-warning"
name="checks_result"
attrs="{'invisible': [('checks_result', '=', 'success')]}"
invisible="checks_result == 'success'"
>
<field name="checks_result" invisible="1" />
<field name="checks_result_msg" nolabel="1" readonly="1" />
</div>
<field name="line_ids" nolabel="1">
<tree editable="bottom">
<field name="wizard_id" invisible="1" />
<field name="purchase_order_id" invisible="1" />
<field name="uom_category_id" invisible="1" />
<list editable="bottom">
<field name="wizard_id" column_invisible="1" />
<field name="purchase_order_id" column_invisible="1" />
<field name="uom_category_id" column_invisible="1" />
<field
name="purchase_line_id"
string="Line to receive"
Expand All @@ -38,9 +38,9 @@
name="uom_id"
domain="[('category_id', '=', uom_category_id)]"
/>
<field name="currency_id" invisible="1" />
<field name="currency_id" column_invisible="1" />
<field name="unit_price" />
</tree>
</list>
</field>
</sheet>
<footer>
Expand Down

0 comments on commit 727131a

Please sign in to comment.