Skip to content
Browse files

[FIX] sale: remove dead code

order_lines_layouted() can not work due to layout_category_id no longer existing

closes #43118

X-original-commit: de7a717
Signed-off-by: Damien Bouvy (dbo) <>
  • Loading branch information
ap-wtioit authored and dbo-odoo committed Dec 9, 2019
1 parent c63ffe9 commit 1b7d26c6fb20d7d8ac1fb6b2f81e9d1e5cbad05a
Showing with 0 additions and 21 deletions.
  1. +0 −21 addons/sale/models/
@@ -828,27 +828,6 @@ def _amount_by_group(self):
) for l in res]

def order_lines_layouted(self):
Returns this order lines classified by sale_layout_category and separated in
pages according to the category pagebreaks. Used to render the report.
report_pages = [[]]
for category, lines in groupby(self.order_line, lambda l: l.layout_category_id):
# If last added category induced a pagebreak, this one will be on a new page
if report_pages[-1] and report_pages[-1][-1]['pagebreak']:
# Append category to current report page
'name': category and or _('Uncategorized'),
'subtotal': category and category.subtotal,
'pagebreak': category and category.pagebreak,
'lines': list(lines)

return report_pages

def has_to_be_signed(self, include_draft=False):
return (self.state == 'sent' or (self.state == 'draft' and include_draft)) and not self.is_expired and self.require_signature and not self.signature

0 comments on commit 1b7d26c

Please sign in to comment.
You can’t perform that action at this time.