[trunk]sale:in sale order "history" tab refund the invoice

Bug #872686 reported by Kirti Savalia(OpenERP)
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Fix Released
Medium
OpenERP R&D Addons Team 2

Bug Description

Steps to recreate:
[1]create the sale order.
[2]confirm the sale order.
[3]create final invoice.
[4]Goto the "history" tab on sale order validate the invoice and refund that invoice.

Got the view error.

Related branches

Amit Parik (amit-parik)
Changed in openobject-addons:
assignee: nobody → OpenERP R&D Addons Team 3 (openerp-dev-addons3)
importance: Undecided → Medium
status: New → Confirmed
Changed in openobject-addons:
assignee: OpenERP R&D Addons Team 3 (openerp-dev-addons3) → OpenERP R&D Addons Team 2 (openerp-dev-addons2)
Revision history for this message
Kirti Savalia(OpenERP) (ksa-openerp) wrote :

Hello,

It has been Fixed in http://bazaar.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-872686-ksa/
revision-id: <email address hidden>
revno: 5350
It will be available in trunk soon.

Thanks.

Changed in openobject-addons:
status: Confirmed → In Progress
status: In Progress → Fix Committed
Revision history for this message
qdp (OpenERP) (qdp) wrote :

not a good fix. Set the bug back to confirmed status

Changed in openobject-addons:
status: Fix Committed → Confirmed
Revision history for this message
Kirti Savalia(OpenERP) (ksa-openerp) wrote :

Hello,

I checked this issue.I think it can be fix from server team.

Thanks.

Revision history for this message
Rucha (Open ERP) (rpa-openerp) wrote :

Hello Kirti,
Can you please be more specific to state the reason or proper workaround for this problem that led to decide this problem is from server side,
this may help them and us,
thanks

Revision history for this message
Kirti Savalia(OpenERP) (ksa-openerp) wrote :

Hello,

In the orm fields_view_get() method get proper view id but in apply_view_inheritance() method that is does not get the proper model for the particular view passed into the context.
IMHO this bug is tends to the Framework team, not for R&D team.

Thanks.

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

Hello,

I have checked this issue, but the problem is that, we can not passed the from view reference in context.

So I am assigning this to Framework team.

Thanks.

affects: openobject-addons → openobject-server
Changed in openobject-server:
assignee: OpenERP R&D Addons Team 2 (openerp-dev-addons2) → OpenERP's Framework R&D (openerp-dev-framework)
Revision history for this message
Naresh(OpenERP) (nch-openerp) wrote :

Hello,

Well the problem is the context key *form_view_ref* which is set on the invoice M2M. As this is set on the field so it will be available for each record and in turn will be available for each subset of that record i.e buttons,actions etc so when you click on refund button this key is also passed in the context . Now you may be wondering why this worked in 6.0 ? the reason is in 6.0 we were allowing views to be returned by model and view_id and now we improved in trunk to support view inheritance by copy, means there are cases where several objects would like to use a single view, but by default they cannot because a view belongs to only one model. With this change, it becomes possible to do inheritance "by copy", reusing a view from another model without having to redefine it, just by specifying its view_id in the relevant actions. If the original view needs to be modified, it is also possible to explicitly inherit the parent view from the other model, and the effect will be what is expected: the child view can be specified in an action, and will be the result of the inheritance applied on the parent view; but on the other hande the parent view itself is unaffected when used in the context of its own model. This change was done at 3358 <email address hidden>

So the possible solution is to remove this key from the context before calling fields_view_get from account_invoice_refund

Correct me if I missed something !

Regards,

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

so the bug should go back to addons :)

affects: openobject-server → openobject-addons
Changed in openobject-addons:
assignee: OpenERP's Framework R&D (openerp-dev-framework) → OpenERP R&D Addons Team 2 (openerp-dev-addons2)
Revision history for this message
Kirti Savalia(OpenERP) (ksa-openerp) wrote :

Hello,

Thanks For the nice explanation.
It has been Fixed in http://bazaar.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-872686-ksa/
Revision ID: <email address hidden>
Revision NO:5354
It will be available in trunk soon.

Thanks.

Changed in openobject-addons:
status: Confirmed → Fix Committed
Revision history for this message
Raphael Collet (OpenERP) (rco-openerp) wrote :

landed in trunk
revno: 6023
revision-id: <email address hidden>

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.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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