Merge branch 'pawan_branch' into 'development'

change customer to client in project file

See merge request prakash.jain/cor-odoo!14
This commit is contained in:
pawan.sharma 2020-12-17 05:36:55 -08:00
commit a1db2d6bbb
2 changed files with 16 additions and 2 deletions

View File

@ -3,6 +3,22 @@
from odoo import api, fields, models, _
class Project(models.Model):
_inherit = 'project.project'
bill_type = fields.Selection([
('customer_task', 'Invoice tasks separately to different clients'),
('customer_project', 'Invoice all tasks to a single client')
], string="Client Type", default="customer_task",
help='When billing tasks individually, a Sales Order will be created from each task. It is perfect if you would like to bill different services to different clients at different rates. \n When billing the whole project, a Sales Order will be created from the project instead. This option is better if you would like to bill all the tasks of a given project to a specific client either at a fixed rate, or at an employee rate.')
pricing_type = fields.Selection([
('fixed_rate', 'Fixed rate'),
('employee_rate', 'Consultant rate')
], string="Pricing", default="fixed_rate",
help='The fixed rate is perfect if you bill a service at a fixed rate per hour or day worked regardless of the consultant who performed it. The consultant rate is preferable if your employees deliver the same service at a different rate. For instance, junior and senior consultants would deliver the same service (= consultancy), but at a different rate because of their level of seniority.')
class InheritProjectProductEmployeeMap(models.Model):
_inherit = 'project.sale.line.employee.map'
@ -10,11 +26,9 @@ class InheritProjectProductEmployeeMap(models.Model):
budgeted_qty = fields.Float(string='Budgeted qty', related='sale_line_id.product_uom_qty', readonly=True)
budgeted_uom = fields.Many2one('uom.uom', string='Budgeted UOM', related='sale_line_id.product_uom', readonly=True)
@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