Hello,
So I have migrated master data from odoo 9 to 13. I am starting to use the automated actions . I have an automated action that will copy the reserved qty to done qty within the Stock Move Lines Form based on a form mod event trigged from the done_qty field (I am scanning the pick ticket list line items , when they are set to 1 from the scan( it copies the reservation value to done).
The issue is that if I want to edit the done qty , it obviously gets over written by the reservation qty. I added a check box and a conditional statement allow me to edit the done value without it getting over written when the checkbox it True, but It does not seem to evaluate the if statement.
if x_studio_edit != 'True'
record['qty_done'] = record.product_uom_qty
I am not sure if its a syntax thing or I needs to provide more data regarding the model. Here is my automated action. Additionally, I added a button to executed a server action that would loop through all the record move lines to copy the reserved qty to done_qty. and got errors as well. I am not sure my limitations with server actions regarding api, classes, requirements.
<button name="656" type="action" string="Move Reserved Qty to Done"/>
Server Action 656
for rec in records:
record['qty_done'] = record.product_uom_qty