rem
stringlengths
1
322k
add
stringlengths
0
2.05M
context
stringlengths
4
228k
meta
stringlengths
156
215
picking_ids = picking_obj.search(cr, uid, [('pos_order', 'in',[record_id]), ('state', '=', 'done')])
picking_ids = picking_obj.search(cr, uid, [('pos_order', 'in',[active_id]), ('state', '=', 'done')])
def select_product(self, cr, uid, ids, context): """ To get the product and quantity and add in order . @param self: The object pointer. @param cr: A database cursor @param uid: ID of the user currently logged in @param context: A standard dictionary @return : Retrun the add product form again for adding more product "...
1ec225ce8c6444f7d03770574c22a04544d34f5f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/1ec225ce8c6444f7d03770574c22a04544d34f5f/pos_return.py
order_obj.add_product(cr, uid, record_id,data['product_id'],data['quantity'], context=context)
order_obj.add_product(cr, uid, active_id,data['product_id'],data['quantity'], context=context)
def select_product(self, cr, uid, ids, context): """ To get the product and quantity and add in order . @param self: The object pointer. @param cr: A database cursor @param uid: ID of the user currently logged in @param context: A standard dictionary @return : Retrun the add product form again for adding more product "...
1ec225ce8c6444f7d03770574c22a04544d34f5f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/1ec225ce8c6444f7d03770574c22a04544d34f5f/pos_return.py
for order_id in order_obj.browse(cr, uid, [record_id], context=context):
for order_id in order_obj.browse(cr, uid, [active_id], context=context):
def select_product(self, cr, uid, ids, context): """ To get the product and quantity and add in order . @param self: The object pointer. @param cr: A database cursor @param uid: ID of the user currently logged in @param context: A standard dictionary @return : Retrun the add product form again for adding more product "...
1ec225ce8c6444f7d03770574c22a04544d34f5f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/1ec225ce8c6444f7d03770574c22a04544d34f5f/pos_return.py
order_obj.write(cr,uid,record_id,{'last_out_picking':new_picking})
order_obj.write(cr,uid,active_id,{'last_out_picking':new_picking})
def select_product(self, cr, uid, ids, context): """ To get the product and quantity and add in order . @param self: The object pointer. @param cr: A database cursor @param uid: ID of the user currently logged in @param context: A standard dictionary @return : Retrun the add product form again for adding more product "...
1ec225ce8c6444f7d03770574c22a04544d34f5f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/1ec225ce8c6444f7d03770574c22a04544d34f5f/pos_return.py
record_id=context.get('record_id', False)
active_id=context.get('active_id', False)
def close_action(self, cr, uid, ids, context):
1ec225ce8c6444f7d03770574c22a04544d34f5f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/1ec225ce8c6444f7d03770574c22a04544d34f5f/pos_return.py
picking_ids = picking_obj.search(cr, uid, [('pos_order', 'in', [record_id]), ('state', '=', 'done')])
picking_ids = picking_obj.search(cr, uid, [('pos_order', 'in', [active_id]), ('state', '=', 'done')])
def close_action(self, cr, uid, ids, context):
1ec225ce8c6444f7d03770574c22a04544d34f5f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/1ec225ce8c6444f7d03770574c22a04544d34f5f/pos_return.py
for order_id in order_obj.browse(cr, uid, [record_id], context=context):
for order_id in order_obj.browse(cr, uid, [active_id], context=context):
def close_action(self, cr, uid, ids, context):
1ec225ce8c6444f7d03770574c22a04544d34f5f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/1ec225ce8c6444f7d03770574c22a04544d34f5f/pos_return.py
obj=order_obj.browse(cr,uid, record_id)
obj=order_obj.browse(cr,uid, active_id)
def close_action(self, cr, uid, ids, context):
1ec225ce8c6444f7d03770574c22a04544d34f5f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/1ec225ce8c6444f7d03770574c22a04544d34f5f/pos_return.py
'context ':context and context.get('record_id', False),
'context ':context and context.get('active_id', False),
def close_action(self, cr, uid, ids, context):
1ec225ce8c6444f7d03770574c22a04544d34f5f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/1ec225ce8c6444f7d03770574c22a04544d34f5f/pos_return.py
al.dp as date,
date_trunc('day',al.dp) as date,
def init(self, cr): tools.drop_view_if_exists(cr, 'report_stock_move') cr.execute(""" CREATE OR REPLACE view report_stock_move AS ( SELECT min(sm_id) as id, al.dp as date, al.curr_year as year, al.curr_month as month, al.curr_day as day, al.curr_day_diff as day_diff, al.curr_day_diff1 as day_diff1, al.curr_day_diff2 as...
6a09a74fba34e7c0bd4a92b192cfa1737aaa19e6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/6a09a74fba34e7c0bd4a92b192cfa1737aaa19e6/report_stock_move.py
def unlink(self, cr, uid, ids, context={}):
def unlink(self, cr, uid, ids, context=None):
def unlink(self, cr, uid, ids, context={}): stor = self.pool.get('document.storage') unres = [] # We have to do the unlink in 2 stages: prepare a list of actual # files to be unlinked, update the db (safer to do first, can be # rolled back) and then unlink the files. The list wouldn't exist # after we discard the objec...
8a107a7e52e2b6fe423dd491f1c4c5fac44b99a9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/8a107a7e52e2b6fe423dd491f1c4c5fac44b99a9/document.py
r = stor.prepare_unlink(cr, uid, f.parent_id.storage_id, f)
par = f.parent_id storage_id = None while par: if par.storage_id: storage_id = par.storage_id break par = par.parent_id assert storage_id, "Strange, found file r = stor.prepare_unlink(cr, uid, storage_id, f)
def unlink(self, cr, uid, ids, context={}): stor = self.pool.get('document.storage') unres = [] # We have to do the unlink in 2 stages: prepare a list of actual # files to be unlinked, update the db (safer to do first, can be # rolled back) and then unlink the files. The list wouldn't exist # after we discard the objec...
8a107a7e52e2b6fe423dd491f1c4c5fac44b99a9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/8a107a7e52e2b6fe423dd491f1c4c5fac44b99a9/document.py
partner_address_id = val_invoice['value']['address_invoice_id'] value = inv_lines_pool.product_id_change(cr, uid, [], reg.event_id.product_id.id, uom =False, partner_id=reg.partner_invoice_id.id, fposition_id=reg.partner_invoice_id.property_account_position.id) l = inv_lines_pool.read(cr, uid, lines)
def _make_invoice(self, cr, uid, reg, lines, context=None): """ Create Invoice from Invoice lines @param reg : Model of Event Registration @param lines: Ids of Invoice lines """ if context is None: context = {} inv_pool = self.pool.get('account.invoice') inv_lines_pool = self.pool.get('account.invoice.line')
1a87577d4ca17bb2b802bdc3d597cc0b5d4dca63 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/1a87577d4ca17bb2b802bdc3d597cc0b5d4dca63/event.py
contact_id = contact_obj.browse(cr, uid, contact)
def onchange_contact_id(self, cr, uid, ids, contact, partner):
1a87577d4ca17bb2b802bdc3d597cc0b5d4dca63 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/1a87577d4ca17bb2b802bdc3d597cc0b5d4dca63/event.py
res.update({'text': '\n\n'+(case.user_id.signature or '') + '\n\n' + (case.description or '')})
res.update({'text': '\n\n'+(case.user_id.signature or '')})
def default_get(self, cr, uid, fields, context=None): """ This function gets default values """ if not context: context = {}
393afb43b781bbe2a34c82b0aba02e55cd2cd0a6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/393afb43b781bbe2a34c82b0aba02e55cd2cd0a6/crm_send_email.py
rows_by_module.setdefault(module, []).append(row)
rows_by_module.setdefault(module, [['module', 'type', 'name', 'res_id', 'src', ''],]) rows_by_module[module].append(row)
def _process(format, modules, rows, buffer, lang, newlang): if format == 'csv': writer=csv.writer(buffer, 'UNIX') for row in rows: writer.writerow(row) elif format == 'po': rows.pop(0) writer = tools.TinyPoFile(buffer) writer.write_infos(modules)
bc9611bd40e338a1e49a12a710ca07c565869196 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/bc9611bd40e338a1e49a12a710ca07c565869196/translate.py
nodes = doc.xpath("//page[@name='journal_ids']")
nodes = doc.xpath("//field[@name='journal_ids']")
def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False, submenu=False): mod_obj = self.pool.get('ir.model.data') res = super(account_bs_report, self).fields_view_get(cr, uid, view_id=view_id, view_type=view_type, context=context, toolbar=toolbar, submenu=False) doc = etree.XML(re...
1d14225388c4b506336b08cb5f91385b242e4ba7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/1d14225388c4b506336b08cb5f91385b242e4ba7/account_report_balance_sheet.py
node.set('invisible', '1')
node.set('readonly', '1') node.set('required', '0')
def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False, submenu=False): mod_obj = self.pool.get('ir.model.data') res = super(account_bs_report, self).fields_view_get(cr, uid, view_id=view_id, view_type=view_type, context=context, toolbar=toolbar, submenu=False) doc = etree.XML(re...
1d14225388c4b506336b08cb5f91385b242e4ba7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/1d14225388c4b506336b08cb5f91385b242e4ba7/account_report_balance_sheet.py
def copy(self, cr, uid, id, default=None, context=None): if default is None: default = {} default = default.copy() default.update({'line_ids': []}) return super(account_tax_code, self).copy(cr, uid, id, default, context)
def _check_recursion(self, cr, uid, ids): level = 100 while len(ids): cr.execute('select distinct parent_id from account_tax_code where id =ANY(%s)',(ids,)) ids = filter(None, map(lambda x:x[0], cr.fetchall())) if not level: return False level -= 1 return True
746198e3357ba7a376502b9d8a81ff5626850494 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/746198e3357ba7a376502b9d8a81ff5626850494/account.py
print "::ODS",ids
def run(self, cr, uid, ids, context={}): logger = netsvc.Logger()
24069b2fa667a08b5496fd82397dfda07ddaeb73 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/24069b2fa667a08b5496fd82397dfda07ddaeb73/ir_actions.py
raise osv.except_osv(_('Error'), _("Please specify server option --smtp-from !"))
raise osv.except_osv(_('Error'), _("Please specify server option --email-from !"))
def run(self, cr, uid, ids, context={}): logger = netsvc.Logger()
24069b2fa667a08b5496fd82397dfda07ddaeb73 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/24069b2fa667a08b5496fd82397dfda07ddaeb73/ir_actions.py
except : raise Exception(exceptions.html_error_template().render())
except Exception, e: raise except_osv(exceptions.html_error_template().render())
def create_single_pdf(self, cursor, uid, ids, data, report_xml, context=None): """generate the PDF""" if context is None: context={} if report_xml.report_type != 'webkit': return super(WebKitParser,self).create_single_pdf(cursor, uid, ids, data, report_xml, context=context)
0716a455a609d62b1b5b1d2e5358c9c943a5646b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/0716a455a609d62b1b5b1d2e5358c9c943a5646b/webkit_report.py
except : raise Exception(exceptions.html_error_template().render())
except Exception, e: raise except_osv(exceptions.html_error_template().render())
def create_single_pdf(self, cursor, uid, ids, data, report_xml, context=None): """generate the PDF""" if context is None: context={} if report_xml.report_type != 'webkit': return super(WebKitParser,self).create_single_pdf(cursor, uid, ids, data, report_xml, context=context)
0716a455a609d62b1b5b1d2e5358c9c943a5646b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/0716a455a609d62b1b5b1d2e5358c9c943a5646b/webkit_report.py
raise Exception(exceptions.html_error_template().render())
raise except_osv(exceptions.html_error_template().render())
def create_single_pdf(self, cursor, uid, ids, data, report_xml, context=None): """generate the PDF""" if context is None: context={} if report_xml.report_type != 'webkit': return super(WebKitParser,self).create_single_pdf(cursor, uid, ids, data, report_xml, context=context)
0716a455a609d62b1b5b1d2e5358c9c943a5646b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/0716a455a609d62b1b5b1d2e5358c9c943a5646b/webkit_report.py
except : raise Exception(exceptions.html_error_template().render())
except Exception, e: raise except_osv(exceptions.html_error_template().render())
def create_single_pdf(self, cursor, uid, ids, data, report_xml, context=None): """generate the PDF""" if context is None: context={} if report_xml.report_type != 'webkit': return super(WebKitParser,self).create_single_pdf(cursor, uid, ids, data, report_xml, context=context)
0716a455a609d62b1b5b1d2e5358c9c943a5646b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/0716a455a609d62b1b5b1d2e5358c9c943a5646b/webkit_report.py
raise osv.except_osv(_('Warning !'),_('Not Available. Moves are not confirmed.'))
raise osv.except_osv(_('Warning !'),_('Not enough stock, unable to reserve the products.'))
def action_assign(self, cr, uid, ids, *args): """ Changes state of picking to available if all moves are confirmed. @return: True """ for pick in self.browse(cr, uid, ids): move_ids = [x.id for x in pick.move_lines if x.state == 'confirmed'] if not move_ids: raise osv.except_osv(_('Warning !'),_('Not Available. Moves a...
81a83a02e3e7a41c3748528d91f06d04d7cfdcb7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/81a83a02e3e7a41c3748528d91f06d04d7cfdcb7/stock.py
'partner_id': fields.related('line_id', 'partner_id', type="many2one", relation="res.partner", string="Partner"),
'partner_id': fields.related('line_id', 'partner_id', type="many2one", relation="res.partner", string="Partner", store=True),
def _search_amount(self, cr, uid, obj, name, args, context): ids = set() for cond in args: amount = cond[2] if isinstance(cond[2],(list,tuple)): if cond[1] in ['in','not in']: amount = tuple(cond[2]) else: continue else: if cond[1] in ['=like', 'like', 'not like', 'ilike', 'not ilike', 'in', 'not in', 'child_of']: cont...
1ad2ddbc179bf11f1e25b9337c1558ece86876e2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/1ad2ddbc179bf11f1e25b9337c1558ece86876e2/account.py
def copy(self, cr, uid, id, default=None, context=None): if default is None: default = {} if context is None: context = {} default = default.copy() default['member_lines'] = [] return super(Partner, self).copy(cr, uid, id, default, context)
def _check_recursion(self, cr, uid, ids): level = 100 while len(ids): cr.execute('select distinct associate_member from res_partner where id =ANY(%s)',(ids,)) ids = filter(None, map(lambda x:x[0], cr.fetchall())) if not level: return False level -= 1 return True
f2630754c0e1fc0b61e2a3f7dca72ddf9608c8c6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/f2630754c0e1fc0b61e2a3f7dca72ddf9608c8c6/membership.py
copy_val += " or '" + null_value + "'"
copy_val += " or '''%s'''" % null_value
def compute_pl(self, model_object_field, sub_model_object_field, null_value, template_language='mako'): """ Returns the expression based on data provided @param model_object_field: First level field @param sub_model_object_field: Second level drilled down field (M2O) @param null_value: What has to be returned if the va...
7111a3fe13b7dce43cab863a833a5108b8af77cf /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/7111a3fe13b7dce43cab863a833a5108b8af77cf/email_template.py
copy_val = copy_val + '|default:"' + null_value + '"'
copy_val = copy_val + "|default:'''%s'''" % null_value
def compute_pl(self, model_object_field, sub_model_object_field, null_value, template_language='mako'): """ Returns the expression based on data provided @param model_object_field: First level field @param sub_model_object_field: Second level drilled down field (M2O) @param null_value: What has to be returned if the va...
7111a3fe13b7dce43cab863a833a5108b8af77cf /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/7111a3fe13b7dce43cab863a833a5108b8af77cf/email_template.py
def warn(self, msg): self.logger.warning(msg)
def warn(self, msg, *args): self.logger.warning(msg, *args)
def warn(self, msg): self.logger.warning(msg)
1970c59234994dbad4c75ce428da16c69f22df48 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/1970c59234994dbad4c75ce428da16c69f22df48/translate.py
fobj.import_cal(cr, uid, base64.encodestring(data), context=ctx)
fobj.import_cal(cr, uid, base64.encodestring(data), context=context)
def process_write(self, cr, uid, node, data, context=None): if node.extension != '.ics': return super(document_directory_content, self).process_write(cr, uid, node, data, context) content = self.browse(cr, uid, node.cnt_id, context) fobj = self.pool.get(content.object_id.model) fobj.import_cal(cr, uid, base64.encodestr...
3a75c7dd83faff88edf197977e24f554148c8315 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/3a75c7dd83faff88edf197977e24f554148c8315/document_caldav.py
message = (n +" '" + case.name + "' "+ _("has been closed.")
message = n +" '" + case.name + "' "+ _("has been closed.")
def case_close(self, cr, uid, ids, *args): """Overrides close for crm_case for setting close date @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 case Ids @param *args: Tuple Value for additional Params """ ...
af51827c9cd179d34c5fc8d3e63bf0ddf6110243 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/af51827c9cd179d34c5fc8d3e63bf0ddf6110243/crm_lead.py
raise except_orm(_('UnknownError'), str(e))
raise
def create(self, cr, uid, vals, context={}): try: res = super(account_invoice, self).create(cr, uid, vals, context) return res except Exception,e: if '"journal_id" viol' in e.args[0]: raise except_orm(_('Configuration Error!'), _('There is no Accounting Journal of type Sale/Purchase defined!')) else: raise except_orm(_...
0a33d12afe9dcbb8104212a2de8d821cbba67254 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/0a33d12afe9dcbb8104212a2de8d821cbba67254/invoice.py
m = self.pool.get('account.move').browse(cr, uid, vals['move_id']) journal_id = m.journal_id.id period_id = m.period_id.id
if vals['move_id']: m = self.pool.get('account.move').browse(cr, uid, vals['move_id']) journal_id = m.journal_id.id period_id = m.period_id.id
def _check_date(self, cr, uid, vals, context=None, check=True): if context is None: context = {} journal_id = False if 'date' in vals.keys(): if 'journal_id' in vals and 'journal_id' not in context: journal_id = vals['journal_id'] if 'period_id' in vals and 'period_id' not in context: period_id = vals['period_id'] elif...
6be24164f44f46fe621c4147bf06bb629e92eb1e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/6be24164f44f46fe621c4147bf06bb629e92eb1e/account_move_line.py
cr.execute(query, (ids,))
cr.execute(query, (tuple(ids),))
def _get_answers(cr, uid, ids): """ @param cr: the current row, from the database cursor, @param uid: the current user’s ID for security checks, @param ids: List of crm profiling’s IDs """ query = """ select distinct(answer) from profile_question_yes_rel where profile IN %s""" cr.execute(query, (ids,)) ans_yes = [x[0...
5b6099b05f1bae2aeaca11ee2438237955b00cac /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/5b6099b05f1bae2aeaca11ee2438237955b00cac/crm_profiling.py
'name': subject or 'History',
'name': subject or _('History'),
def history(self, cr, uid, cases, keyword, history=False, subject=None, email=False, details=None, \ email_from=False, message_id=False, references=None, attach=None, email_cc=None, \ email_bcc=None, email_date=None, context=None): """ @param self: The object pointer @param cr: the current row, from the database cursor...
a67a50cd1eba34b5f36974ee353cedf6856c9059 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/a67a50cd1eba34b5f36974ee353cedf6856c9059/mail_gateway.py
msg_txt += (message.email_from or '/') + ' wrote on ' + format_date_tz(message.date, tz) + ':\n\t'
msg_txt += (message.email_from or '/') + _(' wrote on ') + format_date_tz(message.date, tz) + ':\n\t'
def _get_display_text(self, cr, uid, ids, name, arg, context=None): if context is None: context = {} tz = context.get('tz') result = {} for message in self.browse(cr, uid, ids, context=context): msg_txt = '' if message.history: msg_txt += (message.email_from or '/') + ' wrote on ' + format_date_tz(message.date, tz) + '...
a67a50cd1eba34b5f36974ee353cedf6856c9059 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/a67a50cd1eba34b5f36974ee353cedf6856c9059/mail_gateway.py
msg_txt = (message.user_id.name or '/') + ' on ' + format_date_tz(message.date, tz) + ':\n\t' if message.name == 'Opportunity': msg_txt += "Converted to Opportunity"
msg_txt = (message.user_id.name or '/') + _(' on ') + format_date_tz(message.date, tz) + ':\n\t' if message.name == _('Opportunity'): msg_txt += _("Converted to Opportunity")
def _get_display_text(self, cr, uid, ids, name, arg, context=None): if context is None: context = {} tz = context.get('tz') result = {} for message in self.browse(cr, uid, ids, context=context): msg_txt = '' if message.history: msg_txt += (message.email_from or '/') + ' wrote on ' + format_date_tz(message.date, tz) + '...
a67a50cd1eba34b5f36974ee353cedf6856c9059 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/a67a50cd1eba34b5f36974ee353cedf6856c9059/mail_gateway.py
msg_txt += "Changed Status to: " + message.name
msg_txt += _("Changed Status to: ") + message.name
def _get_display_text(self, cr, uid, ids, name, arg, context=None): if context is None: context = {} tz = context.get('tz') result = {} for message in self.browse(cr, uid, ids, context=context): msg_txt = '' if message.history: msg_txt += (message.email_from or '/') + ' wrote on ' + format_date_tz(message.date, tz) + '...
a67a50cd1eba34b5f36974ee353cedf6856c9059 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/a67a50cd1eba34b5f36974ee353cedf6856c9059/mail_gateway.py
'type': fields.selection([('sale', 'Sale'), ('purchase', 'Purchase'), ('expanse', 'Expanse'), ('cash', 'Cash'), ('bank', 'Bank'), ('general', 'General'), ('situation', 'Situation')], 'Type', size=32, required=True,
'type': fields.selection([('sale', 'Sale'), ('purchase', 'Purchase'), ('expense', 'Expense'), ('cash', 'Cash'), ('bank', 'Bank'), ('general', 'General'), ('situation', 'Situation')], 'Type', size=32, required=True,
def _col_get(self, cr, user, context={}): result = [] cols = self.pool.get('account.move.line')._columns for col in cols: result.append( (col, cols[col].string) ) result.sort() return result
e0ba2ed35c7c051d3325cf5e014edde277c400a0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/e0ba2ed35c7c051d3325cf5e014edde277c400a0/account.py
'grows': fields.function(_calculate, method=True, store=True, multi='dc', string='Gross Salary', type='float', digits=(16, int(config['price_accuracy']))), 'net': fields.function(_calculate, method=True, store=True, multi='dc', string='Net Salary', digits=(16, int(config['price_accuracy']))), 'allounce': fields.functio...
'grows': fields.function(_calculate, method=True, store=True, multi='dc', string='Gross Salary', type='float', digits=(16, 4))), 'net': fields.function(_calculate, method=True, store=True, multi='dc', string='Net Salary', digits=(16, 4)), 'allounce': fields.function(_calculate, method=True, store=True, multi='dc', stri...
def _calculate(self, cr, uid, ids, field_names, arg, context): res = {} allounce = 0.0 deduction = 0.0 net = 0.0 grows = 0.0 for register in self.browse(cr, uid, ids, context): for slip in register.line_ids: allounce += slip.allounce deduction += slip.deduction net += slip.net grows += slip.grows
e2b65c7e284869049766f797c82a2d035de4d467 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/e2b65c7e284869049766f797c82a2d035de4d467/hr_payroll.py
'amount': fields.float('Amount', digits=(16, int(config['price_accuracy']))), 'bysal': fields.float('By Salary', digits=(16, int(config['price_accuracy']))),
'amount': fields.float('Amount', digits=(16, 4)), 'bysal': fields.float('By Salary', digits=(16, 4)),
def cancel_sheet(self, cr, uid, ids, context={}): self.write(cr, uid, ids, {'state':'cancel'}) return True
e2b65c7e284869049766f797c82a2d035de4d467 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/e2b65c7e284869049766f797c82a2d035de4d467/hr_payroll.py
'yearly_total_by_emp': fields.function(_total_contrib, method=True, multi='dc', store=True, string='Total By Employee', digits=(16, int(config['price_accuracy']))), 'yearly_total_by_comp': fields.function(_total_contrib, method=True, multi='dc', store=True, string='Total By Company', digits=(16, int(config['price_accu...
'yearly_total_by_emp': fields.function(_total_contrib, method=True, multi='dc', store=True, string='Total By Employee', digits=(16, 4)), 'yearly_total_by_comp': fields.function(_total_contrib, method=True, multi='dc', store=True, string='Total By Company', digits=(16, 4)), 'monthly_total_by_emp': fields.function(_tota...
def _total_contrib(self, cr, uid, ids, field_names, arg, context={}): line_pool = self.pool.get('hr.contibution.register.line') period_id = self.pool.get('account.period').search(cr,uid,[('date_start','<=',time.strftime('%Y-%m-%d')),('date_stop','>=',time.strftime('%Y-%m-%d'))])[0] fiscalyear_id = self.pool.get('accoun...
e2b65c7e284869049766f797c82a2d035de4d467 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/e2b65c7e284869049766f797c82a2d035de4d467/hr_payroll.py
'emp_deduction': fields.float('Employee Deduction', digits=(16, int(config['price_accuracy']))), 'comp_deduction': fields.float('Company Deduction', digits=(16, int(config['price_accuracy']))), 'total': fields.function(_total, method=True, store=True, string='Total', digits=(16, int(config['price_accuracy']))),
'emp_deduction': fields.float('Employee Deduction', digits=(16, 4)), 'comp_deduction': fields.float('Company Deduction', digits=(16, 4)), 'total': fields.function(_total, method=True, store=True, string='Total', digits=(16, 4)),
def _total(self, cr, uid, ids, field_names, arg, context): res={} for line in self.browse(cr, uid, ids, context): res[line.id] = line.emp_deduction + line.comp_deduction return res
e2b65c7e284869049766f797c82a2d035de4d467 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/e2b65c7e284869049766f797c82a2d035de4d467/hr_payroll.py
'contribute_per':fields.float('Contribution', digits=(16, int(config['price_accuracy'])), help='Define Company contribution ratio 1.00=100% contribution, If Employee Contribute 5% then company will and here 0.50 defined then company will contribute 50% on employee 5% contribution'),
'contribute_per':fields.float('Contribution', digits=(16, 4), help='Define Company contribution ratio 1.00=100% contribution, If Employee Contribute 5% then company will and here 0.50 defined then company will contribute 50% on employee 5% contribution'),
def _total(self, cr, uid, ids, field_names, arg, context): res={} for line in self.browse(cr, uid, ids, context): res[line.id] = line.emp_deduction + line.comp_deduction return res
e2b65c7e284869049766f797c82a2d035de4d467 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/e2b65c7e284869049766f797c82a2d035de4d467/hr_payroll.py
'from_val': fields.float('From', digits=(16, int(config['price_accuracy']))), 'to_val': fields.float('To', digits=(16, int(config['price_accuracy']))),
'from_val': fields.float('From', digits=(16, 4)), 'to_val': fields.float('To', digits=(16, 4)),
def execute_function(self, cr, uid, id, value, context): """ self: pointer to self object cr: cursor to database uid: user id of current executer """
e2b65c7e284869049766f797c82a2d035de4d467 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/e2b65c7e284869049766f797c82a2d035de4d467/hr_payroll.py
'value': fields.float('Value', digits=(16, int(config['price_accuracy']))),
'value': fields.float('Value', digits=(16, 4)),
def execute_function(self, cr, uid, id, value, context): """ self: pointer to self object cr: cursor to database uid: user id of current executer """
e2b65c7e284869049766f797c82a2d035de4d467 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/e2b65c7e284869049766f797c82a2d035de4d467/hr_payroll.py
'total': fields.float('Sub Total', readonly=True, digits=(16, int(config['price_accuracy']))),
'total': fields.float('Sub Total', readonly=True, digits=(16, 4)),
def onchange_amount(self, cr, uid, ids, amount, typ): amt = amount if typ and typ == 'per': if int(amt) > 0: amt = amt / 100 return {'value':{'amount':amt}}
e2b65c7e284869049766f797c82a2d035de4d467 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/e2b65c7e284869049766f797c82a2d035de4d467/hr_payroll.py
'company_contrib': fields.float('Company Contribution', readonly=True, digits=(16, int(config['price_accuracy']))),
'company_contrib': fields.float('Company Contribution', readonly=True, digits=(16, 4)),
def onchange_amount(self, cr, uid, ids, amount, typ): amt = amount if typ and typ == 'per': if int(amt) > 0: amt = amt / 100 return {'value':{'amount':amt}}
e2b65c7e284869049766f797c82a2d035de4d467 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/e2b65c7e284869049766f797c82a2d035de4d467/hr_payroll.py
'from_val': fields.float('From', digits=(16, int(config['price_accuracy']))), 'to_val': fields.float('To', digits=(16, int(config['price_accuracy']))),
'from_val': fields.float('From', digits=(16, 4)), 'to_val': fields.float('To', digits=(16, 4)),
def execute_function(self, cr, uid, id, value, context): line_pool = self.pool.get('hr.payslip.line.line') res = 0 ids = line_pool.search(cr, uid, [('slipline_id','=',id), ('from_val','<=',value), ('to_val','>=',value)])
e2b65c7e284869049766f797c82a2d035de4d467 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/e2b65c7e284869049766f797c82a2d035de4d467/hr_payroll.py
'value': fields.float('Value', digits=(16, int(config['price_accuracy']))),
'value': fields.float('Value', digits=(16, 4)),
def execute_function(self, cr, uid, id, value, context): line_pool = self.pool.get('hr.payslip.line.line') res = 0 ids = line_pool.search(cr, uid, [('slipline_id','=',id), ('from_val','<=',value), ('to_val','>=',value)])
e2b65c7e284869049766f797c82a2d035de4d467 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/e2b65c7e284869049766f797c82a2d035de4d467/hr_payroll.py
'amount_original': fields.function(_compute_balance, method=True, multi='dc', type='float', string='Originial Amount', store=True),
'amount_original': fields.function(_compute_balance, method=True, multi='dc', type='float', string='Original Amount', store=True),
def _compute_balance(self, cr, uid, ids, name, args, context=None): currency_pool = self.pool.get('res.currency') rs_data = {} for line in self.browse(cr, uid, ids, context=context): res = {} company_currency = line.voucher_id.journal_id.company_id.currency_id.id voucher_currency = line.voucher_id.currency_id.id move_l...
8c9840b230ea6bea3fe4b25b6ab9d341dd274d73 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/8c9840b230ea6bea3fe4b25b6ab9d341dd274d73/account_voucher.py
message = _("The lead '%s' has been opened.") % name
message = _("The lead '%s' has been opened.") % case.name
def case_open(self, cr, uid, ids, *args): """Overrides cancel for crm_case for setting Open Date @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 case's Ids @param *args: Give Tuple Value """ old_state = self...
f1c40bd6d4da75880cef38afa893300e02349f98 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/f1c40bd6d4da75880cef38afa893300e02349f98/crm_lead.py
message = _("The opportunity '%s' has been opened.") % name
message = _("The opportunity '%s' has been opened.") % case.name
def case_open(self, cr, uid, ids, *args): """Overrides cancel for crm_case for setting Open Date @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 case's Ids @param *args: Give Tuple Value """ old_state = self...
f1c40bd6d4da75880cef38afa893300e02349f98 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/f1c40bd6d4da75880cef38afa893300e02349f98/crm_lead.py
message = _("The case '%s' has been opened.") % name
message = _("The case '%s' has been opened.") % case.name
def case_open(self, cr, uid, ids, *args): """Overrides cancel for crm_case for setting Open Date @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 case's Ids @param *args: Give Tuple Value """ old_state = self...
f1c40bd6d4da75880cef38afa893300e02349f98 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/f1c40bd6d4da75880cef38afa893300e02349f98/crm_lead.py
message = _("The lead '%s' has been closed.") % name
message = _("The lead '%s' has been closed.") % case.name
def case_close(self, cr, uid, ids, *args): """Overrides close for crm_case for setting close date @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 case Ids @param *args: Tuple Value for additional Params """ ...
f1c40bd6d4da75880cef38afa893300e02349f98 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/f1c40bd6d4da75880cef38afa893300e02349f98/crm_lead.py
message = _("The opportunity '%s' has been closed.") % name
message = _("The opportunity '%s' has been closed.") % case.name
def case_close(self, cr, uid, ids, *args): """Overrides close for crm_case for setting close date @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 case Ids @param *args: Tuple Value for additional Params """ ...
f1c40bd6d4da75880cef38afa893300e02349f98 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/f1c40bd6d4da75880cef38afa893300e02349f98/crm_lead.py
message = _("The case '%s' has been closed.") % name
message = _("The case '%s' has been closed.") % case.name
def case_close(self, cr, uid, ids, *args): """Overrides close for crm_case for setting close date @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 case Ids @param *args: Tuple Value for additional Params """ ...
f1c40bd6d4da75880cef38afa893300e02349f98 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/f1c40bd6d4da75880cef38afa893300e02349f98/crm_lead.py
'type':fields.selection([
'server_type':fields.selection([
def fetch_mail(self, cr, uid, ids, context=None): if not context: context = {} email_tool = self.pool.get('email.server.tools') for server in self.browse(cr, uid, ids, context): logger.notifyChannel('imap', netsvc.LOG_INFO, 'fetchmail start checking for new emails on %s' % (server.name)) context.update({'server_id': se...
fbfcb5c00c74f9d7a2f4d2fbf26b72fc976dceb4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/fbfcb5c00c74f9d7a2f4d2fbf26b72fc976dceb4/fetchmail.py
res[hist.id] = (hist.email or '/') + ' (' + str(hist.date) + ')\n'
res[hist.id] = (hist.email_from or '/') + ' (' + str(hist.date) + ')\n'
def _note_get(self, cursor, user, ids, name, arg, context=None): """ Gives case History Description @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 case History’s IDs @param context: A standard dictionary fo...
74451deac21bcc507cba9721f335c699f62a35a5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/74451deac21bcc507cba9721f335c699f62a35a5/crm.py
def move_line_get_item(self, cr, uid, line, context={}): res = super(account_voucher_line, self).move_line_get_item(cr, uid, line, context) res['invoice'] = line.invoice_id or False return res
6b7a7edd25712388b1d8d4b1f70a0b79f1a531d7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/6b7a7edd25712388b1d8d4b1f70a0b79f1a531d7/account_voucher_payment.py
def onchange_product_id(self, cr, uid, ids, product_id,context={}): """ Changes UoM if product_id changes. @param product_id: Changed product_id @return: Dictionary of changed values """ if product_id: prod = self.pool.get('product.product').browse(cr, uid, product_id) v = {'product_uom': prod.uom_id.id} return {'value...
37c862c83b173a3f59671a231ee32ee2cd35e5b7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/37c862c83b173a3f59671a231ee32ee2cd35e5b7/mrp_subproduct.py
_inherit= 'mrp.production'
_inherit= 'mrp.production'
def onchange_product_id(self, cr, uid, ids, product_id,context={}): """ Changes UoM if product_id changes. @param product_id: Changed product_id @return: Dictionary of changed values """ if product_id: prod = self.pool.get('product.product').browse(cr, uid, product_id) v = {'product_uom': prod.uom_id.id} return {'value...
37c862c83b173a3f59671a231ee32ee2cd35e5b7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/37c862c83b173a3f59671a231ee32ee2cd35e5b7/mrp_subproduct.py
"""Sets duration as 24 Hours if event is selcted for all day
"""Sets duration as 24 Hours if event is selected for all day
def onchange_allday(self, cr, uid, ids, allday, context=None): """Sets duration as 24 Hours if event is selcted for all day @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 calendar event’s IDs. @param allday...
6de4c3eb3ab87a7de1e048b6e72e54e52d13188b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/6de4c3eb3ab87a7de1e048b6e72e54e52d13188b/base_calendar.py
def _query_get(self, cr, uid, obj='l', context={}): fiscalyear_obj = self.pool.get('account.fiscalyear') fiscalperiod_obj = self.pool.get('account.period') fiscalyear_ids = [] fiscalperiod_ids = [] initial_bal = context.get('initial_bal', False) company_clause = "" if context.get('company_id', False): company_clause = ...
da504f014e87bc4195700d9c1e638f3f88e7eb00 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/da504f014e87bc4195700d9c1e638f3f88e7eb00/account_move_line.py
def _balance(self, cr, uid, ids, prop, unknow_none, unknow_dict): res={} for id in ids: cr.execute('SELECT date,account_id FROM account_move_line WHERE id=%s', (id,)) dt, acc = cr.fetchone() cr.execute('SELECT SUM(debit-credit) FROM account_move_line WHERE account_id=%s AND (date<%s OR (date=%s AND id<=%s))', (acc,dt...
def _balance(self, cr, uid, ids, name, arg, context=None): if context is None: context = {} c = context.copy() c['initital_bal'] = True sql = [ """select l2.id, sum(l1.debit-l1.credit) from account_move_line l1, account_move_line l2""", """where l2.account_id=l1.account_id""", """and""", """l1.id<=l2.id""", """and"""...
def on_create_write(self, cr, uid, id, context={}): ml = self.browse(cr, uid, id, context) return map(lambda x: x.id, ml.move_id.line_id)
da504f014e87bc4195700d9c1e638f3f88e7eb00 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/da504f014e87bc4195700d9c1e638f3f88e7eb00/account_move_line.py
'order_partner_id': fields.related('order_id', 'partner_id', type='many2one', relation='res.partner', string='Customer'),
'order_partner_id': fields.related('order_id', 'partner_id', type='many2one', relation='res.partner', store=True, string='Customer'),
def _number_packages(self, cr, uid, ids, field_name, arg, context=None): if context is None: context = {} res = {} for line in self.browse(cr, uid, ids, context=context): try: res[line.id] = int((line.product_uom_qty+line.product_packaging.qty-0.0001) / line.product_packaging.qty) except: res[line.id] = 1 return res
ca709f6ce807b488b0b1def5505433b4333651c4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/ca709f6ce807b488b0b1def5505433b4333651c4/sale.py
'context': "{'visible_id':%s, 'journal_id': %d, 'search_default_journal_id':%d, 'search_default_period_id':%d}" % (journal_id, journal_id, journal_id, period_id),
'context': "{'visible_id':%s, 'search_default_journal_id':%d, 'search_default_period_id':%d}" % (journal_id, journal_id, period_id),
def action_open_window(self, cr, uid, ids, context=None): """ This function Open action move line window on given period and Journal/Payment Mode @param cr: the current row, from the database cursor, @param uid: the current user’s ID for security checks, @param ids: account move journal’s ID or list of IDs @return: di...
c3981b6983b3a120869a163d2278b003e377b030 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/c3981b6983b3a120869a163d2278b003e377b030/account_move_journal.py
"""
"""
def makeInvoices(self, cr, uid, ids, context=None): """ To get Purchase Order line and create Invoice @param self: The object pointer. @param cr: A database cursor @param uid: ID of the user currently logged in @param context: A standard dictionary @return : retrun view of Invoice """ if context is None: context={} ...
3f6d20200662753d065a64276225bd8b208f71db /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/3f6d20200662753d065a64276225bd8b208f71db/purchase_line_invoice.py
@param context: A standard dictionary
@param context: A standard dictionary
def makeInvoices(self, cr, uid, ids, context=None): """ To get Purchase Order line and create Invoice @param self: The object pointer. @param cr: A database cursor @param uid: ID of the user currently logged in @param context: A standard dictionary @return : retrun view of Invoice """ if context is None: context={} ...
3f6d20200662753d065a64276225bd8b208f71db /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/3f6d20200662753d065a64276225bd8b208f71db/purchase_line_invoice.py
def makeInvoices(self, cr, uid, ids, context=None): """ To get Purchase Order line and create Invoice @param self: The object pointer. @param cr: A database cursor @param uid: ID of the user currently logged in @param context: A standard dictionary @return : retrun view of Invoice """ if context is None: context={} ...
3f6d20200662753d065a64276225bd8b208f71db /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/3f6d20200662753d065a64276225bd8b208f71db/purchase_line_invoice.py
def makeInvoices(self, cr, uid, ids, context=None): """ To get Purchase Order line and create Invoice @param self: The object pointer. @param cr: A database cursor @param uid: ID of the user currently logged in @param context: A standard dictionary @return : retrun view of Invoice """ if context is None: context={} ...
3f6d20200662753d065a64276225bd8b208f71db /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/3f6d20200662753d065a64276225bd8b208f71db/purchase_line_invoice.py
account_jrnl_obj=self.pool.get('account.journal')
def makeInvoices(self, cr, uid, ids, context=None): """ To get Purchase Order line and create Invoice @param self: The object pointer. @param cr: A database cursor @param uid: ID of the user currently logged in @param context: A standard dictionary @return : retrun view of Invoice """ if context is None: context={} ...
3f6d20200662753d065a64276225bd8b208f71db /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/3f6d20200662753d065a64276225bd8b208f71db/purchase_line_invoice.py
def multiple_order_invoice_name(orders): name = "PO"; for order in orders: name += "-%d" % order.id return name
3f6d20200662753d065a64276225bd8b208f71db /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/3f6d20200662753d065a64276225bd8b208f71db/purchase_line_invoice.py
for order in orders:
for order in orders:
def multiple_order_invoice_reference(partner, orders): reference = "P%dPO" % partner.id for order in orders: reference += "-%d" % order.id return reference
3f6d20200662753d065a64276225bd8b208f71db /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/3f6d20200662753d065a64276225bd8b208f71db/purchase_line_invoice.py
def multiple_order_invoice_reference(partner, orders): reference = "P%dPO" % partner.id for order in orders: reference += "-%d" % order.id return reference
3f6d20200662753d065a64276225bd8b208f71db /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/3f6d20200662753d065a64276225bd8b208f71db/purchase_line_invoice.py
def multiple_order_invoice_notes(orders): notes = "" for order in orders: notes += "%s \n" % order.notes return notes
3f6d20200662753d065a64276225bd8b208f71db /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/3f6d20200662753d065a64276225bd8b208f71db/purchase_line_invoice.py
journal_id_get = account_jrnl_obj.search(cr,uid,[('type','=','purchase')],context=None)[0]
def make_invoice_by_partner(partner, orders, lines_ids): """ create a new invoice for one supplier @param partner : The object partner @param orders : The set of orders to add in the invoice @param lines : The list of line's id """ a = partner.property_account_payable.id if partner and partner.property_payment_term.id...
3f6d20200662753d065a64276225bd8b208f71db /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/3f6d20200662753d065a64276225bd8b208f71db/purchase_line_invoice.py
'name': multiple_order_invoice_name(orders), 'origin': multiple_order_invoice_name(orders),
'name': multiple_order_invoice_name(orders), 'origin': multiple_order_invoice_name(orders),
def make_invoice_by_partner(partner, orders, lines_ids): """ create a new invoice for one supplier @param partner : The object partner @param orders : The set of orders to add in the invoice @param lines : The list of line's id """ a = partner.property_account_payable.id if partner and partner.property_payment_term.id...
3f6d20200662753d065a64276225bd8b208f71db /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/3f6d20200662753d065a64276225bd8b208f71db/purchase_line_invoice.py
'currency_id' : orders[0].pricelist_id.currency_id.id,
'currency_id' : orders[0].pricelist_id.currency_id.id,
def make_invoice_by_partner(partner, orders, lines_ids): """ create a new invoice for one supplier @param partner : The object partner @param orders : The set of orders to add in the invoice @param lines : The list of line's id """ a = partner.property_account_payable.id if partner and partner.property_payment_term.id...
3f6d20200662753d065a64276225bd8b208f71db /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/3f6d20200662753d065a64276225bd8b208f71db/purchase_line_invoice.py
'note': line.notes,
'note': line.notes,
def make_invoice_by_partner(partner, orders, lines_ids): """ create a new invoice for one supplier @param partner : The object partner @param orders : The set of orders to add in the invoice @param lines : The list of line's id """ a = partner.property_account_payable.id if partner and partner.property_payment_term.id...
3f6d20200662753d065a64276225bd8b208f71db /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/3f6d20200662753d065a64276225bd8b208f71db/purchase_line_invoice.py
def make_invoice_by_partner(partner, orders, lines_ids): """ create a new invoice for one supplier @param partner : The object partner @param orders : The set of orders to add in the invoice @param lines : The list of line's id """ a = partner.property_account_payable.id if partner and partner.property_payment_term.id...
3f6d20200662753d065a64276225bd8b208f71db /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/3f6d20200662753d065a64276225bd8b208f71db/purchase_line_invoice.py
'date':inv.date, 'ref':inv.reference,
'date': inv.date, 'ref': ref,
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
5ab64aae60c11ab9fdfdb4138c0554f2fdcc7a93 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/5ab64aae60c11ab9fdfdb4138c0554f2fdcc7a93/account_voucher.py
_description = 'Production'
_description = 'Manufacturing Order'
def get(self, cr, obj, ids, name, user=None, offset=0, context=None, values=None): if not context: context = {} res = {} move_obj = obj.pool.get('stock.move') for prod in obj.browse(cr, user, ids, context=context): cr.execute("SELECT id from stock_move where production_id=%s" % (prod.id)) m_ids = map(lambda x: x[0], cr...
3ee0f15d25199ce63d64e21946fdc6c542d8acbf /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/3ee0f15d25199ce63d64e21946fdc6c542d8acbf/mrp.py
'sale_id': picking.sale_id.id
'sale_id':' sale_id' in picking._columns.keys() and picking.sale_id.id or False
def create_chained_picking(self, cr, uid, moves, context=None): new_moves = [] res_obj = self.pool.get('res.company') picking_obj = self.pool.get('stock.picking') move_obj = self.pool.get('stock.move') if context is None: context = {} for picking, todo in self._chain_compute(cr, uid, moves, context=context).items(): pt...
cd13ee8fe7f507178ca7969c8f07a89efd9fb59d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/cd13ee8fe7f507178ca7969c8f07a89efd9fb59d/stock.py
'product_uom': lambda self,cr,uid,c: self.pool.get('product.uom').search(cr, uid, [('name', '=', 'Day')], context=c)[0]
'product_uom': lambda self,cr,uid,c: self.pool.get('product.uom').search(cr, uid, [('name', '=', 'day')], context=c)[0]
def _get_default_uom_id(self, cr, uid): model_data_obj = self.pool.get('ir.model.data') model_data_id = model_data_obj._get_id(cr, uid, 'product', 'uom_hour') return model_data_obj.read(cr, uid, [model_data_id], ['res_id'])[0]['res_id']
b079e0fb2b5225f2f3a169cbf6c01f9b53577d03 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/b079e0fb2b5225f2f3a169cbf6c01f9b53577d03/project_long_term.py
def change_object(self, cr, uid, ids, copy_object, state, context={}): if state == 'object_copy': model_pool = self.pool.get('ir.model') model = copy_object.split(',')[0] mid = model_pool.search(cr, uid, [('model','=',model)]) return { 'value':{'srcmodel_id':mid[0]}, 'context':context } else: return {}
53ef884ff2a81597b75be063ac2665d559a51fcd /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/53ef884ff2a81597b75be063ac2665d559a51fcd/ir_actions.py
'object':obj
'object':obj, 'obj': obj,
def run(self, cr, uid, ids, context={}): logger = netsvc.Logger() print "::ODS",ids for action in self.browse(cr, uid, ids, context): obj_pool = self.pool.get(action.model_id.model) obj = obj_pool.browse(cr, uid, context['active_id'], context=context) cxt = { 'context':context, 'object': obj, 'time':time, 'cr': cr, 'po...
53ef884ff2a81597b75be063ac2665d559a51fcd /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/53ef884ff2a81597b75be063ac2665d559a51fcd/ir_actions.py
res['arch'] = res['arch'].replace('</search>',search_extended)
res['arch'] = unicode(res['arch'], 'utf8').replace('</search>', search_extended)
def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False, submenu=False): res = super(project_task,self).fields_view_get(cr, uid, view_id, view_type, context, toolbar=toolbar, submenu=submenu) search_extended = False timebox_obj = self.pool.get('project.gtd.timebox') access_pool = ...
8e808fa651c4aa8b64bf99205f62463b26e9dfd5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/8e808fa651c4aa8b64bf99205f62463b26e9dfd5/project_gtd.py
function_id = self.pool.get('res.partner.function').search(cr,uid,[('name','=',lead.function_name)])
def _create_partner(self, cr, uid, ids, context=None): """ This function Creates partner based on action. @param self: The object pointer @param cr: the current row, from the database cursor, @param uid: the current user’s ID for security checks, @param ids: List of Lead to Partner's IDs @param context: A standard dict...
72336e04adb5d4b0f85c6b818c7655fce704bcf5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/72336e04adb5d4b0f85c6b818c7655fce704bcf5/crm_lead_to_partner.py
'function': function_id and function_id[0] or False,
'function': lead.function_name,
def _create_partner(self, cr, uid, ids, context=None): """ This function Creates partner based on action. @param self: The object pointer @param cr: the current row, from the database cursor, @param uid: the current user’s ID for security checks, @param ids: List of Lead to Partner's IDs @param context: A standard dict...
72336e04adb5d4b0f85c6b818c7655fce704bcf5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/72336e04adb5d4b0f85c6b818c7655fce704bcf5/crm_lead_to_partner.py
if check and not context.get('no_store_function'):
if check and ((not context.get('no_store_function')) or journal.entry_posted):
def create(self, cr, uid, vals, context=None, check=True): if not context: context={} account_obj = self.pool.get('account.account') tax_obj=self.pool.get('account.tax') if ('account_id' in vals) and not account_obj.read(cr, uid, vals['account_id'], ['active'])['active']: raise osv.except_osv(_('Bad account!'), _('You ...
ee48c965e50a90706d37f3ee951dffcaa7e7cb73 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/ee48c965e50a90706d37f3ee951dffcaa7e7cb73/account_move_line.py
_logger.debug("Exception while interpreting the result of a logs message", exc_info=1)
def get_logs(self, cr, uid, ids, cron_mode=True, context={}): """ Send a message to OpenERP's publisher warranty server to check the validity of the contracts, get notifications, etc... @param cron_mode: If true, catch all exceptions (appropriate for usage in a cron). @type cron_mode: boolean """ try: try: result = ge...
402236d40dae999660007dec4e4954d36f0426f7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/402236d40dae999660007dec4e4954d36f0426f7/publisher_warranty.py
return False
return False
def get_logs(self, cr, uid, ids, cron_mode=True, context={}): """ Send a message to OpenERP's publisher warranty server to check the validity of the contracts, get notifications, etc... @param cron_mode: If true, catch all exceptions (appropriate for usage in a cron). @type cron_mode: boolean """ try: try: result = ge...
402236d40dae999660007dec4e4954d36f0426f7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/402236d40dae999660007dec4e4954d36f0426f7/publisher_warranty.py
dedicated_salesman = part.user_id and part.user_id.id or False
dedicated_salesman = part.user_id and part.user_id.id or uid
def onchange_partner_id(self, cr, uid, ids, part): if not part: return {'value': {'partner_invoice_id': False, 'partner_shipping_id': False, 'partner_order_id': False, 'payment_term': False, 'fiscal_position': False}}
47c3b5519ac57520641f0cb9501d0abb3ddc4326 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/47c3b5519ac57520641f0cb9501d0abb3ddc4326/sale.py
'holiday_status_id': fields.many2one("hr.holidays.status", " Leave Type", required=True,readonly=True, states={'draft':[('readonly',False)]}),
'holiday_status_id': fields.many2one("hr.holidays.status", "Leave Type", required=True,readonly=True, states={'draft':[('readonly',False)]}),
def _employee_get(obj, cr, uid, context=None): if context is None: context = {} ids = obj.pool.get('hr.employee').search(cr, uid, [('user_id', '=', uid)], context=context) if ids: return ids[0] return False
a4a0a99f0c154188c5c795e3f9147cc46bb9a84d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/a4a0a99f0c154188c5c795e3f9147cc46bb9a84d/hr_holidays.py
def check_holidays(self, cr, uid, ids): holi_status_obj = self.pool.get('hr.holidays.status') emp_obj = self.pool.get('hr.employee') meeting_obj = self.pool.get('crm.meeting') for record in self.browse(cr, uid, ids): if not record.number_of_days: raise osv.except_osv(_('Warning!'), _('Wrong leave definition.')) if reco...
a4a0a99f0c154188c5c795e3f9147cc46bb9a84d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/a4a0a99f0c154188c5c795e3f9147cc46bb9a84d/hr_holidays.py
def split_to_ids(self, ids_as_str): """ Identifies email IDs separated by separators and returns a list TODO: Doc this "a@b.com,c@bcom; d@b.com;e@b.com->['a@b.com',...]" """ email_sep_by_commas = ids_as_str \ .replace('; ', ',') \ .replace(';', ',') \ .replace(', ', ',') return email_sep_by_commas.split(',') def get_i...
def split_to_ids(self, ids_as_str): """ Identifies email IDs separated by separators and returns a list TODO: Doc this "a@b.com,c@bcom; d@b.com;e@b.com->['a@b.com',...]" """ email_sep_by_commas = ids_as_str \ .replace('; ', ',') \ .replace(';', ',') \ .replace(', ', ',') return email_sep_by_commas.split(',')
a07a09d5d15277aa90af6898f6ae7426472934eb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/a07a09d5d15277aa90af6898f6ae7426472934eb/email_template_account.py
addresses_l = self.get_ids_from_dict(addresses)
addresses_l = extract_emails_from_dict(addresses)
def send_mail(self, cr, uid, ids, addresses, subject='', body=None, payload=None, message_id=None, context=None): #TODO: Replace all this with a single email object if body is None: body = {} if payload is None: payload = {} if context is None: context = {} logger = netsvc.Logger() for id in ids: core_obj = self.browse...
a07a09d5d15277aa90af6898f6ae7426472934eb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/a07a09d5d15277aa90af6898f6ae7426472934eb/email_template_account.py