Skip to content

Commit

Permalink
[FIX] business_requirement_deliverable: Don't show prices at all
Browse files Browse the repository at this point in the history
If you don't belong to the group, you shouldn't see prices, but even if belonging,
put it on name_get will make that messages coming from the BRD discloses the price
to everyone receiving the message, so better to remove it on each case.
  • Loading branch information
pedrobaeza committed Nov 19, 2019
1 parent ed4bcac commit aae4ed5
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions business_requirement_deliverable/models/business.py
Expand Up @@ -154,21 +154,17 @@ def portal_publish_button(self):
def name_get(self):
result = []
for rec in self:
name = '#{0}: {1} ({2})'
name = '#{0}: {1}'
args = [
rec.sequence,
rec.name,
formatLang(
self.env, rec.price_total, currency_obj=rec.currency_id,
),
]
if rec.section_id:
name = '[{3}] #{0}: {1} ({2})'
name = '[{2}] #{0}: {1}'
args.append(rec.section_id.name)
result.append((rec.id, name.format(*args)))
return result


class BusinessRequirement(models.Model):
_inherit = "business.requirement"

Expand Down

0 comments on commit aae4ed5

Please sign in to comment.