Odoo is the world's easiest all-in-one management software. It includes hundreds of business apps:
CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc.
I tried to get the sum of invoices related to sale orders so that it can be available in sale.order.tree view for example. My code is:
from openerp import fields, models, api
_inherit = 'sale.order'
self.my_amount_total_invoice = sum(item.price_subtotal for item in total)
my_amount_total_invoice = fields.Float(string="# Sum", compute='_my_amount_total')
ButI got the following error
AssertionError: Invalid value account.invoice(1,) in domain term ('invoice_id', 'in', account.invoice(1,))
The problem is with this line:
Can anyone help me?
Thanks in advance,
About This Community
This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.Register
Odoo Training Center
Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.Test it now
|Asked: 12/30/15, 11:31 AM|
|Seen: 794 times|
|Last updated: 12/31/15, 8:58 AM|