Merge lp:~lin-yu/purchase-wkfl/add_product_supplier_info into lp:~purchase-core-editors/purchase-wkfl/7.0
- add_product_supplier_info
- Merge into 7.0
Status: | Superseded |
---|---|
Proposed branch: | lp:~lin-yu/purchase-wkfl/add_product_supplier_info |
Merge into: | lp:~purchase-core-editors/purchase-wkfl/7.0 |
Diff against target: |
250 lines (+219/-0) 5 files modified
product_supplier_info/__init__.py (+24/-0) product_supplier_info/__openerp__.py (+52/-0) product_supplier_info/product.py (+56/-0) product_supplier_info/product_view.xml (+75/-0) product_supplier_info/static/description/index.html (+12/-0) |
To merge this branch: | bzr merge lp:~lin-yu/purchase-wkfl/add_product_supplier_info |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Pedro Manuel Baeza | Approve | ||
Guewen Baconnier @ Camptocamp | Needs Fixing | ||
LIN Yu | Pending | ||
Joël Grand-Guillaume @ camptocamp | code review, no tests | Pending | |
Review via email: mp+185197@code.launchpad.net |
This proposal supersedes a proposal from 2013-08-19.
This proposal has been superseded by a proposal from 2013-11-12.
Commit message
Description of the change
Add Module Product Supplier Info
* Modify Codes to adapt rules
* Add a specific View for Product Supplier
Joël Grand-Guillaume @ camptocamp (jgrandguillaume-c2c) wrote : Posted in a previous version of this proposal | # |
LIN Yu (lin-yu) wrote : Posted in a previous version of this proposal | # |
Dear Joël,
Thanks for your reply.
I have modified the code, resubmit the proposal.
BR,
> Dear Lin,
>
> Thanks for the contribs, a few remarks:
>
> * Line 139: no need to instantiate the class anymore, you can remove it
> * Line 110: from openerp.osv import orm, fields then use on line 115
> orm.Model
> * Line 136/137: Cust the line to 80 CHAR (pep8)
> * Line 124 to 131: You should better browse all records at once by using, and
> do not forget context=context:
>
> for id in ids:
> res[id] = {}.fromkeys(
> supplier_info = self.browse(cr, uid, id)
>
> Better:
>
> for record in self.browse(cr, ui, ids, context=context)
>
> Thank you,
>
> Regards,
>
> Joël
Joël Grand-Guillaume @ camptocamp (jgrandguillaume-c2c) wrote : Posted in a previous version of this proposal | # |
Dear Lyn,
Thanks you for the corrections ! A little tips about Launchpad, you should not make a "Resubmit" yourself, because now, you're a reviewer of your own MP. Nothing important, just to let you know. Better in that case, just commit the changes, push and make a simple comment in the thread about it, like : It's corrected :)
The code looks fine to me now, it would be very much appreciated to have the infos of the index.html in the description of the __openerp__.py file => lots of people look at it to know more on a module, can you add that to it :
"""
This module categorizes each product item by supplier.It allows for users to be able to view a compiled list of products supplied by the supplier. Users can also directly add new products to the supplier's list.
"""
Thanks a lot, this little module looks very useful to me !
Regards,
Joël
LIN Yu (lin-yu) wrote : Posted in a previous version of this proposal | # |
Hi Joël ,
The description is corrected.
Thanks for your quick reply and explanation. I will follow that.
BR,
On 09/12/2013 04:39 PM, Joël Grand-Guillaume @ camptocamp wrote:
> Review: Needs Fixing code review, no tests
>
> Dear Lyn,
>
>
> Thanks you for the corrections ! A little tips about Launchpad, you should not make a "Resubmit" yourself, because now, you're a reviewer of your own MP. Nothing important, just to let you know. Better in that case, just commit the changes, push and make a simple comment in the thread about it, like : It's corrected :)
>
> The code looks fine to me now, it would be very much appreciated to have the infos of the index.html in the description of the __openerp__.py file => lots of people look at it to know more on a module, can you add that to it :
>
> """
> This module categorizes each product item by supplier.It allows for users to be able to view a compiled list of products supplied by the supplier. Users can also directly add new products to the supplier's list.
> """
>
> Thanks a lot, this little module looks very useful to me !
>
> Regards,
>
> Joël
>
--
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
LIN Yu (lin-yu) wrote : Posted in a previous version of this proposal | # |
Hi Joël,
The description is updated.
Thanks for your explanation. I will get used to it.
BR,
On 09/12/2013 04:39 PM, Joël Grand-Guillaume @ camptocamp wrote:
> Review: Needs Fixing code review, no tests
>
> Dear Lyn,
>
>
> Thanks you for the corrections ! A little tips about Launchpad, you should not make a "Resubmit" yourself, because now, you're a reviewer of your own MP. Nothing important, just to let you know. Better in that case, just commit the changes, push and make a simple comment in the thread about it, like : It's corrected :)
>
> The code looks fine to me now, it would be very much appreciated to have the infos of the index.html in the description of the __openerp__.py file => lots of people look at it to know more on a module, can you add that to it :
>
> """
> This module categorizes each product item by supplier.It allows for users to be able to view a compiled list of products supplied by the supplier. Users can also directly add new products to the supplier's list.
> """
>
> Thanks a lot, this little module looks very useful to me !
>
> Regards,
>
> Joël
>
--
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
Joël Grand-Guillaume @ camptocamp (jgrandguillaume-c2c) wrote : Posted in a previous version of this proposal | # |
Hi Lin,
Thanks for the corrections, it now LGTM. I mark it as approved, but I just saw one little thing more here :
0 + 'depends': ['product'
=> You should remove the comment about "joomlconnector", that doesn't make any sense I think
Regards,
Joël
Pedro Manuel Baeza (pedro.baeza) wrote : Posted in a previous version of this proposal | # |
Hi, Lin Yu, what a good contribution! Thank you.
Let me make some suggestions:
* Change menu name from 'Product suppliers' to 'Products by supplier'.
* For delivery time, it's better to make the average for the group total.
* With the new screen you have prepared, old view for entering supplier info from "Procurement" tab in "Product" form has been overwritten with two side effects:
a) There is a new field called "Product Name", that is the product_id that must be hidden and filled automatically by context.
b) There is no access to prices by quantities from this view when you select in Settings > Configuration > Purchases, "Manage pricelist per supplier".
On technical side, flake8 returns this output:
__init__.py:22:1: F401 'product' imported but unused
__init__.py:23:66: W292 no newline at end of file
__openerp_
__openerp_
__openerp_
__openerp_
__openerp_
product.py:24:1: F401 'tools' imported but unused
product.py:25:1: F401 '_' imported but unused
product.py:28:1: E302 expected 2 blank lines, found 1
product.py:30:1: W293 blank line contains whitespace
product.py:31:80: E501 line too long (90 > 79 characters)
product.py:45:1: W293 blank line contains whitespace
product.py:46:13: E225 missing whitespace around operator
product.py:47:21: E203 whitespace before ':'
product.py:47:80: E501 line too long (114 > 79 characters)
product.py:48:24: E203 whitespace before ':'
product.py:48:61: E231 missing whitespace after ','
product.py:48:80: E501 line too long (96 > 79 characters)
product.py:48:83: E231 missing whitespace after ','
product.py:49:21: E128 continuation line under-indented for visual indent
product.py:49:79: E231 missing whitespace after ','
product.py:49:80: E501 line too long (106 > 79 characters)
product.py:50:28: E203 whitespace before ':'
product.py:50:65: E231 missing whitespace after ','
product.py:50:80: E501 line too long (100 > 79 characters)
product.py:50:87: E231 missing whitespace after ','
product.py:51:21: E128 continuation line under-indented for visual indent
product.py:51:79: E231 missing whitespace after ','
product.py:51:80: E501 line too long (109 > 79 characters)
product.py:54:66: W292 no newline at end of file
product_
product_
product_
product_
product_
product_
product_
product_
product_
product_
product_
product_
product_
LIN Yu (lin-yu) wrote : | # |
Hi Pedro,
I have adapted the code with flake8 rule and changed the menu name.
For field 'product_name', I think it means 'supplier name', which is not in data product yet. So we should manual enter it.
BR,
Pedro Manuel Baeza (pedro.baeza) wrote : | # |
Hi Lin,
This is what I mean: this is the screen in Purchases > Products > Products before installing the module:
http://
And this is the aspect when you install the module:
http://
You can see that it appears the field called "Product Name", that corresponds to product_id, which has no sense in this screen. You aren't also be able to edit prices per quantities with your new screen. The solution is to inherit the form and define a lower priority, selecting explicitly that form on your menu action. Let me know if I can help you with code.
Another thing: please correct mixed indentations (tabs and spaces) on XML file.
Regards.
LIN Yu (lin-yu) wrote : | # |
Hi Pedro,
Thanks for your reply.
I have changed the view for the original supplier info in product form,
changed "product name" to product, corrected the indent space in XML file.
For the price, there are no price field in this object. Do you mean the
quantity field?
BTW, how can I do a average for field like 'lead time' in group by tree
view?
BR,
On 09/16/2013 09:25 PM, Pedro Manuel Baeza wrote:
> Review: Needs Fixing test
>
> Hi Lin,
>
> This is what I mean: this is the screen in Purchases > Products > Products before installing the module:
>
> http://
>
> And this is the aspect when you install the module:
>
> http://
>
> You can see that it appears the field called "Product Name", that corresponds to product_id, which has no sense in this screen. You aren't also be able to edit prices per quantities with your new screen. The solution is to inherit the form and define a lower priority, selecting explicitly that form on your menu action. Let me know if I can help you with code.
>
> Another thing: please correct mixed indentations (tabs and spaces) on XML file.
>
> 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
Pedro Manuel Baeza (pedro.baeza) wrote : | # |
Hi, Lin,
I have made an MP with some fixes to your branch. This is the summary:
- Put image as screenshot in module.
- Change image path.
- Remove in html description commercial references (this is by community agreement).
- Put all XML indentation as spaces.
- Remove overwrite of the product_id field to avoid future problems.
- Change function for retrieving data accordingly.
I have been trying to hide product_id field when you open the view from product form, but I can't get it, so for now I think is enough.
Thanks for your patience.
Regards.
Guewen Baconnier @ Camptocamp (gbaconnier-c2c) wrote : | # |
Hi,
l.127 the context is not propagated to the browse() method
LIN Yu (lin-yu) wrote : | # |
Code fixed. Proposal resubmitted.
On 11/11/2013 09:32 PM, Guewen Baconnier @ Camptocamp wrote:
> Review: Needs Fixing
>
> Hi,
>
> l.127 the context is not propagated to the browse() method
--
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
LIN Yu (lin-yu) wrote : | # |
Sorry for the resubmit. I am still not familiar with the process.
Pedro Manuel Baeza (pedro.baeza) wrote : | # |
Hi, Lin,
I think it's all OK for now, but I would change the module name to get a more significant one: for example, product_
Regards.
Unmerged revisions
Preview Diff
1 | === added directory 'product_supplier_info' |
2 | === added file 'product_supplier_info/__init__.py' |
3 | --- product_supplier_info/__init__.py 1970-01-01 00:00:00 +0000 |
4 | +++ product_supplier_info/__init__.py 2013-11-12 01:44:47 +0000 |
5 | @@ -0,0 +1,24 @@ |
6 | +# -*- coding: utf-8 -*- |
7 | +############################################################################## |
8 | +# |
9 | +# OpenERP, Open Source Management Solution |
10 | +# Copyright (c) 2010-2013 Elico Corp. All Rights Reserved. |
11 | +# Author: Yannick Gouin <yannick.gouin@elico-corp.com> |
12 | +# |
13 | +# This program is free software: you can redistribute it and/or modify |
14 | +# it under the terms of the GNU Affero General Public License as |
15 | +# published by the Free Software Foundation, either version 3 of the |
16 | +# License, or (at your option) any later version. |
17 | +# |
18 | +# This program is distributed in the hope that it will be useful, |
19 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
20 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
21 | +# GNU Affero General Public License for more details. |
22 | +# |
23 | +# You should have received a copy of the GNU Affero General Public License |
24 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. |
25 | +# |
26 | +############################################################################## |
27 | +from . import product |
28 | + |
29 | +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
30 | |
31 | === added file 'product_supplier_info/__openerp__.py' |
32 | --- product_supplier_info/__openerp__.py 1970-01-01 00:00:00 +0000 |
33 | +++ product_supplier_info/__openerp__.py 2013-11-12 01:44:47 +0000 |
34 | @@ -0,0 +1,52 @@ |
35 | +# -*- coding: utf-8 -*- |
36 | +############################################################################## |
37 | +# |
38 | +# OpenERP, Open Source Management Solution |
39 | +# Copyright (c) 2010-2013 Elico Corp. All Rights Reserved. |
40 | +# Author: LIN Yu <lin.yu@elico-corp.com> |
41 | +# |
42 | +# This program is free software: you can redistribute it and/or modify |
43 | +# it under the terms of the GNU Affero General Public License as |
44 | +# published by the Free Software Foundation, either version 3 of the |
45 | +# License, or (at your option) any later version. |
46 | +# |
47 | +# This program is distributed in the hope that it will be useful, |
48 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
49 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
50 | +# GNU Affero General Public License for more details. |
51 | +# |
52 | +# You should have received a copy of the GNU Affero General Public License |
53 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. |
54 | +# |
55 | +############################################################################## |
56 | + |
57 | +{ |
58 | + 'name': 'Product Supplier Info', |
59 | + 'version': '1.0', |
60 | + 'category': 'purchase', |
61 | + 'sequence': 19, |
62 | + 'summary': 'Product Supplier Info', |
63 | + 'description': """ |
64 | +This module categorizes each product item by supplier. |
65 | +====================================================== |
66 | +* It allows for users to be able to view a compiled list of products supplied \ |
67 | +by the supplier. |
68 | +* Users can also directly add new products to the supplier's list. |
69 | + """, |
70 | + 'author': 'Elico Corp', |
71 | + 'website': 'http://www.elico-corp.com', |
72 | + 'images': [ |
73 | + 'static/images/product_supplier_info.png' |
74 | + ], |
75 | + 'depends': ['product', 'stock'], |
76 | + 'data': [ |
77 | + 'product_view.xml', |
78 | + ], |
79 | + 'test': [], |
80 | + 'demo': [], |
81 | + 'installable': True, |
82 | + 'auto_install': False, |
83 | + 'application': False, |
84 | +} |
85 | + |
86 | +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
87 | |
88 | === added file 'product_supplier_info/product.py' |
89 | --- product_supplier_info/product.py 1970-01-01 00:00:00 +0000 |
90 | +++ product_supplier_info/product.py 2013-11-12 01:44:47 +0000 |
91 | @@ -0,0 +1,56 @@ |
92 | +# -*- coding: utf-8 -*- |
93 | +############################################################################## |
94 | +# |
95 | +# OpenERP, Open Source Management Solution |
96 | +# Copyright (c) 2010-2013 Elico Corp. All Rights Reserved. |
97 | +# Author: Yannick Gouin <yannick.gouin@elico-corp.com> |
98 | +# |
99 | +# This program is free software: you can redistribute it and/or modify |
100 | +# it under the terms of the GNU Affero General Public License as |
101 | +# published by the Free Software Foundation, either version 3 of the |
102 | +# License, or (at your option) any later version. |
103 | +# |
104 | +# This program is distributed in the hope that it wil l be useful, |
105 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
106 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
107 | +# GNU Affero General Public License for more details. |
108 | +# |
109 | +# You should have received a copy of the GNU Affero General Public License |
110 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. |
111 | +# |
112 | +############################################################################## |
113 | +from openerp.osv import orm, fields |
114 | +import openerp.addons.decimal_precision as dp |
115 | + |
116 | + |
117 | +class product_supplierinfo(orm.Model): |
118 | + _inherit = 'product.supplierinfo' |
119 | + |
120 | + def _product_available( |
121 | + self, cr, uid, ids, field_names=None, arg=False, context=None): |
122 | + context = context or {} |
123 | + res = {} |
124 | + product_obj = self.pool.get('product.product') |
125 | + for record in self.browse(cr, uid, ids, context=context): |
126 | + res[record.id] = {} |
127 | + product = product_obj.browse(cr, uid, record.product_id.id, context=context) |
128 | + res[record.id]['qty_available'] = product.qty_available |
129 | + res[record.id]['virtual_available'] = product.virtual_available |
130 | + return res |
131 | + |
132 | + _columns = { |
133 | + # It cannot be done with related fields because product_id points to |
134 | + # product.template, not product.product |
135 | + 'qty_available': fields.function( |
136 | + _product_available, multi='qty_available', type='float', |
137 | + string="Quantity On Hand"), |
138 | + 'virtual_available': fields.function( |
139 | + _product_available, multi='virtual_available', type='float', |
140 | + string="Forecasted Quantity"), |
141 | + 'delay' : fields.integer('Delivery Lead Time', required=True, |
142 | + group_operator="avg", |
143 | + help="Lead time in days between the confirmation of the purchase order and the reception of the products in your warehouse. Used by the scheduler for automatic computation of the purchase order planning." |
144 | + ), |
145 | + } |
146 | + |
147 | +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
148 | |
149 | === added file 'product_supplier_info/product_view.xml' |
150 | --- product_supplier_info/product_view.xml 1970-01-01 00:00:00 +0000 |
151 | +++ product_supplier_info/product_view.xml 2013-11-12 01:44:47 +0000 |
152 | @@ -0,0 +1,75 @@ |
153 | +<?xml version="1.0" encoding="UTF-8"?> |
154 | +<openerp> |
155 | + <data> |
156 | + <record id="view_product_supplierinfo_search" model="ir.ui.view"> |
157 | + <field name="name">product.supplierinfo.search</field> |
158 | + <field name="model">product.supplierinfo</field> |
159 | + <field name="arch" type="xml"> |
160 | + <search string="Product Supplier Info"> |
161 | + <field name="name" string="Supplier"/> |
162 | + <field name="product_code" string="Supplier Product Code"/> |
163 | + <field name="product_name" string="Supplier Product Code"/> |
164 | + <field name="product_id" /> |
165 | + <group expand='1' string='Group by...' groups="base.group_extended"> |
166 | + <filter string='Product Code' name='supplier_code' icon="terp-stock_symbol-selection" |
167 | + domain="[]" context="{'group_by' : 'product_code'}" /> |
168 | + <filter string='Product' name='product' icon="terp-stock_symbol-selection" domain="[]" |
169 | + context="{'group_by' : 'product_id'}" /> |
170 | + <filter string='Supplier' name='supplier' icon="terp-stock_symbol-selection" domain="[]" |
171 | + context="{'group_by' : 'name'}" /> |
172 | + </group> |
173 | + </search> |
174 | + </field> |
175 | + </record> |
176 | + |
177 | + <record id="view_product_supplierinfo_tree1" model="ir.ui.view"> |
178 | + <field name="name">product.supplierinfo.tree1</field> |
179 | + <field name="model">product.supplierinfo</field> |
180 | + <field name="priority">90</field> |
181 | + <field name="arch" type="xml"> |
182 | + <tree string="Supplier Information" editable="top"> |
183 | + <field name="sequence" widget="handle"/> |
184 | + <field name="product_code" string="Supplier Product Code"/> |
185 | + <field name="product_name" string="Supplier Product Name"/> |
186 | + <field name="product_id" string="Product"/> |
187 | + <field name="name"/> |
188 | + <field name="delay"/> |
189 | + <field name="qty_available"/> |
190 | + <field name="virtual_available"/> |
191 | + <field name="min_qty"/> |
192 | + <field name="company_id" groups="base.group_multi_company" widget="selection"/> |
193 | + </tree> |
194 | + </field> |
195 | + </record> |
196 | + |
197 | + <record id="view_product_supplierinfo_form1" model="ir.ui.view"> |
198 | + <field name="name">product.supplierinfo.form1</field> |
199 | + <field name="model">product.supplierinfo</field> |
200 | + <field name="inherit_id" ref="product.product_supplierinfo_form_view"/> |
201 | + <field name="priority">99</field> |
202 | + <field name="arch" type="xml"> |
203 | + <xpath expr="//field[@name='sequence']" position="before"> |
204 | + <field name="product_id"/> |
205 | + </xpath> |
206 | + </field> |
207 | + </record> |
208 | + |
209 | + <record id="action_product_supplier_info" model="ir.actions.act_window"> |
210 | + <field name="name">Product Supplier Info</field> |
211 | + <field name="res_model">product.supplierinfo</field> |
212 | + <field name="type">ir.actions.act_window</field> |
213 | + <field name="view_type">form</field> |
214 | + <field name="view_mode">tree,form</field> |
215 | + <field name="view_id" ref="view_product_supplierinfo_tree1"/> |
216 | + <field name="search_view_id" ref="view_product_supplierinfo_search"/> |
217 | + <field name="context">{'search_default_supplier':1,'group_by':[]}</field> |
218 | + </record> |
219 | + |
220 | + <menuitem |
221 | + id="menu_product_supplier_info" |
222 | + name="Product by Suppliers" |
223 | + sequence="15" |
224 | + action="action_product_supplier_info" |
225 | + parent="purchase.menu_procurement_management_product"/> |
226 | + </data> |
227 | +</openerp> |
228 | |
229 | === added directory 'product_supplier_info/static' |
230 | === added directory 'product_supplier_info/static/description' |
231 | === added file 'product_supplier_info/static/description/index.html' |
232 | --- product_supplier_info/static/description/index.html 1970-01-01 00:00:00 +0000 |
233 | +++ product_supplier_info/static/description/index.html 2013-11-12 01:44:47 +0000 |
234 | @@ -0,0 +1,12 @@ |
235 | +<section class="oe_container"> |
236 | + <div class="oe_row"> |
237 | + <h2 class="oe_slogan">product_supplier_info Module</h2> |
238 | + <h3 class="oe_slogan">Categorise supplier product by Supplier name</h3> |
239 | + <p>This module categorizes each product item by supplier.It allows for users to be able to view a compiled list of products supplied by the supplier. </p> |
240 | + |
241 | + <p>Users can also directly add new products to the supplier's list.</p> |
242 | + <div class="oe_row_img oe_centered oe_mt32"> |
243 | + <img class="oe_picture oe_screenshot" src="../images/product_supplier_info.png"> |
244 | + </div> |
245 | + </div> |
246 | +</section> |
247 | |
248 | === added directory 'product_supplier_info/static/images' |
249 | === added file 'product_supplier_info/static/images/product_supplier_info.png' |
250 | Binary files product_supplier_info/static/images/product_supplier_info.png 1970-01-01 00:00:00 +0000 and product_supplier_info/static/images/product_supplier_info.png 2013-11-12 01:44:47 +0000 differ |
Dear Lin,
Thanks for the contribs, a few remarks:
* Line 139: no need to instantiate the class anymore, you can remove it
* Line 110: from openerp.osv import orm, fields then use on line 115 orm.Model
* Line 136/137: Cust the line to 80 CHAR (pep8)
* Line 124 to 131: You should better browse all records at once by using, and do not forget context=context:
for id in ids: field_names, 0.0)
res[id] = {}.fromkeys(
supplier_info = self.browse(cr, uid, id)
Better:
for record in self.browse(cr, ui, ids, context=context)
Thank you,
Regards,
Joël