Merge lp:~agilebg/openerp-product-attributes/adding_product_supplier_info_7 into lp:~product-core-editors/openerp-product-attributes/7.0

Proposed by Alex Comba - Agile BG
Status: Needs review
Proposed branch: lp:~agilebg/openerp-product-attributes/adding_product_supplier_info_7
Merge into: lp:~product-core-editors/openerp-product-attributes/7.0
Diff against target: 265 lines (+235/-0)
5 files modified
product_supplier_info/__init__.py (+23/-0)
product_supplier_info/__openerp__.py (+58/-0)
product_supplier_info/product.py (+66/-0)
product_supplier_info/product_view.xml (+71/-0)
product_supplier_info/static/description/index.html (+17/-0)
To merge this branch: bzr merge lp:~agilebg/openerp-product-attributes/adding_product_supplier_info_7
Reviewer Review Type Date Requested Status
Laetitia Gangloff (Acsone) (community) Needs Resubmitting
Pedro Manuel Baeza Disapprove
Review via email: mp+216911@code.launchpad.net

Commit message

[ADD] module product_supplier_info

Description of the change

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

Hi, Alex,

Thank you very much for the MP, but this module is already included in OCA repositories in purchase-wkfl with the name product_by_supplier (http://bazaar.launchpad.net/~purchase-core-editors/purchase-wkfl/7.0/files/head:/product_by_supplier/), that it's more descriptive, and it was changed in the review process. Maybe you can check it and see if your clean up can be applied to this one.

Regards.

review: Disapprove
Revision history for this message
Alex Comba - Agile BG (tafaru) wrote :

Hi Pedro,

thank you for your comment, unfortunately we didn't see before that module.
Anyway, I'll check it to see if some of my changes can be applied.

Cheers.

Revision history for this message
Laetitia Gangloff (Acsone) (laetitia-gangloff) wrote :

This project is now hosted on https://github.com/OCA/product-attribute. 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
Revision history for this message
Alex Comba - Agile BG (tafaru) wrote :

Hi Laetitia,

I moved it to https://github.com/OCA/product-attribute/pull/5

Cheers.

Unmerged revisions

255. By Alex Comba - Agile BG

[FIX] typo

254. By Alex Comba - Agile BG

[IMP] module description

253. By Alex Comba - Agile BG

[ADD] Contributors section

252. By Alex Comba - Agile BG

[IMP] Increased version number

251. By Alex Comba - Agile BG

[REF] flake8 cleanup

250. By Alex Comba - Agile BG

[FIX] parent menuitem

249. By Alex Comba - Agile BG

[IMP] Renamed from1 to form1

248. By <elicoidal <email address hidden>> <email address hidden>

[UPD] index.html info
(/home/tafaru/dev/openerp/other/removing_product_supplier_info_from_elico-7.0 rev 12)

247. By <elicoidal <email address hidden>> <email address hidden>

[ADD] account_invoice_line, mrp_move_direct, purchase_price_list_item, purchase_po_price, purchase_control_supplier
(/home/tafaru/dev/openerp/other/removing_product_supplier_info_from_elico-7.0 rev 6)

246. By <elicoidal <email address hidden>> <email address hidden>

[FIX] change image description
(/home/tafaru/dev/openerp/other/removing_product_supplier_info_from_elico-7.0 rev 5)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
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 2014-04-23 15:17:26 +0000
5@@ -0,0 +1,23 @@
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+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
29
30=== added file 'product_supplier_info/__openerp__.py'
31--- product_supplier_info/__openerp__.py 1970-01-01 00:00:00 +0000
32+++ product_supplier_info/__openerp__.py 2014-04-23 15:17:26 +0000
33@@ -0,0 +1,58 @@
34+# -*- coding: utf-8 -*-
35+##############################################################################
36+#
37+# OpenERP, Open Source Management Solution
38+# Copyright (c) 2010-2013 Elico Corp. All Rights Reserved.
39+# Author: LIN Yu <lin.yu@elico-corp.com>
40+#
41+# This program is free software: you can redistribute it and/or modify
42+# it under the terms of the GNU Affero General Public License as
43+# published by the Free Software Foundation, either version 3 of the
44+# License, or (at your option) any later version.
45+#
46+# This program is distributed in the hope that it will be useful,
47+# but WITHOUT ANY WARRANTY; without even the implied warranty of
48+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
49+# GNU Affero General Public License for more details.
50+#
51+# You should have received a copy of the GNU Affero General Public License
52+# along with this program. If not, see <http://www.gnu.org/licenses/>.
53+#
54+##############################################################################
55+
56+{
57+ 'name': 'Product Supplier Info',
58+ 'version': '1.1',
59+ 'category': 'Product',
60+ 'summary': 'Product Supplier Info',
61+ 'description': """
62+Product Supplier Info
63+==================================================
64+This module categorizes each product item by supplier.
65+It allows for users to be able to view a compiled list
66+of products supplied by the supplier.
67+
68+Users can also directly add new products to the supplier's list.
69+
70+Contributors
71+------------
72+
73+* Alex Comba <alex.comba@agilebg.com>
74+""",
75+ 'author': 'Elico Corp',
76+ 'website': 'http://www.elico-corp.com',
77+ 'license': 'AGPL-3',
78+ 'depends': [
79+ 'product', 'stock',
80+ ],
81+ 'data': [
82+ 'product_view.xml',
83+ ],
84+ 'test': [],
85+ 'demo': [],
86+ 'installable': True,
87+ 'auto_install': False,
88+ 'application': False,
89+}
90+
91+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
92
93=== added file 'product_supplier_info/product.py'
94--- product_supplier_info/product.py 1970-01-01 00:00:00 +0000
95+++ product_supplier_info/product.py 2014-04-23 15:17:26 +0000
96@@ -0,0 +1,66 @@
97+# -*- coding: utf-8 -*-
98+##############################################################################
99+#
100+# OpenERP, Open Source Management Solution
101+# Copyright (c) 2010-2013 Elico Corp. All Rights Reserved.
102+# Author: Yannick Gouin <yannick.gouin@elico-corp.com>
103+#
104+# This program is free software: you can redistribute it and/or modify
105+# it under the terms of the GNU Affero General Public License as
106+# published by the Free Software Foundation, either version 3 of the
107+# License, or (at your option) any later version.
108+#
109+# This program is distributed in the hope that it will be useful,
110+# but WITHOUT ANY WARRANTY; without even the implied warranty of
111+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
112+# GNU Affero General Public License for more details.
113+#
114+# You should have received a copy of the GNU Affero General Public License
115+# along with this program. If not, see <http://www.gnu.org/licenses/>.
116+#
117+##############################################################################
118+
119+from openerp.osv import orm, fields
120+import openerp.addons.decimal_precision as dp
121+
122+
123+class product_supplierinfo(orm.Model):
124+ _inherit = 'product.supplierinfo'
125+
126+ def _product_available(
127+ self, cr, uid, ids,
128+ field_names=None, arg=False, context=None
129+ ):
130+ if not field_names:
131+ field_names = []
132+ if context is None:
133+ context = {}
134+ res = {}
135+ for id in ids:
136+ res[id] = {}.fromkeys(field_names, 0.0)
137+ supplier_info = self.browse(cr, uid, id)
138+ for f in field_names:
139+ if f == 'qty_available':
140+ res[id][f] = supplier_info.product_id.qty_available
141+ if f == 'virtual_available':
142+ res[id][f] = supplier_info.product_id.virtual_available
143+ return res
144+
145+ _columns = {
146+ 'product_id': fields.many2one(
147+ 'product.product', 'Product',
148+ select=1, ondelete='cascade', required=True
149+ ),
150+ 'qty_available': fields.function(
151+ _product_available, multi='qty_available', type='float',
152+ digits_compute=dp.get_precision('Product Unit of Measure'),
153+ string="Quantity On Hand"
154+ ),
155+ 'virtual_available': fields.function(
156+ _product_available, multi='qty_available', type='float',
157+ digits_compute=dp.get_precision('Product Unit of Measure'),
158+ string="Forecasted Quantity"
159+ ),
160+ }
161+
162+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
163
164=== added file 'product_supplier_info/product_view.xml'
165--- product_supplier_info/product_view.xml 1970-01-01 00:00:00 +0000
166+++ product_supplier_info/product_view.xml 2014-04-23 15:17:26 +0000
167@@ -0,0 +1,71 @@
168+<?xml version="1.0" encoding="UTF-8"?>
169+<openerp>
170+ <data>
171+
172+ <record id="view_product_supplierinfo_search" model="ir.ui.view">
173+ <field name="name">product.supplierinfo.search</field>
174+ <field name="model">product.supplierinfo</field>
175+ <field name="arch" type="xml">
176+ <search string="Product Supplier Info">
177+ <field name="name" string="Supplier"/>
178+ <field name="product_code" string="Supplier Product Code"/>
179+ <field name="product_name" string="Supplier Product Code"/>
180+ <field name="product_id" />
181+ <group expand='1' string='Group by...' groups="base.group_extended">
182+ <filter string='Product Code' name='supplier_code' icon="terp-stock_symbol-selection" domain="[]" context="{'group_by' : 'product_code'}" />
183+ <filter string='Product' name='product' icon="terp-stock_symbol-selection" domain="[]" context="{'group_by' : 'product_id'}" />
184+ <filter string='Supplier' name='supplier' icon="terp-stock_symbol-selection" domain="[]" context="{'group_by' : 'name'}" />
185+ </group>
186+ </search>
187+ </field>
188+ </record>
189+
190+ <record id="view_product_supplierinfo_tree1" model="ir.ui.view">
191+ <field name="name">product.supplierinfo.tree1</field>
192+ <field name="model">product.supplierinfo</field>
193+ <field name="arch" type="xml">
194+ <tree string="Supplier Information" editable="top">
195+ <field name="sequence" widget="handle"/>
196+ <field name="product_code" string="Supplier Product Code"/>
197+ <field name="product_id" string="Product Name"/>
198+ <field name="product_name" string="Supplier Product Name"/>
199+ <field name="name"/>
200+ <field name="delay"/>
201+ <field name="qty_available"/>
202+ <field name="virtual_available"/>
203+ <field name="min_qty"/>
204+ <field name="company_id" groups="base.group_multi_company" widget="selection"/>
205+ </tree>
206+ </field>
207+ </record>
208+ <record id="view_product_supplierinfo_form1" model="ir.ui.view">
209+ <field name="name">product.supplierinfo.form1</field>
210+ <field name="model">product.supplierinfo</field>
211+ <field name="inherit_id" ref="product.product_supplierinfo_form_view"/>
212+ <field name="arch" type="xml">
213+ <xpath expr="//field[@name='sequence']" position="before">
214+ <field name="product_id"/>
215+ </xpath>
216+ </field>
217+ </record>
218+
219+
220+ <record id="action_product_supplier_info" model="ir.actions.act_window">
221+ <field name="name">Product Supplier Info</field>
222+ <field name="res_model">product.supplierinfo</field>
223+ <field name="type">ir.actions.act_window</field>
224+ <field name="view_type">form</field>
225+ <field name="view_mode">tree,form</field>
226+ <field name="view_id" ref="view_product_supplierinfo_tree1"/>
227+ <field name="search_view_id" ref="view_product_supplierinfo_search"/>
228+ <field name="context">{'search_default_supplier':1,'group_by':[]}</field>
229+ </record>
230+
231+ <menuitem
232+ id="menu_product_supplier_info"
233+ name="Product Suppliers"
234+ sequence="15"
235+ action="action_product_supplier_info"
236+ parent="stock.menu_stock_product"/>
237+ </data>
238+</openerp>
239
240=== added directory 'product_supplier_info/static'
241=== added directory 'product_supplier_info/static/description'
242=== added file 'product_supplier_info/static/description/index.html'
243--- product_supplier_info/static/description/index.html 1970-01-01 00:00:00 +0000
244+++ product_supplier_info/static/description/index.html 2014-04-23 15:17:26 +0000
245@@ -0,0 +1,17 @@
246+<section class="oe_container">
247+ <div class="oe_row">
248+ <h2 class="oe_slogan">product_supplier_info Module</h2>
249+ <h3 class="oe_slogan">Categorise supplier product by Supplier name</h3>
250+ <h4 class="oe_slogan"><a href="http://www.elico-corp.com">By Elico Corp</a></h4>
251+ <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>
252+
253+ <p>Users can also directly add new products to the supplier's list.</p>
254+ <div class="oe_row_img oe_centered oe_mt32">
255+ <img class="oe_picture oe_screenshot" src="product_supplier_info.png">
256+ </div>
257+ </div>
258+ <div class="oe_row oe_centeralign oe_more_space">
259+ <a href="http://www.elico-corp.com/saas/" class="oe_button oe_big">Start your <span class="oe_emph">free</span> trial</a>
260+ </div>
261+ <h4 class="oe_slogan">or</h4>
262+</section>
263
264=== added file 'product_supplier_info/static/description/product_supplier_info.png'
265Binary files product_supplier_info/static/description/product_supplier_info.png 1970-01-01 00:00:00 +0000 and product_supplier_info/static/description/product_supplier_info.png 2014-04-23 15:17:26 +0000 differ

Subscribers

People subscribed via source and target branches