Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
1 Răspunde
2404 Vizualizări

Hi all !

I'm exporting RFQ datas in an excel file, everything will be ok in the excel file but when i try to import the exported file for the "Total" the only option i will have is "don't import" i had a look to all other options, none is returning the amount_total field ... could someone explain what i'm doing wrong ? Thanks !

Imagine profil
Abandonează
Autor

I went through by creating a new field inheriting from total_amount field, and make a new view inheriting from purchase.order.tree

Now my problem is i cannot place it as i would like in the view, when i edit the architecture of my new view , even i put position "before" or "after" it won't move, or change the field name in the xpath expression it won't find the field.... Only field "name" works, but in the parent "purchase.order.tree" many other fields exist but it doesn't work.... So i can only get it in first position in the tree view...

If anyone can help on this issue, thanks !


Cel mai bun răspuns

The amount_total field is managed by Odoo.

You cannot edit or import a value into fields that are managed by Odoo.

See https://github.com/odoo/odoo/blob/15.0/addons/purchase/models/purchase.py#L125 

When you see in that same file the function _amount_all you can see it calculates the amount_total by looping through every line and adding up the price_subtotal and price_tax on each line.


See https://github.com/odoo/odoo/blob/15.0/addons/purchase/models/purchase.py#L27 


Imagine profil
Abandonează
Related Posts Răspunsuri Vizualizări Activitate
2
nov. 24
1765
1
nov. 24
2346
1
oct. 23
2981
3
dec. 23
20877
0
mai 21
7737