[5.0 stock] Error with 'multi' instances in stock.location

Bug #558364 reported by Omar (Pexego)
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Invalid
Undecided
Unassigned

Bug Description

Hi,

Fields stock_real, stock_virtual and stock_real_value, stock_virtual_value in stock_location columns shared the multi attribute: multi="stock", but the first pair want to call _product_qty_available() function and second pair want to call _product_value() function. The behaviour when you share the multi instance is that all multi fields call to the last function defined with the instance of multi then the four fields call to _product_value() function.

I include a patch that changes the multi instance of stock_real_value and stock_virtual_value for multi="value". It works well.

Revision history for this message
Omar (Pexego) (omar7r) wrote :
Changed in openobject-addons:
status: New → Triaged
Revision history for this message
Vinay Rana (OpenERP) (vra-openerp) wrote :

Hello Omar,

If we define different string for remaining two fields, It will call the same function again for those two fields which is not good.
So I think currently It will calculate all four field together with single call.
I think this not a bug so I am closing this issue.

Current me If I am wrong.

Thanks.

Changed in openobject-addons:
status: Triaged → Invalid
Revision history for this message
Omar (Pexego) (omar7r) wrote :

Hi vra,

If you define different string for these fields, these fields will call to their function (_product_value) and other two fields will call to their function (_product_qty_available). These two function are different. Now all fields call to _product_value() function, check it.

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.