[6.0] ir.property created even if the value is the same as generic property

Bug #726592 reported by Guewen Baconnier @ Camptocamp
22
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Odoo Server (MOVED TO GITHUB)
Status tracked in Trunk
6.0
Fix Released
Medium
OpenERP Publisher's Warranty Team
Trunk
Fix Released
Medium
OpenERP's Framework R&D

Bug Description

Hello,

This issue happens on the 6.0 stable (I reproduced the bug on the revno 3353).

The problem is that new ir properties are created each time you create a new object (like product category or product), even if you don't select another value than the default value.

To reproduce it :
1) bzr branch on openerp 6 stable branches
2) create a new database with demo data
3) do the configuration wizard, check the Sales Management in the step "Install Applications"
4) go to the Administration > Configuration > Parameters > Configuration Parameters and take note of the generic property_account_expense_categ value (ie. "4200 Achats de marchandises article X") and the generic property_account_income_categ value (ie. "1000 Caisse principale")
5) go to Sales > Configuration > Product > Products Categories
6) create a new category, only fill the name field, don't change the accounting properties
7) return to the Configuration Parameters and see that there is two new properties property_account_expense_categ and property_account_income_categ binded with your new category, open them
8) see that their values are the same that the default property

I hope my explanation is clear.

Thanks
Guewen

Related branches

Revision history for this message
Azazahmed Saiyed (OpenERP) (saz-openerp) wrote :

Hello Guewen,

Thanks for reporting. I am confirming the issue as it is making the duplicate entries in database with the same value as generic property.

If one create new category of any product and did not change any of accounting properties then it should be consider under the generic property as we did with the demo data of category.

But if one makes the category with changes in accounting properties then we allow to create the new one instead of generic.

Hope you will agree with this.

Thanks.

Changed in openobject-server:
importance: Undecided → Medium
status: New → Confirmed
assignee: nobody → OpenERP's Framework R&D (openerp-dev-framework)
Revision history for this message
Guewen Baconnier @ Camptocamp (gbaconnier-c2c) wrote :

Hello,

I agree with your comment, I think the behavior you described is the expected one.

Thanks
Guewen

Revision history for this message
Olivier Dony (Odoo) (odo-openerp) wrote :

This looks like a nice-to-have improvement and not a bug, as it does not cause any issue to use OpenERP.
Yes we could avoid creating the property entry, but it doesn't matter much and the property field will behave fine in any case.
It is certainly not a Medium issue, unless I'm missing something in the description of this issue?

Thanks for correcting me if I missed anything.

Changed in openobject-server:
importance: Medium → Wishlist
Revision history for this message
Guewen Baconnier @ Camptocamp (gbaconnier-c2c) wrote :

Hello,

I don't think this is a nice-to-have but a real issue.
I see 2 usages for properties :
 - different values for a field on multi-companies
 - possibility to have default values on a field
This bug breaks the second usage, which was perfectly working on OpenERP 5.0.

I give you an example :

You have these categories with accounts:
Version 5.0 and expected behavior :
- category A - account 4200 (default property)
--- category A1 - account 4200 (default property)
--- category A2 - account 4200 (default property)
--- category A3 - account 4210 (own property)
- category B - account 4200 (default property)
--- category B1 - account 4200 (default property)
--- category B2 - account 4200 (default property)

With this behavior, if you change the default property, all your categories will be updated with the new account.

But now in version 6.0 ::
- category A - account 4200 (own property)
--- category A1 - account 4200 (own property)
--- category A2 - account 4200 (own property)
--- category A3 - account 4210 (own property)
- category B - account 4200 (own property)
--- category B1 - account 4200 (own property)
--- category B2 - account 4200 (own property)

If you modify the default property, nothing will happen, you will have to modify the property on each category !

Moreover, this is a big performance cruncher because lines are rapidly increasing in the table ir.property, for example, with 3 properties on products, with 10'000 products you'll have 30'000 lines in ir.property, just add a property and you'll have 40'000 lines.

Thanks to reconsider this bug.

Revision history for this message
Raphaël Valyi - http://www.akretion.com (rvalyi) wrote : Re: [Bug 726592] Re: [6.0] ir.property created even if the value is the same as generic property
Download full text (3.7 KiB)

Hello,

I just wanted to say I agree 100% with Guewen: it's a feature loss but more
importantly, properties are already a bit slow by nature, so bloating the
properties table because of this bug will certainly have a very negative
impact. For me that's an important regression.
We have customers doing e-commerce, they easily add like 10 000 customers
per year, that would certainly bloat the property table given that bug.

On Wed, Mar 9, 2011 at 5:29 AM, Guewen Baconnier @ Camptocamp <
<email address hidden>> wrote:

> Hello,
>
> I don't think this is a nice-to-have but a real issue.
> I see 2 usages for properties :
> - different values for a field on multi-companies
> - possibility to have default values on a field
> This bug breaks the second usage, which was perfectly working on OpenERP
> 5.0.
>
> I give you an example :
>
> You have these categories with accounts:
> Version 5.0 and expected behavior :
> - category A - account 4200 (default property)
> --- category A1 - account 4200 (default property)
> --- category A2 - account 4200 (default property)
> --- category A3 - account 4210 (own property)
> - category B - account 4200 (default property)
> --- category B1 - account 4200 (default property)
> --- category B2 - account 4200 (default property)
>
> With this behavior, if you change the default property, all your
> categories will be updated with the new account.
>
> But now in version 6.0 ::
> - category A - account 4200 (own property)
> --- category A1 - account 4200 (own property)
> --- category A2 - account 4200 (own property)
> --- category A3 - account 4210 (own property)
> - category B - account 4200 (own property)
> --- category B1 - account 4200 (own property)
> --- category B2 - account 4200 (own property)
>
> If you modify the default property, nothing will happen, you will have
> to modify the property on each category !
>
> Moreover, this is a big performance cruncher because lines are rapidly
> increasing in the table ir.property, for example, with 3 properties on
> products, with 10'000 products you'll have 30'000 lines in ir.property,
> just add a property and you'll have 40'000 lines.
>
> Thanks to reconsider this bug.
>
> --
> You received this bug notification because you are subscribed to OpenERP
> Server.
> https://bugs.launchpad.net/bugs/726592
>
> Title:
> [6.0] ir.property created even if the value is the same as generic
> property
>
> Status in OpenERP Server:
> Confirmed
>
> Bug description:
> Hello,
>
> This issue happens on the 6.0 stable (I reproduced the bug on the
> revno 3353).
>
> The problem is that new ir properties are created each time you create
> a new object (like product category or product), even if you don't
> select another value than the default value.
>
> To reproduce it :
> 1) bzr branch on openerp 6 stable branches
> 2) create a new database with demo data
> 3) do the configuration wizard, check the Sales Management in the step
> "Install Applications"
> 4) go to the Administration > Configuration > Parameters > Configuration
> Parameters and take note of the generic property_account_expense_categ value
> (ie. "4200 Achats de marchandises article X") and the generic
>...

Read more...

Revision history for this message
Joël Grand-Guillaume @ camptocamp (jgrandguillaume-c2c) wrote :

Hi Olivier,

I must say I take the risk to re-qualify this bug as confirmed. I know I shouldn't, but I really want you to reconsider your opinion on this one...

First of all because it is a regression from v5.0, as explain in post #4. Then, Honestly, it is not acceptable to change thousands of product properties just because your default property of your company has change ! If you named it "default" property, this is for the purpose to be the default one. Changing it should change the behavior of all product, except the customized one.

I think you probably underestimate this bug report, so please consider it once again.

Thanks in advance,

Regards,

Joël

Changed in openobject-server:
importance: Wishlist → Medium
Changed in openobject-server:
status: Confirmed → In Progress
Revision history for this message
Yogesh (SerpentCS) (yogesh-serpentcs) wrote :

Hello,

Thanks for reporting.

It has been fixed at lp:~openerp-dev/openobject-server/trunk-bug-726592-ysa and it will be merged soon to the trunk server.

Thanks,

Changed in openobject-server:
status: In Progress → Fix Committed
Revision history for this message
Raphaël Valyi - http://www.akretion.com (rvalyi) wrote :

Hello Yogesh,

cool to see this fixed.
Now, since this was a regression against v5 behavior, it's hard to call that a "feature", any reason why the bugfix isn't commited to 6.0 branch also?

Thanks

Revision history for this message
Naresh(OpenERP) (nch-openerp) wrote :

yes a separate MP will be create for 6.0 too

Revision history for this message
Yogesh (SerpentCS) (yogesh-serpentcs) wrote :

Hello,

It has been fixed at lp:~openerp-dev/openobject-server/6.0-bug-726592-ysa and it will be merged soon to the stable 6.0 server branch.

Thanks,

Revision history for this message
Raphaël Valyi - http://www.akretion.com (rvalyi) wrote :

Very good, thanks!

On Mon, Jun 13, 2011 at 2:06 AM, Yogesh(Open ERP) <email address hidden> wrote:

> Hello,
>
> It has been fixed at lp:~openerp-dev/openobject-
> server/6.0-bug-726592-ysa and it will be merged soon to the stable 6.0
> server branch.
>
> Thanks,
>
> ** Changed in: openobject-server/6.0
> Status: Confirmed => Fix Committed
>
> --
> You received this bug notification because you are a member of OpenERP
> Drivers, which is subscribed to OpenERP Server.
> https://bugs.launchpad.net/bugs/726592
>
> Title:
> [6.0] ir.property created even if the value is the same as generic
> property
>
> Status in OpenERP Server:
> Fix Committed
> Status in OpenERP Server 6.0 series:
> Fix Committed
> Status in OpenERP Server trunk series:
> Fix Committed
>
> Bug description:
> Hello,
>
> This issue happens on the 6.0 stable (I reproduced the bug on the
> revno 3353).
>
> The problem is that new ir properties are created each time you create
> a new object (like product category or product), even if you don't
> select another value than the default value.
>
> To reproduce it :
> 1) bzr branch on openerp 6 stable branches
> 2) create a new database with demo data
> 3) do the configuration wizard, check the Sales Management in the step
> "Install Applications"
> 4) go to the Administration > Configuration > Parameters > Configuration
> Parameters and take note of the generic property_account_expense_categ value
> (ie. "4200 Achats de marchandises article X") and the generic
> property_account_income_categ value (ie. "1000 Caisse principale")
> 5) go to Sales > Configuration > Product > Products Categories
> 6) create a new category, only fill the name field, don't change the
> accounting properties
> 7) return to the Configuration Parameters and see that there is two new
> properties property_account_expense_categ and property_account_income_categ
> binded with your new category, open them
> 8) see that their values are the same that the default property
>
> I hope my explanation is clear.
>
> Thanks
> Guewen
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/openobject-server/+bug/726592/+subscriptions
>

Revision history for this message
Guewen Baconnier @ Camptocamp (gbaconnier-c2c) wrote :

Thanks for the fix and even more thanks for the merge in the stable branch !

Revision history for this message
Nathan (nathan-bowden-kiwi) wrote :

No luck yet for this fix on 6.0.2?

Revision history for this message
Vo Minh Thu (thu) wrote :

The fix is available in trunk at revision 3734 (revision-id: <email address hidden>).

Thanks for the bug report!

Revision history for this message
Rifakat Husen (OpenERP) (rha-openerp) wrote :

Landed on stable server 6.0,
Revision ID: <email address hidden>
Revision 3520

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.