bugged stringlengths 4 228k | fixed stringlengths 0 96.3M | __index_level_0__ int64 0 481k |
|---|---|---|
def process_liness(self, datas, prefix, current_module, model_name, fields_def, position=0, skip=0): line = datas[position] row = {} warning = [] data_res_id = False nbrmax = position+1 | def process_liness(self, datas, prefix, current_module, model_name, fields_def, position=0, skip=0): line = datas[position] row = {} warning = [] data_res_id = False nbrmax = position+1 | 468,900 |
def process_liness(self, datas, prefix, current_module, model_name, fields_def, position=0, skip=0): line = datas[position] row = {} warning = [] data_res_id = False nbrmax = position+1 | def process_liness(self, datas, prefix, current_module, model_name, fields_def, position=0, skip=0): line = datas[position] row = {} warning = [] data_res_id = False nbrmax = position+1 | 468,901 |
fields_def = self.fields_get(cr, uid, context=context) | fields_def = self.fields_get(cr, uid, context=context) | 468,902 |
fields_def = self.fields_get(cr, uid, context=context) | fields_def = self.fields_get(cr, uid, context=context) | 468,903 |
def _get_source(self, cr, uid, name, types, lang, source=None): """ Returns the translation for the given combination of name, type, language and source. All values passed to this method should be unicode (not byte strings), especially ``source``. | def _get_source(self, cr, uid, name, types, lang, source=None): """ Returns the translation for the given combination of name, type, language and source. All values passed to this method should be unicode (not byte strings), especially ``source``. | 468,904 |
def read(self, cr, uid, ids, fields=None, context=None, load='_classic_read'): """ Overrides orm read method. @param self: The object pointer @param cr: the current row, from the database cursor, @param uid: the current user’s ID for security checks, @param ids: List of IR Model’s IDs. @param context: A standard dictio... | def read(self, cr, uid, ids, fields=None, context=None, load='_classic_read'): """ Overrides orm read method. @param self: The object pointer @param cr: the current row, from the database cursor, @param uid: the current user’s ID for security checks, @param ids: List of IR Model’s IDs. @param context: A standard dictio... | 468,905 |
def _get_bal(self,data): res = {} sql =""" select sum(pieces*number) as bal from singer_statement where starting_id = %d """%(data['id']) self.cr.execute(sql) res = self.cr.dictfetchall() if res : return res[0]['bal'] else : return False | def _get_bal(self,data): res = {} sql =""" select sum(pieces*number) as bal from account_cashbox_line where starting_id = %d """%(data['id']) self.cr.execute(sql) res = self.cr.dictfetchall() if res : return res[0]['bal'] else : return False | 468,906 |
def _get_net_total_starting(self,user): lst = [] res={} total_ending_bal = 0.0 total_starting_bal = 0.0 sql = """ SELECT abs.id,abs.balance_end_real as net_total FROM account_bank_statement as abs WHERE to_char(date_trunc('day',abs.date),'YYYY-MM-DD')::date = current_date and abs.state IN ('confirm','open') and abs.us... | def _get_net_total_starting(self,user): lst = [] res={} total_ending_bal = 0.0 total_starting_bal = 0.0 sql = """ SELECT abs.id,abs.balance_end_real as net_total FROM account_bank_statement as abs WHERE to_char(date_trunc('day',abs.date),'YYYY-MM-DD')::date = current_date and abs.state IN ('confirm','open') and abs.us... | 468,907 |
def next_partner(self, cr, uid, ids, context=None): partner_id = self.pool.get('account.move.line').read(cr, uid, context['active_id'], ['partner_id'])['partner_id'][0] self.pool.get('res.partner').write(cr, uid, partner_id, {'last_reconciliation_date': time.strftime('%Y-%m-%d')}, context) #TODO: we have to find a way ... | def next_partner(self, cr, uid, ids, context=None): partner_id = self.pool.get('account.move.line').read(cr, uid, context['active_id'], ['partner_id'])['partner_id'] if partner_id: self.pool.get('res.partner').write(cr, uid, partner_id[0], {'last_reconciliation_date': time.strftime('%Y-%m-%d')}, context) #TODO: we have... | 468,908 |
def __pos_payment_user__total__(self, form): res=[] ids = form['user_id'] self.cr.execute ("select sum(pol.price_unit * pol.qty * (1 - (pol.discount) / 100.0)) " \ "from pos_order as po,pos_order_line as pol,product_product as pp,product_template as pt " \ "where pt.id=pp.product_tmpl_id and pp.id=pol.product_id and po... | def __pos_payment_user__total__(self, form): res=[] ids = form['user_id'] self.cr.execute ("select sum(pol.price_unit * pol.qty * (1 - (pol.discount) / 100.0)) " \ "from pos_order as po,pos_order_line as pol,product_product as pp,product_template as pt " \ "where pt.id=pp.product_tmpl_id and pp.id=pol.product_id and po... | 468,909 |
def action_open_window(self, cr, uid, ids, context=None): mod_obj = self.pool.get('ir.model.data') act_obj = self.pool.get('ir.actions.act_window') if context is None: context = {} | def action_open_window(self, cr, uid, ids, context=None): mod_obj = self.pool.get('ir.model.data') act_obj = self.pool.get('ir.actions.act_window') if context is None: context = {} | 468,910 |
def search(self, cr, uid, args, offset=0, limit=None, order=None, context=None, count=False): for arg in args: if arg[0] == 'period_id' and arg[2] == 'current_period': current_period = self.pool.get('account.period').find(cr, uid)[0] args.append(['period_id','in',[current_period]]) break elif arg[0] == 'period_id' and ... | def search(self, cr, uid, args, offset=0, limit=None, order=None, context=None, count=False): for arg in args: if arg[0] == 'period_id' and arg[2] == 'current_period': current_period = period_obj.find(cr, uid)[0] args.append(['period_id','in',[current_period]]) break elif arg[0] == 'period_id' and arg[2] == 'current_ye... | 468,911 |
def search(self, cr, uid, args, offset=0, limit=None, order=None, context=None, count=False): for arg in args: if arg[0] == 'period_id' and arg[2] == 'current_period': current_period = self.pool.get('account.period').find(cr, uid)[0] args.append(['period_id','in',[current_period]]) break elif arg[0] == 'period_id' and ... | def search(self, cr, uid, args, offset=0, limit=None, order=None, context=None, count=False): for arg in args: if arg[0] == 'period_id' and arg[2] == 'current_period': current_period = self.pool.get('account.period').find(cr, uid)[0] args.append(['period_id','in',[current_period]]) break elif arg[0] == 'period_id' and ... | 468,912 |
def read_group(self, cr, uid, domain, fields, groupby, offset=0, limit=None, context=None): todel=[] for arg in domain: if arg[0] == 'period_id' and arg[2] == 'current_period': current_period = self.pool.get('account.period').find(cr, uid)[0] domain.append(['period_id','in',[current_period]]) todel.append(arg) break el... | def read_group(self, cr, uid, domain, fields, groupby, offset=0, limit=None, context=None): todel=[] for arg in domain: if arg[0] == 'period_id' and arg[2] == 'current_period': current_period = period_obj.find(cr, uid)[0] domain.append(['period_id','in',[current_period]]) todel.append(arg) break elif arg[0] == 'period_... | 468,913 |
def read_group(self, cr, uid, domain, fields, groupby, offset=0, limit=None, context=None): todel=[] for arg in domain: if arg[0] == 'period_id' and arg[2] == 'current_period': current_period = self.pool.get('account.period').find(cr, uid)[0] domain.append(['period_id','in',[current_period]]) todel.append(arg) break el... | def read_group(self, cr, uid, domain, fields, groupby, offset=0, limit=None, context=None): todel=[] for arg in domain: if arg[0] == 'period_id' and arg[2] == 'current_period': current_period = self.pool.get('account.period').find(cr, uid)[0] domain.append(['period_id','in',[current_period]]) todel.append(arg) break el... | 468,914 |
def read_group(self, cr, user, ids, fields, groupby, context=None): context = context or {} result = [] if not ids:return | def read_group(self, cr, user, ids, fields, groupby, context=None): context = context or {} result = [] if not ids:return | 468,915 |
def read_group(self, cr, user, ids, fields, groupby, context=None): context = context or {} result = [] if not ids:return | def read_group(self, cr, user, ids, fields, groupby, context=None): context = context or {} result = [] if not ids:return | 468,916 |
def onchange_partner_id(self, cr, uid, ids, type, partner_id,\ date_invoice=False, payment_term=False, partner_bank_id=False, company_id=False): invoice_addr_id = False contact_addr_id = False partner_payment_term = False acc_id = False bank_id = False fiscal_position = False | def onchange_partner_id(self, cr, uid, ids, type, partner_id,\ date_invoice=False, payment_term=False, partner_bank_id=False, company_id=False): invoice_addr_id = False contact_addr_id = False partner_payment_term = False acc_id = False bank_id = False fiscal_position = False | 468,917 |
def onchange_company_id(self, cr, uid, ids, company_id, part_id, type, invoice_line, currency_id): val = {} dom = {} obj_journal = self.pool.get('account.journal') if company_id and part_id and type: acc_id = False partner_obj = self.pool.get('res.partner').browse(cr,uid,part_id) if partner_obj.property_account_payable... | def onchange_company_id(self, cr, uid, ids, company_id, part_id, type, invoice_line, currency_id): val = {} dom = {} obj_journal = self.pool.get('account.journal') if company_id and part_id and type: acc_id = False partner_obj = self.pool.get('res.partner').browse(cr,uid,part_id) if partner_obj.property_account_payable... | 468,918 |
def copy(self, cr, uid, id, default={}, context=None): default.update({ 'state':'draft', 'number':False, 'move_id':False, 'move_name':False, 'internal_number': False, }) if 'date_invoice' not in default: default.update({ 'date_invoice':False }) if 'date_due' not in default: default.update({ 'date_due':False }) return s... | def copy(self, cr, uid, id, default={}, context=None): default.update({ 'state':'draft', 'number':False, 'move_id':False, 'move_name':False, 'internal_number': False, }) if 'date_invoice' not in default: default.update({ 'date_invoice':False }) if 'date_due' not in default: default.update({ 'date_due':False }) return s... | 468,919 |
def action_number(self, cr, uid, ids, *args): #TODO: not correct fix but required a frech values before reading it. self.write(cr, uid, ids, {}) for obj_inv in self.browse(cr, uid, ids): id = obj_inv.id invtype = obj_inv.type number = obj_inv.number move_id = obj_inv.move_id and obj_inv.move_id.id or False reference =... | def action_number(self, cr, uid, ids, *args): #TODO: not correct fix but required a frech values before reading it. self.write(cr, uid, ids, {}) for obj_inv in self.browse(cr, uid, ids): id = obj_inv.id invtype = obj_inv.type number = obj_inv.number move_id = obj_inv.move_id and obj_inv.move_id.id or False reference =... | 468,920 |
def action_number(self, cr, uid, ids, *args): #TODO: not correct fix but required a frech values before reading it. self.write(cr, uid, ids, {}) for obj_inv in self.browse(cr, uid, ids): id = obj_inv.id invtype = obj_inv.type number = obj_inv.number move_id = obj_inv.move_id and obj_inv.move_id.id or False reference =... | def action_number(self, cr, uid, ids, *args): #TODO: not correct fix but required a frech values before reading it. self.write(cr, uid, ids, {}) for obj_inv in self.browse(cr, uid, ids): id = obj_inv.id invtype = obj_inv.type number = obj_inv.number move_id = obj_inv.move_id and obj_inv.move_id.id or False reference =... | 468,921 |
def action_number(self, cr, uid, ids, *args): #TODO: not correct fix but required a frech values before reading it. self.write(cr, uid, ids, {}) for obj_inv in self.browse(cr, uid, ids): id = obj_inv.id invtype = obj_inv.type number = obj_inv.number move_id = obj_inv.move_id and obj_inv.move_id.id or False reference =... | def action_number(self, cr, uid, ids, *args): #TODO: not correct fix but required a frech values before reading it. self.write(cr, uid, ids, {}) for obj_inv in self.browse(cr, uid, ids): id = obj_inv.id invtype = obj_inv.type number = obj_inv.number move_id = obj_inv.move_id and obj_inv.move_id.id or False reference =... | 468,922 |
def product_id_change(self, cr, uid, ids, product, uom, qty=0, name='', type='out_invoice', partner_id=False, fposition_id=False, price_unit=False, address_invoice_id=False, currency_id=False, context=None): if context is None: context = {} company_id = context.get('company_id',False) if not partner_id: raise osv.excep... | def product_id_change(self, cr, uid, ids, product, uom, qty=0, name='', type='out_invoice', partner_id=False, fposition_id=False, price_unit=False, address_invoice_id=False, currency_id=False, context=None): if context is None: context = {} company_id = context.get('company_id',False) if not partner_id: raise osv.excep... | 468,923 |
def _child_compute(self, cr, uid, ids, name, arg, context={}): """ @param self: The object pointer. @param cr: A database cursor @param uid: ID of the user currently logged in @param ids: the ID of mrp.production object @param name: @param arg: | def _child_compute(self, cr, uid, ids, name, arg, context={}): """ @param self: The object pointer. @param cr: A database cursor @param uid: ID of the user currently logged in @param ids: the ID of mrp.production object @param name: @param arg: | 468,924 |
def _child_compute(self, cr, uid, ids, name, arg, context={}): """ @param self: The object pointer. @param cr: A database cursor @param uid: ID of the user currently logged in @param ids: the ID of mrp.production object @param name: @param arg: | def _child_compute(self, cr, uid, ids, name, arg, context={}): """ @param self: The object pointer. @param cr: A database cursor @param uid: ID of the user currently logged in @param ids: the ID of mrp.production object @param name: @param arg: | 468,925 |
def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False,submenu=False): result = super(stock_partial_picking, self).fields_view_get(cr, uid, view_id, view_type, context, toolbar,submenu) pick_obj = self.pool.get('stock.picking') picking_ids = context.get('active_ids', False) _move... | def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False,submenu=False): result = super(stock_partial_picking, self).fields_view_get(cr, uid, view_id, view_type, context, toolbar,submenu) pick_obj = self.pool.get('stock.picking') picking_ids = context.get('active_ids', False) _move... | 468,926 |
def upgrade_graph(graph, cr, module_list, force=None): if force is None: force = [] packages = [] len_graph = len(graph) for module in module_list: mod_path = get_module_path(module) terp_file = get_module_resource(module, '__terp__.py') if not mod_path or not terp_file: logger.notifyChannel('init', netsvc.LOG_WARNING,... | def upgrade_graph(graph, cr, module_list, force=None): if force is None: force = [] packages = [] len_graph = len(graph) for module in module_list: mod_path = get_module_path(module) terp_file = get_module_resource(module, '__terp__.py') if not mod_path or not terp_file: logger.notifyChannel('init', netsvc.LOG_WARNING,... | 468,927 |
def load_modules(db, force_demo=False, status=None, update_module=False): if not status: status = {} cr = db.cursor() if cr: cr.execute("SELECT relname FROM pg_class WHERE relkind='r' AND relname='ir_module_module'") if len(cr.fetchall())==0: logger.notifyChannel("init", netsvc.LOG_INFO, "init db") tools.init_db(cr) | defload_modules(db,force_demo=False,status=None,update_module=False):ifnotstatus:status={}cr=db.cursor()ifcr:cr.execute("SELECTrelnameFROMpg_classWHERErelkind='r'ANDrelname='ir_module_module'")iflen(cr.fetchall())==0:logger.notifyChannel("init",netsvc.LOG_INFO,"initdb")tools.init_db(cr) | 468,928 |
def load_modules(db, force_demo=False, status=None, update_module=False): if not status: status = {} cr = db.cursor() if cr: cr.execute("SELECT relname FROM pg_class WHERE relkind='r' AND relname='ir_module_module'") if len(cr.fetchall())==0: logger.notifyChannel("init", netsvc.LOG_INFO, "init db") tools.init_db(cr) | defif not_loaded: return load_modules(db,if not_loaded: return force_demo=False,if not_loaded: return status=None,if not_loaded: return update_module=False):if not_loaded: return ifif not_loaded: return notif not_loaded: return status:if not_loaded: return statusif not_loaded: return =if not_loaded: return {}... | 468,929 |
def search(self, cr, user, args, offset=0, limit=None, order=None, context=None, count=False): raise _('The search method is not implemented on this object !') | def search(self, cr, user, args, offset=0, limit=None, order=None, context=None, count=False): raise _('The search method is not implemented on this object !') | 468,930 |
def name_get(self, cr, user, ids, context=None): raise _('The name_get method is not implemented on this object !') | def name_get(self, cr, user, ids, context=None): raise _('The name_get method is not implemented on this object !') | 468,931 |
def name_search(self, cr, user, name='', args=None, operator='ilike', context=None, limit=100): raise _('The name_search method is not implemented on this object !') | def name_search(self, cr, user, name='', args=None, operator='ilike', context=None, limit=100): raise _('The name_search method is not implemented on this object !') | 468,932 |
def copy(self, cr, uid, id, default=None, context=None): raise _('The copy method is not implemented on this object !') | def copy(self, cr, uid, id, default=None, context=None): raise _('The copy method is not implemented on this object !') | 468,933 |
def exists(self, cr, uid, id, context=None): raise _('The exists method is not implemented on this object !') | def exists(self, cr, uid, id, context=None): raise _('The exists method is not implemented on this object !') | 468,934 |
def init(self, cr): tools.drop_view_if_exists(cr, 'available_holidays_report') cr.execute(""" create or replace view available_holidays_report as ( select min(h.id) as id, date_trunc('day',h.create_date) as date, to_char(s.create_date, 'YYYY') as year, to_char(s.create_date, 'MM') as month, to_char(s.create_date, 'YYYY... | def init(self, cr): tools.drop_view_if_exists(cr, 'available_holidays_report') cr.execute(""" create or replace view available_holidays_report as ( select min(h.id) as id, date_trunc('day',h.create_date) as date, to_char(s.create_date, 'YYYY') as year, to_char(s.create_date, 'MM') as month, to_char(s.create_date, 'YYYY... | 468,935 |
def create_ics(self, cr, uid, datas, name, ical, context=None): """ create calendaring and scheduling information @param self: The object pointer @param cr: the current row, from the database cursor, @param uid: the current user’s ID for security checks, @param context: A standard dictionary for contextual values """ | def create_ics(self, cr, uid, datas, name, ical, context=None): """ create calendaring and scheduling information @param self: The object pointer @param cr: the current row, from the database cursor, @param uid: the current user’s ID for security checks, @param context: A standard dictionary for contextual values """ | 468,936 |
def _next_action_note(self, cr, uid, ids, context=None): next = self._next_action(cr, uid) if next: # if the next one is also an old-style extension, you never know... if next.note: return next.note return "Click 'Continue' to configure the next addon..." return "Your database is now fully configured.\n\n"\ "Click 'Con... | def _next_action_note(self, cr, uid, ids, context=None): next = self._next_action(cr, uid) if next: # if the next one is also an old-style extension, you never know... if next.note: return next.note return "Click 'Continue' to configure the next addon..." return "Your database is now fully configured.\n\n"\ "Click 'Con... | 468,937 |
def _process_email(self, cr, uid, server, message, context={}): context.update({ 'server_id':server.id }) history_pool = self.pool.get('mail.server.history') msg_txt = email.message_from_string(message) message_id = msg_txt.get('Message-ID', False) msg = {} if not message_id: return False fields = msg_txt.keys() msg... | def _process_email(self, cr, uid, server, message, context={}): context.update({ 'server_id':server.id }) history_pool = self.pool.get('mail.server.history') msg_txt = email.message_from_string(message) message_id = msg_txt.get('Message-ID', False) msg = {} if not message_id: return False fields = msg_txt.keys() msg... | 468,938 |
def _process_email(self, cr, uid, server, message, context={}): context.update({ 'server_id':server.id }) history_pool = self.pool.get('mail.server.history') msg_txt = email.message_from_string(message) message_id = msg_txt.get('Message-ID', False) msg = {} if not message_id: return False fields = msg_txt.keys() msg... | def _process_email(self, cr, uid, server, message, context={}): context.update({ 'server_id':server.id }) history_pool = self.pool.get('mail.server.history') msg_txt = email.message_from_string(message) message_id = msg_txt.get('Message-ID', False) msg = {} if not message_id: return False fields = msg_txt.keys() msg... | 468,939 |
def _result_get(x, keys): if x[1] in keys: return False keys.append(x[1]) if x[3]: model,id = x[2].split(',') id = int(id) fields = self.pool.get(model).fields_get_keys(cr, uid) pos = 0 while pos<len(fields): if fields[pos] in ('report_sxw_content', 'report_rml_content', 'report_sxw', 'report_rml', 'report_sxw_content_... | def _result_get(x, keys): if x[1] in keys: return False keys.append(x[1]) if x[3]: model,id = x[2].split(',') id = int(id) fields = self.pool.get(model).fields_get_keys(cr, uid) pos = 0 while pos<len(fields): if fields[pos] in ('report_sxw_content', 'report_rml_content', 'report_sxw', 'report_rml', 'report_sxw_content_... | 468,940 |
def _result_get(x, keys): if x[1] in keys: return False keys.append(x[1]) if x[3]: model,id = x[2].split(',') id = int(id) fields = self.pool.get(model).fields_get_keys(cr, uid) pos = 0 while pos<len(fields): if fields[pos] in ('report_sxw_content', 'report_rml_content', 'report_sxw', 'report_rml', 'report_sxw_content_... | def _result_get(x, keys): if x[1] in keys: return False keys.append(x[1]) if x[3]: model,id = x[2].split(',') id = int(id) fields = self.pool.get(model).fields_get_keys(cr, uid) pos = 0 while pos<len(fields): if fields[pos] in ('report_sxw_content', 'report_rml_content', 'report_sxw', 'report_rml', 'report_sxw_content_... | 468,941 |
def _result_get(x, keys): if x[1] in keys: return False keys.append(x[1]) if x[3]: model,id = x[2].split(',') id = int(id) fields = self.pool.get(model).fields_get_keys(cr, uid) pos = 0 while pos<len(fields): if fields[pos] in ('report_sxw_content', 'report_rml_content', 'report_sxw', 'report_rml', 'report_sxw_content_... | def _result_get(x, keys): if x[1] in keys: return False keys.append(x[1]) if x[3]: model,id = x[2].split(',') id = int(id) fields = self.pool.get(model).fields_get_keys(cr, uid) pos = 0 while pos<len(fields): if fields[pos] in ('report_sxw_content', 'report_rml_content', 'report_sxw', 'report_rml', 'report_sxw_content_... | 468,942 |
def _data_save(self, cr, uid, data, context): if not data['form']['sure']: raise wizard.except_wizard(_('UserError'), _('Closing of fiscal year cancelled, please check the box !')) pool = pooler.get_pool(cr.dbname) fy_id = data['form']['fy_id'] period_ids = pool.get('account.period').search(cr, uid, [('fiscalyear_id',... | def _data_save(self, cr, uid, data, context): if not data['form']['sure']: raise wizard.except_wizard(_('UserError'), _('Closing of fiscal year cancelled, please check the box !')) pool = pooler.get_pool(cr.dbname)query = "SELECT id FROM account_fiscalyear WHERE date_stop < '" + str(new_fyear.date_start) + "'" cr.execu... | 468,943 |
def _data_save(self, cr, uid, data, context): if not data['form']['sure']: raise wizard.except_wizard(_('UserError'), _('Closing of fiscal year cancelled, please check the box !')) pool = pooler.get_pool(cr.dbname) fy_id = data['form']['fy_id'] period_ids = pool.get('account.period').search(cr, uid, [('fiscalyear_id',... | def _data_save(self, cr, uid, data, context): if not data['form']['sure']: raise wizard.except_wizard(_('UserError'), _('Closing of fiscal year cancelled, please check the box !')) pool = pooler.get_pool(cr.dbname) fy_id = data['form']['fy_id'] period_ids = pool.get('account.period').search(cr, uid, [('fiscalyear_id',... | 468,944 |
def search(self, cr, uid, args, offset=0, limit=None, order=None, context=None, count=False): | def search(self, cr, uid, args, offset=0, limit=None, order=None, context=None, count=False): | 468,945 |
def search(self, cr, uid, args, offset=0, limit=None, order=None, context=None, count=False): | def search(self, cr, uid, args, offset=0, limit=None, order=None, context=None, count=False): | 468,946 |
def onchange_stage_id(self, cr, uid, ids, stage_id, context={}): if not stage_id: return {'value':{}} stage = self.pool.get('crm.case.stage').browse(cr, uid, stage_id, context) if not stage.on_change: return {'value':{}} return {'value':{'probability':stage.probability}} | def onchange_stage_id(self, cr, uid, ids, stage_id, context={}): if not stage_id: return {'value':{}} stage = self.pool.get('crm.case.stage').browse(cr, uid, stage_id, context) if not stage.on_change: return {'value':{}} return {'value':{'probability':stage.probability}} | 468,947 |
def _get_rulestring(self, cr, uid, ids, name, arg, context=None): """ Get rule string. @param self: The object pointer @param cr: the current row, from the database cursor, @param id: List of calendar event's ids. @param context: A standard dictionary for contextual values @return: dictionary of rrule value. """ result... | def _get_rulestring(self, cr, uid, ids, name, arg, context=None): """ Get rule string. @param self: The object pointer @param cr: the current row, from the database cursor, @param id: List of calendar event's ids. @param context: A standard dictionary for contextual values @return: dictionary of rrule value. """ result... | 468,948 |
def _get_rulestring(self, cr, uid, ids, name, arg, context=None): """ Get rule string. @param self: The object pointer @param cr: the current row, from the database cursor, @param id: List of calendar event's ids. @param context: A standard dictionary for contextual values @return: dictionary of rrule value. """ result... | def _get_rulestring(self, cr, uid, ids, name, arg, context=None): """ Get rule string. @param self: The object pointer @param cr: the current row, from the database cursor, @param id: List of calendar event's ids. @param context: A standard dictionary for contextual values @return: dictionary of rrule value. """ result... | 468,949 |
def _get_rulestring(self, cr, uid, ids, name, arg, context=None): """ Get rule string. @param self: The object pointer @param cr: the current row, from the database cursor, @param id: List of calendar event's ids. @param context: A standard dictionary for contextual values @return: dictionary of rrule value. """ result... | def _get_rulestring(self, cr, uid, ids, name, arg, context=None): """ Get rule string. @param self: The object pointer @param cr: the current row, from the database cursor, @param id: List of calendar event's ids. @param context: A standard dictionary for contextual values @return: dictionary of rrule value. """ result... | 468,950 |
def _get_rulestring(self, cr, uid, ids, name, arg, context=None): """ Get rule string. @param self: The object pointer @param cr: the current row, from the database cursor, @param id: List of calendar event's ids. @param context: A standard dictionary for contextual values @return: dictionary of rrule value. """ result... | def _get_rulestring(self, cr, uid, ids, name, arg, context=None): """ Get rule string. @param self: The object pointer @param cr: the current row, from the database cursor, @param id: List of calendar event's ids. @param context: A standard dictionary for contextual values @return: dictionary of rrule value. """ result... | 468,951 |
def get_min_max_date(self, cr, uid, ids, field_name, arg, context=None): """ Finds minimum and maximum dates for picking. @return: Dictionary of values """ res = {} for id in ids: res[id] = {'min_date': False, 'max_date': False} if not ids: return res cr.execute("""select picking_id, min(date_expected), max(date_expect... | def get_min_max_date(self, cr, uid, ids, field_name, arg, context=None): """ Finds minimum and maximum dates for picking. @return: Dictionary of values """ res = {} for id in ids: res[id] = {'min_date': False, 'max_date': False} if not ids: return res cr.execute("""select picking_id, min(date_expected), max(date_expect... | 468,952 |
def _query_get(self, cr, uid, obj='l', context=None): fiscalyear_obj = self.pool.get('account.fiscalyear') fiscalperiod_obj = self.pool.get('account.period') account_obj = self.pool.get('account.account') fiscalyear_ids = [] if context is None: context = {} initial_bal = context.get('initial_bal', False) company_clause... | def _query_get(self, cr, uid, obj='l', context=None): fiscalyear_obj = self.pool.get('account.fiscalyear') fiscalperiod_obj = self.pool.get('account.period') account_obj = self.pool.get('account.account') fiscalyear_ids = [] if context is None: context = {} initial_bal = context.get('initial_bal', False) company_clause... | 468,953 |
def create(self, cr, uid, vals, context=None, check=True): account_obj = self.pool.get('account.account') tax_obj = self.pool.get('account.tax') move_obj = self.pool.get('account.move') cur_obj = self.pool.get('res.currency') journal_obj = self.pool.get('account.journal') if context is None: context = {} if vals.get('m... | def create(self, cr, uid, vals, context=None, check=True): account_obj = self.pool.get('account.account') tax_obj = self.pool.get('account.tax') move_obj = self.pool.get('account.move') cur_obj = self.pool.get('res.currency') journal_obj = self.pool.get('account.journal') if context is None: context = {} if vals.get('m... | 468,954 |
def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False, submenu=False): """ Returns views and fields for current model where view will depend on {view_type}. @param cr: A database cursor @param user: ID of the user currently logged in @param view_id: list of fields, which require... | def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False, submenu=False): """ Returns views and fields for current model where view will depend on {view_type}. @param cr: A database cursor @param user: ID of the user currently logged in @param view_id: list of fields, which require... | 468,955 |
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,956 |
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,957 |
def product_id_change(self, cr, uid, ids, pricelist, product, qty=0, uom=False, qty_uos=0, uos=False, name='', partner_id=False, lang=False, update_tax=True,date_order=False,packaging=False,fiscal_position=False, flag=False): | def product_id_change(self, cr, uid, ids, pricelist, product, qty=0, uom=False, qty_uos=0, uos=False, name='', partner_id=False, lang=False, update_tax=True,date_order=False,packaging=False,fiscal_position=False, flag=False): | 468,958 |
def product_id_change(self, cr, uid, ids, pricelist, product, qty=0, uom=False, qty_uos=0, uos=False, name='', partner_id=False, lang=False, update_tax=True,date_order=False,packaging=False,fiscal_position=False, flag=False): | def product_id_change(self, cr, uid, ids, pricelist, product, qty=0, uom=False, qty_uos=0, uos=False, name='', partner_id=False, lang=False, update_tax=True,date_order=False,packaging=False,fiscal_position=False, flag=False): | 468,959 |
def product_id_change(self, cr, uid, ids, pricelist, product, qty=0, uom=False, qty_uos=0, uos=False, name='', partner_id=False, lang=False, update_tax=True,date_order=False,packaging=False,fiscal_position=False, flag=False): | def product_id_change(self, cr, uid, ids, pricelist, product, qty=0, uom=False, qty_uos=0, uos=False, name='', partner_id=False, lang=False, update_tax=True,date_order=False,packaging=False,fiscal_position=False, flag=False): | 468,960 |
def write(self, cr, uid, ids,vals,context=None): if context is None: context = {} if vals.get('project_id',False) or vals.get('name',False): vals_line = {} hr_anlytic_timesheet = self.pool.get('hr.analytic.timesheet') task_obj_l = self.browse(cr, uid, ids, context) if vals.get('project_id',False): project_obj = self.po... | def write(self, cr, uid, ids,vals,context=None): if context is None: context = {} if vals.get('project_id',False) or vals.get('name',False): vals_line = {} hr_anlytic_timesheet = self.pool.get('hr.analytic.timesheet') task_obj_l = self.browse(cr, uid, ids, context) if vals.get('project_id',False): project_obj = self.po... | 468,961 |
def copy(self, cr, uid, id, default={}, context=None): res = { 'state':'draft', 'number':False, 'move_id':False, 'payment_ids':False } default.update(res) if 'date' not in default: default['date'] = time.strftime('%Y-%m-%d') return super(account_voucher, self).copy(cr, uid, id, default, context) | def copy(self, cr, uid, id, default={}, context=None): res = { 'state':'draft', 'number':False, 'move_id':False, 'payment_ids':False } default.update(res) if 'date' not in default: default['date'] = time.strftime('%Y-%m-%d') return super(account_voucher, self).copy(cr, uid, id, default, context) | 468,962 |
def do_invite(self, cr, uid, ids, context={}): """ Invite attendee for meeting.. @param cr: the current row, from the database cursor, @param uid: the current user’s ID for security checks, @param ids: List of base calendar invite attendee’s IDs. @param context: A standard dictionary for contextual values @return: Dict... | def do_invite(self, cr, uid, ids, context={}): """ Invite attendee for meeting.. @param cr: the current row, from the database cursor, @param uid: the current user’s ID for security checks, @param ids: List of base calendar invite attendee’s IDs. @param context: A standard dictionary for contextual values @return: Dict... | 468,963 |
def do_invite(self, cr, uid, ids, context={}): """ Invite attendee for meeting.. @param cr: the current row, from the database cursor, @param uid: the current user’s ID for security checks, @param ids: List of base calendar invite attendee’s IDs. @param context: A standard dictionary for contextual values @return: Dict... | defdo_invite(self,cr,uid,ids,context={}):"""Inviteattendeeformeeting..@paramcr:thecurrentrow,fromthedatabasecursor,@paramuid:thecurrentuser’sIDforsecuritychecks,@paramids:Listofbasecalendarinviteattendee’sIDs.@paramcontext:Astandarddictionaryforcontextualvalues@return:Dictionaryof{}."""fordatasinself.read(cr,uid,ids):m... | 468,964 |
def _send_mail(self, cr, uid, ids, mail_to, email_from=tools.config.get('email_from', False), context={}): """ send mail. @param cr: the current row, from the database cursor, @param uid: the current user’s ID for security checks, @param ids: List of calendar attendee’s IDs. @param context: A standard dictionary for co... | def_send_mail(self,cr,uid,ids,mail_to,email_from=tools.config.get('email_from',False),context={}):"""sendmail.@paramcr:thecurrentrow,fromthedatabasecursor,@paramuid:thecurrentuser’sIDforsecuritychecks,@paramids:Listofcalendarattendee’sIDs.@paramcontext:Astandarddictionaryforcontextualvalues@return:True"""company=self.p... | 468,965 |
def _stock_search(self, cr, uid, obj, name, args, context=None): """ Searches Ids of products @return: Ids of locations """ locations = self.pool.get('stock.location').search(cr, uid, [('usage', '=', 'internal')]) cr.execute('''select prodlot_id, sum(qty) from stock_report_prodlots where location_id IN %s group by prod... | def _stock_search(self, cr, uid, obj, name, args, context=None): """ Searches Ids of products @return: Ids of locations """ locations = self.pool.get('stock.location').search(cr, uid, [('usage', '=', 'internal')]) cr.execute('''select prodlot_id, sum(qty) from stock_report_prodlots where location_id IN %s group by prod... | 468,966 |
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,967 |
def get_default_menu(self, cr, uid, context=None): actions = self.pool.get('ir.actions.act_window') | def get_default_menu(self, cr, uid, context=None): actions = self.pool.get('ir.actions.act_window') | 468,968 |
def onchange_partner_id(self, cr, uid, ids, type, partner_id,\ date_invoice=False, payment_term=False, partner_bank_id=False, company_id=False): invoice_addr_id = False contact_addr_id = False partner_payment_term = False acc_id = False bank_id = False fiscal_position = False | def onchange_partner_id(self, cr, uid, ids, type, partner_id,\ date_invoice=False, payment_term=False, partner_bank_id=False, company_id=False): invoice_addr_id = False contact_addr_id = False partner_payment_term = False acc_id = False bank_id = False fiscal_position = False | 468,969 |
def move_line_id_payment_get(self, cr, uid, ids, *args): print '** la' if not ids: return [] result = self.move_line_id_payment_gets(cr, uid, ids, *args) return result.get(ids[0], []) | def move_line_id_payment_get(self, cr, uid, ids, *args): if not ids: return [] result = self.move_line_id_payment_gets(cr, uid, ids, *args) return result.get(ids[0], []) | 468,970 |
def move_line_id_payment_gets(self, cr, uid, ids, *args): print '** ICI' res = {} if not ids: return res cr.execute('SELECT i.id, l.id '\ 'FROM account_move_line l '\ 'LEFT JOIN account_invoice i ON (i.move_id=l.move_id) '\ 'WHERE i.id IN %s '\ 'AND l.account_id=i.account_id', (tuple(ids),)) for r in cr.fetchall(): res... | def move_line_id_payment_gets(self, cr, uid, ids, *args): res = {} if not ids: return res cr.execute('SELECT i.id, l.id '\ 'FROM account_move_line l '\ 'LEFT JOIN account_invoice i ON (i.move_id=l.move_id) '\ 'WHERE i.id IN %s '\ 'AND l.account_id=i.account_id', (tuple(ids),)) for r in cr.fetchall(): res.setdefault(r[0... | 468,971 |
def rg(ids, table, parent): if not ids: return [] ids2 = table.search(cr, uid, [(parent, 'in', ids)], context=context) return ids + rg(ids2, table, parent) | def rg(ids, table, parent): if not ids: return [] ids2 = table.search(cr, uid, [(parent, 'in', ids)], context=context) return ids + rg(ids2, table, parent) | 468,972 |
def _get_expression(field_obj,cr, uid, left, right, operator, context=None): if context is None: context = {} c = context.copy() c['active_test'] = False dict_op = {'not in':'!=','in':'='} if isinstance(right,tuple): right = list(right) if (not isinstance(right,list)) and operator in ['not in','in']: operator = dict_op... | if isinstance(right, basestring): c = context.copy() c['active_test'] = False dict_op = {'not in':'!=','in':'='} if isinstance(right,tuple): right = list(right) if (not isinstance(right,list)) and operator in ['not in','in']: operator = dict_op[operator] res_ids = field_obj.name_search(cr, uid, right, [], operator, li... | 468,973 |
def _get_expression(field_obj,cr, uid, left, right, operator, context=None): if context is None: context = {} c = context.copy() c['active_test'] = False dict_op = {'not in':'!=','in':'='} if isinstance(right,tuple): right = list(right) if (not isinstance(right,list)) and operator in ['not in','in']: operator = dict_op... | def _get_expression(field_obj,cr, uid, left, right, operator, context=None): if context is None: context = {} c = context.copy() c['active_test'] = False res_ids = field_obj.name_search(cr, uid, right, [], operator, limit=None, context=c) if not res_ids: return ('id','=',0) else: right = map(lambda x: x[0], res_ids) re... | 468,974 |
def _get_expression(field_obj,cr, uid, left, right, operator, context=None): if context is None: context = {} c = context.copy() c['active_test'] = False dict_op = {'not in':'!=','in':'='} if isinstance(right,tuple): right = list(right) if (not isinstance(right,list)) and operator in ['not in','in']: operator = dict_op... | def _get_expression(field_obj,cr, uid, left, right, operator, context=None): if context is None: context = {} c = context.copy() c['active_test'] = False dict_op = {'not in':'!=','in':'='} if isinstance(right,tuple): right = list(right) if (not isinstance(right,list)) and operator in ['not in','in']: operator = dict_op... | 468,975 |
def _get_expression(field_obj,cr, uid, left, right, operator, context=None): if context is None: context = {} c = context.copy() c['active_test'] = False dict_op = {'not in':'!=','in':'='} if isinstance(right,tuple): right = list(right) if (not isinstance(right,list)) and operator in ['not in','in']: operator = dict_op... | def _get_expression(field_obj,cr, uid, left, right, operator, context=None): if context is None: context = {} c = context.copy() c['active_test'] = False dict_op = {'not in':'!=','in':'='} if isinstance(right,tuple): right = list(right) if (not isinstance(right,list)) and operator in ['not in','in']: operator = dict_op... | 468,976 |
def _get_log_ids(self, cr, uid, ids, field_names, arg, context={}): result = {} history_obj = False model_obj = self.pool.get('ir.model') if 'history_line' in field_names: history_obj = self.pool.get('crm.case.history') name = 'history_line' if 'log_ids' in field_names: history_obj = self.pool.get('crm.case.log') name ... | def _get_log_ids(self, cr, uid, ids, field_names, arg, context={}): result = {} history_obj = False model_obj = self.pool.get('ir.model') if 'history_line' in field_names: history_obj = self.pool.get('crm.case.history') name = 'history_line' if 'log_ids' in field_names: history_obj = self.pool.get('crm.case.log') name ... | 468,977 |
def _lang_get(self, cr, uid, context={}): obj = self.pool.get('res.lang') ids = obj.search(cr, uid, []) res = obj.read(cr, uid, ids, ['code', 'name'], context) res = [(r['code'], r['name']) for r in res] return res | def _lang_get(self, cr, uid, context={}): obj = self.pool.get('res.lang') ids = obj.search(cr, uid, [('translatable','=',True)]) res = obj.read(cr, uid, ids, ['code', 'name'], context) res = [(r['code'], r['name']) for r in res] return res | 468,978 |
def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False, submenu=False): """ Changes the view dynamically @param self: The object pointer. @param cr: A database cursor @param uid: ID of the user currently logged in @param context: A standard dictionary @return: New arch of view. "... | def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False, submenu=False): """ Changes the view dynamically @param self: The object pointer. @param cr: A database cursor @param uid: ID of the user currently logged in @param context: A standard dictionary @return: New arch of view. "... | 468,979 |
def _update_check(self, cr, uid, ids, context={}): done = {} for line in self.browse(cr, uid, ids, context): if line.move_id.state <> 'draft': raise osv.except_osv(_('Error !'), _('You can not do this modification on a confirmed entry ! Please note that you can just change some non important fields !')) if line.reconci... | def _update_check(self, cr, uid, ids, context={}): done = {} for line in self.browse(cr, uid, ids, context): if line.move_id.state <> 'draft' and (not line.journal_id.entry_posted): raise osv.except_osv(_('Error !'), _('You can not do this modification on a confirmed entry ! Please note that you can just change some no... | 468,980 |
def _get_company(self,cr, uid, context={}, uid2=False): if not uid2: uid2 = uid user = self.pool.get('res.users').browse(cr, uid, uid2, context) return user.company_id.id | def _get_company(self,cr, uid, context={}, uid2=False): if not uid2: uid2 = uid user = self.pool.get('res.users').browse(cr, uid, uid2, context) return user.company_id.id | 468,981 |
def context_get(self, cr, uid, context=None): user = self.browse(cr, uid, uid, context) result = {} for k in self._columns.keys(): if k.startswith('context_'): res = getattr(user,k) if isinstance(res, browse_record): res = res.id result[k[8:]] = res return result | def context_get(self, cr, uid, context=None): user = self.browse(cr, uid, uid, context) result = {} for k in self._columns.keys(): if k.startswith('context_'): res = getattr(user,k) or False if isinstance(res, browse_record): res = res.id result[k[8:]] = res return result | 468,982 |
def context_get(self, cr, uid, context=None): user = self.browse(cr, uid, uid, context) result = {} for k in self._columns.keys(): if k.startswith('context_'): res = getattr(user,k) if isinstance(res, browse_record): res = res.id result[k[8:]] = res return result | def context_get(self, cr, uid, context=None): user = self.browse(cr, uid, uid, context) result = {} for k in self._columns.keys(): if k.startswith('context_'): res = getattr(user,k) if isinstance(res, browse_record): res = res.id result[k[8:]] = res return result | 468,983 |
def context_get(self, cr, uid, context=None): user = self.browse(cr, uid, uid, context) result = {} for k in self._columns.keys(): if k.startswith('context_'): res = getattr(user,k) if isinstance(res, browse_record): res = res.id result[k[8:]] = res return result | defcontext_get(self,cr,uid,context=None):user=self.browse(cr,uid,uid,context)result={}forkinself._columns.keys():ifk.startswith('context_'):res=getattr(user,k)ifisinstance(res,browse_record):res=res.idresult[k[8:]]=resreturnresult | 468,984 |
def login(self, db, login, password): if not password: return False cr = pooler.get_db(db).cursor() cr.execute('select id from res_users where login=%s and password=%s and active', (tools.ustr(login), tools.ustr(password))) res = cr.fetchone() cr.close() if res: return res[0] else: return False | def login(self, db, login, password): if not password: return False cr = pooler.get_db(db).cursor() cr.execute('select id from res_users where login=%s and password=%s and active', (tools.ustr(login), tools.ustr(password))) res = cr.fetchone() cr.close() if res: return res[0] else: return False | 468,985 |
def check(self, db, uid, passwd): if not passwd: return False cached_pass = self._uid_cache.get(db, {}).get(uid) if (cached_pass is not None) and cached_pass == passwd: return True cr = pooler.get_db(db).cursor() cr.execute('select count(1) from res_users where id=%s and password=%s and active=%s', (int(uid), passwd, T... | def check(self, db, uid, passwd): if not passwd: return False cached_pass = self._uid_cache.get(db, {}).get(uid) if (cached_pass is not None) and cached_pass == passwd: return True cr = pooler.get_db(db).cursor() cr.execute('select count(1) from res_users where id=%s and password=%s and active=%s', (int(uid), passwd, T... | 468,986 |
def access(self, db, uid, passwd, sec_level, ids): if not passwd: return False cr = pooler.get_db(db).cursor() cr.execute('select id from res_users where id=%s and password=%s', (uid, passwd)) res = cr.fetchone() cr.close() if not res: raise security.ExceptionNoTb('Bad username or password') return res[0] | def access(self, db, uid, passwd, sec_level, ids): if not passwd: return False cr = pooler.get_db(db).cursor() cr.execute('select id from res_users where id=%s and password=%s', (uid, passwd)) res = cr.fetchone() cr.close() if not res: raise security.ExceptionNoTb('Bad username or password') return res[0] | 468,987 |
def access(self, db, uid, passwd, sec_level, ids): if not passwd: return False cr = pooler.get_db(db).cursor() cr.execute('select id from res_users where id=%s and password=%s', (uid, passwd)) res = cr.fetchone() cr.close() if not res: raise security.ExceptionNoTb('Bad username or password') return res[0] | def access(self, db, uid, passwd, sec_level, ids): if not passwd: return False cr = pooler.get_db(db).cursor() cr.execute('select id from res_users where id=%s and password=%s', (uid, passwd)) res = cr.fetchone() cr.close() if not res: raise security.ExceptionNoTb('Bad username or password') return res[0] | 468,988 |
def move_to(self, cr, ndir_node, new_name=False, fil_obj=None, ndir_obj=None, in_write=False): """ Move directory. This operation is simple, since the present node is only used for static, simple directories. Note /may/ be called with ndir_node = None, to rename the document root. """ if ndir_node and (ndir_node.contex... | def move_to(self, cr, ndir_node, new_name=False, fil_obj=None, ndir_obj=None, in_write=False): """ Move directory. This operation is simple, since the present node is only used for static, simple directories. Note /may/ be called with ndir_node = None, to rename the document root. """ if ndir_node and (ndir_node.contex... | 468,989 |
def move_to(self, cr, ndir_node, new_name=False, fil_obj=None, ndir_obj=None, in_write=False): if ndir_node.context != self.context: raise NotImplementedError("Cannot move files between contexts") | def move_to(self, cr, ndir_node, new_name=False, fil_obj=None, ndir_obj=None, in_write=False): if ndir_node and ndir_node.context != self.context: raise NotImplementedError("Cannot move files between contexts") | 468,990 |
def move_to(self, cr, ndir_node, new_name=False, fil_obj=None, ndir_obj=None, in_write=False): if ndir_node.context != self.context: raise NotImplementedError("Cannot move files between contexts") | def move_to(self, cr, ndir_node, new_name=False, fil_obj=None, ndir_obj=None, in_write=False): if ndir_node.context != self.context: raise NotImplementedError("Cannot move files between contexts") | 468,991 |
def move_to(self, cr, ndir_node, new_name=False, fil_obj=None, ndir_obj=None, in_write=False): if ndir_node.context != self.context: raise NotImplementedError("Cannot move files between contexts") | def move_to(self, cr, ndir_node, new_name=False, fil_obj=None, ndir_obj=None, in_write=False): if ndir_node.context != self.context: raise NotImplementedError("Cannot move files between contexts") | 468,992 |
def _get_log_ids(self, cr, uid, ids, field_names, arg, context=None): """Gets id for case log from history of particular case @param self: The object pointer @param cr: the current row, from the database cursor, @param uid: the current user’s ID for security checks, @param ids: List of Case IDs @param context: A standa... | def _get_log_ids(self, cr, uid, ids, field_names, arg, context=None): """Gets id for case log from history of particular case @param self: The object pointer @param cr: the current row, from the database cursor, @param uid: the current user’s ID for security checks, @param ids: List of Case IDs @param context: A standa... | 468,993 |
def check_move_cancel(self, cr, uid, ids, context={}): """ Checks if move is cancelled or not. @return: True or False. """ return all(procurement.move_id.state != 'cancel' for procurement in self.browse(cr, uid, ids)) | def check_move_cancel(self, cr, uid, ids, context={}): """ Checks if move is cancelled or not. @return: True or False. """ return all(procurement.move_id.state != 'cancel' for procurement in self.browse(cr, uid, ids)) | 468,994 |
def default_get(self, cr, uid, fields, context=None): """ Get default values @param self: The object pointer. @param cr: A database cursor @param uid: ID of the user currently logged in @param fields: List of fields for default value @param context: A standard dictionary @return: default values of fields """ res = s... | def default_get(self, cr, uid, fields, context=None): """ Get default values @param self: The object pointer. @param cr: A database cursor @param uid: ID of the user currently logged in @param fields: List of fields for default value @param context: A standard dictionary @return: default values of fields """ res = s... | 468,995 |
def _compute(self, cr, uid, ids, context=None): res = {} if not ids: return res for phase in self.browse(cr, uid, ids, context=context): tot = 0.0 for task in phase.task_ids: tot += task.planned_hours res[phase.id] = { 'total_hours' : tot } return res | def _compute(self, cr, uid, ids,field_name, arg, context=None): res = {} if not ids: return res for phase in self.browse(cr, uid, ids, context=context): tot = 0.0 for task in phase.task_ids: tot += task.planned_hours res[phase.id] = { 'total_hours' : tot } return res | 468,996 |
def _compute(self, cr, uid, ids, context=None): res = {} if not ids: return res for phase in self.browse(cr, uid, ids, context=context): tot = 0.0 for task in phase.task_ids: tot += task.planned_hours res[phase.id] = { 'total_hours' : tot } return res | def _compute(self, cr, uid, ids, context=None): res = {} if not ids: return res for phase in self.browse(cr, uid, ids, context=context): tot = 0.0 for task in phase.task_ids: tot += task.planned_hours res[phase.id] = tot return res | 468,997 |
def create(self, cr, uid, ids, datas, context=None): if not context: context={} self.context = context pool = pooler.get_pool(cr.dbname) model = pool.get(datas['model']) model_id = pool.get('ir.model').search(cr, uid, [('model','=',model._name)]) if model_id: model_desc = pool.get('ir.model').browse(cr, uid, model_id[0... | def create(self, cr, uid, ids, datas, context=None): if not context: context={} self.context = context pool = pooler.get_pool(cr.dbname) model = pool.get(datas['model']) model_id = pool.get('ir.model').search(cr, uid, [('model','=',model._name)]) if model_id: model_desc = pool.get('ir.model').browse(cr, uid, model_id[0... | 468,998 |
def get_id(self, xml_id): if not xml_id: raise YamlImportException("The xml_id should be a non empty string.") if isinstance(xml_id, types.IntType): id = xml_id elif xml_id in self.id_map: id = self.id_map[xml_id] else: if '.' in xml_id: module, checked_xml_id = xml_id.split('.', 1) else: module = self.module checked_x... | def get_id(self, xml_id): if not xml_id: raise YamlImportException("The xml_id should be a non empty string.") if isinstance(xml_id, types.IntType): id = xml_id elif xml_id in self.id_map: id = self.id_map[xml_id] else: if '.' in xml_id: module, checked_xml_id = xml_id.split('.', 1) else: module = self.module checked_x... | 468,999 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.