This commit is contained in:
prakash 2022-04-12 21:46:21 +05:30
commit dbb8ec99f6
2 changed files with 4 additions and 3 deletions

View File

@ -72,6 +72,7 @@ class Project(models.Model):
project_cons_hrs = fields.One2many('project.consultant.hrs', 'project_id', 'Consultant Allocation', copy=False)
comment = fields.Text(string='Comment')
tag_ids = fields.Many2many('custom.project.tags', string='Tags')
is_check = fields.Boolean()
@api.onchange('allowed_internal_user_ids')
def onchange_add_allowed_internal_users(self):
@ -109,7 +110,7 @@ class Project(models.Model):
'employee_id': rec[1],
'timesheet_hour': rec[2]})
@api.depends('cost', 'expenses_amt', 'budgeted_revenue')
@api.depends('cost', 'expenses_amt', 'budgeted_revenue', 'is_check')
def _compute_calc(self):
for record in self:
consultant_cost = 0.0
@ -139,8 +140,7 @@ class Project(models.Model):
# record.profit_per = (record.profit_amt / record.budgeted_revenue) * 100
##### CR Changes
if record.actual_revenue > record.total_expenses:
record.profit_amt = record.actual_revenue - record.total_expenses
record.profit_amt = record.actual_revenue - record.total_expenses
if record.profit_amt > 0.0 and record.actual_revenue > 0.0:
record.profit_per = (record.profit_amt / record.actual_revenue) * 100
########################

View File

@ -59,6 +59,7 @@
<field name="sale_line_id" string="Default Sales Order Item"
invisible="1"
options="{'no_create': True, 'no_edit': True, 'delete': False}"/>
<field name="is_check" invisible="1"/>
</group>
<field name="sale_line_employee_ids"
attrs="{'invisible': ['|', ('bill_type', '!=', 'customer_project'), ('pricing_type', '!=', 'employee_rate')]}">