How to do it...

Edit the models/library_book.py file to add the new related field:

  1. Ensure that we have a field for the book publisher:
class LibraryBook(models.Model): 
    # ... 
    publisher_id = fields.Many2one( 
        'res.partner', string='Publisher') 
  1. Now, add the related field for the publisher's city:
# class LibraryBook(models.Model): 
    # ... 
    publisher_city = fields.Char( 
        'Publisher City', 
        related='publisher_id.city',
readonly=True)

Finally, we need to upgrade the add-on module for the new fields to be available in the model.

..................Content has been hidden....................

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