In order to provide warehouse access to my portal users, I created a view of the product.product model:
<?xml version="1.0"?>
<tree colors="red:virtual_available<0;blue:virtual_available>=0 and state in ('draft', 'end', 'obsolete');black:virtual_available>=0 and state not in ('draft', 'end', 'obsolete')" string="Products">
<field name="default_code"/>
<field name="name"/>
<field name="categ_id" invisible="1"/>
<field name="type" invisible="1"/>
<field name="variants" groups="product.group_product_variant"/>
<field name="uom_id" string="Unit of Measure" groups="product.group_uom"/>
<field name="qty_available"/>
<field name="virtual_available"/>
<field name="lst_price"/>
<field name="price" invisible="not context.get('pricelist',False)"/>
<field name="standard_price" invisible="1"/>
<field name="state"/>
<field name="company_id" groups="base.group_multi_company" invisible="1"/>
</tree>
I then gave my portal users access to the required models. They can see all the approriate products. I now want to filter that view to remove products where qty_available is less that 1. I have put the following in the domain value for the filter on the window action:
[('qty_available','>=',1)]
I have the filter check box selected.
Why is there no filtering taking place on the model? Alternatively, can I not filter by a calculated field like qty_available?
Edited this post Eric, as I don't have Karma to comment on your Answer yet. I tried adding that line to my view, but only received an error.
Specifically, I am getting an invalid xml error. The syntax on my xml views is a single tag, (sans your closing tag), so I am thinking maybe we are dealing with different versions of Odoo. I am on version 7.