bugged stringlengths 4 228k | fixed stringlengths 0 96.3M | __index_level_0__ int64 0 481k |
|---|---|---|
def mass_mail_send(self, cr, uid, ids, context): """ Send Email | def mass_mail_send(self, cr, uid, ids, context): """ Send Email | 468,100 |
def price_get_multi(self, cr, uid, pricelist_ids, products_by_qty_by_partner, context=None): """multi products 'price_get'. @param pricelist_ids: @param products_by_qty: @param partner: @param context: { 'date': Date of the pricelist (%Y-%m-%d),} @return: a dict of dict with product_id as key and a dict 'price by price... | def price_get_multi(self, cr, uid, pricelist_ids, products_by_qty_by_partner, context=None): """multi products 'price_get'. @param pricelist_ids: @param products_by_qty: @param partner: @param context: { 'date': Date of the pricelist (%Y-%m-%d),} @return: a dict of dict with product_id as key and a dict 'price by price... | 468,101 |
def _create_parent_category_list(id, lst): if not id: return [] parent = product_category_tree.get(id) if parent: lst.append(parent) return _create_parent_category_list(parent, lst) else: return lst | def _create_parent_category_list(id, lst): if not id: return [] parent = product_category_tree.get(id) if parent: lst.append(parent) return _create_parent_category_list(parent, lst) else: return lst | 468,102 |
def price_get_old(self, cr, uid, ids, prod_id, qty, partner=None, context=None): ''' context = { 'uom': Unit of Measure (int), 'partner': Partner ID (int), 'date': Date of the pricelist (%Y-%m-%d), } ''' price = False item_id = 0 context = context or {} currency_obj = self.pool.get('res.currency') product_obj = self.po... | def price_get_old(self, cr, uid, ids, prod_id, qty, partner=None, context=None): ''' context = { 'uom': Unit of Measure (int), 'partner': Partner ID (int), 'date': Date of the pricelist (%Y-%m-%d), } ''' price = False item_id = 0 context = context or {} currency_obj = self.pool.get('res.currency') product_obj = self.po... | 468,103 |
def price_get_old(self, cr, uid, ids, prod_id, qty, partner=None, context=None): ''' context = { 'uom': Unit of Measure (int), 'partner': Partner ID (int), 'date': Date of the pricelist (%Y-%m-%d), } ''' price = False item_id = 0 context = context or {} currency_obj = self.pool.get('res.currency') product_obj = self.po... | def price_get_old(self, cr, uid, ids, prod_id, qty, partner=None, context=None): ''' context = { 'uom': Unit of Measure (int), 'partner': Partner ID (int), 'date': Date of the pricelist (%Y-%m-%d), } ''' price = False item_id = 0 context = context or {} currency_obj = self.pool.get('res.currency') product_obj = self.po... | 468,104 |
def price_get_old(self, cr, uid, ids, prod_id, qty, partner=None, context=None): ''' context = { 'uom': Unit of Measure (int), 'partner': Partner ID (int), 'date': Date of the pricelist (%Y-%m-%d), } ''' price = False item_id = 0 context = context or {} currency_obj = self.pool.get('res.currency') product_obj = self.po... | def price_get_old(self, cr, uid, ids, prod_id, qty, partner=None, context=None): ''' context = { 'uom': Unit of Measure (int), 'partner': Partner ID (int), 'date': Date of the pricelist (%Y-%m-%d), } ''' price = False item_id = 0 context = context or {} currency_obj = self.pool.get('res.currency') product_obj = self.po... | 468,105 |
def price_get_old(self, cr, uid, ids, prod_id, qty, partner=None, context=None): ''' context = { 'uom': Unit of Measure (int), 'partner': Partner ID (int), 'date': Date of the pricelist (%Y-%m-%d), } ''' price = False item_id = 0 context = context or {} currency_obj = self.pool.get('res.currency') product_obj = self.po... | def price_get_old(self, cr, uid, ids, prod_id, qty, partner=None, context=None): ''' context = { 'uom': Unit of Measure (int), 'partner': Partner ID (int), 'date': Date of the pricelist (%Y-%m-%d), } ''' price = False item_id = 0 context = context or {} currency_obj = self.pool.get('res.currency') product_obj = self.po... | 468,106 |
def price_get_old(self, cr, uid, ids, prod_id, qty, partner=None, context=None): ''' context = { 'uom': Unit of Measure (int), 'partner': Partner ID (int), 'date': Date of the pricelist (%Y-%m-%d), } ''' price = False item_id = 0 context = context or {} currency_obj = self.pool.get('res.currency') product_obj = self.po... | def price_get_old(self, cr, uid, ids, prod_id, qty, partner=None, context=None): ''' context = { 'uom': Unit of Measure (int), 'partner': Partner ID (int), 'date': Date of the pricelist (%Y-%m-%d), } ''' price = False item_id = 0 context = context or {} currency_obj = self.pool.get('res.currency') product_obj = self.po... | 468,107 |
def clear(self, dbname, *args, **kwargs): """clear the cache for database dbname if *args and **kwargs are both empty, clear all the keys related to this database """ if not args and not kwargs: keys_to_del = [key for key in self.cache if key[0][1] == dbname] else: kwargs2 = self._unify_args(*args, **kwargs) keys_to_de... | def clear(self, dbname, *args, **kwargs): """clear the cache for database dbname if *args and **kwargs are both empty, clear all the keys related to this database """ if not args and not kwargs: keys_to_del = [key for key in self.cache.keys() if key[0][1] == dbname] else: kwargs2 = self._unify_args(*args, **kwargs) key... | 468,108 |
def clear(self, dbname, *args, **kwargs): """clear the cache for database dbname if *args and **kwargs are both empty, clear all the keys related to this database """ if not args and not kwargs: keys_to_del = [key for key in self.cache if key[0][1] == dbname] else: kwargs2 = self._unify_args(*args, **kwargs) keys_to_de... | def clear(self, dbname, *args, **kwargs): """clear the cache for database dbname if *args and **kwargs are both empty, clear all the keys related to this database """ if not args and not kwargs: keys_to_del = [key for key in self.cache if key[0][1] == dbname] else: kwargs2 = self._unify_args(*args, **kwargs) keys_to_de... | 468,109 |
def clear(self, dbname, *args, **kwargs): """clear the cache for database dbname if *args and **kwargs are both empty, clear all the keys related to this database """ if not args and not kwargs: keys_to_del = [key for key in self.cache if key[0][1] == dbname] else: kwargs2 = self._unify_args(*args, **kwargs) keys_to_de... | def clear(self, dbname, *args, **kwargs): """clear the cache for database dbname if *args and **kwargs are both empty, clear all the keys related to this database """ if not args and not kwargs: keys_to_del = [key for key in self.cache if key[0][1] == dbname] else: kwargs2 = self._unify_args(*args, **kwargs) keys_to_de... | 468,110 |
def cached_result(self2, cr, *args, **kwargs): if time.time()-int(self.timeout) > self.lasttime: self.lasttime = time.time() t = time.time()-int(self.timeout) old_keys = [key for key in self.cache if self.cache[key][1] < t] for key in old_keys: del self.cache[key] | def cached_result(self2, cr, *args, **kwargs): if time.time()-int(self.timeout) > self.lasttime: self.lasttime = time.time() t = time.time()-int(self.timeout) old_keys = [key for key in self.cache.keys() if self.cache[key][1] < t] for key in old_keys: del self.cache[key] | 468,111 |
def cached_result(self2, cr, *args, **kwargs): if time.time()-int(self.timeout) > self.lasttime: self.lasttime = time.time() t = time.time()-int(self.timeout) old_keys = [key for key in self.cache if self.cache[key][1] < t] for key in old_keys: del self.cache[key] | def cached_result(self2, cr, *args, **kwargs): if time.time()-int(self.timeout) > self.lasttime: self.lasttime = time.time() t = time.time()-int(self.timeout) old_keys = [key for key in self.cache if self.cache[key][1] < t] for key in old_keys: del self.cache[key] | 468,112 |
def _auto_init(self, cr, context={}): super(ir_filters, self)._auto_init(cr, context) # Use unique index to implement unique constraint on the lowercase name (not possible using a constraint) cr.execute("SELECT indexname FROM pg_indexes WHERE indexname = 'ir_filters_name_model_uid_unique_index'") if not cr.fetchone(): ... | def _auto_init(self, cr, context={}): super(ir_filters, self)._auto_init(cr, context) # Use unique index to implement unique constraint on the lowercase name (not possible using a constraint) cr.execute("SELECT indexname FROM pg_indexes WHERE indexname = 'ir_filters_name_model_uid_unique_index'") if not cr.fetchone(): ... | 468,113 |
def _default_get(self, cr, uid, fields, context={}): if not context.get('journal_id', False) and context.get('search_default_journal_id', False): context['journal_id'] = context.get('search_default_journal_id') account_obj = self.pool.get('account.account') period_obj = self.pool.get('account.period') journal_obj = sel... | def _default_get(self, cr, uid, fields, context={}): if not context.get('journal_id', False) and context.get('search_default_journal_id', False): context['journal_id'] = context.get('search_default_journal_id') account_obj = self.pool.get('account.account') period_obj = self.pool.get('account.period') journal_obj = sel... | 468,114 |
def init(self, cr): tools.sql.drop_view_if_exists(cr, 'report_project_task_user') cr.execute(""" create or replace view report_project_task_user as ( select min(t.id) as id, to_char(date_close, 'YYYY') as name, to_char(date_close, 'MM') as month, count(distinct t.id) as task_closed, t.user_id, t.project_id, sum(planned... | def init(self, cr): tools.sql.drop_view_if_exists(cr, 'report_project_task_user') cr.execute(""" create or replace view report_project_task_user as ( select min(t.id) as id, to_char(date_end, 'YYYY') as name, to_char(date_end, 'MM') as month, count(distinct t.id) as task_closed, t.user_id, t.project_id, sum(planned_hou... | 468,115 |
def init(self, cr): tools.sql.drop_view_if_exists(cr, 'report_project_task_user') cr.execute(""" create or replace view report_project_task_user as ( select min(t.id) as id, to_char(date_close, 'YYYY') as name, to_char(date_close, 'MM') as month, count(distinct t.id) as task_closed, t.user_id, t.project_id, sum(planned... | def init(self, cr): tools.sql.drop_view_if_exists(cr, 'report_project_task_user') cr.execute(""" create or replace view report_project_task_user as ( select min(t.id) as id, to_char(date_close, 'YYYY') as name, to_char(date_close, 'MM') as month, count(distinct t.id) as task_closed, t.user_id, t.project_id, sum(planned... | 468,116 |
def init(self, cr): tools.sql.drop_view_if_exists(cr, 'report_project_task_user') cr.execute(""" create or replace view report_project_task_user as ( select min(t.id) as id, to_char(date_close, 'YYYY') as name, to_char(date_close, 'MM') as month, count(distinct t.id) as task_closed, t.user_id, t.project_id, sum(planned... | def init(self, cr): tools.sql.drop_view_if_exists(cr, 'report_project_task_user') cr.execute(""" create or replace view report_project_task_user as ( select min(t.id) as id, to_char(date_close, 'YYYY') as name, to_char(date_close, 'MM') as month, count(distinct t.id) as task_closed, t.user_id, t.project_id, sum(planned... | 468,117 |
def init(self, cr): tools.sql.drop_view_if_exists(cr, 'report_project_task') cr.execute(""" create or replace view report_project_task as ( select min(t.id) as id, to_char(date_close, 'YYYY') as name, to_char(date_close, 'MM') as month, count(distinct t.id) as task_closed, t.project_id, sum(planned_hours) as hours_plan... | def init(self, cr): tools.sql.drop_view_if_exists(cr, 'report_project_task') cr.execute(""" create or replace view report_project_task as ( select min(t.id) as id, to_char(date_end, 'YYYY') as name, to_char(date_end, 'MM') as month, count(distinct t.id) as task_closed, t.project_id, sum(planned_hours) as hours_planned,... | 468,118 |
def init(self, cr): tools.sql.drop_view_if_exists(cr, 'report_project_task') cr.execute(""" create or replace view report_project_task as ( select min(t.id) as id, to_char(date_close, 'YYYY') as name, to_char(date_close, 'MM') as month, count(distinct t.id) as task_closed, t.project_id, sum(planned_hours) as hours_plan... | def init(self, cr): tools.sql.drop_view_if_exists(cr, 'report_project_task') cr.execute(""" create or replace view report_project_task as ( select min(t.id) as id, to_char(date_close, 'YYYY') as name, to_char(date_close, 'MM') as month, count(distinct t.id) as task_closed, t.project_id, sum(planned_hours) as hours_plan... | 468,119 |
def init(self, cr): tools.sql.drop_view_if_exists(cr, 'report_project_task') cr.execute(""" create or replace view report_project_task as ( select min(t.id) as id, to_char(date_close, 'YYYY') as name, to_char(date_close, 'MM') as month, count(distinct t.id) as task_closed, t.project_id, sum(planned_hours) as hours_plan... | def init(self, cr): tools.sql.drop_view_if_exists(cr, 'report_project_task') cr.execute(""" create or replace view report_project_task as ( select min(t.id) as id, to_char(date_close, 'YYYY') as name, to_char(date_close, 'MM') as month, count(distinct t.id) as task_closed, t.project_id, sum(planned_hours) as hours_plan... | 468,120 |
def _result_get(x, keys): if x[1] in keys: return False keys.append(x[1]) if x[3]: model,id = x[2].split(',') # FIXME: It might be a good idea to opt-in that kind of stuff # FIXME: instead of arbitrarily removing random fields fields = [ field for field in self.pool.get(model).fields_get_keys(cr, uid) if field not in E... | def _result_get(x, keys): if x[1] in keys: return False keys.append(x[1]) if x[3]: model,id = x[2].split(',') # FIXME: It might be a good idea to opt-in that kind of stuff # FIXME: instead of arbitrarily removing random fields fields = [ field for field in self.pool.get(model).fields_get_keys(cr, uid) if field not in E... | 468,121 |
def action_compute(self, cr, uid, ids, properties=[]): """ Computes bills of material of a product. @param properties: List containing dictionaries of properties. @return: No. of products. """ results = [] bom_obj = self.pool.get('mrp.bom') prod_line_obj = self.pool.get('mrp.production.product.line') workcenter_line_ob... | def action_compute(self, cr, uid, ids, properties=[]): """ Computes bills of material of a product. @param properties: List containing dictionaries of properties. @return: No. of products. """ results = [] bom_obj = self.pool.get('mrp.bom') prod_line_obj = self.pool.get('mrp.production.product.line') workcenter_line_ob... | 468,122 |
def action_production_end(self, cr, uid, ids): | defself.pool.get('stock.move').action_done(cr, uid, new_moves) action_production_end(self,self.pool.get('stock.move').action_done(cr, uid, new_moves) cr,self.pool.get('stock.move').action_done(cr, uid, new_moves) uid,self.pool.get('stock.move').action_done(cr, uid, new_moves) ids): | 468,123 |
def action_production_end(self, cr, uid, ids): | def action_production_end(self, cr, uid, ids): | 468,124 |
def dispatch(self, service_name, method, params): try: logger = logging.getLogger('result') self.log('service', service_name) self.log('method', method) self.log('params', params, depth=(logger.isEnabledFor(logging.DEBUG_RPC_ANSWER) and 3 or 1)) auth = getattr(self, 'auth_provider', None) result = ExportService.getServ... | def dispatch(self, service_name, method, params): try: logger = logging.getLogger('result') self.log('service', service_name) self.log('method', method) self.log('params', replace_request_password(params), depth=(logger.isEnabledFor(logging.DEBUG_RPC_ANSWER) and 3 or 1)) auth = getattr(self, 'auth_provider', None) resu... | 468,125 |
def copy(self, cr, uid, id, default=None, context={}): if default is None: default = {} default = default.copy() if not default.get('name',False): default['name'] = self.pool.get('ir.sequence').get(cr, uid, 'stock.picking') return super(stock_picking, self).copy(cr, uid, id, default, context) | def copy(self, cr, uid, id, default=None, context={}): if default is None: default = {} default = default.copy() picking_obj = self.browse(cr, uid, [id], context)[0] if ('name' not in default) or (picking_obj.get('name')=='/'): seq_obj_name = 'stock.picking.' + picking_obj.type default['name'] = self.pool.get('ir.sequ... | 468,126 |
def _child_get(node, self=None, tagname=None): for n in node: if self and self.localcontext and n.get('rml_loop'): oldctx = dict(self.localcontext) for ctx in eval(n.get('rml_loop'),{}, self.localcontext): self.localcontext.update(ctx) if (tagname is None) or (n.tag==tagname): if n.get('rml_except', False): try: eval(... | def _child_get(node, self=None, tagname=None): for n in node: if self and self.localcontext and n.get('rml_loop'): for ctx in eval(n.get('rml_loop'),{}, self.localcontext): self.localcontext.update(ctx) if (tagname is None) or (n.tag==tagname): if n.get('rml_except', False): try: eval(n.get('rml_except'), {}, self.loc... | 468,127 |
def _child_get(node, self=None, tagname=None): for n in node: if self and self.localcontext and n.get('rml_loop'): oldctx = dict(self.localcontext) for ctx in eval(n.get('rml_loop'),{}, self.localcontext): self.localcontext.update(ctx) if (tagname is None) or (n.tag==tagname): if n.get('rml_except', False): try: eval(... | def _child_get(node, self=None, tagname=None): for n in node: if self and self.localcontext and n.get('rml_loop'): oldctx = dict(self.localcontext) for ctx in eval(n.get('rml_loop'),{}, self.localcontext): self.localcontext.update(ctx) if (tagname is None) or (n.tag==tagname): if n.get('rml_except', False): try: eval(... | 468,128 |
def _user_left_days(self, cr, uid, ids, name, args, context={}): res = {} return_false = False if context and context.has_key('employee_id'): if not context['employee_id']: return_false = True employee_id = context['employee_id'] else: employee_ids = self.pool.get('hr.employee').search(cr, uid, [('user_id','=',uid)]) i... | def _user_left_days(self, cr, uid, ids, name, args, context={}): res = {} for id in ids: res[id] = {}.fromkeys(name, 0) if context and context.has_key('employee_id'): if not context['employee_id']: return_false = True employee_id = context['employee_id'] else: employee_ids = self.pool.get('hr.employee').search(cr, uid,... | 468,129 |
def insert_pad_link(self, output): # Insert the link on the line right after the link to open the # attachment form form_opener_insertion = output.index( '\n', output.index(self.ADD_ATTACHMENT_BUTTON)) + 1 output = output[:form_opener_insertion] + \ '<a href="#" id="add-pad" class="button-a">${_("Pad")}</a>\n' + \ outp... | def insert_pad_link(self, output): # Insert the link on the line right after the link to open the # attachment form form_opener_insertion = output.index( '\n', output.index(self.ADD_ATTACHMENT_BUTTON)) + 1 output = output[:form_opener_insertion] + \ '<a href="#" id="add-pad" class="button-a">${_("Pad")}</a>\n' + \ outp... | 468,130 |
def create(self, cr, user, vals, context=None): """ create(cr, user, vals, context) -> int cr = database cursor user = user id vals = dictionary of the form {'field_name':field_value, ...} """ if not context: context = {} self.pool.get('ir.model.access').check(cr, user, self._name, 'create') | def create(self, cr, user, vals, context=None): """ create(cr, user, vals, context) -> int cr = database cursor user = user id vals = dictionary of the form {'field_name':field_value, ...} """ if not context: context = {} self.pool.get('ir.model.access').check(cr, user, self._name, 'create') | 468,131 |
def create(self, cr, user, vals, context=None): """ create(cr, user, vals, context) -> int cr = database cursor user = user id vals = dictionary of the form {'field_name':field_value, ...} """ if not context: context = {} self.pool.get('ir.model.access').check(cr, user, self._name, 'create') | def create(self, cr, user, vals, context=None): """ create(cr, user, vals, context) -> int cr = database cursor user = user id vals = dictionary of the form {'field_name':field_value, ...} """ if not context: context = {} self.pool.get('ir.model.access').check(cr, user, self._name, 'create') | 468,132 |
def create(self, cr, user, vals, context=None): """ create(cr, user, vals, context) -> int cr = database cursor user = user id vals = dictionary of the form {'field_name':field_value, ...} """ if not context: context = {} self.pool.get('ir.model.access').check(cr, user, self._name, 'create') | def create(self, cr, user, vals, context=None): """ create(cr, user, vals, context) -> int cr = database cursor user = user id vals = dictionary of the form {'field_name':field_value, ...} """ if not context: context = {} self.pool.get('ir.model.access').check(cr, user, self._name, 'create') | 468,133 |
def _compute_day(self, cr, uid, ids, fields, args, context={}): """ @param cr: the current row, from the database cursor, @param uid: the current user’s ID for security checks, @param ids: List of Openday’s IDs @return: difference between current date and log date @param context: A standard dictionary for contextual va... | def _compute_day(self, cr, uid, ids, fields, args, context={}): """ @param cr: the current row, from the database cursor, @param uid: the current user’s ID for security checks, @param ids: List of Openday’s IDs @return: difference between current date and log date @param context: A standard dictionary for contextual va... | 468,134 |
def _search_osv_memory(self, cr, uid, model, name, domain, context=None): if not domain: return [] field, operator, value = domain[0] if operator not in ['=', '!=']: raise osv.except_osv('Invalid search criterions','The osv_memory field can only be compared with = and != operator.') value = bool(value) if operator == '... | def _search_osv_memory(self, cr, uid, model, name, domain, context=None): if not domain: return [] field, operator, value = domain[0] if operator not in ['=', '!=']: raise osv.except_osv('Invalid search criterions','The osv_memory field can only be compared with = and != operator.') value = bool(value) if operator == '... | 468,135 |
def action_done(self, cr, uid, ids, context={}): track_flag = False picking_ids = [] lines=[] sale=[] purchase=[] product_uom_obj = self.pool.get('product.uom') price_type_obj = self.pool.get('product.price.type') product_obj=self.pool.get('product.product') move_obj = self.pool.get('account.move') for move in self.bro... | defprint "<<<<<<<<<<<<<<s<<<<<<<<" action_done(self,print "<<<<<<<<<<<<<<s<<<<<<<<" cr,print "<<<<<<<<<<<<<<s<<<<<<<<" uid,print "<<<<<<<<<<<<<<s<<<<<<<<" ids,print "<<<<<<<<<<<<<<s<<<<<<<<" context={}):print "<<<<<<<<<<<<<<s<<<<<<<<" track_flagprint "<<<<<<<<<<<<<<s<<<<<<<<" =print "<<<<<<<<<<<<<<s<<<<<<<<" Falseprint... | 468,136 |
def action_done(self, cr, uid, ids, context={}): track_flag = False picking_ids = [] lines=[] sale=[] purchase=[] product_uom_obj = self.pool.get('product.uom') price_type_obj = self.pool.get('product.price.type') product_obj=self.pool.get('product.product') move_obj = self.pool.get('account.move') for move in self.bro... | def action_done(self, cr, uid, ids, context={}): track_flag = False picking_ids = [] lines=[] sale=[] purchase=[] product_uom_obj = self.pool.get('product.uom') price_type_obj = self.pool.get('product.price.type') product_obj=self.pool.get('product.product') move_obj = self.pool.get('account.move') for move in self.bro... | 468,137 |
def action_done(self, cr, uid, ids, context={}): track_flag = False picking_ids = [] lines=[] sale=[] purchase=[] product_uom_obj = self.pool.get('product.uom') price_type_obj = self.pool.get('product.price.type') product_obj=self.pool.get('product.product') move_obj = self.pool.get('account.move') for move in self.bro... | def action_done(self, cr, uid, ids, context={}): track_flag = False picking_ids = [] lines=[] sale=[] purchase=[] product_uom_obj = self.pool.get('product.uom') price_type_obj = self.pool.get('product.price.type') product_obj=self.pool.get('product.product') move_obj = self.pool.get('account.move') for move in self.bro... | 468,138 |
def check_duplicate(self, cr, uid, ids): | def check_duplicate(self, cr, uid, ids): | 468,139 |
def default_get(self, cr, uid, fields, context=None): """ This function gets default values """ if not context: context = {} | def default_get(self, cr, uid, fields, context=None): """ This function gets default values """ if not context: context = {} | 468,140 |
def _disable_workflow_buttons(self, cr, user, node): if user == 1: # admin user can always activate workflow buttons return node | def _disable_workflow_buttons(self, cr, user, node): if user == 1: # admin user can always activate workflow buttons return node | 468,141 |
def populate_statement(self, cr, uid, ids, context=None): | def populate_statement(self, cr, uid, ids, context=None): | 468,142 |
def populate_statement(self, cr, uid, ids, context=None): | def populate_statement(self, cr, uid, ids, context=None): | 468,143 |
def set_default_menu(self, cr, uid, menu, context=None): users = self.pool.get('res_users') users.write(cr, uid, users.search(cr, uid, [('action_id','=','Setup')], context=context), {'action_id': menu.id}, context=context) users.write(cr, uid, users.search(cr, uid, [('menu_id','=','Setup')], context=context), {'menu_id... | def set_default_menu(self, cr, uid, menu, context=None): users = self.pool.get('res.users') users.write(cr, uid, users.search(cr, uid, [('action_id','=','Setup')], context=context), {'action_id': menu.id}, context=context) users.write(cr, uid, users.search(cr, uid, [('menu_id','=','Setup')], context=context), {'menu_id... | 468,144 |
def create(self, cr, uid, data, context={}): if 'factor_inv' in data: if data['factor_inv'] <> 1: data['factor'] = self._compute_factor_inv(data['factor_inv']) del(data['factor_inv']) return super(product_uom, self).create(cr, uid, data, context) | def create(self, cr, uid, data, context={}): if 'factor_inv' in data: if data['factor_inv'] <> 1: data['factor'] = self._compute_factor_inv(data['factor_inv']) del(data['factor_inv']) return super(product_uom, self).create(cr, uid, data, context) | 468,145 |
def _user_left_days(self, cr, uid, ids, name, args, context=None): if context is None: context = {} return_false = False employee_id = False res = {} | def _user_left_days(self, cr, uid, ids, name, args, context=None): if context is None: context = {} return_false = False employee_id = False res = {} | 468,146 |
def _build_contexts(self, cr, uid, ids, data, context=None): if context is None: context = {} result = {} period_obj = self.pool.get('account.period') fiscal_obj = self.pool.get('account.fiscalyear') result['fiscalyear'] = 'fiscalyear_id' in data['form'] and data['form']['fiscalyear_id'] or False result['journal_ids'] ... | def _build_contexts(self, cr, uid, ids, data, context=None): if context is None: context = {} result = {} period_obj = self.pool.get('account.period') fiscal_obj = self.pool.get('account.fiscalyear') result['fiscalyear'] = 'fiscalyear_id' in data['form'] and data['form']['fiscalyear_id'] or False result['journal_ids'] ... | 468,147 |
def button_open(self, cr, uid, ids, context=None): """ Changes statement state to Running. @return: True """ if context is None: context = {} statement_pool = self.pool.get('account.bank.statement') for statement in statement_pool.browse(cr, uid, ids, context=context): vals = {} force_allow = context.get('force_allow',... | def button_open(self, cr, uid, ids, context=None): """ Changes statement state to Running. @return: True """ if context is None: context = {} statement_pool = self.pool.get('account.bank.statement') for statement in statement_pool.browse(cr, uid, ids, context=context): vals = {} force_allow = context.get('force_allow',... | 468,148 |
def action_traceability(self, cr, uid, ids, context={}): """ It traces the information of a product @param self: The object pointer. @param cr: A database cursor @param uid: ID of the user currently logged in @param ids: List of IDs selected @param context: A standard dictionary @return: A dictionary of values """ | def action_traceability(self, cr, uid, ids, context={}): """ It traces the information of a product @param self: The object pointer. @param cr: A database cursor @param uid: ID of the user currently logged in @param ids: List of IDs selected @param context: A standard dictionary @return: A dictionary of values """ | 468,149 |
def action_traceability(self, cr, uid, ids, context={}): """ It traces the information of a product @param self: The object pointer. @param cr: A database cursor @param uid: ID of the user currently logged in @param ids: List of IDs selected @param context: A standard dictionary @return: A dictionary of values """ | def action_traceability(self, cr, uid, ids, context={}): """ It traces the information of a product @param self: The object pointer. @param cr: A database cursor @param uid: ID of the user currently logged in @param ids: List of IDs selected @param context: A standard dictionary @return: A dictionary of values """ | 468,150 |
def encode(s): if isinstance(s, unicode): return s.encode('utf8') return s | defdef check_group(node): if node.get('groups'): groups = node.get('groups').split(',') readonly = False access_pool = self.pool.get('ir.model.access') for group in groups: readonly = readonly or access_pool.check_groups(cr, user, group) if not readonly: node.set('invisible', '1') del(node.attrib['groups']) encode(s):... | 468,151 |
def encode(s): if isinstance(s, unicode): return s.encode('utf8') return s | def encode(s): if isinstance(s, unicode): return s.encode('utf8') return s | 468,152 |
def encode(s): if isinstance(s, unicode): return s.encode('utf8') return s | def encode(s): if isinstance(s, unicode): return s.encode('utf8') return s | 468,153 |
def name_search(self, cr, user, name='', args=None, operator='ilike', context=None, limit=100): """ | def name_search(self, cr, user, name='', args=None, operator='ilike', context=None, limit=100): """ | 468,154 |
def action_picking_create(self,cr, uid, ids, *args): picking_id = False for order in self.browse(cr, uid, ids): loc_id = order.partner_id.property_stock_supplier.id istate = 'none' if order.invoice_method=='picking': istate = '2binvoiced' pick_name = self.pool.get('ir.sequence').get(cr, uid, 'stock.picking.in') picking... | def action_picking_create(self,cr, uid, ids, *args): picking_id = False for order in self.browse(cr, uid, ids): loc_id = order.partner_id.property_stock_supplier.id istate = 'none' if order.invoice_method=='picking': istate = '2binvoiced' pick_name = self.pool.get('ir.sequence').get(cr, uid, 'stock.picking.in') picking... | 468,155 |
def get_module_resource(module, *args): """Return the full path of a resource of the given module. @param module: the module @param args: the resource path components @return: absolute path to the resource """ a = get_module_path(module) res = a and opj(a, *args) or False if zipfile.is_zipfile( a +'.zip') : zip = zip... | def get_module_resource(module, *args): """Return the full path of a resource of the given module. @param module: the module @param args: the resource path components @return: absolute path to the resource """ a = get_module_path(module) if not a: raise ValueError('Could not find path for module %s'%module) resource_... | 468,156 |
def get_module_resource(module, *args): """Return the full path of a resource of the given module. @param module: the module @param args: the resource path components @return: absolute path to the resource """ a = get_module_path(module) res = a and opj(a, *args) or False if zipfile.is_zipfile( a +'.zip') : zip = zip... | def get_module_resource(module, *args): """Return the full path of a resource of the given module. @param module: the module @param args: the resource path components @return: absolute path to the resource """ a = get_module_path(module) res = a and opj(a, *args) or False if zipfile.is_zipfile( a +'.zip') : zip = zip... | 468,157 |
def check_assign(self, cr, uid, ids, context=None): """ Checks the product type and accordingly writes the state. @return: No. of moves done """ done = [] count = 0 pickings = {} if context is None: context = {} for move in self.browse(cr, uid, ids, context=context): if move.product_id.type == 'consu': if move.state in... | def check_assign(self, cr, uid, ids, context=None): """ Checks the product type and accordingly writes the state. @return: No. of moves done """ done = [] count = 0 pickings = {} if context is None: context = {} for move in self.browse(cr, uid, ids, context=context): if move.product_id.type == 'consu': if move.state in... | 468,158 |
def login(self, db, login, password): ret = super(users,self).login(db, login, password) if ret: return ret pool = pooler.get_pool(db) cr = pooler.get_db(db).cursor() action_obj = pool.get('ir.actions.actions') cr.execute(""" SELECT id, company, ldap_server, ldap_server_port, ldap_binddn, ldap_password, ldap_filter, ld... | def login(self, db, login, password): ret = super(users,self).login(db, login, password) tools.debug(ret) if ret: return ret pool = pooler.get_pool(db) cr = pooler.get_db(db).cursor() action_obj = pool.get('ir.actions.actions') cr.execute(""" SELECT id, company, ldap_server, ldap_server_port, ldap_binddn, ldap_password... | 468,159 |
def login(self, db, login, password): ret = super(users,self).login(db, login, password) if ret: return ret pool = pooler.get_pool(db) cr = pooler.get_db(db).cursor() action_obj = pool.get('ir.actions.actions') cr.execute(""" SELECT id, company, ldap_server, ldap_server_port, ldap_binddn, ldap_password, ldap_filter, ld... | def login(self, db, login, password): ret = super(users,self).login(db, login, password) if ret: return ret pool = pooler.get_pool(db) cr = pooler.get_db(db).cursor() action_obj = pool.get('ir.actions.actions') cr.execute(""" SELECT id, company, ldap_server, ldap_server_port, ldap_binddn, ldap_password, ldap_filter, ld... | 468,160 |
def login(self, db, login, password): ret = super(users,self).login(db, login, password) if ret: return ret pool = pooler.get_pool(db) cr = pooler.get_db(db).cursor() action_obj = pool.get('ir.actions.actions') cr.execute(""" SELECT id, company, ldap_server, ldap_server_port, ldap_binddn, ldap_password, ldap_filter, ld... | def login(self, db, login, password): ret = super(users,self).login(db, login, password) if ret: return ret pool = pooler.get_pool(db) cr = pooler.get_db(db).cursor() action_obj = pool.get('ir.actions.actions') cr.execute(""" SELECT id, company, ldap_server, ldap_server_port, ldap_binddn, ldap_password, ldap_filter, ld... | 468,161 |
def login(self, db, login, password): ret = super(users,self).login(db, login, password) if ret: return ret pool = pooler.get_pool(db) cr = pooler.get_db(db).cursor() action_obj = pool.get('ir.actions.actions') cr.execute(""" SELECT id, company, ldap_server, ldap_server_port, ldap_binddn, ldap_password, ldap_filter, ld... | def login(self, db, login, password): ret = super(users,self).login(db, login, password) if ret: return ret pool = pooler.get_pool(db) cr = pooler.get_db(db).cursor() action_obj = pool.get('ir.actions.actions') cr.execute(""" SELECT id, company, ldap_server, ldap_server_port, ldap_binddn, ldap_password, ldap_filter, ld... | 468,162 |
def login(self, db, login, password): ret = super(users,self).login(db, login, password) if ret: return ret pool = pooler.get_pool(db) cr = pooler.get_db(db).cursor() action_obj = pool.get('ir.actions.actions') cr.execute(""" SELECT id, company, ldap_server, ldap_server_port, ldap_binddn, ldap_password, ldap_filter, ld... | def login(self, db, login, password): ret = super(users,self).login(db, login, password) if ret: return ret pool = pooler.get_pool(db) cr = pooler.get_db(db).cursor() action_obj = pool.get('ir.actions.actions') cr.execute(""" SELECT id, company, ldap_server, ldap_server_port, ldap_binddn, ldap_password, ldap_filter, ld... | 468,163 |
def check(self, db, uid, passwd): try: return super(users,self).check(db, uid, passwd) except: # AccessDenied pass pool = pooler.get_pool(db) cr = pooler.get_db(db).cursor() user = self.browse(cr, 1, uid) if user and user.company_id.ldaps: for res_company_ldap in user.company_id.ldaps: try: l = ldap.open(res_company_ld... | def check(self, db, uid, passwd): try: return super(users,self).check(db, uid, passwd) except: # AccessDenied pass cr = pooler.get_db(db).cursor() user = self.browse(cr, 1, uid) if user and user.company_id.ldaps: for res_company_ldap in user.company_id.ldaps: try: l = ldap.open(res_company_ldap.ldap_server, res_company... | 468,164 |
def check(self, db, uid, passwd): try: return super(users,self).check(db, uid, passwd) except: # AccessDenied pass pool = pooler.get_pool(db) cr = pooler.get_db(db).cursor() user = self.browse(cr, 1, uid) if user and user.company_id.ldaps: for res_company_ldap in user.company_id.ldaps: try: l = ldap.open(res_company_ld... | def check(self, db, uid, passwd): try: return super(users,self).check(db, uid, passwd) except: # AccessDenied pass pool = pooler.get_pool(db) cr = pooler.get_db(db).cursor() user = self.browse(cr, 1, uid) if user and user.company_id.ldaps: for res_company_ldap in user.company_id.ldaps: try: l = ldap.open(res_company_ld... | 468,165 |
def menu(self, cr, uid, ids, context=None): menu = self.get_default_menu(cr, uid, context=context) self.set_default_menu(cr, uid, menu, context=context) | def menu(self, cr, uid, ids, context=None): menu = self.get_default_menu(cr, uid, context=context) self.set_default_menu(cr, uid, menu, context=context) | 468,166 |
def _compute_day(self, cr, uid, ids, fields, args, context={}): """ @param cr: the current row, from the database cursor, @param uid: the current user’s ID for security checks, @param ids: List of Openday’s IDs @return: difference between current date and log date @param context: A standard dictionary for contextual va... | def _compute_day(self, cr, uid, ids, fields, args, context={}): """ @param cr: the current row, from the database cursor, @param uid: the current user’s ID for security checks, @param ids: List of Openday’s IDs @return: difference between current date and log date @param context: A standard dictionary for contextual va... | 468,167 |
def _compute_day(self, cr, uid, ids, fields, args, context={}): """ @param cr: the current row, from the database cursor, @param uid: the current user’s ID for security checks, @param ids: List of Openday’s IDs @return: difference between current date and log date @param context: A standard dictionary for contextual va... | def _compute_day(self, cr, uid, ids, fields, args, context={}): """ @param cr: the current row, from the database cursor, @param uid: the current user’s ID for security checks, @param ids: List of Openday’s IDs @return: difference between current date and log date @param context: A standard dictionary for contextual va... | 468,168 |
def onchange_department(self, cr, uid, ids, department_id, context=None): manager = self.pool.get('hr.department').browse(cr, uid, department_id).manager_id.id return {'value': {'parent_id':manager or False}} | def onchange_department(self, cr, uid, ids, department_id, context=None): manager = self.pool.get('hr.department').browse(cr, uid, department_id).manager_id.id return {'value': {'parent_id':manager or False}} | 468,169 |
def job_open(self, cr, uid, ids, *args): self.write(cr, uid, ids, {'state': 'open'}) return True | def job_open(self, cr, uid, ids, *args): self.write(cr, uid, ids, {'state': 'open'}) return True | 468,170 |
def __init__(self, path, dir_id, parent, context, res_model, res_bo, res_id = None): super(node_res_obj,self).__init__(path, parent,context) assert parent #todo: more info from dirr self.dir_id = dir_id self.mimetype = 'application/x-directory' # 'httpd/unix-directory' self.create_date = parent.create_date # TODO: the ... | def __init__(self, path, dir_id, parent, context, res_model, res_bo, res_id = None): super(node_res_obj,self).__init__(path, parent,context) assert parent #todo: more info from dirr self.dir_id = dir_id self.mimetype = 'application/x-directory' # 'httpd/unix-directory' self.create_date = parent.create_date # TODO: the ... | 468,171 |
def _child_get(self, cr, name=None, domain=None): dirobj = self.context._dirobj | def _child_get(self, cr, name=None, domain=None): dirobj = self.context._dirobj | 468,172 |
def _child_get(self, cr, name=None, domain=None): dirobj = self.context._dirobj | def _child_get(self, cr, name=None, domain=None): dirobj = self.context._dirobj | 468,173 |
def _child_get(self, cr, name=None, domain=None): dirobj = self.context._dirobj | def _child_get(self, cr, name=None, domain=None): dirobj = self.context._dirobj | 468,174 |
def _child_get(self, cr, name=None, domain=None): dirobj = self.context._dirobj | def _child_get(self, cr, name=None, domain=None): dirobj = self.context._dirobj | 468,175 |
def _child_get(self, cr, name=None, domain=None): dirobj = self.context._dirobj | def _child_get(self, cr, name=None, domain=None): dirobj = self.context._dirobj | 468,176 |
def _child_get(self, cr, name=None, domain=None): dirobj = self.context._dirobj | def _child_get(self, cr, name=None, domain=None): dirobj = self.context._dirobj | 468,177 |
def _child_get(self, cr, name=None, domain=None): dirobj = self.context._dirobj | def _child_get(self, cr, name=None, domain=None): dirobj = self.context._dirobj | 468,178 |
def _child_get(self, cr, name=None, domain=None): dirobj = self.context._dirobj | def _child_get(self, cr, name=None, domain=None): dirobj = self.context._dirobj | 468,179 |
def create_child_collection(self, cr, objname): dirobj = self.context._dirobj is_allowed = self.check_perms(2) if not is_allowed: raise IOError(errno.EPERM,"Permission denied") | def create_child_collection(self, cr, objname): dirobj = self.context._dirobj is_allowed = self.check_perms(2) if not is_allowed: raise IOError(errno.EPERM,"Permission denied") | 468,180 |
def create(self, cr, uid, data, context={}): if 'factor_inv' in data: if data['factor_inv'] <> 1: data['factor'] = self._compute_factor_inv(data['factor_inv']) del(data['factor_inv']) return super(product_uom, self).create(cr, uid, data, context) | def create(self, cr, uid, data, context={}): if 'factor_inv' in data: if data['factor_inv'] <> 1: data['factor'] = self._compute_factor_inv(data['factor_inv']) del(data['factor_inv']) return super(product_uom, self).create(cr, uid, data, context) | 468,181 |
def action_send(self, cr, uid, ids, context=None): """ This sends an email to ALL the addresses of the selected partners. """ hist_obj = self.pool.get('mailgate.message') | def action_send(self, cr, uid, ids, context=None): """ This sends an email to ALL the addresses of the selected partners. """ hist_obj = self.pool.get('mailgate.message') | 468,182 |
def get_reply_defaults(self, cr, uid, fields, context=None): """ This function gets default values for reply mail """ hist_obj = self.pool.get('mailgate.message') res_ids = context and context.get('active_ids', []) or [] | def get_reply_defaults(self, cr, uid, fields, context=None): """ This function gets default values for reply mail """ hist_obj = self.pool.get('mailgate.message') res_ids = context and context.get('active_ids', []) or [] | 468,183 |
def _number_packages(self, cr, uid, ids, field_name, arg, context=None): res = {} for line in self.browse(cr, uid, ids, context=context): try: res[line.id] = int((line.product_uom_qty+line.product_packaging.qty-0.0001) / line.product_packaging.qty) except: res[line.id] = 1 return res | def _number_packages(self, cr, uid, ids, field_name, arg, context=None): res = {} for line in self.browse(cr, uid, ids, context=context): try: res[line.id] = int((line.product_uom_qty+line.product_packaging.qty-0.0001) / line.product_packaging.qty) except: res[line.id] = 1 return res | 468,184 |
def action_open_window(self, cr, uid, ids, context=None): """ @param cr: the current row, from the database cursor, @param uid: the current user’s ID for security checks, @param ids: the ID or list of IDs if we want more than one | def action_open_window(self, cr, uid, ids, context=None): """ @param cr: the current row, from the database cursor, @param uid: the current user’s ID for security checks, @param ids: the ID or list of IDs if we want more than one | 468,185 |
def onchange_partner_id(self, cr, uid, ids, partner_id, journal_id, price, currency_id, ttype, context=None): """price Returns a dict that contains new values and context | def onchange_partner_id(self, cr, uid, ids, partner_id, journal_id, price, currency_id, ttype, context=None): """price Returns a dict that contains new values and context | 468,186 |
def unlink(self, cr, uid, ids, context=None): voucher_obj = self.pool.get('account.voucher') statement_line = self.browse(cr, uid, ids, context) unlink_ids = [] for st_line in statement_line: if st_line.voucher_id: unlink_ids.append(st_line.voucher_id.id) voucher_obj.unlink(cr, uid, unlink_ids, context=context) return ... | def unlink(self, cr, uid, ids, context=None): voucher_obj = self.pool.get('account.voucher') statement_line = self.browse(cr, uid, ids, context) unlink_ids = [] for st_line in statement_line: if st_line.voucher_id: unlink_ids.append(st_line.voucher_id.id) voucher_obj.unlink(cr, uid, unlink_ids, context=context) return ... | 468,187 |
def change_price(self, cr, uid, ids, context): """ Changes the Standard Price of Product. And creates an account move accordingly. | def change_price(self, cr, uid, ids, context): """ Changes the Standard Price of Product. And creates an account move accordingly. | 468,188 |
def name_get(self, cr, uid, ids, context={}): if not len(ids): return [] return [(r['id'], r['name'] + ' - ' + r['vat']) \ for r in self.read(cr, uid, ids, ['name', 'vat'], context, load='_classic_write')] | def name_get(self, cr, uid, ids, context={}): if not len(ids): return [] return [(r['id'], r['name'] or '' + ' - ' + r['vat'] or '') \ for r in self.read(cr, uid, ids, ['name', 'vat'], context, load='_classic_write')] | 468,189 |
def search(self, cr, uid, args, offset=0, limit=2000, order=None, context=None, count=False): if context is None: context = {} ids = osv.orm.orm.search(self, cr, uid, args, offset, limit, order, context=context, count=(count and uid==1)) if uid==1: return ids | def search(self, cr, uid, args, offset=0, limit=2000, order=None, context=None, count=False): if context is None: context = {} if uid !=1: flag = True for dom in args: if dom[0] == 'parent_id': flag = False break if flag: args += [('parent_id','child_of',self._parents)] ids = osv.orm.orm.search(self, cr, uid, args,... | 468,190 |
def search(self, cr, uid, args, offset=0, limit=2000, order=None, context=None, count=False): if context is None: context = {} ids = osv.orm.orm.search(self, cr, uid, args, offset, limit, order, context=context, count=(count and uid==1)) if uid==1: return ids | def search(self, cr, uid, args, offset=0, limit=2000, order=None, context=None, count=False): if context is None: context = {} ids = osv.orm.orm.search(self, cr, uid, args, offset, limit, order, context=context, count=(count and uid==1)) if uid==1: return ids | 468,191 |
def search(self, cr, uid, args, offset=0, limit=2000, order=None, context=None, count=False): if context is None: context = {} ids = osv.orm.orm.search(self, cr, uid, args, offset, limit, order, context=context, count=(count and uid==1)) if uid==1: return ids | def search(self, cr, uid, args, offset=0, limit=2000, order=None, context=None, count=False): if context is None: context = {} ids = osv.orm.orm.search(self, cr, uid, args, offset, limit, order, context=context, count=(count and uid==1)) if uid==1: return ids | 468,192 |
def search(self, cr, uid, args, offset=0, limit=2000, order=None, context=None, count=False): if context is None: context = {} ids = osv.orm.orm.search(self, cr, uid, args, offset, limit, order, context=context, count=(count and uid==1)) if uid==1: return ids | def search(self, cr, uid, args, offset=0, limit=2000, order=None, context=None, count=False): if context is None: context = {} ids = osv.orm.orm.search(self, cr, uid, args, offset, limit, order, context=context, count=(count and uid==1)) if uid==1: return ids | 468,193 |
def pay_and_reconcile(self, cr, uid, ids, pay_amount, pay_account_id, period_id, pay_journal_id, writeoff_acc_id, writeoff_period_id, writeoff_journal_id, context=None, name=''): if context is None: context = {} #TODO check if we can use different period for payment and the writeoff line assert len(ids)==1, "Can only p... | def pay_and_reconcile(self, cr, uid, ids, pay_amount, pay_account_id, period_id, pay_journal_id, writeoff_acc_id, writeoff_period_id, writeoff_journal_id, context=None, name=''): if context is None: context = {} #TODO check if we can use different period for payment and the writeoff line assert len(ids)==1, "Can only p... | 468,194 |
def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False, submenu=False): journal_pool = self.pool.get('account.journal') if context is None: context = {} result = super(osv.osv, self).fields_view_get(cr, uid, view_id, view_type, context=context, toolbar=toolbar, submenu=submenu) i... | def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False, submenu=False): journal_pool = self.pool.get('account.journal') if context is None: context = {} result = super(osv.osv, self).fields_view_get(cr, uid, view_id, view_type, context=context, toolbar=toolbar, submenu=submenu) i... | 468,195 |
def _get_source(self, cr, uid, name, tt, lang, source=None): if source: #if isinstance(source, unicode): # source = source.encode('utf8') cr.execute('select value ' \ 'from ir_translation ' \ 'where lang=%s ' \ 'and type=%s ' \ 'and name=%s ' \ 'and src=%s', (lang, tt, tools.ustr(name), source)) else: cr.execute('sel... | def _get_source(self, cr, uid, name, tt, lang, source=None): if source: #if isinstance(source, unicode): # source = source.encode('utf8') cr.execute('select value ' \ 'from ir_translation ' \ 'where lang=%s ' \ 'and type=%s ' \ 'and name=%s ' \ 'and src=%s', (lang, tt, tools.ustr(name), source)) else: cr.execute('sel... | 468,196 |
def create(self, cursor, user, vals, context=None): if not context: context = {} ids = super(ir_translation, self).create(cursor, user, vals, context=context) for trans_obj in self.read(cursor, user, [ids], ['name','type','res_id'], context=context): self._get_source.clear_cache(cursor.dbname, user, trans_obj['name'], ... | def create(self, cursor, user, vals, context=None): if not context: context = {} ids = super(ir_translation, self).create(cursor, user, vals, context=context) for trans_obj in self.read(cursor, user, [ids], ['name','type','res_id'], context=context): self._get_source.clear_cache(cursor.dbname, user, trans_obj['name'], ... | 468,197 |
def unlink(self, cursor, user, ids, context=None): if not context: context = {} for trans_obj in self.read(cursor, user, ids, ['name','type','res_id'], context=context): self._get_source.clear_cache(cursor.dbname, user, trans_obj['name'], trans_obj['type'], lang=context.get('lang','en_US')) self._get_ids.clear_cache(cu... | def unlink(self, cursor, user, ids, context=None): if not context: context = {} for trans_obj in self.read(cursor, user, ids, ['name','type','res_id'], context=context): self._get_source.clear_cache(cursor.dbname, user, trans_obj['name'], trans_obj['type'], lang=context.get('lang','en_US')) self._get_ids.clear_cache(cu... | 468,198 |
def read_group(self, cr, uid, domain, fields, groupby, offset=0, limit=None, context=None): context = context or {} self.pool.get('ir.model.access').check(cr, uid, self._name, 'read', context=context) if not fields: fields = self._columns.keys() | def read_group(self, cr, uid, domain, fields, groupby, offset=0, limit=None, context=None): context = context or {} self.pool.get('ir.model.access').check(cr, uid, self._name, 'read', context=context) if not fields: fields = self._columns.keys() | 468,199 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.