Skip to content

Commit

Permalink
[IMP]subscription_oca: enable additional filters for sale.subscription
Browse files Browse the repository at this point in the history
  • Loading branch information
PicchiSeba committed Jan 10, 2024
1 parent c0cc3f8 commit a46b767
Showing 1 changed file with 54 additions and 0 deletions.
54 changes: 54 additions & 0 deletions subscription_oca/views/sale_subscription_views.xml
Original file line number Diff line number Diff line change
Expand Up @@ -370,12 +370,66 @@
<field name="model">sale.subscription</field>
<field name="arch" type="xml">
<search>
<field
name="name"
filter_domain="['|', ('name','ilike',self), ('code','ilike',self)]"
/>
<field name="to_renew" />
<field name="description" />
<filter
string="Pending subscriptions"
name="pendingsubs"
domain="[('to_renew','=', True)]"
/>
<field name="journal_id" />
<field name="pricelist_id" />
<separator />
<separator />
<filter
name="not_finished"
string="In progress"
domain="[
'|',
('date', '&gt;=', context_today().strftime('%Y-%m-%d')),
'&amp;',
('date', '=', False),
('recurring_next_date', '!=', False)
]"
/>
<filter
name="finished"
string="Finished"
domain="[
('date', '&lt;', context_today().strftime('%Y-%m-%d')),
('recurring_next_date', '=', False)
]"
/>
<field name="partner_id" />
<filter
string="Archived"
domain="[('active', '=', False)]"
name="inactive"
/>
<group expand="0" string="Group By...">
<filter
name="group_by_partner"
string="Associated Partner"
domain="[]"
context="{'group_by': 'partner_id'}"
/>
<filter
name="group_by_next_invoice"
string="Next Invoice"
domain="[('recurring_next_date', '!=', False)]"
context="{'group_by':'recurring_next_date'}"
/>
<filter
name="group_by_date"
string="Date"
domain="[]"
context="{'group_by':'date'}"
/>
</group>
</search>
</field>
</record>
Expand Down

0 comments on commit a46b767

Please sign in to comment.