Move line manual

This commit is contained in:
2026-04-28 11:09:37 +02:00
parent 384c1285b1
commit 2e276e2b1f
4 changed files with 115 additions and 37 deletions

View File

@@ -515,7 +515,9 @@ class Invoice(Workflow, ModelSQL, ModelView, TaxableMixin, InvoiceReportMixin):
~((table.state == 'cancelled') & (table.number == Null)),
CharLength(table.number), table.number]
@fields.depends('selection_rate','rate_date')
@fields.depends(
'selection_rate', 'rate_date', 'currency', 'company', 'invoice_date',
'lines', 'lines.lot', 'lines.amount')
def on_change_with_rate(self, name=None):
return self.get_selected_rate()
@@ -528,8 +530,8 @@ class Invoice(Workflow, ModelSQL, ModelView, TaxableMixin, InvoiceReportMixin):
def get_selected_rate(self,name=None):
Currency = Pool().get('currency.currency')
Date = Pool().get('ir.date')
company = self.company
currency = self.currency
company = getattr(self, 'company', None)
currency = getattr(self, 'currency', None)
if not currency or not company:
return None