Skip to content

Conversation

dhrs-odoo
Copy link
Contributor

In this PR we have made customizations to display deposit & excise totals by line.

Task-5127418

@robodoo
Copy link
Collaborator

robodoo commented Oct 10, 2025

Pull request status dashboard

@dhrs-odoo dhrs-odoo force-pushed the 19.0-excise_management-update-dhrs branch 4 times, most recently from 9fdbd52 to 4be4c3b Compare October 16, 2025 12:13
@dhrs-odoo dhrs-odoo force-pushed the 19.0-excise_management-update-dhrs branch from 4be4c3b to fc89276 Compare October 16, 2025 13:08
<field name="field_description">Excise Free Unit Price</field>
<field name="model_id" ref="sale.model_sale_order_line"/>
<field name="ttype">monetary</field>
<field name="depends">price_unit, tax_ids</field>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why tax_ids and not product_id?

</record>
<record id="account_tax_deposit_field" model="ir.model.fields">
<field name="name">x_is_deposit</field>
<field name="field_description">Is Deposit</field>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is already a similar field on account.tax.group. But it is hidden. Maybe we should just display this one instead, and use when needed.

<field name="active" eval="True"/>
<field name="arch" type="xml">
<xpath expr="//page[@name='order_lines']//list//field[@name='tax_ids']" position="after">
<field optional="show" name="x_excise_free_unit_price" invisible="not x_excise_free_unit_price"/>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if I get the spec correctly, there should be a column_invisible condition as well

'depends': [
'account_tax_python',
'base_automation',
'sale_management',
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you bump the minor version of all modules?

</field>
</record>
<record id="sale_order_form_view_customizations" model="ir.ui.view">
<field name="name">sale.order.form customization</field>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<field name="name">sale.order.form customization</field>
<field name="name">sale.order.form.inherit.excise_management</field>

<field name="state">code</field>
<field name="name">Add/Remove excise tax on Fiscal Position</field>
</record>
<record id="requence_the_order_of_taxes" model="ir.actions.server">
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

requence?

<field name="name">Add/Remove excise tax on Fiscal Position</field>
</record>
<record id="requence_the_order_of_taxes" model="ir.actions.server">
<field name="code"><![CDATA[all_taxes = env['account.tax'].sudo().search([], order="x_is_deposit asc, x_is_excise desc, sequence asc")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of a search + write on all taxes, couldn't we find a better way? Like assigning the same sequence than another excise/deposit tax
This way looks too costly to me

<field name="field_description">Excises</field>
<field name="model_id" ref="sale.model_sale_order_line"/>
<field name="ttype">monetary</field>
<field name="depends">product_id, product_uom_qty</field>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<field name="depends">product_id, product_uom_qty</field>
<field name="depends">product_id, product_uom_qty, order_id.fiscal_position_id</field>

<field name="field_description">Deposits</field>
<field name="ttype">monetary</field>
<field name="model_id" ref="sale.model_sale_order_line"/>
<field name="depends">price_unit, product_uom_qty, tax_ids.x_is_deposit</field>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we won't update on SOL if a tax is modified, only if the tax is (un)assign to the SOL

Suggested change
<field name="depends">price_unit, product_uom_qty, tax_ids.x_is_deposit</field>
<field name="depends">product_uom_qty, tax_ids</field>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants