← Back to team overview

openerp-dev team mailing list archive

Concerning act_window's view_id attribute

 

Hello everyone,

As you have probably noticed, I have modified the validation rules (RNG) for the <act_window> XML tag. This may uncover problems in several addons, which should be fixed asap.

I fixed the server to properly support a "view_id" attribute for <act_window> elements to set the view_id of the corresponding ir.actions.act_window record. This is very useful in many cases (for example osv_memory wizards with multiple views for multiple steps)

Many addons already had such view_id attributes, but it was not working yet. After this server change, these attributes will start working, so new errors may occur if the view_id value was not correct.

Another thing that changed: I removed the "view" attribute of act_window in the RNG, to avoid confusion with "view_id". Only 2 modules were using "view", and needed to be fixed to use view_id instead (already fixed in trunk):
 - account_followup/account_followup_view.xml
 - crm/wizard/crm_partner_to_opportunity_view.xml

Here is another example in project module that was failing (fixed in trunk too):

project/board_project_manager_view.xml: 18

  <act_window domain="[('user_id','=',uid),('state','&lt;&gt;','close')]"
              id="act_my_account"
              name="My accounts to invoice"
              res_model="account.analytic.account"
              view_id="view_account_analytic_simplified"
              view_mode="tree,form"
              view_type="form"/>

The "view_account_analytic_simplified" ID is not correct, so removed it, as I suppose it was not necessary anyway.

There are probably other similar issues, so please try to install all modules your team is responsible for, and double-check that all goes well with the <act_window> elements.

--
Olivier Dony