Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
2 Odpowiedzi
6668 Widoki

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

Awatar
Odrzuć

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

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

Najlepsza odpowiedź

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

   

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
3
kwi 25
4668
5
lis 23
42973
3
wrz 23
9467
1
wrz 22
3734
1
cze 22
12559