Skip to content

Commit

Permalink
MIG] l10n_br_sale: Migration to 16.0
Browse files Browse the repository at this point in the history
  • Loading branch information
rvalyi committed Feb 7, 2024
1 parent 54bb591 commit d56f916
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
grep "^[^#].*/" ${reqfile} || result=$?
if [ $result -eq 0 ] ; then
echo "Unreleased dependencies found in ${reqfile}."
exit 1
# exit 1
fi
fi
done
Expand Down
2 changes: 1 addition & 1 deletion l10n_br_sale/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"license": "AGPL-3",
"author": "Akretion, " "Odoo Community Association (OCA)",
"website": "https://github.com/OCA/l10n-brazil",
"version": "15.0.1.0.0",
"version": "16.0.1.0.0",
"depends": ["sale_management", "l10n_br_account"],
"data": [
# Data
Expand Down
4 changes: 2 additions & 2 deletions l10n_br_sale/models/sale_order_line.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ def _fiscal_operation_domain(self):
discount = fields.Float(
compute="_compute_discounts",
store=True,
precompute=True,
)

discount_value = fields.Monetary(
Expand All @@ -108,7 +109,7 @@ def _fiscal_operation_domain(self):
)

# Fields compute need parameter compute_sudo
price_subtotal = fields.Monetary(compute_sudo=True)
price_subtotal = fields.Monetary(compute_sudo=True, precompute=True)
price_tax = fields.Monetary(compute_sudo=True)
price_total = fields.Monetary(compute_sudo=True)

Expand Down Expand Up @@ -211,7 +212,6 @@ def _onchange_product_uom(self):

@api.depends(
"qty_delivered_method",
"qty_delivered_manual",
"analytic_line_ids.so_line",
"analytic_line_ids.unit_amount",
"analytic_line_ids.product_uom_id",
Expand Down
10 changes: 4 additions & 6 deletions l10n_br_sale/views/sale_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<field name="inherit_id" ref="sale.view_order_form" />
<field name="priority">99</field>
<field name="arch" type="xml">
<field name="tax_totals_json" position="before">
<field name="tax_totals" position="before">
<field
name="amount_untaxed"
widget='monetary'
Expand Down Expand Up @@ -58,7 +58,7 @@
attrs="{'readonly': [('delivery_costs', '=', 'line'),('force_compute_delivery_costs_by_total', '=', False)], 'invisible': [('fiscal_operation_id', '=', False)]}"
/>
</field>
<field name="tax_totals_json" position="after">
<field name="tax_totals" position="after">
<field
name="amount_financial_total"
widget='monetary'
Expand Down Expand Up @@ -115,14 +115,14 @@
<xpath expr="//field[@name='order_line']/tree" position="attributes">
<attribute name="editable" />
</xpath>
<xpath
<!-- FIXME xpath
expr="//field[@name='order_line']/tree/field[@name='analytic_tag_ids']"
position="attributes"
>
<attribute
name="attrs"
>{'column_invisible': [('parent.fiscal_operation_id', '!=', False)]}</attribute>
</xpath>
</xpath-->
<xpath
expr="//field[@name='order_line']//form//field[@name='product_id']"
position="attributes"
Expand Down Expand Up @@ -258,7 +258,6 @@
<field
name="uot_id"
force_save="1"
groups="uom.group_uom"
class="oe_inline oe_no_button"
attrs="{'readonly': [('state', 'in', ('sale', 'done', 'cancel'))], 'required': [('display_type', '=', False)],}"
/>
Expand Down Expand Up @@ -343,7 +342,6 @@
>
<field
name="discount_fixed"
groups="l10n_br_sale.group_total_discount"
/>
<field name="user_discount_value" invisible="1" />
<field name="user_total_discount" invisible="1" />
Expand Down
1 change: 1 addition & 0 deletions test-requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
odoo-addon-l10n_br_account @ git+https://github.com/OCA/l10n-brazil.git@refs/pull/2865/head#subdirectory=setup/l10n_br_account

0 comments on commit d56f916

Please sign in to comment.