Merge branch 'pawan_branch' into 'development'
update divide by 0 condition See merge request prakash.jain/cor-odoo!56
This commit is contained in:
commit
407fa91197
|
@ -178,7 +178,8 @@ class InheritProjectProductEmployeeMap(models.Model):
|
|||
val.cost = val.project_id.budgeted_revenue * (val.project_id.manager_per/100) * (val.distribution_per/100)
|
||||
else:
|
||||
val.cost = val.project_id.budgeted_revenue * (val.project_id.employee_per/100) * (val.distribution_per/100)
|
||||
val.budgeted_qty = val.cost/val.price_unit
|
||||
if val.price_unit > 0.0:
|
||||
val.budgeted_qty = val.cost/val.price_unit
|
||||
else:
|
||||
val.cost = 0.0
|
||||
#val.cost = val.budgeted_qty * val.price_unit
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
<field name="budgeted_revenue"
|
||||
attrs="{'invisible': [('pricing_type','=','fixed_rate')], 'required': [('pricing_type','!=','fixed_rate')]}"/>
|
||||
<field name="hour_distribution" widget="radio"
|
||||
attrs="{'invisible': [('project_type','!=','hours_in_consultant')]}"/>
|
||||
attrs="{'invisible': ['|',('project_type','!=','hours_in_consultant'),('pricing_type','=','fixed_rate')]}"/>
|
||||
<field name="manager_per" attrs="{'invisible': [('hour_distribution','!=','Percentage')]}"/>
|
||||
<field name="employee_per" attrs="{'invisible': [('hour_distribution','!=','Percentage')]}"/>
|
||||
<field name="expenses_per" attrs="{'invisible': [('pricing_type','=','fixed_rate')]}"/>
|
||||
|
|
Loading…
Reference in New Issue