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
=== added directory 'product_supplier_info'
=== added file 'product_supplier_info/__init__.py'
--- product_supplier_info/__init__.py 1970-01-01 00:00:00 +0000
+++ product_supplier_info/__init__.py 2014-04-23 15:17:26 +0000
@@ -0,0 +1,23 @@
1# -*- coding: utf-8 -*-
2##############################################################################
3#
4# OpenERP, Open Source Management Solution
5# Copyright (c) 2010-2013 Elico Corp. All Rights Reserved.
6# Author: Yannick Gouin <yannick.gouin@elico-corp.com>
7#
8# This program is free software: you can redistribute it and/or modify
9# it under the terms of the GNU Affero General Public License as
10# published by the Free Software Foundation, either version 3 of the
11# License, or (at your option) any later version.
12#
13# This program is distributed in the hope that it will be useful,
14# but WITHOUT ANY WARRANTY; without even the implied warranty of
15# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16# GNU Affero General Public License for more details.
17#
18# You should have received a copy of the GNU Affero General Public License
19# along with this program. If not, see <http://www.gnu.org/licenses/>.
20#
21##############################################################################
22from . import product
23# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
024
=== added file 'product_supplier_info/__openerp__.py'
--- product_supplier_info/__openerp__.py 1970-01-01 00:00:00 +0000
+++ product_supplier_info/__openerp__.py 2014-04-23 15:17:26 +0000
@@ -0,0 +1,58 @@
1# -*- coding: utf-8 -*-
2##############################################################################
3#
4# OpenERP, Open Source Management Solution
5# Copyright (c) 2010-2013 Elico Corp. All Rights Reserved.
6# Author: LIN Yu <lin.yu@elico-corp.com>
7#
8# This program is free software: you can redistribute it and/or modify
9# it under the terms of the GNU Affero General Public License as
10# published by the Free Software Foundation, either version 3 of the
11# License, or (at your option) any later version.
12#
13# This program is distributed in the hope that it will be useful,
14# but WITHOUT ANY WARRANTY; without even the implied warranty of
15# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16# GNU Affero General Public License for more details.
17#
18# You should have received a copy of the GNU Affero General Public License
19# along with this program. If not, see <http://www.gnu.org/licenses/>.
20#
21##############################################################################
22
23{
24 'name': 'Product Supplier Info',
25 'version': '1.1',
26 'category': 'Product',
27 'summary': 'Product Supplier Info',
28 'description': """
29Product Supplier Info
30==================================================
31This module categorizes each product item by supplier.
32It allows for users to be able to view a compiled list
33of products supplied by the supplier.
34
35Users can also directly add new products to the supplier's list.
36
37Contributors
38------------
39
40* Alex Comba <alex.comba@agilebg.com>
41""",
42 'author': 'Elico Corp',
43 'website': 'http://www.elico-corp.com',
44 'license': 'AGPL-3',
45 'depends': [
46 'product', 'stock',
47 ],
48 'data': [
49 'product_view.xml',
50 ],
51 'test': [],
52 'demo': [],
53 'installable': True,
54 'auto_install': False,
55 'application': False,
56}
57
58# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
059
=== added file 'product_supplier_info/product.py'
--- product_supplier_info/product.py 1970-01-01 00:00:00 +0000
+++ product_supplier_info/product.py 2014-04-23 15:17:26 +0000
@@ -0,0 +1,66 @@
1# -*- coding: utf-8 -*-
2##############################################################################
3#
4# OpenERP, Open Source Management Solution
5# Copyright (c) 2010-2013 Elico Corp. All Rights Reserved.
6# Author: Yannick Gouin <yannick.gouin@elico-corp.com>
7#
8# This program is free software: you can redistribute it and/or modify
9# it under the terms of the GNU Affero General Public License as
10# published by the Free Software Foundation, either version 3 of the
11# License, or (at your option) any later version.
12#
13# This program is distributed in the hope that it will be useful,
14# but WITHOUT ANY WARRANTY; without even the implied warranty of
15# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16# GNU Affero General Public License for more details.
17#
18# You should have received a copy of the GNU Affero General Public License
19# along with this program. If not, see <http://www.gnu.org/licenses/>.
20#
21##############################################################################
22
23from openerp.osv import orm, fields
24import openerp.addons.decimal_precision as dp
25
26
27class product_supplierinfo(orm.Model):
28 _inherit = 'product.supplierinfo'
29
30 def _product_available(
31 self, cr, uid, ids,
32 field_names=None, arg=False, context=None
33 ):
34 if not field_names:
35 field_names = []
36 if context is None:
37 context = {}
38 res = {}
39 for id in ids:
40 res[id] = {}.fromkeys(field_names, 0.0)
41 supplier_info = self.browse(cr, uid, id)
42 for f in field_names:
43 if f == 'qty_available':
44 res[id][f] = supplier_info.product_id.qty_available
45 if f == 'virtual_available':
46 res[id][f] = supplier_info.product_id.virtual_available
47 return res
48
49 _columns = {
50 'product_id': fields.many2one(
51 'product.product', 'Product',
52 select=1, ondelete='cascade', required=True
53 ),
54 'qty_available': fields.function(
55 _product_available, multi='qty_available', type='float',
56 digits_compute=dp.get_precision('Product Unit of Measure'),
57 string="Quantity On Hand"
58 ),
59 'virtual_available': fields.function(
60 _product_available, multi='qty_available', type='float',
61 digits_compute=dp.get_precision('Product Unit of Measure'),
62 string="Forecasted Quantity"
63 ),
64 }
65
66# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
067
=== added file 'product_supplier_info/product_view.xml'
--- product_supplier_info/product_view.xml 1970-01-01 00:00:00 +0000
+++ product_supplier_info/product_view.xml 2014-04-23 15:17:26 +0000
@@ -0,0 +1,71 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<openerp>
3 <data>
4
5 <record id="view_product_supplierinfo_search" model="ir.ui.view">
6 <field name="name">product.supplierinfo.search</field>
7 <field name="model">product.supplierinfo</field>
8 <field name="arch" type="xml">
9 <search string="Product Supplier Info">
10 <field name="name" string="Supplier"/>
11 <field name="product_code" string="Supplier Product Code"/>
12 <field name="product_name" string="Supplier Product Code"/>
13 <field name="product_id" />
14 <group expand='1' string='Group by...' groups="base.group_extended">
15 <filter string='Product Code' name='supplier_code' icon="terp-stock_symbol-selection" domain="[]" context="{'group_by' : 'product_code'}" />
16 <filter string='Product' name='product' icon="terp-stock_symbol-selection" domain="[]" context="{'group_by' : 'product_id'}" />
17 <filter string='Supplier' name='supplier' icon="terp-stock_symbol-selection" domain="[]" context="{'group_by' : 'name'}" />
18 </group>
19 </search>
20 </field>
21 </record>
22
23 <record id="view_product_supplierinfo_tree1" model="ir.ui.view">
24 <field name="name">product.supplierinfo.tree1</field>
25 <field name="model">product.supplierinfo</field>
26 <field name="arch" type="xml">
27 <tree string="Supplier Information" editable="top">
28 <field name="sequence" widget="handle"/>
29 <field name="product_code" string="Supplier Product Code"/>
30 <field name="product_id" string="Product Name"/>
31 <field name="product_name" string="Supplier Product Name"/>
32 <field name="name"/>
33 <field name="delay"/>
34 <field name="qty_available"/>
35 <field name="virtual_available"/>
36 <field name="min_qty"/>
37 <field name="company_id" groups="base.group_multi_company" widget="selection"/>
38 </tree>
39 </field>
40 </record>
41 <record id="view_product_supplierinfo_form1" model="ir.ui.view">
42 <field name="name">product.supplierinfo.form1</field>
43 <field name="model">product.supplierinfo</field>
44 <field name="inherit_id" ref="product.product_supplierinfo_form_view"/>
45 <field name="arch" type="xml">
46 <xpath expr="//field[@name='sequence']" position="before">
47 <field name="product_id"/>
48 </xpath>
49 </field>
50 </record>
51
52
53 <record id="action_product_supplier_info" model="ir.actions.act_window">
54 <field name="name">Product Supplier Info</field>
55 <field name="res_model">product.supplierinfo</field>
56 <field name="type">ir.actions.act_window</field>
57 <field name="view_type">form</field>
58 <field name="view_mode">tree,form</field>
59 <field name="view_id" ref="view_product_supplierinfo_tree1"/>
60 <field name="search_view_id" ref="view_product_supplierinfo_search"/>
61 <field name="context">{'search_default_supplier':1,'group_by':[]}</field>
62 </record>
63
64 <menuitem
65 id="menu_product_supplier_info"
66 name="Product Suppliers"
67 sequence="15"
68 action="action_product_supplier_info"
69 parent="stock.menu_stock_product"/>
70 </data>
71</openerp>
072
=== added directory 'product_supplier_info/static'
=== added directory 'product_supplier_info/static/description'
=== added file 'product_supplier_info/static/description/index.html'
--- product_supplier_info/static/description/index.html 1970-01-01 00:00:00 +0000
+++ product_supplier_info/static/description/index.html 2014-04-23 15:17:26 +0000
@@ -0,0 +1,17 @@
1<section class="oe_container">
2 <div class="oe_row">
3 <h2 class="oe_slogan">product_supplier_info Module</h2>
4 <h3 class="oe_slogan">Categorise supplier product by Supplier name</h3>
5 <h4 class="oe_slogan"><a href="http://www.elico-corp.com">By Elico Corp</a></h4>
6 <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>
7
8 <p>Users can also directly add new products to the supplier's list.</p>
9 <div class="oe_row_img oe_centered oe_mt32">
10 <img class="oe_picture oe_screenshot" src="product_supplier_info.png">
11 </div>
12 </div>
13 <div class="oe_row oe_centeralign oe_more_space">
14 <a href="http://www.elico-corp.com/saas/" class="oe_button oe_big">Start your <span class="oe_emph">free</span> trial</a>
15 </div>
16 <h4 class="oe_slogan">or</h4>
17</section>
018
=== added file 'product_supplier_info/static/description/product_supplier_info.png'
1Binary 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 differ19Binary 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