rem stringlengths 1 322k | add stringlengths 0 2.05M | context stringlengths 4 228k | meta stringlengths 156 215 |
|---|---|---|---|
styles = reportlab.lib.styles.getSampleStyleSheet() style = styles['Normal'] style.__dict__.update(self._para_style_update(node)) | style = self.default_style['Normal'] para_update = self._para_style_update(node) if para_update: style = copy.deepcopy(style) style.__dict__.update(para_update) | def para_style_get(self, node): style = False if node.get('style'): if node.get('style') in self.styles: styles = reportlab.lib.styles.getSampleStyleSheet() sname = node.get('style') style = reportlab.lib.styles.ParagraphStyle(sname, styles["Normal"], **self.styles[sname]) else: sys.stderr.write('Warning: style not fou... | 1bfd4b60d0c9062ff808b28698b1b334ffd59186 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/1bfd4b60d0c9062ff808b28698b1b334ffd59186/trml2pdf.py |
if not view_id and context.get('invoice_type', False): | if not view_id: | def fields_view_get(self, cr, uid, view_id=None, view_type=False, context=None, toolbar=False, submenu=False): if not view_id and context.get('invoice_type', False): mod_obj = self.pool.get('ir.model.data') if context.get('invoice_type') in ('out_invoice', 'out_refund'): result = mod_obj.get_object_reference(cr, uid, '... | 72c6bc7ac5408996ee010a65afb7f57a35697c6e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/72c6bc7ac5408996ee010a65afb7f57a35697c6e/account_voucher.py |
if context.get('invoice_type') in ('out_invoice', 'out_refund'): | if context.get('invoice_type', False) in ('out_invoice', 'out_refund') or context.get('line_type', False) == 'customer': | def fields_view_get(self, cr, uid, view_id=None, view_type=False, context=None, toolbar=False, submenu=False): if not view_id and context.get('invoice_type', False): mod_obj = self.pool.get('ir.model.data') if context.get('invoice_type') in ('out_invoice', 'out_refund'): result = mod_obj.get_object_reference(cr, uid, '... | 72c6bc7ac5408996ee010a65afb7f57a35697c6e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/72c6bc7ac5408996ee010a65afb7f57a35697c6e/account_voucher.py |
xml_id = 'action_invoice_tree5' | xml_id = 'action_invoice_tree1' | def _create_invoice(obj, cr, uid, data, context): if data['form'].get('new_picking', False): data['id'] = data['form']['new_picking'] data['ids'] = [data['form']['new_picking']] pool = pooler.get_pool(cr.dbname) picking_obj = pooler.get_pool(cr.dbname).get('stock.picking') mod_obj = pool.get('ir.model.data') act_obj = ... | 9465f58df63b1450858837a380ef993442a757d5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/9465f58df63b1450858837a380ef993442a757d5/wizard_invoice_onshipping.py |
xml_id = 'action_invoice_tree8' | xml_id = 'action_invoice_tree2' | def _create_invoice(obj, cr, uid, data, context): if data['form'].get('new_picking', False): data['id'] = data['form']['new_picking'] data['ids'] = [data['form']['new_picking']] pool = pooler.get_pool(cr.dbname) picking_obj = pooler.get_pool(cr.dbname).get('stock.picking') mod_obj = pool.get('ir.model.data') act_obj = ... | 9465f58df63b1450858837a380ef993442a757d5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/9465f58df63b1450858837a380ef993442a757d5/wizard_invoice_onshipping.py |
xml_id = 'action_invoice_tree10' | xml_id = 'action_invoice_tree3' | def _create_invoice(obj, cr, uid, data, context): if data['form'].get('new_picking', False): data['id'] = data['form']['new_picking'] data['ids'] = [data['form']['new_picking']] pool = pooler.get_pool(cr.dbname) picking_obj = pooler.get_pool(cr.dbname).get('stock.picking') mod_obj = pool.get('ir.model.data') act_obj = ... | 9465f58df63b1450858837a380ef993442a757d5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/9465f58df63b1450858837a380ef993442a757d5/wizard_invoice_onshipping.py |
xml_id = 'action_invoice_tree12' | xml_id = 'action_invoice_tree4' | def _create_invoice(obj, cr, uid, data, context): if data['form'].get('new_picking', False): data['id'] = data['form']['new_picking'] data['ids'] = [data['form']['new_picking']] pool = pooler.get_pool(cr.dbname) picking_obj = pooler.get_pool(cr.dbname).get('stock.picking') mod_obj = pool.get('ir.model.data') act_obj = ... | 9465f58df63b1450858837a380ef993442a757d5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/9465f58df63b1450858837a380ef993442a757d5/wizard_invoice_onshipping.py |
partner_id = partner_rec.id or False | partner_id = partner.id or False | def make_po(self, cr, uid, ids, context={}): """ Make purchase order from procurement @return: New created Purchase Orders procurement wise """ res = {} company = self.pool.get('res.users').browse(cr, uid, uid, context).company_id partner_obj = self.pool.get('res.partner') uom_obj = self.pool.get('product.uom') priceli... | b43768931986ad245f285eac36d08c6dce1ea460 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/b43768931986ad245f285eac36d08c6dce1ea460/purchase.py |
self.log(cr, uid, lead.id, | leads.log(cr, uid, lead.id, | def action_apply(self, cr, uid, ids, context=None): """ This converts lead to opportunity and opens Opportunity view @param ids: ids of the leads to convert to opportunities | c2c55d4ddca94d5c6d0e55c14b12acd4b8cd6bf0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/c2c55d4ddca94d5c6d0e55c14b12acd4b8cd6bf0/crm_lead_to_opportunity.py |
avg(extract('epoch' from (date_closed-c.create_date)))/3600 as delay_close | avg(extract('epoch' from (date_closed-c.create_date)))/(3600*24) as delay_close | def init(self, cr): """ Display Est.Revenue , Average Probability ,Est.Revenue Probability @param cr: the current row, from the database cursor """ | 94286586e358b95a5e7ad0ed70528b090428707b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/94286586e358b95a5e7ad0ed70528b090428707b/crm_opportunity_report.py |
self.write(cr, uid, [t.id], {'state': 'open', 'date_start': time.strftime('%Y-%m-%d %H:%M:%S'),}) | data = {'state': 'open'} if not t.date_start: data['date_start'] = time.strftime('%Y-%m-%d %H:%M:%S') self.write(cr, uid, [t.id], data) | def do_open(self, cr, uid, ids, *args): tasks= self.browse(cr,uid,ids) for t in tasks: self.write(cr, uid, [t.id], {'state': 'open', 'date_start': time.strftime('%Y-%m-%d %H:%M:%S'),}) message = _('Task ') + " '" + t.name + "' "+ _("is Open.") self.log(cr, uid, t.id, message) return True | 12ca3adb5157b08fef65b4b692b747f895eeb645 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/12ca3adb5157b08fef65b4b692b747f895eeb645/project.py |
new_ids = [] if (data['model'] == 'account.account'): new_ids = 'active_ids' in data['form']['context'] and data['form']['context']['active_ids'] or [] else: new_ids.append(data['form']['chart_account_id']) | new_ids = ids if (data['model'] == 'ir.ui.menu'): new_ids = [data['form']['chart_account_id']] | def set_context(self, objects, data, ids, report_type=None): self.borne_date = self.get_min_date(data['form']) new_ids = [] if (data['model'] == 'account.account'): new_ids = 'active_ids' in data['form']['context'] and data['form']['context']['active_ids'] or [] else: new_ids.append(data['form']['chart_account_id']) ob... | c2b97a42a63e5100202e2a5e25db7331c63b73b5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/c2b97a42a63e5100202e2a5e25db7331c63b73b5/general_ledger.py |
'product_uos_qty': uos_qty, 'state': move.state, | 'product_uos_qty': uos_qty, 'state': move.state, | def consume_moves(self, cr, uid, ids, quantity, location_id=False, location_dest_id=False, consume=True, context=None): if not context: context = {} if quantity <= 0: raise osv.except_osv(_('Warning!'), _('Please provide Proper Quantity !')) | 57b92258d91762c1152280783171e1fcfb8afdcb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/57b92258d91762c1152280783171e1fcfb8afdcb/stock.py |
default_val.update({'location_dest_id':location_dest_id}) | default_val.update({'location_dest_id': location_dest_id}) | def consume_moves(self, cr, uid, ids, quantity, location_id=False, location_dest_id=False, consume=True, context=None): if not context: context = {} if quantity <= 0: raise osv.except_osv(_('Warning!'), _('Please provide Proper Quantity !')) | 57b92258d91762c1152280783171e1fcfb8afdcb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/57b92258d91762c1152280783171e1fcfb8afdcb/stock.py |
default_val.update({'location_id':location_id}) | default_val.update({'location_id': location_id}) | def consume_moves(self, cr, uid, ids, quantity, location_id=False, location_dest_id=False, consume=True, context=None): if not context: context = {} if quantity <= 0: raise osv.except_osv(_('Warning!'), _('Please provide Proper Quantity !')) | 57b92258d91762c1152280783171e1fcfb8afdcb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/57b92258d91762c1152280783171e1fcfb8afdcb/stock.py |
update_val['product_uos_qty'] = uos_qty_rest | update_val['product_uos_qty'] = uos_qty_rest if location_dest_id: update_val.update({'location_dest_id': location_dest_id}) if location_id: update_val.update({'location_id': location_id}) | def consume_moves(self, cr, uid, ids, quantity, location_id=False, location_dest_id=False, consume=True, context=None): if not context: context = {} if quantity <= 0: raise osv.except_osv(_('Warning!'), _('Please provide Proper Quantity !')) | 57b92258d91762c1152280783171e1fcfb8afdcb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/57b92258d91762c1152280783171e1fcfb8afdcb/stock.py |
class report_products_to_received_planned(osv.osv): _name = "report.products.to.received.planned" _description = "Received Products vs Planned" _auto = False _columns = { 'date':fields.date('Date'), 'qty': fields.float('Actual Qty', digits_compute=dp.get_precision('Product UoM')), 'planned_qty': fields.float('Planned Q... | def action_move(self, cr, uid, ids, context=None): move_obj = self.pool.get('stock.move') picking_obj = self.pool.get('stock.picking') account_move_obj = self.pool.get('account.move') for act in self.read(cr, uid, ids): move_lines = move_obj.browse(cr, uid, act['move_ids']) for line in move_lines: if line.picking_id: p... | 29f101668dae52eba19a58e9f1a35634488c9edd /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/29f101668dae52eba19a58e9f1a35634488c9edd/stock.py | |
def fields_get(self, cr, uid, fields=None, context=None): res = super(payment_line, self).fields_get(cr, uid, fields, context) if 'communication2' in res: res['communication2'].setdefault('states', {}) res['communication2']['states']['structured'] = [('readonly', True)] res['communication2']['states']['normal'] = [('re... | 99c52b7b8b7b09fa4736619f5bb23b2a694d81ab /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/99c52b7b8b7b09fa4736619f5bb23b2a694d81ab/account_payment.py | ||
FROM res_partner,account_move_line AS l, account_account\ | FROM res_partner,account_move_line AS l, account_account, account_move am\ | 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 rec... | e33b0323f7d3bcc8461ccb90e8996b9fa5978836 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/e33b0323f7d3bcc8461ccb90e8996b9fa5978836/account_aged_partner_balance.py |
OR (reconcile_id IN (SELECT recon.id FROM account_move_reconcile AS recon WHERE recon.create_date > %s )))\ | OR (reconcile_id IN (SELECT recon.id FROM account_move_reconcile AS recon WHERE recon.create_date > %s )))\ | 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 rec... | e33b0323f7d3bcc8461ccb90e8996b9fa5978836 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/e33b0323f7d3bcc8461ccb90e8996b9fa5978836/account_aged_partner_balance.py |
ORDER BY res_partner.name', (self.date_from,)) | ORDER BY res_partner.name', (tuple(move_state), tuple(self.ACCOUNT_TYPE), self.date_from, 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 rec... | e33b0323f7d3bcc8461ccb90e8996b9fa5978836 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/e33b0323f7d3bcc8461ccb90e8996b9fa5978836/account_aged_partner_balance.py |
move_state = ['draft','posted'] if self.target_move == 'posted': move_state = ['posted'] | 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 rec... | e33b0323f7d3bcc8461ccb90e8996b9fa5978836 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/e33b0323f7d3bcc8461ccb90e8996b9fa5978836/account_aged_partner_balance.py | |
GROUP BY l.partner_id ', (tuple(move_state), tuple(self.ACCOUNT_TYPE), tuple(partner_ids), self.date_from)) | AND (l.date <= %s)\ GROUP BY l.partner_id ', (tuple(move_state), tuple(self.ACCOUNT_TYPE), tuple(partner_ids), self.date_from, 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 rec... | e33b0323f7d3bcc8461ccb90e8996b9fa5978836 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/e33b0323f7d3bcc8461ccb90e8996b9fa5978836/account_aged_partner_balance.py |
GROUP BY l.partner_id', (tuple(move_state), tuple(self.ACCOUNT_TYPE), self.date_from, tuple(partner_ids),self.date_from)) | AND (l.date <= %s)\ GROUP BY l.partner_id', (tuple(move_state), tuple(self.ACCOUNT_TYPE), self.date_from, tuple(partner_ids),self.date_from, 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 rec... | e33b0323f7d3bcc8461ccb90e8996b9fa5978836 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/e33b0323f7d3bcc8461ccb90e8996b9fa5978836/account_aged_partner_balance.py |
GROUP BY l.partner_id', (tuple(move_state), tuple(self.ACCOUNT_TYPE), self.date_from, tuple(partner_ids), self.date_from)) | AND (l.date <= %s)\ GROUP BY l.partner_id', (tuple(move_state), tuple(self.ACCOUNT_TYPE), self.date_from, tuple(partner_ids), self.date_from, 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 rec... | e33b0323f7d3bcc8461ccb90e8996b9fa5978836 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/e33b0323f7d3bcc8461ccb90e8996b9fa5978836/account_aged_partner_balance.py |
self.cr.execute('SELECT l.partner_id, SUM(l.debit-l.credit)\ FROM account_move_line AS l, account_account, account_move am \ WHERE (l.account_id = account_account.id) AND (l.move_id=am.id)\ AND (am.state IN %s)\ AND (account_account.type IN %s)\ AND (l.partner_id IN %s)\ AND ((l.reconcile_id IS NULL)\ OR (l.reconcile_... | args_list += (self.date_from,) self.cr.execute('''SELECT l.partner_id, SUM(l.debit-l.credit) FROM account_move_line AS l, account_account, account_move am WHERE (l.account_id = account_account.id) AND (l.move_id=am.id) AND (am.state IN %s) AND (account_account.type IN %s) AND (l.partner_id IN %s) AND ((l.reconcile_id I... | 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 rec... | e33b0323f7d3bcc8461ccb90e8996b9fa5978836 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/e33b0323f7d3bcc8461ccb90e8996b9fa5978836/account_aged_partner_balance.py |
if values['total']: res.append(values) | res.append(values) | 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 rec... | e33b0323f7d3bcc8461ccb90e8996b9fa5978836 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/e33b0323f7d3bcc8461ccb90e8996b9fa5978836/account_aged_partner_balance.py |
AND account_account.active ',(tuple(move_state), tuple(self.ACCOUNT_TYPE), self.date_from)) | AND (l.date <= %s)\ AND account_account.active ',(tuple(move_state), tuple(self.ACCOUNT_TYPE), self.date_from, self.date_from,)) | def _get_lines_with_out_partner(self, form): res = [] move_state = ['draft','posted'] if self.target_move == 'posted': move_state = ['posted'] | e33b0323f7d3bcc8461ccb90e8996b9fa5978836 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/e33b0323f7d3bcc8461ccb90e8996b9fa5978836/account_aged_partner_balance.py |
args_list += (self.date_from,) | def _get_lines_with_out_partner(self, form): res = [] move_state = ['draft','posted'] if self.target_move == 'posted': move_state = ['posted'] | e33b0323f7d3bcc8461ccb90e8996b9fa5978836 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/e33b0323f7d3bcc8461ccb90e8996b9fa5978836/account_aged_partner_balance.py | |
def _sheet_search(self, cursor, user, obj, name, args): | def _sheet_search(self, cursor, user, obj, name, args, context={}): | def _sheet_search(self, cursor, user, obj, name, args): if not len(args): return [] sheet_obj = self.pool.get('hr_timesheet_sheet.sheet') | 1e8622118905179e2a1f665dabe44d0abad15b4c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/1e8622118905179e2a1f665dabe44d0abad15b4c/hr_timesheet_sheet.py |
AND s.user_id = e.user_id) ' + \ | AND s.user_id = r.user_id) ' + \ | def _sheet_search(self, cursor, user, obj, name, args): if not len(args): return [] sheet_obj = self.pool.get('hr_timesheet_sheet.sheet') | 1e8622118905179e2a1f665dabe44d0abad15b4c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/1e8622118905179e2a1f665dabe44d0abad15b4c/hr_timesheet_sheet.py |
os.system('python2.5 %sopenerp-server.py --pidfile=openerp.pid --port=%s --net_port=%s --addons-path=%s' %(root_path, str(port),str(netport),addons_path)) | os.system('python2.5 %sopenerp-server.py --pidfile=openerp.pid --xmlrpc-port=%s --netrpc-port=%s --addons-path=%s' %(root_path, str(port),str(netport),addons_path)) | def start_server(root_path, port, netport, addons_path): os.system('python2.5 %sopenerp-server.py --pidfile=openerp.pid --port=%s --net_port=%s --addons-path=%s' %(root_path, str(port),str(netport),addons_path)) | c56c8c6db9e7536e91571d409e23b60d87cb8b20 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/c56c8c6db9e7536e91571d409e23b60d87cb8b20/base_quality_interrogation.py |
return True | def process_wi_email(self, cr, uid, activity, workitem, context=None): print 'Sending Email Init', activity.name return self.pool.get('email.template').generate_mail(cr, uid, activity.email_template_id.id, [workitem.res_id], context=context) | 0f3b579a54684ac68f156d36ac8a311ff74bb684 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/0f3b579a54684ac68f156d36ac8a311ff74bb684/marketing_campaign.py | |
avil_id = obj.pool.get(value._name).search(cr, uid, [('id','=',value.id)], context=context) | avil_id = obj.pool.get(value._name).exists(cr, uid, value.id) | def _fnct_read(self, obj, cr, uid, ids, prop_name, obj_dest, context=None): properties = obj.pool.get('ir.property') domain = [('fields_id.model', '=', obj._name), ('fields_id.name','in',prop_name)] domain += [('res_id','in', [obj._name + ',' + str(oid) for oid in ids])] nids = properties.search(cr, uid, domain, conte... | 7b37895c7f7d807cbf33f3b495ccadb92286965d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/7b37895c7f7d807cbf33f3b495ccadb92286965d/fields.py |
return pooler.get_pool(cr.dbname).get('decimal.precision').precision_get(cr, 1, application) | res = pooler.get_pool(cr.dbname).get('decimal.precision').precision_get(cr, 1, application) return (16, res) | def change_digit(cr): return pooler.get_pool(cr.dbname).get('decimal.precision').precision_get(cr, 1, application) | ed42755ea7120cebb121e1be429a8896cc3ddee3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/ed42755ea7120cebb121e1be429a8896cc3ddee3/decimal_precision.py |
"AND debit > 0", | "AND debit > 0 " \ "ORDER BY date_maturity", | def reconcile(self, cr, uid, ids, context=None): move_line_obj = self.pool.get('account.move.line') obj_model = self.pool.get('ir.model.data') if context is None: context = {} form = self.read(cr, uid, ids, [])[0] max_amount = form.get('max_amount', False) and form.get('max_amount') or 0.0 power = form['power'] allow_w... | f2e0e0ead91cbd385adb2972c2382d4381de95d6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/f2e0e0ead91cbd385adb2972c2382d4381de95d6/account_automatic_reconcile.py |
"AND credit > 0", | "AND credit > 0 " \ "ORDER BY date_maturity", | def reconcile(self, cr, uid, ids, context=None): move_line_obj = self.pool.get('account.move.line') obj_model = self.pool.get('ir.model.data') if context is None: context = {} form = self.read(cr, uid, ids, [])[0] max_amount = form.get('max_amount', False) and form.get('max_amount') or 0.0 power = form['power'] allow_w... | f2e0e0ead91cbd385adb2972c2382d4381de95d6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/f2e0e0ead91cbd385adb2972c2382d4381de95d6/account_automatic_reconcile.py |
success = self.pool.get('hr.employee').attendance_action_change(cr, uid, [emp_id], 'sign_in') | self.pool.get('hr.employee').attendance_action_change(cr, uid, [emp_id], 'sign_in') | def sign_in(self, cr, uid, data, context=None): if context is None: context = {} emp_id = data['emp_id'] if 'last_time' in data: if data['last_time'] > time.strftime('%Y-%m-%d %H:%M:%S'): raise osv.except_osv(_('UserError'), _('The sign-out date must be in the past')) self.pool.get('hr.attendance').create(cr, uid, {'na... | 2b91fe5af5923076446397ef22909797db97f37f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/2b91fe5af5923076446397ef22909797db97f37f/hr_attendance_sign_in_out.py |
success = self.pool.get('hr.employee').attendance_action_change(cr, uid, [emp_id], 'sign_out') | self.pool.get('hr.employee').attendance_action_change(cr, uid, [emp_id], 'sign_out') | def sign_out(self, cr, uid, data, context=None): emp_id = data['emp_id'] if 'last_time' in data: if data['last_time'] > time.strftime('%Y-%m-%d %H:%M:%S'): raise osv.except_osv(_('UserError'), _('The Sign-in date must be in the past')) self.pool.get('hr.attendance').create(cr, uid, {'name':data['last_time'], 'action':'... | 2b91fe5af5923076446397ef22909797db97f37f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/2b91fe5af5923076446397ef22909797db97f37f/hr_attendance_sign_in_out.py |
elif re.match('^h([1-9]+[0-9]*)$', (node.text or '')): | elif re.match('^h([1-9]+[0-9]*)$', (node.tag or '')): | def _flowable(self, node, extra_style=None): if node.tag=='para': style = self.styles.para_style_get(node) if extra_style: style.__dict__.update(extra_style) result = [] for i in self._textual(node).split('\n'): result.append(platypus.Paragraph(i, style, **(utils.attr_get(node, [], {'bulletText':'str'})))) return resul... | 9f0fdbdc528dc6371c29fc03f7dfd8b6115de9be /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/9f0fdbdc528dc6371c29fc03f7dfd8b6115de9be/trml2pdf.py |
style = styles['Heading'+str(node.get[1:])] | style = styles['Heading'+str(node.tag[1:])] | def _flowable(self, node, extra_style=None): if node.tag=='para': style = self.styles.para_style_get(node) if extra_style: style.__dict__.update(extra_style) result = [] for i in self._textual(node).split('\n'): result.append(platypus.Paragraph(i, style, **(utils.attr_get(node, [], {'bulletText':'str'})))) return resul... | 9f0fdbdc528dc6371c29fc03f7dfd8b6115de9be /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/9f0fdbdc528dc6371c29fc03f7dfd8b6115de9be/trml2pdf.py |
'res.partner':(_get_partners, ['free_member', 'membership_state'], 10) | 'res.partner':(_get_partners, ['free_member', 'membership_state','associate_member'], 10) | def _get_partners(self, cr, uid, ids, context={}): ids2 = ids while ids2: ids2 = self.search(cr, uid, [('associate_member','in',ids2)], context=context) ids+=ids2 return ids | 7b5002c8cdaef6d61ad3e703de9807399b8eea97 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/7b5002c8cdaef6d61ad3e703de9807399b8eea97/membership.py |
self.logger.log(severity, msg) | def _tag_assert(self, cr, rec, data_node=None): if self.isnoupdate(data_node) and self.mode != 'init': return | 4236d93ba505d6771af5373d91ff8d7499622a3c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/4236d93ba505d6771af5373d91ff8d7499622a3c/convert.py | |
self.logger.log(severity, msg) | def __getitem__(self2, key): if key in brrec: return brrec[key] return dict.__getitem__(self2, key) | 4236d93ba505d6771af5373d91ff8d7499622a3c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/4236d93ba505d6771af5373d91ff8d7499622a3c/convert.py | |
data = {} domain = [('type', '=', stage_type),('section_ids', '=', case.section_id.id)] if case.section_id and case.section_id.stage_ids: domain.append(('id', 'in', map(lambda x: x.id, case.section_id.stage_ids))) | value = {} if case.section_id.id : domain = [('type', '=', stage_type),('section_ids', '=', case.section_id.id)] else : domain = [('type', '=', stage_type)] | def stage_change(self, cr, uid, ids, context=None, order='sequence'): if not context: context = {} stage_pool = self.pool.get('crm.case.stage') stage_type = context and context.get('stage_type','') current_seq = False next_stage_id = False for case in self.browse(cr, uid, ids, context): next_stage = False data = {} | cf13a034f3fe74dbfb01445b84dedc8d9537c58e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/cf13a034f3fe74dbfb01445b84dedc8d9537c58e/crm.py |
data = {'stage_id': next_stage.id} | value.update({'stage_id': next_stage.id}) | def stage_change(self, cr, uid, ids, context=None, order='sequence'): if not context: context = {} stage_pool = self.pool.get('crm.case.stage') stage_type = context and context.get('stage_type','') current_seq = False next_stage_id = False for case in self.browse(cr, uid, ids, context): next_stage = False data = {} | cf13a034f3fe74dbfb01445b84dedc8d9537c58e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/cf13a034f3fe74dbfb01445b84dedc8d9537c58e/crm.py |
data.update({'probability': next_stage.probability}) self.write(cr, uid, [case.id], data, context=context) | value.update({'probability': next_stage.probability}) self.write(cr, uid, [case.id], value, context=context) | def stage_change(self, cr, uid, ids, context=None, order='sequence'): if not context: context = {} stage_pool = self.pool.get('crm.case.stage') stage_type = context and context.get('stage_type','') current_seq = False next_stage_id = False for case in self.browse(cr, uid, ids, context): next_stage = False data = {} | cf13a034f3fe74dbfb01445b84dedc8d9537c58e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/cf13a034f3fe74dbfb01445b84dedc8d9537c58e/crm.py |
return next_stage_id | return next_stage_id | def stage_change(self, cr, uid, ids, context=None, order='sequence'): if not context: context = {} stage_pool = self.pool.get('crm.case.stage') stage_type = context and context.get('stage_type','') current_seq = False next_stage_id = False for case in self.browse(cr, uid, ids, context): next_stage = False data = {} | cf13a034f3fe74dbfb01445b84dedc8d9537c58e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/cf13a034f3fe74dbfb01445b84dedc8d9537c58e/crm.py |
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 | d8a9ad298a1f08b31fd3f3b8c03397ed26a6244e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/d8a9ad298a1f08b31fd3f3b8c03397ed26a6244e/voucher.py | ||
if debit < 0: credit = -debit debit = 0.0 if credit < 0: debit = -credit credit = 0.0 | 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 | d8a9ad298a1f08b31fd3f3b8c03397ed26a6244e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/d8a9ad298a1f08b31fd3f3b8c03397ed26a6244e/voucher.py | |
if inv.tax_amount > 0: | if inv.tax_amount: | 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 | d8a9ad298a1f08b31fd3f3b8c03397ed26a6244e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/d8a9ad298a1f08b31fd3f3b8c03397ed26a6244e/voucher.py |
if inv.journal_id.type in ('sale','purchase_refund'): | if inv.journal_id.type in ('sale','purchase_refund') and amount > 0: | 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 | d8a9ad298a1f08b31fd3f3b8c03397ed26a6244e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/d8a9ad298a1f08b31fd3f3b8c03397ed26a6244e/voucher.py |
return super(Wiki, self).copy_data(cr, uid, id, {'wiki_id': False}, context) | return super(wiki_wiki2, self).copy_data(cr, uid, id, {'wiki_id': False}, context) | def copy_data(self, cr, uid, id, default=None, context=None): | e7837995a5fa985e5381ef0804ed93e6255c2235 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/e7837995a5fa985e5381ef0804ed93e6255c2235/wiki.py |
def __getattr__(self, attr): if not attr.startswith('check_vat_'): super(res_partner, self).__getattr__(attr) def default_vat_check(self, cn, vn): # by default, a VAT number is valid if: # it starts with 2 letters # has more than 3 characters return len(vn) > 0 and len(cn) == 2 and cn[0] in string.ascii_lowercase an... | cf02511aa3f6773c0e040c0e548442ca88027dcd /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/cf02511aa3f6773c0e040c0e548442ca88027dcd/partner.py | ||
def vat_change(self, cr, uid, ids, value, context={}): return {'value': {'vat_subjected': bool(value)}} | cf02511aa3f6773c0e040c0e548442ca88027dcd /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/cf02511aa3f6773c0e040c0e548442ca88027dcd/partner.py | ||
def check_vat_se(self, vat): ''' Check Sweden VAT number. ''' if len(vat) != 12: return False try: int(vat) except: return False | cf02511aa3f6773c0e040c0e548442ca88027dcd /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/cf02511aa3f6773c0e040c0e548442ca88027dcd/partner.py | ||
def check_vat_se(self, vat): ''' Check Sweden VAT number. ''' if len(vat) != 12: return False try: int(vat) except: return False | cf02511aa3f6773c0e040c0e548442ca88027dcd /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/cf02511aa3f6773c0e040c0e548442ca88027dcd/partner.py | ||
employee_ids=employee_obj.search(cr, uid, [('parent_id','=',employee.id)], context=context) | def onchange_employee_id(self, cr, uid, ids, employee_id, context=None): if context is None: context = {} evaluation_plan_id=False if employee_id: employee_obj=self.pool.get('hr.employee') for employee in employee_obj.browse(cr, uid, [employee_id], context=context): if employee and employee.evaluation_plan_id and emplo... | 74dc9a43786b367b0c8508e2cf1c46ad50d31e4c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/74dc9a43786b367b0c8508e2cf1c46ad50d31e4c/hr_evaluation.py | |
apprai_id = [] | def button_plan_in_progress(self, cr, uid, ids, context=None): hr_eval_inter_obj = self.pool.get('hr.evaluation.interview') if context is None: context = {} apprai_id = [] for evaluation in self.browse(cr, uid, ids, context=context): wait = False for phase in evaluation.plan_id.phase_ids: childs = [] if phase.action ==... | 74dc9a43786b367b0c8508e2cf1c46ad50d31e4c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/74dc9a43786b367b0c8508e2cf1c46ad50d31e4c/hr_evaluation.py | |
res = {}.fromkeys(ids, []) | res = dict([(i, []) for i in ids]) | def _fnct_read(self, obj, cr, uid, ids, field_name, args, context=None): self._field_get2(cr, uid, obj, context) if not ids: return {} relation = obj._name if self._type in ('one2many', 'many2many'): res = {}.fromkeys(ids, []) else: res = {}.fromkeys(ids, False) | 6acee33b4ea931747895c373cd0b3c352d95f372 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/6acee33b4ea931747895c373cd0b3c352d95f372/fields.py |
def msg_new(self, cr, uid, msg, model): print ' MSG NEW' , model | def msg_new(self, cr, uid, msg, model): | def msg_new(self, cr, uid, msg, model): print ' MSG NEW' , model message = self.msg_body_get(msg) res_model = self.pool.get(model) res_id = res_model.msg_new(cr, uid, msg) if res_id: attachments = message['attachment'] | 89b3475ca51268f2206e383bc4d8586e99a5c156 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/89b3475ca51268f2206e383bc4d8586e99a5c156/mail_gateway.py |
warning += [_("Relation not found: %s on '%s'") % (line[i], relation)] | warning += [_("Relation not found: %s on '%s'") % (word, relation)] | def process_liness(self, datas, prefix, current_module, model_name, fields_def, position=0): line = datas[position] row = {} translate = {} todo = [] warning = [] data_id = False data_res_id = False is_xml_id = False is_db_id = False ir_model_data_obj = self.pool.get('ir.model.data') # # Import normal fields # for i in... | 033179095f647798482f03b29c5f8e4a37003be6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/033179095f647798482f03b29c5f8e4a37003be6/orm.py |
_("Relation not found: %s on '%s'") % (line[i], relation)) | _("Relation not found: %s on '%s'") % (word, relation)) | def process_liness(self, datas, prefix, current_module, model_name, fields_def, position=0): line = datas[position] row = {} translate = {} todo = [] warning = [] data_id = False data_res_id = False is_xml_id = False is_db_id = False ir_model_data_obj = self.pool.get('ir.model.data') # # Import normal fields # for i in... | 033179095f647798482f03b29c5f8e4a37003be6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/033179095f647798482f03b29c5f8e4a37003be6/orm.py |
'title': 'Bad Lot Assignation !', 'message': 'You are moving %.2f products but only %.2f available in this lot.' % (product_qty, prodlot.stock_available or 0.0) | 'title': _('Bad Lot Assignation !'), 'message': _('You are moving %.2f products but only %.2f available in this lot.') % (product_qty, prodlot.stock_available or 0.0) | def onchange_lot_id(self, cr, uid, ids, prodlot_id=False, product_qty=False, loc_id=False, product_id=False, context=None): """ On change of production lot gives a warning message. @param prodlot_id: Changed production lot id @param product_qty: Quantity of product @param loc_id: Location id @param product_id: Product ... | d6ad4e0e0789f6efabb9155b1d3b3aebb5b3103d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/d6ad4e0e0789f6efabb9155b1d3b3aebb5b3103d/stock.py |
'ref_id': fields.many2one('ir.ui.view', 'Original View'), 'user_id': fields.many2one('res.users', 'User'), | 'ref_id': fields.many2one('ir.ui.view', 'Original View', select=True), 'user_id': fields.many2one('res.users', 'User', select=True), | def _check_xml(self, cr, uid, ids, context=None): logger = logging.getLogger('init') for view in self.browse(cr, uid, ids, context): eview = etree.fromstring(view.arch.encode('utf8')) frng = tools.file_open(os.path.join('base','rng','view.rng')) relaxng_doc = etree.parse(frng) relaxng = etree.RelaxNG(relaxng_doc) if no... | aeed07950ceb164ca8508db93d9c69a9556242bb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/aeed07950ceb164ca8508db93d9c69a9556242bb/ir_ui_view.py |
'model': fields.char('Object', size=64, required=True), | 'model': fields.char('Object', size=64, required=True, select=True), | def _check_xml(self, cr, uid, ids, context=None): logger = logging.getLogger('init') for view in self.browse(cr, uid, ids, context): eview = etree.fromstring(view.arch.encode('utf8')) frng = tools.file_open(os.path.join('base','rng','view.rng')) relaxng_doc = etree.parse(frng) relaxng = etree.RelaxNG(relaxng_doc) if no... | aeed07950ceb164ca8508db93d9c69a9556242bb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/aeed07950ceb164ca8508db93d9c69a9556242bb/ir_ui_view.py |
('search','Search')), 'View Type', required=True), | ('search','Search')), 'View Type', required=True, select=True), | def _check_xml(self, cr, uid, ids, context=None): logger = logging.getLogger('init') for view in self.browse(cr, uid, ids, context): eview = etree.fromstring(view.arch.encode('utf8')) frng = tools.file_open(os.path.join('base','rng','view.rng')) relaxng_doc = etree.parse(frng) relaxng = etree.RelaxNG(relaxng_doc) if no... | aeed07950ceb164ca8508db93d9c69a9556242bb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/aeed07950ceb164ca8508db93d9c69a9556242bb/ir_ui_view.py |
'inherit_id': fields.many2one('ir.ui.view', 'Inherited View', ondelete='cascade'), | 'inherit_id': fields.many2one('ir.ui.view', 'Inherited View', ondelete='cascade', select=True), | def _check_xml(self, cr, uid, ids, context=None): logger = logging.getLogger('init') for view in self.browse(cr, uid, ids, context): eview = etree.fromstring(view.arch.encode('utf8')) frng = tools.file_open(os.path.join('base','rng','view.rng')) relaxng_doc = etree.parse(frng) relaxng = etree.RelaxNG(relaxng_doc) if no... | aeed07950ceb164ca8508db93d9c69a9556242bb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/aeed07950ceb164ca8508db93d9c69a9556242bb/ir_ui_view.py |
'user_id': fields.many2one('res.users', 'User Ref.', required=True, ondelete='cascade'), 'resource': fields.char('Resource Name', size=64, required=True) } | 'user_id': fields.many2one('res.users', 'User Ref.', required=True, ondelete='cascade', select=True), 'resource': fields.char('Resource Name', size=64, required=True, select=True) } def _auto_init(self, cr, context=None): super(view_sc, self)._auto_init(cr, context) cr.execute('SELECT indexname FROM pg_indexes WHERE i... | def graph_get(self, cr, uid, id, model, node_obj, conn_obj, src_node, des_node,label,scale,context={}): if not label: label = [] nodes=[] nodes_name=[] transitions=[] start=[] tres={} labels={} no_ancester=[] blank_nodes = [] | aeed07950ceb164ca8508db93d9c69a9556242bb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/aeed07950ceb164ca8508db93d9c69a9556242bb/ir_ui_view.py |
row[field] = (reduce(lambda x, y: x or y, newrow.values()) and \ | row[field] = newrow and (reduce(lambda x, y: x or y, newrow.values()) and \ | def process_liness(self, datas, prefix, current_module, model_name, fields_def, position=0): line = datas[position] row = {} translate = {} todo = [] warning = [] data_id = False data_res_id = False is_xml_id = False is_db_id = False ir_model_data_obj = self.pool.get('ir.model.data') # # Import normal fields # for i in... | d631de7a6865c5e21b21326b4b2cebcaa10e6f43 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/d631de7a6865c5e21b21326b4b2cebcaa10e6f43/orm.py |
if reduce(lambda x, y: x or y, newrow.values()): | if newrow and reduce(lambda x, y: x or y, newrow.values()): | def process_liness(self, datas, prefix, current_module, model_name, fields_def, position=0): line = datas[position] row = {} translate = {} todo = [] warning = [] data_id = False data_res_id = False is_xml_id = False is_db_id = False ir_model_data_obj = self.pool.get('ir.model.data') # # Import normal fields # for i in... | d631de7a6865c5e21b21326b4b2cebcaa10e6f43 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/d631de7a6865c5e21b21326b4b2cebcaa10e6f43/orm.py |
required=True, | required=False, | def _get_charts(self, cr, uid, context=None): modules = self.pool.get('ir.module.module') ids = modules.search(cr, uid, [('category_id','=','Account Charts')]) charts = list( sorted(((m.name, m.shortdesc) for m in modules.browse(cr, uid, ids)), key=itemgetter(1))) charts.insert(0,('configurable','Generic Chart Of Accou... | ea3e980fbb0415b4b3565a788979be07f89582e0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/ea3e980fbb0415b4b3565a788979be07f89582e0/installer.py |
data_id = data_pool.search(cr, uid, [('model','=','account.account'), ('name','=','chart0')]) if data_id: data = data_pool.browse(cr, uid, data_id[0]) account_id = data.res_id acc_ids = obj_acc._get_children_and_consol(cr, uid, [account_id]) if acc_ids: cr.execute("update account_account set active='f' where id in " +... | def execute(self, cr, uid, ids, context=None): if context is None: context = {} data_pool = self.pool.get('ir.model.data') obj_acc = self.pool.get('account.account') super(account_installer, self).execute(cr, uid, ids, context=context) record = self.browse(cr, uid, ids, context=context)[0] company_id = self.pool.get('r... | ea3e980fbb0415b4b3565a788979be07f89582e0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/ea3e980fbb0415b4b3565a788979be07f89582e0/installer.py | |
self.rpc(self.model, 'history', [id], 'Receive', True, msg['From'], message['body'], False, False, {'model' : self.model}) | self.rpc(self.model, 'history', [id], 'Receive', True, msg_to, message['body'], msg_from, False, {'model' : self.model}) | def msg_new(self, msg): message = self.msg_body_get(msg) msg_subject = self._decode_header(msg['Subject']) msg_from = self._decode_header(msg['From']) msg_cc = self._decode_header(msg['Cc'] or '') data = { 'name': msg_subject, 'email_from': msg_from, 'email_cc': msg_cc, 'user_id': False, 'description': message['body']... | 9e382c11a7d83e2e5bfd9064d1741b68dec6ce50 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/9e382c11a7d83e2e5bfd9064d1741b68dec6ce50/openerp_mailgate.py |
self.rpc(self.model, 'history', [id], 'Send', True, msg['From'], body['body']) | self.rpc(self.model, 'history', [id], 'Send', True, self._decode_header(msg['From']), body['body']) | def msg_user(self, msg, id): body = self.msg_body_get(msg) | 9e382c11a7d83e2e5bfd9064d1741b68dec6ce50 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/9e382c11a7d83e2e5bfd9064d1741b68dec6ce50/openerp_mailgate.py |
self.rpc(self.model, 'history', [id], 'Send', True, msg['From'], message['body']) | self.rpc(self.model, 'history', [id], 'Send', True, self._decode_header(msg['From']), message['body']) | def msg_partner(self, msg, id): message = self.msg_body_get(msg) body = message['body'] act = 'case_open' self.rpc(self.model, act, [id]) #body2 = '\n'.join(map(lambda l: '> '+l, (body or '').split('\n'))) #data = { # 'description':body, #} #self.rpc(self.model, 'write', [id], data) attachments = message['attachment... | 9e382c11a7d83e2e5bfd9064d1741b68dec6ce50 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/9e382c11a7d83e2e5bfd9064d1741b68dec6ce50/openerp_mailgate.py |
if not context.get('allow_write_off', False): | if not allow_write_off: | def reconcile(self, cr, uid, ids, context=None): move_line_obj = self.pool.get('account.move.line') obj_model = self.pool.get('ir.model.data') if context is None: context = {} form = self.read(cr, uid, ids, [])[0] max_amount = form.get('max_amount', 0.0) power = form['power'] reconciled = unreconciled = 0 if not form['... | 68464d2e8adc26cc6cbade3f829ab919e98963b0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/68464d2e8adc26cc6cbade3f829ab919e98963b0/account_automatic_reconcile.py |
HAVING ABS(SUM(debit-credit)) <> %s AND count(*)>0"%(account_id, 0.0) | HAVING ABS(SUM(debit-credit)) = %s AND count(*)>0"%(account_id, 0.0) | def reconcile(self, cr, uid, ids, context=None): move_line_obj = self.pool.get('account.move.line') obj_model = self.pool.get('ir.model.data') if context is None: context = {} form = self.read(cr, uid, ids, [])[0] max_amount = form.get('max_amount', 0.0) power = form['power'] reconciled = unreconciled = 0 if not form['... | 68464d2e8adc26cc6cbade3f829ab919e98963b0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/68464d2e8adc26cc6cbade3f829ab919e98963b0/account_automatic_reconcile.py |
HAVING ABS(SUM(debit-credit)) <= %s AND count(*)>0"%(account_id, max_amount or 0.0) | HAVING ABS(SUM(debit-credit)) < %s AND count(*)>0"%(account_id, max_amount or 0.0) | def reconcile(self, cr, uid, ids, context=None): move_line_obj = self.pool.get('account.move.line') obj_model = self.pool.get('ir.model.data') if context is None: context = {} form = self.read(cr, uid, ids, [])[0] max_amount = form.get('max_amount', 0.0) power = form['power'] reconciled = unreconciled = 0 if not form['... | 68464d2e8adc26cc6cbade3f829ab919e98963b0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/68464d2e8adc26cc6cbade3f829ab919e98963b0/account_automatic_reconcile.py |
if not context.get('allow_write_off', False): | if allow_write_off: move_line_obj.reconcile(cr, uid, line_ids, 'auto', form['writeoff_acc_id'], form['period_id'], form['journal_id'], context) else: | def reconcile(self, cr, uid, ids, context=None): move_line_obj = self.pool.get('account.move.line') obj_model = self.pool.get('ir.model.data') if context is None: context = {} form = self.read(cr, uid, ids, [])[0] max_amount = form.get('max_amount', 0.0) power = form['power'] reconciled = unreconciled = 0 if not form['... | 68464d2e8adc26cc6cbade3f829ab919e98963b0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/68464d2e8adc26cc6cbade3f829ab919e98963b0/account_automatic_reconcile.py |
else: move_line_obj.reconcile(cr, uid, line_ids, 'auto', form['writeoff_acc_id'], form['period_id'], form['journal_id'], context) | def reconcile(self, cr, uid, ids, context=None): move_line_obj = self.pool.get('account.move.line') obj_model = self.pool.get('ir.model.data') if context is None: context = {} form = self.read(cr, uid, ids, [])[0] max_amount = form.get('max_amount', 0.0) power = form['power'] reconciled = unreconciled = 0 if not form['... | 68464d2e8adc26cc6cbade3f829ab919e98963b0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/68464d2e8adc26cc6cbade3f829ab919e98963b0/account_automatic_reconcile.py | |
'nodestroy':True, | def reconcile(self, cr, uid, ids, context=None): move_line_obj = self.pool.get('account.move.line') obj_model = self.pool.get('ir.model.data') if context is None: context = {} form = self.read(cr, uid, ids, [])[0] max_amount = form.get('max_amount', 0.0) power = form['power'] reconciled = unreconciled = 0 if not form['... | 68464d2e8adc26cc6cbade3f829ab919e98963b0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/68464d2e8adc26cc6cbade3f829ab919e98963b0/account_automatic_reconcile.py | |
'alert_date': fields.datetime('Alert Date', help="The date signifying an alert to notify about the production lot."), | 'alert_date': fields.datetime('Alert Date', help="The date an alert should be notified about the production lot."), | def calc_date(self, cr, uid, context=None): """Compute the limit date for a given date""" if context is None: context = {} if not context.get('product_id', False): date = False else: product = pooler.get_pool(cr.dbname).get('product.product').browse( cr, uid, context['product_id']) duration = getattr(product, dtype) # ... | 7dc16e99f2a3657be87c64f7e8fc0102ac3f4eb9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/7dc16e99f2a3657be87c64f7e8fc0102ac3f4eb9/product_expiry.py |
for f in ('life_date','use_date','removal_date','alert_date'): | for f in ('life_date', 'use_date', 'removal_date', 'alert_date'): | def create(self, cr, uid, vals, context=None): newid = super(stock_production_lot, self).create(cr, uid, vals, context=context) obj = self.browse(cr, uid, newid, context=context) towrite = [] for f in ('life_date','use_date','removal_date','alert_date'): if not getattr(obj, f): towrite.append(f) context = context or {}... | 7dc16e99f2a3657be87c64f7e8fc0102ac3f4eb9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/7dc16e99f2a3657be87c64f7e8fc0102ac3f4eb9/product_expiry.py |
'alert_time': fields.integer('Product Alert Time', help="The number of days after which, needs an alert to notify about the production lot."), | 'alert_time': fields.integer('Product Alert Time', help="The number of days after which an alert should be notified about the production lot."), | def create(self, cr, uid, vals, context=None): newid = super(stock_production_lot, self).create(cr, uid, vals, context=context) obj = self.browse(cr, uid, newid, context=context) towrite = [] for f in ('life_date','use_date','removal_date','alert_date'): if not getattr(obj, f): towrite.append(f) context = context or {}... | 7dc16e99f2a3657be87c64f7e8fc0102ac3f4eb9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/7dc16e99f2a3657be87c64f7e8fc0102ac3f4eb9/product_expiry.py |
def create(self, cr, uid, vals, context=None): newid = super(stock_production_lot, self).create(cr, uid, vals, context=context) obj = self.browse(cr, uid, newid, context=context) towrite = [] for f in ('life_date','use_date','removal_date','alert_date'): if not getattr(obj, f): towrite.append(f) context = context or {}... | 7dc16e99f2a3657be87c64f7e8fc0102ac3f4eb9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/7dc16e99f2a3657be87c64f7e8fc0102ac3f4eb9/product_expiry.py | ||
record[pos] = res2[record['id']][pos] | multi_fields = res2.get(record['id'],{}) if multi_fields: record[pos] = multi_fields.get(pos,[]) | def convert_field(f): f_qual = "%s.%s" % (self._table, f) # need fully-qualified references in case len(tables) > 1 if f in ('create_date', 'write_date'): return "date_trunc('second', %s) as %s" % (f_qual, f) if f == self.CONCURRENCY_CHECK_FIELD: if self._log_access: return "COALESCE(%s.write_date, %s.create_date, now(... | acf51057835ee0e12a6e73730217d239bd98a477 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/acf51057835ee0e12a6e73730217d239bd98a477/orm.py |
readonly = False | can_see = False | def check_group(node): if node.get('groups'): groups = node.get('groups').split(',') readonly = False access_pool = self.pool.get('ir.model.access') for group in groups: readonly = readonly or access_pool.check_groups(cr, user, group) if not readonly: node.set('invisible', '1') del(node.attrib['groups']) | da17e9c16111f90886f68e1db761e6673b89fa21 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/da17e9c16111f90886f68e1db761e6673b89fa21/orm.py |
readonly = readonly or access_pool.check_groups(cr, user, group) if not readonly: | can_see = can_see or access_pool.check_groups(cr, user, group) if can_see: break if not can_see: | def check_group(node): if node.get('groups'): groups = node.get('groups').split(',') readonly = False access_pool = self.pool.get('ir.model.access') for group in groups: readonly = readonly or access_pool.check_groups(cr, user, group) if not readonly: node.set('invisible', '1') del(node.attrib['groups']) | da17e9c16111f90886f68e1db761e6673b89fa21 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/da17e9c16111f90886f68e1db761e6673b89fa21/orm.py |
return can_see | def check_group(node): if node.get('groups'): groups = node.get('groups').split(',') readonly = False access_pool = self.pool.get('ir.model.access') for group in groups: readonly = readonly or access_pool.check_groups(cr, user, group) if not readonly: node.set('invisible', '1') del(node.attrib['groups']) | da17e9c16111f90886f68e1db761e6673b89fa21 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/da17e9c16111f90886f68e1db761e6673b89fa21/orm.py | |
if 'groups' in node.attrib: check_group(node) if node.get('invisible'): | if not check_group(node) | def check_group(node): if node.get('groups'): groups = node.get('groups').split(',') readonly = False access_pool = self.pool.get('ir.model.access') for group in groups: readonly = readonly or access_pool.check_groups(cr, user, group) if not readonly: node.set('invisible', '1') del(node.attrib['groups']) | da17e9c16111f90886f68e1db761e6673b89fa21 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/da17e9c16111f90886f68e1db761e6673b89fa21/orm.py |
attrs['selection'] = self.pool.get(relation)._name_search(cr, user, '', dom, context=context,limit=None,name_get_uid=1) | attrs['selection'] = self.pool.get(relation)._name_search(cr, user, '', dom, context=context, limit=None, name_get_uid=1) | def check_group(node): if node.get('groups'): groups = node.get('groups').split(',') readonly = False access_pool = self.pool.get('ir.model.access') for group in groups: readonly = readonly or access_pool.check_groups(cr, user, group) if not readonly: node.set('invisible', '1') del(node.attrib['groups']) | da17e9c16111f90886f68e1db761e6673b89fa21 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/da17e9c16111f90886f68e1db761e6673b89fa21/orm.py |
res = self.name_get(cr, name_get_uid, ids, context) | res = self.name_get(cr, name_get_uid or user, ids, context) | def _name_search(self, cr, user, name='', args=None, operator='ilike', context=None, limit=100, name_get_uid=None): if not args: args = [] if not context: context = {} args = args[:] if name: args += [(self._rec_name, operator, name)] ids = self.search(cr, user, args, limit=limit, context=context) res = self.name_get(c... | da17e9c16111f90886f68e1db761e6673b89fa21 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/da17e9c16111f90886f68e1db761e6673b89fa21/orm.py |
return self._name_search(cr, user, name, args, operator, context, limit, user) | return self._name_search(cr, user, name, args, operator, context, limit) | def name_search(self, cr, user, name='', args=None, operator='ilike', context=None, limit=100): """ | da17e9c16111f90886f68e1db761e6673b89fa21 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/da17e9c16111f90886f68e1db761e6673b89fa21/orm.py |
cols = intersect(self._inherit_fields.keys(), fields_to_read) | cols = intersect(self._inherit_fields.keys(), set(fields_to_read) - set(self._columns.keys())) | def convert_field(f): if f in ('create_date', 'write_date'): return "date_trunc('second', %s) as %s" % (f, f) if f == self.CONCURRENCY_CHECK_FIELD: if self._log_access: return "COALESCE(%s.write_date, %s.create_date, now())::timestamp AS %s" % (self._table, self._table, f,) return "now()::timestamp AS %s" % (f,) if isi... | 209d7cea5125a4a1744483a24100c34a0591927c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/209d7cea5125a4a1744483a24100c34a0591927c/orm.py |
sum(planned_revenue) as amount_revenue, sum(planned_cost) as amount_costs, sum(planned_revenue*probability/100)::decimal(16,2) as amount_revenue_prob, avg(probability)::decimal(16,2) as probability, | def init(self, cr): tools.drop_view_if_exists(cr, 'project_issue_report') cr.execute(""" create or replace view project_issue_report as ( select min(c.id) as id, to_char(c.create_date, 'YYYY') as name, to_char(c.create_date, 'MM') as month, c.state, c.user_id, c.section_id, c.categ_id, c.stage_id, count(*) as nbr, sum(... | c3cbfa5cdf128fc68aa1001301738a91ea3a846b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/c3cbfa5cdf128fc68aa1001301738a91ea3a846b/project_issue_report.py | |
for inv in self.browse(cr,uid,ids): move_obj.action_done(cr, uid, [x.id for x in inv.move_ids], context) self.write(cr, uid, [inv.id], {'state':'done'}, context=context) | for inv in self.browse(cr, uid, ids, context=context): move_obj.action_done(cr, uid, [x.id for x in inv.move_ids], context=context) self.write(cr, uid, [inv.id], {'state':'done'}, context=context) | def action_done(self, cr, uid, ids, context=None): move_obj = self.pool.get('stock.move') for inv in self.browse(cr,uid,ids): move_obj.action_done(cr, uid, [x.id for x in inv.move_ids], context) self.write(cr, uid, [inv.id], {'state':'done'}, context=context) return True | 3be905a24861fb1f15a1daf9b37c22c09b128ede /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/3be905a24861fb1f15a1daf9b37c22c09b128ede/stock.py |
res = False if line[i]: field_name = field[0].split(':')[0] model_rel = fields_def[field_name]['relation'] if fields_def[field[len(prefix)][:-6]]['type']=='many2many': res_id = [] for db_id in line[i].split(config.get('csv_internal_sep')): try: _check_db_id(self, model_rel, db_id) res_id.append(db_id) except Exceptio... | res = False if line[i]: field_name = field[0].split(':')[0] model_rel = fields_def[field_name]['relation'] if fields_def[field[len(prefix)][:-6]]['type']=='many2many': res_id = [] for db_id in line[i].split(config.get('csv_internal_sep')): try: _check_db_id(self, model_rel, db_id) res_id.append(db_id) except Exceptio... | def process_liness(self, datas, prefix, current_module, model_name, fields_def, position=0): line = datas[position] row = {} translate = {} todo = [] warning = [] data_id = False data_res_id = False is_xml_id = False is_db_id = False ir_model_data_obj = self.pool.get('ir.model.data') # # Import normal fields # for i in... | 827ce83b5767611573e3e504cd882f1684b5bd2a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/827ce83b5767611573e3e504cd882f1684b5bd2a/orm.py |
data_ids = ir_model_data_obj.search(cr, uid, [('module','=',module),('model','=',model_name),('res_id','=',is_db_id)]) if not len(data_ids): ir_model_data_obj.create(cr, uid, {'module':module, 'model':model_name, 'name':name, 'res_id':is_db_id}) db_id = is_db_id | data_ids = ir_model_data_obj.search(cr, uid, [('module','=',module),('model','=',model_name),('res_id','=',is_db_id)]) if not len(data_ids): ir_model_data_obj.create(cr, uid, {'module':module, 'model':model_name, 'name':name, 'res_id':is_db_id}) db_id = is_db_id | def process_liness(self, datas, prefix, current_module, model_name, fields_def, position=0): line = datas[position] row = {} translate = {} todo = [] warning = [] data_id = False data_res_id = False is_xml_id = False is_db_id = False ir_model_data_obj = self.pool.get('ir.model.data') # # Import normal fields # for i in... | 827ce83b5767611573e3e504cd882f1684b5bd2a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/827ce83b5767611573e3e504cd882f1684b5bd2a/orm.py |
node_fields=self.pool.get(node.getchildren()[0].get('object')).fields_get(cr, user, fields_def.keys(), context) | node_fields=self.pool.get(node.getchildren()[0].get('object')).fields_get(cr, user, fields_def.keys(), context) | fields_def = self.__view_look_dom(cr, user, node, view_id, context=context) | 827ce83b5767611573e3e504cd882f1684b5bd2a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/827ce83b5767611573e3e504cd882f1684b5bd2a/orm.py |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.