Fix hr_payroll_clone: AttributeError, add journal/work_type support, use standard wizard

- Fix AttributeError: hr.payslip.run has no company_id field
- Change batch name format from MM/YYYY to YYYY-MM (remove 'Payslips' prefix)
- Add journal_id field and copy from previous batch
- Add work_type_id support (Redovni rad/Regular work) in timesheet generation
- Add duplicate check for existing timesheets to prevent duplication
- Use standard Odoo hr.payslip.employees wizard for payslip generation
- Update version to 16.0.1.1.0

🤖 assisted by claude

🤖 assisted by claude
This commit is contained in:
Ernad Husremovic 2025-11-04 22:43:31 +01:00
parent 77a8838cf7
commit dc4d96d97a
23 changed files with 4281 additions and 2575 deletions

View file

@ -17,7 +17,6 @@ msgstr ""
#. module: hr_work_entry_contract
#: model:ir.model.fields,help:hr_work_entry_contract.field_hr_contract__work_entry_source
#: model:ir.model.fields,help:hr_work_entry_contract.field_hr_work_entry__work_entry_source
msgid ""
"\n"
" Defines the source for work entries generation\n"
@ -27,22 +26,28 @@ msgid ""
" Planning: Work entries will be generated from the employee's planning. (requires Planning app)\n"
" "
msgstr ""
"Definiše izvor za generiranje unosa rada\n"
"Radni raspored: Unosi rada će biti generirani iz radnih sati ispod.\n"
"Prisustva: Unosi rada će biti generirani iz prisustva zaposlenog. (zahtijeva aplikaciju Prisustvo)\n"
"Planiranje: Unosi rada će biti generirani iz planiranja zaposlenog. (zahtijeva aplikaciju Planiranje)"
#. module: hr_work_entry_contract
#. odoo-python
#: code:addons/hr_work_entry_contract/models/hr_work_entry.py:0
#: code:addons/hr_work_entry_contract/models/hr_work_entry.py
#, python-format
msgid "%s does not have a contract from %s to %s."
msgstr "%s nema ugovor od %s do %s."
#. module: hr_work_entry_contract
#. odoo-python
#: code:addons/hr_work_entry_contract/models/hr_work_entry.py:0
#: code:addons/hr_work_entry_contract/models/hr_work_entry.py
#, python-format
msgid ""
"%s has multiple contracts from %s to %s. A work entry cannot overlap "
"multiple contracts."
msgstr ""
"%s ima više ugovora od %s do %s. Unos rada ne može se preklapati preko više "
"ugovora."
#. module: hr_work_entry_contract
#: model_terms:ir.ui.view,arch_db:hr_work_entry_contract.hr_work_entry_regeneration_wizard
@ -50,6 +55,8 @@ msgid ""
"<i class=\"fa fa-exclamation-triangle me-1\" title=\"Warning\"/>You are not "
"allowed to regenerate validated work entries"
msgstr ""
"<i class=\"fa fa-exclamation-triangle me-1\" title=\"Upozorenje\"/>Nije vam "
"dozvoljeno regenerirati ovjerene unose rada"
#. module: hr_work_entry_contract
#: model_terms:ir.ui.view,arch_db:hr_work_entry_contract.hr_work_entry_regeneration_wizard
@ -62,12 +69,15 @@ msgid ""
"<span class=\"text-muted\">Warning: The work entry regeneration will delete "
"all manual changes on the selected period.</span>"
msgstr ""
"<span class=\"text-muted\">Upozorenje: Regeneracija unosa rada će obrisati "
"sve ručne promjene u odabranom periodu.</span>"
#. module: hr_work_entry_contract
#: model:ir.model.fields,help:hr_work_entry_contract.field_hr_work_entry_type__is_leave
msgid "Allow the work entry type to be linked with time off types."
msgstr "Omogućava povezivanje tipa unosa rada sa tipovima slobodnih dana."
# taken from hr.po
#. module: hr_work_entry_contract
#: model_terms:ir.ui.view,arch_db:hr_work_entry_contract.hr_work_entry_regeneration_wizard
msgid "Cancel"
@ -78,21 +88,25 @@ msgstr "Odustani"
msgid "Compensatory Time Off"
msgstr "Kompenzacijski Slobodan Dan"
# taken from hr.po
#. module: hr_work_entry_contract
#: model:ir.model.fields,field_description:hr_work_entry_contract.field_hr_work_entry__contract_id
msgid "Contract"
msgstr "Ugovor"
# taken from hr.po
#. module: hr_work_entry_contract
#: model:ir.model.fields,field_description:hr_work_entry_contract.field_hr_work_entry_regeneration_wizard__create_uid
msgid "Created by"
msgstr "Kreirao"
# taken from hr.po
#. module: hr_work_entry_contract
#: model:ir.model.fields,field_description:hr_work_entry_contract.field_hr_work_entry_regeneration_wizard__create_date
msgid "Created on"
msgstr "Kreirano"
# taken from hr.po
#. module: hr_work_entry_contract
#: model:ir.model.fields,field_description:hr_work_entry_contract.field_hr_work_entry_regeneration_wizard__display_name
msgid "Display Name"
@ -108,17 +122,19 @@ msgstr "Poruka Najranijeg Dostupnog Datuma"
msgid "Earliest date"
msgstr "Najraniji datum"
# taken from hr.po
#. module: hr_work_entry_contract
#: model:ir.model,name:hr_work_entry_contract.model_hr_employee
#: model:ir.model.fields,field_description:hr_work_entry_contract.field_hr_work_entry__employee_id
msgid "Employee"
msgstr "Zaposlenik"
# taken from hr.po
#. module: hr_work_entry_contract
#: model:ir.model,name:hr_work_entry_contract.model_hr_contract
msgid "Employee Contract"
msgstr "Ugovor djelatnika"
# taken from hr.po
#. module: hr_work_entry_contract
#: model:ir.model.fields,field_description:hr_work_entry_contract.field_hr_work_entry_regeneration_wizard__employee_ids
msgid "Employees"
@ -126,16 +142,18 @@ msgstr "Zaposlenici"
#. module: hr_work_entry_contract
#. odoo-javascript
#: code:addons/hr_work_entry_contract/static/src/views/work_entry_calendar/work_entry_calendar_model.js:0
#: code:addons/hr_work_entry_contract/static/src/views/work_entry_calendar/work_entry_calendar_model.js
#, python-format
msgid "Everybody's work entries"
msgstr "Unosi rada svih radnika"
# taken from hr.po
#. module: hr_work_entry_contract
#: model:hr.work.entry.type,name:hr_work_entry_contract.work_entry_type_extra_hours
msgid "Extra Hours"
msgstr "Dodatni sati"
# taken from hr.po
#. module: hr_work_entry_contract
#: model:ir.model.fields,field_description:hr_work_entry_contract.field_hr_work_entry_regeneration_wizard__date_from
msgid "From"
@ -143,15 +161,16 @@ msgstr "Od"
#. module: hr_work_entry_contract
#: model:ir.actions.server,name:hr_work_entry_contract.ir_cron_generate_missing_work_entries_ir_actions_server
#: model:ir.cron,cron_name:hr_work_entry_contract.ir_cron_generate_missing_work_entries
msgid "Generate Missing Work Entries"
msgstr "Generiraj Nedostajuće Unose Rada"
# taken from hr.po
#. module: hr_work_entry_contract
#: model:ir.model.fields,field_description:hr_work_entry_contract.field_hr_contract__date_generated_from
msgid "Generated From"
msgstr "Generirano iz"
# taken from hr.po
#. module: hr_work_entry_contract
#: model:ir.model.fields,field_description:hr_work_entry_contract.field_hr_contract__date_generated_to
msgid "Generated To"
@ -172,6 +191,7 @@ msgstr "HR Unos Rada"
msgid "HR Work Entry Type"
msgstr "HR Tip Unosa Rada"
# taken from hr.po
#. module: hr_work_entry_contract
#: model:hr.work.entry.type,name:hr_work_entry_contract.work_entry_type_home_working
msgid "Home Working"
@ -184,7 +204,7 @@ msgstr "ID"
#. module: hr_work_entry_contract
#. odoo-python
#: code:addons/hr_work_entry_contract/wizard/hr_work_entry_regeneration_wizard.py:0
#: code:addons/hr_work_entry_contract/wizard/hr_work_entry_regeneration_wizard.py
#, python-format
msgid ""
"In order to regenerate the work entries, you need to provide the wizard with"
@ -192,22 +212,29 @@ msgid ""
"interval defined by date_from and date_to must not contain any validated "
"work entries."
msgstr ""
"Da biste regenerirali unose rada, trebate pružiti čarobnjaku employee_id, "
"date_from i date_to. Uz to, vremenski interval definiran sa date_from i "
"date_to ne smije sadržavati ovjerene unose rada."
# taken from hr.po
#. module: hr_work_entry_contract
#: model:ir.model.fields,field_description:hr_work_entry_contract.field_hr_contract__last_generation_date
msgid "Last Generation Date"
msgstr "Datum posljednjeg generiranja"
# taken from hr.po
#. module: hr_work_entry_contract
#: model:ir.model.fields,field_description:hr_work_entry_contract.field_hr_work_entry_regeneration_wizard____last_update
msgid "Last Modified on"
msgstr "Zadnja promjena"
# taken from hr.po
#. module: hr_work_entry_contract
#: model:ir.model.fields,field_description:hr_work_entry_contract.field_hr_work_entry_regeneration_wizard__write_uid
msgid "Last Updated by"
msgstr "Promijenio"
# taken from hr.po
#. module: hr_work_entry_contract
#: model:ir.model.fields,field_description:hr_work_entry_contract.field_hr_work_entry_regeneration_wizard__write_date
msgid "Last Updated on"
@ -228,22 +255,21 @@ msgstr "Najkasniji datum"
msgid "Long Term Time Off"
msgstr "Dugoročni Slobodan Dan"
# taken from hr.po
#. module: hr_work_entry_contract
#: model:hr.work.entry.type,name:hr_work_entry_contract.work_entry_type_legal_leave
msgid "Paid Time Off"
msgstr "Plaćen zahtjev za odsustvom"
# taken from hr.po
#. module: hr_work_entry_contract
#: model:ir.model,name:hr_work_entry_contract.model_hr_work_entry_regeneration_wizard
#: model_terms:ir.ui.view,arch_db:hr_work_entry_contract.hr_work_entry_regeneration_wizard
msgid "Regenerate Employee Work Entries"
msgstr "Ponovo generirajte evidenciju radnog vremena za zaposlenika"
#. module: hr_work_entry_contract
#. odoo-javascript
#: code:addons/hr_work_entry_contract/static/src/js/work_entries_controller_mixin.js:0
#: code:addons/hr_work_entry_contract/static/src/views/work_entry_calendar/work_entry_calendar.xml:0
#: model_terms:ir.ui.view,arch_db:hr_work_entry_contract.hr_work_entry_regeneration_wizard
#: code:addons/hr_work_entry_contract/static/src/js/work_entries_controller_mixin.js
#, python-format
msgid "Regenerate Work Entries"
msgstr "Regeneriraj Unose Rada"
@ -253,6 +279,7 @@ msgstr "Regeneriraj Unose Rada"
msgid "Search Criteria Completed"
msgstr "Kriterij pretrage završen"
# taken from hr.po
#. module: hr_work_entry_contract
#: model:hr.work.entry.type,name:hr_work_entry_contract.work_entry_type_sick_leave
msgid "Sick Time Off"
@ -260,42 +287,50 @@ msgstr "Bolovanje"
#. module: hr_work_entry_contract
#. odoo-python
#: code:addons/hr_work_entry_contract/models/hr_contract.py:0
#: code:addons/hr_work_entry_contract/models/hr_contract.py
#, python-format
msgid ""
"Sorry, generating work entries from cancelled contracts is not allowed."
msgstr ""
"Izvinjavam se, generiranje unosa rada iz otkazanih ugovora nije dozvoljeno."
#. module: hr_work_entry_contract
#. odoo-python
#: code:addons/hr_work_entry_contract/wizard/hr_work_entry_regeneration_wizard.py:0
#: code:addons/hr_work_entry_contract/wizard/hr_work_entry_regeneration_wizard.py
#, python-format
msgid ""
"The from date must be >= '%(earliest_available_date)s' and the to date must "
"be <= '%(latest_available_date)s', which correspond to the generated work "
"entries time interval."
msgstr ""
"Datum od mora biti >= '%(earliest_available_date)s' a datum do mora biti <= "
"'%(latest_available_date)s', što odgovara vremenskom intervalu generiranih "
"unosa rada."
#. module: hr_work_entry_contract
#: model_terms:ir.ui.view,arch_db:hr_work_entry_contract.hr_work_entry_contract_view_form_inherit
msgid "This work entry cannot be validated. The work entry type is undefined."
msgstr "Ovaj unos rada se ne može ovjeriti. Tip unosa rada nije definiran."
# taken from hr.po
#. module: hr_work_entry_contract
#: model:ir.model.fields,field_description:hr_work_entry_contract.field_hr_work_entry_type__is_leave
msgid "Time Off"
msgstr "Odsustva"
# taken from hr.po
#. module: hr_work_entry_contract
#: model:ir.model.fields,field_description:hr_work_entry_contract.field_hr_work_entry_regeneration_wizard__date_to
msgid "To"
msgstr "Do"
# taken from hr.po
#. module: hr_work_entry_contract
#: model:hr.work.entry.type,name:hr_work_entry_contract.work_entry_type_unpaid_leave
msgid "Unpaid"
msgstr "Neplaćeno"
# taken from hr.po
#. module: hr_work_entry_contract
#: model:ir.model.fields,field_description:hr_work_entry_contract.field_hr_work_entry_regeneration_wizard__valid
msgid "Valid"
@ -316,12 +351,13 @@ msgstr "Unosi rada u intervalu"
msgid "Work Entry Regeneration"
msgstr "Regeneracija Unosa Rada"
# taken from hr.po
#. module: hr_work_entry_contract
#: model:ir.model.fields,field_description:hr_work_entry_contract.field_hr_contract__work_entry_source
#: model:ir.model.fields,field_description:hr_work_entry_contract.field_hr_work_entry__work_entry_source
msgid "Work Entry Source"
msgstr "Izvor radnih sati"
# taken from hr.po
#. module: hr_work_entry_contract
#: model:ir.model.fields.selection,name:hr_work_entry_contract.selection__hr_contract__work_entry_source__calendar
msgid "Working Schedule"