[FIX] account: add invoice partner as follower
Feature was lost in the accounting-pocalypse merge. Partner (customer) should be added as follower when the invoice is posted, previously open. See https://github.com/odoo/odoo/commit/beaa30a3d1843de43a45f419bfbc1bfa7613a920#diff-f3712147f4b25231caa371bd83265dbeL1447 We also add the commercial partner now. Closes odoo/odoo#34766 Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
This commit is contained in:
@@ -1876,6 +1876,9 @@ class AccountMove(models.Model):
|
||||
for move in self:
|
||||
if move.auto_post and move.date > fields.Date.today():
|
||||
raise UserError(_("This move is configured to be auto-posted on {}".format(move.date.strftime(self.env['res.lang']._lang_get(self.env.user.lang).date_format))))
|
||||
|
||||
move.message_subscribe([p.id for p in [move.partner_id, move.commercial_partner_id] if p not in move.message_partner_ids])
|
||||
|
||||
to_write = {'state': 'posted'}
|
||||
|
||||
if move.name == '/':
|
||||
|
||||
Reference in New Issue
Block a user