@@ -100,12 +100,6 @@ res_partner_address()
|
||||
|
||||
class res_partner_job(osv.osv):
|
||||
|
||||
def _get_partner_id(self, cr, uid, ids, *a):
|
||||
res={}
|
||||
for id in self.browse(cr, uid, ids):
|
||||
res[id.id] = id.address_id.partner_id and id.address_id.partner_id.id or False
|
||||
return res
|
||||
|
||||
def name_get(self, cr, uid, ids, context={}):
|
||||
if not len(ids):
|
||||
return []
|
||||
@@ -127,7 +121,7 @@ class res_partner_job(osv.osv):
|
||||
_description ='Contact Job Title'
|
||||
_order = 'sequence_contact'
|
||||
_columns = {
|
||||
'name': fields.function(_get_partner_id, method=True, type='many2one', relation='res.partner', string='Partner',store=True),
|
||||
'name': fields.related('address_id','partner_id', type='many2one', relation='res.partner', string='Partner'),
|
||||
'address_id':fields.many2one('res.partner.address','Address', required=True),
|
||||
'contact_id':fields.many2one('res.partner.contact','Contact', required=True),
|
||||
'function_id': fields.many2one('res.partner.function','Job Title', required=True),
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
"version":"1.0",
|
||||
"author":"Tiny",
|
||||
"category":"Board/Associations",
|
||||
"depends":["event","membership","board"],
|
||||
"depends":["event","membership","board","project"],
|
||||
"demo_xml":["board_association_demo.xml"],
|
||||
"update_xml":["board_association_view.xml"],
|
||||
"description": """
|
||||
|
||||
@@ -1,63 +1,63 @@
|
||||
<?xml version="1.0"?>
|
||||
<openerp>
|
||||
<data>
|
||||
<record model="board.note.type" id="note_association_type">
|
||||
<field name="name">associations</field>
|
||||
</record>
|
||||
<data>
|
||||
<record model="board.note.type" id="note_association_type">
|
||||
<field name="name">associations</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="board_associations_manager_form">
|
||||
<field name="name">board.associations.manager.form</field>
|
||||
<field name="model">board.board</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Association Dashboard">
|
||||
<hpaned position="100">
|
||||
<child1>
|
||||
<action string="Next Events"
|
||||
name="%(event.action_event_registration)d"
|
||||
colspan="4"/>
|
||||
<action
|
||||
string="My tasks"
|
||||
name="%(project.action_view_task5)d"
|
||||
colspan="4"
|
||||
height="200"
|
||||
width="510"/>
|
||||
<action
|
||||
string="Unpaid Invoices"
|
||||
name="%(account.action_invoice_tree7)d"
|
||||
colspan="4"/>
|
||||
</child1>
|
||||
<record model="ir.ui.view" id="board_associations_manager_form">
|
||||
<field name="name">board.associations.manager.form</field>
|
||||
<field name="model">board.board</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Association Dashboard">
|
||||
<hpaned position="100">
|
||||
<child1>
|
||||
<action string="Next Events"
|
||||
name="%(event.action_event_registration)d"
|
||||
colspan="4"/>
|
||||
<action
|
||||
string="My tasks"
|
||||
name="%(project.action_view_task5_prog)d"
|
||||
colspan="4"
|
||||
height="200"
|
||||
width="510"/>
|
||||
<action
|
||||
string="Unpaid Invoices"
|
||||
name="%(account.action_invoice_tree7)d"
|
||||
colspan="4"/>
|
||||
</child1>
|
||||
|
||||
<child2>
|
||||
<action
|
||||
string="New members"
|
||||
name="%(membership.action_report_partner_member_year_tree)d"
|
||||
view_mode="graph,tree" colspan="4"/>
|
||||
<action
|
||||
string="Registrations by Events"
|
||||
name="%(event.action_event_type_registration)d"
|
||||
view_mode="graph,tree"
|
||||
colspan="4"/>
|
||||
</child2>
|
||||
</hpaned>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
<child2>
|
||||
<action
|
||||
string="New members"
|
||||
name="%(membership.action_report_partner_member_year_tree)d"
|
||||
view_mode="graph,tree" colspan="4"/>
|
||||
<action
|
||||
string="Registrations by Events"
|
||||
name="%(event.action_event_type_registration)d"
|
||||
view_mode="graph,tree"
|
||||
colspan="4"/>
|
||||
</child2>
|
||||
</hpaned>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.actions.act_window" id="open_board_associations_manager">
|
||||
<field name="name">Association Dashboard</field>
|
||||
<field name="res_model">board.board</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="view_id" ref="board_associations_manager_form"/>
|
||||
</record>
|
||||
<record model="ir.actions.act_window" id="open_board_associations_manager">
|
||||
<field name="name">Association Dashboard</field>
|
||||
<field name="res_model">board.board</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="view_id" ref="board_associations_manager_form"/>
|
||||
</record>
|
||||
|
||||
<menuitem
|
||||
name="Associations" parent="board.dashboard_menu"
|
||||
action="open_board_associations_manager"
|
||||
sequence="1"
|
||||
id="menu_board_associations_manager"
|
||||
icon="terp-graph"/>
|
||||
<menuitem
|
||||
name="Associations" parent="board.dashboard_menu"
|
||||
action="open_board_associations_manager"
|
||||
sequence="1"
|
||||
id="menu_board_associations_manager"
|
||||
icon="terp-graph"/>
|
||||
|
||||
</data>
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
Reference in New Issue
Block a user