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
Status: Merged
Approved by: Yannick Vaucher @ Camptocamp
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
Pedro Manuel Baeza code review Approve
Alexandre Fayolle - camptocamp code review, no test Approve
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.
Revision history for this message
Lorenzo Battistini (elbati) wrote :

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

review: Needs Information
Revision history for this message
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.

Revision history for this message
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

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

Revision history for this message
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.

Revision history for this message
Alexandre Fayolle - camptocamp (alexandre-fayolle-c2c) wrote :

LGTM

review: Approve (code review, no test)
Revision history for this message
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)
Revision history for this message
Lorenzo Battistini (elbati) :
review: Approve (code review)

Preview Diff

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

Subscribers

People subscribed via source and target branches