[IMP] account_check_printing: log state for vendor checks

Task 2168197

Especially when writing out checks we would like to track the value of
the state of the vendor payment in the chatter. This way we can see who
prints it, cancels it, etc and at what time this happened. It's
important for traceability. I think we can just enable it for all
payments in general, I can't think of any downsides and payments are
usually sensitive documents so I imagine people want as much info as
possible.

closes odoo/odoo#43505

Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
This commit is contained in:
wan
2020-01-17 15:41:40 +00:00
parent 183af97168
commit c5e5e97888
+1 -1
View File
@@ -52,7 +52,7 @@ class account_payment(models.Model):
move_line_ids = fields.One2many('account.move.line', 'payment_id', readonly=True, copy=False, ondelete='restrict')
move_reconciled = fields.Boolean(compute="_get_move_reconciled", readonly=True)
state = fields.Selection([('draft', 'Draft'), ('posted', 'Validated'), ('sent', 'Sent'), ('reconciled', 'Reconciled'), ('cancelled', 'Cancelled')], readonly=True, default='draft', copy=False, string="Status")
state = fields.Selection([('draft', 'Draft'), ('posted', 'Validated'), ('sent', 'Sent'), ('reconciled', 'Reconciled'), ('cancelled', 'Cancelled')], readonly=True, default='draft', copy=False, string="Status", tracking=True)
payment_type = fields.Selection([('outbound', 'Send Money'), ('inbound', 'Receive Money'), ('transfer', 'Internal Transfer')], string='Payment Type', required=True, readonly=True, states={'draft': [('readonly', False)]})
_payment_methods = fields.Many2many('account.payment.method', compute='_compute_payment_methods')
payment_method_id = fields.Many2one('account.payment.method', string='Payment Method', required=True, readonly=True, states={'draft': [('readonly', False)]},