File: lunch_supplier_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 (154 lines) | stat: -rw-r--r-- 8,380 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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
<?xml version="1.0" encoding="utf-8"?>
<odoo>
    <record id="lunch_supplier_view_tree" model="ir.ui.view">
        <field name="name">lunch.supplier.view.list</field>
        <field name="model">lunch.supplier</field>
        <field name="arch" type="xml">
            <list>
                <field name="name"/>
                <field name="phone" class="o_force_ltr"/>
                <field name="email"/>
            </list>
        </field>
    </record>

    <record id="lunch_supplier_view_form" model="ir.ui.view">
        <field name="name">lunch.supplier.view.form</field>
        <field name="model">lunch.supplier</field>
        <field name="arch" type="xml">
            <form>
                <sheet>
                    <widget name="web_ribbon" title="Archived" bg_color="text-bg-danger" invisible="active"/>
                    <div class="oe_title">
                        <label for="name" string="Vendor"/>
                        <h1><field name="name" required="1" placeholder="e.g. The Pizzeria Inn"/></h1>
                    </div>
                    <group>
                        <group>
                            <field name="partner_id" context="{'default_is_company': True, 'default_city': city, 'default_name': name, 'default_street': street, 'default_street2': street2, 'default_state_id': state_id, 'default_zip': zip_code, 'default_country_id': country_id, 'default_phone': phone}"/>
                            <label for="street" string="Address"/>
                            <div class="o_address_format">
                                <field name="street" placeholder="Street..." class="o_address_street"/>
                                <field name="street2" placeholder="Street 2..." class="o_address_street"/>
                                <field name="city" placeholder="City" class="o_address_city"/>
                                <field name="state_id" class="o_address_state" placeholder="State" options="{'no_open': True}" context="{'country_id': country_id, 'zip': zip_code}"/>
                                <field name="zip_code" placeholder="ZIP" class="o_address_zip"/>
                                <field name="country_id" placeholder="Country" class="o_address_country" options="{'no_open': True, 'no_create': True}"/>
                            </div>
                        </group>
                        <group>
                            <field name="active" invisible="1"/>
                            <field name="email" required="send_by == 'mail'"/>
                            <field name="phone" class="o_force_ltr" required="send_by == 'phone'"/>
                            <field name="company_id" groups="base.group_multi_company"/>
                            <field name="responsible_id" required="send_by == 'mail'" groups="base.group_no_one" domain="[('share', '=', False)]"/>
                        </group>
                    </group>
                    <group>
                        <group string="Availability">
                            <field name="tz" groups="base.group_no_one"/>
                            <label for="sun" class="d-none"/>
                            <field name="sun" invisible="1"/>
                            <widget name="week_days"/>
                            <field name="recurrency_end_date" groups="base.group_no_one"/>
                        </group>
                        <group string="Orders">
                            <field name="delivery"/>
                            <field name="available_location_ids" widget="many2many_tags"/>
                            <field name="send_by" widget="radio"/>
                            <label for="automatic_email_time" invisible="send_by != 'mail'"/>
                            <div class="o_row" invisible="send_by != 'mail'"><field name="automatic_email_time" widget="float_time"/> <field name="moment"/></div>
                        </group>
                    </group>
                    <group>
                        <group>
                            <field name="active" invisible="1"/>
                            <field name="topping_label_1"/>
                            <field name="topping_quantity_1" class="w-50"/>
                        </group>
                        <div>
                            <field name="topping_ids_1" nolabel="1">
                                <list editable="bottom">
                                    <field name="name"/>
                                    <field name="company_id" column_invisible="True"/>
                                    <field name="currency_id" column_invisible="True"/>
                                    <field name="price" widget="monetary"/>
                                </list>
                            </field>
                        </div>
                        <group>
                            <field name="topping_label_2"/>
                            <field name="topping_quantity_2" class="w-50"/>
                        </group>
                        <div>
                            <field name="topping_ids_2" nolabel="1">
                                <list editable="bottom">
                                    <field name="name"/>
                                    <field name="company_id" column_invisible="True"/>
                                    <field name="currency_id" column_invisible="True"/>
                                    <field name="price" widget="monetary"/>
                                </list>
                            </field>
                        </div>
                        <group>
                            <field name="topping_label_3"/>
                            <field name="topping_quantity_3" class="w-50"/>
                        </group>
                        <div>
                            <field name="topping_ids_3" nolabel="1">
                                <list editable="bottom">
                                    <field name="name"/>
                                    <field name="company_id" column_invisible="True"/>
                                    <field name="currency_id" column_invisible="True"/>
                                    <field name="price" widget="monetary"/>
                                </list>
                            </field>
                        </div>
                    </group>
                </sheet>
                <chatter/>
            </form>
        </field>
    </record>

    <record id="lunch_supplier_view_kanban" model="ir.ui.view">
        <field name="name">lunch.supplier.view.kanban</field>
        <field name="model">lunch.supplier</field>
        <field name="arch" type="xml">
            <kanban>
                <templates>
                    <t t-name="card">
                        <main>
                            <field name="display_name" class="fw-bold fs-5"/>
                            <field t-if="record.city.raw_value and !record.country_id.raw_value" name="city"/>
                            <field t-if="!record.city.raw_value and record.country_id.raw_value" name="country_id"/>
                            <div t-if="record.city.raw_value and record.country_id.raw_value">
                                <field name="city"/>, <field name="country_id"/>
                            </div>
                            <field t-if="record.email.raw_value" class="o_text_overflow" name="email"/>
                        </main>
                    </t>
                </templates>
            </kanban>
        </field>
    </record>

    <record id="lunch_supplier_view_search" model="ir.ui.view">
        <field name="name">lunch.supplier.view.search</field>
        <field name="model">lunch.supplier</field>
        <field name="arch" type="xml">
            <search>
                <field name="name"/>
                <separator/>
                <filter string="Archived" name="inactive" domain="[('active', '=', False)]"/>
            </search>
        </field>
    </record>

    <record id="lunch_vendors_action" model="ir.actions.act_window">
        <field name="name">Vendors</field>
        <field name="res_model">lunch.supplier</field>
        <field name="view_mode">kanban,list,form</field>
        <field name="search_view_id" ref="lunch_supplier_view_search"/>
    </record>
</odoo>