Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
1560 Widoki

I have a multi companies flow where Purchase Order from Company A will create Sale Order for Company B, I am trying to automatically confirm that Sale Order. Each Company has different flow when confirm Sale Order.

I am running the code with OdooBot because I need access to both Companies, but when confirm Sale Order for company B, it always trigger the flow of confirming order of company A, I dont know why.

If I choose both companies on the top right multi-company widget and then confirm the SO, the same problem happens.

If I only choose company B on the top right multi-company widget and then confirm the SO, it will work fine.

How am I gonna simulate this behavior by code? I tried with_company and with_context(allowed_company_ids), nothing worked

so_res.with_company(so_res.company_id).action_confirm()

It still triggers the flow of company A


Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
1
lip 24
2073
1
lut 23
2369
0
sie 22
2000
2
lip 25
1711
3
lip 25
2103