Merge lp:~kinner-vachhani/sale-wkfl/lp-1317035 into lp:~sale-core-editors/sale-wkfl/7.0

Proposed by Kinner Vachhani
Status: Needs review
Proposed branch: lp:~kinner-vachhani/sale-wkfl/lp-1317035
Merge into: lp:~sale-core-editors/sale-wkfl/7.0
Diff against target: 40 lines (+14/-2)
2 files modified
sale_dropshipping/sale.py (+12/-0)
sale_dropshipping/sale_view.xml (+2/-2)
To merge this branch: bzr merge lp:~kinner-vachhani/sale-wkfl/lp-1317035
Reviewer Review Type Date Requested Status
Pedro Manuel Baeza Needs Resubmitting
Review via email: mp+223877@code.launchpad.net

Description of the change

changing sale flow to drop shipping does not work

To post a comment you must log in.
Revision history for this message
Pedro Manuel Baeza (pedro.baeza) wrote :

This project is now hosted on https://github.com/OCA/sale-workflow. Please move your proposal there. This guide may help you https://github.com/OCA/maintainers-tools/wiki/How-to-move-a-Merge-Proposal-to-GitHub

review: Needs Resubmitting

Unmerged revisions

46. By Kinner Vachhani

[Fix] changing sale flow to drop shipping does not work

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'sale_dropshipping/sale.py'
--- sale_dropshipping/sale.py 2014-03-21 14:55:59 +0000
+++ sale_dropshipping/sale.py 2014-06-20 09:16:04 +0000
@@ -60,6 +60,18 @@
60 result[order_line.id] = po_line_ids and po_line_ids[0] or False60 result[order_line.id] = po_line_ids and po_line_ids[0] or False
61 return result61 return result
6262
63 def onchange_sale_flow(self, cr, uid, ids, sale_flow, product_id, context=None):
64 """ Change type to make_to_order when sale_flow is direct_delivery """
65
66 vals = {}
67 if product_id:
68 if sale_flow == 'direct_delivery':
69 vals['type'] = 'make_to_order'
70 else:
71 vals['type'] = self.pool.get('product.product').browse(cr,uid,product_id).procure_method
72 return {'value': vals}
73
74
63 _columns = {75 _columns = {
64 'sale_flow': fields.selection([('normal', 'Normal'),76 'sale_flow': fields.selection([('normal', 'Normal'),
65 ('direct_delivery', 'Drop Shipping'),77 ('direct_delivery', 'Drop Shipping'),
6678
=== modified file 'sale_dropshipping/sale_view.xml'
--- sale_dropshipping/sale_view.xml 2013-09-06 10:40:30 +0000
+++ sale_dropshipping/sale_view.xml 2014-06-20 09:16:04 +0000
@@ -19,11 +19,11 @@
19 <field name="inherit_id" ref="sale.view_order_form" />19 <field name="inherit_id" ref="sale.view_order_form" />
20 <field name="arch" type="xml">20 <field name="arch" type="xml">
21 <xpath expr="/form/sheet//field[@name='order_line']/tree/field[@name='name']" position="before">21 <xpath expr="/form/sheet//field[@name='order_line']/tree/field[@name='name']" position="before">
22 <field name="sale_flow" />22 <field name="sale_flow" on_change="onchange_sale_flow(sale_flow, product_id, context)"/>
23 </xpath>23 </xpath>
24 <xpath expr="/form/sheet//field[@name='order_line']/form//label[@for='name']" position="before">24 <xpath expr="/form/sheet//field[@name='order_line']/form//label[@for='name']" position="before">
25 <group attrs="{'invisible': [('type', '=', 'make_to_stock')]}" colspan="2" cols="2">25 <group attrs="{'invisible': [('type', '=', 'make_to_stock')]}" colspan="2" cols="2">
26 <field name="sale_flow"/>26 <field name="sale_flow" on_change="onchange_sale_flow(sale_flow, product_id, context)"/>
27 <field name="purchase_order_line_id"/>27 <field name="purchase_order_line_id"/>
28 <field name="purchase_order_id" readonly="1"/>28 <field name="purchase_order_id" readonly="1"/>
29 <field name="purchase_order_state" readonly="1"/>29 <field name="purchase_order_state" readonly="1"/>

Subscribers

People subscribed via source and target branches