Zum Inhalt springen
Menü
Sie müssen registriert sein, um mit der Community zu interagieren.
Diese Frage wurde gekennzeichnet
1377 Ansichten

I am importing old-software's records into Odoo, and doing so through the API.


In my environment, there are three companies (A,B,C) belonging to a 4th one (Z). 
All the existing taxes 'belong' to company Z.


When I create an order line through the API, if I add (an existing) tax_id, it throws the following error:


​   

Error in py_call_impl(callable, call_args$unnamed, call_args$named) :  Fault 2: "Incompatible companies on records:
- 'blabla' belongs to company FALSE and 'Taxes' (tax_id: '20% G (Goods)')belongs to another company.


Actually, this is wrong: the product blablabla belongs to company Z and I can verify it in the product.template table.

When I try to create the line without specifying a tax_id, the line is properly created, without any tax associated. Then, when I try to select a tax_id in the available list (on Odoo client) and save my order, it throws the exact same error.


The only workaround I found is to go to the "Other information" pane, and modify the company so it triggers an automatic warning: "modifying the company on an existing order might require adjustements....". 

The trigger of the warning (or the modification of the company?) instantly add the proper tax_id to the order line. But I dont really want to do that for the 500+ orders I have to import.

Avatar
Verwerfen
Verknüpfte Beiträge Antworten Ansichten Aktivität
4
Jan. 16
10624
0
Aug. 24
1269
1
Mai 18
6331
2
Juni 16
5064
1
Okt. 24
2177