openerp wizard is calling base res.partner form instead of mine
Date : March 29 2020, 07:55 AM
I wish this help you The search_view_id field in an action definition is used to specify the search view to use, not the form view, as the name implies. If you want to use a specific form view you should use the view_id field instead (which is used to specify the main view to open, typically a form or tree one). And by the way all the view selection fields in an OpenERP action definition may be overridden by specifying a views field: an ordered list of pairs (view_id, view_mode) where view_id can be False to use the default view. This is a computed field that the framework automatically adds on regular actions, but may be manually added to a custom action returned by a Python method. Here is how you could do it in a Python method: # assuming partner_id, context, form_view_id are defined here
return {
'type': 'ir.actions.act_window',
'view_type': 'form',
'view_mode': 'form,tree',
'res_model': 'res.partner',
'res_id': int(partner_id),
'context': context,
'view_id': form_view_id,
# optionally, you could refine by specifying the 'views' explicitly
'views': [(form_view_id, 'form'), # open my form view first,
(False, 'tree')] # then default tree view
}
|
OpenERP - not getting list of customers from res.partner on tree view
Tag : python , By : user133834
Date : March 29 2020, 07:55 AM
around this issue When you are inheriting a model and creating another model, the new model will not have the data from inherited model. Here you inherited 'res.partner' and created new model 'delivery.forcast'. So data will be stored in new table 'delivery_forecast'. You have to specify the table name of the inherited model in order to show all the data. ie, You have to give like this _name = 'delivery.forcast' _inherit = 'res.partner' _table = 'res_partner' Then it will show all the data in res_partner
|
Extending re.partner, in OpenERP
Date : March 29 2020, 07:55 AM
hop of those help? A few problems here: You have defined both a _name and a _inherit and they have different values. There is nothing wrong this if what you want is a whole new table called starstream.customers whose columns are a superset of the res.partner model with your new ones added in but then you are using the existing res_partner table for storage.
|
How to filter contact person for partner in OpenERP?
Tag : python , By : Simon Capewell
Date : March 29 2020, 07:55 AM
I hope this helps you . I want to add partner's contact person and it Should filter customers contacts based on partner , The domain attribute is used to filter records. Try this: <field name="partner_contact_id" domain="[('parent_id', '=', partner_id)]" />
<field name="partner_id" on_change="onchange_partner_id(partner_id, context)" ...your other attributes.../>
def onchange_partner_id(self, cr, uid, ids, part, context=None):
res = super(MyCustomModel, self).onchange_partner_id(cr, uid, ids, part, context)
res['value'].update({'partner_contact_id': False})
return res
|
Show partner address into tree view - OpenERP
Tag : python , By : user157654
Date : March 29 2020, 07:55 AM
With these it helps As per my point of view, context is used for often available as contextual actions on resources; context is nothing but a python directory.
|