Move line manual
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user