Merge all kind of buttons
review483002
This commit is contained in:
1 parent
7e9b043113
commit
6c67edad4f
4 files changed
+56
-40
No files matched your search
+3
-3
@@ -20,7 +20,7 @@ this repository contains the full copyright notices and license terms. -->
|
||||
<field name="company"/>
|
||||
<label colspan="2" id="empty"/>
|
||||
<button string="Complete Inventory"
|
||||
name="complete_lines" type="object" colspan="2"
|
||||
name="complete_lines" colspan="2"
|
||||
help="Add an inventory line for each missing products"/>
|
||||
<field name="lines" colspan="4"/>
|
||||
<group col="4" colspan="4" id="group_buttons">
|
||||
@@ -28,9 +28,9 @@ this repository contains the full copyright notices and license terms. -->
|
||||
<field name="state"/>
|
||||
<group colspan="2" col="3" id="buttons">
|
||||
<button string="Cancel" name="cancel"
|
||||
type="object" icon="tryton-cancel" />
|
||||
icon="tryton-cancel" />
|
||||
<button string="Confirm" name="confirm"
|
||||
type="object" icon="tryton-ok"/>
|
||||
icon="tryton-ok"/>
|
||||
</group>
|
||||
</group>
|
||||
</form>
|
||||
|
||||
+2
-2
@@ -16,9 +16,9 @@ this repository contains the full copyright notices and license terms. -->
|
||||
<label name="state"/>
|
||||
<field name="state"/>
|
||||
<group col="2" colspan="2" id="buttons">
|
||||
<button name="draft" type="object" string="Draft"
|
||||
<button name="draft" string="Draft"
|
||||
icon="tryton-clear"/>
|
||||
<button name="close" type="object" string="Close"
|
||||
<button name="close" string="Close"
|
||||
icon="tryton-ok"/>
|
||||
</group>
|
||||
</form>
|
||||
|
||||
+27
@@ -540,6 +540,11 @@ class ShipmentInReturn(Workflow, ModelSQL, ModelView):
|
||||
'done': {
|
||||
'invisible': Eval('state') != 'assigned',
|
||||
},
|
||||
'assign_wizard': {
|
||||
'invisible': Eval('state') != 'waiting',
|
||||
'readonly': ~Eval('groups', []).contains(
|
||||
Id('stock', 'group_stock')),
|
||||
},
|
||||
'assign_try': {},
|
||||
'assign_force': {},
|
||||
})
|
||||
@@ -697,6 +702,10 @@ class ShipmentInReturn(Workflow, ModelSQL, ModelView):
|
||||
'state': 'cancel',
|
||||
})
|
||||
|
||||
@ModelView.button_action('stock.wizard_shipment_in_return_assign')
|
||||
def assign_wizard(self, ids):
|
||||
pass
|
||||
|
||||
@ModelView.button
|
||||
def assign_try(self, ids):
|
||||
pool = Pool()
|
||||
@@ -878,6 +887,11 @@ class ShipmentOut(Workflow, ModelSQL, ModelView):
|
||||
'done': {
|
||||
'invisible': Eval('state') != 'packed',
|
||||
},
|
||||
'assign_wizard': {
|
||||
'invisible': Eval('state') != 'waiting',
|
||||
'readonly': ~Eval('groups', []).contains(
|
||||
Id('stock', 'group_stock')),
|
||||
},
|
||||
'assign_try': {},
|
||||
'assign_force': {},
|
||||
})
|
||||
@@ -1268,6 +1282,10 @@ class ShipmentOut(Workflow, ModelSQL, ModelView):
|
||||
uom_index[target_uom])
|
||||
return res
|
||||
|
||||
@ModelView.button_action('stock.wizard_shipment_out_assign')
|
||||
def assign_wizard(self, ids):
|
||||
pass
|
||||
|
||||
@ModelView.button
|
||||
def assign_try(self, ids):
|
||||
move_obj = Pool().get('stock.move')
|
||||
@@ -1861,6 +1879,11 @@ class ShipmentInternal(Workflow, ModelSQL, ModelView):
|
||||
'done': {
|
||||
'invisible': Eval('state') != 'assigned',
|
||||
},
|
||||
'assign_wizard': {
|
||||
'invisible': Eval('state') != 'waiting',
|
||||
'readonly': ~Eval('groups', []).contains(
|
||||
Id('stock', 'group_stock')),
|
||||
},
|
||||
'assign_try': {},
|
||||
'assign_force': {},
|
||||
})
|
||||
@@ -1991,6 +2014,10 @@ class ShipmentInternal(Workflow, ModelSQL, ModelView):
|
||||
'state': 'cancel',
|
||||
})
|
||||
|
||||
@ModelView.button_action('stock.wizard_shipment_internal_assign')
|
||||
def assign_wizard(self, ids):
|
||||
pass
|
||||
|
||||
@ModelView.button
|
||||
def assign_try(self, ids):
|
||||
move_obj = Pool().get('stock.move')
|
||||
|
||||
+24
-35
@@ -40,13 +40,13 @@ this repository contains the full copyright notices and license terms. -->
|
||||
<field name="state"/>
|
||||
<group col="5" colspan="2" id="buttons">
|
||||
<button string="Cancel" name="cancel"
|
||||
type="object" icon="tryton-cancel"/>
|
||||
icon="tryton-cancel"/>
|
||||
<button string="Receive" name="receive"
|
||||
type="object" icon="tryton-go-next"/>
|
||||
<button string="Done" name="done" type="object"
|
||||
icon="tryton-go-next"/>
|
||||
<button string="Done" name="done"
|
||||
icon="tryton-ok"/>
|
||||
<button string="Reset to Draft" name="draft"
|
||||
type="object" icon="tryton-clear"/>
|
||||
icon="tryton-clear"/>
|
||||
</group>
|
||||
</group>
|
||||
</form>
|
||||
@@ -162,16 +162,13 @@ this repository contains the full copyright notices and license terms. -->
|
||||
<field name="state"/>
|
||||
<group col="5" colspan="2" id="buttons">
|
||||
<button string="Cancel" name="cancel"
|
||||
type="object" icon="tryton-cancel"/>
|
||||
<button string="Draft" name="draft" type="object"
|
||||
icon="tryton-cancel"/>
|
||||
<button string="Draft" name="draft"
|
||||
icon="tryton-go-previous"/>
|
||||
<button string="Wait" name="wait"
|
||||
type="object"/>
|
||||
<button string="Assign" name="%(wizard_shipment_in_return_assign)d"
|
||||
type="action"
|
||||
states="{'invisible': Not(Equal(Eval('state'), 'waiting')), 'readonly': Not(In(%(group_stock)d, Eval('groups', [])))}"
|
||||
<button string="Wait" name="wait"/>
|
||||
<button string="Assign" name="assign_wizard"
|
||||
icon="tryton-go-next"/>
|
||||
<button string="Done" name="done" type="object"
|
||||
<button string="Done" name="done"
|
||||
icon="tryton-ok"/>
|
||||
</group>
|
||||
</form>
|
||||
@@ -275,18 +272,14 @@ this repository contains the full copyright notices and license terms. -->
|
||||
<field name="state"/>
|
||||
<group col="6" colspan="2" id="buttons">
|
||||
<button string="Cancel" name="cancel"
|
||||
type="object" icon="tryton-cancel"/>
|
||||
<button string="Draft" name="draft"
|
||||
type="object"/>
|
||||
<button string="Waiting" name="wait"
|
||||
type="object"/>
|
||||
<button string="Assign" name="%(wizard_shipment_out_assign)d"
|
||||
type="action"
|
||||
states="{'invisible': Not(Equal(Eval('state'), 'waiting')), 'readonly': Not(In(%(group_stock)d, Eval('groups', [])))}"
|
||||
icon="tryton-go-next"/>
|
||||
icon="tryton-cancel"/>
|
||||
<button string="Draft" name="draft"/>
|
||||
<button string="Waiting" name="wait"/>
|
||||
<button string="Assign" name="assign_wizard"
|
||||
icon="tryton-go-next"/>
|
||||
<button string="Make shipment" name="pack"
|
||||
type="object" icon="tryton-go-next"/>
|
||||
<button string="Done" name="done" type="object"
|
||||
icon="tryton-go-next"/>
|
||||
<button string="Done" name="done"
|
||||
icon="tryton-ok"/>
|
||||
</group>
|
||||
</group>
|
||||
@@ -454,16 +447,13 @@ this repository contains the full copyright notices and license terms. -->
|
||||
<label name="state"/>
|
||||
<field name="state"/>
|
||||
<group col="5" colspan="2" id="buttons">
|
||||
<button string="Cancel" name="cancel" type="object"
|
||||
<button string="Cancel" name="cancel"
|
||||
icon="tryton-cancel"/>
|
||||
<button string="Draft" name="draft" type="object"/>
|
||||
<button string="Waiting" name="wait"
|
||||
type="object"/>
|
||||
<button string="Assign" name="%(wizard_shipment_internal_assign)d"
|
||||
type="action"
|
||||
states="{'invisible': Not(Equal(Eval('state'), 'waiting')), 'readonly': Not(In(%(group_stock)d, Eval('groups', [])))}"
|
||||
<button string="Draft" name="draft"/>
|
||||
<button string="Waiting" name="wait"/>
|
||||
<button string="Assign" name="assign_wizard"
|
||||
icon="tryton-go-next"/>
|
||||
<button string="Done" name="done" type="object"
|
||||
<button string="Done" name="done"
|
||||
icon="tryton-ok"/>
|
||||
</group>
|
||||
</form>
|
||||
@@ -624,13 +614,12 @@ this repository contains the full copyright notices and license terms. -->
|
||||
<field name="state"/>
|
||||
<group col="5" colspan="2" id="buttons">
|
||||
<button string="Cancel" name="cancel"
|
||||
type="object" icon="tryton-cancel"/>
|
||||
icon="tryton-cancel"/>
|
||||
<button string="Draft" name="draft"
|
||||
type="object" icon="tryton-clear"/>
|
||||
icon="tryton-clear"/>
|
||||
<button string="Received" name="receive"
|
||||
type="object" icon="tryton-go-next"/>
|
||||
icon="tryton-go-next"/>
|
||||
<button string="Done" name="done"
|
||||
type="object"
|
||||
icon="tryton-ok"/>
|
||||
</group>
|
||||
</group>
|
||||
|
||||
Reference in new issue
Block a user