Files
odoo_source/odoo/cli/templates/default/views/views.xml.template
T
Denis Ledoux a1fc9c0427 [FIX] scaffold: clean the templates:
- Add blank lines at end of python files (pep8)
 - Easier uncomment (entire blocks, and no remaining whitespaces in empty lines)
 - Add `_description` to model to avoid the warning telling it's missing
 - Correct compute field, `self.value` raised an `ensure_one` issue
 - Change access so the user can add/edit/delete records in the web interface
   by default
 - Correct the server action, `self` is not in the server action context.

closes odoo/odoo#40659

X-original-commit: 622615771d0a6f8544f6810f30df46aea0e0fb9c
Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
2019-11-21 18:21:40 +00:00

63 lines
1.8 KiB
Plaintext

{%- set mod = name|snake -%}
{%- set model = "%s.%s"|format(mod, mod) -%}
<odoo>
<data>
<!-- explicit list view definition -->
<!--
<record model="ir.ui.view" id="{{mod}}.list">
<field name="name">{{name}} list</field>
<field name="model">{{model}}</field>
<field name="arch" type="xml">
<tree>
<field name="name"/>
<field name="value"/>
<field name="value2"/>
</tree>
</field>
</record>
-->
<!-- actions opening views on models -->
<!--
<record model="ir.actions.act_window" id="{{mod}}.action_window">
<field name="name">{{name}} window</field>
<field name="res_model">{{model}}</field>
<field name="view_mode">tree,form</field>
</record>
-->
<!-- server action to the one above -->
<!--
<record model="ir.actions.server" id="{{mod}}.action_server">
<field name="name">{{name}} server</field>
<field name="model_id" ref="model_{{mod}}_{{mod}}"/>
<field name="state">code</field>
<field name="code">
action = {
"type": "ir.actions.act_window",
"view_mode": "tree,form",
"res_model": model._name,
}
</field>
</record>
-->
<!-- Top menu item -->
<!--
<menuitem name="{{name}}" id="{{mod}}.menu_root"/>
-->
<!-- menu categories -->
<!--
<menuitem name="Menu 1" id="{{mod}}.menu_1" parent="{{mod}}.menu_root"/>
<menuitem name="Menu 2" id="{{mod}}.menu_2" parent="{{mod}}.menu_root"/>
-->
<!-- actions -->
<!--
<menuitem name="List" id="{{mod}}.menu_1_list" parent="{{mod}}.menu_1"
action="{{mod}}.action_window"/>
<menuitem name="Server to list" id="{{mod}}" parent="{{mod}}.menu_2"
action="{{mod}}.action_server"/>
-->
</data>
</odoo>