Merge lp:~lin-yu/purchase-wkfl/add_purchase_po_price into lp:~purchase-core-editors/purchase-wkfl/7.0
- add_purchase_po_price
- Merge into 7.0
Status: | Work in progress |
---|---|
Proposed branch: | lp:~lin-yu/purchase-wkfl/add_purchase_po_price |
Merge into: | lp:~purchase-core-editors/purchase-wkfl/7.0 |
Diff against target: |
364 lines (+335/-0) 5 files modified
purchase_po_price/__init__.py (+23/-0) purchase_po_price/__openerp__.py (+42/-0) purchase_po_price/i18n/zh_CN.po (+89/-0) purchase_po_price/purchase.py (+113/-0) purchase_po_price/purchase_view.xml (+68/-0) |
To merge this branch: | bzr merge lp:~lin-yu/purchase-wkfl/add_purchase_po_price |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Pedro Manuel Baeza | Needs Resubmitting | ||
Joël Grand-Guillaume @ camptocamp | code review, functionnal | Needs Information | |
Review via email: mp+180792@code.launchpad.net |
Commit message
Description of the change
[ADD] Purchase PO Price Control Module
* Enable/Disable control on PO Price
Joël Grand-Guillaume @ camptocamp (jgrandguillaume-c2c) wrote : | # |
LIN Yu (lin-yu) wrote : | # |
Dear Joël,
Thanks for your reply.
I will work on it and make it more clear.
BR,
On 09/11/2013 10:57 PM, Joël Grand-Guillaume @ camptocamp wrote:
> Review: Needs Information code review, functionnal
>
> Hi Lin,
>
> Thanks for the contribution ! A got some stuff I'm not sure about in this module.
>
> 1) The description only mention "Enable/Disable control on PO Price" it's a bit too short.
>
> 2) Lots of other fields (I mean not related to the control of price) is present on PO Line, like qty_received, qty_unreceived,.. Those field do not seems to me related to the purpose of the module.. I don't actually know if it really make sens to have them here. Any pointer ?
>
> 3) Field like modify_price do not seems to be used, sequence serve another purpose than the one I see in this module
>
> What I suggest is that you firstly make a better explanation of the purpose and use of the module. Once done, we can discuss further on what to let in there and what not. On my own opinion, this module should only forbid to change the price in PO if not allowed for this supplier.
>
> Best regards,
>
>
--
LIN Yu
LIN Yu
/Project Manager/
--
*Elico Corporation, Shanghai
/OpenERP Premium Certified Training Partner/ *
Cell: + 86 186 1691 1351
Office: + 86 21 6211 8017/27
Skype: llccluf
<email address hidden> <mailto:<email address hidden>>
http://
Elico Corp
Guewen Baconnier @ Camptocamp (gbaconnier-c2c) wrote : | # |
> Dear Joël,
> Thanks for your reply.
> I will work on it and make it more clear.
>
> BR,
Hi,
So I change your proposal to 'work in progress'. Please set it back to 'Needs review' when you are done.
Pedro Manuel Baeza (pedro.baeza) wrote : | # |
This project is now hosted on https:/
Preview Diff
1 | === added directory 'purchase_po_price' | |||
2 | === added file 'purchase_po_price/__init__.py' | |||
3 | --- purchase_po_price/__init__.py 1970-01-01 00:00:00 +0000 | |||
4 | +++ purchase_po_price/__init__.py 2013-08-19 07:16:14 +0000 | |||
5 | @@ -0,0 +1,23 @@ | |||
6 | 1 | # -*- coding: utf-8 -*- | ||
7 | 2 | ############################################################################## | ||
8 | 3 | # | ||
9 | 4 | # OpenERP, Open Source Management Solution | ||
10 | 5 | # Copyright (c) 2010-2013 Elico Corp. All Rights Reserved. | ||
11 | 6 | # Author: Jean LELIEVRE <jean.lelievre@elico-corp.com> | ||
12 | 7 | # | ||
13 | 8 | # This program is free software: you can redistribute it and/or modify | ||
14 | 9 | # it under the terms of the GNU Affero General Public License as | ||
15 | 10 | # published by the Free Software Foundation, either version 3 of the | ||
16 | 11 | # License, or (at your option) any later version. | ||
17 | 12 | # | ||
18 | 13 | # This program is distributed in the hope that it will be useful, | ||
19 | 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
20 | 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
21 | 16 | # GNU Affero General Public License for more details. | ||
22 | 17 | # | ||
23 | 18 | # You should have received a copy of the GNU Affero General Public License | ||
24 | 19 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
25 | 20 | # | ||
26 | 21 | ############################################################################## | ||
27 | 22 | |||
28 | 23 | import purchase | ||
29 | 0 | \ No newline at end of file | 24 | \ No newline at end of file |
30 | 1 | 25 | ||
31 | === added file 'purchase_po_price/__openerp__.py' | |||
32 | --- purchase_po_price/__openerp__.py 1970-01-01 00:00:00 +0000 | |||
33 | +++ purchase_po_price/__openerp__.py 2013-08-19 07:16:14 +0000 | |||
34 | @@ -0,0 +1,42 @@ | |||
35 | 1 | # -*- coding: utf-8 -*- | ||
36 | 2 | ############################################################################## | ||
37 | 3 | # | ||
38 | 4 | # OpenERP, Open Source Management Solution | ||
39 | 5 | # Copyright (c) 2010-2013 Elico Corp. All Rights Reserved. | ||
40 | 6 | # Author: Jean LELIEVRE <jean.lelievre@elico-corp.com> | ||
41 | 7 | # | ||
42 | 8 | # This program is free software: you can redistribute it and/or modify | ||
43 | 9 | # it under the terms of the GNU Affero General Public License as | ||
44 | 10 | # published by the Free Software Foundation, either version 3 of the | ||
45 | 11 | # License, or (at your option) any later version. | ||
46 | 12 | # | ||
47 | 13 | # This program is distributed in the hope that it will be useful, | ||
48 | 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
49 | 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
50 | 16 | # GNU Affero General Public License for more details. | ||
51 | 17 | # | ||
52 | 18 | # You should have received a copy of the GNU Affero General Public License | ||
53 | 19 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
54 | 20 | # | ||
55 | 21 | ############################################################################## | ||
56 | 22 | |||
57 | 23 | { | ||
58 | 24 | 'name': 'Purchase PO Price', | ||
59 | 25 | 'version': '1.0', | ||
60 | 26 | 'category': 'Purchase', | ||
61 | 27 | 'sequence': 19, | ||
62 | 28 | 'summary': 'Purchase PO Price', | ||
63 | 29 | 'description': """ Enable/Disable control on PO Price """, | ||
64 | 30 | 'author': 'Elico Corp', | ||
65 | 31 | 'website': 'http://www.elico-corp.com', | ||
66 | 32 | 'images' : [], | ||
67 | 33 | 'depends': ['purchase'], | ||
68 | 34 | 'data': [ | ||
69 | 35 | 'purchase_view.xml', | ||
70 | 36 | ], | ||
71 | 37 | 'test': [], | ||
72 | 38 | 'demo': [], | ||
73 | 39 | 'installable': True, | ||
74 | 40 | 'auto_install': False, | ||
75 | 41 | 'application': False, | ||
76 | 42 | } | ||
77 | 0 | \ No newline at end of file | 43 | \ No newline at end of file |
78 | 1 | 44 | ||
79 | === added directory 'purchase_po_price/i18n' | |||
80 | === added file 'purchase_po_price/i18n/zh_CN.po' | |||
81 | --- purchase_po_price/i18n/zh_CN.po 1970-01-01 00:00:00 +0000 | |||
82 | +++ purchase_po_price/i18n/zh_CN.po 2013-08-19 07:16:14 +0000 | |||
83 | @@ -0,0 +1,89 @@ | |||
84 | 1 | # Translation of OpenERP Server. | ||
85 | 2 | # This file contains the translation of the following modules: | ||
86 | 3 | # * purchase_po_price | ||
87 | 4 | # | ||
88 | 5 | msgid "" | ||
89 | 6 | msgstr "" | ||
90 | 7 | "Project-Id-Version: OpenERP Server 7.0\n" | ||
91 | 8 | "Report-Msgid-Bugs-To: \n" | ||
92 | 9 | "POT-Creation-Date: 2013-08-14 09:02+0000\n" | ||
93 | 10 | "PO-Revision-Date: 2013-08-14 09:02+0000\n" | ||
94 | 11 | "Last-Translator: <>\n" | ||
95 | 12 | "Language-Team: \n" | ||
96 | 13 | "MIME-Version: 1.0\n" | ||
97 | 14 | "Content-Type: text/plain; charset=UTF-8\n" | ||
98 | 15 | "Content-Transfer-Encoding: \n" | ||
99 | 16 | "Plural-Forms: \n" | ||
100 | 17 | |||
101 | 18 | #. module: purchase_po_price | ||
102 | 19 | #: code:addons/purchase_po_price/purchase.py:105 | ||
103 | 20 | #, python-format | ||
104 | 21 | msgid "You can not modify the price of this product sold by this supplier !" | ||
105 | 22 | msgstr "You can not modify the price of this product sold by this supplier !" | ||
106 | 23 | |||
107 | 24 | #. module: purchase_po_price | ||
108 | 25 | #: model:ir.model,name:purchase_po_price.model_purchase_order_line | ||
109 | 26 | msgid "Purchase Order Line" | ||
110 | 27 | msgstr "采购订单明细" | ||
111 | 28 | |||
112 | 29 | #. module: purchase_po_price | ||
113 | 30 | #: field:purchase.order.line,amount_subtotal:0 | ||
114 | 31 | msgid "Subtotal(Inc. Tax)" | ||
115 | 32 | msgstr "小计(含税)" | ||
116 | 33 | |||
117 | 34 | #. module: purchase_po_price | ||
118 | 35 | #: field:purchase.order.line,modify_price:0 | ||
119 | 36 | msgid "Modify Price" | ||
120 | 37 | msgstr "修改价格" | ||
121 | 38 | |||
122 | 39 | #. module: purchase_po_price | ||
123 | 40 | #: field:purchase.order.line,qty_received:0 | ||
124 | 41 | msgid "Reception Qty" | ||
125 | 42 | msgstr "已收货数量" | ||
126 | 43 | |||
127 | 44 | #. module: purchase_po_price | ||
128 | 45 | #: field:purchase.order.line,sequence:0 | ||
129 | 46 | msgid "Sequence" | ||
130 | 47 | msgstr "序号" | ||
131 | 48 | |||
132 | 49 | #. module: purchase_po_price | ||
133 | 50 | #: code:addons/purchase_po_price/purchase.py:105 | ||
134 | 51 | #, python-format | ||
135 | 52 | msgid "PO Price" | ||
136 | 53 | msgstr "PO Price" | ||
137 | 54 | |||
138 | 55 | #. module: purchase_po_price | ||
139 | 56 | #: field:purchase.order.line,qty_unreceived:0 | ||
140 | 57 | msgid "Waiting Qty" | ||
141 | 58 | msgstr "待收货数量" | ||
142 | 59 | |||
143 | 60 | #. module: purchase_po_price | ||
144 | 61 | #: view:purchase.order:0 | ||
145 | 62 | msgid "Purchase Order Lines" | ||
146 | 63 | msgstr "采购订单明细" | ||
147 | 64 | |||
148 | 65 | #. module: purchase_po_price | ||
149 | 66 | #: field:purchase.order.line,price_unit_original:0 | ||
150 | 67 | msgid "Original Unit Price" | ||
151 | 68 | msgstr "原始单价" | ||
152 | 69 | |||
153 | 70 | #. module: purchase_po_price | ||
154 | 71 | #: model:ir.model,name:purchase_po_price.model_res_partner | ||
155 | 72 | msgid "Partner" | ||
156 | 73 | msgstr "业务伙伴" | ||
157 | 74 | |||
158 | 75 | #. module: purchase_po_price | ||
159 | 76 | #: help:res.partner,po_price_modification_limit:0 | ||
160 | 77 | msgid "If checked, allows you to change the price in PO (only when either the Supplier or Product allow it)" | ||
161 | 78 | msgstr "若选择, 允许你在采购上修改单价(在供应商或者产品上设置一个即可)" | ||
162 | 79 | |||
163 | 80 | #. module: purchase_po_price | ||
164 | 81 | #: help:purchase.order.line,sequence:0 | ||
165 | 82 | msgid "Sequence for order in view and print report" | ||
166 | 83 | msgstr "用于视图和报表中的序号" | ||
167 | 84 | |||
168 | 85 | #. module: purchase_po_price | ||
169 | 86 | #: field:res.partner,po_price_modification_limit:0 | ||
170 | 87 | msgid "No control on PO price" | ||
171 | 88 | msgstr "不控采购单价" | ||
172 | 89 | |||
173 | 0 | 90 | ||
174 | === added file 'purchase_po_price/purchase.py' | |||
175 | --- purchase_po_price/purchase.py 1970-01-01 00:00:00 +0000 | |||
176 | +++ purchase_po_price/purchase.py 2013-08-19 07:16:14 +0000 | |||
177 | @@ -0,0 +1,113 @@ | |||
178 | 1 | # -*- coding: utf-8 -*- | ||
179 | 2 | ############################################################################## | ||
180 | 3 | # | ||
181 | 4 | # OpenERP, Open Source Management Solution | ||
182 | 5 | # Copyright (c) 2010-2013 Elico Corp. All Rights Reserved. | ||
183 | 6 | # Author: Jean LELIEVRE <jean.lelievre@elico-corp.com> | ||
184 | 7 | # | ||
185 | 8 | # This program is free software: you can redistribute it and/or modify | ||
186 | 9 | # it under the terms of the GNU Affero General Public License as | ||
187 | 10 | # published by the Free Software Foundation, either version 3 of the | ||
188 | 11 | # License, or (at your option) any later version. | ||
189 | 12 | # | ||
190 | 13 | # This program is distributed in the hope that it will be useful, | ||
191 | 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
192 | 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
193 | 16 | # GNU Affero General Public License for more details. | ||
194 | 17 | # | ||
195 | 18 | # You should have received a copy of the GNU Affero General Public License | ||
196 | 19 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
197 | 20 | # | ||
198 | 21 | ############################################################################## | ||
199 | 22 | |||
200 | 23 | from osv import osv, fields | ||
201 | 24 | from tools.translate import _ | ||
202 | 25 | import openerp.addons.decimal_precision as dp | ||
203 | 26 | |||
204 | 27 | class res_partner(osv.osv): | ||
205 | 28 | _name = 'res.partner' | ||
206 | 29 | _inherit = 'res.partner' | ||
207 | 30 | |||
208 | 31 | _columns = { | ||
209 | 32 | 'po_price_modification_limit':fields.boolean("No control on PO price", help="""If checked, allows you to change the price in PO (only when either the Supplier or Product allow it)"""), | ||
210 | 33 | } | ||
211 | 34 | |||
212 | 35 | _defaults = { | ||
213 | 36 | 'po_price_modification_limit': True, | ||
214 | 37 | } | ||
215 | 38 | res_partner() | ||
216 | 39 | |||
217 | 40 | class purchase_order_line(osv.osv): | ||
218 | 41 | _inherit = 'purchase.order.line' | ||
219 | 42 | |||
220 | 43 | _order = 'order_id desc, sequence' | ||
221 | 44 | |||
222 | 45 | def _amount_line_with_tax(self, cr, uid, ids, prop, arg, context=None): | ||
223 | 46 | res = {} | ||
224 | 47 | cur_obj = self.pool.get('res.currency') | ||
225 | 48 | tax_obj = self.pool.get('account.tax') | ||
226 | 49 | for line in self.browse(cr, uid, ids, context=context): | ||
227 | 50 | taxes = tax_obj.compute_all(cr, uid, line.taxes_id, line.price_unit, line.product_qty, line.product_id, line.order_id.partner_id, force_excluded=True) | ||
228 | 51 | cur = line.order_id.pricelist_id.currency_id | ||
229 | 52 | res[line.id] = cur_obj.round(cr, uid, cur, taxes['total']) | ||
230 | 53 | return res | ||
231 | 54 | |||
232 | 55 | def _qty_received(self, cr, uid, ids, prop, arg, context=None): | ||
233 | 56 | res = {} | ||
234 | 57 | for line in self.browse(cr, uid, ids, context=context): | ||
235 | 58 | qty = 0.0 | ||
236 | 59 | for move in line.move_ids: | ||
237 | 60 | if move.state == 'done': | ||
238 | 61 | qty += move.product_qty | ||
239 | 62 | res[line.id] = qty | ||
240 | 63 | return res | ||
241 | 64 | |||
242 | 65 | def _qty_unreceived(self, cr, uid, ids, prop, arg, context=None): | ||
243 | 66 | res = {} | ||
244 | 67 | for line in self.browse(cr, uid, ids, context=context): | ||
245 | 68 | qty = 0.0 | ||
246 | 69 | for move in line.move_ids: | ||
247 | 70 | if move.state not in ('done', 'cancel'): | ||
248 | 71 | qty += move.product_qty | ||
249 | 72 | res[line.id] = qty | ||
250 | 73 | return res | ||
251 | 74 | |||
252 | 75 | _columns = { | ||
253 | 76 | 'modify_price': fields.boolean('Modify Price'), | ||
254 | 77 | 'sequence': fields.integer('Sequence', help="Sequence for order in view and print report"), | ||
255 | 78 | 'amount_subtotal': fields.function(_amount_line_with_tax, string='Subtotal(Inc. Tax)', type='float', digits_compute=dp.get_precision('Account')), | ||
256 | 79 | 'qty_received': fields.function(_qty_received, string='Reception Qty', type='float', digits_compute=dp.get_precision('Product Unit of Measure')), | ||
257 | 80 | 'qty_unreceived': fields.function(_qty_unreceived, string='Waiting Qty', type='float', digits_compute=dp.get_precision('Product Unit of Measure')), | ||
258 | 81 | 'price_unit_original': fields.float('Original Unit Price', digits_compute=dp.get_precision('Product Price')), | ||
259 | 82 | #'price_unit_exclude_tax': fields.function(_price_unit_line_without_tax, string='Unit Price(Exc. Tax)', type='float', digits_compute=dp.get_precision('Product Price')), | ||
260 | 83 | } | ||
261 | 84 | _defaults = { | ||
262 | 85 | 'sequence': 1, | ||
263 | 86 | 'modify_price': False, | ||
264 | 87 | } | ||
265 | 88 | |||
266 | 89 | |||
267 | 90 | def onchange_price_unit(self, cr, uid, ids, partner_id, product_id, price_unit_original, price_unit, context=None): | ||
268 | 91 | #Not use at the moment! add a readonly attribute in view definition! | ||
269 | 92 | context = context or {} | ||
270 | 93 | res = {} | ||
271 | 94 | |||
272 | 95 | if not partner_id and not product_id: | ||
273 | 96 | return res | ||
274 | 97 | product = self.pool.get('product.product').browse(cr, uid, product_id, context=context) | ||
275 | 98 | partner = self.pool.get('res.partner').browse(cr, uid, partner_id, context=context) | ||
276 | 99 | |||
277 | 100 | #if purchase_config_settings.po_price_modification_limit: | ||
278 | 101 | #if not product.po_price_modification_limit and not partner.po_price_modification_limit and price_unit_original != price_unit: | ||
279 | 102 | if not partner.po_price_modification_limit: | ||
280 | 103 | |||
281 | 104 | res['value'] = {'price_unit': price_unit_original} | ||
282 | 105 | res['warning'] = {'title' : _('PO Price'), 'message' : _('You can not modify the price of this product sold by this supplier !')} | ||
283 | 106 | #raise osv.except_osv(_('Error!'), _('You can not modify the price of this product sold by this supplier !')) | ||
284 | 107 | else: | ||
285 | 108 | res['value'] = {'price_unit_original':price_unit} | ||
286 | 109 | #ENDIF | ||
287 | 110 | |||
288 | 111 | return res | ||
289 | 112 | |||
290 | 113 | purchase_order_line() | ||
291 | 0 | 114 | ||
292 | === added file 'purchase_po_price/purchase_view.xml' | |||
293 | --- purchase_po_price/purchase_view.xml 1970-01-01 00:00:00 +0000 | |||
294 | +++ purchase_po_price/purchase_view.xml 2013-08-19 07:16:14 +0000 | |||
295 | @@ -0,0 +1,68 @@ | |||
296 | 1 | <?xml version="1.0" encoding="UTF-8"?> | ||
297 | 2 | <openerp> | ||
298 | 3 | <data> | ||
299 | 4 | |||
300 | 5 | <record id="view_partner_form_joomla" model="ir.ui.view"> | ||
301 | 6 | <field name="name">res.partner.form.FC</field> | ||
302 | 7 | <field name="model">res.partner</field> | ||
303 | 8 | <field name="type">form</field> | ||
304 | 9 | <field name="inherit_id" ref="base.view_partner_form" /> | ||
305 | 10 | <field name="arch" type="xml"> | ||
306 | 11 | <xpath expr="//field[@name='customer']" position="after"> | ||
307 | 12 | |||
308 | 13 | <field name="po_price_modification_limit" attrs="{'invisible':[('supplier','!=',True)]}"/> | ||
309 | 14 | |||
310 | 15 | <!-- <field name="supplier_product_limit" attrs="{'invisible':[('supplier','!=',True)]}"/> --> | ||
311 | 16 | |||
312 | 17 | </xpath> | ||
313 | 18 | </field> | ||
314 | 19 | </record> | ||
315 | 20 | |||
316 | 21 | <!-- <record id="product_normal_form_view_FC" model="ir.ui.view"> | ||
317 | 22 | <field name="name">product.normal.form.FC</field> | ||
318 | 23 | <field name="model">product.product</field> | ||
319 | 24 | <field name="type">form</field> | ||
320 | 25 | <field name="inherit_id" ref="product.product_normal_form_view" /> | ||
321 | 26 | <field name="arch" type="xml"> | ||
322 | 27 | <xpath expr="//field[@name='uom_po_id']" position="after"> | ||
323 | 28 | <field name="po_price_modification_limit"/> | ||
324 | 29 | </xpath> | ||
325 | 30 | </field> | ||
326 | 31 | </record> --> | ||
327 | 32 | |||
328 | 33 | <!-- Purchase Order --> | ||
329 | 34 | <record id="purchase_order_form_fc" model="ir.ui.view"> | ||
330 | 35 | <field name="name">purchase.order.form_FC</field> | ||
331 | 36 | <field name="model">purchase.order</field> | ||
332 | 37 | <field name="type">form</field> | ||
333 | 38 | <field name="inherit_id" ref="purchase.purchase_order_form"/> | ||
334 | 39 | <field name="arch" type="xml"> | ||
335 | 40 | <xpath expr="//field[@name='order_line']" position="replace"> | ||
336 | 41 | <field name="order_line"> | ||
337 | 42 | <tree string="Purchase Order Lines" editable="bottom"> | ||
338 | 43 | |||
339 | 44 | <!-- field name="sequence"/>< by Andy--> | ||
340 | 45 | <field name="modify_price" invisible="1"/> | ||
341 | 46 | <!-- <field name="product_id" on_change="onchange_product_id(parent.pricelist_id,product_id,0,product_uom,parent.partner_id, parent.date_order,parent.fiscal_position,date_planned,name,price_unit,context)" context="{'supplier_id': parent.partner_id}"/> --> | ||
342 | 47 | <field name="name"/> | ||
343 | 48 | <field name="date_planned"/> | ||
344 | 49 | <field name="company_id" groups="base.group_multi_company" widget="selection"/> | ||
345 | 50 | <field name="account_analytic_id" groups="purchase.group_analytic_accounting" domain="[('parent_id','!=',False)]"/> | ||
346 | 51 | <field name="product_qty" on_change="onchange_product_id(parent.pricelist_id,product_id,product_qty,product_uom,parent.partner_id,parent.date_order,parent.fiscal_position,date_planned,name,price_unit,context)"/> | ||
347 | 52 | <field name="product_uom" groups="product.group_uom" on_change="onchange_product_uom(parent.pricelist_id,product_id,product_qty,product_uom,parent.partner_id, parent.date_order,parent.fiscal_position,date_planned,name,price_unit,context)"/> | ||
348 | 53 | <!--field name="price_unit" attrs="{'readonly':[('modify_price','=',True)]}"/--> | ||
349 | 54 | <field name="price_unit_original" invisible="1"/> | ||
350 | 55 | <field name="price_unit" on_change="onchange_price_unit(parent.partner_id,product_id,price_unit_original,price_unit,context)"/> | ||
351 | 56 | <field name="taxes_id" widget="many2many_tags" domain="[('parent_id','=',False),('type_tax_use','!=','sale')]"/> | ||
352 | 57 | <!-- <field name="price_unit_exclude_tax"/> --> | ||
353 | 58 | <field name="price_subtotal" invisible="1"/> | ||
354 | 59 | <field name="amount_subtotal"/><!-- by Andy--> | ||
355 | 60 | |||
356 | 61 | </tree> | ||
357 | 62 | </field> | ||
358 | 63 | </xpath> | ||
359 | 64 | </field> | ||
360 | 65 | </record> | ||
361 | 66 | |||
362 | 67 | </data> | ||
363 | 68 | </openerp> | ||
364 | 0 | \ No newline at end of file | 69 | \ No newline at end of file |
Hi Lin,
Thanks for the contribution ! A got some stuff I'm not sure about in this module.
1) The description only mention "Enable/Disable control on PO Price" it's a bit too short.
2) Lots of other fields (I mean not related to the control of price) is present on PO Line, like qty_received, qty_unreceived,.. Those field do not seems to me related to the purpose of the module.. I don't actually know if it really make sens to have them here. Any pointer ?
3) Field like modify_price do not seems to be used, sequence serve another purpose than the one I see in this module
What I suggest is that you firstly make a better explanation of the purpose and use of the module. Once done, we can discuss further on what to let in there and what not. On my own opinion, this module should only forbid to change the price in PO if not allowed for this supplier.
Best regards,