'invisible' is not propagated from the model to the view

Anyway, set the field readonly is better than invisible because
it is still interesting to see this value even if it cannot be changed
This commit is contained in:
Guewen Baconnier
2014-11-18 14:34:20 +01:00
parent 7fe127bf83
commit 4e1cb139f1

View File

@@ -27,8 +27,8 @@ from openerp import models, fields, api
class AccountMoveLine(models.Model):
_inherit = "account.move.line"
# We set the tax_amount invisible, because we recompute it in every case.
tax_amount = fields.Float(invisible=True)
# We set the tax_amount readonly, because we recompute it in every case.
tax_amount = fields.Float(readonly=True)
@api.one
def force_compute_tax_amount(self):