rem stringlengths 0 322k | add stringlengths 0 2.05M | context stringlengths 8 228k |
|---|---|---|
document = pool.get('dm.offer.document').browse(cr,uid,document_id) res = [] if document.step_id: offer=document.step_id.offer_id.id if offer: camp_ids=pool.get('dm.campaign').search(cr,uid,[('offer_id','=',offer)]) if camp_ids: segment_ids=seg_obj.search(cr,uid,[('campaign_id','in',camp_ids)]) res = [(seg.id, seg.name... | seg_ids = seg_obj.search(cr, uid, []) seg_codes = seg_obj.read(cr, uid, seg_ids, ['code']) return [(item['id'], item['code']) for item in seg_codes] | def get_campaings(self,cr,uid,context): document_id = self.dm_wiz_data['id'] pool = pooler.get_pool(cr.dbname) seg_obj = pool.get('dm.campaign.proposition.segment') document = pool.get('dm.offer.document').browse(cr,uid,document_id) res = [] if document.step_id: offer=document.step_id.offer_id.id if offer: camp_ids=poo... |
context['plugin_list'] = map(lambda x:x[2:-2],com.findall(keystr)) | context['plugin_list'] = map(lambda x:x[2:-2].strip(),com.findall(keystr)) | def merge(match): exp = str(match.group()[2:-2]).strip() if exp not in context : dm_obj = pooler.get_pool(cr.dbname).get('dm.offer.document') obj = dm_obj.browse(cr, uid, context.get('document_id')) args = context.copy() if 'plugin_list' in context : args['plugin_list'] = context['plugin_list'] else : args['plugin_list... |
return report_data | return [report_data] | def generate_internal_reports(cr, uid, report_type, document_data, camp_doc, context): # {{{ "Generate documents from the internal editor" pool = pooler.get_pool(cr.dbname) attachment_obj = pool.get('ir.attachment') document_data = pool.get('dm.offer.document').browse(cr,uid,document_data) if report_type == 'html2html... |
return plugin_value | def _generate_value(cr, uid, plugin_obj, localcontext, **args): # {{{ pool = pooler.get_pool(cr.dbname) localcontext['plugin_obj'] = plugin_obj plugin_args = {} plugin_value = '' if plugin_obj.type in ('fields','image'): res = pool.get('ir.model').browse(cr, uid, plugin_obj.model_id.id) args['model_name'] = res.model ... | |
ids = line_pool.search(cr, uid, [('category_id','=',id), ('to','>=',value),('from','<=',value)]) | ids = line_pool.search(cr, uid, [('category_id','=',id), ('to_val','>=',value),('from_val','<=',value)]) | def execute_function(self, cr, uid, id, value, context): line_pool = self.pool.get('hr.allounce.deduction.categoty.line') res = 0 ids = line_pool.search(cr, uid, [('category_id','=',id), ('to','>=',value),('from','<=',value)]) if not ids: ids = line_pool.search(cr, uid, [('category_id','=',id), ('from','<=',value)]) if... |
'from': fields.float('From', digits=(16, int(config['price_accuracy']))), 'to': fields.float('To', digits=(16, int(config['price_accuracy']))), | 'from_val': fields.float('From', digits=(16, int(config['price_accuracy']))), 'to_val': fields.float('To', digits=(16, int(config['price_accuracy']))), | def execute_function(self, cr, uid, id, value, context): line_pool = self.pool.get('hr.allounce.deduction.categoty.line') res = 0 ids = line_pool.search(cr, uid, [('category_id','=',id), ('to','>=',value),('from','<=',value)]) if not ids: ids = line_pool.search(cr, uid, [('category_id','=',id), ('from','<=',value)]) if... |
if line.amount_type == 'per': amount= (line.slip_id.basic * line.amount) elif line.amount_type == 'fix': amount = line.amount | def verify_sheet(self, cr, uid, ids, context={}): move_pool = self.pool.get('account.move') movel_pool = self.pool.get('account.move.line') exp_pool = self.pool.get('hr.expense.expense') for slip in self.browse(cr,uid,ids): total_deduct = 0.0 line_ids = [] partner = False partner_id = False if not slip.employee_id.... | |
company_contrib = 0 if line.company_contrib > line.total: company_contrib = line.total else: company_contrib = line.company_contrib | company_contrib = line.company_contrib | def verify_sheet(self, cr, uid, ids, context={}): move_pool = self.pool.get('account.move') movel_pool = self.pool.get('account.move.line') exp_pool = self.pool.get('hr.expense.expense') for slip in self.browse(cr,uid,ids): total_deduct = 0.0 line_ids = [] partner = False partner_id = False if not slip.employee_id.... |
if line.category_id.contribute and line.category_id.include_in_salary and line.category_id.amount_type == 'per': | if line.category_id.contribute and line.category_id.amount_type == 'per': | def verify_sheet(self, cr, uid, ids, context={}): move_pool = self.pool.get('account.move') movel_pool = self.pool.get('account.move.line') exp_pool = self.pool.get('hr.expense.expense') for slip in self.browse(cr,uid,ids): total_deduct = 0.0 line_ids = [] partner = False partner_id = False if not slip.employee_id.... |
elif line.category_id.contribute and line.category_id.include_in_salary and line.category_id.amount_type == 'fix': | elif line.category_id.contribute and line.category_id.amount_type == 'fix': | def verify_sheet(self, cr, uid, ids, context={}): move_pool = self.pool.get('account.move') movel_pool = self.pool.get('account.move.line') exp_pool = self.pool.get('hr.expense.expense') for slip in self.browse(cr,uid,ids): total_deduct = 0.0 line_ids = [] partner = False partner_id = False if not slip.employee_id.... |
if line.category_id.contribute and line.category_id.include_in_salary and line.category_id.amount_type == 'per': | if line.category_id.contribute and line.category_id.amount_type == 'per': | def compute_sheet(self, cr, uid, ids, context={}): emp_pool = self.pool.get('hr.employee') slip_pool = self.pool.get('hr.payslip') func_pool = self.pool.get('hr.employee.grade') slip_line_pool = self.pool.get('hr.payslip.line') holiday_pool = self.pool.get('hr.holidays') vals = self.read(cr, uid, ids)[0] emp_ids = ids... |
elif line.category_id.contribute and line.category_id.include_in_salary and line.category_id.amount_type == 'fix': | elif line.category_id.contribute and line.category_id.amount_type == 'fix': | def compute_sheet(self, cr, uid, ids, context={}): emp_pool = self.pool.get('hr.employee') slip_pool = self.pool.get('hr.payslip') func_pool = self.pool.get('hr.employee.grade') slip_line_pool = self.pool.get('hr.payslip.line') holiday_pool = self.pool.get('hr.holidays') vals = self.read(cr, uid, ids)[0] emp_ids = ids... |
elif line.category_id.contribute and line.category_id.include_in_salary and line.category_id.amount_type == 'func': | elif line.category_id.contribute and line.category_id.amount_type == 'func': | def compute_sheet(self, cr, uid, ids, context={}): emp_pool = self.pool.get('hr.employee') slip_pool = self.pool.get('hr.payslip') func_pool = self.pool.get('hr.employee.grade') slip_line_pool = self.pool.get('hr.payslip.line') holiday_pool = self.pool.get('hr.holidays') vals = self.read(cr, uid, ids)[0] emp_ids = ids... |
'price': item.list_price, | 'price': price, | def get_step_products(self, cr, uid, ids, *args): prop_obj = self.browse(cr, uid, ids)[0] offer_id = prop_obj.camp_id.offer_id.id step_ids = self.pool.get('dm.offer.step').search(cr, uid, [('offer_id', '=', offer_id)]) step_obj = self.pool.get('dm.offer.step').browse(cr, uid, step_ids) if prop_obj.item_ids: for p in pr... |
case_data = case_data[0] | if isinstance(case_data, list): case_data = case_data[0] | def write(self, cr, uid, ids, vals, context={}): res = super(crm_case, self).write(cr, uid, ids, vals, context={}) cr.commit() case_data = self.browse(cr, uid, ids[0], context) case_data = case_data[0] desc = '''Hello ,\n\n The case is updated for the project: %s\n\nModified Datas are:\n''' %(str(case_data.project_id.... |
self.pool.get('account.move.line').reconcile_partial(cr, uid, mline_ids, 'manual', context={}) | if mline_ids: self.pool.get('account.move.line').reconcile_partial(cr, uid, mline_ids, 'manual', context={}) | def action_move_line_create(self, cr, uid, ids, *args): for inv in self.browse(cr, uid, ids): if inv.move_id: continue company_currency = inv.company_id.currency_id.id |
print 'Check_buy' | def check_buy(self, cr, uid, ids, context=None): print 'Check_buy' for procurement in self.browse(cr, uid, ids): for line in procurement.product_id.flow_pull_ids: print line.location_src_id.name, line.location_id.name, line.type_proc if line.location_id==procurement.location_id: return line.type_proc=='buy' print 'Chec... | |
print 'Check_buy parent' | def check_buy(self, cr, uid, ids, context=None): print 'Check_buy' for procurement in self.browse(cr, uid, ids): for line in procurement.product_id.flow_pull_ids: print line.location_src_id.name, line.location_id.name, line.type_proc if line.location_id==procurement.location_id: return line.type_proc=='buy' print 'Chec... | |
print 'Check move' | def check_move(self, cr, uid, ids, context=None): print 'Check move' for procurement in self.browse(cr, uid, ids): for line in procurement.product_id.flow_pull_ids: if line.location_id==procurement.location_id: if not line.location_src_id: self.write(cr, uid, procurement.id, {'message': _('No source location defined to... | |
print 'Check move parent' | def check_move(self, cr, uid, ids, context=None): print 'Check move' for procurement in self.browse(cr, uid, ids): for line in procurement.product_id.flow_pull_ids: if line.location_id==procurement.location_id: if not line.location_src_id: self.write(cr, uid, procurement.id, {'message': _('No source location defined to... | |
period_id = self.pool.get('account.period').search(cr,uid,[('date_start','<=',slip.date),('date_stop','>=',slip.date)])[0] | fiscal_year_ids = self.pool.get('account.fiscalyear').search(cr, uid, []) if not fiscal_year_ids: raise osv.except_osv(_('Warning !'), _('Please define fiscal year for perticular contract')) fiscal_year_objs = self.pool.get('account.fiscalyear').read(cr, uid, fiscal_year_ids, ['date_start','date_stop']) year_exist = Fa... | def process_sheet(self, cr, uid, ids, context={}): move_pool = self.pool.get('account.move') movel_pool = self.pool.get('account.move.line') invoice_pool = self.pool.get('account.invoice') for slip in self.browse(cr,uid,ids): line_ids = [] partner = False partner_id = False exp_ids = [] partner = slip.employee_id.add... |
period_id = self.pool.get('account.period').search(cr,uid,[('date_start','<=',slip.date),('date_stop','>=',slip.date)])[0] | fiscal_year_ids = self.pool.get('account.fiscalyear').search(cr, uid, []) if not fiscal_year_ids: raise osv.except_osv(_('Warning !'), _('Please define fiscal year for perticular contract')) fiscal_year_objs = self.pool.get('account.fiscalyear').read(cr, uid, fiscal_year_ids, ['date_start','date_stop']) year_exist = Fa... | def verify_sheet(self, cr, uid, ids, context={}): move_pool = self.pool.get('account.move') movel_pool = self.pool.get('account.move.line') exp_pool = self.pool.get('hr.expense.expense') for slip in self.browse(cr,uid,ids): total_deduct = 0.0 line_ids = [] partner = False partner_id = False if not slip.employee_id.... |
partner_category_obj = pooler.get_pool(self.cr.dbname).get('res.partner.category') partner_obj = pooler.get_pool(self.cr.dbname).get('res.partner') if data['form']['category'] == 'Customer' or data['form']['category'] == 'Supplier' : cat_id=partner_category_obj.search(self.cr,self.uid,[('name','=',data['form']['categor... | def set_context(self, objects, data, ids, report_type = None): partner_category_obj = pooler.get_pool(self.cr.dbname).get('res.partner.category') partner_obj = pooler.get_pool(self.cr.dbname).get('res.partner') if data['form']['category'] == 'Customer' or data['form']['category'] == 'Supplier' : cat_id=partner_category... | |
"AND partner_id in (select id from res_partner)" \ | def set_context(self, objects, data, ids, report_type = None): partner_category_obj = pooler.get_pool(self.cr.dbname).get('res.partner.category') partner_obj = pooler.get_pool(self.cr.dbname).get('res.partner') if data['form']['category'] == 'Customer' or data['form']['category'] == 'Supplier' : cat_id=partner_category... | |
sect_dur = duration // sim.section_qty | sect_dur = sim.section_qty and sim.section_qty !=0 and duration // sim.section_qty or duration | def simulation_start(self, cr, uid, ids, *args): """ Starts the simulation """ sim = self.browse(cr, uid, ids)[0] now = datetime.datetime.now() self.write(cr, uid, ids, {'date_start':now.strftime('%Y-%m-%d %H:%M:%S')}) kwargs = {(sim.duration_unit):sim.duration} duration = datetime.timedelta(**kwargs) date_stop = now ... |
recent_move_ids = self.pool.get('stock.move').search(cr, uid, [('date', '>', shop.last_inventory_export_date), ('product_id', 'in', product_ids)]) | recent_move_ids = self.pool.get('stock.move').search(cr, uid, [('date_planned', '>', shop.last_inventory_export_date), ('product_id', 'in', product_ids), ('state', '!=', 'draft'), ('state', '!=', 'cancel')]) | def export_inventory(self, cr, uid, ids, ctx=None): if ctx is None: ctx = {} for shop in self.browse(cr, uid, ids): ctx['shop_id'] = shop.id ctx['conn_obj'] = self.external_connection(cr, uid, shop.referential_id) product_ids = [product.id for product in shop.exportable_product_ids] if shop.last_inventory_export_date: ... |
product_ids = [move.product_id.id for move in self.pool.get('stock.move').browse(cr, uid, recent_move_ids)] | product_ids = [move.product_id.id for move in self.pool.get('stock.move').browse(cr, uid, recent_move_ids) if move.product_id.state != 'obsolete'] | def export_inventory(self, cr, uid, ids, ctx=None): if ctx is None: ctx = {} for shop in self.browse(cr, uid, ids): ctx['shop_id'] = shop.id ctx['conn_obj'] = self.external_connection(cr, uid, shop.referential_id) product_ids = [product.id for product in shop.exportable_product_ids] if shop.last_inventory_export_date: ... |
"------------", ".. figure:: %s_module.png" %module_name , | "------------------", "", ".. figure:: %s_module.png" % (module_name, ), | def _write_relationship_graph(self, module_name=False): sl = ["", "Relationship Graph", "------------", ".. figure:: %s_module.png" %module_name , " :scale: 50", " :align: center", ""] sl.append("") return '\n'.join(sl) |
pe.text = cnd.text or cnd.tail | pe.text += cnd.text or cnd.tail | def create_oo_report(self, cr, uid, ids, data, report_xml, context=None): if not context: context={} context = context.copy() context['parents'] = sxw_parents sxw_io = StringIO(report_xml.report_sxw_content) sxw_z = ZipFile(sxw_io, mode='r') rml = sxw_z.read('content.xml') meta = sxw_z.read('meta.xml') mime_type = sxw_... |
pe.text = text | pe.text += text | def create_oo_report(self, cr, uid, ids, data, report_xml, context=None): if not context: context={} context = context.copy() context['parents'] = sxw_parents sxw_io = StringIO(report_xml.report_sxw_content) sxw_z = ZipFile(sxw_io, mode='r') rml = sxw_z.read('content.xml') meta = sxw_z.read('meta.xml') mime_type = sxw_... |
print "Stattttttttttt" | def create_oo_report(self, cr, uid, ids, data, report_xml, context=None): if not context: context={} context = context.copy() context['parents'] = sxw_parents sxw_io = StringIO(report_xml.report_sxw_content) sxw_z = ZipFile(sxw_io, mode='r') rml = sxw_z.read('content.xml') meta = sxw_z.read('meta.xml') mime_type = sxw_... | |
print time.time() - start_time | print "Time taken to convert",time.time() - start_time | def create_oo_report(self, cr, uid, ids, data, report_xml, context=None): if not context: context={} context = context.copy() context['parents'] = sxw_parents sxw_io = StringIO(report_xml.report_sxw_content) sxw_z = ZipFile(sxw_io, mode='r') rml = sxw_z.read('content.xml') meta = sxw_z.read('meta.xml') mime_type = sxw_... |
ids = acc_type_obj.search(cr, uid, ['path'],context) | ids = acc_type_obj.search(cr, uid, [('path', '!=', False)], context) | def _folders_get(self, cr, uid, context={}): acc_type_obj = self.pool.get('config.bob.import') ids = acc_type_obj.search(cr, uid, ['path'],context) path=[] res=[] seq=0 if ids: path=acc_type_obj.read(cr, uid, [ids[len(ids)-1]], ['path'], context) path_bob=path[-1]['path'] list_folders=os.listdir(path_bob) |
sids = queue.search(cr, uid, [('state','not in',['send','sending'])], order="priority", limit=30) | sids = queue.search(cr, uid, [('state','not in',['send','sending']), ('server_id','=',False)], order="priority", limit=30) | def _check_queue(self, cr, uid, ids=False, context={}): queue = self.pool.get('email.smtpclient.queue') sids = [] if not ids: sids = queue.search(cr, uid, [('state','not in',['send','sending'])], order="priority", limit=30) else: sids = queue.search(cr, uid, [('state','not in',['send','sending']), ('server_id','in',ids... |
super(stock_move, self).create(cr, user, vals, context=context) | move_id = super(stock_move, self).create(cr, user, vals, context=context) | def create(self, cr, user, vals, context=None): super(stock_move, self).create(cr, user, vals, context=context) product_id = vals.get('product_id') if product_id: self.pool.get('product.product').write(cr, user, [product_id], { 'stock_has_moved': True, }) |
super(stock_move, self).write(cr, user, ids, vals, context=context) | res = super(stock_move, self).write(cr, user, ids, vals, context=context) | def write(self, cr, user, ids, vals, context=None): super(stock_move, self).write(cr, user, ids, vals, context=context) |
from olilib.openerp import terp import pydb; pydb.debugger(['set listsize 40']) print | def __init__(self, cr, uid, ids, data): logger = netsvc.Logger() try: import pydot except Exception, e: logger.notifyChannel('workflow', netsvc.LOG_WARNING, 'Import Error for pydot, you will not be able \ to render workflows\n' 'Consider Installing PyDot or dependencies: \ http://dkbza.org/pydot.html') raise e offer_id... | |
cate_id = vals.get('category_id', False) hr_id = super(hr_interview, self).create(cr, uid, vals, context=context) if not cate_id: cate_id = self.read(cr, uid, [hr_id], ['category_id'])[0]['category_id'][0] | def create(self, cr, uid, vals, context=None): cate_id = vals.get('category_id', False) hr_id = super(hr_interview, self).create(cr, uid, vals, context=context) if not cate_id: cate_id = self.read(cr, uid, [hr_id], ['category_id'])[0]['category_id'][0] | |
que_ids= que_obj.search(cr,uid,[('category_id','=',int(cate_id))]) | tech_skill_obj = self.pool.get("technical.skill") hr_id = super(hr_interview, self).create(cr, uid, vals, context=context) if vals.get('category_id', False): cate_id = vals.get('category_id') que_ids = que_obj.search(cr, uid, [('category_id','=',int(cate_id))], context=context) for rec in que_obj.browse(cr, uid, que_id... | def create(self, cr, uid, vals, context=None): cate_id = vals.get('category_id', False) hr_id = super(hr_interview, self).create(cr, uid, vals, context=context) if not cate_id: cate_id = self.read(cr, uid, [hr_id], ['category_id'])[0]['category_id'][0] |
self._log(cr,uid, [hr_id], 'draft') for rec in que_obj.browse(cr, uid, que_ids): tech_skill_obj.create(cr,uid,{'name':rec.name,'tot_marks':rec.tot_marks,'candidate_id':hr_id}) return hr_id def write(self, cr, uid, ids, vals, context=None): | def create(self, cr, uid, vals, context=None): cate_id = vals.get('category_id', False) hr_id = super(hr_interview, self).create(cr, uid, vals, context=context) if not cate_id: cate_id = self.read(cr, uid, [hr_id], ['category_id'])[0]['category_id'][0] | |
que_obj = self.pool.get("category.question") que_ids= que_obj.search(cr,uid,[('category_id','=',int(cate_id))]) tech_skill_obj=self.pool.get("technical.skill") tech_skill_ids=tech_skill_obj.search(cr,uid,[('candidate_id','=',ids[0])]) | que_ids = que_obj.search(cr, uid, [('category_id', '=', int(cate_id))]) tech_skill_ids=tech_skill_obj.search(cr, uid, [('candidate_id','=',ids[0])]) | def write(self, cr, uid, ids, vals, context=None): if 'category_id' in vals : cate_id = vals['category_id'] que_obj = self.pool.get("category.question") que_ids= que_obj.search(cr,uid,[('category_id','=',int(cate_id))]) tech_skill_obj=self.pool.get("technical.skill") tech_skill_ids=tech_skill_obj.search(cr,uid,[('candi... |
class purchase_order(osv.osv): _name = 'purchase.order' _inherit = 'purchase.order' _columns = { 'dm_campaign_purchase_line_ids': fields.many2many('dm.campaign.purchase_line', 'dm_campaign_purchase_line_purchase_order_rel', 'purchase_order_id', 'dm_campaign_purchase_line_id', 'Purchase Line'), 'dm_campaign_group_purch... | def get_campaign_purchase_line_ids(self , cr, uid, ids, context): result = {} | |
ids, pricelist_id, item.product_id.id, qty=1, | [], pricelist_id, item.product_id.id, qty=1, | def _create_sale_order(self, cr, uid, order_id): order = self.pool.get('dm.order').browse(cr, uid, order_id) partner_id ='' if not order.partner_id and not order.address_id : order_field_value = dict(map(lambda o,pa : (pa,getattr(order,o) and \ getattr(order,o) or False), order_field,partner_address_fields)) order_fiel... |
'document': wi.sale_order_id and ('sale.order' +','+ wi.sale_order_id.name) or ''}) | 'partner_id':wi.address_id.partner_id.id, 'document': wi.sale_order_id and ('sale.order' +','+ wi.sale_order_id.id) or ''}) | def run(self, cr, uid, wi, context={}): result = super(dm_workitem, self).run(cr, uid, wi, context) if wi.sale_order_id: so_res = self.pool.get('sale.order')._sale_order_process(cr, uid, wi.sale_order_id.id) if wi.step_id.partner_event_create: self.pool.get('res.partner.event').create(cr, uid, { 'name': wi.step_id.name... |
if ids: | if ref_ids: | def _get_external_referential_id(self, cr, uid, ids, name, arg, context=None): res = {} for model_data in self.browse(cr, uid, ids, context): s = model_data.module.split('.') #we assume a module name with a '.' means external referential if len(s) > 1: ref_ids = self.pool.get('external.referential').search(cr, uid, [['... |
amount = self.pool.get('credit.line').browse(cr, uid,[credit_line[0]])[0].get_available_amount(cr, uid, credit_line[0], translation_line.customer_amount, id.partner_id.id) | amount = self.pool.get('credit.line').get_available_amount(cr, uid, credit_line[0], translation_line.customer_amount, id.partner_id.id) | def _cci_mission_got_back(self,cr,uid,ids,*args): self.write(cr, uid, ids, {'state':'open',}) cases = self.browse(cr, uid, ids) self._history(cr, uid, cases, 'Got Back', history=True) for id in self.browse(cr, uid, ids): data = {} obj_folder_line = self.pool.get('cci_missions.embassy_folder_line') temp = obj_folder_lin... |
if self.module == 'hotel_reservation': from olilib.openerp import terp import pydb; pydb.debugger(['set listsize 40']) print | def _is_connection_status_good(link): server = "openerp.com" status_good = False try: conn = httplib.HTTPConnection(server) conn.request("HEAD", link) res = conn.getresponse() if res.status in (200, ): status_good = True except (Exception, ), e: logger = netsvc.Logger() msg = "error connecting to server '%s' with link ... | |
logger.notifyChannel("Function called not allowed from this model %s" ,% data['model']) | logger.notifyChannel("Function called not allowed from this model %s" % data['model']) | def _export_from_taxes(self, cr, uid, data, context): stderr = sys.stderr sys.stderr = StringIO.StringIO() rnew = rupdate = rdelete = rerror = 0 try: if data['model'] != 'esale_joomla.tax_map': logger.notifyChannel("Function called not allowed from this model %s" ,% data['model']) else: self.pool = pooler.get_pool(cr.d... |
def id_search(self, cr, uid, obj, name, args, context={}): if not len(args): return [] wi_id= args[0][2] if not wi_id: return [] return [('id','in',[wi_id])] | def _customer_email(self, cr, uid, ids, name, arg, context=None): if context is None: context = {} res = {} for wi in self.browse(cr, uid, ids, context): res[wi.id] = wi.address_id and wi.address_id.email or '' return res | |
string='ID'), | string='ID',fnct_search=id_search), | def _customer_email(self, cr, uid, ids, name, arg, context=None): if context is None: context = {} res = {} for wi in self.browse(cr, uid, ids, context): res[wi.id] = wi.address_id and wi.address_id.email or '' return res |
contrib = line.company_contrib | contrib = 0.0 if line.category_id.include_in_salary: contrib = line.company_contrib | def _calculate(self, cr, uid, ids, field_names, arg, context): res = {} for rs in self.browse(cr, uid, ids, context): allow = 0.0 deduct = 0.0 others = 0.0 obj = {'basic':rs.basic} for line in rs.line_ids: amount = 0.0 if line.amount_type == 'per': amount = line.amount * eval(line.category_id.base, obj) elif line.am... |
def _group_names(self, cr, uid, ids): | def _group_names(self, cr, uid, context=None): | def _group_names(self, cr, uid, ids): cr.execute(''' SELECT distinct name FROM event_group ''') res = cr.fetchall() temp=[] for r in res: temp.append((r[0],r[0])) return temp |
('per','Percentage (%)'), | 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 | |
self.pool.get('hr.payslip.line').write(cr, uid, [line.id], {'total':amount}) | def _calculate(self, cr, uid, ids, field_names, arg, context): res = {} for rs in self.browse(cr, uid, ids, context): allow = 0.0 deduct = 0.0 others = 0.0 obj = {'basic':rs.basic} for line in rs.line_ids: amount = 0.0 if line.amount_type == 'per': amount = line.amount * eval(line.category_id.base, obj) elif line.am... | |
'allounce':allow, 'deduction':deduct, 'grows':rs.basic + allow, 'net':rs.basic + allow - deduct, | 'allounce': round(allow), 'deduction': round(deduct), 'grows': round(rs.basic + allow), 'net': round(rs.basic + allow - deduct), | def _calculate(self, cr, uid, ids, field_names, arg, context): res = {} for rs in self.browse(cr, uid, ids, context): allow = 0.0 deduct = 0.0 others = 0.0 obj = {'basic':rs.basic} for line in rs.line_ids: amount = 0.0 if line.amount_type == 'per': amount = line.amount * eval(line.category_id.base, obj) elif line.am... |
'total_pay': rs.basic + allow - deduct + others | 'total_pay': round(rs.basic + allow - deduct + others) | def _calculate(self, cr, uid, ids, field_names, arg, context): res = {} for rs in self.browse(cr, uid, ids, context): allow = 0.0 deduct = 0.0 others = 0.0 obj = {'basic':rs.basic} for line in rs.line_ids: amount = 0.0 if line.amount_type == 'per': amount = line.amount * eval(line.category_id.base, obj) elif line.am... |
if line.amount_type == 'per': amount= (line.slip_id.basic * line.amount) elif line.amount_type == 'fix': amount = line.amount | def verify_sheet(self, cr, uid, ids, context={}): move_pool = self.pool.get('account.move') movel_pool = self.pool.get('account.move.line') exp_pool = self.pool.get('hr.expense.expense') for slip in self.browse(cr,uid,ids): total_deduct = 0.0 line_ids = [] partner = False partner_id = False if not slip.employee_id.... | |
if line.category_id.contribute and line.category_id.amount_type == 'per': new_amount = (amount * (line.category_id.contribute_per*100)) / ((line.amount*100) + 100) if amount == new_amount: company = amount / 2 employee = company else: company = new_amount employee = amount - company | if line.category_id.contribute and line.category_id.include_in_salary and line.category_id.amount_type == 'per': new_amount = (amount * (line.category_id.contribute_per / (1+line.category_id.contribute_per))) company = new_amount employee = amount - company | def verify_sheet(self, cr, uid, ids, context={}): move_pool = self.pool.get('account.move') movel_pool = self.pool.get('account.move.line') exp_pool = self.pool.get('hr.expense.expense') for slip in self.browse(cr,uid,ids): total_deduct = 0.0 line_ids = [] partner = False partner_id = False if not slip.employee_id.... |
elif line.category_id.contribute and line.category_id.amount_type == 'fix': | elif line.category_id.contribute and line.category_id.include_in_salary and line.category_id.amount_type == 'fix': | def verify_sheet(self, cr, uid, ids, context={}): move_pool = self.pool.get('account.move') movel_pool = self.pool.get('account.move.line') exp_pool = self.pool.get('hr.expense.expense') for slip in self.browse(cr,uid,ids): total_deduct = 0.0 line_ids = [] partner = False partner_id = False if not slip.employee_id.... |
elif line.category_id.contribute and line.category_id.amount_type == 'func': | elif line.category_id.contribute and line.category_id.include_in_salary and line.category_id.amount_type == 'func': company = self.pool.get('hr.allounce.deduction.categoty').execute_function(cr, uid, line.category_id.id, line.slip_id.basic, context) employee = amount elif line.category_id.contribute and not line.categ... | def verify_sheet(self, cr, uid, ids, context={}): move_pool = self.pool.get('account.move') movel_pool = self.pool.get('account.move.line') exp_pool = self.pool.get('hr.expense.expense') for slip in self.browse(cr,uid,ids): total_deduct = 0.0 line_ids = [] partner = False partner_id = False if not slip.employee_id.... |
goto_next = eval(exp, obj) | calculate = eval(exp, obj) | def compute_sheet(self, cr, uid, ids, context={}): emp_pool = self.pool.get('hr.employee') slip_pool = self.pool.get('hr.payslip') func_pool = self.pool.get('hr.employee.grade') slip_line_pool = self.pool.get('hr.payslip.line') holiday_pool = self.pool.get('hr.holidays') vals = self.read(cr, uid, ids)[0] emp_ids = ids... |
if not goto_next: | if not calculate: | def compute_sheet(self, cr, uid, ids, context={}): emp_pool = self.pool.get('hr.employee') slip_pool = self.pool.get('hr.payslip') func_pool = self.pool.get('hr.employee.grade') slip_line_pool = self.pool.get('hr.payslip.line') holiday_pool = self.pool.get('hr.holidays') vals = self.read(cr, uid, ids)[0] emp_ids = ids... |
value = 0.0 amt = 0.0 | def compute_sheet(self, cr, uid, ids, context={}): emp_pool = self.pool.get('hr.employee') slip_pool = self.pool.get('hr.payslip') func_pool = self.pool.get('hr.employee.grade') slip_line_pool = self.pool.get('hr.payslip.line') holiday_pool = self.pool.get('hr.holidays') vals = self.read(cr, uid, ids)[0] emp_ids = ids... | |
exp = line.category_id.base | base = line.category_id.base value = line.amount | def compute_sheet(self, cr, uid, ids, context={}): emp_pool = self.pool.get('hr.employee') slip_pool = self.pool.get('hr.payslip') func_pool = self.pool.get('hr.employee.grade') slip_line_pool = self.pool.get('hr.payslip.line') holiday_pool = self.pool.get('hr.holidays') vals = self.read(cr, uid, ids)[0] emp_ids = ids... |
amt = eval(exp, obj) | amt = eval(base, obj) | def compute_sheet(self, cr, uid, ids, context={}): emp_pool = self.pool.get('hr.employee') slip_pool = self.pool.get('hr.payslip') func_pool = self.pool.get('hr.employee.grade') slip_line_pool = self.pool.get('hr.payslip.line') holiday_pool = self.pool.get('hr.holidays') vals = self.read(cr, uid, ids)[0] emp_ids = ids... |
if amt <= 0: | if amt > 1: com_value = line.amount * amt | def compute_sheet(self, cr, uid, ids, context={}): emp_pool = self.pool.get('hr.employee') slip_pool = self.pool.get('hr.payslip') func_pool = self.pool.get('hr.employee.grade') slip_line_pool = self.pool.get('hr.payslip.line') holiday_pool = self.pool.get('hr.holidays') vals = self.read(cr, uid, ids)[0] emp_ids = ids... |
else: | elif amt >= 0 and amt <= 1: | def compute_sheet(self, cr, uid, ids, context={}): emp_pool = self.pool.get('hr.employee') slip_pool = self.pool.get('hr.payslip') func_pool = self.pool.get('hr.employee.grade') slip_line_pool = self.pool.get('hr.payslip.line') holiday_pool = self.pool.get('hr.holidays') vals = self.read(cr, uid, ids)[0] emp_ids = ids... |
com_value = 0.0 if line.category_id.contribute and line.category_id.amount_type == 'per': amt = amt + (amt * line.category_id.contribute_per) elif line.category_id.contribute and line.category_id.amount_type == 'fix': com_value = line.category_id.contribute_per | if line.category_id.contribute and line.category_id.amount_type == 'fix': company_contrib = line.category_id.contribute_per | def compute_sheet(self, cr, uid, ids, context={}): emp_pool = self.pool.get('hr.employee') slip_pool = self.pool.get('hr.payslip') func_pool = self.pool.get('hr.employee.grade') slip_line_pool = self.pool.get('hr.payslip.line') holiday_pool = self.pool.get('hr.holidays') vals = self.read(cr, uid, ids)[0] emp_ids = ids... |
com_value = self.pool.get('hr.allounce.deduction.categoty').execute_function(cr, uid, line.category_id.id, contract.wage, context) | company_contrib = self.pool.get('hr.allounce.deduction.categoty').execute_function(cr, uid, line.category_id.id, contract.wage, context) elif line.amount_type == 'fix': value = line.amount if line.category_id.contribute and line.category_id.amount_type == 'fix': company_contrib = line.category_id.contribute_per elif ... | def compute_sheet(self, cr, uid, ids, context={}): emp_pool = self.pool.get('hr.employee') slip_pool = self.pool.get('hr.payslip') func_pool = self.pool.get('hr.employee.grade') slip_line_pool = self.pool.get('hr.payslip.line') holiday_pool = self.pool.get('hr.holidays') vals = self.read(cr, uid, ids)[0] emp_ids = ids... |
if line.type == 'allounce': all_per += amt all_fix += com_value elif line.type == 'deduction': ded_per += amt ded_fix += com_value | elif line.amount_type == 'func': value = self.pool.get('hr.payslip.line').execute_function(cr, uid, line.id, contract.wage, context) if line.category_id.contribute and line.category_id.amount_type == 'fix': company_contrib = line.category_id.contribute_per elif line.category_id.contribute and line.category_id.amount_t... | def compute_sheet(self, cr, uid, ids, context={}): emp_pool = self.pool.get('hr.employee') slip_pool = self.pool.get('hr.payslip') func_pool = self.pool.get('hr.employee.grade') slip_line_pool = self.pool.get('hr.payslip.line') holiday_pool = self.pool.get('hr.holidays') vals = self.read(cr, uid, ids)[0] emp_ids = ids... |
elif line.amount_type == 'fix': | else: if line.amount_type in ('fix', 'per'): | def compute_sheet(self, cr, uid, ids, context={}): emp_pool = self.pool.get('hr.employee') slip_pool = self.pool.get('hr.payslip') func_pool = self.pool.get('hr.employee.grade') slip_line_pool = self.pool.get('hr.payslip.line') holiday_pool = self.pool.get('hr.holidays') vals = self.read(cr, uid, ids)[0] emp_ids = ids... |
com_value = 0.0 if line.category_id.contribute and line.category_id.amount_type == 'per': amt = amt + (amt * line.category_id.contribute_per) elif line.category_id.contribute and line.category_id.amount_type == 'fix': com_value = line.category_id.contribute_per elif line.category_id.contribute and line.category_id.amou... | def compute_sheet(self, cr, uid, ids, context={}): emp_pool = self.pool.get('hr.employee') slip_pool = self.pool.get('hr.payslip') func_pool = self.pool.get('hr.employee.grade') slip_line_pool = self.pool.get('hr.payslip.line') holiday_pool = self.pool.get('hr.holidays') vals = self.read(cr, uid, ids)[0] emp_ids = ids... | |
com_value = 0.0 if line.category_id.contribute and line.category_id.amount_type == 'per': amt = amt + (amt * line.category_id.contribute_per) elif line.category_id.contribute and line.category_id.amount_type == 'fix': com_value = line.category_id.contribute_per elif line.category_id.contribute and line.category_id.amo... | if line.type == 'allounce': all_per += amt all_fix += com_value all_fix += value elif line.type == 'deduction': ded_per += amt ded_fix += com_value ded_fix += value if line.category_id.include_in_salary: if line.type == 'allounce': all_fix += company_contrib elif line.type == 'deduction': ded_fix += company_contrib v... | def compute_sheet(self, cr, uid, ids, context={}): emp_pool = self.pool.get('hr.employee') slip_pool = self.pool.get('hr.payslip') func_pool = self.pool.get('hr.employee.grade') slip_line_pool = self.pool.get('hr.payslip.line') holiday_pool = self.pool.get('hr.holidays') vals = self.read(cr, uid, ids)[0] emp_ids = ids... |
cd = line.category_id.code.lower() | def compute_sheet(self, cr, uid, ids, context={}): emp_pool = self.pool.get('hr.employee') slip_pool = self.pool.get('hr.payslip') func_pool = self.pool.get('hr.employee.grade') slip_line_pool = self.pool.get('hr.payslip.line') holiday_pool = self.pool.get('hr.holidays') vals = self.read(cr, uid, ids)[0] emp_ids = ids... | |
if not goto_next: | pass if not calculate: | def compute_sheet(self, cr, uid, ids, context={}): emp_pool = self.pool.get('hr.employee') slip_pool = self.pool.get('hr.payslip') func_pool = self.pool.get('hr.employee.grade') slip_line_pool = self.pool.get('hr.payslip.line') holiday_pool = self.pool.get('hr.holidays') vals = self.read(cr, uid, ids)[0] emp_ids = ids... |
amt = 0.0 value = 0.0 base = False company_contrib = 0.0 com_value = 0.0 | def compute_sheet(self, cr, uid, ids, context={}): emp_pool = self.pool.get('hr.employee') slip_pool = self.pool.get('hr.payslip') func_pool = self.pool.get('hr.employee.grade') slip_line_pool = self.pool.get('hr.payslip.line') holiday_pool = self.pool.get('hr.holidays') vals = self.read(cr, uid, ids)[0] emp_ids = ids... | |
com_value = 0.0 if line.category_id.contribute and line.category_id.amount_type == 'per': amt = amt + (amt * line.category_id.contribute_per) elif line.category_id.contribute and line.category_id.amount_type == 'fix': com_value = line.category_id.contribute_per elif line.category_id.contribute and line.category_id.amou... | def compute_sheet(self, cr, uid, ids, context={}): emp_pool = self.pool.get('hr.employee') slip_pool = self.pool.get('hr.payslip') func_pool = self.pool.get('hr.employee.grade') slip_line_pool = self.pool.get('hr.payslip.line') holiday_pool = self.pool.get('hr.holidays') vals = self.read(cr, uid, ids)[0] emp_ids = ids... | |
com_value = 0.0 if line.category_id.contribute and line.category_id.amount_type == 'per': amt = amt + (amt * line.category_id.contribute_per) elif line.category_id.contribute and line.category_id.amount_type == 'fix': com_value = line.category_id.contribute_per elif line.category_id.contribute and line.category_id.amou... | if line.category_id.contribute and line.category_id.include_in_salary and line.category_id.amount_type == 'fix': company_contrib = line.category_id.contribute_per elif line.category_id.contribute and line.category_id.include_in_salary and line.category_id.amount_type == 'func': company_contrib = self.pool.get('hr.allou... | def compute_sheet(self, cr, uid, ids, context={}): emp_pool = self.pool.get('hr.employee') slip_pool = self.pool.get('hr.payslip') func_pool = self.pool.get('hr.employee.grade') slip_line_pool = self.pool.get('hr.payslip.line') holiday_pool = self.pool.get('hr.holidays') vals = self.read(cr, uid, ids)[0] emp_ids = ids... |
com_value = 0.0 | if line.category_id.contribute and line.category_id.include_in_salary and line.category_id.amount_type == 'fix': company_contrib = line.category_id.contribute_per elif line.category_id.contribute and line.category_id.include_in_salary and line.category_id.amount_type == 'func': company_contrib = self.pool.get('hr.allou... | def compute_sheet(self, cr, uid, ids, context={}): emp_pool = self.pool.get('hr.employee') slip_pool = self.pool.get('hr.payslip') func_pool = self.pool.get('hr.employee.grade') slip_line_pool = self.pool.get('hr.payslip.line') holiday_pool = self.pool.get('hr.holidays') vals = self.read(cr, uid, ids)[0] emp_ids = ids... |
if line.category_id.contribute and line.category_id.amount_type == 'per': amt = amt + (amt * line.category_id.contribute_per) elif line.category_id.contribute and line.category_id.amount_type == 'fix': com_value = line.category_id.contribute_per elif line.category_id.contribute and line.category_id.amount_type == 'func... | else: if line.amount_type in ('fix', 'per'): value = line.amount elif line.amount_type == 'func': value = self.pool.get('hr.payslip.line').execute_function(cr, uid, line.id, contract.wage, context) | def compute_sheet(self, cr, uid, ids, context={}): emp_pool = self.pool.get('hr.employee') slip_pool = self.pool.get('hr.payslip') func_pool = self.pool.get('hr.employee.grade') slip_line_pool = self.pool.get('hr.payslip.line') holiday_pool = self.pool.get('hr.holidays') vals = self.read(cr, uid, ids)[0] emp_ids = ids... |
if value: amount = value else: amount = line.amount company_contrib = 0.0 if line.category_id.contribute and line.category_id.amount_type == 'per': amount = line.amount + (line.amount * line.category_id.contribute_per) elif line.category_id.contribute and line.category_id.amount_type == 'fix': company_contrib = line.c... | if line.type == 'allounce': all_per += amt all_fix += com_value all_fix += value all_fix += company_contrib elif line.type == 'deduction': ded_per += amt ded_fix += com_value ded_fix += value ded_fix += company_contrib vals = { 'company_contrib':company_contrib, 'amount':value, 'slip_id':slip.id, 'employee_id':False, ... | def compute_sheet(self, cr, uid, ids, context={}): emp_pool = self.pool.get('hr.employee') slip_pool = self.pool.get('hr.payslip') func_pool = self.pool.get('hr.employee.grade') slip_line_pool = self.pool.get('hr.payslip.line') holiday_pool = self.pool.get('hr.holidays') vals = self.read(cr, uid, ids)[0] emp_ids = ids... |
'basic':basic, 'basic_before_leaves':basic_before_leaves, | 'basic': round(basic), 'basic_before_leaves': round(basic_before_leaves), | def get_days(start, end, month, year, calc_day): count = 0 for day in range(start, end): if date(year, month, day).weekday() == calc_day: count += 1 return count |
text = text.encode('utf-8') text = text.replace('é','e').replace('è','e').replace('ë','e').replace('ê','e') text = text.replace('â','a').replace('à','a') text = text.replace('ù','u').replace('û','u') text = text.replace('î','i').replace('ï','i') text = text.replace('ô','o').replace('ö','o') text = text.replace('Â','A')... | return unicodedata.normalize('NFKD', text).encode('latin-1', 'ignore') | def translate_accent(text): text = text.encode('utf-8') text = text.replace('é','e').replace('è','e').replace('ë','e').replace('ê','e') text = text.replace('â','a').replace('à','a') text = text.replace('ù','u').replace('û','u') text = text.replace('î','i').replace('ï','i') text = text.replace('ô','o').replace('ö','o') ... |
offer_obj = pooler.get_pool(cr.dbname).get('dm.offer') offer = offer_obj.browse(cr, uid, offer_id)[0] | pool = pooler.get_pool(cr.dbname) user_lang = get_user_lang(cr, uid) context = {'lang': user_lang} trans_obj = pool.get('ir.translation') offer_obj = pool.get('dm.offer') step_type = pool.get('dm.offer.step.type') offer = offer_obj.browse(cr, uid, offer_id, context=context)[0] | def graph_get(cr, uid, graph, offer_id): offer_obj = pooler.get_pool(cr.dbname).get('dm.offer') offer = offer_obj.browse(cr, uid, offer_id)[0] nodes = {} step_type = pooler.get_pool(cr.dbname).get('dm.offer.step.type') type_ids = step_type.search(cr, uid, []) for step in offer.step_ids: if not step.graph_hide: args = ... |
step_type = pooler.get_pool(cr.dbname).get('dm.offer.step.type') | def graph_get(cr, uid, graph, offer_id): offer_obj = pooler.get_pool(cr.dbname).get('dm.offer') offer = offer_obj.browse(cr, uid, offer_id)[0] nodes = {} step_type = pooler.get_pool(cr.dbname).get('dm.offer.step.type') type_ids = step_type.search(cr, uid, []) for step in offer.step_ids: if not step.graph_hide: args = ... | |
usr_obj = pooler.get_pool(cr.dbname).get('res.users') user = usr_obj.browse(cr, uid, [uid])[0] user_lang = user.context_lang """ Get Code Translation """ trans_obj = pooler.get_pool(cr.dbname).get('ir.translation') type_trans = trans_obj._get_ids(cr, uid, 'dm.offer.step,code', 'model', user_lang or 'en_US', [step.id]... | type_trans = trans_obj._get_ids(cr, uid, 'dm.offer.step,code', 'model', user_lang, [step.id]) | def graph_get(cr, uid, graph, offer_id): offer_obj = pooler.get_pool(cr.dbname).get('dm.offer') offer = offer_obj.browse(cr, uid, offer_id)[0] nodes = {} step_type = pooler.get_pool(cr.dbname).get('dm.offer.step.type') type_ids = step_type.search(cr, uid, []) for step in offer.step_ids: if not step.graph_hide: args = ... |
'meeting_id' : fields.many2one('meeting.confidential.info','Meeting confidential'), | 'group_id' : fields.many2one('res.groups','Group'), | def name_get(self, cr, uid, ids, context={}): if not len(ids): return [] reads = self.browse(cr, uid, ids, context) res = [] for record in reads: res.append((record['id'], record['description'])) return res |
self.copy(cr, uid, ids[0], default) | context = {'camp_from_model':True} self.copy(cr, uid, ids[0], default, context) | def copy_campaign(self, cr, uid, ids, *args): camp = self.browse(cr, uid, ids)[0] default = {} default['name'] = 'New campaign from model %s' % camp.name default['campaign_type_id'] = self.pool.get('dm.campaign.type').search(cr, uid, [('code', '=', 'recruiting')])[0] default['responsible_id'] = uid self.copy(cr, uid, i... |
def copy(self, cr, uid, id, default=None, context={}): | def copy(self, cr, uid, id, default=None, context=None): if not context: context = {} | def copy(self, cr, uid, id, default=None, context={}): if not default: default = {} campaign_id = self.browse(cr, uid, id) if not default.get('name', False): default['name'] = campaign_id.name + ' (Copy)' # project_id should nt b her moved in rp |
report.report_sxw.report_sxw.old_create = report.report_sxw.report_sxw.create | if 'old_create' not in dir(report.report_sxw.report_sxw): report.report_sxw.report_sxw.old_create = report.report_sxw.report_sxw.create | def create(self, cr, uid, ids, datas, context=None): """ Register the report with this handler. """ name = self.name |
pool = pooler.get_pool(cr.dbname) ir_obj = pool.get('ir.actions.report.xml') report_xml_ids = ir_obj.search(cr, uid, [('report_name', '=', self.name[7:])], context=context) | def create(self, cr, uid, ids, data, context=None): """ Wrapper around the create method of report_sxw that registers 'automagically' OpenOffice reports. """ if context is None: context = {} if self.internal_header: context.update({'internal_header': self.internal_header}) pool = pooler.get_pool(cr.dbname) ir_obj = po... | |
if report_xml_ids: report_xml = ir_obj.browse(cr, uid, report_xml_ids[0], context=context) | report_type= data.get('report_type', 'pdf') if not report_type.startswith('oo-'): fnct_ret = self.old_create(cr, uid, ids, data, context=context) | def create(self, cr, uid, ids, data, context=None): """ Wrapper around the create method of report_sxw that registers 'automagically' OpenOffice reports. """ if context is None: context = {} if self.internal_header: context.update({'internal_header': self.internal_header}) pool = pooler.get_pool(cr.dbname) ir_obj = po... |
title = '' report_type= data.get('report_type', 'pdf') if not report_type.startswith('oo-'): fnct_ret = self.old_create(cr, uid, ids, data, context=context) else: rml = tools.file_open(self.tmpl, subdir=None).read() class a(object): def __init__(self, *args, **argv): for key,arg in argv.items(): setattr(self, key, ar... | def create(self, cr, uid, ids, data, context=None): """ Wrapper around the create method of report_sxw that registers 'automagically' OpenOffice reports. """ if context is None: context = {} if self.internal_header: context.update({'internal_header': self.internal_header}) pool = pooler.get_pool(cr.dbname) ir_obj = po... | |
urllib.urlretrieve('http://github.com/downloads/rvalyi/terminatooor/terminatooor1.2.0.zip', kettle_root_directory + 'terminatooor.zip') | urllib.urlretrieve('http://github.com/downloads/rvalyi/terminatooor/terminatooor1.2.1.zip', kettle_root_directory + 'terminatooor.zip') | def install(self, kettle_root_directory, install_agilebi=True): print "checking if Kettle is possibly already installed..." kettle_dir = kettle_root_directory + 'data-integration' if os.path.isdir(kettle_dir): raise Exception("looks like Pentaho Data Integration (Kettle) is already installed!\nPlease remove the %s di... |
unzipper.extract(kettle_root_directory + 'terminatooor.zip', kettle_root_directory + 'data-integration/plugins/steps/termintatooor') | unzipper.extract(kettle_root_directory + 'terminatooor.zip', kettle_root_directory + 'data-integration/plugins/steps/terminatooor') | def install(self, kettle_root_directory, install_agilebi=True): print "checking if Kettle is possibly already installed..." kettle_dir = kettle_root_directory + 'data-integration' if os.path.isdir(kettle_dir): raise Exception("looks like Pentaho Data Integration (Kettle) is already installed!\nPlease remove the %s di... |
shutil.move(kettle_root_directory + 'data-integration/plugins/steps/termintatooor/jruby-ooor.jar', kettle_root_directory + 'data-integration/libext/jruby-ooor.jar') | shutil.move(kettle_root_directory + 'data-integration/plugins/steps/terminatooor/jruby-ooor.jar', kettle_root_directory + 'data-integration/libext/jruby-ooor.jar') | def install(self, kettle_root_directory, install_agilebi=True): print "checking if Kettle is possibly already installed..." kettle_dir = kettle_root_directory + 'data-integration' if os.path.isdir(kettle_dir): raise Exception("looks like Pentaho Data Integration (Kettle) is already installed!\nPlease remove the %s di... |
if context is None or product_id not in context: | if context is None: context = {} if not context.get('product_id', False): | def calc_date(self, cr, uid, context=None): """Compute the limit date for a given date""" if context is None or product_id not in context: date = False else: product = pooler.get_pool(cr.dbname).get('product.product').browse( cr, uid, context['product_id']) duration = getattr(product, dtype) # set date to False when no... |
if not partner_id or not company_id: | if not partner_id or not company_id or not result['value']['address_invoice_id']: | def onchange_partner_id(self, cr, uid, ids, type, partner_id,\ date_invoice=False, payment_term=False, partner_bank_id=False, company_id=False): |
if result['value']['address_invoice_id']: ptn_invoice_id = result['value']['address_invoice_id'] partner_addr_default = self.pool.get('res.partner.address').browse(cr, uid, [ptn_invoice_id])[0] | partner_addr_default = self.pool.get('res.partner.address').browse(cr, uid, [result['value']['address_invoice_id']])[0] | def onchange_partner_id(self, cr, uid, ids, type, partner_id,\ date_invoice=False, payment_term=False, partner_bank_id=False, company_id=False): |
self.pool.get('event.registration').mail_user(cr,uid,ids) | for registration in self.browse(cr, uid, ids, {}): if registration.event_id.mail_auto_confirm: self.pool.get('event.registration').mail_user(cr,uid,ids) | def cci_event_reg_open(self, cr, uid, ids, *args): self.write(cr, uid, ids, {'state':'open',}) self.pool.get('event.registration').mail_user(cr,uid,ids) self.pool.get('event.registration')._history(cr, uid, ids, 'Open', history=True) return True |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.