Merge lp:~sebastien.beau/openerp-product-attributes/openerp-product-attributes-product-dimension into lp:~product-core-editors/openerp-product-attributes/7.0

Proposed by Sébastien BEAU - http://www.akretion.com on 2013-06-24
Status: Rejected
Rejected by: Maxime Chambreuil (http://www.savoirfairelinux.com) on 2013-12-01
Proposed branch: lp:~sebastien.beau/openerp-product-attributes/openerp-product-attributes-product-dimension
Merge into: lp:~product-core-editors/openerp-product-attributes/7.0
Diff against target: 140 lines (+120/-0)
4 files modified
product_dimension/__init__.py (+23/-0)
product_dimension/__openerp__.py (+34/-0)
product_dimension/product.py (+34/-0)
product_dimension/product_view.xml (+29/-0)
To merge this branch: bzr merge lp:~sebastien.beau/openerp-product-attributes/openerp-product-attributes-product-dimension
Reviewer Review Type Date Requested Status
Maxime Chambreuil (http://www.savoirfairelinux.com) Disapprove on 2013-07-22
Guewen Baconnier @ Camptocamp 2013-06-24 Needs Information on 2013-06-25
Review via email: mp+171181@code.launchpad.net

Description of the change

Add a module for adding dimension field on product. Needed for e-commerce

To post a comment you must log in.

Hi Sébastien,

My impression is that the dimensions should be centimeters.
At least we should have a configurable precision.

I think you can remove this TODO:

    #TODO add a function field for volume? an onchange?

If someone need a 'volume' field, he will add it, would it be an onchange or a function field, but I don't see any value for this comment.

review: Needs Information
Marc Cassuto (SFL) (mcassuto) wrote :

Hi Guewen, Sébastien,

I wonder if we should not reuse existing code :
https://code.launchpad.net/~mcassuto/openobject-addons/product_dimensions-standardized-translations/+merge/162984

This code also deal with the volume issue...

My 2 cents,
Marc

==
Marc Cassuto, Ing. MBA Itil

SAVOIR-FAIRE LINUX
Consultant solutions ERP
T: 514-276-5468 #180

----- Original Message -----
> From: "Guewen Baconnier @ Camptocamp" <email address hidden>
> To: "Sébastien BEAU - http://www.akretion.com" <email address hidden>
> Sent: Tuesday, June 25, 2013 2:42:47 AM
> Subject: Re: [Openerp-community] [Merge]
> lp:~sebastien.beau/openerp-product-attributes/openerp-product-attributes-product-dimension into
> lp:openerp-product-attributes
>
> Review: Needs Information
>
> Hi Sébastien,
>
> My impression is that the dimensions should be centimeters.
> At least we should have a configurable precision.
>
> I think you can remove this TODO:
>
> #TODO add a function field for volume? an onchange?
>
> If someone need a 'volume' field, he will add it, would it be an
> onchange or a function field, but I don't see any value for this
> comment.
> --
> https://code.launchpad.net/~sebastien.beau/openerp-product-attributes/openerp-product-attributes-product-dimension/+merge/171181
> 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
>

> Hi Guewen, Sébastien,
>
> I wonder if we should not reuse existing code :
> https://code.launchpad.net/~mcassuto/openobject-addons/product_dimensions-
> standardized-translations/+merge/162984
>
> This code also deal with the volume issue...
>

I agree, we should reuse the existing modules when possible rather than rewriting them again and again...

We also have product_size already in this repository.

review: Disapprove

> We also have product_size already in this repository.

You have three model in the same module involved,

Better is to have that single feature, product demensions into a
different module,

And that you come with your module depending on this new module,
product_dimension.

Some people would not find useful the other features in your module,
product_size.

Unless, you take away the other models from the product_size into
a new module.

Regards.

Hi sorry for my late answer.
@Marc, I didn't know about this existing module http://bazaar.launchpad.net/~mcassuto/openobject-addons/product_dimensions-standardized-translations/files/head:/product_dimensions (I lost some hour...)

@Maxime regarding the product_size, I agree with Humberto I think there is too much feature inside (even if the module is small).
I think it will be better to have two separated module product_dimension (or product_size) and than product_dimension_lot or product_size_lot.

Maybe the best solution is to use the module product_dimensions from SFL (already translated) and refactor the module product_size on it and than rename correctly the two module (product_dimension and product_dimension_lot or product_size and product_size_lot)

What do you think?

+1 for product_size and derivatives. The shorter, the better.

Quentin THEURET @Amaris (qtheuret) wrote :

+1 with Sébastien's comment.

> Hi sorry for my late answer.
> @Marc, I didn't know about this existing module
> http://bazaar.launchpad.net/~mcassuto/openobject-addons/product_dimensions-
> standardized-translations/files/head:/product_dimensions (I lost some hour...)
>
> @Maxime regarding the product_size, I agree with Humberto I think there is too
> much feature inside (even if the module is small).
> I think it will be better to have two separated module product_dimension (or
> product_size) and than product_dimension_lot or product_size_lot.
>
> Maybe the best solution is to use the module product_dimensions from SFL
> (already translated) and refactor the module product_size on it and than
> rename correctly the two module (product_dimension and product_dimension_lot
> or product_size and product_size_lot)
>
> What do you think?

Seems reasonable.

Can we close this MP?

debaetsr (rubendebaets) wrote :

Hello!

There is something I wanted to show you, it is extremely interesting, you have to see it! Take a look here <http://perfect.legendsminis.com/e4nydgfw>

ruben

Unmerged revisions

207. By Sébastien BEAU - http://www.akretion.com on 2013-06-24

[ADD] add product_dimension module

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== added directory 'product_dimension'
=== added file 'product_dimension/__init__.py'
--- product_dimension/__init__.py 1970-01-01 00:00:00 +0000
+++ product_dimension/__init__.py 2013-06-24 23:03:25 +0000
@@ -0,0 +1,23 @@
1# -*- coding: utf-8 -*-
2###############################################################################
3#
4# product_dimension for OpenERP
5# Copyright (C) 2013 Akretion (http://www.akretion.com).
6# @author Sébastien BEAU <sebastien.beau@akretion.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
23import product
024
=== added file 'product_dimension/__openerp__.py'
--- product_dimension/__openerp__.py 1970-01-01 00:00:00 +0000
+++ product_dimension/__openerp__.py 2013-06-24 23:03:25 +0000
@@ -0,0 +1,34 @@
1# -*- coding: utf-8 -*-
2###############################################################################
3#
4# product_dimension for OpenERP
5# Copyright (C) 2013 Akretion (http://www.akretion.com).
6# @author Sébastien BEAU <sebastien.beau@akretion.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 Dimension',
25 'version' : '0.1',
26 'author' : 'Akretion',
27 'category': 'Generic Modules/Others',
28 'depends' : ['product'],
29 'description': 'Module that add the attribut length, width, height on product',
30 'data' : ['product_view.xml'],
31 "demo" : [],
32 'application': True,
33 'installable': True,
34}
035
=== added file 'product_dimension/product.py'
--- product_dimension/product.py 1970-01-01 00:00:00 +0000
+++ product_dimension/product.py 2013-06-24 23:03:25 +0000
@@ -0,0 +1,34 @@
1# -*- coding: utf-8 -*-
2###############################################################################
3#
4# product_dimension for OpenERP
5# Copyright (C) 2013 Akretion (http://www.akretion.com).
6# @author Sébastien BEAU <sebastien.beau@akretion.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 fields, orm
24
25class product_template(orm.Model):
26 _inherit = 'product.template'
27
28 #TODO add a function field for volume? an onchange?
29 _columns = {
30 'width': fields.float('Width', help="The width in m."),
31 'length': fields.float('Length', help="The length in m."),
32 'height': fields.float('Height', help="The height in m."),
33 }
34
035
=== added file 'product_dimension/product_view.xml'
--- product_dimension/product_view.xml 1970-01-01 00:00:00 +0000
+++ product_dimension/product_view.xml 2013-06-24 23:03:25 +0000
@@ -0,0 +1,29 @@
1<?xml version="1.0" encoding="utf-8"?>
2<!--
3 product_dimension for OpenERP
4 Copyright (C) 2013 Akretion (http://www.akretion.com/)
5 @author: Sébastien BEAU <sebastien.beau@akretion.com>
6 The licence is in the file __openerp__.py
7-->
8
9
10<openerp>
11 <data>
12
13 <record id="product_normal_form_view" model="ir.ui.view">
14 <field name="name">product_dimension.product.normal.form.view</field>
15 <field name="model">product.product</field>
16 <field name="inherit_id" ref="product.product_normal_form_view" />
17 <field name="type">form</field>
18 <field name="arch" type="xml">
19 <group name="Weights" position="inside">
20 <field name="length" />
21 <field name="width" />
22 <field name="height" />
23 </group>
24 </field>
25 </record>
26
27 </data>
28</openerp>
29

Subscribers

People subscribed via source and target branches