Bug
This commit is contained in:
@@ -1220,6 +1220,7 @@ class Invoice(Workflow, ModelSQL, ModelView, TaxableMixin, InvoiceReportMixin):
|
||||
line.amount_second_currency = (
|
||||
line.amount_second_currency.copy_sign(
|
||||
line.debit - line.credit))
|
||||
line.rate = line.get_rate()
|
||||
line.account = self.account
|
||||
logger.info("_GET_MOVE_LINE_ACCOUNT:%s",line.account)
|
||||
if self.account.party_required:
|
||||
@@ -1990,6 +1991,10 @@ class Invoice(Workflow, ModelSQL, ModelView, TaxableMixin, InvoiceReportMixin):
|
||||
move_line_.account = gl.product.account_stock_in_used
|
||||
|
||||
move_lines = [move_line,move_line_]
|
||||
if move_line.amount_second_currency:
|
||||
move_line.rate = move_line.get_rate()
|
||||
if move_line_.amount_second_currency:
|
||||
move_line_.rate = move_line_.get_rate()
|
||||
|
||||
if drop:
|
||||
drop_line = AccountMoveLine()
|
||||
@@ -2027,6 +2032,10 @@ class Invoice(Workflow, ModelSQL, ModelView, TaxableMixin, InvoiceReportMixin):
|
||||
drop_line_.second_currency = self.currency
|
||||
drop_line_.amount_second_currency = -original_amount
|
||||
move_lines = [drop_line,drop_line_]
|
||||
if drop_line.amount_second_currency:
|
||||
drop_line.rate = drop_line.get_rate()
|
||||
if drop_line_.amount_second_currency:
|
||||
drop_line_.rate = drop_line_.get_rate()
|
||||
|
||||
return move_lines
|
||||
|
||||
@@ -3262,6 +3271,7 @@ class InvoiceLine(sequence_ordered(), ModelSQL, ModelView, TaxableMixin):
|
||||
line.amount_second_currency = (
|
||||
line.amount_second_currency.copy_sign(
|
||||
line.debit - line.credit))
|
||||
line.rate = line.get_rate()
|
||||
line.account = self.account
|
||||
logger.info("GET_MOVE_LINES_ACCOUNT:%s",line.account)
|
||||
if self.account.party_required:
|
||||
@@ -3557,6 +3567,7 @@ class InvoiceTax(sequence_ordered(), ModelSQL, ModelView):
|
||||
line.amount_second_currency = (
|
||||
line.amount_second_currency.copy_sign(
|
||||
line.debit - line.credit))
|
||||
line.rate = line.get_rate()
|
||||
line.account = self.account
|
||||
if self.account.party_required:
|
||||
line.party = self.invoice.party
|
||||
|
||||
Reference in New Issue
Block a user