Is there a way to sort the products listed on the manufacturing order in ascending and print a report in this order?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Księgowość
- Zapasy
- PoS
- Project
- MRP
To pytanie dostało ostrzeżenie
Hi @Chantal Doucet
Hope you are doing well
For you to sort the products on MO in ascending and print on the report, you will need to inherit the report_mrporder template and make below changes to it for sorting the product on report.
Please find code in comment.
I hope this would be helpful.
Thanks & Regards,
Email: odoo@aktivsoftware.com
Skype: kalpeshmaheshwari
Please find code here :-
<template id="report_mrporder_sorted" inherit_id="mrp.report_mrporder">
<xpath expr="//t[@t-if='o.move_raw_ids']/tr" position="attributes">
<attribute name="t-foreach">o.move_raw_ids.filtered(lambda m: m.state != 'cancel').sorted(key=lambda m: m.product_id.name)</attribute>
</xpath>
</template>
Podoba Ci się ta dyskusja? Dołącz do niej!
Stwórz konto dzisiaj, aby cieszyć się ekskluzywnymi funkcjami i wchodzić w interakcje z naszą wspaniałą społecznością!
Zarejestruj się