mirror of
https://github.com/OCA/pms.git
synced 2025-01-29 00:17:45 +02:00
[FIX] pms: fix compute_service_line_ids error when no singleton
This commit is contained in:
@@ -332,15 +332,16 @@ class PmsService(models.Model):
|
||||
)
|
||||
# flake8:noqa=C901
|
||||
def _compute_service_line_ids(self):
|
||||
if (
|
||||
self.env.context.get("skip_compute_board_service_ids", False)
|
||||
and self.is_board_service
|
||||
) or (
|
||||
self.env.context.get("skip_compute_service_line_ids", False)
|
||||
and not self.is_board_service
|
||||
):
|
||||
return
|
||||
|
||||
for service in self:
|
||||
if (
|
||||
service.env.context.get("skip_compute_board_service_ids", False)
|
||||
and service.is_board_service
|
||||
) or (
|
||||
service.env.context.get("skip_compute_service_line_ids", False)
|
||||
and not service.is_board_service
|
||||
):
|
||||
continue
|
||||
if service.no_auto_add_lines:
|
||||
continue
|
||||
if service.product_id:
|
||||
|
||||
Reference in New Issue
Block a user