problem after installing modul 'sale_layout'

Bug #856291 reported by Manfred Rockel
68
This bug affects 10 people
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Fix Released
Low
OpenERP Publisher's Warranty Team

Bug Description

problem with modul 'sale_layout'

client(trunk) rev. 1955
server(trunk) rev. 3640
addons(trunk) rev. 5119

after deleting a sale order line - total amounts are not calculated.
insert a new sale order line it works.

without modul sale_layout - it works.

Tags: maintenance

Related branches

Amit Parik (amit-parik)
Changed in openobject-addons:
assignee: nobody → OpenERP R&D Addons Team 3 (openerp-dev-addons3)
importance: Undecided → Low
status: New → Confirmed
Changed in openobject-addons:
status: Confirmed → In Progress
Changed in openobject-addons:
status: In Progress → Confirmed
Changed in openobject-addons:
status: Confirmed → In Progress
Changed in openobject-addons:
status: In Progress → Confirmed
Changed in openobject-addons:
status: Confirmed → In Progress
Revision history for this message
Purnendu Singh (OpenERP) (purnendu-singh) wrote :

Hello Manfred Rockel,

This issue has finally fixed in lp:~openerp-dev/openobject-addons/trunk-bug-856291-psi and it will merge into main addons soon

Revision NO: 5747
Revision ID: <email address hidden>

Thanks and regards,
Purnendu Singh

Changed in openobject-addons:
status: In Progress → Fix Committed
Changed in openobject-addons:
milestone: none → 6.1
Revision history for this message
Fabien (Open ERP) (fp-tinyerp) wrote :

r6082

Changed in openobject-addons:
status: Fix Committed → Fix Released
Revision history for this message
Purnendu Singh (OpenERP) (purnendu-singh) wrote :

hello,

Problem still not fixed and as the mp is disapprove, I am re-opening this bug.

Thanks,
Purnendu singh

Changed in openobject-addons:
status: Fix Released → Confirmed
milestone: 6.1 → none
Revision history for this message
bruno bottacini (bruno-bottacini) wrote :

the problem is on account_invoice_layout too but only on saving

Revision history for this message
Antoine (antoine-suj) wrote :

IMHO, lp:~openerp-dev/openobject-addons/trunk-bug-856291-psi is not the solution.

In sale module, amounts fields of sale order are store and update on change of field "order_line".

Sale_layout module use " abstract_line_ids" instead of "order_line".
It's why, I have change sale_layout.py in sale_layout module to add an updating on amounts fields on change of "abstract_line_ids" field.

In sale_layout.py :

- add method :
    def _amount_all_l(self, cr, uid, ids, field_name, arg, context=None):
        return self.pool.get('sale.order')._amount_all(cr,uid,ids,field_name,arg,context)

    def _get_order_l(self, cr, uid, ids, context=None):
        return self.pool.get('sale.order')._get_order(cr,uid,ids,context)

- change amounts fields in columns :
    _columns = {
        .
        .
        .
        'amount_untaxed': fields.function(_amount_all_l, digits_compute= dp.get_precision('Sale Price'), string='Untaxed Amount',
            store = {
                'sale.order': (lambda self, cr, uid, ids, c={}: ids, ['order_line','abstract_line_ids'], 10),
                'sale.order.line': (_get_order_l, ['price_unit', 'tax_id', 'discount', 'product_uom_qty'], 10),
            },
            multi='sums', help="The amount without tax."),
         ...
     }

Revision history for this message
Amit Parik (amit-parik) wrote :

Hello Folks,

Sale_layout and account_invoice_layout modules are totally removed form the trunk, So this issue is only affecting for stable6.1.
As per out bug management policy we can consider only blocking point on stable version and this issue is not a blocking point.

For these type of issue, If you have a support and maintenance contract
with us then you can contact out OPW team at <email address hidden>.

Thanks for reporting!

Changed in openobject-addons:
assignee: OpenERP R&D Addons Team 3 (openerp-dev-addons3) → nobody
status: Confirmed → Invalid
Revision history for this message
Alexis de Lattre (alexis-via) wrote :

RAAAAH, I hit this very bad bug just a few days after upgrading my biggest customer from OpenERP 5.0 to OpenERP 6.1. I was about to open a new bug report with my patch, but Launchpad told me that this bug may be a duplicate, and it is the case !

I'm very disappointed to see that this bug has been opened in September 2011, 6 months before the release of OpenERP 6.1, and it is still not fixed. I am not an expert in software developement, but I was able to write a patch for this bug in 15 minutes (I didn't see the solution posted in comment #5 at that time). This bug is CRITICAL, because you end up having sale order with wrong total amounts !!!

My patch is enclosed.

Revision history for this message
Mario Arias (the-clone-master) wrote :

How come sale orders with wrong totals are not a blocking point, coming from certified modules !!

Thanks to Antoine and Alexis, we can fix it easily, but I still can't conceive that all the community is forced to individually apply this kind of fixes, instead of having them applied to stable...

Same goes for many other "low priority" or "wish list" reports, that make me wonder how is it possible to run OpenERP in production without a contract with OpenERP S.A... or maybe that is the whole idea behind that policy in the first place... :(

I am happy and grateful that I can make a living out of OpenERP, and I try to contribute back as much as I can in response, but spending our scarce time in searching and applying patches is definitely wrong...

Regards,
-Mario

Changed in openobject-addons:
assignee: nobody → OpenERP Publisher's Warranty Team (openerp-opw)
status: Invalid → New
tags: added: maintenance
Revision history for this message
Alexis de Lattre (alexis-via) wrote :

By the way, the bug is also present in OpenERP 6.0. In OpenERP 6.0, the bug also happens when you just add a new sale order line !!!

The bug is not present in OpenERP 5.0 because the fields amount_* of sale.order were not stored in OpenERP 5.0.

Changed in openobject-addons:
status: New → In Progress
Revision history for this message
Kirti Savalia(OpenERP) (ksa-openerp) wrote :

Hello,

This issue has been fixed in https://code.launchpad.net/~openerp-dev/openobject-addons/6.0-opw-577292-ksa
revision-id: <email address hidden>
revno: 5310

This issue has been fixed in http://bazaar.launchpad.net/~openerp-dev/openobject-addons/6.1-opw-576620-ksa/
revision-id: <email address hidden>
revno: 6882

It will be soon merged in the stable branch.

Thanks

Changed in openobject-addons:
status: In Progress → Fix Committed
Revision history for this message
Steffi Frank (Bremskerl, DE) (steffi-frank) wrote :

Manfred, will you let us know how to reproduce thi issue? we tried but failed....

Thanks in advance
Steffi

Revision history for this message
Alexis de Lattre (alexis-via) wrote :

@Steffi,

It's easy to reproduce : on OpenERP 6.1 :
1) you need to have the sale_layout module installed
2) Create a new sale order with 2 sale order lines of 5 and 10 euros -> Save -> Total untaxed of sale order = 15
3) delete the sale order line with 5 euros -> Save -> Total untaxed of sale order = 15 !

Revision history for this message
Steffi Frank (Bremskerl, DE) (steffi-frank) wrote :

Alexis, thank you. Sorry, forgot to say we tried in 6.0 (the way you described above). Now I'm just a little bit afraid it COULD happen in 6.0 as well...

Changed in openobject-addons:
status: Fix Committed → Invalid
status: Invalid → New
status: New → Fix Committed
Revision history for this message
Xavier ALT (dex-phx) wrote :

Hi,

Fixed by server v6.1 revid: <email address hidden>

Regards,
Xavier

Changed in openobject-addons:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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