Skip to Content
Menu
This question has been flagged
1 Reply
1591 Views

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
Discard
Author

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 !


Best Answer

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
Discard
Related Posts Replies Views Activity
2
Nov 24
134
1
Nov 24
157
1
Oct 23
1175
3
Dec 23
18884
0
May 21
6316