From 622380a599c5e14c6300d69228cc38b6be3d7e8e Mon Sep 17 00:00:00 2001 From: Pawan Kumar Date: Thu, 17 Dec 2020 19:06:19 +0530 Subject: [PATCH] change customer to client in project file --- .../models/__pycache__/project.cpython-36.pyc | Bin 986 -> 2328 bytes cor_custom/models/project.py | 18 ++++++++++++++++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/cor_custom/models/__pycache__/project.cpython-36.pyc b/cor_custom/models/__pycache__/project.cpython-36.pyc index 12925873e2e02f254a29b089f026b44b853d7508..46ac86a6c90f6c4ec980849f79527afe5a46cafe 100644 GIT binary patch literal 2328 zcma)8OK%)S5T4gQyxz4PC!h!dG=c*w*<lw9*CxbYYGDb0}+f59iJW@gtm#DZB(cTIKG*Y(zZJ{a`Qe)=Q%z2kX*dRLwZ z=?C~4T7)P3%**|ep9iBL4@Y4hjUwOs-V=ccUwI;gaMpSmj@rnHL<>2shSL%4XWp>$ z7ovE>$c20^U3)Ac6UMc3B_K1-Pf|KwJ#8c&;A`&V0^Z0M-Y5|MD1>O%5;&O7pml#^%b zPk}w3D)g}l#s9L|qE;i%WMM3D5wqhd8n5P7s)F1&0c+9co4u$)jX-tI)EI*`k>?oD z6>^<{Iizwd(D;VVSOf3K^emo3a+gOeHaUB6;US`%s zQ^@A7S7|4tebIZgMskA{Kz+3RP!$HXIMxrzQc=nj@%S%T0LN(mr4?_;9u)`GQJtrM znoYT8Q&nm*U+@JcTc46kFyUHY;b1_=jG~=hT7l`RYDDQAMWv<4UlSlRD^oOJ;qwzr zZk+|a4vt~iyBKU;fg7H~brUaphQMO>2<@Xp^CHDq&&onlybFO^6?ti%X$tm6{7=5R zbS7O4_t;5^xukSnzZ457<)wip0#dUK&LN}E`ci2Z@zF5QIQ%@_#RcgNqI)&HMf7$} z?+|^9=&tJ~Nr4V0iR&c^4zV&Lx}PLx*tE?_H<1OFnY21YCAaYmGHgk#Y_~xfO)O3T z*PqvwP<{R8>38T7S}wjlz&ivBAPb^2m}6M4(A$8}hq*7F!QQKt60rsWR#eEI&$0fU1t#=!{j zs-fZ>&$m{>jQR+c{clP!0h)$qcCoxiS_x?-QqZ&~_@q>Mf~UvBP;a7FuA?EtvJ|e1 zgA@arEtVaWiSfOH_rsIJ<=va`+~&$EyeP#^t{&P0d>`U#?&0#nn|XSd)|vmpOM;>; zs$F;(j^Jp5BGrSIeSn19vN8uV1+Yn~jCEV{P zkQa;3Q~_7`7-mgTa^02H`Xho`*MCisXPSaY_ZVtQs^Ol$@lBq}>M4CoB0fJaIU_MIJvBZxw;(6KGBq{6peQpr zm2dK6cAv?ntR@_+ZaMjhB}F`w134@$1b~(l@u3p@ATAq_0O4XTAi=@N!o diff --git a/cor_custom/models/project.py b/cor_custom/models/project.py index a60d5f1..95c7d27 100755 --- a/cor_custom/models/project.py +++ b/cor_custom/models/project.py @@ -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 -