rem
stringlengths 1
322k
| add
stringlengths 0
2.05M
| context
stringlengths 4
228k
| meta
stringlengths 156
215
|
---|---|---|---|
res[partner.id]['membership_cancel'] = member_line_obj.read(cr, uid, line_id2[0],['date_cancel'])['date_cancel'] | res[partner.id]['membership_cancel'] = member_line_obj.read(cr, uid, line_id2[0], ['date_cancel'], context=context)['date_cancel'] | def _membership_date(self, cr, uid, ids, name, args, context=None): | 2a4c1e50cb967d4599507ed63424b4f85c7753ea /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/2a4c1e50cb967d4599507ed63424b4f85c7753ea/membership.py |
return super(Partner, self).copy(cr, uid, id, default, context) | return super(Partner, self).copy(cr, uid, id, default, context=context) | def copy(self, cr, uid, id, default=None, context=None): if default is None: default = {} if context is None: context = {} default = default.copy() default['member_lines'] = [] return super(Partner, self).copy(cr, uid, id, default, context) | 2a4c1e50cb967d4599507ed63424b4f85c7753ea /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/2a4c1e50cb967d4599507ed63424b4f85c7753ea/membership.py |
} ) | }, context=context) | def create_membership_invoice(self, cr, uid, ids, product_id=None, datas=None, context=None): """ Create Customer Invoice of Membership for partners. @param datas: datas has dictionary value which consist Id of Membership product and Cost Amount of Membership. datas = {'membership_product_id': None, 'amount':None} """ invoice_obj = self.pool.get('account.invoice') product_obj = self.pool.get('product.product') invoice_line_obj = self.pool.get('account.invoice.line') invoice_tax_obj = self.pool.get('account.invoice.tax') product_id = product_id or datas.get('membership_product_id',False) amount = datas.get('amount', 0.0) if not context: context={} invoice_list = [] if type(ids) in (int,long,): ids = [ids] for partner in self.browse(cr, uid, ids, context=context): account_id = partner.property_account_receivable and partner.property_account_receivable.id or False fpos_id = partner.property_account_position and partner.property_account_position.id or False addr = self.address_get(cr, uid, [partner.id], ['invoice']) if partner.free_member: raise osv.except_osv(_('Error !'), _("Partner is a free Member.")) if not addr.get('invoice', False): raise osv.except_osv(_('Error !'), _("Partner doesn't have an address to make the invoice.")) quantity = 1 line_value = { 'product_id' : product_id, } | 2a4c1e50cb967d4599507ed63424b4f85c7753ea /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/2a4c1e50cb967d4599507ed63424b4f85c7753ea/membership.py |
model_data_ids_form = model_obj.search(cr,user,[('model','=','ir.ui.view'),('name','in',['membership_products_form','membership_products_tree'])]) resource_id_form = model_obj.read(cr, user, model_data_ids_form, fields=['res_id','name']) | model_data_ids_form = model_obj.search(cr,user,[('model','=','ir.ui.view'),('name','in',['membership_products_form','membership_products_tree'])], context=context) resource_id_form = model_obj.read(cr, user, model_data_ids_form, fields=['res_id','name'], context=context) | def fields_view_get(self, cr, user, view_id=None, view_type='form', context=None, toolbar=False, submenu=False): model_obj = self.pool.get('ir.model.data') | 2a4c1e50cb967d4599507ed63424b4f85c7753ea /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/2a4c1e50cb967d4599507ed63424b4f85c7753ea/membership.py |
def action_cancel(self, cr, uid, ids, context=None): | def action_cancel(self, cr, uid, ids, *args): | def action_cancel(self, cr, uid, ids, context=None): '''Create a 'date_cancel' on the membership_line object''' if context is None: context = {} member_line_obj = self.pool.get('membership.membership_line') today = time.strftime('%Y-%m-%d') for invoice in self.browse(cr, uid, ids): mlines = member_line_obj.search(cr, uid, [('account_invoice_line','in', [ l.id for l in invoice.invoice_line])], context) member_line_obj.write(cr, uid, mlines, {'date_cancel':today}, context) return super(Invoice, self).action_cancel(cr, uid, ids, context) | 2a4c1e50cb967d4599507ed63424b4f85c7753ea /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/2a4c1e50cb967d4599507ed63424b4f85c7753ea/membership.py |
if context is None: context = {} | def action_cancel(self, cr, uid, ids, context=None): '''Create a 'date_cancel' on the membership_line object''' if context is None: context = {} member_line_obj = self.pool.get('membership.membership_line') today = time.strftime('%Y-%m-%d') for invoice in self.browse(cr, uid, ids): mlines = member_line_obj.search(cr, uid, [('account_invoice_line','in', [ l.id for l in invoice.invoice_line])], context) member_line_obj.write(cr, uid, mlines, {'date_cancel':today}, context) return super(Invoice, self).action_cancel(cr, uid, ids, context) | 2a4c1e50cb967d4599507ed63424b4f85c7753ea /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/2a4c1e50cb967d4599507ed63424b4f85c7753ea/membership.py |
|
[ l.id for l in invoice.invoice_line])], context) member_line_obj.write(cr, uid, mlines, {'date_cancel':today}, context) return super(Invoice, self).action_cancel(cr, uid, ids, context) | [ l.id for l in invoice.invoice_line])]) member_line_obj.write(cr, uid, mlines, {'date_cancel':today}) return super(Invoice, self).action_cancel(cr, uid, ids) | def action_cancel(self, cr, uid, ids, context=None): '''Create a 'date_cancel' on the membership_line object''' if context is None: context = {} member_line_obj = self.pool.get('membership.membership_line') today = time.strftime('%Y-%m-%d') for invoice in self.browse(cr, uid, ids): mlines = member_line_obj.search(cr, uid, [('account_invoice_line','in', [ l.id for l in invoice.invoice_line])], context) member_line_obj.write(cr, uid, mlines, {'date_cancel':today}, context) return super(Invoice, self).action_cancel(cr, uid, ids, context) | 2a4c1e50cb967d4599507ed63424b4f85c7753ea /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/2a4c1e50cb967d4599507ed63424b4f85c7753ea/membership.py |
for line in self.browse(cr, uid, ids): | for line in self.browse(cr, uid, ids, context=context): | def write(self, cr, uid, ids, vals, context=None): """Overrides orm write method """ if not context: context={} res = super(account_invoice_line, self).write(cr, uid, ids, vals, context=context) member_line_obj = self.pool.get('membership.membership_line') for line in self.browse(cr, uid, ids): if line.invoice_id.type == 'out_invoice': ml_ids = member_line_obj.search(cr, uid, [('account_invoice_line','=',line.id)]) if line.product_id and line.product_id.membership and not ml_ids: # Product line has changed to a membership product date_from = line.product_id.membership_date_from date_to = line.product_id.membership_date_to if line.invoice_id.date_invoice > date_from and line.invoice_id.date_invoice < date_to: date_from = line.invoice_id.date_invoice line_id = member_line_obj.create(cr, uid, { 'partner': line.invoice_id.partner_id.id, 'membership_id': line.product_id.id, 'member_price': line.price_unit, 'date': time.strftime('%Y-%m-%d'), 'date_from': date_from, 'date_to': date_to, 'account_invoice_line': line.id, }) if line.product_id and not line.product_id.membership and ml_ids: # Product line has changed to a non membership product member_line_obj.unlink(cr, uid, ml_ids, context=context) return res | 2a4c1e50cb967d4599507ed63424b4f85c7753ea /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/2a4c1e50cb967d4599507ed63424b4f85c7753ea/membership.py |
ml_ids = member_line_obj.search(cr, uid, [('account_invoice_line','=',line.id)]) | ml_ids = member_line_obj.search(cr, uid, [('account_invoice_line','=',line.id)], context=context) | def write(self, cr, uid, ids, vals, context=None): """Overrides orm write method """ if not context: context={} res = super(account_invoice_line, self).write(cr, uid, ids, vals, context=context) member_line_obj = self.pool.get('membership.membership_line') for line in self.browse(cr, uid, ids): if line.invoice_id.type == 'out_invoice': ml_ids = member_line_obj.search(cr, uid, [('account_invoice_line','=',line.id)]) if line.product_id and line.product_id.membership and not ml_ids: # Product line has changed to a membership product date_from = line.product_id.membership_date_from date_to = line.product_id.membership_date_to if line.invoice_id.date_invoice > date_from and line.invoice_id.date_invoice < date_to: date_from = line.invoice_id.date_invoice line_id = member_line_obj.create(cr, uid, { 'partner': line.invoice_id.partner_id.id, 'membership_id': line.product_id.id, 'member_price': line.price_unit, 'date': time.strftime('%Y-%m-%d'), 'date_from': date_from, 'date_to': date_to, 'account_invoice_line': line.id, }) if line.product_id and not line.product_id.membership and ml_ids: # Product line has changed to a non membership product member_line_obj.unlink(cr, uid, ml_ids, context=context) return res | 2a4c1e50cb967d4599507ed63424b4f85c7753ea /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/2a4c1e50cb967d4599507ed63424b4f85c7753ea/membership.py |
}) | }, context=context) | def write(self, cr, uid, ids, vals, context=None): """Overrides orm write method """ if not context: context={} res = super(account_invoice_line, self).write(cr, uid, ids, vals, context=context) member_line_obj = self.pool.get('membership.membership_line') for line in self.browse(cr, uid, ids): if line.invoice_id.type == 'out_invoice': ml_ids = member_line_obj.search(cr, uid, [('account_invoice_line','=',line.id)]) if line.product_id and line.product_id.membership and not ml_ids: # Product line has changed to a membership product date_from = line.product_id.membership_date_from date_to = line.product_id.membership_date_to if line.invoice_id.date_invoice > date_from and line.invoice_id.date_invoice < date_to: date_from = line.invoice_id.date_invoice line_id = member_line_obj.create(cr, uid, { 'partner': line.invoice_id.partner_id.id, 'membership_id': line.product_id.id, 'member_price': line.price_unit, 'date': time.strftime('%Y-%m-%d'), 'date_from': date_from, 'date_to': date_to, 'account_invoice_line': line.id, }) if line.product_id and not line.product_id.membership and ml_ids: # Product line has changed to a non membership product member_line_obj.unlink(cr, uid, ml_ids, context=context) return res | 2a4c1e50cb967d4599507ed63424b4f85c7753ea /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/2a4c1e50cb967d4599507ed63424b4f85c7753ea/membership.py |
ml_ids = member_line_obj.search(cr, uid, [('account_invoice_line','=',id)]) | ml_ids = member_line_obj.search(cr, uid, [('account_invoice_line','=',id)], context=context) | def unlink(self, cr, uid, ids, context=None): """Remove Membership Line Record for Account Invoice Line """ if not context: context={} member_line_obj = self.pool.get('membership.membership_line') for id in ids: ml_ids = member_line_obj.search(cr, uid, [('account_invoice_line','=',id)]) member_line_obj.unlink(cr, uid, ml_ids, context=context) return super(account_invoice_line, self).unlink(cr, uid, ids, context=context) | 2a4c1e50cb967d4599507ed63424b4f85c7753ea /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/2a4c1e50cb967d4599507ed63424b4f85c7753ea/membership.py |
def create(self, cr, uid, vals, context={}): | def create(self, cr, uid, vals, context=None): | def create(self, cr, uid, vals, context={}): """Overrides orm create method """ result = super(account_invoice_line, self).create(cr, uid, vals, context) line = self.browse(cr, uid, result) member_line_obj = self.pool.get('membership.membership_line') if line.invoice_id.type == 'out_invoice': | 2a4c1e50cb967d4599507ed63424b4f85c7753ea /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/2a4c1e50cb967d4599507ed63424b4f85c7753ea/membership.py |
result = super(account_invoice_line, self).create(cr, uid, vals, context) line = self.browse(cr, uid, result) | result = super(account_invoice_line, self).create(cr, uid, vals, context=context) line = self.browse(cr, uid, result, context=context) | def create(self, cr, uid, vals, context={}): """Overrides orm create method """ result = super(account_invoice_line, self).create(cr, uid, vals, context) line = self.browse(cr, uid, result) member_line_obj = self.pool.get('membership.membership_line') if line.invoice_id.type == 'out_invoice': | 2a4c1e50cb967d4599507ed63424b4f85c7753ea /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/2a4c1e50cb967d4599507ed63424b4f85c7753ea/membership.py |
ml_ids = member_line_obj.search(cr, uid, [('account_invoice_line','=',line.id)]) | ml_ids = member_line_obj.search(cr, uid, [('account_invoice_line','=',line.id)], context=context) | def create(self, cr, uid, vals, context={}): """Overrides orm create method """ result = super(account_invoice_line, self).create(cr, uid, vals, context) line = self.browse(cr, uid, result) member_line_obj = self.pool.get('membership.membership_line') if line.invoice_id.type == 'out_invoice': | 2a4c1e50cb967d4599507ed63424b4f85c7753ea /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/2a4c1e50cb967d4599507ed63424b4f85c7753ea/membership.py |
}) | }, context=context) | def create(self, cr, uid, vals, context={}): """Overrides orm create method """ result = super(account_invoice_line, self).create(cr, uid, vals, context) line = self.browse(cr, uid, result) member_line_obj = self.pool.get('membership.membership_line') if line.invoice_id.type == 'out_invoice': | 2a4c1e50cb967d4599507ed63424b4f85c7753ea /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/2a4c1e50cb967d4599507ed63424b4f85c7753ea/membership.py |
uid = self.uid | 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.get('view','').encode('utf-8')) domain = rec.get('domain','').encode('utf-8') or '{}' context = rec.get('context','').encode('utf-8') or '{}' res_model = rec.get('res_model','').encode('utf-8') src_model = rec.get('src_model','').encode('utf-8') view_type = rec.get('view_type','').encode('utf-8') or 'form' view_mode = rec.get('view_mode','').encode('utf-8') or 'tree,form' usage = rec.get('usage','').encode('utf-8') limit = rec.get('limit','').encode('utf-8') auto_refresh = rec.get('auto_refresh','').encode('utf-8') | 197f89966ba51d68a406fb4bd5525173913d354e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/197f89966ba51d68a406fb4bd5525173913d354e/convert.py |
|
gid = super(groups, self).create(cr, uid, vals, context=context) | gid = super(groups, self).create(cr, uid, vals, context=context) | def create(self, cr, uid, vals, context=None): if 'name' in vals: if vals['name'].startswith('-'): raise osv.except_osv(_('Error'), _('The name of the group can not start with "-"')) gid = super(groups, self).create(cr, uid, vals, context=context) if context and context.get('noadmin', False): pass else: # assign this new group to user_root user_obj = self.pool.get('res.users') aid = user_obj.browse(cr, 1, user_obj._get_admin_id(cr)) if aid: aid.write({'groups_id': [(4, gid)]}) return gid | 288fc76f2950280ae04edfd8ac2e0b88888cfcf2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/288fc76f2950280ae04edfd8ac2e0b88888cfcf2/res_user.py |
def _companies_get(self,cr, uid, context={}): res=[] ids = self.pool.get('res.users').browse(cr, uid, uid, context).company_ids res = [(i.id,i.name) for i in ids] return res | 288fc76f2950280ae04edfd8ac2e0b88888cfcf2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/288fc76f2950280ae04edfd8ac2e0b88888cfcf2/res_user.py |
||
return res | return res | def get_current_company(self, cr, uid): res=[] cr.execute('select company_id, res_company.name from res_users left join res_company on res_company.id = company_id where res_users.id=%s' %uid) res = cr.fetchall() return res | 288fc76f2950280ae04edfd8ac2e0b88888cfcf2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/288fc76f2950280ae04edfd8ac2e0b88888cfcf2/res_user.py |
'company': fields.selection(_companies_get, 'Company', size=64), | 'company': fields.selection(_companies_get, 'Company', size=64), | def get_current_company(self, cr, uid): res=[] cr.execute('select company_id, res_company.name from res_users left join res_company on res_company.id = company_id where res_users.id=%s' %uid) res = cr.fetchall() return res | 288fc76f2950280ae04edfd8ac2e0b88888cfcf2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/288fc76f2950280ae04edfd8ac2e0b88888cfcf2/res_user.py |
wquery = obj._where_calc(cr, user, self._domain, context=context) | domain = isinstance(self._domain, list) and self._domain or [] wquery = obj._where_calc(cr, user, domain, context=context) | def get(self, cr, obj, ids, name, user=None, offset=0, context=None, values=None): if not context: context = {} if not values: values = {} res = {} if not ids: return res for id in ids: res[id] = [] if offset: warnings.warn("Specifying offset at a many2many.get() may produce unpredictable results.", DeprecationWarning, stacklevel=2) obj = obj.pool.get(self._obj) wquery = obj._where_calc(cr, user, self._domain, context=context) obj._apply_ir_rules(cr, user, wquery, 'read', context=context) from_c, where_c, where_params = wquery.get_sql() if where_c: where_c = ' AND ' + where_c | be2926de630f8547dc2e25d4060f79cf299bf533 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/be2926de630f8547dc2e25d4060f79cf299bf533/fields.py |
def _process_one(self, cr, uid, workitem, context=None): if workitem.state != 'todo': return | 0f03d60fdf6a48b1188bbcfb17fb01c17e1c420d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/0f03d60fdf6a48b1188bbcfb17fb01c17e1c420d/marketing_campaign.py |
||
run = False if transition.trigger != 'signal' and campaign_mode != 'manual': if transition.trigger == 'auto' or campaign_mode == 'test': run = True | run = transition.trigger == 'auto' \ or (transition.trigger == 'time' \ and campaign_mode == 'test') | def _process_one(self, cr, uid, workitem, context=None): if workitem.state != 'todo': return | 0f03d60fdf6a48b1188bbcfb17fb01c17e1c420d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/0f03d60fdf6a48b1188bbcfb17fb01c17e1c420d/marketing_campaign.py |
'get_contract':self.get_contract, | def __init__(self, cr, uid, name, context): super(salary_structure_report, self).__init__(cr, uid, name, context) self.localcontext.update({ 'time': time, 'get_type':self.get_type, 'get_contract':self.get_contract, 'get_line_amount_type':self.get_line_amount_type, 'get_line_type':self.get_line_type, 'get_line_amount_symbol':self.get_line_amount_symbol }) | 62592beb07d76af1f063837d4cda2225290aba2e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/62592beb07d76af1f063837d4cda2225290aba2e/report_emp_salary_structure.py |
|
def get_contract(self,emp): curr_date = "'"+time.strftime("%Y-%m-%d")+"'" sql_req= ''' SELECT c.id as id, c.wage as wage, struct_id as struct FROM hr_contract c LEFT JOIN hr_employee emp on (c.employee_id=emp.id) LEFT JOIN hr_contract_wage_type cwt on (cwt.id = c.wage_type_id) LEFT JOIN hr_contract_wage_type_period p on (cwt.period_id = p.id) WHERE (emp.id=%s) AND (date_start <= %s) AND (date_end IS NULL OR date_end >= %s) LIMIT 1 '''%(emp.id, curr_date, curr_date) self.cr.execute(sql_req) contract_id = self.cr.dictfetchone() if not contract_id: return [] contract = self.pool.get('hr.contract').browse(self.cr, self.uid, [contract_id['id']]) return contract | def get_contract(self,emp): curr_date = "'"+time.strftime("%Y-%m-%d")+"'" sql_req= ''' SELECT c.id as id, c.wage as wage, struct_id as struct FROM hr_contract c LEFT JOIN hr_employee emp on (c.employee_id=emp.id) LEFT JOIN hr_contract_wage_type cwt on (cwt.id = c.wage_type_id) LEFT JOIN hr_contract_wage_type_period p on (cwt.period_id = p.id) WHERE (emp.id=%s) AND (date_start <= %s) AND (date_end IS NULL OR date_end >= %s) LIMIT 1 '''%(emp.id, curr_date, curr_date) self.cr.execute(sql_req) contract_id = self.cr.dictfetchone() if not contract_id: return [] contract = self.pool.get('hr.contract').browse(self.cr, self.uid, [contract_id['id']]) return contract | 62592beb07d76af1f063837d4cda2225290aba2e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/62592beb07d76af1f063837d4cda2225290aba2e/report_emp_salary_structure.py |
|
tools.drop_view_if_exists(cr, 'stock_report_prodlots') | drop_view_if_exists(cr, 'stock_report_prodlots') | def init(self, cr): tools.drop_view_if_exists(cr, 'stock_report_prodlots') cr.execute(""" create or replace view stock_report_prodlots as ( select max(id) as id, location_id, product_id, prodlot_id, sum(qty) as name from ( select -max(sm.id) as id, sm.location_id, sm.product_id, sm.prodlot_id, -sum(sm.product_qty /uo.factor) as qty from stock_move as sm left join stock_location sl on (sl.id = sm.location_id) left join product_uom uo on (uo.id=sm.product_uom) where state = 'done' group by sm.location_id, sm.product_id, sm.product_uom, sm.prodlot_id union all select max(sm.id) as id, sm.location_dest_id as location_id, sm.product_id, sm.prodlot_id, sum(sm.product_qty /uo.factor) as qty from stock_move as sm left join stock_location sl on (sl.id = sm.location_dest_id) left join product_uom uo on (uo.id=sm.product_uom) where sm.state = 'done' group by sm.location_dest_id, sm.product_id, sm.product_uom, sm.prodlot_id ) as report group by location_id, product_id, prodlot_id )""") | 609058edda3ef483b46de9f5cb61bb3c1485b4b9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/609058edda3ef483b46de9f5cb61bb3c1485b4b9/report_stock.py |
tools.drop_view_if_exists(cr, 'stock_report_tracklots') | drop_view_if_exists(cr, 'stock_report_prodlots') | def init(self, cr): tools.drop_view_if_exists(cr, 'stock_report_tracklots') cr.execute(""" create or replace view stock_report_tracklots as ( select max(id) as id, location_id, product_id, tracking_id, sum(qty) as name from ( select -max(sm.id) as id, sm.location_id, sm.product_id, sm.tracking_id, -sum(sm.product_qty /uo.factor) as qty from stock_move as sm left join stock_location sl on (sl.id = sm.location_id) left join product_uom uo on (uo.id=sm.product_uom) where state = 'done' group by sm.location_id, sm.product_id, sm.product_uom, sm.tracking_id union all select max(sm.id) as id, sm.location_dest_id as location_id, sm.product_id, sm.tracking_id, sum(sm.product_qty /uo.factor) as qty from stock_move as sm left join stock_location sl on (sl.id = sm.location_dest_id) left join product_uom uo on (uo.id=sm.product_uom) where sm.state = 'done' group by sm.location_dest_id, sm.product_id, sm.product_uom, sm.tracking_id ) as report group by location_id, product_id, tracking_id )""") | 609058edda3ef483b46de9f5cb61bb3c1485b4b9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/609058edda3ef483b46de9f5cb61bb3c1485b4b9/report_stock.py |
tools.drop_view_if_exists(cr, 'report_stock_lines_date') | drop_view_if_exists(cr, 'stock_report_prodlots') | def init(self, cr): tools.drop_view_if_exists(cr, 'report_stock_lines_date') cr.execute(""" create or replace view report_stock_lines_date as ( select p.id as id, p.id as product_id, max(s.date) as date from product_product p left outer join stock_inventory_line l on (p.id=l.product_id) left join stock_inventory s on (l.inventory_id=s.id) and s.state = 'done' group by p.id )""") | 609058edda3ef483b46de9f5cb61bb3c1485b4b9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/609058edda3ef483b46de9f5cb61bb3c1485b4b9/report_stock.py |
date_close = tasks[task.id][-1][1] | date_close = tasks[task.id] and tasks[task.id][-1][1] or False | def _compute_tasks(cr, uid, task_list, date_begin): sequences = [] users = {} tasks = {} last_date = date_begin for task in task_list: # TODO: reorder ! with dependencies if not task.planned_hours: continue if task.state in ('draft','open','progress') and task.user_id: # Find the starting date of the task if task.user_id.id in users: date_start = users[task.user_id.id] else: date_start = date_begin sequences.sort() for (seq,dt) in sequences: if seq<task.sequence: date_start = max(dt,date_start) else: break if task.date_start: task_date_start = DateTime.strptime(task.date_start, '%Y-%m-%d %H:%M:%S') if DateTime.cmp(date_start, task_date_start) < 0: date_start = task_date_start # Compute the closing date of the task tasks[task.id] = [] res = pooler.get_pool(cr.dbname).get('hr.timesheet.group').interval_get(cr, uid, task.project_id.timesheet_id.id, date_start, task.remaining_hours) for (d1,d2) in res: tasks[task.id].append((d1, d2, task.name, task.user_id.login)) date_close = tasks[task.id][-1][1] # Store result users[task.user_id.id] = date_close sequences.append((task.sequence, date_close)) if date_close>last_date: last_date=date_close return tasks, last_date | 7f747fa4ee68c7f469369a6e131469771ec1ba95 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/7f747fa4ee68c7f469369a6e131469771ec1ba95/_date_compute.py |
users[task.user_id.id] = date_close sequences.append((task.sequence, date_close)) if date_close>last_date: last_date=date_close | if date_close: users[task.user_id.id] = date_close sequences.append((task.sequence, date_close)) if date_close>last_date: last_date=date_close | def _compute_tasks(cr, uid, task_list, date_begin): sequences = [] users = {} tasks = {} last_date = date_begin for task in task_list: # TODO: reorder ! with dependencies if not task.planned_hours: continue if task.state in ('draft','open','progress') and task.user_id: # Find the starting date of the task if task.user_id.id in users: date_start = users[task.user_id.id] else: date_start = date_begin sequences.sort() for (seq,dt) in sequences: if seq<task.sequence: date_start = max(dt,date_start) else: break if task.date_start: task_date_start = DateTime.strptime(task.date_start, '%Y-%m-%d %H:%M:%S') if DateTime.cmp(date_start, task_date_start) < 0: date_start = task_date_start # Compute the closing date of the task tasks[task.id] = [] res = pooler.get_pool(cr.dbname).get('hr.timesheet.group').interval_get(cr, uid, task.project_id.timesheet_id.id, date_start, task.remaining_hours) for (d1,d2) in res: tasks[task.id].append((d1, d2, task.name, task.user_id.login)) date_close = tasks[task.id][-1][1] # Store result users[task.user_id.id] = date_close sequences.append((task.sequence, date_close)) if date_close>last_date: last_date=date_close return tasks, last_date | 7f747fa4ee68c7f469369a6e131469771ec1ba95 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/7f747fa4ee68c7f469369a6e131469771ec1ba95/_date_compute.py |
'soap': False, | def __init__(self, fname=None): self.options = { 'email_from':False, 'xmlrpc_interface': '', # this will bind the server to all interfaces 'xmlrpc_port': 8069, 'netrpc_interface': '', 'netrpc_port': 8070, 'db_host': False, 'db_port': False, 'db_name': False, 'db_user': False, 'db_password': False, 'db_maxconn': 64, 'reportgz': False, 'netrpc': True, 'xmlrpc': True, 'soap': False, 'translate_in': None, 'translate_out': None, 'language': None, 'pg_path': None, 'admin_passwd': 'admin', 'csv_internal_sep': ',', 'addons_path': None, 'root_path': None, 'debug_mode': False, 'import_partial': "", 'pidfile': None, 'logfile': None, 'logrotate': '1', 'smtp_server': 'localhost', 'smtp_user': False, 'smtp_port':25, 'smtp_ssl':False, 'smtp_password': False, 'stop_after_init': False, # this will stop the server after initialization 'price_accuracy': 2, 'secure' : False, 'syslog' : False, 'log_level': logging.INFO, 'assert_exit_level': logging.ERROR, # level above which a failed assert will be raised 'cache_timeout': 100000, 'login_message': False, 'list_db' : True, 'timezone' : False, # to override the default TZ 'test-disable' : False, 'test-commit' : False, } | 733fe62640bc88bc49f02c217c754d05c3337de4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/733fe62640bc88bc49f02c217c754d05c3337de4/config.py |
|
def _email_send(message, openobject_id=None, debug=False): | def _email_send(smtp_from, smtp_to_list, message, openobject_id=None, ssl=False, debug=False): | def _email_send(message, openobject_id=None, debug=False): """Low-level method to send directly a Message through the configured smtp server. :param message: an email.message.Message to send :param debug: True if messages should be output to stderr before being sent, and smtplib.SMTP put into debug mode. :return: True if the mail was delivered successfully to the smtp, else False (+ exception logged) """ if openobject_id: message['Message-Id'] = "<%s-openobject-%s@%s>" % (time.time(), openobject_id, socket.gethostname()) try: oldstderr = smtplib.stderr s = smtplib.SMTP() try: # in case of debug, the messages are printed to stderr. if debug: smtplib.stderr = WriteToLogger() s.set_debuglevel(int(bool(debug))) # 0 or 1 s.connect(smtp_server, config['smtp_port']) if ssl: s.ehlo() s.starttls() s.ehlo() if config['smtp_user'] or config['smtp_password']: s.login(config['smtp_user'], config['smtp_password']) s.sendmail(email_from, flatten([email_to, email_cc, email_bcc]), message.as_string()) finally: s.quit() if debug: smtplib.stderr = oldstderr except Exception, e: _logger.error('could not deliver email', exc_info=True) return False return True | 478ab1c86d3d35f3b5c2e40276f5574c62d56543 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/478ab1c86d3d35f3b5c2e40276f5574c62d56543/misc.py |
s.sendmail(email_from, flatten([email_to, email_cc, email_bcc]), message.as_string()) | s.sendmail(smtp_from, smtp_to_list, message.as_string()) | def _email_send(message, openobject_id=None, debug=False): """Low-level method to send directly a Message through the configured smtp server. :param message: an email.message.Message to send :param debug: True if messages should be output to stderr before being sent, and smtplib.SMTP put into debug mode. :return: True if the mail was delivered successfully to the smtp, else False (+ exception logged) """ if openobject_id: message['Message-Id'] = "<%s-openobject-%s@%s>" % (time.time(), openobject_id, socket.gethostname()) try: oldstderr = smtplib.stderr s = smtplib.SMTP() try: # in case of debug, the messages are printed to stderr. if debug: smtplib.stderr = WriteToLogger() s.set_debuglevel(int(bool(debug))) # 0 or 1 s.connect(smtp_server, config['smtp_port']) if ssl: s.ehlo() s.starttls() s.ehlo() if config['smtp_user'] or config['smtp_password']: s.login(config['smtp_user'], config['smtp_password']) s.sendmail(email_from, flatten([email_to, email_cc, email_bcc]), message.as_string()) finally: s.quit() if debug: smtplib.stderr = oldstderr except Exception, e: _logger.error('could not deliver email', exc_info=True) return False return True | 478ab1c86d3d35f3b5c2e40276f5574c62d56543 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/478ab1c86d3d35f3b5c2e40276f5574c62d56543/misc.py |
s.quit() if debug: smtplib.stderr = oldstderr | try: s.quit() if debug: smtplib.stderr = oldstderr except: pass | def _email_send(message, openobject_id=None, debug=False): """Low-level method to send directly a Message through the configured smtp server. :param message: an email.message.Message to send :param debug: True if messages should be output to stderr before being sent, and smtplib.SMTP put into debug mode. :return: True if the mail was delivered successfully to the smtp, else False (+ exception logged) """ if openobject_id: message['Message-Id'] = "<%s-openobject-%s@%s>" % (time.time(), openobject_id, socket.gethostname()) try: oldstderr = smtplib.stderr s = smtplib.SMTP() try: # in case of debug, the messages are printed to stderr. if debug: smtplib.stderr = WriteToLogger() s.set_debuglevel(int(bool(debug))) # 0 or 1 s.connect(smtp_server, config['smtp_port']) if ssl: s.ehlo() s.starttls() s.ehlo() if config['smtp_user'] or config['smtp_password']: s.login(config['smtp_user'], config['smtp_password']) s.sendmail(email_from, flatten([email_to, email_cc, email_bcc]), message.as_string()) finally: s.quit() if debug: smtplib.stderr = oldstderr except Exception, e: _logger.error('could not deliver email', exc_info=True) return False return True | 478ab1c86d3d35f3b5c2e40276f5574c62d56543 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/478ab1c86d3d35f3b5c2e40276f5574c62d56543/misc.py |
if not ssl: ssl = config.get('smtp_ssl', False) | def email_send(email_from, email_to, subject, body, email_cc=None, email_bcc=None, reply_to=False, attach=None, openobject_id=False, ssl=False, debug=False, subtype='plain', x_headers=None, priority='3'): """Send an email. Arguments: `email_from`: A string used to fill the `From` header, if falsy, config['email_from'] is used instead. Also used for the `Reply-To` header if `reply_to` is not provided `email_to`: a sequence of addresses to send the mail to. """ if x_headers is None: x_headers = {} if not ssl: ssl = config.get('smtp_ssl', False) if not (email_from or config['email_from']): raise ValueError("Sending an email requires either providing a sender " "address or having configured one") if not email_from: email_from = config.get('email_from', False) if not email_cc: email_cc = [] if not email_bcc: email_bcc = [] if not body: body = u'' try: email_body = body.encode('utf-8') except (UnicodeEncodeError, UnicodeDecodeError): email_body = body try: email_text = MIMEText(email_body.encode('utf8') or '',_subtype=subtype,_charset='utf-8') except: email_text = MIMEText(email_body or '',_subtype=subtype,_charset='utf-8') if attach: msg = MIMEMultipart() else: msg = email_text msg['Subject'] = Header(ustr(subject), 'utf-8') msg['From'] = email_from del msg['Reply-To'] if reply_to: msg['Reply-To'] = reply_to else: msg['Reply-To'] = msg['From'] msg['To'] = COMMASPACE.join(email_to) if email_cc: msg['Cc'] = COMMASPACE.join(email_cc) if email_bcc: msg['Bcc'] = COMMASPACE.join(email_bcc) msg['Date'] = formatdate(localtime=True) msg['X-Priority'] = priorities.get(priority, '3 (Normal)') # Add dynamic X Header for key, value in x_headers.iteritems(): msg['%s' % key] = str(value) if attach: msg.attach(email_text) for (fname,fcontent) in attach: part = MIMEBase('application', "octet-stream") part.set_payload( fcontent ) Encoders.encode_base64(part) part.add_header('Content-Disposition', 'attachment; filename="%s"' % (fname,)) msg.attach(part) class WriteToLogger(object): def __init__(self): self.logger = netsvc.Logger() def write(self, s): self.logger.notifyChannel('email_send', netsvc.LOG_DEBUG, s) smtp_server = config['smtp_server'] if smtp_server.startswith('maildir:/'): from mailbox import Maildir maildir_path = smtp_server[8:] try: mdir = Maildir(maildir_path,factory=None, create = True) mdir.add(msg.as_string(True)) return True except Exception,e: netsvc.Logger().notifyChannel('email_send (maildir)', netsvc.LOG_ERROR, e) return False return _email_send(msg, openobject_id=openobject_id, debug=debug) | 478ab1c86d3d35f3b5c2e40276f5574c62d56543 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/478ab1c86d3d35f3b5c2e40276f5574c62d56543/misc.py |
|
smtp_server = config['smtp_server'] if smtp_server.startswith('maildir:/'): from mailbox import Maildir maildir_path = smtp_server[8:] try: mdir = Maildir(maildir_path,factory=None, create = True) mdir.add(msg.as_string(True)) return True except Exception,e: netsvc.Logger().notifyChannel('email_send (maildir)', netsvc.LOG_ERROR, e) return False return _email_send(msg, openobject_id=openobject_id, debug=debug) | return _email_send(email_from, flatten([email_to, email_cc, email_bcc]), msg, openobject_id=openobject_id, ssl=ssl, debug=debug) | def write(self, s): self.logger.notifyChannel('email_send', netsvc.LOG_DEBUG, s) | 478ab1c86d3d35f3b5c2e40276f5574c62d56543 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/478ab1c86d3d35f3b5c2e40276f5574c62d56543/misc.py |
tools.debug(ret) | def login(self, db, login, password): ret = super(users,self).login(db, login, password) tools.debug(ret) if ret: return ret pool = pooler.get_pool(db) cr = pooler.get_db(db).cursor() action_obj = pool.get('ir.actions.actions') cr.execute(""" SELECT id, company, ldap_server, ldap_server_port, ldap_binddn, ldap_password, ldap_filter, ldap_base, "user", create_user FROM res_company_ldap WHERE ldap_server != '' and ldap_binddn != '' ORDER BY sequence""") for res_company_ldap in cr.dictfetchall(): tools.debug(res_company_ldap) try: l = ldap.open(res_company_ldap['ldap_server'], res_company_ldap['ldap_server_port']) if l.simple_bind_s(res_company_ldap['ldap_binddn'], res_company_ldap['ldap_password']): base = res_company_ldap['ldap_base'] scope = ldap.SCOPE_SUBTREE filter = filter_format(res_company_ldap['ldap_filter'], (login,)) retrieve_attributes = None result_id = l.search(base, scope, filter, retrieve_attributes) timeout = 60 result_type, result_data = l.result(result_id, timeout) if not result_data: continue if result_type == ldap.RES_SEARCH_RESULT and len(result_data) == 1: dn = result_data[0][0] tools.debug(dn) name = result_data[0][1]['cn'][0] if l.bind_s(dn, password): l.unbind() cr.execute("SELECT id FROM res_users WHERE login=%s",(tools.ustr(login),)) res = cr.fetchone() tools.debug(res) if res: cr.close() return res[0] if not res_company_ldap['create_user']: continue action_id = action_obj.search(cr, 1, [('usage', '=', 'menu')])[0] if res_company_ldap['user']: res = self.copy(cr, 1, res_company_ldap['user'], default={'active': True}) self.write(cr, 1, res, { 'name': name, 'login': login.encode('utf-8'), 'company_id': res_company_ldap['company'], }) else: res = self.create(cr, 1, { 'name': name, 'login': login.encode('utf-8'), 'company_id': res_company_ldap['company'], 'action_id': action_id, 'menu_id': action_id, }) cr.commit() cr.close() return res l.unbind() except Exception, e: tools.debug(e) continue cr.close() return False | 213a206587059f59e6cbff6938e3c2fba1a9a2c8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/213a206587059f59e6cbff6938e3c2fba1a9a2c8/users_ldap.py |
|
tools.debug(res_company_ldap) | logger.debug(res_company_ldap) | def login(self, db, login, password): ret = super(users,self).login(db, login, password) tools.debug(ret) if ret: return ret pool = pooler.get_pool(db) cr = pooler.get_db(db).cursor() action_obj = pool.get('ir.actions.actions') cr.execute(""" SELECT id, company, ldap_server, ldap_server_port, ldap_binddn, ldap_password, ldap_filter, ldap_base, "user", create_user FROM res_company_ldap WHERE ldap_server != '' and ldap_binddn != '' ORDER BY sequence""") for res_company_ldap in cr.dictfetchall(): tools.debug(res_company_ldap) try: l = ldap.open(res_company_ldap['ldap_server'], res_company_ldap['ldap_server_port']) if l.simple_bind_s(res_company_ldap['ldap_binddn'], res_company_ldap['ldap_password']): base = res_company_ldap['ldap_base'] scope = ldap.SCOPE_SUBTREE filter = filter_format(res_company_ldap['ldap_filter'], (login,)) retrieve_attributes = None result_id = l.search(base, scope, filter, retrieve_attributes) timeout = 60 result_type, result_data = l.result(result_id, timeout) if not result_data: continue if result_type == ldap.RES_SEARCH_RESULT and len(result_data) == 1: dn = result_data[0][0] tools.debug(dn) name = result_data[0][1]['cn'][0] if l.bind_s(dn, password): l.unbind() cr.execute("SELECT id FROM res_users WHERE login=%s",(tools.ustr(login),)) res = cr.fetchone() tools.debug(res) if res: cr.close() return res[0] if not res_company_ldap['create_user']: continue action_id = action_obj.search(cr, 1, [('usage', '=', 'menu')])[0] if res_company_ldap['user']: res = self.copy(cr, 1, res_company_ldap['user'], default={'active': True}) self.write(cr, 1, res, { 'name': name, 'login': login.encode('utf-8'), 'company_id': res_company_ldap['company'], }) else: res = self.create(cr, 1, { 'name': name, 'login': login.encode('utf-8'), 'company_id': res_company_ldap['company'], 'action_id': action_id, 'menu_id': action_id, }) cr.commit() cr.close() return res l.unbind() except Exception, e: tools.debug(e) continue cr.close() return False | 213a206587059f59e6cbff6938e3c2fba1a9a2c8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/213a206587059f59e6cbff6938e3c2fba1a9a2c8/users_ldap.py |
tools.debug(dn) | logger.debug(dn) | def login(self, db, login, password): ret = super(users,self).login(db, login, password) tools.debug(ret) if ret: return ret pool = pooler.get_pool(db) cr = pooler.get_db(db).cursor() action_obj = pool.get('ir.actions.actions') cr.execute(""" SELECT id, company, ldap_server, ldap_server_port, ldap_binddn, ldap_password, ldap_filter, ldap_base, "user", create_user FROM res_company_ldap WHERE ldap_server != '' and ldap_binddn != '' ORDER BY sequence""") for res_company_ldap in cr.dictfetchall(): tools.debug(res_company_ldap) try: l = ldap.open(res_company_ldap['ldap_server'], res_company_ldap['ldap_server_port']) if l.simple_bind_s(res_company_ldap['ldap_binddn'], res_company_ldap['ldap_password']): base = res_company_ldap['ldap_base'] scope = ldap.SCOPE_SUBTREE filter = filter_format(res_company_ldap['ldap_filter'], (login,)) retrieve_attributes = None result_id = l.search(base, scope, filter, retrieve_attributes) timeout = 60 result_type, result_data = l.result(result_id, timeout) if not result_data: continue if result_type == ldap.RES_SEARCH_RESULT and len(result_data) == 1: dn = result_data[0][0] tools.debug(dn) name = result_data[0][1]['cn'][0] if l.bind_s(dn, password): l.unbind() cr.execute("SELECT id FROM res_users WHERE login=%s",(tools.ustr(login),)) res = cr.fetchone() tools.debug(res) if res: cr.close() return res[0] if not res_company_ldap['create_user']: continue action_id = action_obj.search(cr, 1, [('usage', '=', 'menu')])[0] if res_company_ldap['user']: res = self.copy(cr, 1, res_company_ldap['user'], default={'active': True}) self.write(cr, 1, res, { 'name': name, 'login': login.encode('utf-8'), 'company_id': res_company_ldap['company'], }) else: res = self.create(cr, 1, { 'name': name, 'login': login.encode('utf-8'), 'company_id': res_company_ldap['company'], 'action_id': action_id, 'menu_id': action_id, }) cr.commit() cr.close() return res l.unbind() except Exception, e: tools.debug(e) continue cr.close() return False | 213a206587059f59e6cbff6938e3c2fba1a9a2c8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/213a206587059f59e6cbff6938e3c2fba1a9a2c8/users_ldap.py |
tools.debug(res) | logger.debug(res) | def login(self, db, login, password): ret = super(users,self).login(db, login, password) tools.debug(ret) if ret: return ret pool = pooler.get_pool(db) cr = pooler.get_db(db).cursor() action_obj = pool.get('ir.actions.actions') cr.execute(""" SELECT id, company, ldap_server, ldap_server_port, ldap_binddn, ldap_password, ldap_filter, ldap_base, "user", create_user FROM res_company_ldap WHERE ldap_server != '' and ldap_binddn != '' ORDER BY sequence""") for res_company_ldap in cr.dictfetchall(): tools.debug(res_company_ldap) try: l = ldap.open(res_company_ldap['ldap_server'], res_company_ldap['ldap_server_port']) if l.simple_bind_s(res_company_ldap['ldap_binddn'], res_company_ldap['ldap_password']): base = res_company_ldap['ldap_base'] scope = ldap.SCOPE_SUBTREE filter = filter_format(res_company_ldap['ldap_filter'], (login,)) retrieve_attributes = None result_id = l.search(base, scope, filter, retrieve_attributes) timeout = 60 result_type, result_data = l.result(result_id, timeout) if not result_data: continue if result_type == ldap.RES_SEARCH_RESULT and len(result_data) == 1: dn = result_data[0][0] tools.debug(dn) name = result_data[0][1]['cn'][0] if l.bind_s(dn, password): l.unbind() cr.execute("SELECT id FROM res_users WHERE login=%s",(tools.ustr(login),)) res = cr.fetchone() tools.debug(res) if res: cr.close() return res[0] if not res_company_ldap['create_user']: continue action_id = action_obj.search(cr, 1, [('usage', '=', 'menu')])[0] if res_company_ldap['user']: res = self.copy(cr, 1, res_company_ldap['user'], default={'active': True}) self.write(cr, 1, res, { 'name': name, 'login': login.encode('utf-8'), 'company_id': res_company_ldap['company'], }) else: res = self.create(cr, 1, { 'name': name, 'login': login.encode('utf-8'), 'company_id': res_company_ldap['company'], 'action_id': action_id, 'menu_id': action_id, }) cr.commit() cr.close() return res l.unbind() except Exception, e: tools.debug(e) continue cr.close() return False | 213a206587059f59e6cbff6938e3c2fba1a9a2c8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/213a206587059f59e6cbff6938e3c2fba1a9a2c8/users_ldap.py |
tools.debug(e) | logger.warning("Cannot auth", exc_info=True) | def login(self, db, login, password): ret = super(users,self).login(db, login, password) tools.debug(ret) if ret: return ret pool = pooler.get_pool(db) cr = pooler.get_db(db).cursor() action_obj = pool.get('ir.actions.actions') cr.execute(""" SELECT id, company, ldap_server, ldap_server_port, ldap_binddn, ldap_password, ldap_filter, ldap_base, "user", create_user FROM res_company_ldap WHERE ldap_server != '' and ldap_binddn != '' ORDER BY sequence""") for res_company_ldap in cr.dictfetchall(): tools.debug(res_company_ldap) try: l = ldap.open(res_company_ldap['ldap_server'], res_company_ldap['ldap_server_port']) if l.simple_bind_s(res_company_ldap['ldap_binddn'], res_company_ldap['ldap_password']): base = res_company_ldap['ldap_base'] scope = ldap.SCOPE_SUBTREE filter = filter_format(res_company_ldap['ldap_filter'], (login,)) retrieve_attributes = None result_id = l.search(base, scope, filter, retrieve_attributes) timeout = 60 result_type, result_data = l.result(result_id, timeout) if not result_data: continue if result_type == ldap.RES_SEARCH_RESULT and len(result_data) == 1: dn = result_data[0][0] tools.debug(dn) name = result_data[0][1]['cn'][0] if l.bind_s(dn, password): l.unbind() cr.execute("SELECT id FROM res_users WHERE login=%s",(tools.ustr(login),)) res = cr.fetchone() tools.debug(res) if res: cr.close() return res[0] if not res_company_ldap['create_user']: continue action_id = action_obj.search(cr, 1, [('usage', '=', 'menu')])[0] if res_company_ldap['user']: res = self.copy(cr, 1, res_company_ldap['user'], default={'active': True}) self.write(cr, 1, res, { 'name': name, 'login': login.encode('utf-8'), 'company_id': res_company_ldap['company'], }) else: res = self.create(cr, 1, { 'name': name, 'login': login.encode('utf-8'), 'company_id': res_company_ldap['company'], 'action_id': action_id, 'menu_id': action_id, }) cr.commit() cr.close() return res l.unbind() except Exception, e: tools.debug(e) continue cr.close() return False | 213a206587059f59e6cbff6938e3c2fba1a9a2c8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/213a206587059f59e6cbff6938e3c2fba1a9a2c8/users_ldap.py |
except: | except ExceptionNoTb: | def check(self, db, uid, passwd): try: return super(users,self).check(db, uid, passwd) except: # AccessDenied pass cr = pooler.get_db(db).cursor() user = self.browse(cr, 1, uid) if user and user.company_id.ldaps: for res_company_ldap in user.company_id.ldaps: try: l = ldap.open(res_company_ldap.ldap_server, res_company_ldap.ldap_server_port) if l.simple_bind_s(res_company_ldap.ldap_binddn, res_company_ldap.ldap_password): base = res_company_ldap.ldap_base scope = ldap.SCOPE_SUBTREE filter = filter_format(res_company_ldap.ldap_filter, (user.login,)) retrieve_attributes = None result_id = l.search(base, scope, filter, retrieve_attributes) timeout = 60 result_type, result_data = l.result(result_id, timeout) if result_data and result_type == ldap.RES_SEARCH_RESULT and len(result_data) == 1: dn = result_data[0][0] if l.bind_s(dn, passwd): l.unbind() self._uid_cache.setdefault(db, {})[uid] = passwd cr.close() return True l.unbind() except Exception, e: tools.debug(e) pass cr.close() raise security.ExceptionNoTb('AccessDenied') | 213a206587059f59e6cbff6938e3c2fba1a9a2c8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/213a206587059f59e6cbff6938e3c2fba1a9a2c8/users_ldap.py |
tools.debug(e) | logger.warning('cannot check', exc_info=True) | def check(self, db, uid, passwd): try: return super(users,self).check(db, uid, passwd) except: # AccessDenied pass cr = pooler.get_db(db).cursor() user = self.browse(cr, 1, uid) if user and user.company_id.ldaps: for res_company_ldap in user.company_id.ldaps: try: l = ldap.open(res_company_ldap.ldap_server, res_company_ldap.ldap_server_port) if l.simple_bind_s(res_company_ldap.ldap_binddn, res_company_ldap.ldap_password): base = res_company_ldap.ldap_base scope = ldap.SCOPE_SUBTREE filter = filter_format(res_company_ldap.ldap_filter, (user.login,)) retrieve_attributes = None result_id = l.search(base, scope, filter, retrieve_attributes) timeout = 60 result_type, result_data = l.result(result_id, timeout) if result_data and result_type == ldap.RES_SEARCH_RESULT and len(result_data) == 1: dn = result_data[0][0] if l.bind_s(dn, passwd): l.unbind() self._uid_cache.setdefault(db, {})[uid] = passwd cr.close() return True l.unbind() except Exception, e: tools.debug(e) pass cr.close() raise security.ExceptionNoTb('AccessDenied') | 213a206587059f59e6cbff6938e3c2fba1a9a2c8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/213a206587059f59e6cbff6938e3c2fba1a9a2c8/users_ldap.py |
return user.context_section_id | print "section id",type(user.context_section_id) return int(user.context_section_id) | def _get_section(self, cr, uid, context): user = self.pool.get('res.users').browse(cr,uid,uid,context=context) return user.context_section_id | cf177047b120d4c034e6d8b3baabd1cd1b388856 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/cf177047b120d4c034e6d8b3baabd1cd1b388856/sale_crm.py |
GROUP BY partner_id ', (tuple(move_state), tuple(self.ACCOUNT_TYPE), tuple(partner_ids), self.date_from)) | GROUP BY l.partner_id ', (tuple(move_state), tuple(self.ACCOUNT_TYPE), tuple(partner_ids), self.date_from)) | def _get_lines(self, form): res = [] self.cr.execute('SELECT DISTINCT res_partner.id AS id,\ res_partner.name AS name \ FROM res_partner,account_move_line AS l, account_account\ WHERE (l.account_id=account_account.id) \ AND ((reconcile_id IS NULL)\ OR (reconcile_id IN (SELECT recon.id FROM account_move_reconcile AS recon WHERE recon.create_date > %s )))\ AND (l.partner_id=res_partner.id)\ AND ' + self.query + ' \ ORDER BY res_partner.name', (self.date_from,)) partners = self.cr.dictfetchall() ## mise a 0 du total for i in range(7): self.total_account.append(0) # # Build a string like (1,2,3) for easy use in SQL query partner_ids = [x['id'] for x in partners] if not partner_ids: return [] # This dictionary will store the debit-credit for all partners, using partner_id as key. move_state = ['draft','posted'] if self.target_move == 'posted': move_state = ['posted'] | 595ef2d6e13b76d5c184711468c3410a3d802412 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/595ef2d6e13b76d5c184711468c3410a3d802412/account_aged_partner_balance.py |
if not password: return False | try: return self._login(db, login, password) except Exception, e: import logging logging.getLogger('netsvc').exception('Could not authenticate') return Exception('Access Denied') def _login(self, db, login, password): if not password: return False if db is False: raise RuntimeError("Cannot authenticate to False db!") | def login(self, db, login, password): | 72ad853a208dccfdbe3ce398196a6ff87507db8d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/72ad853a208dccfdbe3ce398196a6ff87507db8d/crypt.py |
action_pool.run(cr, uid, [server.action_id.id], {'active_id': res_id, 'active_ids':[res_id]}) | action_pool.run(cr, user, [server.action_id.id], {'active_id': res_id, 'active_ids':[res_id]}) | def fetch_mail(self, cr, uid, ids, context={}): email_tool = self.pool.get('email.server.tools') action_pool = self.pool.get('ir.actions.server') context.update({'get_server': True}) for server in self.browse(cr, uid, ids, context): count = 0 user = server.user_id.id or uid try: if server.type == 'imap': imap_server = self.button_confirm_login(cr, uid, [server.id], context=context) imap_server.select() result, data = imap_server.search(None, '(UNSEEN)') for num in data[0].split(): result, data = imap_server.fetch(num, '(RFC822)') res_id = email_tool.process_email(cr, user, server.object_id.model, data[0][1], attach=server.attach, context=context) if res_id and server.action_id: action_pool.run(cr, uid, [server.action_id.id], {'active_id': res_id, 'active_ids':[res_id]}) | 670d636d4ba8dd7f85ac1f811b04eeafce582c7a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/670d636d4ba8dd7f85ac1f811b04eeafce582c7a/fetchmail.py |
action_pool.run(cr, uid, [server.action_id.id], {'active_id': res_id, 'active_ids':[res_id]}) | action_pool.run(cr, user, [server.action_id.id], {'active_id': res_id, 'active_ids':[res_id]}) | def fetch_mail(self, cr, uid, ids, context={}): email_tool = self.pool.get('email.server.tools') action_pool = self.pool.get('ir.actions.server') context.update({'get_server': True}) for server in self.browse(cr, uid, ids, context): count = 0 user = server.user_id.id or uid try: if server.type == 'imap': imap_server = self.button_confirm_login(cr, uid, [server.id], context=context) imap_server.select() result, data = imap_server.search(None, '(UNSEEN)') for num in data[0].split(): result, data = imap_server.fetch(num, '(RFC822)') res_id = email_tool.process_email(cr, user, server.object_id.model, data[0][1], attach=server.attach, context=context) if res_id and server.action_id: action_pool.run(cr, uid, [server.action_id.id], {'active_id': res_id, 'active_ids':[res_id]}) | 670d636d4ba8dd7f85ac1f811b04eeafce582c7a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/670d636d4ba8dd7f85ac1f811b04eeafce582c7a/fetchmail.py |
res = node.open_data(cr, mode) | try: res = node.open_data(cr, mode) except TypeError, e: raise IOError(errno.EINVAL, "No data") | def open(self, datacr, mode): if not (datacr and datacr[1]): raise OSError(1, 'Operation not permited.') # Reading operation cr, node, rem = datacr res = node.open_data(cr, mode) return res | 8cd367f9ed6e49bc46c5dcccd2d52c5b9a6c4329 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/8cd367f9ed6e49bc46c5dcccd2d52c5b9a6c4329/abstracted_fs.py |
def _get_fiscalyear(self, data): if data['model']=='account.journal.period': return self.pool.get('account.journal.period').browse(self.cr, self.uid, data['id']).fiscalyear_id.name return super(journal_print ,self)._get_fiscalyear(data) | def _sum_currency_amount_account(self, account, form): self._set_get_account_currency_code(account.id) self.cr.execute("SELECT sum(aml.amount_currency) FROM account_move_line as aml,res_currency as rc WHERE aml.currency_id = rc.id AND aml.account_id= %s ", (account.id,)) total = self.cr.fetchone() | 5004d0011ec9a4b02969f23cf1a3fb47fcc7d0dc /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/5004d0011ec9a4b02969f23cf1a3fb47fcc7d0dc/account_journal.py |
|
cr.execute(sql,(data['form']['date1'])) | cr.execute(sql,(data['form']['date1'],)) | def _check_date(self, cr, uid, data, context): | a64e07de85f468adf4e9c5ec85fbb1c3acc33984 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/a64e07de85f468adf4e9c5ec85fbb1c3acc33984/wizard_third_party_ledger.py |
def _get_chart_account(cursor, user, account): if account.parent_id: chart_account = _get_chart_account(cursor, user, account.parent_id) else: chart_account = account return chart_account | def _get_chart_account(cursor, user, account): if account.parent_id: chart_account = _get_chart_account(cursor, user, account.parent_id) else: chart_account = account return chart_account | e71bd619ec9bebf983df925970b9998b48c3c741 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/e71bd619ec9bebf983df925970b9998b48c3c741/account.py |
|
s = decode_header(s) return ''.join(map(lambda x:self._to_decode(x[0], [x[1]]), s)) | s = decode_header(s) return ''.join(map(lambda x:self._to_decode(x[0], [x[1]]), s or [])) | def _decode_header(self, s): from email.Header import decode_header s = decode_header(s) return ''.join(map(lambda x:self._to_decode(x[0], [x[1]]), s)) | 78cade20a308bf13c487351d3c6cf1912d29e6d4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/78cade20a308bf13c487351d3c6cf1912d29e6d4/openerp_mailgate.py |
'title': lead.title, | 'title': lead.title and lead.title.id or False, | def _create_partner(self, cr, uid, ids, context=None): """ This function Creates partner based on action. @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 Lead to Partner's IDs @param context: A standard dictionary for contextual values | a2e42c4e73cfb97108bcdb5b6322e6c5ec077396 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/a2e42c4e73cfb97108bcdb5b6322e6c5ec077396/crm_lead_to_partner.py |
elif fget[groupby]['type'] == 'many2one': d[groupby] = d[groupby] and ((type(d[groupby])==type(1)) and d[groupby] or d[groupby][1]) or '' | 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 | 7f3254ab275c7317557f0ed8f3a20ff2e6511461 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/7f3254ab275c7317557f0ed8f3a20ff2e6511461/orm.py |
|
for test in expressions.get('test', ''): | for test in expressions: | def process_assert(self, node): assertion, expressions = node.items()[0] | 8d62e97ff5030095ea3ab415a09fe5d8062d5cf0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/8d62e97ff5030095ea3ab415a09fe5d8062d5cf0/yaml_import.py |
tables, where_clause = self._inherits_join_calc(groupby,tables,where_clause) | tables, where_clause, qfield = self._inherits_join_calc(groupby,tables,where_clause) | 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 | 502defb1a4c78024cbec1da9838616766d5fe254 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/502defb1a4c78024cbec1da9838616766d5fe254/orm.py |
tax_obj.compute(cr, uid, line.product_id.taxes_id, | tax_obj.compute_all(cr, uid, line.product_id.taxes_id, | def _amount_all(self, cr, uid, ids, name, args, context=None): tax_obj = self.pool.get('account.tax') res={} for order in self.browse(cr, uid, ids): res[order.id] = { 'amount_paid': 0.0, 'amount_return':0.0, 'amount_tax':0.0, } for payment in order.statement_ids: res[order.id]['amount_paid'] += payment.amount for payment in order.payments: res[order.id]['amount_return'] += (payment.amount < 0 and payment.amount or 0) for line in order.lines: if order.price_type!='tax_excluded': res[order.id]['amount_tax'] = reduce(lambda x, y: x+round(y['amount'], 2), tax_obj.compute_inv(cr, uid, line.product_id.taxes_id, line.price_unit * \ (1-(line.discount or 0.0)/100.0), line.qty), res[order.id]['amount_tax']) else: res[order.id]['amount_tax'] = reduce(lambda x, y: x+round(y['amount'], 2), tax_obj.compute(cr, uid, line.product_id.taxes_id, line.price_unit * \ (1-(line.discount or 0.0)/100.0), line.qty), res[order.id]['amount_tax']) return res | f0b124d52dc24d9175dfa030b6c8608151b92479 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/f0b124d52dc24d9175dfa030b6c8608151b92479/pos.py |
computed_taxes = account_tax_obj.compute( | computed_taxes = account_tax_objcompute_all( | order_account = order.partner_id and order.partner_id.property_account_receivable and order.partner_id.property_account_receivable.id or account_def or curr_c.account_receivable.id | f0b124d52dc24d9175dfa030b6c8608151b92479 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/f0b124d52dc24d9175dfa030b6c8608151b92479/pos.py |
computed_taxes = account_tax_obj.compute(cr, uid, taxes, line.price_unit, line.qty) | computed_taxes = account_tax_objcompute_all(cr, uid, taxes, line.price_unit, line.qty) | def _amount_line_ttc(self, cr, uid, ids, field_name, arg, context): res = {} account_tax_obj = self.pool.get('account.tax') for line in self.browse(cr, uid, ids): tax_amount = 0.0 taxes = [t for t in line.product_id.taxes_id] computed_taxes = account_tax_obj.compute(cr, uid, taxes, line.price_unit, line.qty) for tax in computed_taxes: tax_amount += tax['amount'] price = self.price_by_product(cr, uid, ids, line.order_id.pricelist_id.id, line.product_id.id, line.qty, line.order_id.partner_id.id) if line.discount!=0.0: res[line.id] = line.price_unit * line.qty * (1 - (line.discount or 0.0) / 100.0) else: res[line.id]=line.price_unit*line.qty res[line.id] = res[line.id] + tax_amount return res | f0b124d52dc24d9175dfa030b6c8608151b92479 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/f0b124d52dc24d9175dfa030b6c8608151b92479/pos.py |
self.write(cr, uid, ids, { 'groups_id': [((3 if value == 'simple' else 4), extended_group_id)]}, context=context) | if type(ids) in (int,long,): ids = [ids] if value != 'simple': for user in self.browse(cr, uid, ids, context=context): group_ids = map(lambda x:x.id, user.groups_id) if extended_group_id not in group_ids: self.write(cr, uid, [user.id], {'groups_id': [(4, extended_group_id)]}, context=context) else: self.write(cr, uid, ids, {'groups_id': [(3, extended_group_id)]}, context=context) | def _set_interface_type(self, cr, uid, ids, name, value, arg, context=None): """Implementation of 'view' function field setter, sets the type of interface of the users. @param name: Name of the field @param arg: User defined argument @param value: new value returned @return: True/False """ if not value or value not in ['simple','extended']: return False group_obj = self.pool.get('res.groups') extended_group_id = group_obj.get_extended_interface_group(cr, uid, context=context) self.write(cr, uid, ids, { 'groups_id': [((3 if value == 'simple' else 4), extended_group_id)]}, context=context) return True | 87fd857d724c5333250c5a84322917b021116a83 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/87fd857d724c5333250c5a84322917b021116a83/res_user.py |
search_arg = ['|', ('first_name', 'ilike', arg[2]), ('name', 'ilike', arg[2])] contact_ids = contact_obj.search(cr, user, search_arg, offset=offset, \ limit=limit, order=order, context=context, count=count) contacts = contact_obj.browse(cr, user, contact_ids, context=context) for contact in contacts: job_ids.extend([item.id for item in contact.job_ids]) | if arg[2] and not count: search_arg = ['|', ('first_name', 'ilike', arg[2]), ('name', 'ilike', arg[2])] contact_ids = contact_obj.search(cr, user, search_arg, offset=offset, limit=limit, order=order, context=context, count=count) contacts = contact_obj.browse(cr, user, contact_ids, context=context) for contact in contacts: job_ids.extend([item.id for item in contact.job_ids]) | def search(self, cr, user, args, offset=0, limit=None, order=None, context=None, count=False): """ search parnter job @param self: The object pointer @param cr: the current row, from the database cursor, @param user: the current user @param args: list of tuples of form [(‘name_of_the_field’, ‘operator’, value), ...]. @param offset: The Number of Results to Pass @param limit: The Number of Results to Return @param context: A standard dictionary for contextual values """ | c522cbff3b9240c195c0a3bec86e84039f3c1713 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/c522cbff3b9240c195c0a3bec86e84039f3c1713/base_contact.py |
trigger_date = dtstart + (vals['trigger_occurs'] == 'AFTER' and delta or -delta) vals['trigger_date'] = trigger_date | trigger_date = dtstart + (vals['trigger_occurs'] == 'AFTER' and delta or -delta) vals['trigger_date'] = trigger_date | def create(self, cr, uid, vals, context={}): event_date = vals.get('event_date', False) if event_date: dtstart = datetime.datetime.strptime(vals['event_date'], "%Y-%m-%d %H:%M:%S") if vals['trigger_interval'] == 'DAYS': delta = datetime.timedelta(days=vals['trigger_duration']) if vals['trigger_interval'] == 'HOURS': delta = datetime.timedelta(hours=vals['trigger_duration']) if vals['trigger_interval'] == 'MINUTES': delta = datetime.timedelta(minutes=vals['trigger_duration']) trigger_date = dtstart + (vals['trigger_occurs'] == 'AFTER' and delta or -delta) vals['trigger_date'] = trigger_date res = super(crm_caldav_alarm, self).create(cr, uid, vals, context) return res | 363fd1ca01676d0c35ffe9725222b04e2ac96cf4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/363fd1ca01676d0c35ffe9725222b04e2ac96cf4/common.py |
txt = unicode(self.localcontext.get('translate', lambda x:x)(txt)) | txt = unicode(txt) | def _process_text(self, txt): if not self.localcontext: return str2xml(txt) if not txt: return '' result = '' sps = _regex.split(txt) while sps: # This is a simple text to translate result += unicode(self.localcontext.get('translate', lambda x:x)(sps.pop(0))) if sps: try: expr = sps.pop(0) txt = eval(expr,self.localcontext) if txt and (isinstance(txt, unicode) or isinstance(txt, str)): txt = unicode(self.localcontext.get('translate', lambda x:x)(txt)) except Exception,e: tb_s = reduce(lambda x, y: x+y, traceback.format_exception(sys.exc_type, sys.exc_value, sys.exc_traceback)) if type(txt)==type('') or type(txt)==type(u''): txt2 = str2xml(txt) result += unicode(txt2) elif (txt is not None) and (txt is not False): result += unicode(txt) return result | d25532fb01af050e91c88f39d3d89ea2664057e7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/d25532fb01af050e91c88f39d3d89ea2664057e7/utils.py |
self.blacklist_for_save = set(["publisher_warranty_url"]) | self.blacklist_for_save = set(["publisher_warranty_url", "load_language"]) | def __init__(self, fname=None): self.options = { 'email_from':False, 'xmlrpc_interface': '', # this will bind the server to all interfaces 'xmlrpc_port': 8069, 'netrpc_interface': '', 'netrpc_port': 8070, 'xmlrpcs_interface': '', # this will bind the server to all interfaces 'xmlrpcs_port': 8071, 'db_host': False, 'db_port': False, 'db_name': False, 'db_user': False, 'db_password': False, 'db_maxconn': 64, 'reportgz': False, 'netrpc': True, 'xmlrpc': True, 'xmlrpcs': True, 'translate_in': None, 'translate_out': None, 'overwrite_existing_translations': False, 'load_language': None, 'language': None, 'pg_path': None, 'admin_passwd': 'admin', 'csv_internal_sep': ',', 'addons_path': None, 'root_path': None, 'debug_mode': False, 'import_partial': "", 'pidfile': None, 'logfile': None, 'logrotate': True, 'smtp_server': 'localhost', 'smtp_user': False, 'smtp_port':25, 'smtp_ssl':False, 'smtp_password': False, 'stop_after_init': False, # this will stop the server after initialization 'syslog' : False, 'log_level': logging.INFO, 'assert_exit_level': logging.ERROR, # level above which a failed assert will be raised 'cache_timeout': 100000, 'login_message': False, 'list_db' : True, 'timezone' : False, # to override the default TZ 'test_file' : False, 'test_report_directory' : False, 'test_disable' : False, 'test_commit' : False, 'static_http_enable': False, 'static_http_document_root': None, 'static_http_url_prefix': None, 'secure_cert_file': 'server.cert', 'secure_pkey_file': 'server.pkey', 'publisher_warranty_url': 'http://services.openerp.com/publisher-warranty/', } self.blacklist_for_save = set(["publisher_warranty_url"]) | a8422b1b091b222d016e1295c57536a415697a58 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/a8422b1b091b222d016e1295c57536a415697a58/config.py |
import pdb pdb.set_trace() | def set_context(self, objects, data, ids, report_type = None): new_ids = ids if (data['model'] == 'ir.ui.menu'): new_ids = 'active_ids' in data['form'] and data['form']['active_ids'] or [] objects = self.pool.get('account.journal.period').browse(self.cr, self.uid, new_ids) import pdb pdb.set_trace() super(journal_print, self).set_context(objects, data, new_ids, report_type) | 6c6fb8c3592b12aa9b1b3096d347a82c681171f9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/6c6fb8c3592b12aa9b1b3096d347a82c681171f9/account_journal.py |
|
m2o_order = m2o_order.split(",",1)[0].strip().split(" ",1)[0] | m2o_order_list = [] for order_part in m2o_order.split(",",1): m2o_order_list.append(order_part.strip().split(" ",1)[0].strip()) m2o_order = m2o_order_list | def _generate_m2o_order_by(self, order_field, query): """ Add possibly missing JOIN to ``query`` and generate the ORDER BY clause for m2o fields, either native m2o fields or function/related fields that are stored, including intermediate JOINs for inheritance if required. | 162e988544648771fa1165391e558da862c6af17 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/162e988544648771fa1165391e558da862c6af17/orm.py |
return '"%s"."%s"' % (dest_model._table, m2o_order) | qualify = lambda field: '"%s"."%s"' % (dest_model._table, field) return map(qualify, m2o_order) if isinstance(m2o_order, list) else qualify(m2o_order) | def _generate_m2o_order_by(self, order_field, query): """ Add possibly missing JOIN to ``query`` and generate the ORDER BY clause for m2o fields, either native m2o fields or function/related fields that are stored, including intermediate JOINs for inheritance if required. | 162e988544648771fa1165391e558da862c6af17 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/162e988544648771fa1165391e558da862c6af17/orm.py |
continue | continue | def _generate_order_by(self, order_spec, query): """ Attempt to consruct an appropriate ORDER BY clause based on order_spec, which must be a comma-separated list of valid field names, optionally followed by an ASC or DESC direction. | 162e988544648771fa1165391e558da862c6af17 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/162e988544648771fa1165391e558da862c6af17/orm.py |
continue | continue | def _generate_order_by(self, order_spec, query): """ Attempt to consruct an appropriate ORDER BY clause based on order_spec, which must be a comma-separated list of valid field names, optionally followed by an ASC or DESC direction. | 162e988544648771fa1165391e558da862c6af17 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/162e988544648771fa1165391e558da862c6af17/orm.py |
order_by_elements.append("%s %s" % (inner_clause, order_direction)) | if isinstance(inner_clause, list): for clause in inner_clause: order_by_elements.append("%s %s" % (clause, order_direction)) else: order_by_elements.append("%s %s" % (inner_clause, order_direction)) | def _generate_order_by(self, order_spec, query): """ Attempt to consruct an appropriate ORDER BY clause based on order_spec, which must be a comma-separated list of valid field names, optionally followed by an ASC or DESC direction. | 162e988544648771fa1165391e558da862c6af17 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/162e988544648771fa1165391e558da862c6af17/orm.py |
field_search[2] = "'%"+str(search_value)+"%'" | field_search[2] = "'%%"+str(search_value)+"%%'" | def set_field_operator(self,field_name,field_type,search_operator,search_value): field_search = [field_name,search_operator,search_value] if search_operator == '=': if field_type=='many2one': field_search[1]='in' field_search[2] = "("+','.join([str(x) for x in search_value])+")" elif field_type in char_type or field_type in date_type: field_search[2] = field_search[2] and "'"+field_search[2]+"'" or False elif search_operator == '<>': if field_type=='many2one': field_search[1]='not in' field_search[2] = "("+','.join([str(x) for x in search_value])+")" elif field_type in char_type or field_type in date_type: field_search[2] = "'"+field_search[2]+"'" elif search_operator == 'in': if field_type=='many2one': field_search[2] = "("+','.join([str(x) for x in search_value])+")" else: field_search[1] = 'ilike' field_search[2] = "'%"+str(search_value)+"%'" elif search_operator == 'not in': if field_type=='many2one': field_search[2] = "("+','.join([str(x) for x in search_value])+")" else: field_search[1] = 'not ilike' field_search[2] = "'%"+str(search_value)+"%'" elif search_operator == '^': if field_type in char_type: field_search[1]='~' field_search[2]="'"+str(search_operator)+str(search_value)+"'" else: return False elif search_operator == '$': if field_type in char_type: field_search[1]='~' field_search[2]="'"+search_value+search_operator+"'" else: return False #end if field_type in char_type: elif search_operator in ('is','is not'): field_search[2] = 'null' elif search_operator in ('<','>'): if field_type in date_type: field_search[2] = "'"+field_search[2]+"'" elif field_type not in int_type: return False return field_search | ee33d85b03b66815a4bfc186a755e761f321af61 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/ee33d85b03b66815a4bfc186a755e761f321af61/wiz_set_filter_fields.py |
field_search[2] = "'%"+str(search_value)+"%'" | field_search[2] = "'%%"+str(search_value)+"%%'" | def set_field_operator(self,field_name,field_type,search_operator,search_value): field_search = [field_name,search_operator,search_value] if search_operator == '=': if field_type=='many2one': field_search[1]='in' field_search[2] = "("+','.join([str(x) for x in search_value])+")" elif field_type in char_type or field_type in date_type: field_search[2] = field_search[2] and "'"+field_search[2]+"'" or False elif search_operator == '<>': if field_type=='many2one': field_search[1]='not in' field_search[2] = "("+','.join([str(x) for x in search_value])+")" elif field_type in char_type or field_type in date_type: field_search[2] = "'"+field_search[2]+"'" elif search_operator == 'in': if field_type=='many2one': field_search[2] = "("+','.join([str(x) for x in search_value])+")" else: field_search[1] = 'ilike' field_search[2] = "'%"+str(search_value)+"%'" elif search_operator == 'not in': if field_type=='many2one': field_search[2] = "("+','.join([str(x) for x in search_value])+")" else: field_search[1] = 'not ilike' field_search[2] = "'%"+str(search_value)+"%'" elif search_operator == '^': if field_type in char_type: field_search[1]='~' field_search[2]="'"+str(search_operator)+str(search_value)+"'" else: return False elif search_operator == '$': if field_type in char_type: field_search[1]='~' field_search[2]="'"+search_value+search_operator+"'" else: return False #end if field_type in char_type: elif search_operator in ('is','is not'): field_search[2] = 'null' elif search_operator in ('<','>'): if field_type in date_type: field_search[2] = "'"+field_search[2]+"'" elif field_type not in int_type: return False return field_search | ee33d85b03b66815a4bfc186a755e761f321af61 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/ee33d85b03b66815a4bfc186a755e761f321af61/wiz_set_filter_fields.py |
def exp_list(self): if not tools.config['list_db']: | def exp_list(self, document=False): if not tools.config['list_db'] and not document: | def exp_list(self): if not tools.config['list_db']: raise Exception('AccessDenied') | 47c1d217598f96e25db3d38baada091d7937055f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/47c1d217598f96e25db3d38baada091d7937055f/web_services.py |
def setTTFontMapping(self,face, fontname,filename, mode='all'): from reportlab.lib.fonts import addMapping from reportlab.pdfbase import pdfmetrics from reportlab.pdfbase.ttfonts import TTFont pdfmetrics.registerFont(TTFont(fontname, filename )) if (mode == 'all'): addMapping(face, 0, 0, fontname) #normal addMapping(face, 0, 1, fontname) #italic addMapping(face, 1, 0, fontname) #bold addMapping(face, 1, 1, fontname) #italic and bold elif (mode== 'normal') or (mode == 'regular'): addMapping(face, 0, 0, fontname) #normal elif (mode == 'italic'): addMapping(face, 0, 1, fontname) #italic elif (mode == 'bold'): addMapping(face, 1, 0, fontname) #bold elif (mode == 'bolditalic'): addMapping(face, 1, 1, fontname) #italic and bold | c6543844f45c7f3604611a585c1a3ce1f2ef1f2d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/c6543844f45c7f3604611a585c1a3ce1f2ef1f2d/trml2pdf.py |
||
from reportlab.pdfbase import pdfmetrics | from reportlab.pdfbase import pdfmetrics | def setFont(self, node): from reportlab.pdfbase import pdfmetrics fname = node.get('name') #TODO : other fonts should be supported if fname not in pdfmetrics.standardFonts: fname = self.canvas._fontname return self.canvas.setFont(fname, utils.unit_get(node.get('size'))) | c6543844f45c7f3604611a585c1a3ce1f2ef1f2d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/c6543844f45c7f3604611a585c1a3ce1f2ef1f2d/trml2pdf.py |
def setFont(self, node): from reportlab.pdfbase import pdfmetrics fname = node.get('name') #TODO : other fonts should be supported if fname not in pdfmetrics.standardFonts: fname = self.canvas._fontname return self.canvas.setFont(fname, utils.unit_get(node.get('size'))) | c6543844f45c7f3604611a585c1a3ce1f2ef1f2d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/c6543844f45c7f3604611a585c1a3ce1f2ef1f2d/trml2pdf.py |
||
fname = self.canvas._fontname | fname = self.canvas._fontname | def setFont(self, node): from reportlab.pdfbase import pdfmetrics fname = node.get('name') #TODO : other fonts should be supported if fname not in pdfmetrics.standardFonts: fname = self.canvas._fontname return self.canvas.setFont(fname, utils.unit_get(node.get('size'))) | c6543844f45c7f3604611a585c1a3ce1f2ef1f2d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/c6543844f45c7f3604611a585c1a3ce1f2ef1f2d/trml2pdf.py |
self.localcontext = localcontext | self.localcontext = localcontext.copy | def __init__(self, node, localcontext, styles, self2): self.localcontext = localcontext self.node = node self.styles = styles self.width = utils.unit_get(node.get('width')) self.height = utils.unit_get(node.get('height')) self.self2 = self2 | c6543844f45c7f3604611a585c1a3ce1f2ef1f2d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/c6543844f45c7f3604611a585c1a3ce1f2ef1f2d/trml2pdf.py |
"HTMLParser", "select", "libxslt", "libxml2", "mako", "poplib", | "HTMLParser", "select", "mako", "poplib", | def run(self): # create startup script start_script = "#!/bin/sh\ncd %s\nexec %s ./openerp-server.py $@\n"\ % (join(self.install_libbase, "openerp-server"), sys.executable) # write script f = open('openerp-server', 'w') f.write(start_script) f.close() install.run(self) | d2ad2f4355965fc2bd38e9f75d2e62f38329d1bf /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/d2ad2f4355965fc2bd38e9f75d2e62f38329d1bf/setup.py |
for x in ('CRITICAL', 'ERROR', 'WARNING', 'INFO', 'DEBUG', 'DEBUG_RPC', 'NOTSET')]) | for x in ('CRITICAL', 'ERROR', 'WARNING', 'INFO', 'TEST', 'DEBUG', 'DEBUG_RPC', 'NOTSET')]) | def __init__(self, fname=None): self.options = { 'email_from':False, 'interface': '', # this will bind the server to all interfaces 'port': 8069, 'netinterface': '', 'netport': 8070, 'db_host': False, 'db_port': False, 'db_name': False, 'db_user': False, 'db_password': False, 'db_maxconn': 64, 'reportgz': False, 'netrpc': True, 'xmlrpc': True, 'soap': False, 'translate_in': None, 'translate_out': None, 'language': None, 'pg_path': None, 'admin_passwd': 'admin', 'csv_internal_sep': ',', 'addons_path': None, 'root_path': None, 'debug_mode': False, 'import_partial': "", 'pidfile': None, 'logfile': None, 'logrotate': '1', 'smtp_server': 'localhost', 'smtp_user': False, 'smtp_port':25, 'smtp_ssl':False, 'smtp_password': False, 'stop_after_init': False, # this will stop the server after initialization 'price_accuracy': 2, 'secure' : False, 'syslog' : False, 'log_level': logging.INFO, 'assert_exit_level': logging.WARNING, # level above which a failed assert will be raised 'cache_timeout': 100000, 'login_message': False, 'list_db' : True, 'timezone' : False, # to override the default TZ } self.misc = {} | 231336c878cef4cd3b8054cbea8ce187c2bf470f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/231336c878cef4cd3b8054cbea8ce187c2bf470f/config.py |
basic_alarm = meeting.alarm_id | def do_alarm_create(self, cr, uid, ids, context={}): alarm_obj = self.pool.get('calendar.alarm') model_obj = self.pool.get('ir.model') model_id = model_obj.search(cr, uid, [('model', '=', self._name)])[0] | 26cfa4092073a5af135483c80028c6b7529d485f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/26cfa4092073a5af135483c80028c6b7529d485f/crm_meeting.py |
|
cr.execute('Update crm_meeting set caldav_alarm_id=%s \ where id=%s' % (alarm_id, meeting.id)) | cr.execute('Update crm_meeting set caldav_alarm_id=%s, \ alarm_id=%s where id=%s' % (alarm_id, basic_alarm.id, meeting.id)) | def do_alarm_create(self, cr, uid, ids, context={}): alarm_obj = self.pool.get('calendar.alarm') model_obj = self.pool.get('ir.model') model_id = model_obj.search(cr, uid, [('model', '=', self._name)])[0] | 26cfa4092073a5af135483c80028c6b7529d485f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/26cfa4092073a5af135483c80028c6b7529d485f/crm_meeting.py |
self.do_alarm_create(cr, uid, new_ids) | if vals.get('alarm_id'): self.do_alarm_create(cr, uid, new_ids) | def write(self, cr, uid, ids, vals, context=None, check=True, update_check=True): if isinstance(ids, (str, int, long)): select = [ids] else: select = ids new_ids = [] for id in select: id = common.caldav_id2real_id(id) if not id in new_ids: new_ids.append(id) res = super(crm_meeting, self).write(cr, uid, new_ids, vals, context=context) self.do_alarm_create(cr, uid, new_ids) return res | 26cfa4092073a5af135483c80028c6b7529d485f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/26cfa4092073a5af135483c80028c6b7529d485f/crm_meeting.py |
def _select_signals(self, cr, uid, context={}): cr.execute("select distinct t.signal as key, t.signal || ' - [ ' || w.osv || ' ] ' as val from wkf w, wkf_activity a, wkf_transition t "\ " where w.id = a.wkf_id " \ " and t.act_from = a.id " \ " or t.act_to = a.id and t.signal not in (null, NULL)") result = cr.fetchall() or [] res = [] for rs in result: if not rs[0] == None and not rs[1] == None: res.append(rs) return res | c8bcdda9537cbb5a43955f848009a3eda39ef36b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/c8bcdda9537cbb5a43955f848009a3eda39ef36b/ir_actions.py |
||
'obj':obj | 'object':obj | def run(self, cr, uid, ids, context={}): logger = netsvc.Logger() for action in self.browse(cr, uid, ids, context): obj_pool = self.pool.get(action.model_id.model) obj = obj_pool.browse(cr, uid, context['active_id'], context=context) cxt = { 'context':context, 'object': obj, 'time':time, 'cr': cr, 'pool' : self.pool, 'uid' : uid } expr = eval(str(action.condition), cxt) if not expr: continue if action.state=='client_action': if not action.action_id: raise osv.except_osv(_('Error'), _("Please specify an action to launch !")) result = self.pool.get(action.action_id.type).read(cr, uid, action.action_id.id, context=context) return result | c8bcdda9537cbb5a43955f848009a3eda39ef36b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/c8bcdda9537cbb5a43955f848009a3eda39ef36b/ir_actions.py |
self._parents = [] | def __init__(self, *args, **kwargs): self._cache = {} self._parents = [] r = super(ir_ui_menu, self).__init__(*args, **kwargs) self.pool.get('ir.model.access').register_cache_clearing_method(self._name, 'clear_cache') return r | db13ceee7aa2221b49dc8645871e12986ebe822f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/db13ceee7aa2221b49dc8645871e12986ebe822f/ir_ui_menu.py |
|
self._parents = [] | def clear_cache(self): # radical but this doesn't frequently happen self._cache = {} self._parents = [] | db13ceee7aa2221b49dc8645871e12986ebe822f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/db13ceee7aa2221b49dc8645871e12986ebe822f/ir_ui_menu.py |
|
if uid !=1: flag = True for dom in args: if dom[0] == 'parent_id': flag = False break if flag: args += [('parent_id','child_of',self._parents)] ids = osv.orm.orm.search(self, cr, uid, args, offset, uid==1 and limit or None, order, context=context, count=(count and uid==1)) | ids = osv.orm.orm.search(self, cr, uid, args, offset, limit, order, context=context, count=(count and uid==1)) | def search(self, cr, uid, args, offset=0, limit=2000, order=None, context=None, count=False): if context is None: context = {} | db13ceee7aa2221b49dc8645871e12986ebe822f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/db13ceee7aa2221b49dc8645871e12986ebe822f/ir_ui_menu.py |
if limit and not count: ids = ids[:int(limit)] | def search(self, cr, uid, args, offset=0, limit=2000, order=None, context=None, count=False): if context is None: context = {} | db13ceee7aa2221b49dc8645871e12986ebe822f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/db13ceee7aa2221b49dc8645871e12986ebe822f/ir_ui_menu.py |
|
def search(self, cr, uid, args, offset=0, limit=2000, order=None, context=None, count=False): if context is None: context = {} | db13ceee7aa2221b49dc8645871e12986ebe822f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/db13ceee7aa2221b49dc8645871e12986ebe822f/ir_ui_menu.py |
||
continue | continue | def search(self, cr, uid, args, offset=0, limit=2000, order=None, context=None, count=False): if context is None: context = {} | db13ceee7aa2221b49dc8645871e12986ebe822f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/db13ceee7aa2221b49dc8645871e12986ebe822f/ir_ui_menu.py |
if not menu.parent_id.id: self._parents.append(menu.id) | def search(self, cr, uid, args, offset=0, limit=2000, order=None, context=None, count=False): if context is None: context = {} | db13ceee7aa2221b49dc8645871e12986ebe822f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/db13ceee7aa2221b49dc8645871e12986ebe822f/ir_ui_menu.py |
|
if not menu.parent_id.id: self._parents.append(menu.id) | def search(self, cr, uid, args, offset=0, limit=2000, order=None, context=None, count=False): if context is None: context = {} | db13ceee7aa2221b49dc8645871e12986ebe822f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/db13ceee7aa2221b49dc8645871e12986ebe822f/ir_ui_menu.py |
|
self._cache[key] = True | self._cache[key] = True | def search(self, cr, uid, args, offset=0, limit=2000, order=None, context=None, count=False): if context is None: context = {} | db13ceee7aa2221b49dc8645871e12986ebe822f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/db13ceee7aa2221b49dc8645871e12986ebe822f/ir_ui_menu.py |
if limit: result = result[:int(limit)] | def search(self, cr, uid, args, offset=0, limit=2000, order=None, context=None, count=False): if context is None: context = {} | db13ceee7aa2221b49dc8645871e12986ebe822f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/db13ceee7aa2221b49dc8645871e12986ebe822f/ir_ui_menu.py |
|
resource_id = len(resource_ids) or resource_ids[0] | if len(resource_ids): resource_id = 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 values """ cal_obj = self.pool.get('resource.calendar') res_obj = self.pool.get('resource.resource') | fa45d444e5204e7692cca42278563b3042906cfd /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/fa45d444e5204e7692cca42278563b3042906cfd/crm_lead.py |
tsk.remaining_hours as remaining_hours | tsk.remaining_hours as remaining_hours, tsk.date_end as date_close | def init(self, cr): cr.execute(''' create or replace view report_closed_task as ( select tsk.id as id, tsk.sequence as sequence, tsk.name as name, tsk.project_id as project_id, tsk.user_id as user_id, tsk.date_deadline as date_deadline, tsk.planned_hours as planned_hours, tsk.delay_hours as delay_hours, tsk.progress as progress, tsk.priority as priority, tsk.state as state, tsk.remaining_hours as remaining_hours from project_task tsk | 0111d8b79e1d60e6ece8573e33dc103e2ec72a3b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/0111d8b79e1d60e6ece8573e33dc103e2ec72a3b/report_task.py |
where (tsk.date_end <= CURRENT_DATE AND tsk.date_end > (CURRENT_DATE-15)) | def init(self, cr): cr.execute(''' create or replace view report_closed_task as ( select tsk.id as id, tsk.sequence as sequence, tsk.name as name, tsk.project_id as project_id, tsk.user_id as user_id, tsk.date_deadline as date_deadline, tsk.planned_hours as planned_hours, tsk.delay_hours as delay_hours, tsk.progress as progress, tsk.priority as priority, tsk.state as state, tsk.remaining_hours as remaining_hours from project_task tsk | 0111d8b79e1d60e6ece8573e33dc103e2ec72a3b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/0111d8b79e1d60e6ece8573e33dc103e2ec72a3b/report_task.py |
|
message = type_list.get(vals.get('type',_('Picking'))) + " '" + vals['name'] + "' "+ _("created.") | message = type_list.get(vals.get('type', False), _('Picking')) + " '" + (vals['name'] or "n/a") + "' "+ _("created.") | 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('auto_picking', False): message = type_list.get(vals.get('type',_('Picking'))) + " '" + vals['name'] + "' "+ _("created.") self.log(cr, user, id, message) return super(stock_picking, self).create(cr, user, vals, context) | 04479073567222206d120f3c501672dc33a16512 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/04479073567222206d120f3c501672dc33a16512/stock.py |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.