[IMP] mail: improve default channel picture
Purpose is to avoid having void image in systray when there are notifications linked to channels that have no picture. Two small improvements are done on channel model * change default picture for channel to be more inline with Odoo design guidelines; * override create to ensure there is a default image when creating the channel through the discuss interface; This commit is linked to task ID 48228.
This commit is contained in:
@@ -115,6 +115,11 @@ class Channel(models.Model):
|
||||
|
||||
@api.model
|
||||
def create(self, vals):
|
||||
# ensure image at quick create
|
||||
if not vals.get('image'):
|
||||
defaults = self.default_get(['image'])
|
||||
vals['image'] = defaults['image']
|
||||
|
||||
tools.image_resize_images(vals)
|
||||
# Create channel and alias
|
||||
channel = super(Channel, self.with_context(
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 2.4 KiB |
Reference in New Issue
Block a user