[MIG] hr_expense_lead: to 16v

This commit is contained in:
Leo Pinedo
2022-11-02 20:09:59 +00:00
parent 392bdac295
commit 2cf7c6c434
2 changed files with 5 additions and 4 deletions

View File

@@ -1,6 +1,6 @@
{ {
'name': 'HR Expense Lead', 'name': 'HR Expense Lead',
'version': '14.0.1.0.0', 'version': '16.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

@@ -1,13 +1,14 @@
from odoo.addons.hr_expense.tests.test_expenses import TestExpenses
from odoo.tests import common from odoo.tests import common
class TestCheckVendor(common.TransactionCase): class TestCheckVendor(TestExpenses):
def test_fields(self): def test_fields(self):
lead = self.env['crm.lead'].create({'name': 'Test Lead'}) lead = self.env['crm.lead'].create({'name': 'Test Lead'})
expense = self.env['hr.expense'].create({ expense = self.env['hr.expense'].create({
'name': 'Test Expense', 'name': 'Test Expense',
'product_id': self.env['product.product'].search([('can_be_expensed', '=', True)], limit=1).id, 'product_id': self.product_a.id,
'employee_id': self.env['hr.employee'].search([], limit=1).id, 'employee_id': self.expense_employee.id,
'unit_amount': 34.0, 'unit_amount': 34.0,
}) })
self.assertFalse(lead.expense_ids) self.assertFalse(lead.expense_ids)