96 lines
3.8 KiB
XML
96 lines
3.8 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!--
|
|
© 2017 Akretion France (www.akretion.com)
|
|
@author: Alexis de Lattre <alexis.delattre@akretion.com>
|
|
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
|
-->
|
|
|
|
<odoo>
|
|
|
|
|
|
<record id="lunch_voucher_attribution_form" model="ir.ui.view">
|
|
<field name="name">lunch.voucher.attribution.form</field>
|
|
<field name="model">lunch.voucher.attribution</field>
|
|
<field name="arch" type="xml">
|
|
<form string="Lunch Vouchers Attribution">
|
|
<group name="main">
|
|
<field name="employee_id"/>
|
|
<field name="company_id" groups="base.group_multi_company"/>
|
|
<field name="date"/>
|
|
<field name="month_work_days"/>
|
|
<field name="no_lunch_days"/>
|
|
<field name="qty"/>
|
|
<field name="purchase_id"/>
|
|
</group>
|
|
<group name="holidays" string="Related Holidays">
|
|
<field name="holiday_ids" nolabel="1" context="{'tree_view_ref': 'hr_holidays_lunch_voucher.view_holiday', 'form_view_ref': 'hr_holidays_lunch_voucher.edit_holiday_new'}"/>
|
|
</group>
|
|
</form>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="lunch_voucher_attribution_tree" model="ir.ui.view">
|
|
<field name="name">lunch.voucher.attribution.tree</field>
|
|
<field name="model">lunch.voucher.attribution</field>
|
|
<field name="arch" type="xml">
|
|
<tree string="Lunch Vouchers Attribution">
|
|
<field name="date"/>
|
|
<field name="employee_id"/>
|
|
<field name="month_work_days"/>
|
|
<field name="no_lunch_days" sum="1"/>
|
|
<field name="qty" sum="Total"/>
|
|
<field name="purchase_id"/>
|
|
<field name="company_id" groups="base.group_multi_company"/>
|
|
</tree>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="lunch_voucher_attribution_search" model="ir.ui.view">
|
|
<field name="name">lunch.voucher.attribution.search</field>
|
|
<field name="model">lunch.voucher.attribution</field>
|
|
<field name="arch" type="xml">
|
|
<search string="Search Lunch Vouchers Attribution">
|
|
<field name="date"/>
|
|
<field name="employee_id"/>
|
|
<filter name="purchased" string="Purchased" domain="[('purchase_id', '!=', False)]"/>
|
|
<filter name="to_purchase" string="To Purchase" domain="[('purchase_id', '=', False)]"/>
|
|
<group string="Group By" name="groupby">
|
|
<filter name="employee_groupby" string="Employee" context="{'group_by': 'employee_id'}"/>
|
|
<filter name="purchase_order_groupby" string="Purchase Order" context="{'group_by': 'purchase_id'}"/>
|
|
</group>
|
|
</search>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="lunch_voucher_attribution_graph" model="ir.ui.view">
|
|
<field name="name">lunch.voucher.attribution.graph</field>
|
|
<field name="model">lunch.voucher.attribution</field>
|
|
<field name="arch" type="xml">
|
|
<graph string="Lunch Vouchers Attribution" type="pivot">
|
|
<field name="date" type="row" interval="month"/>
|
|
<field name="qty" type="measure"/>
|
|
</graph>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="lunch_voucher_attribution_action" model="ir.actions.act_window">
|
|
<field name="name">Lunch Voucher Attribution</field>
|
|
<field name="res_model">lunch.voucher.attribution</field>
|
|
<field name="view_mode">tree,form,graph</field>
|
|
</record>
|
|
|
|
<menuitem id="lunch_voucher_attribution_menu"
|
|
action="lunch_voucher_attribution_action"
|
|
parent="hr_holidays.menu_hr_holidays_my_leaves" sequence="200"/>
|
|
|
|
<act_window id="lunch_voucher_attribution_action_create_po"
|
|
multi="True"
|
|
key2="client_action_multi"
|
|
name="Create Purchase Order"
|
|
res_model="lunch.voucher.purchase"
|
|
src_model="lunch.voucher.attribution"
|
|
view_mode="form"
|
|
target="new" />
|
|
|
|
</odoo>
|