MIG hr_expense_lead For Odoo 13.0

This commit is contained in:
Bhoomi
2019-09-11 14:21:35 -04:00
parent ef63ca0c6d
commit 0aabf81c80
4 changed files with 8 additions and 9 deletions

View File

@@ -1,6 +1,6 @@
{ {
'name': 'HR Expense Lead', 'name': 'HR Expense Lead',
'version': '12.0.1.0.0', 'version': '13.0.1.0.0',
'author': 'Hibou Corp. <hello@hibou.io>', 'author': 'Hibou Corp. <hello@hibou.io>',
'category': 'Human Resources', 'category': 'Human Resources',
'summary': 'Assign Opportunity/Lead to expenses for reporting.', 'summary': 'Assign Opportunity/Lead to expenses for reporting.',

View File

@@ -9,7 +9,6 @@ class CRMLead(models.Model):
compute_sudo=True) compute_sudo=True)
expense_ids = fields.One2many('hr.expense', 'lead_id', string='Expenses') expense_ids = fields.One2many('hr.expense', 'lead_id', string='Expenses')
@api.multi
@api.depends('expense_ids.total_amount') @api.depends('expense_ids.total_amount')
def _compute_expense_total_amount(self): def _compute_expense_total_amount(self):
for lead in self: for lead in self:

View File

@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8" ?> <?xml version="1.0" encoding="UTF-8" ?>
<odoo> <odoo>
<record id="crm_lead_form_opportunity_inherit" model="ir.ui.view"> <record id="crm_lead_view_form_inherit" model="ir.ui.view">
<field name="name">crm.lead.form.opportunity.inherit</field> <field name="name"> crm.lead.form.inherit</field>
<field name="model">crm.lead</field> <field name="model">crm.lead</field>
<field name="inherit_id" ref="crm.crm_case_form_view_oppor"/> <field name="inherit_id" ref="crm.crm_lead_view_form"/>
<field name="arch" type="xml"> <field name="arch" type="xml">
<xpath expr="//sheet/div[@name='button_box']" position="inside"> <xpath expr="//sheet/div[@name='button_box']" position="inside">
<button name="%(hr_expense.hr_expense_actions_all)d" class="oe_stat_button" icon="fa-money" type="action" context="{'search_default_lead_id': active_id}"> <button name="%(hr_expense.hr_expense_actions_all)d" class="oe_stat_button" icon="fa-money" type="action" context="{'search_default_lead_id': active_id}">

View File

@@ -11,12 +11,12 @@
</field> </field>
</record> </record>
<record id="view_hr_expense_filter_inherit" model="ir.ui.view"> <record id="hr_expense_view_search_inherit" model="ir.ui.view">
<field name="name">hr.expense.filter.inherit</field> <field name="name"> hr.expense.view.search.inherit</field>
<field name="model">hr.expense</field> <field name="model">hr.expense</field>
<field name="inherit_id" ref="hr_expense.view_hr_expense_filter"/> <field name="inherit_id" ref="hr_expense.hr_expense_view_search"/>
<field name="arch" type="xml"> <field name="arch" type="xml">
<xpath expr="//field[@name='product_id']" position="after"> <xpath expr="//field[@name='employee_id']" position="after">
<field name="lead_id"/> <field name="lead_id"/>
</xpath> </xpath>
</field> </field>