Sale : UoS not updated anymore when not displayed

Bug #532728 reported by Numérigraphe
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Fix Released
High
gpa(OpenERP)
Nominated for 5.0 by Numérigraphe

Bug Description

When a user enters a new sale order and the UoS fields are not displayed (ex: not member of the group "product uos view"), the field UoS quantity is not updated with UoM quantity.
This is absolutely critical and leads to wrong invoices if they are created from the packing.
I think this bug appeared sometime between 5.0.6 and 5.0.7.
Lionel.

Related branches

Revision history for this message
Numérigraphe (numerigraphe) wrote :

I just asked the OpenERP paid maintenance team to investigate.

Changed in openobject-addons:
assignee: nobody → gpa(Open ERP) (gpa-openerp)
Changed in openobject-addons:
importance: Undecided → High
milestone: none → 5.0.8
Changed in openobject-addons:
status: New → Confirmed
Revision history for this message
Jay Vora (Serpent Consulting Services) (jayvora) wrote :

Hello Lionel,

Isn't this an issue of useability? Or I can say a configuration mistake.

Thinking about groups functionally, only those users can edit X field,if user has the rights to access that X field.

This is the case of onchange ONLY,where it can update the field,but when you press OK,it will only send the values of DISPLAYED field to the server for DB operations.

So, as a result;you do not get uos field updated. Reason: UOS group protects the display of that field.

Probable solutions:
1. Assign group to the user.
2. Remove group from the field restrictions(all can see the field, but it may lead to company policy).
3. Client behavior has to be changed for letting onchange values to be sent for DB opeartions.

I vote for 1 or 2.

Your views please.

Thanks.

Revision history for this message
Numérigraphe (numerigraphe) wrote :

Jay,
Please, try to imagine a company where all invoices are made from the packings.
Invoices created from the packings are wrong unless you show uos quantity, a field most company have no use seeing.
You can't make it right without deep knowledge of how UoS works, even when you don't want to use UoS.
When you don't make it right your invoices are all wrong and you lose money.
That's not just unusable - that's broken.

My view is that:
- a critical task such as updating the uos quantity should never have been trusted to the client in the first place
- unfortunately uos is updated client-side, so the only acceptable way to have correct invoices is solution 3.

I'm using solution 1 as a workaround, but it's not an elegant solution (we don't care for UoS), and solution 2 isn't either because as you said, "it may lead to company policy" and users scratching their heads.

Invoice from the packing is a basic feature, I beg you don't make it such a pain.
Lionel.

Revision history for this message
Stephane Wirtel (OpenERP) (stephane-openerp) wrote :

Indeed, we have an issue with the on_change event on the product_uos and product_uos_qty and the product.group_uos group.

I propose to remove the product.group_uos group on these fields.

Can you give me your feedback ?

Revision history for this message
Numérigraphe (numerigraphe) wrote : Re: [Bug 532728] Re: Sale : UoS not updated anymore when not displayed

Stephane (Open ERP) a écrit :
> I propose to remove the product.group_uos group on these fields.
>
That renders product.group_uos mostly useless. That is not a solution -
but if that's all you'll do in 5.0 then it's better that nothing.

Now, if only we were allowed to keep uos quantity empty, and have the
system use uom quantity by default, we would not need this client-side
workaround in the first place. That would be much cleaner, and I humbly
suggest it be done this way in the trunk.
To sum it up:
- don't change uos_quantity when uom_quantity is changed
- allow uos and uos_quantity to be empty
- use uom when uos is empty, and uom_quantity when uos_quantity is empty
Lionel

Revision history for this message
Stephane Wirtel (OpenERP) (stephane-openerp) wrote :

We have used my proposition who was to disable the group on the fields

Fixed with this revision: <email address hidden>

I just created a new bug report for an improvement for the next major release:

https://bugs.launchpad.net/openobject-addons/+bug/537254

Changed in openobject-addons:
status: Confirmed → Fix Released
Revision history for this message
Numérigraphe (numerigraphe) wrote :

Stéphane, your patch is not a complete solution because the tab on which the fields are placed can be hidden (group "extended view").
Here's what I suggest.
Lionel

Changed in openobject-addons:
status: Fix Released → In Progress
Revision history for this message
Stephane Wirtel (OpenERP) (stephane-openerp) wrote :

I checked and yes, you are right.

Thanks

Revision history for this message
Stephane Wirtel (OpenERP) (stephane-openerp) wrote :

Fixed 2656 <email address hidden>

Thanks

Changed in openobject-addons:
status: In Progress → Fix Released
Revision history for this message
Numérigraphe (numerigraphe) wrote :

Thank you Stéphane.
I don't mean to be rude, but next time please use the merge directive instead of patching on your own: bzr merge sale.uos-visible.merge
That will write my name in the log, so when I'm old my children are proud of all my oh-so-wonderful 2-lines patches.
Lionel

Revision history for this message
Stephane Wirtel (OpenERP) (stephane-openerp) wrote :

sorry, I did a bzr patch :/

but I have written Numerigraphe in the commit

Revision history for this message
Numérigraphe (numerigraphe) wrote :

Stephane (Open ERP) a écrit :
> sorry, I did a bzr patch :/
>
> but I have written Numerigraphe in the commit
>
>
Never mind - I'll tell the children, they'll understand :)

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.