rem stringlengths 1 322k | add stringlengths 0 2.05M | context stringlengths 4 228k | meta stringlengths 156 215 |
|---|---|---|---|
return lambda x: self.id_get(cr, False, x) | return lambda x: self.id_get(cr, x) | def _ref(self, cr): return lambda x: self.id_get(cr, False, x) | 4bc20ff99f4251e4705e5836bf656f172bf6fd92 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/4bc20ff99f4251e4705e5836bf656f172bf6fd92/convert.py |
idref[id]=self.id_get(cr, False, id) | idref[id]=self.id_get(cr, id) | def _process(s, idref): m = re.findall('[^%]%\((.*?)\)[ds]', s) for id in m: if not id in idref: idref[id]=self.id_get(cr, False, id) return s % idref | 4bc20ff99f4251e4705e5836bf656f172bf6fd92 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/4bc20ff99f4251e4705e5836bf656f172bf6fd92/convert.py |
idref['ref'] = lambda x: self.id_get(cr, False, x) | idref['ref'] = lambda x: self.id_get(cr, x) | def _process(s, idref): m = re.findall('[^%]%\((.*?)\)[ds]', s) for id in m: if not id in idref: idref[id]=self.id_get(cr, False, id) return s % idref | 4bc20ff99f4251e4705e5836bf656f172bf6fd92 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/4bc20ff99f4251e4705e5836bf656f172bf6fd92/convert.py |
return self.id_get(cr, None, node_uid) | return self.id_get(cr, node_uid) | def get_uid(self, cr, uid, data_node, node): node_uid = node.get('uid','') or (len(data_node) and data_node.get('uid','')) if node_uid: return self.id_get(cr, None, node_uid) return uid | 4bc20ff99f4251e4705e5836bf656f172bf6fd92 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/4bc20ff99f4251e4705e5836bf656f172bf6fd92/convert.py |
ids.append(self.id_get(cr, d_model, d_id)) | ids.append(self.id_get(cr, d_id)) | def _tag_delete(self, cr, rec, data_node=None): d_model = rec.get("model",'') d_search = rec.get("search",'').encode('utf-8') d_id = rec.get("id",'') ids = [] | 4bc20ff99f4251e4705e5836bf656f172bf6fd92 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/4bc20ff99f4251e4705e5836bf656f172bf6fd92/convert.py |
group_id = self.id_get(cr, 'res.groups', group[1:]) | group_id = self.id_get(cr, group[1:]) | def _tag_report(self, cr, rec, data_node=None): res = {} for dest,f in (('name','string'),('model','model'),('report_name','name')): res[dest] = rec.get(f,'').encode('utf8') assert res[dest], "Attribute %s of report is empty !" % (f,) for field,dest in (('rml','report_rml'),('file','report_rml'),('xml','report_xml'),('... | 4bc20ff99f4251e4705e5836bf656f172bf6fd92 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/4bc20ff99f4251e4705e5836bf656f172bf6fd92/convert.py |
group_id = self.id_get(cr, 'res.groups', group) | group_id = self.id_get(cr, group) | def _tag_report(self, cr, rec, data_node=None): res = {} for dest,f in (('name','string'),('model','model'),('report_name','name')): res[dest] = rec.get(f,'').encode('utf8') assert res[dest], "Attribute %s of report is empty !" % (f,) for field,dest in (('rml','report_rml'),('file','report_rml'),('xml','report_xml'),('... | 4bc20ff99f4251e4705e5836bf656f172bf6fd92 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/4bc20ff99f4251e4705e5836bf656f172bf6fd92/convert.py |
group_id = self.id_get(cr, 'res.groups', group[1:]) | group_id = self.id_get(cr, group[1:]) | def _tag_wizard(self, cr, rec, data_node=None): string = rec.get("string",'').encode('utf8') model = rec.get("model",'').encode('utf8') name = rec.get("name",'').encode('utf8') xml_id = rec.get('id','').encode('utf8') self._test_xml_id(xml_id) multi = rec.get('multi','') and eval(rec.get('multi','False')) res = {'name'... | 4bc20ff99f4251e4705e5836bf656f172bf6fd92 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/4bc20ff99f4251e4705e5836bf656f172bf6fd92/convert.py |
group_id = self.id_get(cr, 'res.groups', group) | group_id = self.id_get(cr, group) | def _tag_wizard(self, cr, rec, data_node=None): string = rec.get("string",'').encode('utf8') model = rec.get("model",'').encode('utf8') name = rec.get("name",'').encode('utf8') xml_id = rec.get('id','').encode('utf8') self._test_xml_id(xml_id) multi = rec.get('multi','') and eval(rec.get('multi','False')) res = {'name'... | 4bc20ff99f4251e4705e5836bf656f172bf6fd92 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/4bc20ff99f4251e4705e5836bf656f172bf6fd92/convert.py |
if rec.get('view'): view_id = self.id_get(cr, 'ir.actions.act_window', rec.get('view','').encode('utf-8')) | if rec.get('view_id'): view_id = self.id_get(cr, rec.get('view_id','').encode('utf-8')) | def _tag_act_window(self, cr, rec, data_node=None): name = rec.get('name','').encode('utf-8') xml_id = rec.get('id','').encode('utf8') self._test_xml_id(xml_id) type = rec.get('type','').encode('utf-8') or 'ir.actions.act_window' view_id = False if rec.get('view'): view_id = self.id_get(cr, 'ir.actions.act_window', rec... | 4bc20ff99f4251e4705e5836bf656f172bf6fd92 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/4bc20ff99f4251e4705e5836bf656f172bf6fd92/convert.py |
return self.id_get(cr, None, str_id) | return self.id_get(cr, str_id) | def ref(str_id): return self.id_get(cr, None, str_id) | 4bc20ff99f4251e4705e5836bf656f172bf6fd92 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/4bc20ff99f4251e4705e5836bf656f172bf6fd92/convert.py |
group_id = self.id_get(cr, 'res.groups', group[1:]) | group_id = self.id_get(cr, group[1:]) | def ref(str_id): return self.id_get(cr, None, str_id) | 4bc20ff99f4251e4705e5836bf656f172bf6fd92 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/4bc20ff99f4251e4705e5836bf656f172bf6fd92/convert.py |
group_id = self.id_get(cr, 'res.groups', group) | group_id = self.id_get(cr, group) | def ref(str_id): return self.id_get(cr, None, str_id) | 4bc20ff99f4251e4705e5836bf656f172bf6fd92 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/4bc20ff99f4251e4705e5836bf656f172bf6fd92/convert.py |
id = self.id_get(cr, model, w_ref) | id = self.id_get(cr, w_ref) | def _tag_workflow(self, cr, rec, data_node=None): if self.isnoupdate(data_node) and self.mode != 'init': return model = str(rec.get('model','')) w_ref = rec.get('ref','') if w_ref: id = self.id_get(cr, model, w_ref) else: number_children = len(rec) assert number_children > 0,\ 'You must define a child node if you dont ... | 4bc20ff99f4251e4705e5836bf656f172bf6fd92 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/4bc20ff99f4251e4705e5836bf656f172bf6fd92/convert.py |
menu_parent_id = self.id_get(cr, 'ir.ui.menu', rec.get('parent','')) | menu_parent_id = self.id_get(cr, rec.get('parent','')) | def _tag_menuitem(self, cr, rec, data_node=None): rec_id = rec.get("id",'').encode('ascii') self._test_xml_id(rec_id) m_l = map(escape, escape_re.split(rec.get("name",'').encode('utf8'))) | 4bc20ff99f4251e4705e5836bf656f172bf6fd92 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/4bc20ff99f4251e4705e5836bf656f172bf6fd92/convert.py |
res = [ self.id_get(cr, 'ir.ui.menu', rec.get('id','')) ] | res = [ self.id_get(cr, rec.get('id','')) ] | def _tag_menuitem(self, cr, rec, data_node=None): rec_id = rec.get("id",'').encode('ascii') self._test_xml_id(rec_id) m_l = map(escape, escape_re.split(rec.get("name",'').encode('utf8'))) | 4bc20ff99f4251e4705e5836bf656f172bf6fd92 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/4bc20ff99f4251e4705e5836bf656f172bf6fd92/convert.py |
a_id = self.id_get(cr, 'ir.actions.%s'% a_type, a_action) | a_id = self.id_get(cr, a_action) | def _tag_menuitem(self, cr, rec, data_node=None): rec_id = rec.get("id",'').encode('ascii') self._test_xml_id(rec_id) m_l = map(escape, escape_re.split(rec.get("name",'').encode('utf8'))) | 4bc20ff99f4251e4705e5836bf656f172bf6fd92 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/4bc20ff99f4251e4705e5836bf656f172bf6fd92/convert.py |
a_id = self.id_get(cr, 'ir.actions.%s'% a_type, a_action) | a_id = self.id_get(cr, a_action) | def _tag_menuitem(self, cr, rec, data_node=None): rec_id = rec.get("id",'').encode('ascii') self._test_xml_id(rec_id) m_l = map(escape, escape_re.split(rec.get("name",'').encode('utf8'))) | 4bc20ff99f4251e4705e5836bf656f172bf6fd92 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/4bc20ff99f4251e4705e5836bf656f172bf6fd92/convert.py |
group_id = self.id_get(cr, 'res.groups', group[1:]) | group_id = self.id_get(cr, group[1:]) | def _tag_menuitem(self, cr, rec, data_node=None): rec_id = rec.get("id",'').encode('ascii') self._test_xml_id(rec_id) m_l = map(escape, escape_re.split(rec.get("name",'').encode('utf8'))) | 4bc20ff99f4251e4705e5836bf656f172bf6fd92 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/4bc20ff99f4251e4705e5836bf656f172bf6fd92/convert.py |
group_id = self.id_get(cr, 'res.groups', group) | group_id = self.id_get(cr, group) | def _tag_menuitem(self, cr, rec, data_node=None): rec_id = rec.get("id",'').encode('ascii') self._test_xml_id(rec_id) m_l = map(escape, escape_re.split(rec.get("name",'').encode('utf8'))) | 4bc20ff99f4251e4705e5836bf656f172bf6fd92 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/4bc20ff99f4251e4705e5836bf656f172bf6fd92/convert.py |
a_id = self.id_get(cr, 'ir.actions.%s' % a_type, a_action) | a_id = self.id_get(cr, a_action) | def _tag_menuitem(self, cr, rec, data_node=None): rec_id = rec.get("id",'').encode('ascii') self._test_xml_id(rec_id) m_l = map(escape, escape_re.split(rec.get("name",'').encode('utf8'))) | 4bc20ff99f4251e4705e5836bf656f172bf6fd92 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/4bc20ff99f4251e4705e5836bf656f172bf6fd92/convert.py |
ids = [self.id_get(cr, rec_model, rec_id)] | ids = [self.id_get(cr, rec_id)] | def _tag_assert(self, cr, rec, data_node=None): if self.isnoupdate(data_node) and self.mode != 'init': return | 4bc20ff99f4251e4705e5836bf656f172bf6fd92 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/4bc20ff99f4251e4705e5836bf656f172bf6fd92/convert.py |
val = self.model_id_get(cr, f_model, f_ref) | val = self.model_id_get(cr, f_ref) | def _tag_record(self, cr, rec, data_node=None): rec_model = rec.get("model").encode('ascii') model = self.pool.get(rec_model) assert model, "The model %s does not exist !" % (rec_model,) rec_id = rec.get("id",'').encode('ascii') rec_context = rec.get("context", None) if rec_context: rec_context = unsafe_eval(rec_contex... | 4bc20ff99f4251e4705e5836bf656f172bf6fd92 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/4bc20ff99f4251e4705e5836bf656f172bf6fd92/convert.py |
f_val = self.id_get(cr, f_model, f_ref) | f_val = self.id_get(cr, f_ref) | def _tag_record(self, cr, rec, data_node=None): rec_model = rec.get("model").encode('ascii') model = self.pool.get(rec_model) assert model, "The model %s does not exist !" % (rec_model,) rec_id = rec.get("id",'').encode('ascii') rec_context = rec.get("context", None) if rec_context: rec_context = unsafe_eval(rec_contex... | 4bc20ff99f4251e4705e5836bf656f172bf6fd92 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/4bc20ff99f4251e4705e5836bf656f172bf6fd92/convert.py |
def id_get(self, cr, model, id_str): | def id_get(self, cr, id_str): | def id_get(self, cr, model, id_str): if id_str in self.idref: return self.idref[id_str] res = self.model_id_get(cr, model, id_str) if res and len(res)>1: res = res[1] return res | 4bc20ff99f4251e4705e5836bf656f172bf6fd92 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/4bc20ff99f4251e4705e5836bf656f172bf6fd92/convert.py |
res = self.model_id_get(cr, model, id_str) | res = self.model_id_get(cr, id_str) | def id_get(self, cr, model, id_str): if id_str in self.idref: return self.idref[id_str] res = self.model_id_get(cr, model, id_str) if res and len(res)>1: res = res[1] return res | 4bc20ff99f4251e4705e5836bf656f172bf6fd92 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/4bc20ff99f4251e4705e5836bf656f172bf6fd92/convert.py |
def model_id_get(self, cr, model, id_str): | def model_id_get(self, cr, id_str): | def model_id_get(self, cr, model, id_str): model_data_obj = self.pool.get('ir.model.data') mod = self.module if '.' in id_str: mod,id_str = id_str.split('.') return model_data_obj.get_object_reference(cr, self.uid, mod, id_str) | 4bc20ff99f4251e4705e5836bf656f172bf6fd92 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/4bc20ff99f4251e4705e5836bf656f172bf6fd92/convert.py |
'amount': fields.function(_compute_total, method=True, type='float', digits=(14,2), string='Total', store=True), 'tax_amount':fields.float('Tax Amount', digits=(14,2), readonly=True, states={'draft':[('readonly',False)]}), | 'amount': fields.float('Total', digits=(16, 2), readonly=True, states={'draft':[('readonly',False)]}), 'tax_amount':fields.float('Tax Amount', digits=(14,4), readonly=True, states={'draft':[('readonly',False)]}), | def _compute_total(self, cr, uid, ids, name, args, context=None): position_pool = self.pool.get('account.fiscal.position') voucher_pool = self.pool.get('account.voucher') voucher_line_pool = self.pool.get('account.voucher.line') partner_pool = self.pool.get('res.partner') tax_pool = self.pool.get('account.tax') res = ... | c1a9af0020b8b799fa4ca9940cdd72d451126c08 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/c1a9af0020b8b799fa4ca9940cdd72d451126c08/voucher.py |
'name': lambda *a: '/', | 'name': lambda *a: '', | def _compute_total(self, cr, uid, ids, name, args, context=None): position_pool = self.pool.get('account.fiscal.position') voucher_pool = self.pool.get('account.voucher') voucher_line_pool = self.pool.get('account.voucher.line') partner_pool = self.pool.get('res.partner') tax_pool = self.pool.get('account.tax') res = ... | c1a9af0020b8b799fa4ca9940cdd72d451126c08 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/c1a9af0020b8b799fa4ca9940cdd72d451126c08/voucher.py |
def onchange_tax_id(self, cr, uid, ids, amount, tax_id, context={}): | def onchange_price(self, cr, uid, ids, payment_ids, tax_amount, tax_id, context={}): | def onchange_tax_id(self, cr, uid, ids, amount, tax_id, context={}): res = { 'tax_amount':False } tax_pool = self.pool.get('account.tax') if tax_id: tax = tax_pool.browse(cr, uid, tax_id) if tax.type == 'percent': res.update({ 'tax_amount':amount * tax.amount }) if tax.type == 'fixed': res.update({ 'tax_amount':amount ... | c1a9af0020b8b799fa4ca9940cdd72d451126c08 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/c1a9af0020b8b799fa4ca9940cdd72d451126c08/voucher.py |
'tax_amount':False | 'tax_amount':False, 'amount':False | def onchange_tax_id(self, cr, uid, ids, amount, tax_id, context={}): res = { 'tax_amount':False } tax_pool = self.pool.get('account.tax') if tax_id: tax = tax_pool.browse(cr, uid, tax_id) if tax.type == 'percent': res.update({ 'tax_amount':amount * tax.amount }) if tax.type == 'fixed': res.update({ 'tax_amount':amount ... | c1a9af0020b8b799fa4ca9940cdd72d451126c08 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/c1a9af0020b8b799fa4ca9940cdd72d451126c08/voucher.py |
res.update({ 'tax_amount':amount * tax.amount }) | tax_amount = total * tax_amount and tax_amount or tax.amount | def onchange_tax_id(self, cr, uid, ids, amount, tax_id, context={}): res = { 'tax_amount':False } tax_pool = self.pool.get('account.tax') if tax_id: tax = tax_pool.browse(cr, uid, tax_id) if tax.type == 'percent': res.update({ 'tax_amount':amount * tax.amount }) if tax.type == 'fixed': res.update({ 'tax_amount':amount ... | c1a9af0020b8b799fa4ca9940cdd72d451126c08 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/c1a9af0020b8b799fa4ca9940cdd72d451126c08/voucher.py |
res.update({ 'tax_amount':amount + tax.amount }) | tax_amount = tax_amount and tax_amount or tax.amount res.update({ 'amount':total + tax_amount, 'tax_amount':tax_amount }) | def onchange_tax_id(self, cr, uid, ids, amount, tax_id, context={}): res = { 'tax_amount':False } tax_pool = self.pool.get('account.tax') if tax_id: tax = tax_pool.browse(cr, uid, tax_id) if tax.type == 'percent': res.update({ 'tax_amount':amount * tax.amount }) if tax.type == 'fixed': res.update({ 'tax_amount':amount ... | c1a9af0020b8b799fa4ca9940cdd72d451126c08 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/c1a9af0020b8b799fa4ca9940cdd72d451126c08/voucher.py |
def onchange_tax_id(self, cr, uid, ids, amount, tax_id, context={}): res = { 'tax_amount':False } tax_pool = self.pool.get('account.tax') if tax_id: tax = tax_pool.browse(cr, uid, tax_id) if tax.type == 'percent': res.update({ 'tax_amount':amount * tax.amount }) if tax.type == 'fixed': res.update({ 'tax_amount':amount ... | c1a9af0020b8b799fa4ca9940cdd72d451126c08 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/c1a9af0020b8b799fa4ca9940cdd72d451126c08/voucher.py | ||
res.update({ 'voucher_id':res_id }) new_payment_ids += [(id1, id2, res)] | if res: res.update({ 'voucher_id':res_id }) new_payment_ids += [(id1, id2, res)] | def create(self, cr, uid, vals, context={}): """ Create a new record for a model account_voucher @param cr: A database cursor @param user: ID of the user currently logged in @param vals: provides data for new record @param context: context arguments, like lang, time zone @return: Returns an id of the new record """ | c1a9af0020b8b799fa4ca9940cdd72d451126c08 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/c1a9af0020b8b799fa4ca9940cdd72d451126c08/voucher.py |
def onchange_partner_id(self, cr, uid, ids, partner_id, ttype, context={}): | def onchange_partner_id(self, cr, uid, ids, partner_id, ttype, journal_id=False, context={}): | def onchange_partner_id(self, cr, uid, ids, partner_id, ttype, context={}): """ Returns a dict that contains new values and context @param cr: A database cursor @param user: ID of the user currently logged in @param partner_id: latest value from user input for field partner_id @param args: other arguments @param conte... | c1a9af0020b8b799fa4ca9940cdd72d451126c08 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/c1a9af0020b8b799fa4ca9940cdd72d451126c08/voucher.py |
if ttype in ('sale', 'receipt'): | if ttype in ('sale'): | def onchange_partner_id(self, cr, uid, ids, partner_id, ttype, context={}): """ Returns a dict that contains new values and context @param cr: A database cursor @param user: ID of the user currently logged in @param partner_id: latest value from user input for field partner_id @param args: other arguments @param conte... | c1a9af0020b8b799fa4ca9940cdd72d451126c08 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/c1a9af0020b8b799fa4ca9940cdd72d451126c08/voucher.py |
elif ttype in ('purchase', 'payment'): | elif ttype in ('purchase'): | def onchange_partner_id(self, cr, uid, ids, partner_id, ttype, context={}): """ Returns a dict that contains new values and context @param cr: A database cursor @param user: ID of the user currently logged in @param partner_id: latest value from user input for field partner_id @param args: other arguments @param conte... | c1a9af0020b8b799fa4ca9940cdd72d451126c08 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/c1a9af0020b8b799fa4ca9940cdd72d451126c08/voucher.py |
elif ttype in ('payment', 'receipt'): journal = journal_pool.browse(cr, uid, journal_id) if ttype == 'payment': account_id = journal.default_credit_account_id.id elif ttype == 'receipt': account_id = journal.default_debit_account_id.id | def onchange_partner_id(self, cr, uid, ids, partner_id, ttype, context={}): """ Returns a dict that contains new values and context @param cr: A database cursor @param user: ID of the user currently logged in @param partner_id: latest value from user input for field partner_id @param args: other arguments @param conte... | c1a9af0020b8b799fa4ca9940cdd72d451126c08 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/c1a9af0020b8b799fa4ca9940cdd72d451126c08/voucher.py | |
def onchange_partner_id(self, cr, uid, ids, partner_id, ttype, context={}): """ Returns a dict that contains new values and context @param cr: A database cursor @param user: ID of the user currently logged in @param partner_id: latest value from user input for field partner_id @param args: other arguments @param conte... | c1a9af0020b8b799fa4ca9940cdd72d451126c08 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/c1a9af0020b8b799fa4ca9940cdd72d451126c08/voucher.py | ||
ids = move_pool.search(cr, uid, [('reconcile_id','=', False), ('state','=','posted'), ('partner_id','=',partner_id)], context=context) for move in move_pool.browse(cr, uid, ids): rs = { 'ref':move.ref or '/', 'move_id':move.id, | ids = move_line_pool.search(cr, uid, [('reconcile_id','=', False), ('partner_id','=',partner_id)], context=context) for line in move_line_pool.browse(cr, uid, ids): rs = move_line_pool.default_get(cr, uid, move_line_pool._columns.keys(), context=context) rs.update({ 'ref':line.ref or '/', 'move_id':line.move_id.id, 'mo... | def onchange_partner_id(self, cr, uid, ids, partner_id, ttype, context={}): """ Returns a dict that contains new values and context @param cr: A database cursor @param user: ID of the user currently logged in @param partner_id: latest value from user input for field partner_id @param args: other arguments @param conte... | c1a9af0020b8b799fa4ca9940cdd72d451126c08 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/c1a9af0020b8b799fa4ca9940cdd72d451126c08/voucher.py |
} | }) | def onchange_partner_id(self, cr, uid, ids, partner_id, ttype, context={}): """ Returns a dict that contains new values and context @param cr: A database cursor @param user: ID of the user currently logged in @param partner_id: latest value from user input for field partner_id @param args: other arguments @param conte... | c1a9af0020b8b799fa4ca9940cdd72d451126c08 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/c1a9af0020b8b799fa4ca9940cdd72d451126c08/voucher.py |
'account_id':move.partner_id.property_account_payable.id, | 'account_id':line.move_id.partner_id.property_account_payable.id, | def onchange_partner_id(self, cr, uid, ids, partner_id, ttype, context={}): """ Returns a dict that contains new values and context @param cr: A database cursor @param user: ID of the user currently logged in @param partner_id: latest value from user input for field partner_id @param args: other arguments @param conte... | c1a9af0020b8b799fa4ca9940cdd72d451126c08 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/c1a9af0020b8b799fa4ca9940cdd72d451126c08/voucher.py |
'amount':move.amount | 'amount':line.credit | def onchange_partner_id(self, cr, uid, ids, partner_id, ttype, context={}): """ Returns a dict that contains new values and context @param cr: A database cursor @param user: ID of the user currently logged in @param partner_id: latest value from user input for field partner_id @param args: other arguments @param conte... | c1a9af0020b8b799fa4ca9940cdd72d451126c08 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/c1a9af0020b8b799fa4ca9940cdd72d451126c08/voucher.py |
'account_id':move.partner_id.property_account_receivable.id, | 'account_id':line.move_id.partner_id.property_account_receivable.id, | def onchange_partner_id(self, cr, uid, ids, partner_id, ttype, context={}): """ Returns a dict that contains new values and context @param cr: A database cursor @param user: ID of the user currently logged in @param partner_id: latest value from user input for field partner_id @param args: other arguments @param conte... | c1a9af0020b8b799fa4ca9940cdd72d451126c08 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/c1a9af0020b8b799fa4ca9940cdd72d451126c08/voucher.py |
'amount':move.amount | 'amount':line.debit | def onchange_partner_id(self, cr, uid, ids, partner_id, ttype, context={}): """ Returns a dict that contains new values and context @param cr: A database cursor @param user: ID of the user currently logged in @param partner_id: latest value from user input for field partner_id @param args: other arguments @param conte... | c1a9af0020b8b799fa4ca9940cdd72d451126c08 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/c1a9af0020b8b799fa4ca9940cdd72d451126c08/voucher.py |
line_id = line_pool.create(cr, uid, rs) | line_id = line_pool.create(cr, uid, rs, context=context) | def onchange_partner_id(self, cr, uid, ids, partner_id, ttype, context={}): """ Returns a dict that contains new values and context @param cr: A database cursor @param user: ID of the user currently logged in @param partner_id: latest value from user input for field partner_id @param args: other arguments @param conte... | c1a9af0020b8b799fa4ca9940cdd72d451126c08 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/c1a9af0020b8b799fa4ca9940cdd72d451126c08/voucher.py |
'account_id':False, | 'account_id':inv.account_id.id, | def action_move_line_create(self, cr, uid, ids, *args): journal_pool = self.pool.get('account.journal') sequence_pool = self.pool.get('ir.sequence') move_pool = self.pool.get('account.move') move_line_pool = self.pool.get('account.move.line') analytic_pool = self.pool.get('account.analytic.line') currency_pool = self.p... | c1a9af0020b8b799fa4ca9940cdd72d451126c08 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/c1a9af0020b8b799fa4ca9940cdd72d451126c08/voucher.py |
'account_id':inv.account_id.id, | def action_move_line_create(self, cr, uid, ids, *args): journal_pool = self.pool.get('account.journal') sequence_pool = self.pool.get('ir.sequence') move_pool = self.pool.get('account.move') move_line_pool = self.pool.get('account.move.line') analytic_pool = self.pool.get('account.analytic.line') currency_pool = self.p... | c1a9af0020b8b799fa4ca9940cdd72d451126c08 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/c1a9af0020b8b799fa4ca9940cdd72d451126c08/voucher.py | |
'account_id':inv.account_id.id, | def action_move_line_create(self, cr, uid, ids, *args): journal_pool = self.pool.get('account.journal') sequence_pool = self.pool.get('ir.sequence') move_pool = self.pool.get('account.move') move_line_pool = self.pool.get('account.move.line') analytic_pool = self.pool.get('account.analytic.line') currency_pool = self.p... | c1a9af0020b8b799fa4ca9940cdd72d451126c08 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/c1a9af0020b8b799fa4ca9940cdd72d451126c08/voucher.py | |
}) | }) | def action_move_line_create(self, cr, uid, ids, *args): journal_pool = self.pool.get('account.journal') sequence_pool = self.pool.get('ir.sequence') move_pool = self.pool.get('account.move') move_line_pool = self.pool.get('account.move.line') analytic_pool = self.pool.get('account.analytic.line') currency_pool = self.p... | c1a9af0020b8b799fa4ca9940cdd72d451126c08 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/c1a9af0020b8b799fa4ca9940cdd72d451126c08/voucher.py |
res['fields']['journal_id']['selection'] = journal_list | res['fields']['journal_id']['selection'] = journal_list | 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... | c1a9af0020b8b799fa4ca9940cdd72d451126c08 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/c1a9af0020b8b799fa4ca9940cdd72d451126c08/voucher.py |
'name':fields.related('voucher_id', 'name', size=256, type='char', string='Description'), | 'name':fields.char('Description', size=256, required=True), | 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... | c1a9af0020b8b799fa4ca9940cdd72d451126c08 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/c1a9af0020b8b799fa4ca9940cdd72d451126c08/voucher.py |
pick_name = picking.name | pick_name = picking.name or '' | def create_chained_picking(self, cr, uid, moves, context=None): new_moves = [] res_obj = self.pool.get('res.company') picking_obj = self.pool.get('stock.picking') move_obj = self.pool.get('stock.move') if context is None: context = {} for picking, todo in self._chain_compute(cr, uid, moves, context=context).items(): pt... | 22fb8bcb3d659320c8804bac2c9b2c034eb0db34 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/22fb8bcb3d659320c8804bac2c9b2c034eb0db34/stock.py |
pickid = picking_obj.create(cr, uid, { 'name': pick_name, 'origin': str(picking.origin or ''), 'type': ptype, 'note': picking.note, 'move_type': picking.move_type, 'auto_picking': todo[0][1][1] == 'auto', 'stock_journal_id': todo[0][1][3], 'company_id': todo[0][1][4] or res_obj._company_default_get(cr, uid, 'stock.com... | check_picking_ids = picking_obj.search(cr, uid, [('name','=',picking.name),('origin','=',str(picking.origin or '')),('type','=',ptype),('move_type','=',picking.move_type)]) if check_picking_ids: pickid = check_picking_ids[0] else: if picking: pickid = picking_obj.create(cr, uid, { 'name': pick_name, 'origin': str(picki... | def create_chained_picking(self, cr, uid, moves, context=None): new_moves = [] res_obj = self.pool.get('res.company') picking_obj = self.pool.get('stock.picking') move_obj = self.pool.get('stock.move') if context is None: context = {} for picking, todo in self._chain_compute(cr, uid, moves, context=context).items(): pt... | 22fb8bcb3d659320c8804bac2c9b2c034eb0db34 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/22fb8bcb3d659320c8804bac2c9b2c034eb0db34/stock.py |
'company_id': company_id or res_obj._company_default_get(cr, uid, 'stock.company', context) , | 'company_id': company_id or res_obj._company_default_get(cr, uid, 'stock.company', context=context) , | def create_chained_picking(self, cr, uid, moves, context=None): new_moves = [] res_obj = self.pool.get('res.company') picking_obj = self.pool.get('stock.picking') move_obj = self.pool.get('stock.move') if context is None: context = {} for picking, todo in self._chain_compute(cr, uid, moves, context=context).items(): pt... | 22fb8bcb3d659320c8804bac2c9b2c034eb0db34 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/22fb8bcb3d659320c8804bac2c9b2c034eb0db34/stock.py |
wf_service = netsvc.LocalService("workflow") wf_service.trg_validate(uid, 'stock.picking', pickid, 'button_confirm', cr) | if pickid: wf_service = netsvc.LocalService("workflow") wf_service.trg_validate(uid, 'stock.picking', pickid, 'button_confirm', cr) | def create_chained_picking(self, cr, uid, moves, context=None): new_moves = [] res_obj = self.pool.get('res.company') picking_obj = self.pool.get('stock.picking') move_obj = self.pool.get('stock.move') if context is None: context = {} for picking, todo in self._chain_compute(cr, uid, moves, context=context).items(): pt... | 22fb8bcb3d659320c8804bac2c9b2c034eb0db34 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/22fb8bcb3d659320c8804bac2c9b2c034eb0db34/stock.py |
last_track = [line.tracking_id.id for line in self.browse(cr, uid, ids)[0].picking_id.move_lines if line.tracking_id] if not last_track: last_track = tracking_obj.create(cr, uid, {}, context=context) else: last_track.sort() last_track = last_track[-1] self.write(cr, uid, ids, {'tracking_id': last_track}) | picking = self.browse(cr, uid, ids)[0].picking_id if picking: last_track = [line.tracking_id.id for line in picking.move_lines if line.tracking_id] if not last_track: last_track = tracking_obj.create(cr, uid, {}, context=context) else: last_track.sort() last_track = last_track[-1] self.write(cr, uid, ids, {'tracking_id... | def setlast_tracking(self, cr, uid, ids, context=None): tracking_obj = self.pool.get('stock.tracking') tracking = context.get('tracking', False) last_track = [line.tracking_id.id for line in self.browse(cr, uid, ids)[0].picking_id.move_lines if line.tracking_id] if not last_track: last_track = tracking_obj.create(cr, u... | 22fb8bcb3d659320c8804bac2c9b2c034eb0db34 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/22fb8bcb3d659320c8804bac2c9b2c034eb0db34/stock.py |
coeff_def2uom, rounding = self._from_default_uom_factor( cr, uid, val, product_uom, {}) | coeff_def2uom, round_value = self._from_default_uom_factor( cr, uid, val, product_uom, {}) | def product_amt_change(self, cr, uid, ids, product_amt = 0.0, product_uom=False): ret={} if product_amt: coeff_def2uom = 1 val1 = self.browse(cr, uid, ids) val = val1[0] if (product_uom != val.product_id.uom_id.id): coeff_def2uom, rounding = self._from_default_uom_factor( cr, uid, val, product_uom, {}) ret['product_qty... | 8dd9bd5477d4ad7e10e2a2956b10c669141881b8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/8dd9bd5477d4ad7e10e2a2956b10c669141881b8/stock_planning.py |
pos_box_entries() | pos_box_entries() | def get_in(self, cr, uid, ids, context): | fb7b3153b03026d384beb6a29f3e24b09e9a25bc /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/fb7b3153b03026d384beb6a29f3e24b09e9a25bc/pos_box_entries.py |
active_id = context.get('active_id', False) | active_id = context.get('active_id', False) | 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.... | 56ded53b7c4ecc641bb26ee15d6f0d72b900ebed /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/56ded53b7c4ecc641bb26ee15d6f0d72b900ebed/pos_payment.py |
order = self.pool.get('pos.order').browse(cr, uid, active_id) if order.amount_total == order.amount_paid: res['arch'] = """ <form string="Make Payment" colspan="4"> <group col="2" colspan="2"> <label string="Do you want to print the Receipt?" colspan="4"/> <separator colspan="4"/> <button icon="gtk-cancel" special="can... | try: order = self.pool.get('pos.order').browse(cr, uid, active_id) if order.amount_total == order.amount_paid: res['arch'] = """ <form string="Make Payment" colspan="4"> <group col="2" colspan="2"> <label string="Do you want to print the Receipt?" colspan="4"/> <separator colspan="4"/> <button icon="gtk-cancel" special... | 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.... | 56ded53b7c4ecc641bb26ee15d6f0d72b900ebed /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/56ded53b7c4ecc641bb26ee15d6f0d72b900ebed/pos_payment.py |
def _tag_act_window(self, cr, rec, data_node=None): name = rec.get('name','').encode('utf-8') xml_id = rec.get('id','').encode('utf8') self._test_xml_id(xml_id) type = rec.get('type','').encode('utf-8') or 'ir.actions.act_window' view_id = False if rec.get('view'): view_id = self.id_get(cr, 'ir.actions.act_window', rec... | 7678e0bafcd5df63967164256496c64460ea7739 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/7678e0bafcd5df63967164256496c64460ea7739/convert.py | ||
self.baseuri = "http://%s:%d/"% (self.server.server_name, self.server.server_port) | addr, port = self.server.server_name, self.server.server_port try: addr, port = self.request.getsockname() except Exception, e: self.log_error("Cannot calculate own address:" , e) self.baseuri = "http://%s:%d/"% (addr, port) | def setup(self): self.davpath = '/'+config.get_misc('webdav','vdir','webdav') self.baseuri = "http://%s:%d/"% (self.server.server_name, self.server.server_port) self.IFACE_CLASS = openerp_dav_handler(self, self.verbose) | 329c9a003ce4702f3589555fe18cf42a198678d6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/329c9a003ce4702f3589555fe18cf42a198678d6/webdav_server.py |
super(Function, self).__init__(**kwargs) | super(Report, self).__init__(**kwargs) | def __init__(self, model, name, string, **kwargs): self.model = model self.name = name self.string = string super(Function, self).__init__(**kwargs) | 83d7ae2d21b8255ec8d4844b06ba1e56ae2fbda3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/83d7ae2d21b8255ec8d4844b06ba1e56ae2fbda3/yaml_test.py |
'origin': fields.related('picking_id','origin',type='char', size=64, relation="stock.picking", string="Origin"), | 'origin': fields.related('picking_id','origin',type='char', size=64, relation="stock.picking", string="Origin",store=True), | def _check_product_lot(self, cr, uid, ids): """ Checks whether move is done or not and production lot is assigned to that move. @return: True or False """ for move in self.browse(cr, uid, ids): if move.prodlot_id and move.state == 'done' and (move.prodlot_id.product_id.id != move.product_id.id): return False return Tru... | d206e9e29cfdc7269319f18fa30f5b67ac548f0f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/d206e9e29cfdc7269319f18fa30f5b67ac548f0f/stock.py |
'partner_id': fields.related('partner_address_id', 'partner_id', type='many2one', relation='res.partner', string='Partner'), | 'partner_id': fields.related('partner_address_id', 'partner_id', type='many2one', relation='res.partner', string='Partner', help="Partner related to contact"), | 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']).replace('_', '-'), r['name']) for r in res] return res | 49c6c0a69eb0396c97736528dbc1294b631b805e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/49c6c0a69eb0396c97736528dbc1294b631b805e/base_calendar.py |
res_id = False model = None | res_id = context.get('active_id') model = context.get('active_model') | def on_change_history(self, cr, uid, ids, history, context=None): """Gives message body according to type of history selected * info: Forward the case information * whole: Send the whole history * latest: Send the latest histoy @param self: The object pointer @param cr: the current row, from the database cursor, @param... | 8ce1789a575992f1cc7eab99ee1f1d6a9839d4c3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/8ce1789a575992f1cc7eab99ee1f1d6a9839d4c3/crm_forward_to_partner.py |
res = self.create_period(cr, uid, ids, context, 6, 'Weekly') | res = self.create_period(cr, uid, ids, context=context) | def create_period_weekly(self, cr, uid, ids, context=None): res = self.create_period(cr, uid, ids, context, 6, 'Weekly') return { 'view_type': 'form', "view_mode": 'tree', 'res_model': 'stock.period', 'type': 'ir.actions.act_window', } | 0f352e33e969aacf69679cacc88e0cbfd6a277f9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/0f352e33e969aacf69679cacc88e0cbfd6a277f9/stock_planning.py |
def create_period_monthly(self,cr, uid, ids, interval=1, context=None): | def create_period_monthly(self, cr, uid, ids, context=None): interval = context.get('interval',1) | def create_period_monthly(self,cr, uid, ids, interval=1, context=None): for p in self.browse(cr, uid, ids, context=context): dt = p.date_start ds = mx.DateTime.strptime(p.date_start, '%Y-%m-%d') while ds.strftime('%Y-%m-%d') < p.date_stop: de = ds + RelativeDateTime(months=interval, minutes=-1) self.pool.get('stock.per... | 0f352e33e969aacf69679cacc88e0cbfd6a277f9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/0f352e33e969aacf69679cacc88e0cbfd6a277f9/stock_planning.py |
def create_period(self, cr, uid, ids, interval=0, name='Daily', context=None): | def create_period(self, cr, uid, ids, context=None): interval = context.get('interval',0) name = context.get('name','Daily') | def create_period(self, cr, uid, ids, interval=0, name='Daily', context=None): for p in self.browse(cr, uid, ids, context=context): dt = p.date_start ds = mx.DateTime.strptime(p.date_start, '%Y-%m-%d') while ds.strftime('%Y-%m-%d') < p.date_stop: de = ds + RelativeDateTime(days=interval, minutes =-1) if name =='Daily':... | 0f352e33e969aacf69679cacc88e0cbfd6a277f9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/0f352e33e969aacf69679cacc88e0cbfd6a277f9/stock_planning.py |
if address_id: | if address_id['default']: | def action_apply(self, cr, uid, ids, context=None): """ This converts Phonecall to Opportunity and opens Phonecall view @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 Phonecall to Opportunity IDs @param con... | a5c3f8a8de2488250c7b81b12226db43f0b67ccc /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/a5c3f8a8de2488250c7b81b12226db43f0b67ccc/crm_phonecall_to_opportunity.py |
self.write(cr, uid, ids, {'state':'closed', 'active':False}) | self.write(cr, uid, ids, {'state':'closed'}) | def request_close(self, cr, uid, ids, *args): self.write(cr, uid, ids, {'state':'closed', 'active':False}) return True | 32847c3ebd4d684e2f4179c2029df2a648ad4638 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/32847c3ebd4d684e2f4179c2029df2a648ad4638/res_request.py |
'date_sent': lambda *a: time.strftime('%Y-%m-%d %H:%M:%S'), | 'date_sent': lambda *a: time.strftime('%Y-%m-%d %H:%M:%S'), | def request_get(self, cr, uid): cr.execute('select id from res_request where act_to=%s and (trigger_date<=%s or trigger_date is null) and active=True', (uid,time.strftime('%Y-%m-%d'))) ids = map(lambda x:x[0], cr.fetchall()) cr.execute('select id from res_request where act_from=%s and (act_to<>%s) and (trigger_date<=%s... | 32847c3ebd4d684e2f4179c2029df2a648ad4638 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/32847c3ebd4d684e2f4179c2029df2a648ad4638/res_request.py |
return [(str(r['id']),r['name']) for r in res] cr.execute("""SELECT to_char(id, '99999'),name FROM project_project where manager=%s OR id IN (SELECT project_id from project_user_rel where uid=%s)""" % (uid, uid)) return cr.fetchall() | else: cr.execute("""SELECT project.id,project.name FROM project_project project LEFT JOIN account_analytic_account account ON account.id = project.category_id WHERE (account.user_id = %s)""", uid) res = cr.fetchall() res = [(str(r['id']),r['name']) for r in res] return res | def _project_get(self, cr, uid, context={}): if uid==1: ids = self.pool.get('project.project').search(cr, uid, []) res = self.pool.get('project.project').read(cr, uid, ids, ['id','name'], context) return [(str(r['id']),r['name']) for r in res] cr.execute("""SELECT to_char(id, '99999'),name FROM project_project where ma... | 741bbcb6cd0c63b9fceb20fca20b10df699ea8f2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/741bbcb6cd0c63b9fceb20fca20b10df699ea8f2/project.py |
cr.execute("SELECT SUM(amount) FROM account_analytic_line WHERE account_id=%s AND (date " | if line.analytic_account_id.id: cr.execute("SELECT SUM(amount) FROM account_analytic_line WHERE account_id=%s AND (date " | def _prac_amt(self, cr, uid, ids, context={}): res = {} for line in self.browse(cr, uid, ids): acc_ids = [x.id for x in line.general_budget_id.account_ids] if not acc_ids: raise osv.except_osv(_('Error!'),_("The General Budget '%s' has no Accounts!") % str(line.general_budget_id.name)) date_to = line.date_to date_from ... | 1d537d4724ed064c0b517a03539db982762270b0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/1d537d4724ed064c0b517a03539db982762270b0/account_budget.py |
result = cr.fetchone()[0] | result = cr.fetchone()[0] | def _prac_amt(self, cr, uid, ids, context={}): res = {} for line in self.browse(cr, uid, ids): acc_ids = [x.id for x in line.general_budget_id.account_ids] if not acc_ids: raise osv.except_osv(_('Error!'),_("The General Budget '%s' has no Accounts!") % str(line.general_budget_id.name)) date_to = line.date_to date_from ... | 1d537d4724ed064c0b517a03539db982762270b0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/1d537d4724ed064c0b517a03539db982762270b0/account_budget.py |
delay = partner_rec and partner_rec.delay or False newdate = newdate -(delay or datetime.strptime(tender.date_start, '%Y-%m-%d %H:%M:%S') ) | delay = partner_rec and partner_rec.delay or 0.0 newdate = newdate -(delay and relativedelta(days=delay) or datetime.strptime(tender.date_start, '%Y-%m-%d %H:%M:%S') ) | def create_order(self, cr, uid, ids, context): """ To Create a purchase orders . | 6cfd6625cc4a63ea13d348e0daa7527f65a8c9c9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/6cfd6625cc4a63ea13d348e0daa7527f65a8c9c9/purchase_requisition_partner.py |
sub = (email.Subject).replace(' ','') | sub = msg.get('subject','NO-SUBJECT').replace(' ','') | def history_message(self, cr, uid, vals): dictcreate = dict(vals) ref_ids = str(dictcreate.get('ref_ids')).split(';') msg = dictcreate.get('message') msg = self.pool.get('email.server.tools').parse_message(msg) server_tools_pool = self.pool.get('email.server.tools') message_id = msg.get('message-id', False) msg_pool = ... | f387313e2357155c885d50a7f45f673a9bbdcc34 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/f387313e2357155c885d50a7f45f673a9bbdcc34/partner.py |
new_ids = ids | new_ids = 'active_ids' in data['form']['context'] and data['form']['context']['active_ids'] or [] | def set_context(self, objects, data, ids, report_type = None): ## self.borne_date = self.get_min_date(data['form']) ## new_ids = [] if (data['model'] == 'account.account'): new_ids = ids else: new_ids.append(data['form']['Account_list']) | 7bbc9e1d4daca5c96d5dc405bb02d2a925851e27 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/7bbc9e1d4daca5c96d5dc405bb02d2a925851e27/general_ledger.py |
cr.sql_log=1 | def __init__(self, cr, uid, name, context): super(general_ledger, self).__init__(cr, uid, name, context=context) cr.sql_log=1 self.date_borne = {} self.query = "" self.child_ids = "" self.tot_currency = 0.0 self.period_sql = "" self.sold_accounts = {} self.localcontext.update( { 'time': time, 'lines': self.lines, 'sum_... | 7bbc9e1d4daca5c96d5dc405bb02d2a925851e27 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/7bbc9e1d4daca5c96d5dc405bb02d2a925851e27/general_ledger.py | |
other_invitation_ids = self.search(cr, uid, [('ref', '=', res_obj._name + ',' + str(res_obj.id))])a | other_invitation_ids = self.search(cr, uid, [('ref', '=', res_obj._name + ',' + str(res_obj.id))]) | def _send_mail(self, cr, uid, ids, mail_to, email_from=tools.config.get('email_from', False), context=None): """ Send mail for event invitation to event attendees. @param cr: the current row, from the database cursor, @param uid: the current user’s ID for security checks, @param ids: List of attendee’s IDs. @param emai... | 5783cb0ae7a995fa28e0578f46967f7d74d4ae44 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/5783cb0ae7a995fa28e0578f46967f7d74d4ae44/base_calendar.py |
return {'value': {'vtimezone': None}} value = {'vtimezone': None} | return {'value': {'vtimezone': False}} value = {'vtimezone': False} | def onchange_user_id(self, cr, uid, ids, user_id, *args, **argv): if not user_id: return {'value': {'vtimezone': None}} value = {'vtimezone': None} cr.execute('select context_tz from res_users where id=%s' % (user_id)) timezone = cr.fetchone()[0] if timezone: value.update({'vtimezone': timezone.lower()}) return {'value... | d2a634c9ad7d24c5502cbbd861444f67cc2c1145 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/d2a634c9ad7d24c5502cbbd861444f67cc2c1145/caldav.py |
cr.execute('select id from %s where recurrent_uid=%s' % (self._table, event_id)) | cr.execute("select id from %s where recurrent_uid=%%s" % (self._table), (event_id,)) | def unlink_events(self, cr, uid, ids, context=None): """ This function deletes event which are linked with the event with recurrent_uid (Removes the events which refers to the same UID value) """ if not context: context = {} for event_id in ids: cr.execute('select id from %s where recurrent_uid=%s' % (self._table, eve... | 469691d5cff52fe60d7d16f1dcd06a942c9e36da /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/469691d5cff52fe60d7d16f1dcd06a942c9e36da/base_calendar.py |
cr.execute(qry, val) | cr.execute(qry % val) | def _set_rrulestring(self, cr, uid, id, name, value, arg, context=None): """ Sets values of fields that defines event recurrence from the value of rrule 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 dictio... | 469691d5cff52fe60d7d16f1dcd06a942c9e36da /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/469691d5cff52fe60d7d16f1dcd06a942c9e36da/base_calendar.py |
resource = reduce(operator.or_, resources) | try: resource = reduce(operator.or_, resources) except: raise osv.except_osv(_('Error'), _('Should have Resources Allocation or Project Members!')) | def Project(): title = "Project" start = datetime.strftime(datetime.strptime(start_date, "%Y-%m-%d"), "%Y-%m-%d %H:%M") resource = reduce(operator.or_, resources) minimum_time_unit = 1 if calendar_id: # If project has working calendar working_days = resource_pool.compute_working_calendar(cr, uid, calendar_id... | 621f24aee4ded5f4982e4c16c0f8cb46f1a3607a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/621f24aee4ded5f4982e4c16c0f8cb46f1a3607a/project_long_term.py |
categ_ids = categ_obj.search(cr, uid, [('name','ilike','Part%')]) | categ_ids = categ_obj.search(cr, uid, [('name','ilike','other%')]) | def make_opportunity(self, cr, uid, ids, context): """ @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 """ | 75b72c807449a85222448b367f131209161fdce7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/75b72c807449a85222448b367f131209161fdce7/crm_partner_to_opportunity.py |
self.log_error("Could not run %s: %s" % (mname, e)) self._get_ignore_body(fore) | self.log_error("Could not run %s: %s", mname, e) | def _handle_one_foreign(self,fore, path, auth_provider): """ This method overrides the handle_one_request for *children* handlers. It is required, since the first line should not be read again.. | d0eb1d75164ab218856f107ccfdae06dfd1179b4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/d0eb1d75164ab218856f107ccfdae06dfd1179b4/websrv_lib.py |
leaves = wkcal.compute_leaves(cr, uid, calendar_id , resource_id[0], resource.get('calendar_id')[0]) | if resource.get('calendar_id', False): leaves = wkcal.compute_leaves(cr, uid, calendar_id , resource_id[0], resource['calendar_id'] and resource['calendar_id'][0] or False) | def _compute_date(self, cr, uid, data, context): """ Schedule the tasks according to resource available and priority. """ pool = pooler.get_pool(cr.dbname) project_obj = pool.get('project.project') task_pool = pool.get('project.task') resource_obj = pool.get('resource.resource') user_obj = pool.get('res.users') project... | 5653f51a43724eaacc1fff4464501803d6b4d59f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/5653f51a43724eaacc1fff4464501803d6b4d59f/compute_tasks_date.py |
elif data['form']['result_selection'] == 'customer': self.ACCOUNT_TYPE = ['payable'] | def set_context(self, objects, data, ids, report_type = None): PARTNER_REQUEST = '' if (data['model'] == 'res.partner'): ## Si on imprime depuis les partenaires if ids: #PARTNER_REQUEST = "AND line.partner_id IN (" + ','.join(map(str, ids)) + ")" PARTNER_REQUEST = "AND line.partner_id =ANY(%s)" %ids # Transformation ... | 0e86ee70b47eb3965d8413f42e737efe0d78bb3a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/0e86ee70b47eb3965d8413f42e737efe0d78bb3a/third_party_ledger.py | |
mname = prefix + "_" + prop | mname = prefix + "_" + prop.replace('-','_') | def get_dav_eprop(self, cr, ns, prop): if not self.DAV_M_NS: return None if self.DAV_M_NS.has_key(ns): prefix = self.DAV_M_NS[ns] else: logger.debug('No namespace: %s ("%s")',ns, prop) return None | 780258d5675bd01bfb12597753fe6dcd860be5bb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/780258d5675bd01bfb12597753fe6dcd860be5bb/nodes.py |
if cls.exits(name): | if cls.exists(name): | def remove(cls, name): if cls.exits(name): cls._services.pop(name) | 9008ced144a09a5057ffa15d4fdc05a172ef430a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/9008ced144a09a5057ffa15d4fdc05a172ef430a/netsvc.py |
company_id = self.pool.get('res.users').browse(cr, uid, [uid], context)[0].company_id | company_id = self.browse(cr, uid, ids, context)[0].company_id | 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_sequence = self.pool.get('ir.sequence') obj_acc_template = self.pool.get('account.account.template') obj_fiscal_posi... | 4547ad4eda0ac390dcd582483cb67e16a6578e7b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/4547ad4eda0ac390dcd582483cb67e16a6578e7b/installer.py |
company_id = self.pool.get('res.users').browse(cr, uid, [uid], context)[0].company_id | company_id = record.company_id | def execute(self, cr, uid, ids, context=None): if context is None: context = {} fy_obj = self.pool.get('account.fiscalyear') mod_obj = self.pool.get('ir.model.data') obj_acc = self.pool.get('account.account') obj_tax_code = self.pool.get('account.tax.code') obj_temp_tax_code = self.pool.get('account.tax.code.template')... | 4547ad4eda0ac390dcd582483cb67e16a6578e7b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/4547ad4eda0ac390dcd582483cb67e16a6578e7b/installer.py |
def print_report(self, cr, uid, ids, context=None): | def print_report(self, cr, uid, ids, context={}): | def print_report(self, cr, uid, ids, context=None): | 350cfd98b11acdd6ea3b80d7c6f6edb2299b4fe0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/350cfd98b11acdd6ea3b80d7c6f6edb2299b4fe0/pos_details.py |
@summary: To get the date and print the report @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 : retrun report """ datas = {'ids' : context.get('active_ids',[])} res = self.read(cr, uid, ids, ['date_start','date_e... | To get the date and print the report @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 : retrun report """ datas = {'ids' : context.get('active_ids', [])} res = self.read(cr, uid, ids, ['date_start','date_end'], co... | def print_report(self, cr, uid, ids, context=None): | 350cfd98b11acdd6ea3b80d7c6f6edb2299b4fe0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/350cfd98b11acdd6ea3b80d7c6f6edb2299b4fe0/pos_details.py |
'type' : 'ir.actions.report.xml', 'report_name':'pos.details', 'datas' : datas, | 'type':'ir.actions.report.xml', 'report_name':'pos.details', 'datas':datas, | def print_report(self, cr, uid, ids, context=None): | 350cfd98b11acdd6ea3b80d7c6f6edb2299b4fe0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/350cfd98b11acdd6ea3b80d7c6f6edb2299b4fe0/pos_details.py |
def print_report(self, cr, uid, ids, context=None): | 350cfd98b11acdd6ea3b80d7c6f6edb2299b4fe0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/350cfd98b11acdd6ea3b80d7c6f6edb2299b4fe0/pos_details.py | ||
def print_report(self, cr, uid, ids, context=None): | 350cfd98b11acdd6ea3b80d7c6f6edb2299b4fe0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/350cfd98b11acdd6ea3b80d7c6f6edb2299b4fe0/pos_details.py | ||
(qu1, qu2, tables) = self._where_calc(cr, uid, domain, context=context) | (where_clause, where_params, tables) = self._where_calc(cr, uid, domain, context=context) | def read_group(self, cr, uid, domain, fields, groupby, offset=0, limit=None, context=None): context = context or {} self.pool.get('ir.model.access').check(cr, uid, self._name, 'read', context=context) if not fields: fields = self._columns.keys() | dad082f9991b97ad75f54e84689c074e2a578247 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/dad082f9991b97ad75f54e84689c074e2a578247/orm.py |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.