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:19 +01:00
parent 6308fcff4e
commit a2b6553e74
176 changed files with 3428 additions and 3278 deletions

View file

@ -22,10 +22,16 @@ msgid ""
" 'L2': {'partner_id': 2, 'amount': 200, 'name': 'some label 2'}, }\n"
" "
msgstr ""
"\n"
"Valjan rječnik za prepisivanje stavki predloška:\n"
"{'L1': {'partner_id': 1, 'amount': 100, 'name': 'neka oznaka'},\n"
" 'L2': {'partner_id': 2, 'amount': 200, 'name': 'neka oznaka 2'}, }\n"
" "
# taken from hr.po
#. module: account_move_template
#. odoo-python
#: code:addons/account_move_template/models/account_move_template.py:0
#: code:addons/account_move_template/models/account_move_template.py
#, python-format
msgid "%s (copy)"
msgstr "%s (kopija)"
@ -40,143 +46,140 @@ msgstr ">"
msgid "1250"
msgstr "1250"
# taken from hr.po
#. module: account_move_template
#: model:ir.model.fields,field_description:account_move_template.field_account_move_template_line__account_id
#: model:ir.model.fields,field_description:account_move_template.field_account_move_template_line_run__account_id
msgid "Account"
msgstr "Konto"
#. module: account_move_template
#: model:ir.model.fields,field_description:account_move_template.field_account_move_template_line__opt_account_id
msgid "Account if Negative"
msgstr "Račun ako je negativan"
msgstr "Račun (ako je negativno)"
#. module: account_move_template
#: model:ir.model.fields,field_description:account_move_template.field_account_move_template__active
msgid "Active"
msgstr "Aktivan"
# taken from hr.po
#. module: account_move_template
#: model:ir.model.fields,field_description:account_move_template.field_account_move_template_line_run__amount
msgid "Amount"
msgstr "Iznos"
# taken from hr.po
#. module: account_move_template
#: model:ir.model.fields,field_description:account_move_template.field_account_move_template_line__analytic_distribution
#: model:ir.model.fields,field_description:account_move_template.field_account_move_template_line_run__analytic_distribution
msgid "Analytic"
msgstr "Analitika"
msgstr "Analitički"
#. module: account_move_template
#: model:ir.model.fields,field_description:account_move_template.field_account_move_template_line__analytic_distribution_search
#: model:ir.model.fields,field_description:account_move_template.field_account_move_template_line_run__analytic_distribution_search
msgid "Analytic Distribution Search"
msgstr "Pretraga analitičkih distribucija"
#. module: account_move_template
#: model:ir.model.fields,field_description:account_move_template.field_account_move_template_line__analytic_precision
#: model:ir.model.fields,field_description:account_move_template.field_account_move_template_line_run__analytic_precision
msgid "Analytic Precision"
msgstr "Preciznost analitike"
#. module: account_move_template
#: model_terms:ir.ui.view,arch_db:account_move_template.account_move_template_form
#: model_terms:ir.ui.view,arch_db:account_move_template.account_move_template_search
msgid "Archived"
msgstr "Arhivirano"
# taken from hr.po
#. module: account_move_template
#: model_terms:ir.ui.view,arch_db:account_move_template.account_move_template_run_form
msgid "Cancel"
msgstr "Otkaži"
# taken from hr.po
#. module: account_move_template
#: model:ir.model.fields,field_description:account_move_template.field_account_move_template__company_id
#: model:ir.model.fields,field_description:account_move_template.field_account_move_template_line__company_id
#: model:ir.model.fields,field_description:account_move_template.field_account_move_template_line_run__company_id
#: model:ir.model.fields,field_description:account_move_template.field_account_move_template_run__company_id
msgid "Company"
msgstr "Tvrtka"
# taken from hr.po
#. module: account_move_template
#: model:ir.model.fields,field_description:account_move_template.field_account_move_template_line__company_currency_id
#: model:ir.model.fields,field_description:account_move_template.field_account_move_template_line_run__company_currency_id
msgid "Company Currency"
msgstr "Valuta tvrtke"
# taken from hr.po
#. module: account_move_template
#: model:ir.model.fields.selection,name:account_move_template.selection__account_move_template_line__type__computed
msgid "Computed"
msgstr "Izračunato"
# taken from hr.po
#. module: account_move_template
#: model:ir.actions.act_window,name:account_move_template.account_move_template_run_action
#: model:ir.ui.menu,name:account_move_template.account_move_template_run_menu
msgid "Create Entry from Template"
msgstr "Kreiraj temeljnicu iz predloška"
# taken from hr.po
#. module: account_move_template
#: model_terms:ir.ui.view,arch_db:account_move_template.account_move_template_run_form
#, fuzzy
msgid "Create Journal Entry"
msgstr "Kreirano"
# taken from hr.po
#. module: account_move_template
#: model:ir.model.fields,field_description:account_move_template.field_account_move_template__create_uid
#: model:ir.model.fields,field_description:account_move_template.field_account_move_template_line__create_uid
#: model:ir.model.fields,field_description:account_move_template.field_account_move_template_line_run__create_uid
#: model:ir.model.fields,field_description:account_move_template.field_account_move_template_run__create_uid
msgid "Created by"
msgstr "Kreirao"
# taken from hr.po
#. module: account_move_template
#: model:ir.model.fields,field_description:account_move_template.field_account_move_template__create_date
#: model:ir.model.fields,field_description:account_move_template.field_account_move_template_line__create_date
#: model:ir.model.fields,field_description:account_move_template.field_account_move_template_line_run__create_date
#: model:ir.model.fields,field_description:account_move_template.field_account_move_template_run__create_date
msgid "Created on"
msgstr "Kreirano"
# taken from hr.po
#. module: account_move_template
#: model:ir.model.fields.selection,name:account_move_template.selection__account_move_template_line__move_line_type__cr
#: model:ir.model.fields.selection,name:account_move_template.selection__account_move_template_line_run__move_line_type__cr
msgid "Credit"
msgstr "Potražuje"
# taken from hr.po
#. module: account_move_template
#: model:ir.model.fields,field_description:account_move_template.field_account_move_template_run__date
msgid "Date"
msgstr "Datum"
# taken from hr.po
#. module: account_move_template
#: model:ir.model.fields.selection,name:account_move_template.selection__account_move_template_line__move_line_type__dr
#: model:ir.model.fields.selection,name:account_move_template.selection__account_move_template_line_run__move_line_type__dr
msgid "Debit"
msgstr "Duguje"
# taken from hr.po
#. module: account_move_template
#. odoo-python
#: code:addons/account_move_template/wizard/account_move_template_run.py:0
#: code:addons/account_move_template/wizard/account_move_template_run.py
#, python-format
msgid "Debit and credit of all lines are null."
msgstr "Duguje i potražuje svih stavaka je nula."
# taken from hr.po
#. module: account_move_template
#: model:ir.model.fields,field_description:account_move_template.field_account_move_template_line__move_line_type
#: model:ir.model.fields,field_description:account_move_template.field_account_move_template_line_run__move_line_type
msgid "Direction"
msgstr "Smjer"
# taken from hr.po
#. module: account_move_template
#: model:ir.model.fields,field_description:account_move_template.field_account_move_template__display_name
#: model:ir.model.fields,field_description:account_move_template.field_account_move_template_line__display_name
#: model:ir.model.fields,field_description:account_move_template.field_account_move_template_line_run__display_name
#: model:ir.model.fields,field_description:account_move_template.field_account_move_template_run__display_name
msgid "Display Name"
msgstr "Prikaži naziv"
# taken from hr.po
#. module: account_move_template
#. odoo-python
#: code:addons/account_move_template/wizard/account_move_template_run.py:0
#: code:addons/account_move_template/wizard/account_move_template_run.py
#, python-format
msgid "Entry from template %s"
msgstr "Stavka iz predloška %s"
@ -186,6 +189,7 @@ msgstr "Stavka iz predloška %s"
msgid "Formula"
msgstr "Formula"
# taken from hr.po
#. module: account_move_template
#: model_terms:ir.ui.view,arch_db:account_move_template.account_move_template_form
msgid "Generate Journal Entry"
@ -193,72 +197,74 @@ msgstr "Stvori stavku dnevnika"
#. module: account_move_template
#: model:ir.model.fields,field_description:account_move_template.field_account_move_template__id
#: model:ir.model.fields,field_description:account_move_template.field_account_move_template_line__id
#: model:ir.model.fields,field_description:account_move_template.field_account_move_template_line_run__id
#: model:ir.model.fields,field_description:account_move_template.field_account_move_template_run__id
msgid "ID"
msgstr "ID"
#. module: account_move_template
#. odoo-python
#: code:addons/account_move_template/models/account_move_template.py:0
#: code:addons/account_move_template/models/account_move_template.py
#, python-format
msgid ""
"Impossible to compute the formula of line with sequence %(sequence)s "
"(formula: %(code)s). Check that the lines used in the formula really exists "
"and have a lower sequence than the current line."
msgstr ""
"Nemoguće izračunati formulu za stavku sa redoslijedom %(sequence)s (formula:"
" %(code)s). Provjerite da stavke korištene u formuli stvarno postoje i imaju"
" niži redoslijed od trenutne stavke."
#. module: account_move_template
#. odoo-python
#: code:addons/account_move_template/models/account_move_template.py:0
#: code:addons/account_move_template/models/account_move_template.py
#, python-format
msgid ""
"Impossible to compute the formula of line with sequence %(sequence)s "
"(formula: %(code)s): the syntax of the formula is wrong."
msgstr ""
"Nemoguće izračunati formulu za stavku sa redoslijedom %(sequence)s (formula:"
" %(code)s): sintaksa formule je pogrešna."
#. module: account_move_template
#. odoo-python
#: code:addons/account_move_template/wizard/account_move_template_run.py:0
#: code:addons/account_move_template/wizard/account_move_template_run.py
#, python-format
msgid ""
"Invalid dictionary: %(exception)s\n"
"%(msg)s"
msgstr ""
"Nevažeći rječnik: %(exception)s\n"
"%(msg)s"
#. module: account_move_template
#: model:ir.model.fields,field_description:account_move_template.field_account_move_template_line__is_refund
#: model:ir.model.fields,field_description:account_move_template.field_account_move_template_line_run__is_refund
msgid "Is a refund?"
msgstr "Je povrat?"
# taken from hr.po
#. module: account_move_template
#: model:ir.model.fields,field_description:account_move_template.field_account_move_template__journal_id
#: model:ir.model.fields,field_description:account_move_template.field_account_move_template_run__journal_id
#: model_terms:ir.ui.view,arch_db:account_move_template.account_move_template_search
msgid "Journal"
msgstr "Dnevnik"
# taken from hr.po
#. module: account_move_template
#: model:ir.model,name:account_move_template.model_account_move_template
#: model_terms:ir.ui.view,arch_db:account_move_template.account_move_template_form
#: model_terms:ir.ui.view,arch_db:account_move_template.account_move_template_run_form
#: model_terms:ir.ui.view,arch_db:account_move_template.account_move_template_search
msgid "Journal Entry Template"
msgstr "Predložak temeljnice"
# taken from hr.po
#. module: account_move_template
#: model_terms:ir.ui.view,arch_db:account_move_template.account_move_template_line_form
msgid "Journal Entry Template Line"
msgstr "Stavka predloška temeljnice"
# taken from hr.po
#. module: account_move_template
#: model:ir.actions.act_window,name:account_move_template.account_move_template_action
#: model:ir.ui.menu,name:account_move_template.account_move_template_menu
msgid "Journal Entry Templates"
msgstr "Predlošci temeljnica"
# taken from hr.po
#. module: account_move_template
#: model:ir.model,name:account_move_template.model_account_move_template_line
msgid "Journal Item Template"
@ -266,7 +272,7 @@ msgstr "Predložak temeljnice"
#. module: account_move_template
#. odoo-python
#: code:addons/account_move_template/wizard/account_move_template_run.py:0
#: code:addons/account_move_template/wizard/account_move_template_run.py
#, python-format
msgid "Keys must be line sequence i.e. L1, L2, ..."
msgstr "Ključevi moraju biti sekvenca linije tj. L1, L2, ..."
@ -286,71 +292,70 @@ msgstr "L1 + L2 + L3"
msgid "L2 - L1"
msgstr "L2 - L1"
# taken from hr.po
#. module: account_move_template
#: model:ir.model.fields,field_description:account_move_template.field_account_move_template_line__name
msgid "Label"
msgstr "Natpis"
# taken from hr.po
#. module: account_move_template
#: model:ir.model.fields,field_description:account_move_template.field_account_move_template____last_update
#: model:ir.model.fields,field_description:account_move_template.field_account_move_template_line____last_update
#: model:ir.model.fields,field_description:account_move_template.field_account_move_template_line_run____last_update
#: model:ir.model.fields,field_description:account_move_template.field_account_move_template_run____last_update
msgid "Last Modified on"
msgstr "Zadnje mijenjano"
# taken from hr.po
#. module: account_move_template
#: model:ir.model.fields,field_description:account_move_template.field_account_move_template__write_uid
#: model:ir.model.fields,field_description:account_move_template.field_account_move_template_line__write_uid
#: model:ir.model.fields,field_description:account_move_template.field_account_move_template_line_run__write_uid
#: model:ir.model.fields,field_description:account_move_template.field_account_move_template_run__write_uid
msgid "Last Updated by"
msgstr "Zadnji ažurirao"
# taken from hr.po
#. module: account_move_template
#: model:ir.model.fields,field_description:account_move_template.field_account_move_template__write_date
#: model:ir.model.fields,field_description:account_move_template.field_account_move_template_line__write_date
#: model:ir.model.fields,field_description:account_move_template.field_account_move_template_line_run__write_date
#: model:ir.model.fields,field_description:account_move_template.field_account_move_template_run__write_date
msgid "Last Updated on"
msgstr "Zadnje ažurirano"
# taken from hr.po
#. module: account_move_template
#: model:ir.model.fields,field_description:account_move_template.field_account_move_template__line_ids
#: model:ir.model.fields,field_description:account_move_template.field_account_move_template_run__line_ids
msgid "Lines"
msgstr "Stavke"
# taken from hr.po
#. module: account_move_template
#: model:ir.model.fields,field_description:account_move_template.field_account_move_template_line__template_id
msgid "Move Template"
msgstr "Predložak temeljnice"
# taken from hr.po
#. module: account_move_template
#: model:ir.model.fields,field_description:account_move_template.field_account_move_template__name
#: model:ir.model.fields,field_description:account_move_template.field_account_move_template_line_run__name
msgid "Name"
msgstr "Naziv"
# taken from hr.po
#. module: account_move_template
#: model_terms:ir.ui.view,arch_db:account_move_template.account_move_template_run_form
msgid "Next"
msgstr "Sljedeći"
# taken from hr.po
#. module: account_move_template
#: model:ir.model.fields,field_description:account_move_template.field_account_move_template_line__note
#: model:ir.model.fields,field_description:account_move_template.field_account_move_template_line_run__note
msgid "Note"
msgstr "Napomena"
# taken from hr.po
#. module: account_move_template
#: model:ir.model.fields,field_description:account_move_template.field_account_move_template_line__tax_line_id
#: model:ir.model.fields,field_description:account_move_template.field_account_move_template_line_run__tax_line_id
msgid "Originator Tax"
msgstr "Izvorni porez"
# taken from hr.po
#. module: account_move_template
#: model:ir.model.fields,field_description:account_move_template.field_account_move_template_run__partner_id
#, fuzzy
msgid "Override Partner"
msgstr "Partner"
@ -361,52 +366,54 @@ msgstr "Prepiši"
#. module: account_move_template
#. odoo-python
#: code:addons/account_move_template/wizard/account_move_template_run.py:0
#: code:addons/account_move_template/wizard/account_move_template_run.py
#, python-format
msgid "Overwrite value must be a valid python dict"
msgstr "Vrijednost za prepisivanje mora biti valjan python rječnik"
#. module: account_move_template
#: model:ir.model.fields,field_description:account_move_template.field_account_move_template_line__partner_id
#: model:ir.model.fields,field_description:account_move_template.field_account_move_template_line_run__partner_id
msgid "Partner"
msgstr "Partner"
# taken from hr.po
#. module: account_move_template
#: model:ir.model.fields,field_description:account_move_template.field_account_move_template_line__payment_term_id
#: model:ir.model.fields,field_description:account_move_template.field_account_move_template_line_run__payment_term_id
msgid "Payment Terms"
msgstr "Uvjeti plaćanja"
#. module: account_move_template
#. odoo-python
#: code:addons/account_move_template/models/account_move_template.py:0
#: code:addons/account_move_template/models/account_move_template.py
#, python-format
msgid "Python Code must be set for computed line with sequence %d."
msgstr "Python kod mora biti postavljen za izračunatu liniju sa sekvencom %d."
# taken from hr.po
#. module: account_move_template
#: model:ir.model.fields,field_description:account_move_template.field_account_move_template__ref
#: model:ir.model.fields,field_description:account_move_template.field_account_move_template_run__ref
msgid "Reference"
msgstr "Referenca"
# taken from hr.po
#. module: account_move_template
#: model:ir.model.fields.selection,name:account_move_template.selection__account_move_template_run__state__select_template
msgid "Select Template"
msgstr "Odaberi predložak"
# taken from hr.po
#. module: account_move_template
#: model:ir.model.fields,field_description:account_move_template.field_account_move_template_line__sequence
#: model:ir.model.fields,field_description:account_move_template.field_account_move_template_line_run__sequence
msgid "Sequence"
msgstr "Sekvenca"
# taken from hr.po
#. module: account_move_template
#: model:ir.model.fields.selection,name:account_move_template.selection__account_move_template_run__state__set_lines
msgid "Set Lines"
msgstr "Postavi stavke"
# taken from hr.po
#. module: account_move_template
#: model:ir.model.fields,field_description:account_move_template.field_account_move_template_run__state
msgid "State"
@ -414,41 +421,46 @@ msgstr "Stanje"
#. module: account_move_template
#: model:ir.model.fields,field_description:account_move_template.field_account_move_template_line__tax_repartition_line_id
#: model:ir.model.fields,field_description:account_move_template.field_account_move_template_line_run__tax_repartition_line_id
msgid "Tax Repartition Line"
msgstr "Linija raspoređivanja poreza"
# taken from hr.po
#. module: account_move_template
#: model:ir.model.fields,field_description:account_move_template.field_account_move_template_line__tax_ids
#: model:ir.model.fields,field_description:account_move_template.field_account_move_template_line_run__tax_ids
msgid "Taxes"
msgstr "Porezi"
# taken from hr.po
#. module: account_move_template
#: model:ir.model.fields,field_description:account_move_template.field_account_move_template_run__template_id
msgid "Template"
msgstr "Predložak"
# taken from hr.po
#. module: account_move_template
#: model:ir.model.constraint,message:account_move_template.constraint_account_move_template_line_sequence_template_uniq
msgid "The sequence of the line must be unique per template!"
msgstr "Sekvenca redka mora biti jedinstvena u predlošku!"
# taken from hr.po
#. module: account_move_template
#: model:ir.model.constraint,message:account_move_template.constraint_account_move_template_name_company_unique
msgid "This name is already used by another template!"
msgstr "Ovaj naziv se već koristi za drugi predložak!"
# taken from hr.po
#. module: account_move_template
#: model:ir.model.fields,field_description:account_move_template.field_account_move_template_line__type
msgid "Type"
msgstr "Vrsta"
# taken from hr.po
#. module: account_move_template
#: model:ir.model.fields,help:account_move_template.field_account_move_template_line__payment_term_id
msgid "Used to compute the due date of the journal item."
msgstr "Koristi se za izračun datuma dospijeća stavke temeljnice."
# taken from hr.po
#. module: account_move_template
#: model:ir.model.fields.selection,name:account_move_template.selection__account_move_template_line__type__input
msgid "User input"
@ -456,7 +468,7 @@ msgstr "Ručni unos"
#. module: account_move_template
#. odoo-python
#: code:addons/account_move_template/wizard/account_move_template_run.py:0
#: code:addons/account_move_template/wizard/account_move_template_run.py
#, python-format
msgid "Valid fields to overwrite are %s"
msgstr "Važeća polja za prepisivanje su %s"
@ -466,16 +478,19 @@ msgstr "Važeća polja za prepisivanje su %s"
msgid "When amount is negative, use this account instead"
msgstr "Kada je iznos negativan, koristi ovaj račun umjesto"
# taken from hr.po
#. module: account_move_template
#: model:ir.model.fields,field_description:account_move_template.field_account_move_template_line_run__wizard_id
msgid "Wizard"
msgstr "Čarobnjak"
# taken from hr.po
#. module: account_move_template
#: model:ir.model,name:account_move_template.model_account_move_template_line_run
msgid "Wizard Lines to generate move from template"
msgstr "Stavke za generiranje temeljnice iz predloška"
# taken from hr.po
#. module: account_move_template
#: model:ir.model,name:account_move_template.model_account_move_template_run
msgid "Wizard to generate move from template"
@ -483,13 +498,16 @@ msgstr "Čarobnjak za kreiranje temeljnice iz predloška"
#. module: account_move_template
#. odoo-python
#: code:addons/account_move_template/models/account_move_template.py:0
#: code:addons/account_move_template/models/account_move_template.py
#, python-format
msgid ""
"You added a line in the wizard. This is not allowed: you should either "
"update the template or modify the journal entry that will be generated by "
"this wizard."
msgstr ""
"Dodali ste stavku u čarobnjak. Ovo nije dozvoljeno: trebate ili ažurirati "
"predložak ili promijeniti knjiženje koje će biti generirano od strane ovog "
"čarobnjaka."
#. module: account_move_template
#: model_terms:ir.ui.view,arch_db:account_move_template.account_move_template_line_form
@ -497,13 +515,18 @@ msgid ""
"You can refer to other lines using their sequence number e.g. <i>L1</i> for "
"line with sequence = 1. Examples:"
msgstr ""
"Možete se referisati na druge stavke koristeći njihov redni broj npr. "
"<i>L1</i> za stavku sa redoslijedom = 1. Primjeri:"
#. module: account_move_template
#. odoo-python
#: code:addons/account_move_template/models/account_move_template.py:0
#: code:addons/account_move_template/models/account_move_template.py
#, python-format
msgid ""
"You deleted a line in the wizard. This is not allowed: you should either "
"update the template or modify the journal entry that will be generated by "
"this wizard."
msgstr ""
"Obrisali ste stavku u čarobnjaku. Ovo nije dozvoljeno: trebate ili ažurirati"
" predložak ili promijeniti knjiženje koje će biti generirano od strane ovog "
"čarobnjaka."