mirror of
https://github.com/OCA/account-financial-tools.git
synced 2025-02-02 12:47:26 +02:00
[MRG] fix bug 1189922 that prevents validation of 0% export tax invoices
This commit is contained in:
@@ -122,8 +122,10 @@ class AccountMoveLine(orm.Model):
|
|||||||
|
|
||||||
def _check_currency_and_amount(self, cr, uid, ids, context=None):
|
def _check_currency_and_amount(self, cr, uid, ids, context=None):
|
||||||
for l in self.browse(cr, uid, ids, context=context):
|
for l in self.browse(cr, uid, ids, context=context):
|
||||||
if ((l.currency_id and not l.amount_currency) or
|
# we check zero amount line
|
||||||
(not l.currency_id and l.amount_currency)):
|
if not bool(l.debit) + bool(l.credit):
|
||||||
|
continue
|
||||||
|
if (bool(l.currency_id) != bool(l.amount_currency)):
|
||||||
return False
|
return False
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user