[MIG] web_m2x_options: Migration to 11.0

web_m2x_options: Fix usage for non-admins

web_m2x_options: Reduce rpc calls

web_m2x_options: Update manifest and readme
This commit is contained in:
ernesto
2018-05-28 00:19:27 -04:00
committed by Germana
parent 615384ffc8
commit 6feba96729
12 changed files with 461 additions and 385 deletions

View File

@@ -0,0 +1,12 @@
from odoo import api, models
class IrConfigParameter(models.Model):
_inherit = 'ir.config_parameter'
@api.model
def get_web_m2x_options(self):
opts = ['web_m2x_options.create', 'web_m2x_options.create_edit',
'web_m2x_options.limit', 'web_m2x_options.search_more',
'web_m2x_options.m2o_dialog']
return self.sudo().search_read([['key', 'in', opts]], ["key", "value"])