Skip to Content
Menu
This question has been flagged
2 Replies
5814 Views

Good evening,

Can someone tell me if there is problem with this tree view?

  <record id="stock_picking_package_preparation_tree" model="ir.ui.view">
    <field name="name">stock.picking.package.preparation.tree</field>
    <field name="model">stock.picking.package.preparation</field>
    <field name="arch" type="xml">
      <tree colors="grey:state == 'cancel';" string="Package Preparations">
        <field name="name"/>
        <field name="partner_id"/>
        <field name="date"/>
        <field name="date_done"/>
        <field name="package_id"/>
        <field name="state"/>
      </tree>
    </field>
  </record>
When I try to install the app I receive this error:

File "/mnt/c/Users/Public/odoo-dev13/odoo/odoo/addons/base/models/ir_ui_view.py", line 404, in _check_xml
    raise ValidationError(_('Invalid view %s definition in %s') % (view_name, view.arch_fs))
odoo.tools.convert.ParseError: "Invalid view stock.picking.package.preparation.tree definition in stock_picking_package_preparation/views/stock_picking_package_preparation_view.xml
None" while parsing /home/gallex_admin/odoo-dev13/custom-addons/stock_picking_package_preparation/views/stock_picking_package_preparation_view.xml:2, near
Why Is invalid?

have a ice day

Avatar
Discard

remove this colors="grey:state == 'cancel';" and try

How to create Form and Tree view in Odoo: https://goo.gl/pZpTVu

Best Answer

Hi Michele Esposito,
try this,
<tree string="Opportunities" decoration-muted="state == 'cancel'" >
<field name="name" string="Opportunity"/>
<field name="email_from" optional="hide"/>
<field name="phone" optional="hide"/>
<field name="city" optional="hide"/>
<field name="state" invisible="1"/>
</tree>


Regards,




Email:   odoo@aktivsoftware.com

Skype: kalpeshmaheshwari

   

Avatar
Discard
Related Posts Replies Views Activity
0
Oct 24
3
5
Nov 23
40251
3
Sep 23
7672
2
Jan 24
2330
1
Sep 22
2146