0% found this document useful (0 votes)
63 views

2.1 Code Sample - Views

This document contains the XML code that defines the structure and fields of product template views in Odoo. It includes the main form view with sections for general information, sales, and notes. Fields shown include name, image, prices, costs, supplier info, and description. The views are structured with a header, sheet, notebook and groups to organize the different product information.

Uploaded by

otgntgs
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
63 views

2.1 Code Sample - Views

This document contains the XML code that defines the structure and fields of product template views in Odoo. It includes the main form view with sections for general information, sales, and notes. Fields shown include name, image, prices, costs, supplier info, and description. The views are structured with a header, sheet, notebook and groups to organize the different product information.

Uploaded by

otgntgs
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 16

3/6/2020 odoo/product_views.

xml at 76c443eda331b75bf5dfa7ec22b8eb22e1084343 · odoo/odoo · GitHub

Dismiss
Join GitHub today
GitHub is home to over 40 million developers working together to
host and review code, manage projects, and build software together.

Sign up

Tree: 76c443eda3 Find file Copy path

odoo / addons / product / views / product_views.xml

tdi-odoo [IMP] purchase: add supplier's pricelist search view filters and grou…

ecbf612 on Sep 27, 2016

6 contributors

Raw Blame History

544 lines (524 sloc) 28.7 KB

1 <?xml version="1.0" encoding="utf-8"?>


2 <odoo>
3 <data>
4 <!-- base structure of product.template, common with product.product -->
5 <record id="product_template_form_view" model="ir.ui.view">
6 <field name="name">product.template.common.form</field>
7 <field name="model">product.template</field>
8 <field name="mode">primary</field>
9 <field name="arch" type="xml">
10 <form string="Product">
11 <header>

https://github.com/odoo/odoo/blob/76c443eda331b75bf5dfa7ec22b8eb22e1084343/addons/product/views/product_views.xml 1/16
3/6/2020 odoo/product_views.xml at 76c443eda331b75bf5dfa7ec22b8eb22e1084343 · odoo/odoo · GitHub

12 <button string="Variant Prices" type="action"


13 name="%(product_attribute_value_action)d"
14 attrs="{'invisible': [('product_variant_count', '&lt;=', 1)]}"
15 groups="product.group_product_variant"/>
16 </header>
17 <sheet>
18 <field name='product_variant_count' invisible='1'/>
19 <field name="id" invisible="True"/>
20 <div class="oe_button_box" name="button_box">
21 <button name="toggle_active" type="object"
22 class="oe_stat_button" icon="fa-archive">
23 <field name="active" widget="boolean_button"
24 options='{"terminology": "archive"}'/>
25 </button>
26 </div>
27 <field name="image_medium" widget="image" class="oe_avatar"/>
28 <div class="oe_title">
29 <label class="oe_edit_only" for="name" string="Product Name"/>
30 <h1><field name="name" placeholder="Product Name"/></h1>
31 <div name="options" groups="base.group_user">
32 <div>
33 <field name="sale_ok"/>
34 <label for="sale_ok"/>
35 </div>
36 <div>
37 <field name="purchase_ok"/>
38 <label for="purchase_ok"/>
39 </div>
40 </div>
41 </div>
42 <notebook>
43 <page string="General Information" name="general_information">
44 <group>
45 <group name="group_general">
46 <field name="type"/>
47 </group>

https://github.com/odoo/odoo/blob/76c443eda331b75bf5dfa7ec22b8eb22e1084343/addons/product/views/product_views.xml 2/16
3/6/2020 odoo/product_views.xml at 76c443eda331b75bf5dfa7ec22b8eb22e1084343 · odoo/odoo · GitHub

48 <group name="group_standard_price">
49 <field name="list_price" widget='monetary' options="{'currency_field': 'currency_id'}"/>
50 <label for="standard_price" groups="base.group_user" attrs="{'invisible': [('product_varian
51 <div name="standard_price_uom" groups="base.group_user">
52 <field name="standard_price" widget='monetary' options="{'currency_field': 'currency_id
53 </div>
54 <field name="company_id" groups="base.group_multi_company"
55 options="{'no_create': True}"/>
56 <field name="uom_id" groups="product.group_uom" options="{'no_create': True}"/>
57 <field name="uom_po_id" groups="product.group_uom" options="{'no_create': True}"/>
58 <field name="currency_id" invisible="1"/>
59 </group>
60 </group>
61 </page>
62 <page string="Sales" attrs="{'invisible':[('sale_ok','=',False)]}" name="sales">
63 <div name="pricelist_item" groups="product.group_product_pricelist">
64 <separator string="Pricing"/>
65 <field name="item_ids" nolabel="1" context="{'default_base':'list_price', 'default_applied_on'
66 <tree string="Pricelist Items" editable="bottom">
67 <field name="pricelist_id" string="Pricelist" required='1'/>
68 <field name="fixed_price" string="Price" required='1'/>
69 <field name="min_quantity"/>
70 <field name="date_start"/>
71 <field name="date_end"/>
72 <field name="applied_on" invisible="1"/>
73 </tree>
74 </field>
75 </div>
76 <group name="sale">
77 <group name="email_template_and_project"
78 attrs="{'invisible':[('type', '!=', 'service')]}"/>
79 </group>
80 </page>
81 <page string="Notes" name="notes">
82 <group name="description">
83 <separator string="Description for Quotations" colspan="4"/>

https://github.com/odoo/odoo/blob/76c443eda331b75bf5dfa7ec22b8eb22e1084343/addons/product/views/product_views.xml 3/16
3/6/2020 odoo/product_views.xml at 76c443eda331b75bf5dfa7ec22b8eb22e1084343 · odoo/odoo · GitHub

84 <field name="description_sale" colspan="4" nolabel="1"


85 placeholder="This note will be displayed on the quotations."/>
86 </group>
87 </page>
88 </notebook>
89 </sheet>
90 <div class="oe_chatter">
91 <field name="message_follower_ids" widget="mail_followers"/>
92 <field name="message_ids" widget="mail_thread"/>
93 </div>
94 </form>
95 </field>
96 </record>
97
98 <record id="product_template_search_view" model="ir.ui.view">
99 <field name="name">product.template.search</field>
100 <field name="model">product.template</field>
101 <field name="arch" type="xml">
102 <search string="Product">
103 <field name="name" string="Product" filter_domain="['|','|',('default_code','ilike',self),('name','ilike',self)
104 <field name="categ_id" domain="[('categ_id', 'child_of', self)]"/>
105 <separator/>
106 <filter string="Services" name="services" domain="[('type','=','service')]"/>
107 <filter string="Products" name="consumable" domain="[('type', 'in', ['consu', 'product'])]" help="Products your
108 <separator/>
109 <filter string="Can be Sold" name="filter_to_sell" domain="[('sale_ok','=',1)]"/>
110 <filter string="Can be Purchased" name="filter_to_purchase" domain="[('purchase_ok', '=', 1)]"/>
111 <separator/>
112 <filter string="Archived" name="inactive" domain="[('active','=',False)]"/>
113 <field string="Attributes" name="attribute_line_ids" groups="product.group_product_variant"/>
114 <field name="pricelist_id" widget="selection" context="{'pricelist': self}" filter_domain="[]" groups="product.
115 </search>
116 </field>
117 </record>
118
119 <record id="product_template_action_all" model="ir.actions.act_window">

https://github.com/odoo/odoo/blob/76c443eda331b75bf5dfa7ec22b8eb22e1084343/addons/product/views/product_views.xml 4/16
3/6/2020 odoo/product_views.xml at 76c443eda331b75bf5dfa7ec22b8eb22e1084343 · odoo/odoo · GitHub

120 <field name="name">Products</field>


121 <field name="type">ir.actions.act_window</field>
122 <field name="res_model">product.template</field>
123 <field name="view_mode">kanban,tree,form</field>
124 <field name="view_type">form</field>
125 <field name="context">{}</field>
126 <field name="help" type="html">
127 <p class="oe_view_nocontent_create">
128 Click to define a new product.
129 </p>
130 </field>
131 </record>
132
133 <record id="product_search_form_view" model="ir.ui.view">
134 <field name="name">product.product.search</field>
135 <field name="model">product.product</field>
136 <field name="mode">primary</field>
137 <field name="inherit_id" ref="product.product_template_search_view"/>
138 <field name="arch" type="xml">
139 <field name="attribute_line_ids" position="replace">
140 <field name="attribute_value_ids" groups="product.group_product_variant"/>
141 <field name="product_tmpl_id" string="Product Template"/>
142 </field>
143 </field>
144 </record>
145
146 <record id="product_normal_action" model="ir.actions.act_window">
147 <field name="name">Product Variants</field>
148 <field name="type">ir.actions.act_window</field>
149 <field name="res_model">product.product</field>
150 <field name="view_mode">tree,form,kanban</field>
151 <field name="view_type">form</field>
152 <field name="search_view_id" ref="product_search_form_view"/>
153 <field name="view_id" eval="False"/> <!-- Force empty -->
154 <field name="help" type="html">
155 <p class="oe_view_nocontent_create">

https://github.com/odoo/odoo/blob/76c443eda331b75bf5dfa7ec22b8eb22e1084343/addons/product/views/product_views.xml 5/16
3/6/2020 odoo/product_views.xml at 76c443eda331b75bf5dfa7ec22b8eb22e1084343 · odoo/odoo · GitHub

156 Click to define a new product.


157 </p><p>
158 You must define a product for everything you sell, whether it's
159 a physical product, a consumable or a service you offer to
160 customers.
161 </p><p>
162 The product form contains information to simplify the sale
163 process: price, notes in the quotation, accounting data,
164 procurement methods, etc.
165 </p>
166 </field>
167 </record>
168
169 <record id="product_variant_easy_edit_view" model="ir.ui.view">
170 <field name="name">product.product.view.form.easy</field>
171 <field name="model">product.product</field>
172 <field name="mode">primary</field>
173 <field name="arch" type="xml">
174 <form string="Variant Information">
175 <sheet>
176 <field name="image_medium" widget="image" class="oe_avatar"/>
177 <div class="oe_title">
178 <label class="oe_edit_only" for="name" string="Product Name"/>
179 <h1><field name="name" placeholder="e.g. Odoo Enterprise Susbcription"/></h1>
180 </div>
181 <group>
182 <p>All general settings about this product are managed on <button name="open_product_template" type
183 </group>
184 <group string="Attributes">
185 <field name="attribute_value_ids" widget="many2many_tags"/>
186 </group>
187 <group>
188 <group name="codes" string="Codes">
189 <field name="barcode"/>
190 <field name="default_code"/>
191 </group>

https://github.com/odoo/odoo/blob/76c443eda331b75bf5dfa7ec22b8eb22e1084343/addons/product/views/product_views.xml 6/16
3/6/2020 odoo/product_views.xml at 76c443eda331b75bf5dfa7ec22b8eb22e1084343 · odoo/odoo · GitHub

192 <group>
193 <field name="active"/>
194 <field name="type" invisible="1"/>
195 </group>
196 </group>
197 <group>
198 <group name="pricing" string="Pricing">
199 <field name="product_variant_count" invisible="1"/>
200 <field name="lst_price" widget='monetary' options="{'currency_field': 'currency_id'}" attrs="{'
201 <field name="standard_price" widget='monetary' options="{'currency_field': 'currency_id'}"/>
202 <field name="currency_id" invisible='1'/>
203 </group>
204 <group name="weight">
205 <group name="weight" string="Weights">
206 <label for="volume"/>
207 <div class="o_row">
208 <field digits="(14, 3)" name="volume"/>
209 <span>m³</span>
210 </div>
211 <label for="weight"/>
212 <div class="o_row">
213 <field name="weight"/>
214 <span>kg</span>
215 </div>
216 </group>
217 </group>
218 </group>
219 </sheet>
220 </form>
221 </field>
222 </record>
223
224 <record id="product_variant_action" model="ir.actions.act_window">
225 <field name="name">Product Variants</field>
226 <field name="type">ir.actions.act_window</field>
227 <field name="res_model">product.product</field>

https://github.com/odoo/odoo/blob/76c443eda331b75bf5dfa7ec22b8eb22e1084343/addons/product/views/product_views.xml 7/16
3/6/2020 odoo/product_views.xml at 76c443eda331b75bf5dfa7ec22b8eb22e1084343 · odoo/odoo · GitHub

228 <field name="context">{'search_default_product_tmpl_id': [active_id], 'default_product_tmpl_id': active_id}</field>


229 <field name="search_view_id" ref="product_search_form_view"/>
230 <field name="view_ids"
231 eval="[(5, 0, 0),
232 (0, 0, {'view_mode': 'tree'}),
233 (0, 0, {'view_mode': 'form', 'view_id': ref('product_variant_easy_edit_view')}),
234 (0, 0, {'view_mode': 'kanban'})]"/>
235 <field name="help" type="html">
236 <p class="oe_view_nocontent_create">
237 Click to define a new product.
238 </p><p>
239 You must define a product for everything you sell, whether it's
240 a physical product, a consumable or a service you offer to
241 customers.
242 </p><p>
243 The product form contains information to simplify the sale
244 process: price, notes in the quotation, accounting data,
245 procurement methods, etc.
246 </p>
247 </field>
248 </record>
249
250 <record id="product_product_tree_view" model="ir.ui.view">
251 <field name="name">product.product.tree</field>
252 <field name="model">product.product</field>
253 <field eval="7" name="priority"/>
254 <field name="arch" type="xml">
255
256 <tree string="Product Variants">
257 <field name="default_code"/>
258 <field name="name"/>
259 <field name="attribute_value_ids" widget="many2many_tags" groups="product.group_product_variant"/>
260 <field name="lst_price"/>
261 <field name="price" invisible="not context.get('pricelist',False)"/>
262 <field name="uom_id" options="{'no_open': True, 'no_create': True}" groups="product.group_uom"/>
263 <field name="barcode"/>

https://github.com/odoo/odoo/blob/76c443eda331b75bf5dfa7ec22b8eb22e1084343/addons/product/views/product_views.xml 8/16
3/6/2020 odoo/product_views.xml at 76c443eda331b75bf5dfa7ec22b8eb22e1084343 · odoo/odoo · GitHub

264 <field name="product_tmpl_id" invisible="1"/>


265 <field name="active" invisible="1"/>
266 </tree>
267 </field>
268 </record>
269
270 <record id="product_normal_form_view" model="ir.ui.view">
271 <field name="name">product.product.form</field>
272 <field name="model">product.product</field>
273 <field name="mode">primary</field>
274 <field eval="7" name="priority"/>
275 <field name="inherit_id" ref="product.product_template_form_view"/>
276 <field name="arch" type="xml">
277 <form position="attributes">
278 <attribute name="string">Product Variant</attribute>
279 </form>
280 <field name="type" position="after">
281 <field name="default_code"/>
282 <field name="barcode"/>
283 </field>
284 <field name="list_price" position="attributes">
285 <attribute name="name">lst_price</attribute>
286 <attribute name="attrs">{'readonly': [('product_variant_count', '&gt;', 1)]}</attribute>
287 </field>
288 <field name="name" position="after">
289 <field name="product_tmpl_id" class="oe_inline" readonly="1" invisible="1" attrs="{'required': [('id', '!='
290 </field>
291 <field name="item_ids" position="replace">
292 <field name="pricelist_item_ids" widget="many2many">
293 <tree string="Pricelist Items">
294 <field name="name" string="Applicable On"/>
295 <field name="min_quantity"/>
296 <field name="date_start"/>
297 <field name="date_end"/>
298 <field name="price" string="Price"/>
299 <field name="base" invisible="1"/>

https://github.com/odoo/odoo/blob/76c443eda331b75bf5dfa7ec22b8eb22e1084343/addons/product/views/product_views.xml 9/16
3/6/2020 odoo/product_views.xml at 76c443eda331b75bf5dfa7ec22b8eb22e1084343 · odoo/odoo · GitHub

300 <field name="sequence" invisible="1"/>


301 <field name="price_discount" invisible="1"/>
302 <field name="applied_on" invisible="1"/>
303 <field name="compute_price" invisible="1"/>
304 </tree>
305 </field>
306 </field>
307 <xpath expr="//div[@class='oe_title']" position="inside">
308 <field name="attribute_value_ids" widget="many2many_tags" groups="product.group_product_variant"/>
309 </xpath>
310 </field>
311 </record>
312
313 <record id="product_kanban_view" model="ir.ui.view">
314 <field name="name">Product Kanban</field>
315 <field name="model">product.product</field>
316 <field name="arch" type="xml">
317 <kanban>
318 <field name="image_small"/>
319 <field name="lst_price"/>
320 <templates>
321 <t t-name="kanban-box">
322 <div class="oe_kanban_global_click">
323 <div class="o_kanban_tags_section">
324 <field name="attribute_value_ids" groups="product.group_product_variant"/>
325 </div>
326 <div class="o_kanban_image">
327 <img t-att-src="kanban_image('product.product', 'image_small', record.id.value)"/>
328 </div>
329 <div class="oe_kanban_details">
330 <strong><field name="name"/></strong>
331 <ul>
332 <li>Price: <field name="lst_price"></field></li>
333 </ul>
334 <div name="tags"/>
335 </div>

https://github.com/odoo/odoo/blob/76c443eda331b75bf5dfa7ec22b8eb22e1084343/addons/product/views/product_views.xml 10/16
3/6/2020 odoo/product_views.xml at 76c443eda331b75bf5dfa7ec22b8eb22e1084343 · odoo/odoo · GitHub

336 </div>
337 </t>
338 </templates>
339 </kanban>
340 </field>
341 </record>
342
343 <record id="product_normal_action_sell" model="ir.actions.act_window">
344 <field name="name">Product Variants</field>
345 <field name="type">ir.actions.act_window</field>
346 <field name="res_model">product.product</field>
347 <field name="view_mode">kanban,tree,form</field>
348 <field name="view_type">form</field>
349 <field name="context">{"search_default_filter_to_sell":1}</field>
350 <field name="view_id" ref="product_product_tree_view"/>
351 <field name="search_view_id" ref="product_search_form_view"/>
352 <field name="help" type="html">
353 <p class="oe_view_nocontent_create">
354 Click to define a new product.
355 </p><p>
356 You must define a product for everything you sell, whether it's
357 a physical product, a consumable or a service you offer to
358 customers.
359 </p><p>
360 The product form contains information to simplify the sale
361 process: price, notes in the quotation, accounting data,
362 procurement methods, etc.
363 </p>
364 </field>
365 </record>
366
367 <record id="product_category_search_view" model="ir.ui.view">
368 <field name="name">product.category.search</field>
369 <field name="model">product.category</field>
370 <field name="arch" type="xml">
371 <search string="Product Categories">

https://github.com/odoo/odoo/blob/76c443eda331b75bf5dfa7ec22b8eb22e1084343/addons/product/views/product_views.xml 11/16
3/6/2020 odoo/product_views.xml at 76c443eda331b75bf5dfa7ec22b8eb22e1084343 · odoo/odoo · GitHub

372 <field name="name" string="Product Categories"/>


373 <field name="parent_id"/>
374 </search>
375 </field>
376 </record>
377 <record id="product_category_form_view" model="ir.ui.view">
378 <field name="name">product.category.form</field>
379 <field name="model">product.category</field>
380 <field name="arch" type="xml">
381 <form class="oe_form_configuration">
382 <sheet>
383 <div class="oe_button_box" name="button_box">
384 <button class="oe_stat_button"
385 name="%(product_template_action_all)d"
386 icon="fa-th-list"
387 type="action"
388 context="{'search_default_categ_id': active_id}">
389 <div class="o_form_field o_stat_info">
390 <span class="o_stat_value"><field name="product_count"/></span>
391 <span class="o_stat_text"> Products</span>
392 </div>
393 </button>
394 </div>
395 <div class="oe_title">
396 <label for="name" string="Category name" class="oe_edit_only"/>
397 <h1><field name="name" placeholder="e.g. Lamps"/></h1>
398 </div>
399 <group name="first" col="4" string="Category Type">
400 <field name="parent_id"/>
401 <field name="type"/>
402 </group>
403 </sheet>
404 </form>
405 </field>
406 </record>
407 <record id="product_category_list_view" model="ir.ui.view">

https://github.com/odoo/odoo/blob/76c443eda331b75bf5dfa7ec22b8eb22e1084343/addons/product/views/product_views.xml 12/16
3/6/2020 odoo/product_views.xml at 76c443eda331b75bf5dfa7ec22b8eb22e1084343 · odoo/odoo · GitHub

408 <field name="name">product.category.list</field>


409 <field name="model">product.category</field>
410 <field name="priority">1</field>
411 <field name="arch" type="xml">
412 <tree string="Product Categories">
413 <field name="display_name"/>
414 </tree>
415 </field>
416 </record>
417 <record id="product_category_action_form" model="ir.actions.act_window">
418 <field name="name">Product Categories</field>
419 <field name="type">ir.actions.act_window</field>
420 <field name="res_model">product.category</field>
421 <field name="view_type">form</field>
422 <field name="search_view_id" ref="product_category_search_view"/>
423 <field name="view_id" ref="product_category_list_view"/>
424 </record>
425
426 <record model="ir.actions.act_window" id="action_packaging_view">
427 <field name="name">Packagings</field>
428 <field name="res_model">product.packaging</field>
429 </record>
430
431 <record id="product_packaging_tree_view" model="ir.ui.view">
432 <field name="name">product.packaging.tree.view</field>
433 <field name="model">product.packaging</field>
434 <field name="arch" type="xml">
435 <tree string="Packaging">
436 <field name="sequence" widget="handle"/>
437 <field name="name"/>
438 <field name="qty"/>
439 </tree>
440 </field>
441 </record>
442
443 <record id="product_packaging_form_view" model="ir.ui.view">

https://github.com/odoo/odoo/blob/76c443eda331b75bf5dfa7ec22b8eb22e1084343/addons/product/views/product_views.xml 13/16
3/6/2020 odoo/product_views.xml at 76c443eda331b75bf5dfa7ec22b8eb22e1084343 · odoo/odoo · GitHub

444 <field name="name">product.packaging.form.view</field>


445 <field name="model">product.packaging</field>
446 <field name="arch" type="xml">
447 <form string="Packaging">
448 <sheet>
449 <label for="name"/>
450 <h1>
451 <field name="name"/>
452 </h1>
453 <group>
454 <group name="qty">
455 <field name="qty"/>
456 </group>
457 </group>
458 </sheet>
459 </form>
460 </field>
461 </record>
462
463 <record id="product_supplierinfo_form_view" model="ir.ui.view">
464 <field name="name">product.supplierinfo.form.view</field>
465 <field name="model">product.supplierinfo</field>
466 <field name="arch" type="xml">
467 <form string="Vendor Information">
468 <group>
469 <group string="Vendor">
470 <field name="name" context="{'default_customer': 0, 'search_default_supplier': 1, 'default_supplier
471 <field name="product_name"/>
472 <field name="product_code"/>
473 <field name="product_id" domain="[('product_tmpl_id', '=', product_tmpl_id)]" invisible="1"/>
474 <label for="delay"/>
475 <div>
476 <field name="delay" class="oe_inline"/> days
477 </div>
478 </group>
479 <group string="Price List">

https://github.com/odoo/odoo/blob/76c443eda331b75bf5dfa7ec22b8eb22e1084343/addons/product/views/product_views.xml 14/16
3/6/2020 odoo/product_views.xml at 76c443eda331b75bf5dfa7ec22b8eb22e1084343 · odoo/odoo · GitHub

480 <field name="product_tmpl_id" string="Product" invisible="context.get('visible_product_tmpl_id', Tr


481 <label for="min_qty"/>
482 <div>
483 <field name="min_qty" class="oe_inline"/>
484 <field name="product_uom" class="oe_inline" groups="product.group_uom"/>
485 </div>
486 <label for="price"/>
487 <div>
488 <field name="price" class="oe_inline"/><field name="currency_id" class="oe_inline" groups="base
489 </div>
490 <label for="date_start" string="Validity"/>
491 <div><field name="date_start" class="oe_inline"/> to <field name="date_end" class="oe_inline"/></di
492 </group>
493 <group string="Other Information" groups="base.group_multi_company">
494 <field name="company_id" options="{'no_create': True}"/>
495 </group>
496 </group>
497 </form>
498 </field>
499 </record>
500
501 <record id="product_supplierinfo_search_view" model="ir.ui.view">
502 <field name="name">product.supplierinfo.search.view</field>
503 <field name="model">product.supplierinfo</field>
504 <field name="arch" type="xml">
505 <search string="Vendor">
506 <field name="name"/>
507 <field name="product_tmpl_id"/>
508 <filter string="Active" name="active" domain="[('date_end', '&gt;=', (context_today() - datetime.timedelta
509 <filter string="Archived" name="archived" domain="[('date_end', '&lt;', (context_today() - datetime.timede
510 <group expand="0" string="Group By">
511 <filter string="Product" name="groupby_product" domain="[]" context="{'group_by': 'product_tmpl_id'}"/>
512 <filter string="Vendor" name="groupby_vendor" domain="[]" context="{'group_by': 'name'}"/>
513 </group>
514 </search>
515 </field>

https://github.com/odoo/odoo/blob/76c443eda331b75bf5dfa7ec22b8eb22e1084343/addons/product/views/product_views.xml 15/16
3/6/2020 odoo/product_views.xml at 76c443eda331b75bf5dfa7ec22b8eb22e1084343 · odoo/odoo · GitHub

516 </record>
517
518 <record id="product_supplierinfo_tree_view" model="ir.ui.view">
519 <field name="name">product.supplierinfo.tree.view</field>
520 <field name="model">product.supplierinfo</field>
521 <field name="arch" type="xml">
522 <tree string="Vendor Information">
523 <field name="sequence" widget="handle"/>
524 <field name="name"/>
525 <field name="product_tmpl_id" string="Product" invisible="context.get('visible_product_tmpl_id', True)"/>
526 <field name="min_qty"/>
527 <field name="price" string="Price"/>
528 <field name="date_start"/>
529 <field name="date_end"/>
530 </tree>
531 </field>
532 </record>
533
534 <record id="product_supplierinfo_type_action" model="ir.actions.act_window">
535 <field name="name">Vendor Pricelists</field>
536 <field name="type">ir.actions.act_window</field>
537 <field name="res_model">product.supplierinfo</field>
538 <field name="view_type">form</field>
539 <field name="view_mode">tree,form</field>
540 <field name="context">{'visible_product_tmpl_id':False}</field>
541 </record>
542
543 </data>
544 </odoo>

https://github.com/odoo/odoo/blob/76c443eda331b75bf5dfa7ec22b8eb22e1084343/addons/product/views/product_views.xml 16/16

You might also like