[FIX] account_spread_cost_revenue: skip create template in create_move()
This commit is contained in:
parent
0698663e48
commit
a6dae3b191
@ -135,6 +135,10 @@ class AccountMoveLine(models.Model):
|
||||
return False
|
||||
return True
|
||||
|
||||
# Skip create new template when create move on spread lines
|
||||
if self.env.context.get("skip_create_template"):
|
||||
return
|
||||
|
||||
for line in self:
|
||||
if line.spread_check == "linked":
|
||||
continue
|
||||
|
@ -40,7 +40,9 @@ class AccountInvoiceSpreadLine(models.Model):
|
||||
def create_move(self):
|
||||
"""Button to manually create a move from a spread line entry."""
|
||||
self.ensure_one()
|
||||
self.create_and_reconcile_moves()
|
||||
self.with_context(
|
||||
skip_create_template=True,
|
||||
).create_and_reconcile_moves()
|
||||
|
||||
def _create_moves(self):
|
||||
if self.filtered(lambda l: l.move_id):
|
||||
|
Loading…
Reference in New Issue
Block a user