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.
To sort invoice, you need a srto method in your rml parser...
best way is to make a custom report parser...
Here is an example parser :
def __init__(self, cr, uid, name, context):
super(account_invoice, self).__init__(cr, uid, name, context=context)
def _sort(self, theList):
#sorting by name ... change to apropriate: sequence, code price...
theList.sort(key=lambda x: x.name, reverse=False)
Now, in your rml you can instead of: [[ repeatIn(o.sort_print,'l') ]]
use : [[ repeatIn(sort(o.invoice_line),'l') ]]
for reveserse sort order : [[ repeatIn(sort(o.invoice_line, reverse=True),'l') ]]
modifiy sort conditions to your needs...
hope it helps...
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: 1/20/15, 5:49 AM|
|Seen: 2308 times|
|Last updated: 3/16/15, 8:10 AM|