mirror of
https://github.com/OCA/manufacture.git
synced 2025-01-28 16:37:15 +02:00
@@ -20,10 +20,5 @@ class MrpProduction(models.Model):
|
||||
return True
|
||||
|
||||
def action_unstart(self):
|
||||
self.write(
|
||||
{
|
||||
"state": "confirmed",
|
||||
"date_start": False,
|
||||
}
|
||||
)
|
||||
self.write({"state": "confirmed", "date_start": False, "qty_producing": 0})
|
||||
return True
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<field name="model">mrp.production</field>
|
||||
<field name="inherit_id" ref="mrp.mrp_production_form_view" />
|
||||
<field name="arch" type="xml">
|
||||
<button name="action_assign" position="before">
|
||||
<button name="button_unplan" position="before">
|
||||
<button
|
||||
name="action_progress"
|
||||
attrs="{'invisible': [('state', '!=', 'confirmed')]}"
|
||||
@@ -17,7 +17,7 @@
|
||||
<button name="action_assign" position="after">
|
||||
<button
|
||||
name="action_unstart"
|
||||
attrs="{'invisible': [('state', '!=', 'progress')]}"
|
||||
attrs="{'invisible': ['|', ('state', '!=', 'progress'), ('qty_producing', '!=', 0)]}"
|
||||
type="object"
|
||||
string="Unstart"
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user