Rename timeclock model.

This commit refs #8776
This commit is contained in:
Sergio Morillo 2019-08-29 10:06:02 +02:00
parent bdcbf727f2
commit 696d4ba34a
6 changed files with 18 additions and 18 deletions

View file

@ -14,7 +14,7 @@ pipeline:
- pip install tox
- tox -e "${TOXENV}-${DATABASE}"
volumes:
- cache:/root/.cache
- /var/lib/cache:/root/.cache
notify:
image: drillster/drone-email
from: drone@datalife.com.es

View file

@ -3,14 +3,10 @@
from trytond.pool import Pool
from .workplace import (WorkPlace, Employee, Calendar, CalendarDay,
WorkPlaceCalendar)
from .time_clock import TimeProcessedListPrintStart, TimeProcessedListPrint
from .time_clock import TimeClockPrintStart, TimeClockPrint
def register():
Pool.register(
TimeProcessedListPrintStart,
module='staff_workplace', type_='model',
depends=['company_time_clock'])
Pool.register(
Calendar,
WorkPlace,
@ -19,6 +15,10 @@ def register():
CalendarDay,
module='staff_workplace', type_='model')
Pool.register(
TimeProcessedListPrint,
TimeClockPrintStart,
module='staff_workplace', type_='model',
depends=['company_time_clock'])
Pool.register(
TimeClockPrint,
module='staff_workplace', type_='wizard',
depends=['company_time_clock'])

View file

@ -291,6 +291,6 @@ msgctxt "view:staff.calendar:"
msgid "Days"
msgstr "Días"
msgctxt "field:company.employee.time_clock.processed.list.print_start,workplace:"
msgctxt "field:company.employee.time_clock.print_start,workplace:"
msgid "Work place"
msgstr "Centro de empleo"

View file

@ -3,20 +3,20 @@
from trytond.model import fields
from trytond.pool import PoolMeta
__all__ = ['TimeProcessedListPrintStart', 'TimeProcessedListPrint']
__all__ = ['TimeClockPrintStart', 'TimeClockPrint']
class TimeProcessedListPrintStart(metaclass=PoolMeta):
__name__ = 'company.employee.time_clock.processed.list.print_start'
class TimeClockPrintStart(metaclass=PoolMeta):
__name__ = 'company.employee.time_clock.print_start'
workplace = fields.Many2One('staff.workplace', 'Work place')
class TimeProcessedListPrint(metaclass=PoolMeta):
__name__ = 'company.employee.time_clock.processed.list.print'
class TimeClockPrint(metaclass=PoolMeta):
__name__ = 'company.employee.time_clock.print'
def _get_timeclock_domain(self):
res = super(TimeProcessedListPrint, self)._get_timeclock_domain()
res = super()._get_timeclock_domain()
if self.start.workplace:
res.append(('employee.workplace', '=', self.start.workplace.id))
return res

View file

@ -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_processed_print_list_start_view_form">
<field name="model">company.employee.time_clock.processed.list.print_start</field>
<field name="inherit" ref="company_time_clock.time_processed_list_print_start_view_form"/>
<field name="name">timeclock_processed_print_list_start_form</field>
<record model="ir.ui.view" id="timeclock_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>
</record>
</data>
</tryton>