Odoo 14 (Sales - Purchase - Inventory )
my company work by the following Operations Routes :
Buy and Replenish on Order (MTO)
purchased upon the confirmation of a sales order
and the related PO will have the source document field (with the related SO Number ) in odoo as is ,
now
I need to create new field ( Many2one) in the PO , Named " Related SO Contact " under the odoo as is field ( source document )
so that when the sales teem create SO its related (auto created ) PO will have the
source document : SO 0007
Related SO Contact : the customer name from the related SO
-------------------------------------------------------------------------------------
A) by odoo studio , i've created the new ( Many2one) field in the po
B ) i've created new Automated action with the following data
Model : Purchase Order
Trigger : On Creation & Update
Action To Do : Create a new Record
Target Model : Sales Order
Trigger Fields : source document (purchase.order)
Match records with the following rule:
Source Document
contains "S0"
-------------------------------------------------------------------------------
what i need
i need any help to
A ) complete the automated action to work wright as it not completed wright now and not working
OR
B ) Execute python code in the automated action , so if any one could write it so i can copy and past