openerp-community-reviewer team mailing list archive
-
openerp-community-reviewer team
-
Mailing list archive
-
Message #04706
[Merge] lp:~camptocamp/stock-logistic-flows/70-improve-dispatch-jge into lp:stock-logistic-flows
Yannick Vaucher @ Camptocamp has proposed merging lp:~camptocamp/stock-logistic-flows/70-improve-dispatch-jge into lp:stock-logistic-flows.
Requested reviews:
Stock and Logistic Core Editors (stock-logistic-core-editors)
For more details, see:
https://code.launchpad.net/~camptocamp/stock-logistic-flows/70-improve-dispatch-jge/+merge/210598
--
https://code.launchpad.net/~camptocamp/stock-logistic-flows/70-improve-dispatch-jge/+merge/210598
Your team Stock and Logistic Core Editors is requested to review the proposed merge of lp:~camptocamp/stock-logistic-flows/70-improve-dispatch-jge into lp:stock-logistic-flows.
=== modified file 'picking_dispatch/picking_dispatch.py'
--- picking_dispatch/picking_dispatch.py 2014-03-12 13:00:51 +0000
+++ picking_dispatch/picking_dispatch.py 2014-03-12 13:05:41 +0000
@@ -299,6 +299,31 @@
}
+class StockPickingIn(Model):
+ _inherit = "stock.picking.in"
+
+ def _get_related_dispatch(self, cr, uid, ids, field_names, arg=None, context=None):
+ return super(StockPickingIn, self)._get_related_dispatch(cr, uid, ids, field_names, arg=arg, context=context)
+
+ _columns = {
+ 'related_dispatch_ids': fields.function(_get_related_dispatch, method=True, type='one2many',
+ relation='picking.dispatch', string='Related Dispatch Picking'),
+ }
+
+
+class StockPickingOut(Model):
+ _inherit = "stock.picking.out"
+
+ def _get_related_dispatch(self, cr, uid, ids, field_names, arg=None, context=None):
+ return super(StockPickingOut, self)._get_related_dispatch(cr, uid, ids, field_names, arg=arg, context=context)
+
+ _columns = {
+ 'related_dispatch_ids': fields.function(_get_related_dispatch, method=True, type='one2many',
+ relation='picking.dispatch', string='Related Dispatch Picking'),
+ }
+
+
+
class Product(Model):
_inherit = "product.product"
=== modified file 'picking_dispatch/picking_dispatch_view.xml'
--- picking_dispatch/picking_dispatch_view.xml 2014-03-04 13:13:03 +0000
+++ picking_dispatch/picking_dispatch_view.xml 2014-03-12 13:05:41 +0000
@@ -123,7 +123,7 @@
<!-- Stock Out picking : add dispatch infos -->
<record id="view_picking_form" model="ir.ui.view">
<field name="name">stock.picking.form.dispatch.out</field>
- <field name="model">stock.picking</field>
+ <field name="model">stock.picking.out</field>
<field name="inherit_id" ref="stock.view_picking_out_form"/>
<field name="type">form</field>
<field name="arch" type="xml">
@@ -153,7 +153,7 @@
<!-- Stock In picking : add dispatch infos -->
<record id="view_picking_form_in" model="ir.ui.view">
<field name="name">stock.picking.form.dispatch.in</field>
- <field name="model">stock.picking</field>
+ <field name="model">stock.picking.in</field>
<field name="inherit_id" ref="stock.view_picking_in_form"/>
<field name="type">form</field>
<field name="arch" type="xml">
Follow ups