[FIX]No remove summary lines when state is manage_romaneo

Merged Gastón Bertolani requested to merge 12.0-fix-summary-lines into 12.0
Compare and
1 file
+ 10
0
Preferences
File browser
Compare changes
+ 10
0
@@ -8,6 +8,8 @@
from odoo import _, api, fields, models
from odoo.addons.rafalim_cattle_ranch.models.purchase_data import manage_romaneo_state
import logging
@@ -147,3 +149,11 @@ class PurchaseData(models.Model):
act_window["view_mode"] = "tree,form"
return act_window
@api.multi
def weight_ranking(self):
# Moved from rafalim_cattle_ranch
# No remove summary_lines
if self.state == manage_romaneo_state and self.invoice_ids:
return True
return super(PurchaseData, self).weight_ranking()