可以以stock.picking 的搜索为例:

使用related 即可实现搜索功能,在search 视图添加该字段不会出错。

    # Used to search on pickings
    product_id = fields.Many2one('product.product', 'Product', related='move_lines.product_id', readonly=True)

相关文章:

  • 2022-12-23
  • 2021-07-23
  • 2021-08-10
  • 2022-12-23
  • 2021-12-05
  • 2021-10-01
  • 2021-11-12
  • 2022-01-17
猜你喜欢
  • 2021-11-25
  • 2022-12-23
  • 2021-12-17
  • 2021-05-12
  • 2021-11-23
  • 2021-07-30
相关资源
相似解决方案