rem stringlengths 1 322k | add stringlengths 0 2.05M | context stringlengths 4 228k | meta stringlengths 156 215 |
|---|---|---|---|
create or replace view report_stock_inventory as ( (select | CREATE OR REPLACE view report_stock_inventory AS ( (SELECT | def init(self, cr): tools.drop_view_if_exists(cr, 'report_stock_inventory') cr.execute(""" | 70911f1e6859e4f03d8351e60e310cc25e5794f9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/70911f1e6859e4f03d8351e60e310cc25e5794f9/report_stock_move.py |
sum(-m.product_qty*u.factor)::decimal as product_qty, sum(-pt.standard_price * m.product_qty * u.factor)::decimal as value from | coalesce(sum(-m.product_qty * u.factor)::decimal, 0.0) as product_qty, coalesce(sum(-pt.standard_price * m.product_qty * u.factor)::decimal, 0.0) as value FROM | def init(self, cr): tools.drop_view_if_exists(cr, 'report_stock_inventory') cr.execute(""" | 70911f1e6859e4f03d8351e60e310cc25e5794f9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/70911f1e6859e4f03d8351e60e310cc25e5794f9/report_stock_move.py |
left join stock_picking p on (m.picking_id=p.id) left join product_product pp on (m.product_id=pp.id) left join product_template pt on (pp.product_tmpl_id=pt.id) left join product_uom u on (m.product_uom=u.id) left join stock_location l on (m.location_id=l.id) group by | LEFT JOIN stock_picking p ON (m.picking_id=p.id) LEFT JOIN product_product pp ON (m.product_id=pp.id) LEFT JOIN product_template pt ON (pp.product_tmpl_id=pt.id) LEFT JOIN product_uom u ON (m.product_uom=u.id) LEFT JOIN stock_location l ON (m.location_id=l.id) GROUP BY | def init(self, cr): tools.drop_view_if_exists(cr, 'report_stock_inventory') cr.execute(""" | 70911f1e6859e4f03d8351e60e310cc25e5794f9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/70911f1e6859e4f03d8351e60e310cc25e5794f9/report_stock_move.py |
) union all ( select | ) UNION ALL ( SELECT | def init(self, cr): tools.drop_view_if_exists(cr, 'report_stock_inventory') cr.execute(""" | 70911f1e6859e4f03d8351e60e310cc25e5794f9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/70911f1e6859e4f03d8351e60e310cc25e5794f9/report_stock_move.py |
sum(m.product_qty*u.factor)::decimal as product_qty, sum(pt.standard_price * m.product_qty * u.factor)::decimal as value from | coalesce(sum(m.product_qty*u.factor)::decimal, 0.0) as product_qty, coalesce(sum(pt.standard_price * m.product_qty * u.factor)::decimal, 0.0) as value FROM | def init(self, cr): tools.drop_view_if_exists(cr, 'report_stock_inventory') cr.execute(""" | 70911f1e6859e4f03d8351e60e310cc25e5794f9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/70911f1e6859e4f03d8351e60e310cc25e5794f9/report_stock_move.py |
left join stock_picking p on (m.picking_id=p.id) left join product_product pp on (m.product_id=pp.id) left join product_template pt on (pp.product_tmpl_id=pt.id) left join product_uom u on (m.product_uom=u.id) left join stock_location l on (m.location_dest_id=l.id) group by | LEFT JOIN stock_picking p ON (m.picking_id=p.id) LEFT JOIN product_product pp ON (m.product_id=pp.id) LEFT JOIN product_template pt ON (pp.product_tmpl_id=pt.id) LEFT JOIN product_uom u ON (m.product_uom=u.id) LEFT JOIN stock_location l ON (m.location_dest_id=l.id) GROUP BY | def init(self, cr): tools.drop_view_if_exists(cr, 'report_stock_inventory') cr.execute(""" | 70911f1e6859e4f03d8351e60e310cc25e5794f9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/70911f1e6859e4f03d8351e60e310cc25e5794f9/report_stock_move.py |
periods = [x[0] for x in data['form']['periods'][1]] data['form']['periods'] = periods | periods = data['form']['periods'] | def _print_report(self, cr, uid, ids, data, query_line, context=None): periods = [x[0] for x in data['form']['periods'][1]] data['form']['periods'] = periods data['ids'] = ids obj_jperiod = self.pool.get('account.journal.period') if isinstance(periods, list): ids_final = [] for journal in data['form']['journal_ids']: f... | b3f25454685b0dd394e747fe2ec5229725f9a3a1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/b3f25454685b0dd394e747fe2ec5229725f9a3a1/account_central_journal.py |
if not ids_final: raise osv.except_osv(_('No Data Available'), _('No records found for your selection!')) | if not ids_final: raise osv.except_osv(_('No Data Available'), _('No records found for your selection!')) | def _print_report(self, cr, uid, ids, data, query_line, context=None): periods = [x[0] for x in data['form']['periods'][1]] data['form']['periods'] = periods data['ids'] = ids obj_jperiod = self.pool.get('account.journal.period') if isinstance(periods, list): ids_final = [] for journal in data['form']['journal_ids']: f... | b3f25454685b0dd394e747fe2ec5229725f9a3a1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/b3f25454685b0dd394e747fe2ec5229725f9a3a1/account_central_journal.py |
ctx['date'] = line.ml_maturity_date | if data['form']['date_select'] == 'date_maturity': date_line = line.ml_maturity_date ctx['date'] = date_line | def _populate_statement(obj, cursor, user, data, context): line_ids = data['form']['lines'][0][2] if not line_ids: return {} pool = pooler.get_pool(cursor.dbname) line_obj = pool.get('payment.line') statement_obj = pool.get('account.bank.statement') statement_line_obj = pool.get('account.bank.statement.line') currency... | 8f83fa784934f08cf123c5383338466793d05ae9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/8f83fa784934f08cf123c5383338466793d05ae9/wizard_populate_statement.py |
if isinstance(result, list): for rec in result: if not rec.get('action_id',True): rec['action_id'] = (self._get_menu(cr, uid),'Menu') else: if not result.get('action_id',True): result['action_id'] = (self._get_menu(cr, uid),'Menu') | def override_password(o): if 'password' in o and ( 'id' not in o or o['id'] != uid ): o['password'] = '********' return o | 73cee227e1fe2e83d04382ea401d3c3c222aedeb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/73cee227e1fe2e83d04382ea401d3c3c222aedeb/res_user.py | |
fields_order.remove(context['group_by']) | if context['group_by'] in fields_order: fields_order.remove(context['group_by']) | def create(self, cr, uid, ids, datas, context=None): if not context: context={} self.context = context pool = pooler.get_pool(cr.dbname) model = pool.get(datas['model']) model_id = pool.get('ir.model').search(cr, uid, [('model','=',model._name)]) if model_id: model_desc = pool.get('ir.model').browse(cr, uid, model_id[0... | 7c5bc6cde05c41a743a7b7277daf1acf00c7f93f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/7c5bc6cde05c41a743a7b7277daf1acf00c7f93f/ps_list.py |
r.update({f:(r['__domain'][0][2],r[r['__domain'][0][0]])}) if result['fields'][f]['type'] == 'date' and r[f]: r[f] = '' | r.update({f:(r['__domain'][0][2],r[r['__domain'][0][0]])}) | def create(self, cr, uid, ids, datas, context=None): if not context: context={} self.context = context pool = pooler.get_pool(cr.dbname) model = pool.get(datas['model']) model_id = pool.get('ir.model').search(cr, uid, [('model','=',model._name)]) if model_id: model_desc = pool.get('ir.model').browse(cr, uid, model_id[0... | 7c5bc6cde05c41a743a7b7277daf1acf00c7f93f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/7c5bc6cde05c41a743a7b7277daf1acf00c7f93f/ps_list.py |
format = str(locale.nl_langinfo(locale.D_FMT).replace('%y', '%Y')) d1 = datetime.strptime(line[f],'%Y-%m-%d') new_d1 = d1.strftime(format) | new_d1 = line[f] if not line.get('__group'): format = str(locale.nl_langinfo(locale.D_FMT).replace('%y', '%Y')) d1 = datetime.strptime(line[f],'%Y-%m-%d') new_d1 = d1.strftime(format) | def _append_node(name, text): n = etree.SubElement(config, name) n.text = text | 7c5bc6cde05c41a743a7b7277daf1acf00c7f93f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/7c5bc6cde05c41a743a7b7277daf1acf00c7f93f/ps_list.py |
format = str(locale.nl_langinfo(locale.T_FMT)) d1 = datetime.strptime(line[f], '%H:%M:%S') new_d1 = d1.strftime(format) | new_d1 = line[f] if not line.get('__group'): format = str(locale.nl_langinfo(locale.T_FMT)) d1 = datetime.strptime(line[f], '%H:%M:%S') new_d1 = d1.strftime(format) | def _append_node(name, text): n = etree.SubElement(config, name) n.text = text | 7c5bc6cde05c41a743a7b7277daf1acf00c7f93f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/7c5bc6cde05c41a743a7b7277daf1acf00c7f93f/ps_list.py |
format = str(locale.nl_langinfo(locale.D_FMT).replace('%y', '%Y'))+' '+str(locale.nl_langinfo(locale.T_FMT)) d1 = datetime.strptime(line[f], '%Y-%m-%d %H:%M:%S') new_d1 = d1.strftime(format) | new_d1 = line[f] if not line.get('__group'): format = str(locale.nl_langinfo(locale.D_FMT).replace('%y', '%Y'))+' '+str(locale.nl_langinfo(locale.T_FMT)) d1 = datetime.strptime(line[f], '%Y-%m-%d %H:%M:%S') new_d1 = d1.strftime(format) | def _append_node(name, text): n = etree.SubElement(config, name) n.text = text | 7c5bc6cde05c41a743a7b7277daf1acf00c7f93f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/7c5bc6cde05c41a743a7b7277daf1acf00c7f93f/ps_list.py |
if to_update[id]['partner_id'] in data['partner_ids'][0][2]: | if to_update[id]['partner_id'] in data['partner_ids']: | def do_print(self, cr, uid, ids, context=None): data = self.read(cr, uid, ids, [])[0] res = self._get_partners_followp(cr, uid, ids, context)['to_update'] to_update = res data['followup_id'] = 'followup_id' in context and context['followup_id'] or False date = 'date' in context and context['date'] or data['date'] for i... | 2ea0ca0aa00cb829a1dac8a485f7abe5facb9cfb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/2ea0ca0aa00cb829a1dac8a485f7abe5facb9cfb/account_followup_print.py |
singer_statement() | account_cashbox_line() | def on_change_sub(self, cr, uid, ids, pieces, number,*a): | c909e8af22db1f6cfa821df04c7e550448da427b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/c909e8af22db1f6cfa821df04c7e550448da427b/account_cash_statement.py |
'balance_start': fields.function(_get_starting_balance, method=True, string='Opening Balance', type='float',digits=(16,2), help="Opening balance based on cashBox"), | 'balance_start': fields.function(_get_starting_balance, store=True, method=True, string='Opening Balance', type='float',digits=(16,2), help="Opening balance based on cashBox"), | def _end_balance(self, cursor, user, ids, name, attr, context=None): res_currency_obj = self.pool.get('res.currency') res_users_obj = self.pool.get('res.users') | c909e8af22db1f6cfa821df04c7e550448da427b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/c909e8af22db1f6cfa821df04c7e550448da427b/account_cash_statement.py |
'total_entry_encoding':fields.function(_get_sum_entry_encoding, method=True, string="Cash Transaction", help="Total cash transactions"), | 'total_entry_encoding':fields.function(_get_sum_entry_encoding, method=True, store=True, string="Cash Transaction", help="Total cash transactions"), | def _end_balance(self, cursor, user, ids, name, attr, context=None): res_currency_obj = self.pool.get('res.currency') res_users_obj = self.pool.get('res.users') | c909e8af22db1f6cfa821df04c7e550448da427b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/c909e8af22db1f6cfa821df04c7e550448da427b/account_cash_statement.py |
'balance_end': fields.function(_end_balance, method=True, string='Balance', help="Closing balance based on transactions"), 'balance_end_cash': fields.function(_balance_end_cash, method=True, string='Balance', help="Closing balance based on cashBox"), 'starting_details_ids': fields.one2many('singer.statement', 'starting... | 'balance_end': fields.function(_end_balance, method=True, store=True, string='Balance', help="Closing balance based on transactions"), 'balance_end_cash': fields.function(_balance_end_cash, method=True, store=True, string='Balance', help="Closing balance based on cashBox"), 'starting_details_ids': fields.one2many('acco... | def _end_balance(self, cursor, user, ids, name, attr, context=None): res_currency_obj = self.pool.get('res.currency') res_users_obj = self.pool.get('res.users') | c909e8af22db1f6cfa821df04c7e550448da427b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/c909e8af22db1f6cfa821df04c7e550448da427b/account_cash_statement.py |
'user_id': lambda self, cr, uid, context=None: uid | 'user_id': lambda self, cr, uid, context=None: uid, 'company_id': _get_company | def _end_balance(self, cursor, user, ids, name, attr, context=None): res_currency_obj = self.pool.get('res.currency') res_users_obj = self.pool.get('res.users') | c909e8af22db1f6cfa821df04c7e550448da427b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/c909e8af22db1f6cfa821df04c7e550448da427b/account_cash_statement.py |
cash_pool = self.pool.get('singer.statement') | cash_pool = self.pool.get('account.cashbox.line') | def onchange_journal_id(self, cr, uid, statement_id, journal_id, context={}): """ Changes balance start and starting details if journal_id changes" @param statement_id: Changed statement_id @param journal_id: Changed journal_id @return: Dictionary of changed values """ cash_pool = self.pool.get('singer.statement') st... | c909e8af22db1f6cfa821df04c7e550448da427b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/c909e8af22db1f6cfa821df04c7e550448da427b/account_cash_statement.py |
cash_pool = self.pool.get('singer.statement') | cash_pool = self.pool.get('account.cashbox.line') | def button_open(self, cr, uid, ids, context=None): """ Changes statement state to Running. @return: True """ cash_pool = self.pool.get('singer.statement') statement_pool = self.pool.get('account.bank.statement') | c909e8af22db1f6cfa821df04c7e550448da427b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/c909e8af22db1f6cfa821df04c7e550448da427b/account_cash_statement.py |
action_id = mod_obj._get_id(cr, uid, 'wiki', 'action_view_wiki_wiki_page_open') action_id = mod_obj.copy(cr, uid, action_id, context=context, default={ 'domain':"[('group_id','=',"+str(context.get('active_id',False))+"]", "name": menu.menu_name }) | for menu in self.browse(cr, uid, ids): action_id = mod_obj._get_id(cr, uid, 'wiki', 'action_view_wiki_wiki_page_open') action_id = mod_obj.copy(cr, uid, action_id, context=context, default={ 'domain':"[('group_id','=',"+str(context.get('active_id',False))+"]", "name": menu.menu_name }) | def wiki_menu_create(self, cr, uid, ids, context): | 1c056da2e1bbd5a09a1f48d5e2162f6c978655e4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/1c056da2e1bbd5a09a1f48d5e2162f6c978655e4/wiki_create_menu.py |
for menu in self.browse(cr, uid, ids): | def wiki_menu_create(self, cr, uid, ids, context): | 1c056da2e1bbd5a09a1f48d5e2162f6c978655e4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/1c056da2e1bbd5a09a1f48d5e2162f6c978655e4/wiki_create_menu.py | |
print 'Created menu', menu_id, action_id | def wiki_menu_create(self, cr, uid, ids, context): | 1c056da2e1bbd5a09a1f48d5e2162f6c978655e4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/1c056da2e1bbd5a09a1f48d5e2162f6c978655e4/wiki_create_menu.py | |
module = get_module_from_path(fabsolutepath) | module = get_module_from_path(frelativepath) | def get_module_from_path(path, mod_paths=None): | 34be1742ade6d225afe6f80e65f404b5e34e52eb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/34be1742ade6d225afe6f80e65f404b5e34e52eb/translate.py |
if not (obj.amount == obj.voucher_id.amount): | if not (abs(obj.amount) == obj.voucher_id.amount): | def _check_amount(self, cr, uid, ids, context=None): for obj in self.browse(cr, uid, ids, context=context): if obj.voucher_id: if not (obj.amount == obj.voucher_id.amount): return False return True | 45915a7d1e8d7dfe715ee3237eacf5d87ec9dc68 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/45915a7d1e8d7dfe715ee3237eacf5d87ec9dc68/account_voucher.py |
@param name: @param arg: | @param name: name of the field @param arg: user defined argument | def _child_compute(self, cr, uid, ids, name, arg, context={}): """ @param self: The object pointer. @param cr: A database cursor @param uid: ID of the user currently logged in @param ids: the ID of mrp.production object @param name: @param arg: | 001d95a574dd31a9b0d995f0ac55365b570d3806 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/001d95a574dd31a9b0d995f0ac55365b570d3806/mrp.py |
print "name",name print "arg",arg print "result",result | def _child_compute(self, cr, uid, ids, name, arg, context={}): """ @param self: The object pointer. @param cr: A database cursor @param uid: ID of the user currently logged in @param ids: the ID of mrp.production object @param name: @param arg: | 001d95a574dd31a9b0d995f0ac55365b570d3806 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/001d95a574dd31a9b0d995f0ac55365b570d3806/mrp.py | |
def _get_effective_date(self, cr, uid, ids, name, arg, context={}): | def _get_effective_date(self, cr, uid, ids, name, arg, context=None): | def _get_effective_date(self, cr, uid, ids, name, arg, context={}): res = {} dates_list = [] for order in self.browse(cr, uid, ids): dates_list = [] for pick in order.picking_ids: dates_list.append(pick.date) if dates_list: res[order.id] = min(dates_list) else: res[order.id] = False return res | f7eae25635f6966d88cdbfc057fef7ac01f12d3d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/f7eae25635f6966d88cdbfc057fef7ac01f12d3d/sale_order_dates.py |
return res | return res | def _get_effective_date(self, cr, uid, ids, name, arg, context={}): res = {} dates_list = [] for order in self.browse(cr, uid, ids): dates_list = [] for pick in order.picking_ids: dates_list.append(pick.date) if dates_list: res[order.id] = min(dates_list) else: res[order.id] = False return res | f7eae25635f6966d88cdbfc057fef7ac01f12d3d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/f7eae25635f6966d88cdbfc057fef7ac01f12d3d/sale_order_dates.py |
def _get_commitment_date(self, cr, uid, ids, name, arg, context={}): | def _get_commitment_date(self, cr, uid, ids, name, arg, context=None): | def _get_commitment_date(self, cr, uid, ids, name, arg, context={}): res = {} dates_list = [] for order in self.browse(cr, uid, ids): dates_list = [] for line in order.order_line: dt = datetime.strptime(order.date_order, '%Y-%m-%d') + relativedelta(days=line.delay or 0.0) dt_s = dt.strftime('%Y-%m-%d') dates_list.appen... | f7eae25635f6966d88cdbfc057fef7ac01f12d3d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/f7eae25635f6966d88cdbfc057fef7ac01f12d3d/sale_order_dates.py |
return res | return res | def _get_commitment_date(self, cr, uid, ids, name, arg, context={}): res = {} dates_list = [] for order in self.browse(cr, uid, ids): dates_list = [] for line in order.order_line: dt = datetime.strptime(order.date_order, '%Y-%m-%d') + relativedelta(days=line.delay or 0.0) dt_s = dt.strftime('%Y-%m-%d') dates_list.appen... | f7eae25635f6966d88cdbfc057fef7ac01f12d3d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/f7eae25635f6966d88cdbfc057fef7ac01f12d3d/sale_order_dates.py |
'commitment_date': fields.function(_get_commitment_date, method=True,store=True, type='date', string='Commitment Date', help="Date on which delivery of products is to be made"), | 'commitment_date': fields.function(_get_commitment_date, method=True, store=True, type='date', string='Commitment Date', help="Date on which delivery of products is to be made"), | def _get_commitment_date(self, cr, uid, ids, name, arg, context={}): res = {} dates_list = [] for order in self.browse(cr, uid, ids): dates_list = [] for line in order.order_line: dt = datetime.strptime(order.date_order, '%Y-%m-%d') + relativedelta(days=line.delay or 0.0) dt_s = dt.strftime('%Y-%m-%d') dates_list.appen... | f7eae25635f6966d88cdbfc057fef7ac01f12d3d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/f7eae25635f6966d88cdbfc057fef7ac01f12d3d/sale_order_dates.py |
'effective_date': fields.function(_get_effective_date, method=True, type='date', store=True,string='Effective Date',help="Date on which picking is created"), | 'effective_date': fields.function(_get_effective_date, method=True, type='date', store=True, string='Effective Date',help="Date on which picking is created"), | def _get_commitment_date(self, cr, uid, ids, name, arg, context={}): res = {} dates_list = [] for order in self.browse(cr, uid, ids): dates_list = [] for line in order.order_line: dt = datetime.strptime(order.date_order, '%Y-%m-%d') + relativedelta(days=line.delay or 0.0) dt_s = dt.strftime('%Y-%m-%d') dates_list.appen... | f7eae25635f6966d88cdbfc057fef7ac01f12d3d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/f7eae25635f6966d88cdbfc057fef7ac01f12d3d/sale_order_dates.py |
sale_order_line l left join product_uom u on (u.id=l.product_uom) left join product_template pt on (pt.id=l.product_id) | sale_order_line l ,product_uom u, product_product p, product_template pt where u.id = l.product_uom and pt.id = p.product_tmpl_id and p.id = l.product_id | def init(self, cr): tools.drop_view_if_exists(cr, 'sale_report') cr.execute(""" create or replace view sale_report as ( select el.*, -- (select count(1) from sale_order_line where order_id = s.id) as nbr, (select 1) as nbr, s.date_order as date, s.date_confirm as date_confirm, to_char(s.date_order, 'YYYY') as year, to_... | 11cdeb99298b071b75855a1e8633d04af8c567c9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/11cdeb99298b071b75855a1e8633d04af8c567c9/sale_report.py |
for (id, name) in product_obj.name_get(cr, uid, [move.product_id.id]): message = _('Product ') + " '" + name + "' "+ _("is consumed with") + " '" + str(move.product_qty) + "' "+ _("quantity.") self.log(cr, uid, move.id, message) | for new_move in self.browse(cr, uid, res, context=context): for (id, name) in product_obj.name_get(cr, uid, [new_move.product_id.id]): message = _('Product ') + " '" + name + "' "+ _("is consumed with") + " '" + str(new_move.product_qty) + "' "+ _("quantity.") self.log(cr, uid, new_move.id, message) | def action_consume(self, cr, uid, ids, quantity, location_id=False, context=None): """ Consumed product with specific quatity from specific source location @param cr: the database cursor @param uid: the user id @param ids: ids of stock move object to be consumed @param quantity : specify consume quantity @param locati... | 9110935b2e2d3b32ce4317fd95ec94afca14b51a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/9110935b2e2d3b32ce4317fd95ec94afca14b51a/stock.py |
'invoice_ids': fields.many2many('account.invoice', 'sale_order_invoice_rel', 'order_id', 'invoice_id', 'Invoices', help="This is the list of invoices that have been generated for this sale order. The same sale order may have been invoiced in several times (by line for example)."), | 'invoice_ids': fields.many2many('account.invoice', 'sale_order_invoice_rel', 'order_id', 'invoice_id', 'Invoices', readonly=True, help="This is the list of invoices that have been generated for this sale order. The same sale order may have been invoiced in several times (by line for example)."), | def _get_order(self, cr, uid, ids, context=None): if context is None: context = {} result = {} for line in self.pool.get('sale.order.line').browse(cr, uid, ids, context=context): result[line.order_id.id] = True return result.keys() | 6637f578c7973b2bd03a334161c5b773f65555ac /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/6637f578c7973b2bd03a334161c5b773f65555ac/sale.py |
def _model_search(self, cr, uid, obj, name, args): | def _model_search(self, cr, uid, obj, name, args, context={}): | def _model_search(self, cr, uid, obj, name, args): if not len(args): return [] model_id= args[0][2] if not model_id: return [] model = self.pool.get('ir.model').read(cr,uid,[model_id])[0]['model'] report_id = self.search(cr,uid,[('model','=',model)]) if not report_id: return [('id','=','0')] return [('id','in',report_i... | 47c59039e2262f54768bc755805354888ac18efd /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/47c59039e2262f54768bc755805354888ac18efd/directory_report.py |
value[f] = False | if f not in value: value[f] = False | fld_def = ((f in self._columns) and self._columns[f]) \ or ((f in self._inherit_fields) and self._inherit_fields[f][2]) \ or False | ebb2a2b3645340d8dc4ddda422d3f268ba96370b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/ebb2a2b3645340d8dc4ddda422d3f268ba96370b/orm.py |
if not context: | if context is None: | def write(self, cr, uid, ids, vals, context=None): if not context: context = {} if 'active' in vals and not vals['active']: self._check_moves(cr, uid, ids, "write", context) return super(account_account, self).write(cr, uid, ids, vals, context=context) | a5cb75b4238c630833f94678cd482e999e88306d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/a5cb75b4238c630833f94678cd482e999e88306d/account.py |
return date.strftime(self.lang_obj.date_format) | return date.strftime(str(self.lang_obj.date_format)) | def __str__(self): if self.val: if getattr(self,'name', None): date = datetime.strptime(self.name, DT_FORMAT) return date.strftime(self.lang_obj.date_format) return self.val | 7b6b348700f87f77f32c425435629d7c649986a4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/7b6b348700f87f77f32c425435629d7c649986a4/report_sxw.py |
.strftime("%s %s"%(self.lang_obj.date_format, self.lang_obj.time_format)) | .strftime("%s %s"%(str(self.lang_obj.date_format), str(self.lang_obj.time_format))) | def __str__(self): if self.val and getattr(self,'name', None): return datetime.strptime(self.name, DHM_FORMAT)\ .strftime("%s %s"%(self.lang_obj.date_format, self.lang_obj.time_format)) return self.val | 7b6b348700f87f77f32c425435629d7c649986a4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/7b6b348700f87f77f32c425435629d7c649986a4/report_sxw.py |
taxes = tax_obj.compute_all(cr, uid, line.tax_id, price, line.product_uom_qty) | taxes = tax_obj.compute_all(cr, uid, line.tax_id, line.price_unit, line.product_uom_qty) | def _amount_line(self, cr, uid, ids, field_name, arg, context=None): tax_obj = self.pool.get('account.tax') cur_obj = self.pool.get('res.currency') res = {} context = context or {} for line in self.browse(cr, uid, ids, context=context): price = line.price_unit * line.product_uom_qty * (1 - (line.discount or 0.0) / 100.... | 478ad61bb1e8b549a15572913d5b6e270bc60d38 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/478ad61bb1e8b549a15572913d5b6e270bc60d38/sale.py |
def _get_line_uom(line): if (line.order_id.invoice_quantity=='order') or not line.procurement_id: if line.product_uos: return line.product_uos.id return line.product_uom.id else: return self.pool.get('procurement.order').uom_get(cr, uid, line.procurement_id.id, context=context) | 478ad61bb1e8b549a15572913d5b6e270bc60d38 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/478ad61bb1e8b549a15572913d5b6e270bc60d38/sale.py | ||
def onchange_partner_id(self, cr, uid, ids, partner_id, journal_id=False, price=0.0, currency_id=False, ttype=False, context={}): """price Returns a dict that contains new values and context @param partner_id: latest value from user input for field partner_id @param args: other arguments @param context: context argume... | 4a3baffa6dfeca0db4cd0bcbe105c0026883c2ec /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/4a3baffa6dfeca0db4cd0bcbe105c0026883c2ec/voucher.py | ||
if line.credit and line.reconcile_partial_id: | if line.credit and line.reconcile_partial_id and ttype == 'receipt': continue if line.debit and line.reconcile_partial_id and ttype == 'payment': | def onchange_partner_id(self, cr, uid, ids, partner_id, journal_id=False, price=0.0, currency_id=False, ttype=False, context={}): """price Returns a dict that contains new values and context @param partner_id: latest value from user input for field partner_id @param args: other arguments @param context: context argume... | 4a3baffa6dfeca0db4cd0bcbe105c0026883c2ec /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/4a3baffa6dfeca0db4cd0bcbe105c0026883c2ec/voucher.py |
if line.credit and line.reconcile_partial_id: | if line.credit and line.reconcile_partial_id and ttype == 'receipt': | def onchange_partner_id(self, cr, uid, ids, partner_id, journal_id=False, price=0.0, currency_id=False, ttype=False, context={}): """price Returns a dict that contains new values and context @param partner_id: latest value from user input for field partner_id @param args: other arguments @param context: context argume... | 4a3baffa6dfeca0db4cd0bcbe105c0026883c2ec /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/4a3baffa6dfeca0db4cd0bcbe105c0026883c2ec/voucher.py |
if inv.journal_id.type in ('sale','sale_refund', 'cash', 'bank'): | if inv.type in ('sale', 'receipt'): | def _get_payment_term_lines(term_id, amount): term_pool = self.pool.get('account.payment.term') if term_id and amount: terms = term_pool.compute(cr, uid, term_id, amount) return terms return False | 4a3baffa6dfeca0db4cd0bcbe105c0026883c2ec /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/4a3baffa6dfeca0db4cd0bcbe105c0026883c2ec/voucher.py |
def unlink(self, cr, uid, ids, context={}): | def unlink(self, cr, uid, ids, context=None): | def unlink(self, cr, uid, ids, context={}): vouchers = self.read(cr, uid, ids, ['state']) unlink_ids = [] for t in vouchers: if t['state'] in ('draft', 'cancel'): unlink_ids.append(t['id']) else: raise osv.except_osv('Invalid action !', 'Cannot delete Voucher(s) which are already opened or paid !') return super(account... | 4b8f8dff839a3601d1a23e36d4720bdb69c0813d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/4b8f8dff839a3601d1a23e36d4720bdb69c0813d/voucher.py |
return super(account_voucher, self).unlink(self, cr, uid, unlink_ids) | return super(account_voucher, self).unlink(cr, uid, unlink_ids, context=context) | def unlink(self, cr, uid, ids, context={}): vouchers = self.read(cr, uid, ids, ['state']) unlink_ids = [] for t in vouchers: if t['state'] in ('draft', 'cancel'): unlink_ids.append(t['id']) else: raise osv.except_osv('Invalid action !', 'Cannot delete Voucher(s) which are already opened or paid !') return super(account... | 4b8f8dff839a3601d1a23e36d4720bdb69c0813d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/4b8f8dff839a3601d1a23e36d4720bdb69c0813d/voucher.py |
start_date = datetime.strptime(data['date'], "%Y-%m-%d %H:%M:%S") | def get_recurrent_ids(self, cr, uid, select, base_start_date, base_until_date, limit=100): """ @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 base_start_date: Get Start Date @param base_until_date: Get End Date @param l... | 189affe8f2c0bb996740acbd836e555a2e51cc03 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/189affe8f2c0bb996740acbd836e555a2e51cc03/base_calendar.py | |
res['auto'] = eval(rec.get('auto')) | res['auto'] = eval(rec.get('auto','False')) | 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'),('xml','report_xml'),('xsl','report_xsl'),('a... | 97f26473091c4723e1d97feb7d150a1465b4b151 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/97f26473091c4723e1d97feb7d150a1465b4b151/convert.py |
res['header'] = eval(rec.get('header')) | res['header'] = eval(rec.get('header','False')) | 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'),('xml','report_xml'),('xsl','report_xsl'),('a... | 97f26473091c4723e1d97feb7d150a1465b4b151 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/97f26473091c4723e1d97feb7d150a1465b4b151/convert.py |
res['multi'] = rec.get('multi') and eval(rec.get('multi')) | res['multi'] = rec.get('multi') and eval(rec.get('multi','False')) | 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'),('xml','report_xml'),('xsl','report_xsl'),('a... | 97f26473091c4723e1d97feb7d150a1465b4b151 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/97f26473091c4723e1d97feb7d150a1465b4b151/convert.py |
if not rec.get('menu') or eval(rec.get('menu','')): | if not rec.get('menu') or eval(rec.get('menu','False')): | 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'),('xml','report_xml'),('xsl','report_xsl'),('a... | 97f26473091c4723e1d97feb7d150a1465b4b151 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/97f26473091c4723e1d97feb7d150a1465b4b151/convert.py |
multi = rec.get('multi','') and eval(rec.get('multi','')) | multi = rec.get('multi','') and eval(rec.get('multi','False')) | 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','')) res = {'name': str... | 97f26473091c4723e1d97feb7d150a1465b4b151 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/97f26473091c4723e1d97feb7d150a1465b4b151/convert.py |
if (not rec.get('menu') or eval(rec.get('menu',''))) and id: | if (not rec.get('menu') or eval(rec.get('menu','False'))) and id: | 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','')) res = {'name': str... | 97f26473091c4723e1d97feb7d150a1465b4b151 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/97f26473091c4723e1d97feb7d150a1465b4b151/convert.py |
elif self.mode=='update' and (rec.get('menu') and eval(rec.get('menu','False'))==False): value = 'ir.actions.wizard,'+str(id) self._remove_ir_values(cr, string, value, model) | 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','')) res = {'name': str... | 97f26473091c4723e1d97feb7d150a1465b4b151 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/97f26473091c4723e1d97feb7d150a1465b4b151/convert.py | |
if (not rec.get('menu') or eval(rec.get('menu',''))) and id: | if (not rec.get('menu') or eval(rec.get('menu','False'))) and id: | def _tag_url(self, cr, rec, data_node=None): url = rec.get("string",'').encode('utf8') target = rec.get("target",'').encode('utf8') name = rec.get("name",'').encode('utf8') xml_id = rec.get('id','').encode('utf8') self._test_xml_id(xml_id) | 97f26473091c4723e1d97feb7d150a1465b4b151 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/97f26473091c4723e1d97feb7d150a1465b4b151/convert.py |
rows = model.read(cr, uid, datas['ids'], result['fields'].keys(), context) ids2 = map(itemgetter('id'), rows) if datas['ids'] != ids2: rows_new = [] for id in datas['ids']: rows_new += [elem for elem in rows if elem['id'] == id] rows = rows_new | rows = model.read(cr, uid, datas['ids'], result['fields'].keys(), context) ids2 = map(itemgetter('id'), rows) if datas['ids'] != ids2: rows_new = [] for id in datas['ids']: rows_new += [elem for elem in rows if elem['id'] == id] rows = rows_new | def get_groupby_data(groupby = [], domain = []): records = model.read_group(cr, uid, domain, fields_order, groupby , 0, None, context) for rec in records: rec['__group'] = True rec['__no_leaf'] = self.groupby_no_leaf rec['__grouped_by'] = groupby[0] if (isinstance(groupby, list) and groupby) else groupby for f in fiel... | 85bb4e09bc8ebec89b98df32c090c4693a90ef5b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/85bb4e09bc8ebec89b98df32c090c4693a90ef5b/ps_list.py |
col.set('tree','float') | col.set('tree','float') | def _append_node(name, text): n = etree.SubElement(config, name) n.text = text | 85bb4e09bc8ebec89b98df32c090c4693a90ef5b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/85bb4e09bc8ebec89b98df32c090c4693a90ef5b/ps_list.py |
def _append_node(name, text): n = etree.SubElement(config, name) n.text = text | 85bb4e09bc8ebec89b98df32c090c4693a90ef5b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/85bb4e09bc8ebec89b98df32c090c4693a90ef5b/ps_list.py | ||
col.set('tree','float') | col.set('tree', 'float') | def _append_node(name, text): n = etree.SubElement(config, name) n.text = text | 85bb4e09bc8ebec89b98df32c090c4693a90ef5b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/85bb4e09bc8ebec89b98df32c090c4693a90ef5b/ps_list.py |
if tsum[f] >= 0.01 : prec = '%.2f' total = prec%(tsum[f]) txt = str(total or '') else: txt = str(tsum[f] or '') | if tsum[f] != 0.0: digits = fields[fields_order[f]].get('digits', (16, 2)) prec = '%%.%sf' % (digits[1], ) total = prec % (tsum[f], ) txt = str(total or '') else: txt = str(tsum[f] or '') | def _append_node(name, text): n = etree.SubElement(config, name) n.text = text | 85bb4e09bc8ebec89b98df32c090c4693a90ef5b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/85bb4e09bc8ebec89b98df32c090c4693a90ef5b/ps_list.py |
phase_resource = False | def generate_schedule(self, cr, uid, ids, start_date, calendar_id=False, context=None): """ Schedule phase with the start date till all the next phases are completed. @param: start_dsate : start date for the phase @param: calendar_id : working calendar of the project """ if context is None: context = {} resource_pool =... | 91ace29a8aa15492de8857b4a2f9f0bba6de869e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/91ace29a8aa15492de8857b4a2f9f0bba6de869e/project_long_term.py | |
start = start_date minimum_time_unit = 1 resource = phase_resource_obj | def Project(): start = start_date minimum_time_unit = 1 resource = phase_resource_obj # If project has working calendar then that # else the default one would be considered if calendar_id: working_days = resource_pool.compute_working_calendar(cr, uid, calendar_id, context=context) vacation = tuple(resource_pool.compute... | 91ace29a8aa15492de8857b4a2f9f0bba6de869e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/91ace29a8aa15492de8857b4a2f9f0bba6de869e/project_long_term.py | |
def action_move_create(self, cr, uid, ids, *args): """Creates invoice related analytics and financial move lines""" ait_obj = self.pool.get('account.invoice.tax') cur_obj = self.pool.get('res.currency') context = {} for inv in self.browse(cr, uid, ids): if not inv.invoice_line: raise osv.except_osv(_('No Invoice Lines ... | 50960407e600c5e189bf55dd43924b375f42aeb3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/50960407e600c5e189bf55dd43924b375f42aeb3/invoice.py | ||
number = self.pool.get('ir.sequence').get_id(cr, uid, sid, 'id=%s', {'fiscalyear_id': obj_inv.period_id.fiscalyear_id.id}) | number = self.pool.get('ir.sequence').get_id(cr, uid, sid, 'id', {'fiscalyear_id': obj_inv.period_id.fiscalyear_id.id}) | def action_number(self, cr, uid, ids, *args): cr.execute('SELECT id, type, number, move_id, reference ' \ 'FROM account_invoice ' \ 'WHERE id IN %s', (tuple(ids),)) obj_inv = self.browse(cr, uid, ids)[0] for (id, invtype, number, move_id, reference) in cr.fetchall(): if not number: if obj_inv.journal_id.invoice_sequenc... | 50960407e600c5e189bf55dd43924b375f42aeb3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/50960407e600c5e189bf55dd43924b375f42aeb3/invoice.py |
def refund(self, cr, uid, ids, date=None, period_id=None, description=None): invoices = self.read(cr, uid, ids, ['name', 'type', 'number', 'reference', 'comment', 'date_due', 'partner_id', 'address_contact_id', 'address_invoice_id', 'partner_contact', 'partner_insite', 'partner_ref', 'payment_term', 'account_id', 'curr... | 50960407e600c5e189bf55dd43924b375f42aeb3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/50960407e600c5e189bf55dd43924b375f42aeb3/invoice.py | ||
result = ids | result = [] | def get_recurrent_ids(self, cr, uid, select, base_start_date, base_until_date, limit=100): if not limit: limit = 100 if isinstance(select, (str, int, long)): ids = [select] else: ids = select result = ids if ids and (base_start_date or base_until_date): cr.execute("select m.id, m.rrule, c.date, m.exdate from crm_meetin... | b663b4518fa927de4d2a8e1481a1ea66979f86ef /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/b663b4518fa927de4d2a8e1481a1ea66979f86ef/crm_meeting.py |
return self.pool.get(current_user_menu.type)\ .read(cr, uid, current_user_menu.id) | return {'menu_reload':True, 'type': 'object'} | def _next(self, cr, uid, context=None): self.__logger.info('getting next operation') next = self._next_action(cr, uid) self.__logger.info('next action is %s', next) if next: action = next.action_id return { 'view_mode': action.view_mode, 'view_type': action.view_type, 'view_id': action.view_id and [action.view_id.id] o... | 7819a48a22921bbee38e797d13bb2d7f20507072 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/7819a48a22921bbee38e797d13bb2d7f20507072/res_config.py |
clean() | def execute(connector, method, *args): global wait_count res = False try: res = getattr(connector,method)(*args) except socket.error,e: if e.args[0] == 111: if wait_count > wait_limit: print "Server is taking too long to start, it has exceeded the maximum limit of %d seconds."%(wait_limit) clean() sys.exit(1) print 'Pl... | c6b0b3f058d2ae2345e201d93f4b709b892f8366 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/c6b0b3f058d2ae2345e201d93f4b709b892f8366/tiny_xmlrpc.py | |
def check_creds(db, uid, passwd): if security._uid_cache.get(db, {}).get(uid) and security._uid_cache.get(db, {}).get(uid) == passwd: | def check(db, uid, passwd): cached_pass = security._uid_cache.get(db, {}).get(uid) if (cached_pass is not None) and cached_pass == passwd: | def check_creds(db, uid, passwd): if security._uid_cache.get(db, {}).get(uid) and security._uid_cache.get(db, {}).get(uid) == passwd: return True cr = pooler.get_db(db).cursor() if passwd not in _salt_cache: cr.execute( 'select login from res_users where id=%s', (uid,) ) stored_login = cr.fetchone() if stored_login: st... | 04a4cf4a321ee59054ee6a6973fb6774bfc18218 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/04a4cf4a321ee59054ee6a6973fb6774bfc18218/crypt.py |
return False | return security.ExceptionNoTb('AccessDenied') | def check_creds(db, uid, passwd): if security._uid_cache.get(db, {}).get(uid) and security._uid_cache.get(db, {}).get(uid) == passwd: return True cr = pooler.get_db(db).cursor() if passwd not in _salt_cache: cr.execute( 'select login from res_users where id=%s', (uid,) ) stored_login = cr.fetchone() if stored_login: st... | 04a4cf4a321ee59054ee6a6973fb6774bfc18218 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/04a4cf4a321ee59054ee6a6973fb6774bfc18218/crypt.py |
security.check_creds=check_creds | security.check=check | def access(db, uid, passwd, sec_level, ids): cr = pooler.get_db(db).cursor() salt = _salt_cache[passwd] cr.execute('select id from res_users where id=%s and password=%s', (uid, encrypt_md5( passwd, salt )) ) res = cr.fetchone() cr.close() if not res: raise security.ExceptionNoTb('Bad username or password') return res[0... | 04a4cf4a321ee59054ee6a6973fb6774bfc18218 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/04a4cf4a321ee59054ee6a6973fb6774bfc18218/crypt.py |
def compute_refund(self, cr, uid, ids, mode='refund', context=None): """ @param cr: the current row, from the database cursor, @param uid: the current user’s ID for security checks, @param ids: the account invoice refund’s ID or list of IDs | 6bc2e55c1f70f27f7f02ea2bb7eff4684ffc2780 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/6bc2e55c1f70f27f7f02ea2bb7eff4684ffc2780/account_invoice_refund.py | ||
def compute_refund(self, cr, uid, ids, mode='refund', context=None): """ @param cr: the current row, from the database cursor, @param uid: the current user’s ID for security checks, @param ids: the account invoice refund’s ID or list of IDs | 6bc2e55c1f70f27f7f02ea2bb7eff4684ffc2780 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/6bc2e55c1f70f27f7f02ea2bb7eff4684ffc2780/account_invoice_refund.py | ||
def compute_refund(self, cr, uid, ids, mode='refund', context=None): """ @param cr: the current row, from the database cursor, @param uid: the current user’s ID for security checks, @param ids: the account invoice refund’s ID or list of IDs | 6bc2e55c1f70f27f7f02ea2bb7eff4684ffc2780 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/6bc2e55c1f70f27f7f02ea2bb7eff4684ffc2780/account_invoice_refund.py | ||
def compute_refund(self, cr, uid, ids, mode='refund', context=None): """ @param cr: the current row, from the database cursor, @param uid: the current user’s ID for security checks, @param ids: the account invoice refund’s ID or list of IDs | 6bc2e55c1f70f27f7f02ea2bb7eff4684ffc2780 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/6bc2e55c1f70f27f7f02ea2bb7eff4684ffc2780/account_invoice_refund.py | ||
def compute_refund(self, cr, uid, ids, mode='refund', context=None): """ @param cr: the current row, from the database cursor, @param uid: the current user’s ID for security checks, @param ids: the account invoice refund’s ID or list of IDs | 6bc2e55c1f70f27f7f02ea2bb7eff4684ffc2780 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/6bc2e55c1f70f27f7f02ea2bb7eff4684ffc2780/account_invoice_refund.py | ||
invoice_domain.append(('id', '=', created_inv)) | invoice_domain.append(('id', 'in', created_inv)) | def compute_refund(self, cr, uid, ids, mode='refund', context=None): """ @param cr: the current row, from the database cursor, @param uid: the current user’s ID for security checks, @param ids: the account invoice refund’s ID or list of IDs | 6bc2e55c1f70f27f7f02ea2bb7eff4684ffc2780 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/6bc2e55c1f70f27f7f02ea2bb7eff4684ffc2780/account_invoice_refund.py |
domain = [('object_id.model', '=', model)] | domain = [('object_id.model', '=', model),('section_ids', '=', case.section_id.id)] | def stage_next(self, cr, uid, ids, context=None): """This function computes next stage for case from its current stage using available stage for that case type @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... | 8d3797a58a929f1648f068f5ce112aa97f66a793 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/8d3797a58a929f1648f068f5ce112aa97f66a793/crm.py |
domain = [('object_id.model', '=', model)] | domain = [('object_id.model', '=', model),('section_ids', '=', case.section_id.id)] | def stage_previous(self, cr, uid, ids, context=None): """This function computes previous stage for case from its current stage using available stage for that case type @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:... | 8d3797a58a929f1648f068f5ce112aa97f66a793 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/8d3797a58a929f1648f068f5ce112aa97f66a793/crm.py |
number = self.pool.get('ir.sequence').get(cr, uid, 'account.bank.statement') | number = self.pool.get('ir.sequence').get(cr, uid, statement.journal_id.sequence_id.code) | def button_open(self, cr, uid, ids, context=None): """ Changes statement state to Running. @return: True """ cash_pool = self.pool.get('account.cashbox.line') statement_pool = self.pool.get('account.bank.statement') | 5042d16033366fcd9915508304939ffee76e2202 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/5042d16033366fcd9915508304939ffee76e2202/account_cash_statement.py |
'keep_if_condition_not_met': fields.boolean('Keep as cancelled', | 'keep_if_condition_not_met': fields.boolean("Don't delete workitems", | def process_segment(self, cr, uid, segment_ids=None, context=None): Workitems = self.pool.get('marketing.campaign.workitem') if not segment_ids: segment_ids = self.search(cr, uid, [('state', '=', 'running')], context=context) | acbebe49ffc58250a7b62fe53edaed0fabdad112 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/acbebe49ffc58250a7b62fe53edaed0fabdad112/marketing_campaign.py |
for line in self.browse(cr, uid, ids): | for line in self.browse(cr, uid, ids, context=context): | def _state(self, cr, uid, ids, name, args, context=None): """Compute the state lines @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 Membership Line IDs @param name: Field Name @param context: A standard dic... | 2a4c1e50cb967d4599507ed63424b4f85c7753ea /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/2a4c1e50cb967d4599507ed63424b4f85c7753ea/membership.py |
inv = self.pool.get('account.invoice').browse(cr, uid, fetched[1]) | inv = self.pool.get('account.invoice').browse(cr, uid, fetched[1], context=context) | def _state(self, cr, uid, ids, name, args, context=None): """Compute the state lines @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 Membership Line IDs @param name: Field Name @param context: A standard dic... | 2a4c1e50cb967d4599507ed63424b4f85c7753ea /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/2a4c1e50cb967d4599507ed63424b4f85c7753ea/membership.py |
'state': fields.function(_state, method=True, string='Membership State', type='selection', selection=STATE, store=True), | 'state': fields.function( _state, method=True, string='Membership State', type='selection', selection=STATE, store = { 'account.invoice':(_get_membership_lines, ['state'], 10), }), | def _state(self, cr, uid, ids, name, args, context=None): """Compute the state lines @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 Membership Line IDs @param name: Field Name @param context: A standard dic... | 2a4c1e50cb967d4599507ed63424b4f85c7753ea /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/2a4c1e50cb967d4599507ed63424b4f85c7753ea/membership.py |
data_inv = member_line_obj.browse(cr, uid, ids, context) | data_inv = member_line_obj.browse(cr, uid, ids, context=context) | def _get_partner_id(self, cr, uid, ids, context=None): member_line_obj = self.pool.get('membership.membership_line') res_obj = self.pool.get('res.partner') data_inv = member_line_obj.browse(cr, uid, ids, context) list_partner = [] for data in data_inv: list_partner.append(data.partner.id) ids2 = list_partner while ids... | 2a4c1e50cb967d4599507ed63424b4f85c7753ea /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/2a4c1e50cb967d4599507ed63424b4f85c7753ea/membership.py |
data_inv = inv_obj.browse(cr, uid, ids, context) | data_inv = inv_obj.browse(cr, uid, ids, context=context) | def _get_invoice_partner(self, cr, uid, ids, context=None): inv_obj = self.pool.get('account.invoice') res_obj = self.pool.get('res.partner') data_inv = inv_obj.browse(cr, uid, ids, context) list_partner = [] for data in data_inv: list_partner.append(data.partner_id.id) ids2 = list_partner while ids2: ids2 = res_obj.se... | 2a4c1e50cb967d4599507ed63424b4f85c7753ea /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/2a4c1e50cb967d4599507ed63424b4f85c7753ea/membership.py |
partner_data = self.browse(cr, uid, id) | partner_data = self.browse(cr, uid, id, context=context) | def _membership_state(self, cr, uid, ids, name, args, context=None): """This Function return Membership State For Given Partner. @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 Partner IDs @param name: Field... | 2a4c1e50cb967d4599507ed63424b4f85c7753ea /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/2a4c1e50cb967d4599507ed63424b4f85c7753ea/membership.py |
res_state = self._membership_state(cr, uid, [partner_data.associate_member.id], name, args, context) | res_state = self._membership_state(cr, uid, [partner_data.associate_member.id], name, args, context=context) | def _membership_state(self, cr, uid, ids, name, args, context=None): """This Function return Membership State For Given Partner. @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 Partner IDs @param name: Field... | 2a4c1e50cb967d4599507ed63424b4f85c7753ea /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/2a4c1e50cb967d4599507ed63424b4f85c7753ea/membership.py |
for partner in self.browse(cr, uid, ids): | for partner in self.browse(cr, uid, ids, context=context): | 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 |
limit=1, order='date_from') | limit=1, order='date_from', context=context) | 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 |
['date_from'])['date_from'] | ['date_from'], context=context)['date_from'] | 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 |
limit=1, order='date_to desc') | limit=1, order='date_to desc', context=context) | 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 |
['date_to'])['date_to'] | ['date_to'], context=context)['date_to'] | 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 |
line_id2 = member_line_obj.search(cr, uid, [('partner', '=', partner.id)],limit=1, order='date_cancel') | line_id2 = member_line_obj.search(cr, uid, [('partner', '=', partner.id)], limit=1, order='date_cancel', context=context) | 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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.