Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
1 Beantwoorden
2402 Weergaven

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 !

Avatar
Annuleer
Auteur

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 !


Beste antwoord

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 


Avatar
Annuleer
Gerelateerde posts Antwoorden Weergaven Activiteit
2
nov. 24
1764
1
nov. 24
2346
1
okt. 23
2981
3
dec. 23
20875
0
mei 21
7736