Merge branch 'master-riddhi-05072018' into 'master-patch-july-2018'
Master riddhi 05072018 See merge request flectra-hq/flectra!89
This commit is contained in:
commit
6aee6c4511
@ -4,7 +4,7 @@
|
||||
import logging
|
||||
import time
|
||||
from os import listdir
|
||||
from os.path import join
|
||||
from os.path import join, isdir
|
||||
try:
|
||||
from queue import Queue, Empty
|
||||
except ImportError:
|
||||
|
@ -160,7 +160,7 @@ elif salary <= 2510.47:
|
||||
<field name="sequence">165</field>
|
||||
<field name="condition_select">python</field>
|
||||
<field name="appears_on_payslip" eval="False"/>
|
||||
<field name="condition_python">result = (((employee.marital in ['divorced', 'single', 'widower']) or (employee.marital=='married' and employee.spouse_fiscal_status=='without income')) and (employee.resident_bool!=True))</field>
|
||||
<field name="condition_python">result = (((employee.marital in ['divorced', 'single', 'widower']) or (employee.marital in ['married', 'cohabitant'] and employee.spouse_fiscal_status=='without income')) and (employee.resident_bool!=True))</field>
|
||||
<field name="amount_select">code</field>
|
||||
<field name="amount_python_compute">
|
||||
wage = categories.BASIC
|
||||
|
@ -131,8 +131,8 @@
|
||||
<field name="resident_bool" eval="False"/>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='marital']" position="after">
|
||||
<field name="spouse_fiscal_status" attrs="{'invisible':[('marital','!=','married')],'required':[('marital','=','married')]}" colspan="1" help="if spouse has professionnel income or not"/>
|
||||
<field name="disabled_spouse_bool" attrs="{'invisible':[('marital','!=','married')]}" colspan="1"/>
|
||||
<field name="spouse_fiscal_status" attrs="{'invisible': [('marital', 'not in', ['married', 'cohabitant'])], 'required': [('marital', 'in', ['married', 'cohabitant'])]}" colspan="1" help="if spouse has professionnel income or not"/>
|
||||
<field name="disabled_spouse_bool" attrs="{'invisible': [('marital', 'not in', ['married', 'cohabitant'])]}" colspan="1"/>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='gender']" position="after">
|
||||
<field name="disabled"/>
|
||||
@ -148,8 +148,8 @@
|
||||
<field name="other_disabled_juniors_dependent" attrs="{'invisible':[('other_dependent_people','!=',True)]}"/>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='spouse_fiscal_status']" position="after">
|
||||
<field name="spouse_net_revenue" attrs="{'invisible': ['|', ('marital', '!=', 'married'), ('spouse_fiscal_status', '!=', 'with income')]}"/>
|
||||
<field name="spouse_other_net_revenue" attrs="{'invisible': ['|', ('marital', '!=', 'married'), ('spouse_fiscal_status', '!=', 'with income')]}"/>
|
||||
<field name="spouse_net_revenue" attrs="{'invisible': ['|', ('marital', 'not in', ['married', 'cohabitant']), ('spouse_fiscal_status', '!=', 'with income')]}"/>
|
||||
<field name="spouse_other_net_revenue" attrs="{'invisible': ['|', ('marital', 'not in', ['married', 'cohabitant']), ('spouse_fiscal_status', '!=', 'with income')]}"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
@ -13,7 +13,8 @@ class FleetVehicle(models.Model):
|
||||
|
||||
co2_fee = fields.Float(compute='_compute_co2_fee', string="CO2 Fee")
|
||||
total_depreciated_cost = fields.Float(compute='_compute_total_depreciated_cost',
|
||||
string="Total Cost (Depreciated)", help="This includes all the depreciated costs and the CO2 fee")
|
||||
string="Total Cost (Depreciated)", track_visibility="onchange",
|
||||
help="This includes all the depreciated costs and the CO2 fee")
|
||||
total_cost = fields.Float(compute='_compute_total_cost', string="Total Cost", help="This include all the costs and the CO2 fee")
|
||||
fuel_type = fields.Selection(required=True, default='diesel')
|
||||
atn = fields.Float(compute='_compute_car_atn', string="ATN")
|
||||
|
@ -25,7 +25,7 @@ class HrContract(models.Model):
|
||||
'car_id.log_contracts.recurring_cost_amount_depreciated') # the fleet vehicle to avoid these dependencies
|
||||
def _compute_car_atn_and_costs(self):
|
||||
for contract in self:
|
||||
if contract.car_id:
|
||||
if not contract.new_car and contract.car_id:
|
||||
contract.car_atn = contract.car_id.atn
|
||||
contract.company_car_total_depreciated_cost = contract.car_id.total_depreciated_cost
|
||||
elif contract.new_car and contract.new_car_model_id:
|
||||
|
Loading…
Reference in New Issue
Block a user