File: lunch_cashmove_views.xml

package info (click to toggle)
odoo 18.0.0%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 878,716 kB
  • sloc: javascript: 927,937; python: 685,670; xml: 388,524; sh: 1,033; sql: 415; makefile: 26
file content (93 lines) | stat: -rw-r--r-- 4,143 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
<?xml version="1.0" encoding="utf-8"?>
<odoo>
    <record id="lunch_cashmove_view_search" model="ir.ui.view">
        <field name='name'>lunch.cashmove.search</field>
        <field name='model'>lunch.cashmove</field>
        <field name='arch' type='xml'>
            <search string="lunch employee payment">
                <field name="description"/>
                <field name="user_id"/>
                <filter name='is_mine_group' string="My Account grouped" domain="[('user_id','=',uid)]" context="{'group_by':'user_id'}"/>
                <filter name="group_by_user" string="By User" context="{'group_by':'user_id'}"/>
            </search>
        </field>
    </record>

    <record id="lunch_cashmove_view_tree" model="ir.ui.view">
        <field name="name">lunch.cashmove.list</field>
        <field name="model">lunch.cashmove</field>
        <field name="arch" type="xml">
            <list string="cashmove list">
                <field name="currency_id" column_invisible="True"/>
                <field name="date"/>
                <field name="user_id"/>
                <field name="description"/>
                <field name="amount" sum="Total" widget="monetary"/>
            </list>
        </field>
    </record>

    <record id="lunch_cashmove_view_form" model="ir.ui.view">
        <field name="name">lunch.cashmove.form</field>
        <field name="model">lunch.cashmove</field>
        <field name="arch" type="xml">
            <form string="cashmove form">
                <sheet>
                    <group>
                        <field name="currency_id" invisible="1"/>
                        <field name="user_id" required="1"/>
                        <field name="date"/>
                        <field name="amount" widget="monetary"/>
                    </group>
                    <label for='description'/>
                    <field name="description"/>
                </sheet>
            </form>
        </field>
    </record>

    <record id="view_lunch_cashmove_kanban" model="ir.ui.view">
        <field name="name">lunch.cashmove.kanban</field>
        <field name="model">lunch.cashmove</field>
        <field name="arch" type="xml">
            <kanban class="o_kanban_mobile">
                <field name="currency_id"/>
                <templates>
                    <t t-name="card">
                        <div class="row mb4">
                            <div class="col-8 fw-bold fs-5">
                                <field name="description" />
                            </div>
                            <div class="col-4 text-end badge rounded-pill fw-bolder pe-3 pt-1">
                                <i class="fa fa-money" role="img" aria-label="Amount" title="Amount"/> <field name="amount" widget="monetary"/>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-6">
                                <i class="fa fa-clock-o" role="img" aria-label="Date" title="Date"/> <field name="date" />
                            </div>
                            <div class="col-6">
                                <field name="user_id" widget="many2one_avatar_user" class="float-end"/>
                            </div>
                        </div>
                    </t>
                </templates>
            </kanban>
        </field>
    </record>

    <record id="lunch_cashmove_action_payment" model="ir.actions.act_window">
        <field name="name">Cash Moves</field>
        <field name="res_model">lunch.cashmove</field>
        <field name="view_mode">list,kanban,form</field>
        <field name="search_view_id" ref="lunch_cashmove_view_search"/>
        <field name="view_id" ref="lunch_cashmove_view_tree"/>
        <field name="help" type="html">
          <p class="o_view_nocontent_smiling_face">
            Register a payment
          </p><p>
            Payments are used to register liquidity movements. You can process those payments by your own means or by using installed facilities.
          </p>
        </field>
    </record>
</odoo>