[FIX] account: manually editable tax amounts in supplier bills.
People should be able to change manually the tax amounts on vendor bills, since they have to encode exactly what they receive and because the supplier may round differently than Odoo. On the other hand, in vendor bills, it's useless to try to compute a cash rounding impacting the taxes... as they should be now able to manually adapt it. So in vendor bills, the 'amount' field has to be the visible and editable one
This commit is contained in:
@@ -711,7 +711,7 @@ class AccountInvoice(models.Model):
|
||||
if tax_line.amount_rounding != 0.0:
|
||||
tax_line.amount_rounding = 0.0
|
||||
|
||||
if self.cash_rounding_id:
|
||||
if self.cash_rounding_id and self.type in ('out_invoice', 'out_refund'):
|
||||
rounding_amount = self.cash_rounding_id.compute_difference(self.currency_id, self.amount_total)
|
||||
if not self.currency_id.is_zero(rounding_amount):
|
||||
if self.cash_rounding_id.strategy == 'biggest_tax':
|
||||
@@ -1692,7 +1692,7 @@ class AccountInvoiceTax(models.Model):
|
||||
account_analytic_id = fields.Many2one('account.analytic.account', string='Analytic account')
|
||||
amount = fields.Monetary()
|
||||
amount_rounding = fields.Monetary()
|
||||
amount_total = fields.Monetary(compute='_compute_amount_total')
|
||||
amount_total = fields.Monetary(string="Amount", compute='_compute_amount_total')
|
||||
manual = fields.Boolean(default=True)
|
||||
sequence = fields.Integer(help="Gives the sequence order when displaying a list of invoice tax.")
|
||||
company_id = fields.Many2one('res.company', string='Company', related='account_id.company_id', store=True, readonly=True)
|
||||
|
||||
@@ -294,9 +294,9 @@
|
||||
<field name="manual" invisible="1"/>
|
||||
<field name="account_id" groups="account.group_account_user"/>
|
||||
<field name="account_analytic_id" domain="[('company_id', '=', parent.company_id)]" groups="analytic.group_analytic_accounting"/>
|
||||
<field name="amount" invisible="1"/>
|
||||
<field name="amount"/>
|
||||
<field name="amount_rounding" invisible="1"/>
|
||||
<field name="amount_total"/>
|
||||
<field name="amount_total" invisible="1"/>
|
||||
<field name="currency_id" invisible="1"/>
|
||||
</tree>
|
||||
</field>
|
||||
|
||||
Reference in New Issue
Block a user