rem stringlengths 1 322k | add stringlengths 0 2.05M | context stringlengths 4 228k | meta stringlengths 156 215 |
|---|---|---|---|
if res_obj and len(res_obj): res_obj = res_obj[0] | def _send_mail(self, cr, uid, ids, mail_to, email_from=tools.config.get('email_from', False), context={}): company = self.pool.get('res.users').browse(cr, uid, uid, context=context).company_id.name for att in self.browse(cr, uid, ids, context=context): sign = att.sent_by_uid and att.sent_by_uid.signature or '' sign = '... | 0cac3f59979db983cf71b8f3ad0544f8d2c024d4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/0cac3f59979db983cf71b8f3ad0544f8d2c024d4/base_calendar.py | |
other_invitaion_ids = self.search(cr, uid, [('ref','=',att.ref)]) | other_invitaion_ids = self.search(cr, uid, [('ref','=', att.ref._name + ',' + str(att.ref.id))]) | def _send_mail(self, cr, uid, ids, mail_to, email_from=tools.config.get('email_from', False), context={}): company = self.pool.get('res.users').browse(cr, uid, uid, context=context).company_id.name for att in self.browse(cr, uid, ids, context=context): sign = att.sent_by_uid and att.sent_by_uid.signature or '' sign = '... | 0cac3f59979db983cf71b8f3ad0544f8d2c024d4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/0cac3f59979db983cf71b8f3ad0544f8d2c024d4/base_calendar.py |
if domain is not None: | if vids: | def _get_by_id(self, obj, cr, uid, prop_name, ids, context=None): prop = obj.pool.get('ir.property') vids = [obj._name + ',' + str(oid) for oid in ids] | 50985408b62a1505e09e698c72937e1f5431aad9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/50985408b62a1505e09e698c72937e1f5431aad9/fields.py |
return prop.search(cr, uid, domain, context=context) else: return [] | return prop.search(cr, uid, domain, context=context) | def _get_by_id(self, obj, cr, uid, prop_name, ids, context=None): prop = obj.pool.get('ir.property') vids = [obj._name + ',' + str(oid) for oid in ids] | 50985408b62a1505e09e698c72937e1f5431aad9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/50985408b62a1505e09e698c72937e1f5431aad9/fields.py |
self._logger.info("Exported service registered: %s" % name) | self._logger.debug("Registered an exported service: %s" % name) | def __init__(self, name, audience=''): ExportService._services[name] = self self.__name = name self._logger.info("Exported service registered: %s" % name) | e69414c7ec6d172603068a3f1f5744475bafb84d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/e69414c7ec6d172603068a3f1f5744475bafb84d/netsvc.py |
rec_line_data = property_obj.read(cr,uid,rec_pro_id,['name','value','res_id']) pay_line_data = property_obj.read(cr,uid,pay_pro_id,['name','value','res_id']) rec_res_id = rec_line_data and int(rec_line_data[0]['value'].split(',')[1]) or False pay_res_id = pay_line_data and int(pay_line_data[0]['value'].split(',')[1]) o... | rec_line_data = property_obj.read(cr,uid,rec_pro_id,['name','value_reference','res_id']) pay_line_data = property_obj.read(cr,uid,pay_pro_id,['name','value_reference','res_id']) rec_res_id = rec_line_data and rec_line_data[0].get('value_reference',False) and int(rec_line_data[0]['value_reference'].split(',')[1]) or Fal... | 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 | 476c000425262c0640ebac9e4fc0faacdf420183 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/476c000425262c0640ebac9e4fc0faacdf420183/invoice.py |
rec_line_data = property_obj.read(cr, uid, rec_pro_id, ['name','value','res_id']) pay_line_data = property_obj.read(cr, uid, pay_pro_id, ['name','value','res_id']) rec_res_id = rec_line_data and int(rec_line_data[0]['value'].split(',')[1]) or False pay_res_id = pay_line_data and int(pay_line_data[0]['value'].split(',')... | rec_line_data = property_obj.read(cr, uid, rec_pro_id, ['name','value_reference','res_id']) pay_line_data = property_obj.read(cr, uid, pay_pro_id, ['name','value_reference','res_id']) rec_res_id = rec_line_data and rec_line_data[0].get('value_reference',False) and int(rec_line_data[0]['value_reference'].split(',')[1]) ... | 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... | 476c000425262c0640ebac9e4fc0faacdf420183 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/476c000425262c0640ebac9e4fc0faacdf420183/invoice.py |
app_acc_in = account_obj.browse(cr, uid, in_pro_id)[0] | my_value = property_obj.read(cr,uid,in_pro_id,['name','value_reference','res_id']) account_id = int (my_value[0]["value_reference"].split(",")[1]) app_acc_in = account_obj.browse(cr, uid, [account_id])[0] | 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... | 476c000425262c0640ebac9e4fc0faacdf420183 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/476c000425262c0640ebac9e4fc0faacdf420183/invoice.py |
t = payment.mode and payment.mode.type.id or None | t = None | def create_payment(self, cr, uid, ids, context=None): order_obj = self.pool.get('payment.order') line_obj = self.pool.get('account.move.line') payment_obj = self.pool.get('payment.line') if context is None: context = {} data = self.read(cr, uid, ids, [])[0] line_ids = data['entries'] if not line_ids: return {} | 05b5623cd9dcfa532f2f17d5021aca5dfd329805 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/05b5623cd9dcfa532f2f17d5021aca5dfd329805/account_payment_order.py |
'depends': [dep.name for dep in module.dependencies_id], | 'depends': [dep.name for dep in module.dependencies_id if self.search(cr, uid, [ ('name', '=', dep.name), ('web', '=', True) ], context=context)], | def get_web(self, cr, uid, names, context=False): """ get_web(cr, uid, [module_name], context) -> [{name, depends, content}] | 5577f2bc4ac052738be132d9368a6c22a27baf5a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/5577f2bc4ac052738be132d9368a6c22a27baf5a/module.py |
company_data = self.pool.get('base.setup.company').read(cr, uid, company_id)[0] | company_data = self.pool.get('base.setup.company').read(cr, uid, company_id) company_data = company_data and company_data[0] | def execute(self, cr, uid, ids, context=None): company_id = self.pool.get('base.setup.company').search(cr, uid, []) company_data = self.pool.get('base.setup.company').read(cr, uid, company_id)[0] country1 = '' if company_data.get('country_id', False): country = self.pool.get('res.country').read(cr, uid, company_data['c... | c3a9e1c4ddf5a96e2a6fe3e80481d924cda68a4d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/c3a9e1c4ddf5a96e2a6fe3e80481d924cda68a4d/gtk_contact_form.py |
self.assert_report.record(False, severity) self.logger.log(severity, msg, *args) if severity >= config['assert_exit_level']: raise YamlImportAbortion('Severe assertion failure (%s), aborting.' % logging.getLevelName(severity)) | if isinstance(severity, types.StringTypes): levelname = severity.strip().upper() level = logging.getLevelName(levelname) else: level = severity levelname = logging.getLevelName(level) self.assert_report.record(False, levelname) self.logger.log(level, msg, *args) if level >= config['assert_exit_level']: raise YamlImport... | def _log_assert_failure(self, severity, msg, *args): self.assert_report.record(False, severity) self.logger.log(severity, msg, *args) if severity >= config['assert_exit_level']: raise YamlImportAbortion('Severe assertion failure (%s), aborting.' % logging.getLevelName(severity)) return | 41fc8c369af3cb3562b6ce44e333befda15837c8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/41fc8c369af3cb3562b6ce44e333befda15837c8/yaml_import.py |
wiz_id = execute(conn,'create',dbname, uid, pwd, 'module.lang.import') | wiz_id = execute(conn,'create',dbname, uid, pwd, 'base.language.import') | def import_translate(uri, user, pwd, dbname, translate_in): uid = login(uri, dbname, user, pwd) if uid: conn = xmlrpclib.ServerProxy(uri + '/xmlrpc/wizard') wiz_id = execute(conn,'create',dbname, uid, pwd, 'module.lang.import') for trans_in in translate_in: lang,ext = os.path.splitext(trans_in.split('/')[-1]) state = '... | acfeaf908f0878500cfecf498c987f60e3aa1933 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/acfeaf908f0878500cfecf498c987f60e3aa1933/base_quality_interrogation.py |
'user_type' : 'existing' | 'user_type' : 'existing', 'domain': '[]', 'access_mode': 'readonly' | def generate_random_pass(): pass_chars = RANDOM_PASS_CHARACTERS[:] random.shuffle(pass_chars) return ''.join(pass_chars[0:10]) | ed4f2f3f1ea49ce5193367036970bb0e0c3381f5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/ed4f2f3f1ea49ce5193367036970bb0e0c3381f5/wizard_share.py |
'new_user': this.new_user | 'new_user': this.new_user, 'domain': this.domain, 'access_mode': this.access_mode, 'action_id': this.action_id and this.action_id.id or False | def do_step_2(self, cr, uid, ids, context=None): """ This action to excute step 2 """ if not context: context = {} | ed4f2f3f1ea49ce5193367036970bb0e0c3381f5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/ed4f2f3f1ea49ce5193367036970bb0e0c3381f5/wizard_share.py |
share_group_name = '%s:[%d]%s' %(_('Sharing'), active_id, active_model) group_id = group_obj.create(cr, uid, {'name': share_group_name, 'share_group': True}) | share_group_name = '%s: %s: %d' %('Sharing', active_model, active_id) group_ids = group_obj.search(cr, uid, [('name','=',share_group_name)]) group_id = group_ids and group_ids[0] or False if not group_id: group_id = group_obj.create(cr, uid, {'name': share_group_name, 'share_group': True}) else: group = group_obj.brows... | def do_step_3(self, cr, uid, ids, context=None): """ This action to excute step 3 """ if not context: context = {} group_obj = self.pool.get('res.groups') user_obj = self.pool.get('res.users') fields_obj = self.pool.get('ir.model.fields') model_access_obj = self.pool.get('ir.model.access') model_obj = self.pool.get('... | ed4f2f3f1ea49ce5193367036970bb0e0c3381f5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/ed4f2f3f1ea49ce5193367036970bb0e0c3381f5/wizard_share.py |
'password': _generate_random_number(), | 'password': password, | def do_step_3(self, cr, uid, ids, context=None): """ This action to excute step 3 """ if not context: context = {} group_obj = self.pool.get('res.groups') user_obj = self.pool.get('res.users') fields_obj = self.pool.get('ir.model.fields') model_access_obj = self.pool.get('ir.model.access') model_obj = self.pool.get('... | ed4f2f3f1ea49ce5193367036970bb0e0c3381f5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/ed4f2f3f1ea49ce5193367036970bb0e0c3381f5/wizard_share.py |
user_ids.append(user_id) | user_ids.append(user_id) | def do_step_3(self, cr, uid, ids, context=None): """ This action to excute step 3 """ if not context: context = {} group_obj = self.pool.get('res.groups') user_obj = self.pool.get('res.users') fields_obj = self.pool.get('ir.model.fields') model_access_obj = self.pool.get('ir.model.access') model_obj = self.pool.get('... | ed4f2f3f1ea49ce5193367036970bb0e0c3381f5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/ed4f2f3f1ea49ce5193367036970bb0e0c3381f5/wizard_share.py |
obj0 = model_obj.browse(cr, uid, active_model_id, context=context) def _get_relation(model, ttypes): obj = [] field_ids = fields_obj.search(cr, uid, [('model','=',model),('ttype','in', ttypes)]) for field in fields_obj.browse(cr, uid, field_ids, context=context): for ttype in ttypes: if ttype in ('one2many', 'many2many... | def _get_relation(model_id, ttypes, new_obj=[]): obj = [] models = map(lambda x:x[1].model, new_obj) field_ids = fields_obj.search(cr, uid, [('model_id','=',model_id),('ttype','in', ttypes)]) for field in fields_obj.browse(cr, uid, field_ids, context=context): if field.relation not in models: relation_model_ids = mode... | def do_step_3(self, cr, uid, ids, context=None): """ This action to excute step 3 """ if not context: context = {} group_obj = self.pool.get('res.groups') user_obj = self.pool.get('res.users') fields_obj = self.pool.get('ir.model.fields') model_access_obj = self.pool.get('ir.model.access') model_obj = self.pool.get('... | ed4f2f3f1ea49ce5193367036970bb0e0c3381f5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/ed4f2f3f1ea49ce5193367036970bb0e0c3381f5/wizard_share.py |
obj1 = _get_relation(active_model, ['one2many']) obj2 = _get_relation(active_model, ['one2many', 'many2many']) obj3 = _get_relation(active_model, ['many2one']) | obj0 = model_obj.browse(cr, uid, active_model_id, context=context) obj1 = _get_relation(active_model_id, ['one2many']) obj2 = _get_relation(active_model_id, ['one2many', 'many2many']) obj3 = _get_relation(active_model_id, ['many2one']) | def _get_relation(model, ttypes): obj = [] field_ids = fields_obj.search(cr, uid, [('model','=',model),('ttype','in', ttypes)]) for field in fields_obj.browse(cr, uid, field_ids, context=context): for ttype in ttypes: if ttype in ('one2many', 'many2many'): obj += _get_relation(field.relation, [ttype]) if field.model_id... | ed4f2f3f1ea49ce5193367036970bb0e0c3381f5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/ed4f2f3f1ea49ce5193367036970bb0e0c3381f5/wizard_share.py |
obj3 += _get_relation(model.model, ['many2one']) | obj3 += _get_relation(model.id, ['many2one']) | def _get_relation(model, ttypes): obj = [] field_ids = fields_obj.search(cr, uid, [('model','=',model),('ttype','in', ttypes)]) for field in fields_obj.browse(cr, uid, field_ids, context=context): for ttype in ttypes: if ttype in ('one2many', 'many2many'): obj += _get_relation(field.relation, [ttype]) if field.model_id... | ed4f2f3f1ea49ce5193367036970bb0e0c3381f5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/ed4f2f3f1ea49ce5193367036970bb0e0c3381f5/wizard_share.py |
'name': '%s-%s'%(group_name, obj0.model), | 'name': '%s-%s'%(share_group_name, obj0.model), | def _get_relation(model, ttypes): obj = [] field_ids = fields_obj.search(cr, uid, [('model','=',model),('ttype','in', ttypes)]) for field in fields_obj.browse(cr, uid, field_ids, context=context): for ttype in ttypes: if ttype in ('one2many', 'many2many'): obj += _get_relation(field.relation, [ttype]) if field.model_id... | ed4f2f3f1ea49ce5193367036970bb0e0c3381f5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/ed4f2f3f1ea49ce5193367036970bb0e0c3381f5/wizard_share.py |
'name': '%s-%s'%(group_name, model.model), | 'name': '%s-%s'%(share_group_name, model.model), | def _get_relation(model, ttypes): obj = [] field_ids = fields_obj.search(cr, uid, [('model','=',model),('ttype','in', ttypes)]) for field in fields_obj.browse(cr, uid, field_ids, context=context): for ttype in ttypes: if ttype in ('one2many', 'many2many'): obj += _get_relation(field.relation, [ttype]) if field.model_id... | ed4f2f3f1ea49ce5193367036970bb0e0c3381f5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/ed4f2f3f1ea49ce5193367036970bb0e0c3381f5/wizard_share.py |
'group_ids': [(6,0,[group_id])] | 'groups': [(6,0,[group_id])] | def _get_relation(model, ttypes): obj = [] field_ids = fields_obj.search(cr, uid, [('model','=',model),('ttype','in', ttypes)]) for field in fields_obj.browse(cr, uid, field_ids, context=context): for ttype in ttypes: if ttype in ('one2many', 'many2many'): obj += _get_relation(field.relation, [ttype]) if field.model_id... | ed4f2f3f1ea49ce5193367036970bb0e0c3381f5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/ed4f2f3f1ea49ce5193367036970bb0e0c3381f5/wizard_share.py |
context['share_model'] = active_model context['share_rec_id'] = active_id | def _get_relation(model, ttypes): obj = [] field_ids = fields_obj.search(cr, uid, [('model','=',model),('ttype','in', ttypes)]) for field in fields_obj.browse(cr, uid, field_ids, context=context): for ttype in ttypes: if ttype in ('one2many', 'many2many'): obj += _get_relation(field.relation, [ttype]) if field.model_id... | ed4f2f3f1ea49ce5193367036970bb0e0c3381f5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/ed4f2f3f1ea49ce5193367036970bb0e0c3381f5/wizard_share.py | |
new_user_ids = context.get('new_user_ids', []) | new_user_ids = context.get('new_user_ids', []) share_model = context.get('share_model', False) share_rec_id = context.get('share_rec_id', False) | def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False,submenu=False): result = super(share_result, self).fields_view_get(cr, uid, view_id, view_type, context, toolbar,submenu) user_obj = self.pool.get('res.users') data_obj = self.pool.get('ir.model.data') existing_user_ids = con... | ed4f2f3f1ea49ce5193367036970bb0e0c3381f5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/ed4f2f3f1ea49ce5193367036970bb0e0c3381f5/wizard_share.py |
_fields = result['fields'] send_email_act = data_obj._get_id(cr, uid, 'base', 'share_email_act') send_email_act_id = data_obj.browse(cr, uid, send_email_act, context=context).res_id | _fields = result['fields'] | def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False,submenu=False): result = super(share_result, self).fields_view_get(cr, uid, view_id, view_type, context, toolbar,submenu) user_obj = self.pool.get('res.users') data_obj = self.pool.get('ir.model.data') existing_user_ids = con... | ed4f2f3f1ea49ce5193367036970bb0e0c3381f5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/ed4f2f3f1ea49ce5193367036970bb0e0c3381f5/wizard_share.py |
<group colspan="4" col="10"> | <group colspan="4" col="7"> | def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False,submenu=False): result = super(share_result, self).fields_view_get(cr, uid, view_id, view_type, context, toolbar,submenu) user_obj = self.pool.get('res.users') data_obj = self.pool.get('ir.model.data') existing_user_ids = con... | ed4f2f3f1ea49ce5193367036970bb0e0c3381f5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/ed4f2f3f1ea49ce5193367036970bb0e0c3381f5/wizard_share.py |
<button name="%s" string="send_email" type="action" icon="gtk-apply" context="{'user_id':%s, 'user_type':'new', 'share_url': user%s_url}"/> """%(user.id, user.id, user.id, send_email_act_id, user.id, user.id) | <button name="do_send_email" string="Send Email" type="object" icon="gtk-apply" context="{'user_id':%s, 'user_type':'new', 'share_url': user%s_url}"/> """%(user.id, user.id, user.id, user.id, user.id) | def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False,submenu=False): result = super(share_result, self).fields_view_get(cr, uid, view_id, view_type, context, toolbar,submenu) user_obj = self.pool.get('res.users') data_obj = self.pool.get('ir.model.data') existing_user_ids = con... | ed4f2f3f1ea49ce5193367036970bb0e0c3381f5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/ed4f2f3f1ea49ce5193367036970bb0e0c3381f5/wizard_share.py |
<group colspan="4" col="10"> | <group colspan="4" col="5"> | def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False,submenu=False): result = super(share_result, self).fields_view_get(cr, uid, view_id, view_type, context, toolbar,submenu) user_obj = self.pool.get('res.users') data_obj = self.pool.get('ir.model.data') existing_user_ids = con... | ed4f2f3f1ea49ce5193367036970bb0e0c3381f5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/ed4f2f3f1ea49ce5193367036970bb0e0c3381f5/wizard_share.py |
<button name="%s" string="send_email" type="action" icon="gtk-apply" context="{'user_id':%s, 'user_type':'existing', 'share_url': user%s_url}"/> """%(user.id, user.id, user.id, send_email_act_id, user.id, user.id) | <button name="do_send_email" string="Send Email" type="object" icon="gtk-apply" context="{'user_id':%s, 'user_type':'existing', 'share_url': user%s_url, 'share_model': %s, 'share_rec_id': %s }"/> """%(user.id, user.id, user.id, user.id, share_model, share_rec_id) | def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False,submenu=False): result = super(share_result, self).fields_view_get(cr, uid, view_id, view_type, context, toolbar,submenu) user_obj = self.pool.get('res.users') data_obj = self.pool.get('ir.model.data') existing_user_ids = con... | ed4f2f3f1ea49ce5193367036970bb0e0c3381f5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/ed4f2f3f1ea49ce5193367036970bb0e0c3381f5/wizard_share.py |
res['user%s_url'%(user.id)] = tools.config('share_root_url', False) | res['user%s_url'%(user.id)] = tools.config.get('share_root_url', False) | def default_get(self, cr, uid, fields, context=None): """ To get default values for the object. @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 which we want default values @param context: A standard dictionary @return: A d... | ed4f2f3f1ea49ce5193367036970bb0e0c3381f5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/ed4f2f3f1ea49ce5193367036970bb0e0c3381f5/wizard_share.py |
res['user%s_url'%(user.id)] = tools.config('share_root_url', False) | res['user%s_url'%(user.id)] = tools.config.get('share_root_url', False) | def default_get(self, cr, uid, fields, context=None): """ To get default values for the object. @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 which we want default values @param context: A standard dictionary @return: A d... | ed4f2f3f1ea49ce5193367036970bb0e0c3381f5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/ed4f2f3f1ea49ce5193367036970bb0e0c3381f5/wizard_share.py |
class share_email(osv.osv_memory): _name = 'share.email' _description = 'share email' _columns = { 'email_to': fields.char('To', size=64, readonly=True), 'subject': fields.char('Subject', size=64, required=True), 'body': fields.text('Body', required=True), } def default_get(self, cr, uid, fields, context=None): """ To... | def default_get(self, cr, uid, fields, context=None): """ To get default values for the object. @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 which we want default values @param context: A standard dictionary @return: A d... | ed4f2f3f1ea49ce5193367036970bb0e0c3381f5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/ed4f2f3f1ea49ce5193367036970bb0e0c3381f5/wizard_share.py | |
'reference': fields.char('Ref | 'reference': fields.char('Ref | def _get_partner(self, cr, uid, context={}): return context.get('partner_id', False) | 31bfb558931550b124d26a5d94eaebdb6c55daed /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/31bfb558931550b124d26a5d94eaebdb6c55daed/voucher.py |
'context' : context | 'context' : context, 'nodestroy':True, | def action_print_survey(self, cr, uid, ids, context=None): """ If response is available then print this response otherwise print survey form(print template of the survey). @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 ... | 9efa15363196a60d2b14e53fa7edc931a815d6d0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/9efa15363196a60d2b14e53fa7edc931a815d6d0/survey.py |
'context' : context | 'context' : context, 'nodestroy':True, | def action_print_survey(self, cr, uid, ids, context=None): """ If response is available then print this response otherwise print survey form(print template of the survey). @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 ... | 9efa15363196a60d2b14e53fa7edc931a815d6d0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/9efa15363196a60d2b14e53fa7edc931a815d6d0/survey.py |
dt=DateTime.strptime(order.date_order, '%Y-%m-%d') + DateTime.RelativeDateTime(days=line.delay or 0.0) | dt = datetime.strptime(order.date_order, '%Y-%m-%d') + relativedelta(days=line.delay or 0.0) | def _get_commitment_date(self, cr, uid, ids, name, arg, context={}): res = {} dates_list = [] for order in self.browse(cr, uid, ids): dates_list = [] for line in order.order_line: dt=DateTime.strptime(order.date_order, '%Y-%m-%d') + DateTime.RelativeDateTime(days=line.delay or 0.0) dt_s = dt.strftime('%Y-%m-%d') dates_... | 248682874623c36a5b83302d6c13f363ecafaa77 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/248682874623c36a5b83302d6c13f363ecafaa77/sale_order_dates.py |
gw= obj_payment_order.get_wizard(t) | gw = obj_payment_order.get_wizard(t) | def launch_wizard(self, cr, uid, ids, context=None): """ Search for a wizard to launch according to the type. If type is manual. just confirm the order. """ obj_payment_order = self.pool.get('payment.order') obj_model = self.pool.get('ir.model.data') obj_act = self.pool.get('ir.actions.act_window') order= obj_payment_o... | 7a830f90045fe231d8b77a88d7d1d93e64cf9bbb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/7a830f90045fe231d8b77a88d7d1d93e64cf9bbb/account_payment_pay.py |
result = mod_obj._get_id(cr, uid, module, wizard) id = mod_obj.read(cr, uid, [result], ['res_id'])[0]['res_id'] return act_obj.read(cr, uid, [id])[0] | result = obj_model._get_id(cr, uid, module, wizard) id = obj_model.read(cr, uid, [result], ['res_id'])[0]['res_id'] return obj_act.read(cr, uid, [id])[0] | def launch_wizard(self, cr, uid, ids, context=None): """ Search for a wizard to launch according to the type. If type is manual. just confirm the order. """ obj_payment_order = self.pool.get('payment.order') obj_model = self.pool.get('ir.model.data') obj_act = self.pool.get('ir.actions.act_window') order= obj_payment_o... | 7a830f90045fe231d8b77a88d7d1d93e64cf9bbb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/7a830f90045fe231d8b77a88d7d1d93e64cf9bbb/account_payment_pay.py |
message = _('Voucher ') + " '" + inv.name + "' "+ _("is confirm") | message = _('Voucher ') + " '" + inv.name + "' "+ _("is confirmed") | def action_move_line_create(self, cr, uid, ids, *args): | 63e7e054f1d6dee20ca8b78eb071996c85ae373f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/63e7e054f1d6dee20ca8b78eb071996c85ae373f/voucher.py |
context.update({'uom': uom}) | context.update(uom=uom, compute_child=False) | def fill_inventory(self, cr, uid, ids, context): """ To fill stock inventory according to products available in the selected locations. @param self: The object pointer. @param cr: A database cursor @param uid: ID of the user currently logged in @param ids: the ID or list of IDs if we want more than one @param context: ... | ee198c29abe9a56dd9876afe53ca52b2a0e1a063 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/ee198c29abe9a56dd9876afe53ca52b2a0e1a063/stock_fill_inventory.py |
if result['product_uom_id'] and (not result['product_uom_id'] == default_uom): | if result.get('product_uom_id',False) and (not result['product_uom_id'] == default_uom): | def write(self, cr, uid, ids, vals, context=None): if context is None: context = {} obj = self.pool.get('hr.analytic.timesheet') timesheet_obj = self.pool.get('hr.analytic.timesheet') project_obj = self.pool.get('project.project') uom_obj = self.pool.get('product.uom') if isinstance(ids, (long, int)): ids = [ids,] | 31b73b77e3de5527f8ffe841c2e1b8a4945b8349 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/31b73b77e3de5527f8ffe841c2e1b8a4945b8349/project_timesheet.py |
result['product_uom_qty'] = qty | result['product_uom_qty'] = pack.qty | 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): if not partner_id: raise osv.except_osv(_('No Customer Defined !'), _('You have to select ... | a5fe9dbd977d76b0fe58cba2d9ce0a77d52e3b34 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/a5fe9dbd977d76b0fe58cba2d9ce0a77d52e3b34/sale.py |
self.abortResponse(1, _('Constraint Error'), 'warning', _(self._sql_error[key])) | self.abortResponse(1, _('Constraint Error'), 'warning', tr(self._sql_error[key], 'sql_constraint')) | def wrapper(self, dbname, *args, **kwargs): try: if not pooler.get_pool(dbname)._ready: raise except_osv('Database not ready', 'Currently, this database is not fully loaded and can not be used.') return f(self, dbname, *args, **kwargs) except orm.except_orm, inst: if inst.name == 'AccessError': self.logger.debug("Acces... | d0dee320199662492c3779deef06c412238eec73 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/d0dee320199662492c3779deef06c412238eec73/osv.py |
'name': fields.char('Name', size=128), | 'name': fields.char('Name', size=128, select=1), | def _models_get2(self, cr, uid, context=None): return self._models_field_get(cr, uid, 'relation', 'relation', context) | 2dd50cdbf284fca2bfc163d172ac8a220b2fdc80 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/2dd50cdbf284fca2bfc163d172ac8a220b2fdc80/ir_property.py |
help="If not set, act as default property"), 'company_id': fields.many2one('res.company', 'Company'), 'fields_id': fields.many2one('ir.model.fields', 'Fields', ondelete='cascade', required=True), | help="If not set, act as default property", select=1), 'company_id': fields.many2one('res.company', 'Company', select=1), 'fields_id': fields.many2one('ir.model.fields', 'Fields', ondelete='cascade', required=True, select=1), | def _models_get2(self, cr, uid, context=None): return self._models_field_get(cr, uid, 'relation', 'relation', context) | 2dd50cdbf284fca2bfc163d172ac8a220b2fdc80 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/2dd50cdbf284fca2bfc163d172ac8a220b2fdc80/ir_property.py |
'value_float' : fields.float('Value'), 'value_integer' : fields.integer_big('Value'), 'value_text' : fields.text('Value'), 'value_binary' : fields.binary('Value'), 'value_reference': fields.reference('Value', selection=_models_get2, size=128), 'value_datetime' : fields.datetime('Value'), | 'value_float' : fields.float('Value', select=1), 'value_integer' : fields.integer_big('Value', select=1), 'value_text' : fields.text('Value', select=1), 'value_binary' : fields.binary('Value', select=1), 'value_reference': fields.reference('Value', selection=_models_get2, size=128, select=1), 'value_datetime' : fields.... | def _models_get2(self, cr, uid, context=None): return self._models_field_get(cr, uid, 'relation', 'relation', context) | 2dd50cdbf284fca2bfc163d172ac8a220b2fdc80 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/2dd50cdbf284fca2bfc163d172ac8a220b2fdc80/ir_property.py |
next_num=eval(concat[0])+1 | next_num=int(concat[0])+1 | def copy(self, cr, uid, id, default=None, context=None): ir_values_obj = self.pool.get('ir.values') res = super(ir_ui_menu, self).copy(cr, uid, id, context=context) datas=self.read(cr,uid,[res],['name'])[0] rex=re.compile('\([0-9]+\)') concat=rex.findall(datas['name']) if concat: next_num=eval(concat[0])+1 datas['name'... | ab73059a9d5342a870ca924bebab842a321bd6af /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/ab73059a9d5342a870ca924bebab842a321bd6af/ir_ui_menu.py |
oldctx = self.localcontext | oldctx = dict(self.localcontext) | def _child_get(node, self=None, tagname=None): for n in node: if self and self.localcontext and n.get('rml_loop'): oldctx = 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(n.get(... | 38810b8ae6ca6868a2f1537d7c6f76a0a834f67d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/38810b8ae6ca6868a2f1537d7c6f76a0a834f67d/utils.py |
if fields[f]['type'] =='integer': col.set('tree','float') | def _append_node(name, text): n = etree.SubElement(config, name) n.text = text | 2949ed38abe04bff67661e8b506ba74860979798 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/2949ed38abe04bff67661e8b506ba74860979798/ps_list.py | |
res = super(wiz_auc_lots_numerotate_per_lot, self).default_get(cr, uid, fields, context=context) | res = super(auction_lots_numerotate_per_lot, self).default_get(cr, uid, fields, context=context) | def default_get(self, cr, uid, fields, context): """ To get default values for the object. @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 which we want default values @param context: A standard dictionary @return: A dictiona... | 61ce0995704862e3efbaaa16153c8d416ee15094 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/61ce0995704862e3efbaaa16153c8d416ee15094/auction_lots_numerotate.py |
date_and_hours_by_cal = [(op.production_id.date_planned, op.hour, op.workcenter_id.calendar_id.id) for op in ops] | date_and_hours_by_cal = [(op.date_planned, op.hour, op.workcenter_id.calendar_id.id) for op in ops if op.date_planned] | def _get_date_end(self, cr, uid, ids, field_name, arg, context): """ Finds ending date. @return: Dictionary of values. """ ops = self.browse(cr, uid, ids, context=context) date_and_hours_by_cal = [(op.production_id.date_planned, op.hour, op.workcenter_id.calendar_id.id) for op in ops] intervals = self.pool.get('resourc... | 319389a88a3da7fb2e9c09b4d11b2140f33d17e4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/319389a88a3da7fb2e9c09b4d11b2140f33d17e4/mrp_operations.py |
i = intervals[(op.date_planned, op.hour, op.workcenter_id.calendar_id.id)] | i = intervals.get((op.date_planned, op.hour, op.workcenter_id.calendar_id.id)) | def _get_date_end(self, cr, uid, ids, field_name, arg, context): """ Finds ending date. @return: Dictionary of values. """ ops = self.browse(cr, uid, ids, context=context) date_and_hours_by_cal = [(op.production_id.date_planned, op.hour, op.workcenter_id.calendar_id.id) for op in ops] intervals = self.pool.get('resourc... | 319389a88a3da7fb2e9c09b4d11b2140f33d17e4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/319389a88a3da7fb2e9c09b4d11b2140f33d17e4/mrp_operations.py |
def onchange_currency(self, cr, uid, ids, account_id, amount, currency_id, date=False, journal=False): | def onchange_currency(self, cr, uid, ids, account_id, amount, currency_id, date=False, journal=False, context=None): if context is None: context = {} | def onchange_currency(self, cr, uid, ids, account_id, amount, currency_id, date=False, journal=False): account_obj = self.pool.get('account.account') journal_obj = self.pool.get('account.journal') currency_obj = self.pool.get('res.currency') if (not currency_id) or (not account_id): return {} result = {} acc = account_... | df57bcc6b6b911b65516e5e1716a6b18f4c1b334 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/df57bcc6b6b911b65516e5e1716a6b18f4c1b334/account_move_line.py |
v = currency_obj.compute(cr, uid, currency_id, acc.company_id.currency_id.id, amount, account=acc) | context.update({'date': date}) v = currency_obj.compute(cr, uid, currency_id, acc.company_id.currency_id.id, amount, account=acc, context=context) | def onchange_currency(self, cr, uid, ids, account_id, amount, currency_id, date=False, journal=False): account_obj = self.pool.get('account.account') journal_obj = self.pool.get('account.journal') currency_obj = self.pool.get('res.currency') if (not currency_id) or (not account_id): return {} result = {} acc = account_... | df57bcc6b6b911b65516e5e1716a6b18f4c1b334 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/df57bcc6b6b911b65516e5e1716a6b18f4c1b334/account_move_line.py |
Private implementation of search() method, allowing specifying the uid to use for the access right check. | Private implementation of search() method, allowing specifying the uid to use for the access right check. | def _search(self, cr, user, args, offset=0, limit=None, order=None, context=None, count=False, access_rights_uid=None): """ Private implementation of search() method, allowing specifying the uid to use for the access right check. This is useful for example when filling in the selection list for a drop-down and avoiding... | baaf9e4490dca16d8a8a66d81b525984f67c6493 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/baaf9e4490dca16d8a8a66d81b525984f67c6493/orm.py |
def _search(self, cr, user, args, offset=0, limit=None, order=None, context=None, count=False, access_rights_uid=None): """ Private implementation of search() method, allowing specifying the uid to use for the access right check. This is useful for example when filling in the selection list for a drop-down and avoiding... | baaf9e4490dca16d8a8a66d81b525984f67c6493 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/baaf9e4490dca16d8a8a66d81b525984f67c6493/orm.py | ||
Search for records and their display names according to a search domain. | Search for records and their display names according to a search domain. | def name_search(self, cr, user, name='', args=None, operator='ilike', context=None, limit=100): """ Search for records and their display names according to a search domain. | baaf9e4490dca16d8a8a66d81b525984f67c6493 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/baaf9e4490dca16d8a8a66d81b525984f67c6493/orm.py |
def read_group(self, cr, uid, domain, fields, groupby, offset=0, limit=None, context=None): """ Get the list of records in list view grouped by the given ``groupby`` fields | baaf9e4490dca16d8a8a66d81b525984f67c6493 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/baaf9e4490dca16d8a8a66d81b525984f67c6493/orm.py | ||
def read_group(self, cr, uid, domain, fields, groupby, offset=0, limit=None, context=None): """ Get the list of records in list view grouped by the given ``groupby`` fields | baaf9e4490dca16d8a8a66d81b525984f67c6493 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/baaf9e4490dca16d8a8a66d81b525984f67c6493/orm.py | ||
data = [data_read[id] for id in data_ids] | data = [] for id in data_ids: for rec in data_read: if rec['id'] == id: data.append(rec) | def read_group(self, cr, uid, domain, fields, groupby, offset=0, limit=None, context=None): """ Get the list of records in list view grouped by the given ``groupby`` fields | baaf9e4490dca16d8a8a66d81b525984f67c6493 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/baaf9e4490dca16d8a8a66d81b525984f67c6493/orm.py |
in the form ``table.field``, to be referenced in queries. | in the form ``table.field``, to be referenced in queries. | def _inherits_join_calc(self, field, tables, where_clause): """ Adds missing table select and join clause(s) for reaching the field coming from an '_inherits' parent table (no duplicates). | baaf9e4490dca16d8a8a66d81b525984f67c6493 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/baaf9e4490dca16d8a8a66d81b525984f67c6493/orm.py |
field set to ``False`` should be applied. | field set to ``False`` should be applied. | def _where_calc(self, cr, user, args, active_test=True, context=None): """Computes the WHERE clause needed to implement an OpenERP domain. :param args: the domain to compute :type args: list :param active_test: whether the default filtering of records with ``active`` field set to ``False`` should be applied. :return: t... | baaf9e4490dca16d8a8a66d81b525984f67c6493 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/baaf9e4490dca16d8a8a66d81b525984f67c6493/orm.py |
table names that need to be included in the FROM clause. :rtype: tuple | table names that need to be included in the FROM clause. :rtype: tuple | def _where_calc(self, cr, user, args, active_test=True, context=None): """Computes the WHERE clause needed to implement an OpenERP domain. :param args: the domain to compute :type args: list :param active_test: whether the default filtering of records with ``active`` field set to ``False`` should be applied. :return: t... | baaf9e4490dca16d8a8a66d81b525984f67c6493 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/baaf9e4490dca16d8a8a66d81b525984f67c6493/orm.py |
the appropriate JOIN for linking the current model to the one referenced in model_name. | the appropriate JOIN for linking the current model to the one referenced in model_name. | def _apply_ir_rules(self, cr, uid, where_clause, where_clause_params, tables, mode='read', model_name=None, context=None): """Add what's missing in ``where_clause``, ``where_params``, ``tables`` to implement all appropriate ir.rules (on the current object but also from it's _inherits parents) | baaf9e4490dca16d8a8a66d81b525984f67c6493 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/baaf9e4490dca16d8a8a66d81b525984f67c6493/orm.py |
Private implementation of search() method, allowing specifying the uid to use for the access right check. | Private implementation of search() method, allowing specifying the uid to use for the access right check. | def _search(self, cr, user, args, offset=0, limit=None, order=None, context=None, count=False, access_rights_uid=None): """ Private implementation of search() method, allowing specifying the uid to use for the access right check. This is useful for example when filling in the selection list for a drop-down and avoiding... | baaf9e4490dca16d8a8a66d81b525984f67c6493 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/baaf9e4490dca16d8a8a66d81b525984f67c6493/orm.py |
def _search(self, cr, user, args, offset=0, limit=None, order=None, context=None, count=False, access_rights_uid=None): """ Private implementation of search() method, allowing specifying the uid to use for the access right check. This is useful for example when filling in the selection list for a drop-down and avoiding... | baaf9e4490dca16d8a8a66d81b525984f67c6493 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/baaf9e4490dca16d8a8a66d81b525984f67c6493/orm.py | ||
res[id]=[x for x in l if x <> line.id] | partial_ids.append(line.id) res[id] =[x for x in l if x <> line.id and x not in partial_ids] | def _get_lines(self, cr, uid, ids, name, arg, context=None): res = {} for id in ids: move_lines = self.move_line_id_payment_get(cr,uid,[id]) if not move_lines: res[id] = [] continue data_lines = self.pool.get('account.move.line').browse(cr,uid,move_lines) for line in data_lines: ids_line = [] if line.reconcile_id: ids_... | d8e33d1fc5cc88da36180020dc028d8017cbe35c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/d8e33d1fc5cc88da36180020dc028d8017cbe35c/invoice.py |
lines += map(lambda x: x.id, m.reconcile_id.line_id) | temp_lines = map(lambda x: x.id, m.reconcile_id.line_id) | def _compute_lines(self, cr, uid, ids, name, args, context=None): result = {} for invoice in self.browse(cr, uid, ids, context): moves = self.move_line_id_payment_get(cr, uid, [invoice.id]) src = [] lines = [] for m in self.pool.get('account.move.line').browse(cr, uid, moves, context): if m.reconcile_id: lines += map(l... | d8e33d1fc5cc88da36180020dc028d8017cbe35c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/d8e33d1fc5cc88da36180020dc028d8017cbe35c/invoice.py |
lines += map(lambda x: x.id, m.reconcile_partial_id.line_partial_ids) | temp_lines = map(lambda x: x.id, m.reconcile_partial_id.line_partial_ids) lines += [x for x in temp_lines if x not in lines] | def _compute_lines(self, cr, uid, ids, name, args, context=None): result = {} for invoice in self.browse(cr, uid, ids, context): moves = self.move_line_id_payment_get(cr, uid, [invoice.id]) src = [] lines = [] for m in self.pool.get('account.move.line').browse(cr, uid, moves, context): if m.reconcile_id: lines += map(l... | d8e33d1fc5cc88da36180020dc028d8017cbe35c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/d8e33d1fc5cc88da36180020dc028d8017cbe35c/invoice.py |
resource_id = len(resource_ids) or resource_ids[0] | if resource_ids: resource_id = len(resource_ids) or resource_ids[0] | 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... | d3dfc675e1e5acae19ad4bfebbb0f41d5fde9d1a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/d3dfc675e1e5acae19ad4bfebbb0f41d5fde9d1a/crm_opportunity.py |
number = self.pool.get('ir.sequence').get(cr, uid, 'account.cash.statement') | if statement.name and statement.name == '/': number = self.pool.get('ir.sequence').get(cr, uid, 'account.cash.statement') vals.update({ 'name':number }) | def button_open(self, cr, uid, ids, context=None): """ Changes statement state to Running. @return: True """ cash_pool = self.pool.get('account.cashbox.line') statement_pool = self.pool.get('account.bank.statement') | e5ee5ce9a46a79286c52c9126274b11697befbf2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/e5ee5ce9a46a79286c52c9126274b11697befbf2/account_cash_statement.py |
vals = { | vals.update({ | def button_open(self, cr, uid, ids, context=None): """ Changes statement state to Running. @return: True """ cash_pool = self.pool.get('account.cashbox.line') statement_pool = self.pool.get('account.bank.statement') | e5ee5ce9a46a79286c52c9126274b11697befbf2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/e5ee5ce9a46a79286c52c9126274b11697befbf2/account_cash_statement.py |
'name':number } | }) | def button_open(self, cr, uid, ids, context=None): """ Changes statement state to Running. @return: True """ cash_pool = self.pool.get('account.cashbox.line') statement_pool = self.pool.get('account.bank.statement') | e5ee5ce9a46a79286c52c9126274b11697befbf2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/e5ee5ce9a46a79286c52c9126274b11697befbf2/account_cash_statement.py |
except ValueError: | except: | def create(self, cr, uid, data, context=None): if context is None: context = {} user_id = super(res_users, self).create(cr, uid, data, context) data_obj = self.pool.get('ir.model.data') try: data_id = data_obj._get_id(cr, uid, 'crm', 'ir_ui_view_sc_calendar0') view_id = data_obj.browse(cr, uid, data_id, context=contex... | e76438c44944c4ea3729652ec0e47900a6759449 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/e76438c44944c4ea3729652ec0e47900a6759449/crm_meeting.py |
objid = self.pool.get('ir.model.data') | data_pool = self.pool.get('ir.model.data') | def _get_root_calendar_directory(self, cr, uid, context=None): objid = self.pool.get('ir.model.data') try: mid = objid._get_id(cr, uid, 'document', 'dir_calendars') if not mid: return False root_id = objid.read(cr, uid, mid, ['res_id'])['res_id'] root_cal_dir = self.browse(cr,uid, root_id, context=context) return root_... | f33fb9e7bbe1a8960c3e8bbfdfe1de86e3821010 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/f33fb9e7bbe1a8960c3e8bbfdfe1de86e3821010/calendar_collection.py |
mid = objid._get_id(cr, uid, 'document', 'dir_calendars') if not mid: return False root_id = objid.read(cr, uid, mid, ['res_id'])['res_id'] root_cal_dir = self.browse(cr,uid, root_id, context=context) return root_cal_dir.name | calendar_dir_id = data_pool.get_object(cr, uid, 'caldav', 'document_directory_calendars0') return calendar_dir_id.name | def _get_root_calendar_directory(self, cr, uid, context=None): objid = self.pool.get('ir.model.data') try: mid = objid._get_id(cr, uid, 'document', 'dir_calendars') if not mid: return False root_id = objid.read(cr, uid, mid, ['res_id'])['res_id'] root_cal_dir = self.browse(cr,uid, root_id, context=context) return root_... | f33fb9e7bbe1a8960c3e8bbfdfe1de86e3821010 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/f33fb9e7bbe1a8960c3e8bbfdfe1de86e3821010/calendar_collection.py |
logger = logging.getLogger('document') | logger = logging.getLogger('caldav') | def _get_root_calendar_directory(self, cr, uid, context=None): objid = self.pool.get('ir.model.data') try: mid = objid._get_id(cr, uid, 'document', 'dir_calendars') if not mid: return False root_id = objid.read(cr, uid, mid, ['res_id'])['res_id'] root_cal_dir = self.browse(cr,uid, root_id, context=context) return root_... | f33fb9e7bbe1a8960c3e8bbfdfe1de86e3821010 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/f33fb9e7bbe1a8960c3e8bbfdfe1de86e3821010/calendar_collection.py |
cr.execute("Select id from ir_module_web_dependency where module_id=%s and web_module_id=%s and name=%s", (id, ids[0], d)) res = cr.fetchone() if not res: cr.execute('INSERT INTO ir_module_web_dependency (module_id, web_module_id, name) values (%s, %s, %s)', (id, ids[0], d)) | if len(ids) > 0: cr.execute("Select id from ir_module_web_dependency where module_id=%s and web_module_id=%s and name=%s", (id, ids[0], d)) res = cr.fetchone() if not res: cr.execute('INSERT INTO ir_module_web_dependency (module_id, web_module_id, name) values (%s, %s, %s)', (id, ids[0], d)) | def _update_web_dependencies(self, cr, uid, id, depends=[]): web_module_pool = self.pool.get('ir.module.web') for d in depends: ids = web_module_pool.search(cr, uid, [('module','=',d)]) cr.execute("Select id from ir_module_web_dependency where module_id=%s and web_module_id=%s and name=%s", (id, ids[0], d)) res = cr.fe... | 35c4811952c25d4c4fd6d5e4dc78c8a5daba3833 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/35c4811952c25d4c4fd6d5e4dc78c8a5daba3833/module.py |
min(date), max(date) | min(date_expected), max(date_expected) | 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), max(date) from stock_mov... | 23846f5e82fe1e93fe186ac5f23679d839344703 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/23846f5e82fe1e93fe186ac5f23679d839344703/stock.py |
res[pick]['min_date'] = dt1 res[pick]['max_date'] = dt2 | res[pick]['min_date'] = dt1 res[pick]['max_date'] = dt2 | 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), max(date) from stock_mov... | 23846f5e82fe1e93fe186ac5f23679d839344703 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/23846f5e82fe1e93fe186ac5f23679d839344703/stock.py |
def action_invoice_create(self, cr, uid, ids, journal_id=False, group=False, type='out_invoice', context=None): """ Creates invoice based on the invoice state selected for picking. @param journal_id: Id of journal @param group: Whether to create a group invoice or not @param type: Type invoice to be created @return: Id... | 23846f5e82fe1e93fe186ac5f23679d839344703 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/23846f5e82fe1e93fe186ac5f23679d839344703/stock.py | ||
res = dict.fromkeys(ids) | res = dict.fromkeys(ids, False) | def _get_email_from(self, cr, uid, ids, context=None): if not isinstance(ids, list): ids = [ids] res = dict.fromkeys(ids) for user in self.browse(cr, uid, ids, context=context): if user.user_email: res[user.id] = "%s <%s>" % (user.name, user.user_email) return res | afa0a6dc06cc7da3dec42e43724ad03b7ca6a55a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/afa0a6dc06cc7da3dec42e43724ad03b7ca6a55a/res_user.py |
phase_resource_obj = resource_pool.generate_resources(cr, uid, [phase.responsible_id.id], calendar_id, context=context) | phase_resource_obj = self.generate_resources(cr, uid, [phase.id], context=context)[phase.id] | def generate_schedule(self, cr, uid, ids, start_date=False, calendar_id=False, context=None): """ Schedule phase with the start date till all the next phases are completed. @param: start_date (datetime.datetime) : start date for the phase. It would be either Start date of phase or start date of project or system curren... | db3ecb06499f378d9226420f5807fbb84b33128a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/db3ecb06499f378d9226420f5807fbb84b33128a/project_long_term.py |
for phase in phase.next_phase_ids: if phase.state in ['draft', 'open', 'pending']: id_cal = phase.project_id.resource_calendar_id and phase.project_id.resource_calendar_id.id or False self.generate_schedule(cr, uid, [phase.id], date_start, id_cal, context=context) | for next_phase in phase.next_phase_ids: if next_phase.state in ['draft', 'open', 'pending']: id_cal = next_phase.project_id.resource_calendar_id and next_phase.project_id.resource_calendar_id.id or False self.generate_schedule(cr, uid, [next_phase.id], date_start+timedelta(days=1), id_cal, context=context) | def phase(): effort = duration | db3ecb06499f378d9226420f5807fbb84b33128a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/db3ecb06499f378d9226420f5807fbb84b33128a/project_long_term.py |
'partner_id': address.partner_id and address.partner_id.id or '', | 'partner_id': address.partner_id and str(address.partner_id.id) or '', | def search_contact(self, cr, user, email): address_pool = self.pool.get('res.partner.address') address_ids = address_pool.search(cr, user, [('email','=',email)]) res = {} | 66b08730e1dcf0c325614475d1f61fb89a1abd1c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/66b08730e1dcf0c325614475d1f61fb89a1abd1c/partner.py |
if 'company_id' not in values or (values.get('company_id') in self.read(cr, uid, uid, ['company_ids'], context=context)['company_ids']): uid = 1 | if 'company_id' in values: if not (values['company_id'] in self.read(cr, uid, uid, ['company_ids'], context=context)['company_ids']): del values['company_id'] uid = 1 | def write(self, cr, uid, ids, values, context=None): if not hasattr(ids, '__iter__'): ids = [ids] if ids == [uid]: for key in values.keys(): if not (key in self.SELF_WRITEABLE_FIELDS or key.startswith('context_')): break else: # check that user is not selecting an invalid company_id if 'company_id' not in values or (va... | ae1653e63ccc04702058bdaf9c0ebe681e1eb108 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/ae1653e63ccc04702058bdaf9c0ebe681e1eb108/res_user.py |
if abs(amount) < 0.0001: | if abs(amount) < 10 ** -(int(config['price_accuracy'])1): | def validate(self, cr, uid, ids, context={}): if context and ('__last_update' in context): del context['__last_update'] ok = True for move in self.browse(cr, uid, ids, context): #unlink analytic lines on move_lines for obj_line in move.line_id: for obj in obj_line.analytic_lines: self.pool.get('account.analytic.line').... | 5975104b4fe18e9a097700a5ef4cd888b1c6b17b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/5975104b4fe18e9a097700a5ef4cd888b1c6b17b/account.py |
vals['name'] = self.pool.get('ir.sequence').get(cr, user, 'stock.picking') | seq_obj_name = 'stock.picking.' + vals['type'] vals['name'] = self.pool.get('ir.sequence').get(cr, user, seq_obj_name) | def create(self, cr, user, vals, context=None): if ('name' not in vals) or (vals.get('name')=='/'): vals['name'] = self.pool.get('ir.sequence').get(cr, user, 'stock.picking') type_list = { 'out':_('Packing List'), 'in':_('Reception'), 'internal': _('Internal picking'), 'delivery': _('Delivery order') } if not vals.get(... | f9625c9cf3ff1d24d71017c9ee6f0c1dd992e98d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/f9625c9cf3ff1d24d71017c9ee6f0c1dd992e98d/stock.py |
vals_journal = { | vals_journal.update({ | def generate_configurable_chart(self, cr, uid, ids, context=None): obj_acc = self.pool.get('account.account') obj_acc_tax = self.pool.get('account.tax') obj_journal = self.pool.get('account.journal') obj_acc_tax_code = self.pool.get('account.tax.code') obj_acc_template = self.pool.get('account.account.template') obj_ac... | 9a49fa6ea8eeb5fffa43df689d97428725412e52 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/9a49fa6ea8eeb5fffa43df689d97428725412e52/installer.py |
} | }) | def generate_configurable_chart(self, cr, uid, ids, context=None): obj_acc = self.pool.get('account.account') obj_acc_tax = self.pool.get('account.tax') obj_journal = self.pool.get('account.journal') obj_acc_tax_code = self.pool.get('account.tax.code') obj_acc_template = self.pool.get('account.account.template') obj_ac... | 9a49fa6ea8eeb5fffa43df689d97428725412e52 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/9a49fa6ea8eeb5fffa43df689d97428725412e52/installer.py |
vals_journal = { | vals_journal.update({ | def generate_configurable_chart(self, cr, uid, ids, context=None): obj_acc = self.pool.get('account.account') obj_acc_tax = self.pool.get('account.tax') obj_journal = self.pool.get('account.journal') obj_acc_tax_code = self.pool.get('account.tax.code') obj_acc_template = self.pool.get('account.account.template') obj_ac... | 9a49fa6ea8eeb5fffa43df689d97428725412e52 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/9a49fa6ea8eeb5fffa43df689d97428725412e52/installer.py |
} | }) | def generate_configurable_chart(self, cr, uid, ids, context=None): obj_acc = self.pool.get('account.account') obj_acc_tax = self.pool.get('account.tax') obj_journal = self.pool.get('account.journal') obj_acc_tax_code = self.pool.get('account.tax.code') obj_acc_template = self.pool.get('account.account.template') obj_ac... | 9a49fa6ea8eeb5fffa43df689d97428725412e52 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/9a49fa6ea8eeb5fffa43df689d97428725412e52/installer.py |
self._pool.give_back(self._cnx) | keep_in_pool = self.dbname not in ('template1', 'template0', 'postgres') self._pool.give_back(self._cnx, keep_in_pool=keep_in_pool) | def close(self): if not self._obj: return | 9830fb430ff44687dd0f240931c95ec95ff289fc /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/9830fb430ff44687dd0f240931c95ec95ff289fc/sql_db.py |
def give_back(self, connection): | def give_back(self, connection, keep_in_pool=True): | def give_back(self, connection): self._debug('Give back connection to %s' % (connection.dsn,)) for i, (cnx, used) in enumerate(self._connections): if cnx is connection: self._connections.pop(i) self._connections.append((cnx, False)) break else: raise PoolError('This connection does not below to the pool') | 9830fb430ff44687dd0f240931c95ec95ff289fc /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/9830fb430ff44687dd0f240931c95ec95ff289fc/sql_db.py |
self._connections.append((cnx, False)) | if keep_in_pool: self._connections.append((cnx, False)) self._debug('Put connection to %s in pool' % (cnx.dsn,)) | def give_back(self, connection): self._debug('Give back connection to %s' % (connection.dsn,)) for i, (cnx, used) in enumerate(self._connections): if cnx is connection: self._connections.pop(i) self._connections.append((cnx, False)) break else: raise PoolError('This connection does not below to the pool') | 9830fb430ff44687dd0f240931c95ec95ff289fc /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/9830fb430ff44687dd0f240931c95ec95ff289fc/sql_db.py |
datas = self.read(cr, uid, event_id, context=context) | def modify_this(self, cr, uid, event_id, defaults, real_date, context=None, *args): """Modifies only one event record out of virtual recurrent events and creates new event as a specific instance of a Recurring Event", @param self: The object pointer @param cr: the current row, from the database cursor, @param uid: the ... | 5f2a464a8c47b341c102ff2536c24bca3c7f90d1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/5f2a464a8c47b341c102ff2536c24bca3c7f90d1/base_calendar.py | |
'recurrent_uid': base_calendar_id2real_id(datas['id']), 'recurrent_id': defaults.get('date') or real_date, | 'recurrent_uid': base_calendar_id2real_id(event_id), 'recurrent_id': real_date, | def modify_this(self, cr, uid, event_id, defaults, real_date, context=None, *args): """Modifies only one event record out of virtual recurrent events and creates new event as a specific instance of a Recurring Event", @param self: The object pointer @param cr: the current row, from the database cursor, @param uid: the ... | 5f2a464a8c47b341c102ff2536c24bca3c7f90d1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/5f2a464a8c47b341c102ff2536c24bca3c7f90d1/base_calendar.py |
exdate = datas['exdate'] and datas['exdate'].split(',') or [] if real_date and defaults.get('date'): exdate.append(real_date) self.write(cr, uid, event_id, {'exdate': ','.join(exdate)}, context=context) | def modify_this(self, cr, uid, event_id, defaults, real_date, context=None, *args): """Modifies only one event record out of virtual recurrent events and creates new event as a specific instance of a Recurring Event", @param self: The object pointer @param cr: the current row, from the database cursor, @param uid: the ... | 5f2a464a8c47b341c102ff2536c24bca3c7f90d1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/5f2a464a8c47b341c102ff2536c24bca3c7f90d1/base_calendar.py |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.