summaryrefslogtreecommitdiff
path: root/addons/pos_restaurant
diff options
context:
space:
mode:
authorXavier Morel <xmo@odoo.com>2018-12-06 10:46:57 +0000
committerXavier Morel <xmo@odoo.com>2018-12-07 13:37:34 +0000
commit66f0e26f6f3f2155fcfcc55e84f2e76cbfdb2c1d (patch)
tree7dbd4cbc827e8455eb4d8bd4013003b8069fc448 /addons/pos_restaurant
parent299f9f1eb06f9df950df1dc02e368caa9b3a9871 (diff)
[CHG] *: make binary fields default to attachment=True
Check that it makes custom binary fields into attachment as that's the main reason for the change: when users create binary fields via Studio, they're necessarily db-stored (as the interface doesn't allow altering the attachment attribute and it's unclear how we'd handle users switching it on/off every time), which significantly bloats their database (and burns storage & backup space), especially as the primary use case for binary fields is adding images and documents to records. * check that binary fields are properly created as attachment=True * add attachment=False on fields where that seems relevant (most but not all of the fields previously using the default) * remove occurrences of attachment=True closes odoo/odoo#29308
Diffstat (limited to 'addons/pos_restaurant')
-rw-r--r--addons/pos_restaurant/models/pos_restaurant.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/pos_restaurant/models/pos_restaurant.py b/addons/pos_restaurant/models/pos_restaurant.py
index 7530b774c6b..ea5c3a04d5b 100644
--- a/addons/pos_restaurant/models/pos_restaurant.py
+++ b/addons/pos_restaurant/models/pos_restaurant.py
@@ -11,7 +11,7 @@ class RestaurantFloor(models.Model):
name = fields.Char('Floor Name', required=True, help='An internal identification of the restaurant floor')
pos_config_id = fields.Many2one('pos.config', string='Point of Sale')
- background_image = fields.Binary('Background Image', attachment=True, help='A background image used to display a floor layout in the point of sale interface')
+ background_image = fields.Binary('Background Image', help='A background image used to display a floor layout in the point of sale interface')
background_color = fields.Char('Background Color', help='The background color of the floor layout, (must be specified in a html-compatible format)', default='rgb(210, 210, 210)')
table_ids = fields.One2many('restaurant.table', 'floor_id', string='Tables', help='The list of tables in this floor')
sequence = fields.Integer('Sequence', help='Used to sort Floors', default=1)