Initial commit: Hr packages

This commit is contained in:
Ernad Husremovic 2025-08-29 15:20:50 +02:00
commit 62531cd146
2820 changed files with 1432848 additions and 0 deletions

View file

@ -0,0 +1,48 @@
<?xml version="1.0" encoding="UTF-8"?>
<templates>
<t t-name="hr.expense.DocumentsHiddenUploadForm">
<div class="d-none o_expense_documents_upload">
<t t-call="HiddenInputFile">
<t t-set="multi_upload" t-value="true"/>
<t t-set="fileupload_id" t-value="widget.fileUploadID"/>
<t t-set="fileupload_action" t-translation="off">/web/binary/upload_attachment</t>
<input type="hidden" name="model" t-att-value="'hr.expense'"/>
<input type="hidden" name="id" t-att-value="0"/>
</t>
</div>
</t>
<t t-name="hr.expense.DocumentDropZone">
<div class="o_drop_area d-none">
<i class="fa fa-upload fa-10x"></i>
</div>
</t>
<t t-extend="ListView.buttons" t-name="ExpensesListView.buttons">
<t t-jquery="button.o_list_button_add" t-operation="after">
<button type="button" t-att-class="'d-none d-md-block btn' + (!widget.isMobile ? ' btn-secondary' : '') + ' o_button_upload_expense'">
Scan
</button>
</t>
<t t-jquery="button.o_list_button_add" t-operation="before">
<button type="button" t-att-class="'d-block d-md-none btn' + (widget.isMobile ? ' btn-primary' : '') + ' o_button_upload_expense'">
Scan
</button>
</t>
<!-- hr.expense buttons -->
<t t-jquery="button.o_list_button_add" t-operation="after">
<button type="button" t-att-class="'btn btn-secondary' + (widget.isExpense ? '' : ' d-none') + ' o_button_create_report'">
Create Report
</button>
</t>
<t t-jquery="button.o_list_button_add" t-operation="replace">
<button type="button" t-att-class="'btn' + (widget.isMobile ? ' btn-secondary' : ' btn-primary') + ' o_list_button_add'" title="Create record" accesskey="c">
Create
</button>
</t>
</t>
</templates>

View file

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<templates id="template">
<t t-name="hr_expense.dashboard_list_header">
<div class="o_expense_container position-sticky start-0 d-flex o_form_statusbar">
<t t-foreach="expenses" t-as="expense">
<div t-attf-class="o_expense_card o_arrow_button flex-grow-1 d-flex flex-column p-3 border-bottom text-center">
<span t-esc="render_monetary_field(expenses[expense]['amount'], expenses[expense]['currency'])" class="h2 m-0 text-odoo"/>
<b class="mx-2" t-esc="expenses[expense]['description']"/>
</div>
<div t-if="expense !== 'approved'" t-attf-class="o_expense_card o_arrow_button flex-grow-1 d-flex flex-column p-3 border-bottom text-center">
<i class="fa fa-angle-right fa-3x"/>
</div>
</t>
</div>
</t>
</templates>

View file

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<templates id="template" xml:space="preserve">
<t t-name="hr_expense_qr_code">
<div style="text-align:center;" class="o_expense_modal">
<t t-if="widget.url">
<h3>Scan this QR code to get the Odoo app:</h3><br/><br/>
<img class="border border-dark rounded" t-att-src="widget.url"/>
</t>
</div>
</t>
</templates>