mirror of
https://gitlab.com/datalifeit/trytond-staff_workplace
synced 2023-12-14 04:42:58 +01:00
Migrate to 6.4
This commit is contained in:
parent
e572200a68
commit
bdcc194eec
7 changed files with 30 additions and 28 deletions
14
setup.py
14
setup.py
|
@ -56,7 +56,13 @@ dependency_links = {
|
|||
'trytond-staff@%(branch)s'
|
||||
'#egg=datalife_staff' % {
|
||||
'branch': branch,
|
||||
}
|
||||
},
|
||||
'company_time_clock': 'git+https://gitlab.com/datalifeit/'
|
||||
'trytond-company_time_clock@%(branch)s'
|
||||
'#egg=datalife_company_time_clock-%(series)s' % {
|
||||
'branch': branch,
|
||||
'series': series
|
||||
},
|
||||
}
|
||||
|
||||
requires = []
|
||||
|
@ -72,7 +78,10 @@ for dep in info.get('depends', []):
|
|||
requires.append(get_require_version('trytond'))
|
||||
|
||||
|
||||
tests_require = [get_require_version('proteus')]
|
||||
tests_require = [
|
||||
get_require_version('proteus'),
|
||||
get_require_version('datalife_company_time_clock'),
|
||||
]
|
||||
|
||||
dependency_links = list(dependency_links.values())
|
||||
if minor_version % 2:
|
||||
|
@ -138,6 +147,5 @@ setup(name=name,
|
|||
staff_workplace = trytond.modules.staff_workplace
|
||||
""",
|
||||
test_suite='tests',
|
||||
test_loader='trytond.test_loader:Loader',
|
||||
tests_require=tests_require,
|
||||
)
|
||||
|
|
|
@ -1,3 +1,2 @@
|
|||
# The COPYRIGHT file at the top level of this repository contains the full
|
||||
# copyright notices and license terms.
|
||||
from .test_staff_workplace import suite
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
# The COPYRIGHT file at the top level of this repository contains the full
|
||||
# copyright notices and license terms.
|
||||
import unittest
|
||||
import datetime
|
||||
import trytond.tests.test_tryton
|
||||
from trytond.pool import Pool
|
||||
from trytond.tests.test_tryton import ModuleTestCase, with_transaction
|
||||
from trytond.modules.company.tests import create_company, set_company
|
||||
|
@ -11,6 +9,7 @@ from trytond.modules.company.tests import create_company, set_company
|
|||
class StaffWorkplaceTestCase(ModuleTestCase):
|
||||
"""Test module"""
|
||||
module = 'staff_workplace'
|
||||
extras = ['company_time_clock']
|
||||
|
||||
@with_transaction()
|
||||
def test_compute_profile_prices(self):
|
||||
|
@ -59,8 +58,4 @@ class StaffWorkplaceTestCase(ModuleTestCase):
|
|||
self.assertEqual(workplace.date_type(date), day_type)
|
||||
|
||||
|
||||
def suite():
|
||||
suite = trytond.tests.test_tryton.suite()
|
||||
suite.addTests(unittest.TestLoader().loadTestsFromTestCase(
|
||||
StaffWorkplaceTestCase))
|
||||
return suite
|
||||
del ModuleTestCase
|
|
@ -3,10 +3,10 @@
|
|||
this repository contains the full copyright notices and license terms. -->
|
||||
<tryton>
|
||||
<data depends="company_time_clock">
|
||||
<record model="ir.ui.view" id="timeclock_print_start_view_form">
|
||||
<record model="ir.ui.view" id="time_clock_print_start_view_form">
|
||||
<field name="model">company.employee.time_clock.print_start</field>
|
||||
<field name="inherit" ref="company_time_clock.time_clock_print_start_view_form"/>
|
||||
<field name="name">timeclock_print_start_form</field>
|
||||
<field name="name">time_clock_print_start_form</field>
|
||||
</record>
|
||||
</data>
|
||||
</tryton>
|
18
tryton.cfg
18
tryton.cfg
|
@ -1,15 +1,15 @@
|
|||
[tryton]
|
||||
version=6.0.0
|
||||
version=6.4.0
|
||||
depends:
|
||||
ir
|
||||
res
|
||||
company
|
||||
staff
|
||||
ir
|
||||
res
|
||||
company
|
||||
staff
|
||||
|
||||
extras_depend:
|
||||
company_time_clock
|
||||
company_time_clock
|
||||
|
||||
xml:
|
||||
workplace.xml
|
||||
time_clock.xml
|
||||
message.xml
|
||||
workplace.xml
|
||||
time_clock.xml
|
||||
message.xml
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
<?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="/form/label[@name='employee']" position="before">
|
||||
<label name="workplace"/>
|
|
@ -14,12 +14,10 @@ class Calendar(ModelView, ModelSQL):
|
|||
|
||||
name = fields.Char('Name')
|
||||
year = fields.Integer('Year', required=True,
|
||||
states={'readonly': Eval('id', 0) > 0},
|
||||
depends=['id'])
|
||||
states={'readonly': Eval('id', 0) > 0})
|
||||
country = fields.Many2One('country.country', 'Country')
|
||||
subdivision = fields.Many2One("country.subdivision",
|
||||
'Subdivision', domain=[('country', '=', Eval('country'))],
|
||||
depends=['country'])
|
||||
'Subdivision', domain=[('country', '=', Eval('country'))])
|
||||
city = fields.Char('City')
|
||||
days = fields.One2Many('staff.calendar.day', 'calendar', 'Days',
|
||||
order=[('date_', 'ASC')])
|
||||
|
@ -138,8 +136,7 @@ class CalendarDay(ModelView, ModelSQL):
|
|||
|
||||
name = fields.Char('Name')
|
||||
calendar = fields.Many2One('staff.calendar', 'Calendar', required=True,
|
||||
states={'readonly': Eval('id', 0) > 0},
|
||||
depends=['id'])
|
||||
states={'readonly': Eval('id', 0) > 0})
|
||||
date_ = fields.Date('Date', required=True)
|
||||
day_type = fields.Selection([
|
||||
('holiday', 'holiday'),
|
||||
|
|
Loading…
Reference in a new issue