-
Notifications
You must be signed in to change notification settings - Fork 82
[IMP] excise_management : Deposit & excise totals by line #1214
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 19.0
Are you sure you want to change the base?
Conversation
9fdbd52
to
4be4c3b
Compare
4be4c3b
to
fc89276
Compare
<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> |
There was a problem hiding this comment.
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> |
There was a problem hiding this comment.
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"/> |
There was a problem hiding this comment.
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', |
There was a problem hiding this comment.
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> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<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"> |
There was a problem hiding this comment.
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") |
There was a problem hiding this comment.
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> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<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> |
There was a problem hiding this comment.
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
<field name="depends">price_unit, product_uom_qty, tax_ids.x_is_deposit</field> | |
<field name="depends">product_uom_qty, tax_ids</field> |
In this PR we have made customizations to display deposit & excise totals by line.
Task-5127418