File tree 2 files changed +6
-6
lines changed
2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change 7
7
<field name =" inherit_id"
8
8
ref =" purchase.purchase_order_form" />
9
9
<field name =" arch" type =" xml" >
10
- <xpath expr =" /form/sheet//h1[1]" position =" after" >
11
- <h2 attrs =" {'invisible': [('state', '!=', 'done')]}" >
12
- <label for =" force_done_reason" string =" Force Done Reason:" />
13
- <field name =" force_done_reason" class =" oe_inline" />
14
- </h2 >
10
+ <xpath expr =" //field[@name='shipped']" position =" after" >
11
+ <field name =" force_done_reason" />
15
12
</xpath >
16
13
<xpath expr =" //button[@name='action_cancel']" position =" after" >
17
14
<button name =" %(action_force_done)d" string =" Force Done"
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ class PurchaseOrderForceDone(models.TransientModel):
9
9
10
10
force_done_reason = fields .Char (
11
11
string = "Force Done Reason" ,
12
+ required = True ,
12
13
)
13
14
14
15
@api .one
@@ -29,6 +30,8 @@ def confirm_force_done(self):
29
30
])
30
31
if len (picking ) > 0 :
31
32
picking .action_cancel ()
32
- order .force_done_reason = self .force_done_reason
33
+ order .write ({
34
+ 'force_done_reason' : self .force_done_reason ,
35
+ })
33
36
order .wkf_po_done ()
34
37
return act_close
You can’t perform that action at this time.
0 commit comments