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 | etc.
I want to create a custom filter for a relational field as below.
In account.voucher model I need to filter queries based on customer tag and salesperson (category_id and user_id in res.partner), how can I achieve this task in debug view.
Same situation in sale order tree view. Filter sale orders based on customer tag (category_id in res.partner).
Customer A ~ F have a tag ('category_id' field in partner model) 'Urban Customer'.
Customer G ~ Z have a tag ('category_id' field in partner model) 'Rural Customer'.
Now I want to search payments recieved from 'Urban customer' only in "customer Payment" ("account_voucher" model), same as for 'rural customer'.
Below is an image for customer category.
Hope you got my point.
Customer filter is already there inside the filters.
Do you want to set default filter as customer when you see any vouchers like customer payment ?
So by applying default filter you have to override the Action of Customer Payment to Set Default filter as Customer. so your vouchers will be filtered/ grouped by customers.
Same thing you can apply for Supplier Payment.
These stuff you will find inside account_voucher module.
Here is the syntax to apply default filter this this line inside the existing actions or by overrding action in your module.
If i goes in wrong way than please give more description about your question.
Hope this might help.
About This Community
This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.Register
Odoo Training Center
Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.Test it now
|Asked: 9/1/15, 4:46 AM|
|Seen: 982 times|
|Last updated: 9/1/15, 11:50 AM|