Sign in
Try it free
  • Apps
    Websites
    Build great user experience
    • Website Builder
    • eCommerce
    • Blogs
    • Forums
    • Slides
    • Live Chat
    Sales
    Boost your success rate
    • Sales
    • CRM
    • Invoicing
    • Point of Sale
      • Shops
      • Restaurants
      • Hardware
    • Subscriptions
    • Sign
    Operations
    It's all about efficiency
    • Accounting
    • Project
    • Human Resources
      • Recruitment
      • Employees
      • Expenses
      • Appraisal
      • Fleet
      • Leaves
    • Inventory
    • Purchase
    • Manufacturing
      • MRP
      • PLM
      • Maintenance
      • Quality
    • Helpdesk
    Productivity Tools
    Great Tools = Happy People
    • Communication
      • Discuss
      • Mailing Lists
      • Notes
    • Timesheet
    • Email Marketing
    • Events
    • Survey
    • Appointments
    • Marketing Automation
    Third party apps | Odoo Studio | Odoo Cloud Platform NEW
  • Tour
  • Pricing
  • Community
  • Docs

Odoo Help


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.

Take the tour
Help
  • Trending
  • Newest
  • People
  • Tags
  • Badges
Ask a Question
0

How to filter a related field?

domain fields related 7.0
By
Carlos Llamacho
on 6/25/13, 4:47 PM • 4,331 views

Hi,

I have a 3 way relation that i show in my form using a fields.related object.

'event_training_id':fields.related('events_ids_registration', 'event_id', 'registration_ids', relation='event.event',  type='one2many', string='Event'

This show me the events in wich the hr.employee is registered, but as the hr.employee can be registered in a bunch of objects, i want to show only those that have a boolean field called is_training marked as True.

My doubt is if this is possible, as the field is_training is within the object event.event, and my related field in hr.employee. I tried with a domain="[('is_training','=',True)]" but to no luck.

Does anyone know if this is achievable? Thanks in advance.

  • Flag
  • Reply
  • Comment
  • Share
0

Francesco OpenCode

--Francesco OpenCode--

3709
| 6 8 9
Grottaglie, Italy
--Francesco OpenCode--

Italian Odoo (OpenERP) Modules Developer LINKEDIN: http://www.linkedin.com/in/francescoapruzzese

Francesco OpenCode
On 6/26/13, 6:20 AM

The related field are filtrable only if storeparameter is True. Related are, basically, function field and if them aren't stored, OpenERP can't search (and filter) them.

  • Flag

I tried adding the store=True to the related field, but then it gives me the error "ProgrammingError: column hr_employee.event_training_id does not exist" and if i remove the store=True it shows me field without issue. Isn't this the exact opposite behaviour of the store attribute?

Carlos Llamacho
on 6/26/13, 11:33 AM
  • Comment

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

Question tools

Thanks for your subscription!
0 follower(s)

Stats

Asked: 6/25/13, 4:47 PM
Seen: 4331 times
Last updated: 3/16/15, 8:10 AM
Community
  • Github
  • Download
  • Runbot
  • Translations
  • Mailing Lists
  • Forum
Services
  • Odoo Cloud Platform
  • Support
  • Upgrade
  • Find a partner
  • Become a partner
  • Training center
  • Education
  • Security
About us
  • Our company
  • Contact
  • Events
  • Blog
  • Customers
  • Jobs
  • Legal | Privacy
  • English
    • 简体中文
    • Nederlands
    • Français
    • Deutsch
    • Italiano
    • Português (BR)
    • Español

Odoo is a suite of open source business apps that cover all your company needs: CRM, eCommerce, accounting, inventory, point of sale, project management, etc.

Odoo's unique value proposition is to be at the same time very easy to use and fully integrated.

Website made with

Live Webinar on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Watch now