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 protected]
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, -- You received this bug notification because you are a member of C2C OERPScenario, which is subscribed to OpenERP Project Group. https://bugs.launchpad.net/bugs/872686 Title: [trunk]sale:in sale order "history" tab refund the invoice Status in OpenERP Server: Confirmed 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. To manage notifications about this bug go to: https://bugs.launchpad.net/openobject-server/+bug/872686/+subscriptions _______________________________________________ Mailing list: https://launchpad.net/~c2c-oerpscenario Post to : [email protected] Unsubscribe : https://launchpad.net/~c2c-oerpscenario More help : https://help.launchpad.net/ListHelp

