Skip to content

Commit 0697549

Browse files
braisabDarioLodeiros
authored andcommitted
[FIX] pms_api_rest: remove duplicated check access for new section lines in invoice commands
1 parent e27baaf commit 0697549

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

pms_api_rest/services/pms_invoice_service.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -637,7 +637,6 @@ def _get_invoice_lines_commands(self, invoice, pms_invoice_info):
637637
)
638638
.mapped("section_id.id")
639639
)
640-
pms_api_check_access(user=self.env.user, records=new_section_ids)
641640
if new_section_ids:
642641
lines_to_invoice.update(
643642
{section_id: 0 for section_id in new_section_ids}
@@ -650,7 +649,7 @@ def _get_invoice_lines_commands(self, invoice, pms_invoice_info):
650649
)
651650
][0]
652651
# Update name of new invoice lines
653-
for item in filter(lambda l: not l[2]["display_type"], new_invoice_lines):
652+
for item in filter(lambda l: not l[2].get("display_type"), new_invoice_lines):
654653
item[2]["name"] = [
655654
line.name
656655
for line in newInvoiceLinesInfo

0 commit comments

Comments
 (0)