<record id="view_sale_order_last_month" model="ir.rule">
<field name="name">View last one month order</field>
<field name="model_id" ref="sale.model_sale_order"/>
<field name="domain_force">[(‘create_date','>=',(context_today()-relativedelta(months=1)).strftime('%%Y-%%m-01')),(‘create_date','<',time.strftime('%%Y-%%m-01'))]</field>
<field eval="1" name="perm_read"></field>
<field eval="0" name="perm_write"></field>
<field eval="0" name="perm_unlink"></field>
<field eval="0" name="perm_create"></field>
</record>
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Accounting
- Inventory
- PoS
- Project management
- MRP
This question has been flagged
3262
Views
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign upRelated Posts | Replies | Views | Activity | |
---|---|---|---|---|
|
6
May 24
|
45697 | ||
|
0
Jul 23
|
207 | ||
|
1
Feb 23
|
697 | ||
|
0
Feb 23
|
724 | ||
|
1
Apr 22
|
2090 |
Why would you want to do that using a Record Rule? Why not try Filters: https://www.odoo.com/forum/help-1/question/115765/#answer-115766