How to do it...

To get a recordset for library.members in a method of library.book, you need to take the following steps:

  1. In the LibraryBook class, write a method called get_all_library_members:
class LibraryBook(models.Model): 
    # ... 
    @api.model 
    def get_all_library_members(self): 
        # ... 
  1. In the body of the method, use the following code:
    library_member_model = self.env['library.member'] 
    return library_member_model.search([]) 
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.188.216.249