<field name="search_view_id" ref="account.view_account_invoice_report_search"/>
</record>
- <record model="ir.ui.view" id="crm.board_crm_form">
- <field name="name">CRM - Dashboard Form</field>
- <field name="model">board.board</field>
- <field name="type">form</field>
- <field name="arch" type="xml">
- <form string="Connecting Dashboard">
- <hpaned>
- <child1>
- <action
- string="My Open Opportunities"
- name="%(crm.act_my_oppor)d"
- colspan="4"
- height="150"
- width="510"/>
-
- <action
- string="My Meetings"
- name="%(crm.act_my_meetings)d"
- height="150"
- colspan="4"/>
- <action
- string="My Quotations"
- name="%(action_quotation_for_sale_crm)d"
- colspan="4"
- height="150"
- width="510"/>
- </child1>
- <child2>
- <action
- string="Revenue by stage"
- name="%(crm.act_my_oppor_stage)d"
- colspan="4"/>
- <action
- string="My Sales Pipeline"
- name="%(crm.act_sales_pipeline)d"
- colspan="4"/>
- <action
- string="Turnover By Months"
- name="%(action_turnover_by_month)d"
- colspan="4"/>
- </child2>
- </hpaned>
- </form>
+ <record model="ir.ui.view" id="board_crm_form_inherit_child1">
+ <field name="name">board.crm.form.inherit.child1</field>
+ <field name="model">board.board</field>
+ <field name="type">form</field>
+ <field name="inherit_id" ref="crm.board_crm_form"/>
+ <field name="arch" type="xml">
+ <xpath expr="/form/hpaned/child1/action[@name='%(crm.act_my_meetings)d']" position="after">
+ <action
+ string="My Quotations"
+ name="%(action_quotation_for_sale_crm)d"
+ colspan="4"
+ height="150"
+ width="510"/>
+ </xpath>
+ </field>
+ </record>
+
+ <record model="ir.ui.view" id="board_crm_form_inherit_child2">
+ <field name="name">board.crm.form.inherit.child2</field>
+ <field name="model">board.board</field>
+ <field name="type">form</field>
+ <field name="inherit_id" ref="crm.board_crm_form"/>
+ <field name="arch" type="xml">
+ <xpath expr="/form/hpaned/child2/action[@name='%(crm.act_sales_pipeline)d']" position="after">
+ <action
+ string="Turnover By Months"
+ name="%(action_turnover_by_month)d"
+ colspan="4"/>
+ </xpath>
+ </field>
+ </record>
+
+ <record model="ir.ui.view" id="board_crm_form_inherit_replace1">
+ <field name="name">board.crm.form.inherit.replace1</field>
+ <field name="model">board.board</field>
+ <field name="type">form</field>
+ <field name="inherit_id" ref="crm.board_crm_form"/>
+ <field name="arch" type="xml">
+ <xpath expr="/form/hpaned/child2/action[@name='%(crm.act_sales_pipeline)d']" position="attributes">
+ <attribute name="string">My Sales Pipeline</attribute>
+ </xpath>
+ </field>
+ </record>
+
+ <record model="ir.ui.view" id="board_crm_form_inherit_replace2">
+ <field name="name">board.crm.form.inherit.replace2</field>
+ <field name="model">board.board</field>
+ <field name="type">form</field>
+ <field name="inherit_id" ref="crm.board_crm_form"/>
+ <field name="arch" type="xml">
+ <xpath expr="/form/hpaned/child2/action[@name='%(crm.act_my_oppor_stage)d']" position="attributes">
+ <attribute name="string">Revenue by stage</attribute>
+ </xpath>
</field>
</record>
+
</data>
</openerp>
'res_id': new_ids
}
return value
+
+ def _get_shop_id(self, cr, uid, ids, context=None):
+ if context is None:
+ context = {}
+ cmpny_id = self.pool.get('res.users')._get_company(cr, uid, context=context)
+ shop = self.pool.get('sale.shop').search(cr, uid, [('company_id', '=', cmpny_id)])
+ return shop and shop[0] or False
_columns = {
'shop_id': fields.many2one('sale.shop', 'Shop', required=True),
'close': fields.boolean('Close Case', help='Check this to close the case after having created the sale order.'),
}
_defaults = {
+ 'shop_id': _get_shop_id,
'partner_id': _selectPartner,
'close': 1
}
-
+
crm_make_sale()
class sale_order_make_line(osv.osv_memory):