diff --git a/cor_custom/__manifest__.py b/cor_custom/__manifest__.py index 517a6b0..2e73341 100644 --- a/cor_custom/__manifest__.py +++ b/cor_custom/__manifest__.py @@ -20,11 +20,12 @@ 'version': '0.1', # any module necessary for this one to work correctly - 'depends': ['base'], + 'depends': ['base', 'sale_timesheet'], # always loaded 'data': [ # 'security/ir.model.access.csv', + 'views/project_view.xml', 'views/views.xml', 'views/templates.xml', ], diff --git a/cor_custom/__pycache__/__init__.cpython-36.pyc b/cor_custom/__pycache__/__init__.cpython-36.pyc new file mode 100644 index 0000000..a2ca7f5 Binary files /dev/null and b/cor_custom/__pycache__/__init__.cpython-36.pyc differ diff --git a/cor_custom/controllers/__pycache__/__init__.cpython-36.pyc b/cor_custom/controllers/__pycache__/__init__.cpython-36.pyc new file mode 100644 index 0000000..a4434d0 Binary files /dev/null and b/cor_custom/controllers/__pycache__/__init__.cpython-36.pyc differ diff --git a/cor_custom/controllers/__pycache__/controllers.cpython-36.pyc b/cor_custom/controllers/__pycache__/controllers.cpython-36.pyc new file mode 100644 index 0000000..38c46b7 Binary files /dev/null and b/cor_custom/controllers/__pycache__/controllers.cpython-36.pyc differ diff --git a/cor_custom/models/__init__.py b/cor_custom/models/__init__.py index 5305644..a0c0dd3 100644 --- a/cor_custom/models/__init__.py +++ b/cor_custom/models/__init__.py @@ -1,3 +1,4 @@ # -*- coding: utf-8 -*- -from . import models \ No newline at end of file +from . import models +from . import project \ No newline at end of file diff --git a/cor_custom/models/__pycache__/__init__.cpython-36.pyc b/cor_custom/models/__pycache__/__init__.cpython-36.pyc new file mode 100644 index 0000000..cdcfb0d Binary files /dev/null and b/cor_custom/models/__pycache__/__init__.cpython-36.pyc differ diff --git a/cor_custom/models/__pycache__/models.cpython-36.pyc b/cor_custom/models/__pycache__/models.cpython-36.pyc new file mode 100644 index 0000000..18206e2 Binary files /dev/null and b/cor_custom/models/__pycache__/models.cpython-36.pyc differ diff --git a/cor_custom/models/__pycache__/project.cpython-36.pyc b/cor_custom/models/__pycache__/project.cpython-36.pyc new file mode 100644 index 0000000..58c8290 Binary files /dev/null and b/cor_custom/models/__pycache__/project.cpython-36.pyc differ diff --git a/cor_custom/models/project.py b/cor_custom/models/project.py new file mode 100755 index 0000000..5692ac8 --- /dev/null +++ b/cor_custom/models/project.py @@ -0,0 +1,17 @@ +# -*- coding: utf-8 -*- + +from odoo import api, fields, models, _ + + +class InheritProjectProductEmployeeMap(models.Model): + _inherit = 'project.sale.line.employee.map' + + employee_price = fields.Float("Employee Price") + + @api.onchange('employee_id') + def _onchange_employee_price(self): + if self.employee_id: + self.employee_price = self.employee_id.timesheet_cost + else: + self.employee_price = 0.0 + diff --git a/cor_custom/views/project_view.xml b/cor_custom/views/project_view.xml new file mode 100755 index 0000000..ef4c630 --- /dev/null +++ b/cor_custom/views/project_view.xml @@ -0,0 +1,39 @@ + + + + + project.project.form.inherit + project.project + + + + + + + + +
+
+ + + +
+ + + + + + + + + + + + +
+
+
+
+