act_window cannot access fields of source model via context!

Bug #556517 reported by Ferdinand
22
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Odoo Server (MOVED TO GITHUB)
Fix Released
Medium
Unassigned

Bug Description

Example

***************
class dimu_partner_d(osv.osv):
     _name = "dimu.partner_d"
     _table = "dimu_partner_d"
     _description = "Contractual Partner"
     _inherits = {'res.partner' : 'res_partner_id'}

     _columns = \
     {
        'res_partner_id' : fields.many2one
           ('res.partner', 'Partner', readonly=True, required=True, ondelete='cascade'),
***************

trying to write

    <act_window
      domain="[('partner_id', '=', res_partner_id),('account_id.type','in',['receivable','payable']),('reconcile_id','=',False)]"
      id="act_partner_d_receivables_payables"
      name="Receivables &amp; Payables"
      res_model="account.move.line"
      src_model="dimu.partner_d"
      view_mode="tree,form"
      view_type="form"/>

returns a "not exists error" on field
res_partner_id

Related branches

Changed in openobject-server:
status: New → Confirmed
milestone: none → 6.0
summary: - xml domain does not accept field name pointing to "inherited from"
- object
+ act_window cannot access fields of source model via context!
affects: openobject-server → openobject-client
Changed in openobject-client:
milestone: 6.0 → none
milestone: none → 6.0
Changed in openobject-client:
importance: Undecided → Wishlist
milestone: 6.0 → none
Revision history for this message
Naresh(OpenERP) (nch-openerp) wrote :

Hello,

I tried with latest trunk and at my end the move lines returns as expected. No such error !
Can you try with latest code.

Thanks,

Changed in openobject-client:
importance: Wishlist → Undecided
status: Confirmed → Incomplete
Revision history for this message
Ferdinand (office-chricar) wrote :

thanks - yes - later - when we migrate the app to V6

Revision history for this message
Samantha (samantha-z-mathews) wrote :

oi tudo,

eu poderia gerar no meu computer.see duplicado bugs.
i meaned i have seen it above my computer.

sorry for my bed english.

Revision history for this message
Ravindra Mekhiya(OpenERP) (rme-openerp) wrote :

Hello,

I have received the error on server side, the context does not get values of fields of model on act_window.

Thank you.

Changed in openobject-client:
status: Incomplete → Confirmed
affects: openobject-client → openobject-server
Revision history for this message
Olivier Dony (Odoo) (odo-openerp) wrote :

An improved fix has landed in openobject-server/trunk with revision 2574 - <email address hidden>
This also fixes the duplicate bugs of this bug.

In fact the problem with the domain already had a workaround implemented as nch said, but should be fixed properly now.

Changed in openobject-server:
importance: Undecided → Medium
milestone: none → 6.0
status: Confirmed → 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.