I added a field called "x_project_code" to the model "
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Buchhaltung
- Lager
- PoS
- Project
- MRP
Diese Frage wurde gekennzeichnet
Hello, I couldn't find better way to do, but here is my solution, that worked for me.
I inherited purchase.report model
I've defined my custom field in it. Same field I have in purhcase.order.line as well.
Example: dry_nuts = fields.Float('Expected Dry Nuts', readonly=True, group_operator="sum")I inherited purchase pivot view and added my custom field.
Example: <field name="dry_nuts" type="measure" />In python file, where I inherited purchase.report, I copied complete query from purchase. report file and added additional query for my customs field.
Example: sum(l.dry_nuts/u.factor*u2.factor) as dry_nuts
After that, dry_nuts are visible in purchase pivot table.
I think there is a better way to do it using ORM, so that there won't be need of copying all query from purchase.report, but I couldn't figure it out.
Hope this solution helps you too.
May i know what is the meant of l why we use it please explain it and my second question is what is meant of U and factor and why we use it please explain it
Diskutieren Sie gerne? Treten Sie bei, statt nur zu lesen!
Erstellen Sie heute ein Konto, um exklusive Funktionen zu nutzen und mit unserer tollen Community zu interagieren!
RegistrierenVerknüpfte Beiträge | Antworten | Ansichten | Aktivität | |
---|---|---|---|---|
|
0
März 15
|
5380 | ||
|
2
Mai 25
|
2228 | ||
|
0
Feb. 25
|
1438 | ||
|
0
Jan. 25
|
1208 | ||
Field service upgrade
Gelöst
|
|
1
Dez. 24
|
1585 |