mirror of
https://gitlab.com/datalifeit/trytond-staff_profile
synced 2023-12-14 04:32:57 +01:00
Move timesheet_absolute_hours dependency to extras.
This commit is contained in:
parent
4a64a2553c
commit
d249fdab7d
|
@ -149,5 +149,12 @@ this repository contains the full copyright notices and license terms. -->
|
|||
<field name="name">employee_cost_price_tree</field>
|
||||
</record>
|
||||
</data>
|
||||
<data depends="timesheet_absolute_hours">
|
||||
<record model="ir.ui.view" id="timesheet_line_payroll_hours_view_tree">
|
||||
<field name="model">timesheet.line</field>
|
||||
<field name="inherit" ref="timesheet_line_payroll_view_tree"/>
|
||||
<field name="name">line_hours_tree</field>
|
||||
</record>
|
||||
</data>
|
||||
</tryton>
|
||||
|
||||
|
|
7
setup.py
7
setup.py
|
@ -10,7 +10,6 @@ from configparser import ConfigParser
|
|||
|
||||
MODULE2PREFIX = {
|
||||
'staff': 'datalife',
|
||||
'timesheet_absolute_hours': 'datalife'
|
||||
}
|
||||
|
||||
|
||||
|
@ -55,12 +54,6 @@ dependency_links = {
|
|||
'#egg=datalife_staff' % {
|
||||
'branch': branch,
|
||||
},
|
||||
'timesheet_absolute_hours':
|
||||
'git+https://gitlab.com/datalifeit/'
|
||||
'trytond-timesheet_absolute_hours@%(branch)s'
|
||||
'#egg=datalife_timesheet_absolute_hours' % {
|
||||
'branch': branch,
|
||||
},
|
||||
}
|
||||
|
||||
requires = []
|
||||
|
|
|
@ -24,5 +24,6 @@ class Timesheet(metaclass=PoolMeta):
|
|||
employee = self.employee
|
||||
with Transaction().set_context(date=self.date):
|
||||
return (Decimal(str(self.hours)) * (
|
||||
employee.get_payroll_price() or 0) if self.employee else 0)
|
||||
return 0
|
||||
employee.get_payroll_price() or Decimal('0.0')
|
||||
) if self.employee else Decimal('0.0'))
|
||||
return Decimal('0.0')
|
||||
|
|
|
@ -7,10 +7,10 @@ depends:
|
|||
staff
|
||||
timesheet
|
||||
timesheet_cost
|
||||
timesheet_absolute_hours
|
||||
|
||||
extras_depend:
|
||||
company_time_clock
|
||||
timesheet_absolute_hours
|
||||
|
||||
xml:
|
||||
profile.xml
|
||||
|
|
8
view/line_hours_tree.xml
Normal file
8
view/line_hours_tree.xml
Normal file
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0"?>
|
||||
<!-- The COPYRIGHT file at the top level of this repository contains the full
|
||||
copyright notices and license terms. -->
|
||||
<data>
|
||||
<xpath expr="/tree/field[@name='payroll_cost']" position="before">
|
||||
<field name="total_hours" />
|
||||
</xpath>
|
||||
</data>
|
|
@ -5,7 +5,6 @@ this repository contains the full copyright notices and license terms. -->
|
|||
<field name="company"/>
|
||||
<field name="employee"/>
|
||||
<field name="date"/>
|
||||
<field name="total_hours" />
|
||||
<field name="payroll_cost"/>
|
||||
<field name="work" width="300"/>
|
||||
<field name="description"/>
|
||||
|
|
Loading…
Reference in a new issue