openobject-italia-core-devs team mailing list archive
-
openobject-italia-core-devs team
-
Mailing list archive
-
Message #01673
[Merge] lp:~agilebg/openobject-italia/7.0-bug-1221567-elbati into lp:openobject-italia/7.0
You have been requested to review the proposed merge of lp:~agilebg/openobject-italia/7.0-bug-1221567-elbati into lp:openobject-italia/7.0.
For more details, see:
https://code.launchpad.net/~agilebg/openobject-italia/7.0-bug-1221567-elbati/+merge/184509
--
https://code.launchpad.net/~agilebg/openobject-italia/7.0-bug-1221567-elbati/+merge/184509
Your team OpenERP Italia core devs is requested to review the proposed merge of lp:~agilebg/openobject-italia/7.0-bug-1221567-elbati into lp:openobject-italia/7.0.
=== modified file 'l10n_it_vat_registries/invoice.py'
--- l10n_it_vat_registries/invoice.py 2013-08-21 16:15:06 +0000
+++ l10n_it_vat_registries/invoice.py 2013-09-09 07:21:25 +0000
@@ -68,12 +68,18 @@
def _get_invoice_total(self, move):
total = 0.0
+ receivable_payable_found = False
for move_line in move.line_id:
if move_line.account_id.type == 'receivable':
total += move_line.debit or ( - move_line.credit)
+ receivable_payable_found = True
elif move_line.account_id.type == 'payable':
total += ( - move_line.debit) or move_line.credit
- return abs(total)
+ receivable_payable_found = True
+ if not receivable_payable_found:
+ return abs(move.amount)
+ else:
+ return abs(total)
def build_parent_tax_codes(self, tax_code):
res={}
References