-1

enter image description here

In this Case , How can I remove all the rows not containing "Achat" values . and thanks.

Just this tree view is in the form view

2 Answers2

0

Easiest way is create filter. You can create filter and save it as a favorite for all.

If you want to make sure that those lines never are shown, you need to modify view and add domain which prevents those lines to be shown. This can be done in UI but your changes are overwritten when you update (or re-install) module which originally created the view. So permanent solution is to write a module which overwrites that tree view.

ex4
  • 2,289
  • 1
  • 14
  • 21
0

In your custom modul's tree view add the line into the action's definiton like below:

 <record id="action_id" model="ir.actions.act_window">
      <field name="name"> Action name </field>
      <field name="res_model">custom_model.model</field>
      <field name="view_mode">kanban,tree,form,graph</field>
      <field name="help" type="html">
      <field name="context" > {'group_by': 'field_of_achat', 'field_of_achat','=',True}</field>
</record>
Sadiki Ayoub
  • 101
  • 1
  • 10