Minor fixes
This commit is contained in:
parent
745799a2ec
commit
8fa37ef7c6
11
payroll.py
11
payroll.py
|
@ -276,7 +276,8 @@ class Payroll(metaclass=PoolMeta):
|
|||
def get_days(self, start, end, wage_adjust_days_worked=None):
|
||||
adjust = 1
|
||||
# adjust_days_worked = False
|
||||
adjust_days_worked = attrgetter('position.adjust_days_worked')(self.contract)
|
||||
print("este contrato.--------", self.contract.id)
|
||||
adjust_days_worked = self.contract.position.adjust_days_worked if self.contract else true
|
||||
# print('this is', adj)
|
||||
# if self.contract and self.contract.position:
|
||||
# adjust_days_worked = self.contract.position.adjust_days_worked
|
||||
|
@ -497,10 +498,8 @@ class Payroll(metaclass=PoolMeta):
|
|||
PayrollLine = pool.get('staff.payroll.line')
|
||||
MoveLine = pool.get('account.move.line')
|
||||
LoanLine = pool.get('staff.loan.line')
|
||||
|
||||
self.process_loans_to_pay(LoanLine, PayrollLine, MoveLine)
|
||||
# Configuration = Pool().get('staff.configuration')
|
||||
# configuration = Configuration(1)
|
||||
|
||||
discounts = self.set_events(cache_wage_dict)
|
||||
ctx = {
|
||||
'absenteeism_days': self.absenteeism_days
|
||||
|
@ -523,7 +522,7 @@ class Payroll(metaclass=PoolMeta):
|
|||
time_r2 = time.time()
|
||||
print(time_r2-time_r, 'time recompute lines')
|
||||
if not config.allow_zero_quantities:
|
||||
lines_delete = [ln for ln in self.lines if ln.quantity == 0]
|
||||
lines_delete = [ln for ln in self.lines if ln.quantity == 0]
|
||||
PayrollLine.delete(lines_delete)
|
||||
|
||||
def set_events(self, cache_wage_dict):
|
||||
|
@ -819,7 +818,7 @@ class Payroll(metaclass=PoolMeta):
|
|||
# })
|
||||
time_ro = time.time()
|
||||
for line in self.lines:
|
||||
wage = cache_wage_dict[line.wage_type.id]
|
||||
wage = cache_wage_dict[line.wage_type.id]
|
||||
if not wage['round_amounts']:
|
||||
continue
|
||||
unit_value = self.get_round_amount(wage['round_amounts'], line.unit_value)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
[tryton]
|
||||
version=6.0.6
|
||||
version=6.0.7
|
||||
depends:
|
||||
company
|
||||
account
|
||||
|
|
Loading…
Reference in New Issue