Merge lp:~agilebg/purchase-wkfl/7.0-bug-1312024-tafaru into lp:~purchase-core-editors/purchase-wkfl/7.0

Proposed by Alex Comba - Agile BG on 2014-04-24
Status: Merged
Approved by: Yannick Vaucher @ Camptocamp on 2014-05-14
Approved revision: 34
Merged at revision: 33
Proposed branch: lp:~agilebg/purchase-wkfl/7.0-bug-1312024-tafaru
Merge into: lp:~purchase-core-editors/purchase-wkfl/7.0
Diff against target: 83 lines (+27/-16)
2 files modified
product_by_supplier/__openerp__.py (+18/-10)
product_by_supplier/product.py (+9/-6)
To merge this branch: bzr merge lp:~agilebg/purchase-wkfl/7.0-bug-1312024-tafaru
Reviewer Review Type Date Requested Status
Lorenzo Battistini (community) code review Approve on 2014-05-07
Pedro Manuel Baeza code review 2014-04-24 Approve on 2014-05-06
Alexandre Fayolle - camptocamp code review, no test Approve on 2014-05-06
Review via email: mp+217061@code.launchpad.net

Commit message

Description of the change

This branch contains the fix for https://bugs.launchpad.net/purchase-wkfl/+bug/1312024 and a bit of flake8 cleanup.

To post a comment you must log in.
Lorenzo Battistini (elbati) wrote :

Thanks Alex,
why did you remove the 'images' and 'sequence' items?

review: Needs Information
Alex Comba - Agile BG (tafaru) wrote :

Lorenzo,

following are listed the reasons:

'images': this key doesn't compare in https://doc.openerp.com/trunk/server/03_module_dev_01/#manifest-file-openerp-py: also comparing https://www.openerp.com/apps/7.0/product_by_supplier/ and https://www.openerp.com/apps/7.0/product_supplier_info/ I noticed the image in the first one has broken link. So I gathered was a good solution to remove it;
'sequence': using https://github.com/nbessi/openerp-conventions I get ' O600 Warning unknown Manifest key ('sequence')' so I thought to remove it.

Pedro Manuel Baeza (pedro.baeza) wrote :

Hi, Alex, some remarks:

- Contributors are put on 'contributors' key in manifest file as a list, not in description.
- I prefer to add purchase as dependency that changes the place where the menu is displayed, because this query is not useful if you don't use purchase module.

Regards.

review: Needs Fixing (code review)
34. By Alex Comba - Agile BG on 2014-04-28

[FIX] bug #1312024: revert commit 32 and added purchase to depends

Alex Comba - Agile BG (tafaru) wrote :

Hi Pedro,
thank you for your review, my comments are in line.

> Contributors are put on 'contributors' key in manifest file as a list, not in description.

As far as I can see here https://doc.openerp.com/contribute/05_developing_modules/#modules-description it's written differently.

> I prefer to add purchase as dependency

Done in my last commit.

Cheers.

LGTM

review: Approve (code review, no test)
Pedro Manuel Baeza (pedro.baeza) wrote :

Hi, Alex,

Thanks for the changes. Indeed, in contributors section of the documentation, there's still a reference to add it at the end of the description. Initial intention was to get a dedicated section under the key 'contributors' of the manifest file to be displayed on module list, but this is something still not possible, so that way is for now the valid one.

Regards.

review: Approve (code review)
review: Approve (code review)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'product_by_supplier/__openerp__.py'
--- product_by_supplier/__openerp__.py 2014-02-06 19:59:12 +0000
+++ product_by_supplier/__openerp__.py 2014-04-28 09:23:09 +0000
@@ -24,21 +24,29 @@
24 'name': 'Product by supplier info',24 'name': 'Product by supplier info',
25 'version': '1.0',25 'version': '1.0',
26 'category': 'purchase',26 'category': 'purchase',
27 'sequence': 19,
28 'summary': 'Show products grouped by suppliers',27 'summary': 'Show products grouped by suppliers',
29 'description': """28 'description': """
29Product Supplier Info
30==================================================
30This module categorizes each product item by supplier.31This module categorizes each product item by supplier.
31======================================================32It allows for users to be able to view a compiled list
32* It allows for users to be able to view a compiled list of products supplied \33of products supplied by the supplier.
33by the supplier.34
34* Users can also directly add new products to the supplier's list.35Users can also directly add new products to the supplier's list.
35 """,36
37Contributors
38------------
39
40* Alex Comba <alex.comba@agilebg.com>
41""",
36 'author': 'Elico Corp',42 'author': 'Elico Corp',
37 'website': 'http://www.elico-corp.com',43 'website': 'http://www.elico-corp.com',
38 'images': [44 'license': 'AGPL-3',
39 'static/images/product_supplier_info.png'45 'depends': [
40 ],46 'product',
41 'depends': ['product', 'stock'],47 'stock',
48 'purchase',
49 ],
42 'data': [50 'data': [
43 'product_view.xml',51 'product_view.xml',
44 ],52 ],
4553
=== modified file 'product_by_supplier/product.py'
--- product_by_supplier/product.py 2013-11-12 01:44:31 +0000
+++ product_by_supplier/product.py 2014-04-28 09:23:09 +0000
@@ -20,7 +20,6 @@
20#20#
21##############################################################################21##############################################################################
22from openerp.osv import orm, fields22from openerp.osv import orm, fields
23import openerp.addons.decimal_precision as dp
2423
2524
26class product_supplierinfo(orm.Model):25class product_supplierinfo(orm.Model):
@@ -33,7 +32,8 @@
33 product_obj = self.pool.get('product.product')32 product_obj = self.pool.get('product.product')
34 for record in self.browse(cr, uid, ids, context=context):33 for record in self.browse(cr, uid, ids, context=context):
35 res[record.id] = {}34 res[record.id] = {}
36 product = product_obj.browse(cr, uid, record.product_id.id, context=context)35 product = product_obj.browse(
36 cr, uid, record.product_id.id, context=context)
37 res[record.id]['qty_available'] = product.qty_available37 res[record.id]['qty_available'] = product.qty_available
38 res[record.id]['virtual_available'] = product.virtual_available38 res[record.id]['virtual_available'] = product.virtual_available
39 return res39 return res
@@ -47,10 +47,13 @@
47 'virtual_available': fields.function(47 'virtual_available': fields.function(
48 _product_available, multi='virtual_available', type='float',48 _product_available, multi='virtual_available', type='float',
49 string="Forecasted Quantity"),49 string="Forecasted Quantity"),
50 'delay' : fields.integer('Delivery Lead Time', required=True,50 'delay': fields.integer(
51 group_operator="avg",51 'Delivery Lead Time', required=True, group_operator="avg",
52 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."52 help="Lead time in days between the confirmation of the"
53 ),53 " purchase order and the reception of the products in your"
54 " warehouse. Used by the scheduler for automatic computation of"
55 " the purchase order planning."
56 ),
54 }57 }
5558
56# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:59# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

Subscribers

People subscribed via source and target branches