[FIX] account: copy journal entry without partner
The partner is not visible in the form so copying can lead to unwanted behaviours. Task 2389917 opw-2388430 closes odoo/odoo#62276 X-original-commit: ef1b3332a523f0afdb954f8eb2abb8f442bdca58 Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com> Signed-off-by: wan <william-andre@users.noreply.github.com>
This commit is contained in:
@@ -1780,6 +1780,8 @@ class AccountMove(models.Model):
|
||||
default = dict(default or {})
|
||||
if (fields.Date.to_date(default.get('date')) or self.date) <= self.company_id._get_user_fiscal_lock_date():
|
||||
default['date'] = self.company_id._get_user_fiscal_lock_date() + timedelta(days=1)
|
||||
if self.move_type == 'entry':
|
||||
default['partner_id'] = False
|
||||
return super(AccountMove, self).copy(default)
|
||||
|
||||
@api.model_create_multi
|
||||
|
||||
Reference in New Issue
Block a user