[IMP]stock: Improved a workflow state for reception [draft to assigned] and partner tool-tip and related string
bzr revid: mma@tinyerp.com-20120402093742-jf8vl1v2vxlvfnry
This commit is contained in:
@@ -722,7 +722,7 @@ class stock_picking(osv.osv):
|
||||
res['fields']['state']['selection'] = [(x[0], _state[x[0]]) for x in PICK_STATE]
|
||||
res['fields']['state']['help'] = self._tooltip_picking_state(_state)
|
||||
# To update the fields tooltips according to shipping type
|
||||
if field == 'address_id':
|
||||
if field == 'partner_id':
|
||||
_tooltip = ''
|
||||
if type == 'in':
|
||||
_tooltip = _('supplier')
|
||||
@@ -730,7 +730,7 @@ class stock_picking(osv.osv):
|
||||
_tooltip = _('warehouse')
|
||||
elif type == 'out':
|
||||
_tooltip = _('customer')
|
||||
res['fields']['address_id']['help'] = _("Address of %s") %(_tooltip)
|
||||
res['fields']['partner_id']['help'] = _("Address of %s") %(_tooltip)
|
||||
return res
|
||||
|
||||
def action_process(self, cr, uid, ids, context=None):
|
||||
@@ -891,6 +891,11 @@ class stock_picking(osv.osv):
|
||||
for pick in self.browse(cr, uid, ids):
|
||||
mt = pick.move_type
|
||||
for move in pick.move_lines:
|
||||
if pick.type == 'in':
|
||||
if move.state == 'waiting':
|
||||
return False
|
||||
if move.product_id.type == 'consu' or move.location_id.usage == 'supplier':
|
||||
return True
|
||||
if (move.state in ('confirmed', 'draft')) and (mt == 'one'):
|
||||
return False
|
||||
if (mt == 'direct') and (move.state == 'assigned') and (move.product_qty):
|
||||
|
||||
@@ -694,7 +694,7 @@
|
||||
<group colspan="4" col="4">
|
||||
<field name="name" readonly="1"/>
|
||||
<field name="origin"/>
|
||||
<field name="partner_id" on_change="onchange_partner_in(partner_id)" colspan="4"/>
|
||||
<field name="partner_id" string="Warehouse" on_change="onchange_partner_in(partner_id)" colspan="4"/>
|
||||
<field name="invoice_state" string="Invoice Control" groups="base.group_extended"/>
|
||||
</group>
|
||||
<group colspan="2" col="2">
|
||||
@@ -886,7 +886,7 @@
|
||||
<group colspan="4" col="4">
|
||||
<field name="name" readonly="1"/>
|
||||
<field name="origin" readonly="1"/>
|
||||
<field name="partner_id" on_change="onchange_partner_in(partner_id)" colspan="4"/>
|
||||
<field name="partner_id" string="Customer" on_change="onchange_partner_in(partner_id)" colspan="4"/>
|
||||
<field name="invoice_state"/>
|
||||
|
||||
</group>
|
||||
@@ -1106,7 +1106,7 @@
|
||||
<group colspan="4" col="4">
|
||||
<field name="name" readonly="1"/>
|
||||
<field name="origin"/>
|
||||
<field name="partner_id" on_change="onchange_partner_in(partner_id)" colspan="4"/>
|
||||
<field name="partner_id" string="Supplier" on_change="onchange_partner_in(partner_id)" colspan="4"/>
|
||||
<field name="invoice_state" string="Invoice Control"/>
|
||||
|
||||
</group>
|
||||
|
||||
Reference in New Issue
Block a user