Merge lp:~vauxoo/openerp-product-attributes/7.0-prod_vol_weight-dev-humbertoarocha into lp:~product-core-editors/openerp-product-attributes/7.0

Proposed by hbto [Vauxoo] http://www.vauxoo.com
Status: Work in progress
Proposed branch: lp:~vauxoo/openerp-product-attributes/7.0-prod_vol_weight-dev-humbertoarocha
Merge into: lp:~product-core-editors/openerp-product-attributes/7.0
Diff against target: 200 lines (+155/-0)
5 files modified
product_volumetric_weight/__init__.py (+25/-0)
product_volumetric_weight/__openerp__.py (+50/-0)
product_volumetric_weight/model/__init__.py (+26/-0)
product_volumetric_weight/model/product.py (+37/-0)
product_volumetric_weight/view/product_view.xml (+17/-0)
To merge this branch: bzr merge lp:~vauxoo/openerp-product-attributes/7.0-prod_vol_weight-dev-humbertoarocha
Reviewer Review Type Date Requested Status
Laetitia Gangloff (Acsone) (community) Needs Resubmitting
Maxime Chambreuil (http://www.savoirfairelinux.com) code review Needs Fixing
Stefan Rijnhart (Opener) Needs Fixing
Guewen Baconnier @ Camptocamp Pending
Nhomar - Vauxoo Pending
Review via email: mp+189956@code.launchpad.net

Description of the change

Hello Comm Guys,

We want to submit the following module,
product_volumentric_weight, to your review,

be aware that we want to added new features
to this module in the near future but these
have been keep away from this submission due to the
fact that there are still some agreements to be reached
in the following discussion in this merge proposal.

https://code.launchpad.net/~sebastien.beau/openerp-product-attributes/openerp-product-attributes-product-dimension/+merge/171181

In the meantime the field that bears in this module
is a plain float, later it will evolve into functional float.

Best Regards.

To post a comment you must log in.
Revision history for this message
Maxime Chambreuil (http://www.savoirfairelinux.com) (max3903) wrote :

Thanks Humberto.

Minor fixes:

l30,31: Can you use "from . import" ?
l79: Can you fix indentation ?
l121: Can you use "from . import" ?
l155, datetime, as a standard Python library, should be imported before OpenERP-specific ones.
l161,162: Can you fix indentation ?

Can you add the translation file and remove the wizard and workflow directories ? I guess they will be used later with the new features.

review: Needs Fixing
Revision history for this message
Maxime Chambreuil (http://www.savoirfairelinux.com) (max3903) wrote :

model and views are generally in the module directory, not in sub-directories.

IMHO, there is no need for them with such a small module.

Revision history for this message
Stefan Rijnhart (Opener) (stefan-opener) wrote :

l.76: only need to depend on product, which depends on base itself.
l.158: please use orm.Model

Shouldn't some kind of UOM be used for this? What I read from Wikipedia, common UOMS are cm3/kg, kg/m3, in3/lb, lb/ft3.
 Without UOM, the amount is meaningless.

About having model files and views in separate directories, I find this a useful convention, no matter how small the module contents are.

review: Needs Fixing
Revision history for this message
Daniel Reis (dreis-pt) wrote :

Personally I find sub-directories cumbersome and only really useful on larger modules (my 2 cents).

Revision history for this message
David BEAL (ak) (davidbeal) wrote :

> Personally I find sub-directories cumbersome and only really useful on larger
> modules (my 2 cents).

+1

Revision history for this message
Stefan Rijnhart (Opener) (stefan-opener) wrote :

Given the vagueness of the criterium 'larger modules', we might as well leave it out of the review then.

Revision history for this message
hbto [Vauxoo] http://www.vauxoo.com (humbertoarocha) wrote :

> model and views are generally in the module directory, not in sub-directories.
>
> IMHO, there is no need for them with such a small module.

Hey Guys,

Regarding large / small module, with at vauxoo are sticking to a standard,
no matter how large or small a module is, we, vauxoo, always can find easily
what we are looking for, due to the fact it is more cumbersome, look for
something into account module in openobject-addons than in addons-vauxoo.

So I will kindly disregard your suggestion Daniel Reis.

Revision history for this message
hbto [Vauxoo] http://www.vauxoo.com (humbertoarocha) wrote :

> l79: Can you fix indentation ?
> l155, datetime, as a standard Python library, should be imported before
> OpenERP-specific ones.

to be uploaded, already DONE

> l30,31: Can you use "from . import" ?
> l121: Can you use "from . import" ?
> l161,162: Can you fix indentation ?

Can you kindly show me an example, Please

> Can you add the translation file and remove the wizard and workflow
> directories ? I guess they will be used later with the new features.

these are to be done

Revision history for this message
hbto [Vauxoo] http://www.vauxoo.com (humbertoarocha) wrote :

> l79: Can you fix indentation ?
> l155, datetime, as a standard Python library, should be imported before
> OpenERP-specific ones.

to be uploaded, already DONE

> l30,31: Can you use "from . import" ?
> l121: Can you use "from . import" ?
> l161,162: Can you fix indentation ?

Can you kindly show me an example, Please

> Can you add the translation file and remove the wizard and workflow
> directories ? I guess they will be used later with the new features.

these are to be done

216. By hbto [Vauxoo] http://www.vauxoo.com

[FIX][product_volumetric_weight] Minor changes

217. By hbto [Vauxoo] http://www.vauxoo.com

[FIX][product_volumetric_weight] Less dependencies

Revision history for this message
Stefan Rijnhart (Opener) (stefan-opener) wrote :

Hi, I'd still be interested in a response to my comment about UOM.

Revision history for this message
Maxime Chambreuil (http://www.savoirfairelinux.com) (max3903) wrote :

@hbto

Here are what the lines should be :
l30: from . import model
l122: from . import product

l43 to l45: Can you move those lines in the module description ?

To answer Stefan, can you add the UOM in the help of the field (l162) ?

review: Needs Fixing (code review)
Revision history for this message
Daniel Reis (dreis-pt) wrote :

I personally tried but had trouble with the " from . import" formula: if the addons dir is a symlink and the module dir is another symlink, the import failed.

DR

No dia 27/12/2013, às 19:04, "Maxime Chambreuil \(http://www.savoirfairelinux.com\)" <email address hidden> escreveu:

> Review: Needs Fixing code review
>
> @hbto
>
> Here are what the lines should be :
> l30: from . import model
> l122: from . import product
>
> l43 to l45: Can you move those lines in the module description ?
>
> To answer Stefan, can you add the UOM in the help of the field (l162) ?
> --
> https://code.launchpad.net/~vauxoo/openerp-product-attributes/7.0-prod_vol_weight-dev-humbertoarocha/+merge/189956
> Your team OpenERP Community is subscribed to branch lp:openerp-product-attributes.
>
> _______________________________________________
> Mailing list: https://launchpad.net/~openerp-community
> Post to : <email address hidden>
> Unsubscribe : https://launchpad.net/~openerp-community
> More help : https://help.launchpad.net/ListHelp

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

Unmerged revisions

217. By hbto [Vauxoo] http://www.vauxoo.com

[FIX][product_volumetric_weight] Less dependencies

216. By hbto [Vauxoo] http://www.vauxoo.com

[FIX][product_volumetric_weight] Minor changes

215. By hbto [Vauxoo] http://www.vauxoo.com

[IMP][product_volumetric_weight] Added module which will let set a volumetric
weight to the product.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== added directory 'product_volumetric_weight'
=== added file 'product_volumetric_weight/__init__.py'
--- product_volumetric_weight/__init__.py 1970-01-01 00:00:00 +0000
+++ product_volumetric_weight/__init__.py 2013-10-10 20:49:25 +0000
@@ -0,0 +1,25 @@
1#!/usr/bin/python
2# -*- encoding: utf-8 -*-
3###############################################################################
4# Module Writen to OpenERP, Open Source Management Solution
5# Copyright (C) OpenERP Venezuela (<http://www.vauxoo.com>).
6# All Rights Reserved
7############# Credits #########################################################
8# Coded by: Yanina Aular <yani@vauxoo.com>
9# Planified by: Humberto Arocha <hbto@vauxoo.com>
10# Audited by: Humberto Arocha <hbto@vauxoo.com>
11###############################################################################
12# This program is free software: you can redistribute it and/or modify
13# it under the terms of the GNU Affero General Public License as published
14# by the Free Software Foundation, either version 3 of the License, or
15# (at your option) any later version.
16#
17# This program is distributed in the hope that it will be useful,
18# but WITHOUT ANY WARRANTY; without even the implied warranty of
19# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20# GNU Affero General Public License for more details.
21#
22# You should have received a copy of the GNU Affero General Public License
23# along with this program. If not, see <http://www.gnu.org/licenses/>.
24###############################################################################
25import model
026
=== added file 'product_volumetric_weight/__openerp__.py'
--- product_volumetric_weight/__openerp__.py 1970-01-01 00:00:00 +0000
+++ product_volumetric_weight/__openerp__.py 2013-10-10 20:49:25 +0000
@@ -0,0 +1,50 @@
1#!/usr/bin/python
2# -*- encoding: utf-8 -*-
3###############################################################################
4# Module Writen to OpenERP, Open Source Management Solution
5# Copyright (C) OpenERP Venezuela (<http://www.vauxoo.com>).
6# All Rights Reserved
7############# Credits #########################################################
8# Coded by: Yanina Aular <yani@vauxoo.com>
9# Planified by: Humberto Arocha <hbto@vauxoo.com>
10# Audited by: Humberto Arocha <hbto@vauxoo.com>
11###############################################################################
12# This program is free software: you can redistribute it and/or modify
13# it under the terms of the GNU Affero General Public License as published
14# by the Free Software Foundation, either version 3 of the License, or
15# (at your option) any later version.
16#
17# This program is distributed in the hope that it will be useful,
18# but WITHOUT ANY WARRANTY; without even the implied warranty of
19# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20# GNU Affero General Public License for more details.
21#
22# You should have received a copy of the GNU Affero General Public License
23# along with this program. If not, see <http://www.gnu.org/licenses/>.
24###############################################################################
25
26{
27 'name': 'Product Volumetric',
28 'version': '1.0',
29 'author': 'Vauxoo',
30 'website': 'http://www.vauxoo.com/',
31 'category': 'product',
32 'summary' : 'Added field volumetric weight to the product',
33 'description': '''
34Product Dimensions
35==================
36
37With this module, field volumetric weight is added to model product.
38
39''',
40 'depends': [
41 'product',
42 ],
43 'data': [
44 'view/product_view.xml',
45 ],
46 'demo': [],
47 'test': [],
48 'active': False,
49 'installable': True,
50}
051
=== added directory 'product_volumetric_weight/data'
=== added directory 'product_volumetric_weight/demo'
=== added directory 'product_volumetric_weight/doc'
=== added directory 'product_volumetric_weight/doc/images'
=== added directory 'product_volumetric_weight/i18n'
=== added directory 'product_volumetric_weight/model'
=== added file 'product_volumetric_weight/model/__init__.py'
--- product_volumetric_weight/model/__init__.py 1970-01-01 00:00:00 +0000
+++ product_volumetric_weight/model/__init__.py 2013-10-10 20:49:25 +0000
@@ -0,0 +1,26 @@
1#!/usr/bin/python
2# -*- encoding: utf-8 -*-
3###############################################################################
4# Module Writen to OpenERP, Open Source Management Solution
5# Copyright (C) OpenERP Venezuela (<http://www.vauxoo.com>).
6# All Rights Reserved
7############# Credits #########################################################
8# Coded by: Yanina Aular <yani@vauxoo.com>
9# Planified by: Humberto Arocha <hbto@vauxoo.com>
10# Audited by: Humberto Arocha <hbto@vauxoo.com>
11###############################################################################
12# This program is free software: you can redistribute it and/or modify
13# it under the terms of the GNU Affero General Public License as published
14# by the Free Software Foundation, either version 3 of the License, or
15# (at your option) any later version.
16#
17# This program is distributed in the hope that it will be useful,
18# but WITHOUT ANY WARRANTY; without even the implied warranty of
19# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20# GNU Affero General Public License for more details.
21#
22# You should have received a copy of the GNU Affero General Public License
23# along with this program. If not, see <http://www.gnu.org/licenses/>.
24###############################################################################
25
26import product
027
=== added file 'product_volumetric_weight/model/product.py'
--- product_volumetric_weight/model/product.py 1970-01-01 00:00:00 +0000
+++ product_volumetric_weight/model/product.py 2013-10-10 20:49:25 +0000
@@ -0,0 +1,37 @@
1#!/usr/bin/python
2# -*- encoding: utf-8 -*-
3###############################################################################
4# Module Writen to OpenERP, Open Source Management Solution
5# Copyright (C) OpenERP Venezuela (<http://www.vauxoo.com>).
6# All Rights Reserved
7############# Credits #########################################################
8# Coded by: Yanina Aular <yani@vauxoo.com>
9# Planified by: Humberto Arocha <hbto@vauxoo.com>
10# Audited by: Humberto Arocha <hbto@vauxoo.com>
11###############################################################################
12# This program is free software: you can redistribute it and/or modify
13# it under the terms of the GNU Affero General Public License as published
14# by the Free Software Foundation, either version 3 of the License, or
15# (at your option) any later version.
16#
17# This program is distributed in the hope that it will be useful,
18# but WITHOUT ANY WARRANTY; without even the implied warranty of
19# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20# GNU Affero General Public License for more details.
21#
22# You should have received a copy of the GNU Affero General Public License
23# along with this program. If not, see <http://www.gnu.org/licenses/>.
24###############################################################################
25
26import datetime
27from openerp.osv import fields, osv
28from openerp.tools.translate import _
29from openerp import tools
30
31
32class product_product(osv.Model):
33 _inherit = 'product.product'
34 _columns = {
35 'volumetric_weight': fields.float('Volumetric Weight', help='Volumetric Weight per Unit'),
36 }
37
038
=== added directory 'product_volumetric_weight/report'
=== added directory 'product_volumetric_weight/security'
=== added directory 'product_volumetric_weight/static'
=== added directory 'product_volumetric_weight/static/description'
=== added file 'product_volumetric_weight/static/description/index.html'
=== added directory 'product_volumetric_weight/static/src'
=== added directory 'product_volumetric_weight/static/src/css'
=== added directory 'product_volumetric_weight/static/src/img'
=== added file 'product_volumetric_weight/static/src/img/icon.png'
1Binary files product_volumetric_weight/static/src/img/icon.png 1970-01-01 00:00:00 +0000 and product_volumetric_weight/static/src/img/icon.png 2013-10-10 20:49:25 +0000 differ39Binary files product_volumetric_weight/static/src/img/icon.png 1970-01-01 00:00:00 +0000 and product_volumetric_weight/static/src/img/icon.png 2013-10-10 20:49:25 +0000 differ
=== added directory 'product_volumetric_weight/static/src/js'
=== added directory 'product_volumetric_weight/static/src/xml'
=== added directory 'product_volumetric_weight/test'
=== added directory 'product_volumetric_weight/view'
=== added file 'product_volumetric_weight/view/product_view.xml'
--- product_volumetric_weight/view/product_view.xml 1970-01-01 00:00:00 +0000
+++ product_volumetric_weight/view/product_view.xml 2013-10-10 20:49:25 +0000
@@ -0,0 +1,17 @@
1<?xml version="1.0" encoding="utf-8"?>
2<openerp>
3 <data>
4 <record id="product_volumetric_form_view" model="ir.ui.view">
5 <field name="name">product.product</field>
6 <field name="model">product.product</field>
7 <field name="inherit_id" ref="product.product_normal_form_view"/>
8 <field name="arch" type="xml">
9 <xpath expr="//page[@string='Information']" position="inside">
10 <group string="Dimensions of Unit">
11 <field name="volumetric_weight"/>
12 </group>
13 </xpath>
14 </field>
15 </record>
16 </data>
17</openerp>

Subscribers

People subscribed via source and target branches