first commit

This commit is contained in:
root
2026-03-14 09:42:12 +00:00
commit 0adbd20c2c
10991 changed files with 1646955 additions and 0 deletions

View File

@@ -0,0 +1,2 @@
# This file is part of Tryton. The COPYRIGHT file at the top level of
# this repository contains the full copyright notices and license terms.

View File

@@ -0,0 +1,29 @@
# This file is part of Tryton. The COPYRIGHT file at the top level of
# this repository contains the full copyright notices and license terms.
from trytond.model import fields
from trytond.pool import PoolMeta
class Company(metaclass=PoolMeta):
__name__ = 'company.company'
hours_per_work_day = fields.Float("Hours per Work Day")
hours_per_work_week = fields.Float("Hours per Work Week")
hours_per_work_month = fields.Float("Hours per Work Month")
hours_per_work_year = fields.Float("Hours per Work Year")
@staticmethod
def default_hours_per_work_day():
return 8
@staticmethod
def default_hours_per_work_week():
return 40
@staticmethod
def default_hours_per_work_month():
return 160
@staticmethod
def default_hours_per_work_year():
return 1920

View File

@@ -0,0 +1,15 @@
<?xml version="1.0"?>
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
this repository contains the full copyright notices and license terms. -->
<tryton>
<data>
<record model="ir.ui.view" id="company_view_form">
<field name="model">company.company</field>
<field name="type" eval="None"/>
<field name="inherit" ref="company.company_view_form"/>
<field name="name">company_form</field>
</record>
</data>
</tryton>

View File

@@ -0,0 +1,23 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:company.company,hours_per_work_day:"
msgid "Hours per Work Day"
msgstr "Работни часове за ден"
msgctxt "field:company.company,hours_per_work_month:"
msgid "Hours per Work Month"
msgstr "Работни часове за месец"
msgctxt "field:company.company,hours_per_work_week:"
msgid "Hours per Work Week"
msgstr "Часове по работна седмица"
msgctxt "field:company.company,hours_per_work_year:"
msgid "Hours per Work Year"
msgstr "Работни часове за година"
msgctxt "view:company.company:"
msgid "Work Time"
msgstr "Работно време"

View File

@@ -0,0 +1,23 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:company.company,hours_per_work_day:"
msgid "Hours per Work Day"
msgstr "Hores per dia de treball"
msgctxt "field:company.company,hours_per_work_month:"
msgid "Hours per Work Month"
msgstr "Hores per mes de treball"
msgctxt "field:company.company,hours_per_work_week:"
msgid "Hours per Work Week"
msgstr "Hores per setmana de treball"
msgctxt "field:company.company,hours_per_work_year:"
msgid "Hours per Work Year"
msgstr "Hores per any de treball"
msgctxt "view:company.company:"
msgid "Work Time"
msgstr "Temps de treball"

View File

@@ -0,0 +1,23 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:company.company,hours_per_work_day:"
msgid "Hours per Work Day"
msgstr ""
msgctxt "field:company.company,hours_per_work_month:"
msgid "Hours per Work Month"
msgstr ""
msgctxt "field:company.company,hours_per_work_week:"
msgid "Hours per Work Week"
msgstr ""
msgctxt "field:company.company,hours_per_work_year:"
msgid "Hours per Work Year"
msgstr ""
msgctxt "view:company.company:"
msgid "Work Time"
msgstr ""

View File

@@ -0,0 +1,23 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:company.company,hours_per_work_day:"
msgid "Hours per Work Day"
msgstr "Stunden pro Personentag"
msgctxt "field:company.company,hours_per_work_month:"
msgid "Hours per Work Month"
msgstr "Stunden pro Personenmonat"
msgctxt "field:company.company,hours_per_work_week:"
msgid "Hours per Work Week"
msgstr "Stunden pro Personenwoche"
msgctxt "field:company.company,hours_per_work_year:"
msgid "Hours per Work Year"
msgstr "Stunden pro Personenjahr"
msgctxt "view:company.company:"
msgid "Work Time"
msgstr "Arbeitszeit"

View File

@@ -0,0 +1,23 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:company.company,hours_per_work_day:"
msgid "Hours per Work Day"
msgstr "Horas por día de trabajo"
msgctxt "field:company.company,hours_per_work_month:"
msgid "Hours per Work Month"
msgstr "Horas por mes de trabajo"
msgctxt "field:company.company,hours_per_work_week:"
msgid "Hours per Work Week"
msgstr "Horas por semana de trabajo"
msgctxt "field:company.company,hours_per_work_year:"
msgid "Hours per Work Year"
msgstr "Horas por año de trabajo"
msgctxt "view:company.company:"
msgid "Work Time"
msgstr "Tiempo de trabajo"

View File

@@ -0,0 +1,23 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:company.company,hours_per_work_day:"
msgid "Hours per Work Day"
msgstr ""
msgctxt "field:company.company,hours_per_work_month:"
msgid "Hours per Work Month"
msgstr ""
msgctxt "field:company.company,hours_per_work_week:"
msgid "Hours per Work Week"
msgstr ""
msgctxt "field:company.company,hours_per_work_year:"
msgid "Hours per Work Year"
msgstr ""
msgctxt "view:company.company:"
msgid "Work Time"
msgstr ""

View File

@@ -0,0 +1,23 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:company.company,hours_per_work_day:"
msgid "Hours per Work Day"
msgstr "Tunde tööpäevas"
msgctxt "field:company.company,hours_per_work_month:"
msgid "Hours per Work Month"
msgstr "Tunde töökuus"
msgctxt "field:company.company,hours_per_work_week:"
msgid "Hours per Work Week"
msgstr "Tunde töönädalas"
msgctxt "field:company.company,hours_per_work_year:"
msgid "Hours per Work Year"
msgstr "Tunde tööaastas"
msgctxt "view:company.company:"
msgid "Work Time"
msgstr "Tööaeg"

View File

@@ -0,0 +1,23 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:company.company,hours_per_work_day:"
msgid "Hours per Work Day"
msgstr "ساعات کار در هرروز"
msgctxt "field:company.company,hours_per_work_month:"
msgid "Hours per Work Month"
msgstr "ساعات کار در هرماه"
msgctxt "field:company.company,hours_per_work_week:"
msgid "Hours per Work Week"
msgstr "ساعات کار در هرهفته"
msgctxt "field:company.company,hours_per_work_year:"
msgid "Hours per Work Year"
msgstr "ساعات کار در هرسال"
msgctxt "view:company.company:"
msgid "Work Time"
msgstr "زمان کاری"

View File

@@ -0,0 +1,23 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:company.company,hours_per_work_day:"
msgid "Hours per Work Day"
msgstr ""
msgctxt "field:company.company,hours_per_work_month:"
msgid "Hours per Work Month"
msgstr ""
msgctxt "field:company.company,hours_per_work_week:"
msgid "Hours per Work Week"
msgstr ""
msgctxt "field:company.company,hours_per_work_year:"
msgid "Hours per Work Year"
msgstr ""
msgctxt "view:company.company:"
msgid "Work Time"
msgstr ""

View File

@@ -0,0 +1,23 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:company.company,hours_per_work_day:"
msgid "Hours per Work Day"
msgstr "Heures par journée de travail"
msgctxt "field:company.company,hours_per_work_month:"
msgid "Hours per Work Month"
msgstr "Heures par mois de travail"
msgctxt "field:company.company,hours_per_work_week:"
msgid "Hours per Work Week"
msgstr "Heures par semaine de travail"
msgctxt "field:company.company,hours_per_work_year:"
msgid "Hours per Work Year"
msgstr "Heures par année de travail"
msgctxt "view:company.company:"
msgid "Work Time"
msgstr "Temps de travail"

View File

@@ -0,0 +1,23 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:company.company,hours_per_work_day:"
msgid "Hours per Work Day"
msgstr "Óra per nap"
msgctxt "field:company.company,hours_per_work_month:"
msgid "Hours per Work Month"
msgstr "Óra per hónap"
msgctxt "field:company.company,hours_per_work_week:"
msgid "Hours per Work Week"
msgstr "Óra per hét"
msgctxt "field:company.company,hours_per_work_year:"
msgid "Hours per Work Year"
msgstr "Óra per év"
msgctxt "view:company.company:"
msgid "Work Time"
msgstr "Minkaidő"

View File

@@ -0,0 +1,23 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:company.company,hours_per_work_day:"
msgid "Hours per Work Day"
msgstr "Jam per Hari Kerja"
msgctxt "field:company.company,hours_per_work_month:"
msgid "Hours per Work Month"
msgstr "Jam per Bulan Kerja"
msgctxt "field:company.company,hours_per_work_week:"
msgid "Hours per Work Week"
msgstr "Jam per Minggu Kerja"
msgctxt "field:company.company,hours_per_work_year:"
msgid "Hours per Work Year"
msgstr "Jam per Tahun Kerja"
msgctxt "view:company.company:"
msgid "Work Time"
msgstr "Waktu Kerja"

View File

@@ -0,0 +1,23 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:company.company,hours_per_work_day:"
msgid "Hours per Work Day"
msgstr "ore per giornata lavorativa"
msgctxt "field:company.company,hours_per_work_month:"
msgid "Hours per Work Month"
msgstr "ore per mese lavorativo"
msgctxt "field:company.company,hours_per_work_week:"
msgid "Hours per Work Week"
msgstr "ore per settimana lavorativa"
msgctxt "field:company.company,hours_per_work_year:"
msgid "Hours per Work Year"
msgstr "ore per anno lavorativo"
msgctxt "view:company.company:"
msgid "Work Time"
msgstr "orario lavorativo"

View File

@@ -0,0 +1,23 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:company.company,hours_per_work_day:"
msgid "Hours per Work Day"
msgstr "ຊົ່ວໂມງຕໍ່ມື້ວຽກ"
msgctxt "field:company.company,hours_per_work_month:"
msgid "Hours per Work Month"
msgstr "ຊົ່ວໂມງຕໍ່ເດືອນ"
msgctxt "field:company.company,hours_per_work_week:"
msgid "Hours per Work Week"
msgstr "ຊົ່ວໂມງຕໍ່ອາທິດ"
msgctxt "field:company.company,hours_per_work_year:"
msgid "Hours per Work Year"
msgstr "ຊົ່ວໂມງຕໍ່ປີ"
msgctxt "view:company.company:"
msgid "Work Time"
msgstr "ເວລາວຽກ"

View File

@@ -0,0 +1,23 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:company.company,hours_per_work_day:"
msgid "Hours per Work Day"
msgstr "Valandų per dieną"
msgctxt "field:company.company,hours_per_work_month:"
msgid "Hours per Work Month"
msgstr "Valandų per mėnesį"
msgctxt "field:company.company,hours_per_work_week:"
msgid "Hours per Work Week"
msgstr "Valandų per savaitę"
msgctxt "field:company.company,hours_per_work_year:"
msgid "Hours per Work Year"
msgstr "Valandų per metus"
msgctxt "view:company.company:"
msgid "Work Time"
msgstr "Darbo laikas"

View File

@@ -0,0 +1,23 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:company.company,hours_per_work_day:"
msgid "Hours per Work Day"
msgstr "Uren per dag"
msgctxt "field:company.company,hours_per_work_month:"
msgid "Hours per Work Month"
msgstr "Uren per maand"
msgctxt "field:company.company,hours_per_work_week:"
msgid "Hours per Work Week"
msgstr "Uren per week"
msgctxt "field:company.company,hours_per_work_year:"
msgid "Hours per Work Year"
msgstr "Uren per jaar"
msgctxt "view:company.company:"
msgid "Work Time"
msgstr "Werktijd"

View File

@@ -0,0 +1,23 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:company.company,hours_per_work_day:"
msgid "Hours per Work Day"
msgstr "Roboczogodziny dziennie"
msgctxt "field:company.company,hours_per_work_month:"
msgid "Hours per Work Month"
msgstr "Roboczogodziny miesięcznie"
msgctxt "field:company.company,hours_per_work_week:"
msgid "Hours per Work Week"
msgstr "Roboczogodziny tygodniowo"
msgctxt "field:company.company,hours_per_work_year:"
msgid "Hours per Work Year"
msgstr "Roboczogodziny rocznie"
msgctxt "view:company.company:"
msgid "Work Time"
msgstr "Czas pracy"

View File

@@ -0,0 +1,23 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:company.company,hours_per_work_day:"
msgid "Hours per Work Day"
msgstr "Horas por dia de trabalho"
msgctxt "field:company.company,hours_per_work_month:"
msgid "Hours per Work Month"
msgstr "Horas por mês de trabalho"
msgctxt "field:company.company,hours_per_work_week:"
msgid "Hours per Work Week"
msgstr "Horas por semana de trabalho"
msgctxt "field:company.company,hours_per_work_year:"
msgid "Hours per Work Year"
msgstr "Horas por ano de trabalho"
msgctxt "view:company.company:"
msgid "Work Time"
msgstr "Tempo de trabalho"

View File

@@ -0,0 +1,23 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:company.company,hours_per_work_day:"
msgid "Hours per Work Day"
msgstr "Ore pe Zi de Lucru"
msgctxt "field:company.company,hours_per_work_month:"
msgid "Hours per Work Month"
msgstr "Ore pe Luna de Lucru"
msgctxt "field:company.company,hours_per_work_week:"
msgid "Hours per Work Week"
msgstr "Ore pe Săptămâna de Lucru"
msgctxt "field:company.company,hours_per_work_year:"
msgid "Hours per Work Year"
msgstr "Ore pe An de Lucru"
msgctxt "view:company.company:"
msgid "Work Time"
msgstr "Ore de Lucru"

View File

@@ -0,0 +1,23 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:company.company,hours_per_work_day:"
msgid "Hours per Work Day"
msgstr "Часов за день"
msgctxt "field:company.company,hours_per_work_month:"
msgid "Hours per Work Month"
msgstr "Часов за месяц"
msgctxt "field:company.company,hours_per_work_week:"
msgid "Hours per Work Week"
msgstr "Часов за неделю"
msgctxt "field:company.company,hours_per_work_year:"
msgid "Hours per Work Year"
msgstr "Часов за год"
msgctxt "view:company.company:"
msgid "Work Time"
msgstr "Рабочее время"

View File

@@ -0,0 +1,23 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:company.company,hours_per_work_day:"
msgid "Hours per Work Day"
msgstr "Ure na delovni dan"
msgctxt "field:company.company,hours_per_work_month:"
msgid "Hours per Work Month"
msgstr "Ure na delovni mesec"
msgctxt "field:company.company,hours_per_work_week:"
msgid "Hours per Work Week"
msgstr "Ure na delovni teden"
msgctxt "field:company.company,hours_per_work_year:"
msgid "Hours per Work Year"
msgstr "Ure na delovno leto"
msgctxt "view:company.company:"
msgid "Work Time"
msgstr "Delovni čas"

View File

@@ -0,0 +1,23 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:company.company,hours_per_work_day:"
msgid "Hours per Work Day"
msgstr ""
msgctxt "field:company.company,hours_per_work_month:"
msgid "Hours per Work Month"
msgstr ""
msgctxt "field:company.company,hours_per_work_week:"
msgid "Hours per Work Week"
msgstr ""
msgctxt "field:company.company,hours_per_work_year:"
msgid "Hours per Work Year"
msgstr ""
msgctxt "view:company.company:"
msgid "Work Time"
msgstr ""

View File

@@ -0,0 +1,23 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:company.company,hours_per_work_day:"
msgid "Hours per Work Day"
msgstr ""
msgctxt "field:company.company,hours_per_work_month:"
msgid "Hours per Work Month"
msgstr ""
msgctxt "field:company.company,hours_per_work_week:"
msgid "Hours per Work Week"
msgstr ""
msgctxt "field:company.company,hours_per_work_year:"
msgid "Hours per Work Year"
msgstr ""
msgctxt "view:company.company:"
msgid "Work Time"
msgstr ""

View File

@@ -0,0 +1,23 @@
#
msgid ""
msgstr "Content-Type: text/plain; charset=utf-8\n"
msgctxt "field:company.company,hours_per_work_day:"
msgid "Hours per Work Day"
msgstr ""
msgctxt "field:company.company,hours_per_work_month:"
msgid "Hours per Work Month"
msgstr ""
msgctxt "field:company.company,hours_per_work_week:"
msgid "Hours per Work Week"
msgstr ""
msgctxt "field:company.company,hours_per_work_year:"
msgid "Hours per Work Year"
msgstr ""
msgctxt "view:company.company:"
msgid "Work Time"
msgstr ""

View File

@@ -0,0 +1,27 @@
# This file is part of Tryton. The COPYRIGHT file at the top level of
# this repository contains the full copyright notices and license terms.
from trytond.pool import PoolMeta
class User(metaclass=PoolMeta):
__name__ = 'res.user'
@classmethod
def _get_preferences(cls, user, context_only=False):
res = super()._get_preferences(user,
context_only=context_only)
if user.company:
time = {
'h': 60 * 60,
'm': 60,
's': 1,
}
for k, v in [
('Y', user.company.hours_per_work_year),
('M', user.company.hours_per_work_month),
('w', user.company.hours_per_work_week),
('d', user.company.hours_per_work_day)]:
if v:
time[k] = v * 60 * 60
res['company_work_time'] = time
return res

View File

@@ -0,0 +1,2 @@
# This file is part of Tryton. The COPYRIGHT file at the top level of
# this repository contains the full copyright notices and license terms.

View File

@@ -0,0 +1,13 @@
# This file is part of Tryton. The COPYRIGHT file at the top level of
# this repository contains the full copyright notices and license terms.
from trytond.modules.company.tests import CompanyTestMixin
from trytond.tests.test_tryton import ModuleTestCase
class CompanyWorkTimeTestCase(CompanyTestMixin, ModuleTestCase):
'Test CompanyWorkTime module'
module = 'company_work_time'
del ModuleTestCase

View File

@@ -0,0 +1,12 @@
[tryton]
version=7.8.1
depends:
company
ir
xml:
company.xml
[register]
model:
res.User
company.Company

View File

@@ -0,0 +1,17 @@
<?xml version="1.0"?>
<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
this repository contains the full copyright notices and license terms. -->
<data>
<xpath expr="//page[@name='employees']" position="after">
<page string="Work Time" id="work_time">
<label name="hours_per_work_day"/>
<field name="hours_per_work_day"/>
<label name="hours_per_work_week"/>
<field name="hours_per_work_week"/>
<label name="hours_per_work_month"/>
<field name="hours_per_work_month"/>
<label name="hours_per_work_year"/>
<field name="hours_per_work_year"/>
</page>
</xpath>
</data>