Mayur Maheshwari(OpenERP) has proposed merging
lp:~openerp-dev/openobject-addons/trunk-stock_picking_usability-mma into
lp:~openerp-dev/openobject-addons/trunk-stock_picking_usability.
Requested reviews:
OpenERP R&D Team (openerp-dev)
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-stock_picking_usability-mma/+merge/100376
Hello,
stock: I have improved a workflow state for incoming shipment [draft to
assigned] and partner tool-tip and related string in view file.
Thanks.
mma
--
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-stock_picking_usability-mma/+merge/100376
Your team OpenERP R&D Team is requested to review the proposed merge of
lp:~openerp-dev/openobject-addons/trunk-stock_picking_usability-mma into
lp:~openerp-dev/openobject-addons/trunk-stock_picking_usability.
=== modified file 'purchase/purchase.py'
--- purchase/purchase.py 2012-03-30 09:08:37 +0000
+++ purchase/purchase.py 2012-04-02 10:05:30 +0000
@@ -427,7 +427,6 @@
'name': self.pool.get('ir.sequence').get(cr, uid, 'stock.picking.in'),
'origin': order.name + ((order.origin and (':' + order.origin)) or ''),
'date': order.date_order,
- 'type': 'in',
'partner_id': order.dest_address_id.id or order.partner_id.id,
'invoice_state': '2binvoiced' if order.invoice_method == 'picking' else 'none',
'purchase_id': order.id,
=== modified file 'stock/stock.py'
--- stock/stock.py 2012-04-02 05:24:07 +0000
+++ stock/stock.py 2012-04-02 10:05:30 +0000
@@ -675,7 +675,7 @@
_sql_constraints = [
('name_uniq', 'unique(name, company_id)', 'Reference must be unique per Company!'),
]
-
+
def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False, submenu=False):
if context is None:
context = {}
@@ -722,7 +722,7 @@
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 @@
_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):
@@ -889,10 +889,13 @@
#TOFIX: assignment of move lines should be call before testing assigment otherwise picking never gone in assign state
ok = True
for pick in self.browse(cr, uid, ids):
- if pick.type == 'in':
- return True
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):
=== modified file 'stock/stock_view.xml'
--- stock/stock_view.xml 2012-04-02 05:24:07 +0000
+++ stock/stock_view.xml 2012-04-02 10:05:30 +0000
@@ -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>
=== modified file 'stock/stock_workflow.xml'
--- stock/stock_workflow.xml 2011-12-28 09:16:24 +0000
+++ stock/stock_workflow.xml 2012-04-02 10:05:30 +0000
@@ -51,11 +51,12 @@
<field name="act_to" ref="act_confirmed"/>
<field name="signal">button_confirm</field>
</record>
+
<record id="trans_confirmed_assigned_back" model="workflow.transition">
<field name="act_from" ref="act_assigned"/>
<field name="act_to" ref="act_confirmed"/>
<field name="condition">not test_assigned()</field>
- </record>
+ </record>
<record id="trans_confirmed_assigned" model="workflow.transition">
<field name="act_from" ref="act_confirmed"/>
<field name="act_to" ref="act_assigned"/>
_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help : https://help.launchpad.net/ListHelp