bugged
stringlengths
4
228k
fixed
stringlengths
0
96.3M
__index_level_0__
int64
0
481k
def die(cond, msg): if cond: print msg sys.exit(1)
def die(cond, msg): if cond: print msg sys.exit(1)
470,900
def die(cond, msg): if cond: print msg sys.exit(1)
def die(cond, msg): if cond: print msg sys.exit(1)
470,901
def _update_partners(self, cr, uid, data, context): to_update = data['form']['to_update'] for id in to_update.keys(): cr.execute( "UPDATE account_move_line "\ "SET followup_line_id=%s, followup_date=%s "\ "WHERE id=%s", (to_update[id], data['form']['date'], int(id),)) return {}
def _update_partners(self, cr, uid, data, context): to_update = data['form']['to_update'] for id in to_update.keys(): if to_update[id]['partner_id'] in data['form']['partner_ids'][0][2]: cr.execute( "UPDATE account_move_line "\ "SET followup_line_id=%s, followup_date=%s "\ "WHERE id=%s", (to_update[id]['level'], data['...
470,902
def _get_partners(self, cr, uid, data, context): pool = pooler.get_pool(cr.dbname) cr.execute( "SELECT l.partner_id, l.followup_line_id,l.date_maturity, l.date, l.id "\ "FROM account_move_line AS l "\ "LEFT JOIN account_account AS a "\ "ON (l.account_id=a.id) "\ "WHERE (l.reconcile_id IS NULL) "\ "AND (a.type='receivab...
def _get_partners(self, cr, uid, data, context): pool = pooler.get_pool(cr.dbname) cr.execute( "SELECT l.partner_id, l.followup_line_id,l.date_maturity, l.date, l.id "\ "FROM account_move_line AS l "\ "LEFT JOIN account_account AS a "\ "ON (l.account_id=a.id) "\ "WHERE (l.reconcile_id IS NULL) "\ "AND (a.type='receivab...
470,903
def _get_partners(self, cr, uid, data, context): pool = pooler.get_pool(cr.dbname) cr.execute( "SELECT l.partner_id, l.followup_line_id,l.date_maturity, l.date, l.id "\ "FROM account_move_line AS l "\ "LEFT JOIN account_account AS a "\ "ON (l.account_id=a.id) "\ "WHERE (l.reconcile_id IS NULL) "\ "AND (a.type='receivab...
def _get_partners(self, cr, uid, data, context): pool = pooler.get_pool(cr.dbname) cr.execute( "SELECT l.partner_id, l.followup_line_id,l.date_maturity, l.date, l.id "\ "FROM account_move_line AS l "\ "LEFT JOIN account_account AS a "\ "ON (l.account_id=a.id) "\ "WHERE (l.reconcile_id IS NULL) "\ "AND (a.type='receivab...
470,904
def unlink(self, cr, uid, ids, *args, **kwargs): for proj in self.browse(cr, uid, ids): if proj.tasks: raise osv.except_osv(_('Operation Not Permitted !'), _('You can not delete a project with tasks. I suggest you to deactivate it.')) return super(project, self).unlink(cr, uid, ids, *args, **kwargs)
def_order = "sequence" unlink(self,_order = "sequence" cr,_order = "sequence" uid,_order = "sequence" ids,_order = "sequence" *args,_order = "sequence" **kwargs):_order = "sequence" for_order = "sequence" proj_order = "sequence" in_order = "sequence" self.browse(cr,_order = "sequence" uid,_order = "sequence" ids):_orde...
470,905
def _product_margin(self, cr, uid, ids, field_names, arg, context=None): res = {} if context is None: context = {} for val in self.browse(cr, uid, ids,context=context): res[val.id] = {} date_from = context.get('date_from', time.strftime('%Y-01-01')) date_to = context.get('date_to', time.strftime('%Y-12-31')) invoice_st...
def _product_margin(self, cr, uid, ids, field_names, arg, context=None): res = {} if context is None: context = {} for val in self.browse(cr, uid, ids, context=context): res[val.id] = {} date_from = context.get('date_from', time.strftime('%Y-01-01')) date_to = context.get('date_to', time.strftime('%Y-12-31')) invoice_...
470,906
def _product_margin(self, cr, uid, ids, field_names, arg, context=None): res = {} if context is None: context = {} for val in self.browse(cr, uid, ids,context=context): res[val.id] = {} date_from = context.get('date_from', time.strftime('%Y-01-01')) date_to = context.get('date_to', time.strftime('%Y-12-31')) invoice_st...
def _product_margin(self, cr, uid, ids, field_names, arg, context=None): res = {} if context is None: context = {} for val in self.browse(cr, uid, ids,context=context): res[val.id] = {} date_from = context.get('date_from', time.strftime('%Y-01-01')) date_to = context.get('date_to', time.strftime('%Y-12-31')) invoice_st...
470,907
def _product_margin(self, cr, uid, ids, field_names, arg, context=None): res = {} if context is None: context = {} for val in self.browse(cr, uid, ids,context=context): res[val.id] = {} date_from = context.get('date_from', time.strftime('%Y-01-01')) date_to = context.get('date_to', time.strftime('%Y-12-31')) invoice_st...
def _product_margin(self, cr, uid, ids, field_names, arg, context=None): res = {} if context is None: context = {} for val in self.browse(cr, uid, ids,context=context): res[val.id] = {} date_from = context.get('date_from', time.strftime('%Y-01-01')) date_to = context.get('date_to', time.strftime('%Y-12-31')) invoice_st...
470,908
def _product_margin(self, cr, uid, ids, field_names, arg, context=None): res = {} if context is None: context = {} for val in self.browse(cr, uid, ids,context=context): res[val.id] = {} date_from = context.get('date_from', time.strftime('%Y-01-01')) date_to = context.get('date_to', time.strftime('%Y-12-31')) invoice_st...
def _product_margin(self, cr, uid, ids, field_names, arg, context=None): res = {} if context is None: context = {} for val in self.browse(cr, uid, ids,context=context): res[val.id] = {} date_from = context.get('date_from', time.strftime('%Y-01-01')) date_to = context.get('date_to', time.strftime('%Y-12-31')) invoice_st...
470,909
def _product_margin(self, cr, uid, ids, field_names, arg, context=None): res = {} if context is None: context = {} for val in self.browse(cr, uid, ids,context=context): res[val.id] = {} date_from = context.get('date_from', time.strftime('%Y-01-01')) date_to = context.get('date_to', time.strftime('%Y-12-31')) invoice_st...
def _product_margin(self, cr, uid, ids, field_names, arg, context=None): res = {} if context is None: context = {} for val in self.browse(cr, uid, ids,context=context): res[val.id] = {} date_from = context.get('date_from', time.strftime('%Y-01-01')) date_to = context.get('date_to', time.strftime('%Y-12-31')) invoice_st...
470,910
def _product_margin(self, cr, uid, ids, field_names, arg, context=None): res = {} if context is None: context = {} for val in self.browse(cr, uid, ids,context=context): res[val.id] = {} date_from = context.get('date_from', time.strftime('%Y-01-01')) date_to = context.get('date_to', time.strftime('%Y-12-31')) invoice_st...
def _product_margin(self, cr, uid, ids, field_names, arg, context=None): res = {} if context is None: context = {} for val in self.browse(cr, uid, ids,context=context): res[val.id] = {} date_from = context.get('date_from', time.strftime('%Y-01-01')) date_to = context.get('date_to', time.strftime('%Y-12-31')) invoice_st...
470,911
def _product_margin(self, cr, uid, ids, field_names, arg, context=None): res = {} if context is None: context = {} for val in self.browse(cr, uid, ids,context=context): res[val.id] = {} date_from = context.get('date_from', time.strftime('%Y-01-01')) date_to = context.get('date_to', time.strftime('%Y-12-31')) invoice_st...
def _product_margin(self, cr, uid, ids, field_names, arg, context=None): res = {} if context is None: context = {} for val in self.browse(cr, uid, ids,context=context): res[val.id] = {} date_from = context.get('date_from', time.strftime('%Y-01-01')) date_to = context.get('date_to', time.strftime('%Y-12-31')) invoice_st...
470,912
def _product_margin(self, cr, uid, ids, field_names, arg, context=None): res = {} if context is None: context = {} for val in self.browse(cr, uid, ids,context=context): res[val.id] = {} date_from = context.get('date_from', time.strftime('%Y-01-01')) date_to = context.get('date_to', time.strftime('%Y-12-31')) invoice_st...
def _product_margin(self, cr, uid, ids, field_names, arg, context=None): res = {} if context is None: context = {} for val in self.browse(cr, uid, ids,context=context): res[val.id] = {} date_from = context.get('date_from', time.strftime('%Y-01-01')) date_to = context.get('date_to', time.strftime('%Y-12-31')) invoice_st...
470,913
def _product_margin(self, cr, uid, ids, field_names, arg, context=None): res = {} if context is None: context = {} for val in self.browse(cr, uid, ids,context=context): res[val.id] = {} date_from = context.get('date_from', time.strftime('%Y-01-01')) date_to = context.get('date_to', time.strftime('%Y-12-31')) invoice_st...
def _product_margin(self, cr, uid, ids, field_names, arg, context=None): res = {} if context is None: context = {} for val in self.browse(cr, uid, ids,context=context): res[val.id] = {} date_from = context.get('date_from', time.strftime('%Y-01-01')) date_to = context.get('date_to', time.strftime('%Y-12-31')) invoice_st...
470,914
def _product_margin(self, cr, uid, ids, field_names, arg, context=None): res = {} if context is None: context = {} for val in self.browse(cr, uid, ids,context=context): res[val.id] = {} date_from = context.get('date_from', time.strftime('%Y-01-01')) date_to = context.get('date_to', time.strftime('%Y-12-31')) invoice_st...
def _product_margin(self, cr, uid, ids, field_names, arg, context=None): res = {} if context is None: context = {} for val in self.browse(cr, uid, ids,context=context): res[val.id] = {} date_from = context.get('date_from', time.strftime('%Y-01-01')) date_to = context.get('date_to', time.strftime('%Y-12-31')) invoice_st...
470,915
def _product_margin(self, cr, uid, ids, field_names, arg, context=None): res = {} if context is None: context = {} for val in self.browse(cr, uid, ids,context=context): res[val.id] = {} date_from = context.get('date_from', time.strftime('%Y-01-01')) date_to = context.get('date_to', time.strftime('%Y-12-31')) invoice_st...
def _product_margin(self, cr, uid, ids, field_names, arg, context=None): res = {} if context is None: context = {} for val in self.browse(cr, uid, ids,context=context): res[val.id] = {} date_from = context.get('date_from', time.strftime('%Y-01-01')) date_to = context.get('date_to', time.strftime('%Y-12-31')) invoice_st...
470,916
def _product_margin(self, cr, uid, ids, field_names, arg, context=None): res = {} if context is None: context = {} for val in self.browse(cr, uid, ids,context=context): res[val.id] = {} date_from = context.get('date_from', time.strftime('%Y-01-01')) date_to = context.get('date_to', time.strftime('%Y-12-31')) invoice_st...
def _product_margin(self, cr, uid, ids, field_names, arg, context=None): res = {} if context is None: context = {} for val in self.browse(cr, uid, ids,context=context): res[val.id] = {} date_from = context.get('date_from', time.strftime('%Y-01-01')) date_to = context.get('date_to', time.strftime('%Y-12-31')) invoice_st...
470,917
def _product_margin(self, cr, uid, ids, field_names, arg, context=None): res = {} if context is None: context = {} for val in self.browse(cr, uid, ids,context=context): res[val.id] = {} date_from = context.get('date_from', time.strftime('%Y-01-01')) date_to = context.get('date_to', time.strftime('%Y-12-31')) invoice_st...
def _product_margin(self, cr, uid, ids, field_names, arg, context=None): res = {} if context is None: context = {} for val in self.browse(cr, uid, ids,context=context): res[val.id] = {} date_from = context.get('date_from', time.strftime('%Y-01-01')) date_to = context.get('date_to', time.strftime('%Y-12-31')) invoice_st...
470,918
def _product_margin(self, cr, uid, ids, field_names, arg, context=None): res = {} if context is None: context = {} for val in self.browse(cr, uid, ids,context=context): res[val.id] = {} date_from = context.get('date_from', time.strftime('%Y-01-01')) date_to = context.get('date_to', time.strftime('%Y-12-31')) invoice_st...
def _product_margin(self, cr, uid, ids, field_names, arg, context=None): res = {} if context is None: context = {} for val in self.browse(cr, uid, ids,context=context): res[val.id] = {} date_from = context.get('date_from', time.strftime('%Y-01-01')) date_to = context.get('date_to', time.strftime('%Y-12-31')) invoice_st...
470,919
def _product_margin(self, cr, uid, ids, field_names, arg, context=None): res = {} if context is None: context = {} for val in self.browse(cr, uid, ids,context=context): res[val.id] = {} date_from = context.get('date_from', time.strftime('%Y-01-01')) date_to = context.get('date_to', time.strftime('%Y-12-31')) invoice_st...
def _product_margin(self, cr, uid, ids, field_names, arg, context=None): res = {} if context is None: context = {} for val in self.browse(cr, uid, ids,context=context): res[val.id] = {} date_from = context.get('date_from', time.strftime('%Y-01-01')) date_to = context.get('date_to', time.strftime('%Y-12-31')) invoice_st...
470,920
def _product_margin(self, cr, uid, ids, field_names, arg, context=None): res = {} if context is None: context = {} for val in self.browse(cr, uid, ids,context=context): res[val.id] = {} date_from = context.get('date_from', time.strftime('%Y-01-01')) date_to = context.get('date_to', time.strftime('%Y-12-31')) invoice_st...
def _product_margin(self, cr, uid, ids, field_names, arg, context=None): res = {} if context is None: context = {} for val in self.browse(cr, uid, ids,context=context): res[val.id] = {} date_from = context.get('date_from', time.strftime('%Y-01-01')) date_to = context.get('date_to', time.strftime('%Y-12-31')) invoice_st...
470,921
def inv_line_create(self, cr, uid, a, ol): return (0, False, { 'name': ol.name, 'account_id': a, 'price_unit': ol.price_unit or 0.0, 'quantity': ol.product_qty, 'product_id': ol.product_id.id or False, 'uos_id': ol.product_uom.id or False, 'invoice_line_tax_id': [(6, 0, [x.id for x in ol.taxes_id])], 'account_analytic_...
def inv_line_create(self, cr, uid, a, ol): return (0, False, { 'name': ol.name, 'account_id': a.id, 'price_unit': ol.price_unit or 0.0, 'quantity': ol.product_qty, 'product_id': ol.product_id.id or False, 'uos_id': ol.product_uom.id or False, 'invoice_line_tax_id': [(6, 0, [x.id for x in ol.taxes_id])], 'account_analyt...
470,922
def inv_line_create(self, cr, uid, a, ol): return (0, False, { 'name': ol.name, 'account_id': a, 'price_unit': ol.price_unit or 0.0, 'quantity': ol.product_qty, 'product_id': ol.product_id.id or False, 'uos_id': ol.product_uom.id or False, 'invoice_line_tax_id': [(6, 0, [x.id for x in ol.taxes_id])], 'account_analytic_...
def inv_line_create(self, cr, uid, a, ol): return (0, False, { 'name': ol.name, 'account_id': a, 'price_unit': ol.price_unit or 0.0, 'quantity': ol.product_qty, 'product_id': ol.product_id.id or False, 'uos_id': ol.product_uom.id or False, 'invoice_line_tax_id': [(6, 0, [x.id for x in ol.taxes_id])], 'account_analytic_...
470,923
def find(self, cr, uid, dt=None, context={}): if not dt: dt = time.strftime('%Y-%m-%d')
def find(self, cr, uid, dt=None, context={}): if not dt: dt = time.strftime('%Y-%m-%d')
470,924
def init_db(cr): import addons f = addons.get_module_resource('base', 'base.sql') for line in file_open(f).read().split(';'): if (len(line)>0) and (not line.isspace()): cr.execute(line) cr.commit() for i in addons.get_modules(): mod_path = addons.get_module_path(i) if not mod_path: continue info = addons.load_informa...
def init_db(cr): import addons f = addons.get_module_resource('base', 'base.sql') for line in file_open(f).read().split(';'): if (len(line)>0) and (not line.isspace()): cr.execute(line) cr.commit() for i in addons.get_modules(): mod_path = addons.get_module_path(i) if not mod_path: continue info = addons.load_informa...
470,925
def __init__(self, parent, ira_browse, mode): nodes.node_descriptor.__init__(self, parent) if mode.endswith('b'): mode = mode[:-1] if mode in ('r', 'r+'): cr.execute('SELECT db_datas FROM ir_attachment WHERE id = %s', ira_browse.id) data = cr.fetchone()[0] StringIO.__init__(self, data) elif mode in ('w', 'w+'): String...
def __init__(self, parent, ira_browse, mode): nodes.node_descriptor.__init__(self, parent) if mode.endswith('b'): mode = mode[:-1] if mode in ('r', 'r+'): cr = ira_browse._cr cr.execute('SELECT db_datas FROM ir_attachment WHERE id = %s',(ira_browse.id,)) data = cr.fetchone()[0] StringIO.__init__(self, data) elif mode ...
470,926
def close(self): # we now open a *separate* cursor, to update the data. # FIXME: this may be improved, for concurrency handling par = self._get_parent() uid = par.context.uid cr = pooler.get_db(par.context.dbname).cursor() try: if self.mode in ('w', 'w+', 'r+'): out = self.getvalue() cr.execute("UPDATE ir_attachment SE...
def close(self): # we now open a *separate* cursor, to update the data. # FIXME: this may be improved, for concurrency handling par = self._get_parent() uid = par.context.uid cr = pooler.get_db(par.context.dbname).cursor() try: if self.mode in ('w', 'w+', 'r+'): data = self.getvalue() out = psycopg2.Binary(data) cr.exe...
470,927
def close(self): # we now open a *separate* cursor, to update the data. # FIXME: this may be improved, for concurrency handling par = self._get_parent() uid = par.context.uid cr = pooler.get_db(par.context.dbname).cursor() try: if self.mode in ('w', 'w+', 'r+'): out = self.getvalue() cr.execute("UPDATE ir_attachment SE...
def close(self): # we now open a *separate* cursor, to update the data. # FIXME: this may be improved, for concurrency handling par = self._get_parent() uid = par.context.uid cr = pooler.get_db(par.context.dbname).cursor() try: if self.mode in ('w', 'w+', 'r+'): data = self.getvalue() out = psycopg2.Binary(data) cr.exe...
470,928
def close(self): # we now open a *separate* cursor, to update the data. # FIXME: this may be improved, for concurrency handling par = self._get_parent() uid = par.context.uid cr = pooler.get_db(par.context.dbname).cursor() try: if self.mode in ('w', 'w+', 'r+'): out = self.getvalue() cr.execute("UPDATE ir_attachment SE...
def close(self): # we now open a *separate* cursor, to update the data. # FIXME: this may be improved, for concurrency handling par = self._get_parent() uid = par.context.uid cr = pooler.get_db(par.context.dbname).cursor() try: if self.mode in ('w', 'w+', 'r+'): out = self.getvalue() cr.execute("UPDATE ir_attachment SE...
470,929
def close(self): # we now open a *separate* cursor, to update the data. # FIXME: this may be improved, for concurrency handling par = self._get_parent() uid = par.context.uid cr = pooler.get_db(par.context.dbname).cursor() try: if self.mode in ('w', 'w+', 'r+'): out = self.getvalue() cr.execute("UPDATE ir_attachment SE...
def close(self): # we now open a *separate* cursor, to update the data. # FIXME: this may be improved, for concurrency handling par = self._get_parent() uid = par.context.uid cr = pooler.get_db(par.context.dbname).cursor() try: if self.mode in ('w', 'w+', 'r+'): out = self.getvalue() cr.execute("UPDATE ir_attachment SE...
470,930
def set_data(self, cr, uid, id, file_node, data, context=None, fil_obj=None): """ store the data. This function MUST be used from an ir.attachment. It wouldn't make sense to store things persistently for other types (dynamic). """ if not context: context = {} boo = self.browse(cr, uid, id, context) if fil_obj: ira = fi...
def set_data(self, cr, uid, id, file_node, data, context=None, fil_obj=None): """ store the data. This function MUST be used from an ir.attachment. It wouldn't make sense to store things persistently for other types (dynamic). """ if not context: context = {} boo = self.browse(cr, uid, id, context) if fil_obj: ira = fi...
470,931
def onchange_stage_id(self, cr, uid, ids, stage_id, context={}):
def onchange_stage_id(self, cr, uid, ids, stage_id, context={}):
470,932
def _check_recursion(self, cr, uid, ids, context=None): level = 100 while len(ids): cr.execute('select distinct parent_id from hr_employee_category where id IN %s', (tuple(ids), )) ids = filter(None, map(lambda x:x[0], cr.fetchall())) if not level: return False level -= 1 return True
def _check_recursion(self, cr, uid, ids, context=None): level = 100 while len(ids): cr.execute('select distinct parent_id from hr_employee_category where id IN %s', (tuple(ids), )) ids = filter(None, map(lambda x:x[0], cr.fetchall())) if not level: return False level -= 1 return True
470,933
def action_move_create(self, cr, uid, ids, *args): """Creates invoice related analytics and financial move lines""" ait_obj = self.pool.get('account.invoice.tax') cur_obj = self.pool.get('res.currency') context = {} for inv in self.browse(cr, uid, ids): if not inv.journal_id.invoice_sequence_id: raise osv.except_osv(_(...
def action_move_create(self, cr, uid, ids, *args): """Creates invoice related analytics and financial move lines""" ait_obj = self.pool.get('account.invoice.tax') cur_obj = self.pool.get('res.currency') context = {} for inv in self.browse(cr, uid, ids): if not inv.journal_id.invoice_sequence_id: raise osv.except_osv(_(...
470,934
def action_number(self, cr, uid, ids, *args): for obj_inv in self.browse(cr, uid, ids): id = obj_inv.id invtype = obj_inv.type number = obj_inv.number move_id = obj_inv.move_id and obj_inv.move_id.id or False reference = obj_inv.reference if not number: tmp_context = { 'fiscalyear_id': inv.period_id.fiscalyear_id.id } ...
def action_number(self, cr, uid, ids, *args): for obj_inv in self.browse(cr, uid, ids): id = obj_inv.id invtype = obj_inv.type number = obj_inv.number move_id = obj_inv.move_id and obj_inv.move_id.id or False reference = obj_inv.reference if not number: tmp_context = { 'fiscalyear_id': obj_inv.period_id.fiscalyear_id.i...
470,935
def action_number(self, cr, uid, ids, *args): for obj_inv in self.browse(cr, uid, ids): id = obj_inv.id invtype = obj_inv.type number = obj_inv.number move_id = obj_inv.move_id and obj_inv.move_id.id or False reference = obj_inv.reference if not number: tmp_context = { 'fiscalyear_id': inv.period_id.fiscalyear_id.id } ...
def action_number(self, cr, uid, ids, *args): for obj_inv in self.browse(cr, uid, ids): id = obj_inv.id invtype = obj_inv.type number = obj_inv.number move_id = obj_inv.move_id and obj_inv.move_id.id or False reference = obj_inv.reference if not number: tmp_context = { 'fiscalyear_id': inv.period_id.fiscalyear_id.id } ...
470,936
def _get_line_tax(self, line_obj): self.cr.execute("SELECT tax_id FROM purchase_order_taxe WHERE order_line_id=%s", (line_obj.id)) res = self.cr.fetchall() or None if not res: return "" if isinstance(res, list): tax_ids = [t[0] for t in res] else: tax_ids = res[0] res = [tax.name for tax in pooler.get_pool(cr.dbname).g...
def _get_line_tax(self, line_obj): self.cr.execute("SELECT tax_id FROM purchase_order_taxe WHERE order_line_id=%s", (line_obj.id)) res = self.cr.fetchall() or None if not res: return "" if isinstance(res, list): tax_ids = [t[0] for t in res] else: tax_ids = res[0] res = [tax.name for tax in pooler.get_pool(self.cr.dbna...
470,937
def _get_tax(self, order_obj): self.cr.execute("SELECT DISTINCT tax_id FROM purchase_order_taxe, purchase_order_line, purchase_order \ WHERE (purchase_order_line.order_id=purchase_order.id) AND (purchase_order.id=%s)", (order_obj.id)) res = self.cr.fetchall() or None if not res: return [] if isinstance(res, list): tax_...
def _get_tax(self, order_obj): self.cr.execute("SELECT DISTINCT tax_id FROM purchase_order_taxe, purchase_order_line, purchase_order \ WHERE (purchase_order_line.order_id=purchase_order.id) AND (purchase_order.id=%s)", (order_obj.id)) res = self.cr.fetchall() or None if not res: return [] if isinstance(res, list): tax_...
470,938
def _get_tax(self, order_obj): self.cr.execute("SELECT DISTINCT tax_id FROM purchase_order_taxe, purchase_order_line, purchase_order \ WHERE (purchase_order_line.order_id=purchase_order.id) AND (purchase_order.id=%s)", (order_obj.id)) res = self.cr.fetchall() or None if not res: return [] if isinstance(res, list): tax_...
def _get_tax(self, order_obj): self.cr.execute("SELECT DISTINCT tax_id FROM purchase_order_taxe, purchase_order_line, purchase_order \ WHERE (purchase_order_line.order_id=purchase_order.id) AND (purchase_order.id=%s)", (order_obj.id)) res = self.cr.fetchall() or None if not res: return [] if isinstance(res, list): tax_...
470,939
def _get_order(self, cr, uid, ids, context=None): if context is None: context = {} result = {} for line in self.pool.get('sale.order.line').browse(cr, uid, ids, context=context): result[line.order_id.id] = True return result.keys()
def _get_order(self, cr, uid, ids, context=None): if context is None: context = {} result = {} for line in self.pool.get('sale.order.line').browse(cr, uid, ids, context=context): result[line.order_id.id] = True return result.keys()
470,940
def vaccum(self, cr, uid): self.check_id += 1 if self.check_id % self._check_time: return True tounlink = [] max = time.time() - self._max_hours * 60 * 60 for id in self.datas: if self.datas[id]['internal.date_access'] < max: tounlink.append(id) self.unlink(cr, uid, tounlink) if len(self.datas)>self._max_count: sorted ...
def vaccum(self, cr, uid): self.check_id += 1 if self.check_id % self._check_time: return True tounlink = [] max = time.time() - self._max_hours * 60 * 60 for id in self.datas: if self.datas[id]['internal.date_access'] < max: tounlink.append(id) self.unlink(cr, 1, tounlink) if len(self.datas)>self._max_count: sorted = ...
470,941
def __init__(self, string='unknown', required=False, readonly=False, domain=None, context='', states=None, priority=0, change_default=False, size=None, ondelete="set null", translate=False, select=False, **args): self.states = states or {} self.string = string self.readonly = readonly self.required = required self.size...
def __init__(self, string='unknown', required=False, readonly=False, domain=None, context={}, states=None, priority=0, change_default=False, size=None, ondelete="set null", translate=False, select=False, **args): self.states = states or {} self.string = string self.readonly = readonly self.required = required self.size...
470,942
def view_init(self, cr, uid, fields_list, context=None): """ Creates view dynamically and adding fields at runtime. @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: New arch of view with new columns. """ res = sup...
def view_init(self, cr, uid, fields_list, context=None): """ Creates view dynamically and adding fields at runtime. @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: New arch of view with new columns. """ res = sup...
470,943
def view_init(self, cr, uid, fields_list, context=None): """ Creates view dynamically and adding fields at runtime. @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: New arch of view with new columns. """ res = sup...
def view_init(self, cr, uid, fields_list, context=None): """ Creates view dynamically and adding fields at runtime. @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: New arch of view with new columns. """ res = sup...
470,944
def view_init(self, cr, uid, fields_list, context=None): """ Creates view dynamically and adding fields at runtime. @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: New arch of view with new columns. """ res = sup...
def view_init(self, cr, uid, fields_list, context=None): """ Creates view dynamically and adding fields at runtime. @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: New arch of view with new columns. """ res = sup...
470,945
def view_init(self, cr, uid, fields_list, context=None): """ Creates view dynamically and adding fields at runtime. @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: New arch of view with new columns. """ res = sup...
def view_init(self, cr, uid, fields_list, context=None): """ Creates view dynamically and adding fields at runtime. @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: New arch of view with new columns. """ res = sup...
470,946
def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False, submenu=False): """ Changes the view dynamically @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: New arch of view. "...
def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False, submenu=False): """ Changes the view dynamically @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: New arch of view. "...
470,947
def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False, submenu=False): """ Changes the view dynamically @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: New arch of view. "...
def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False, submenu=False): """ Changes the view dynamically @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: New arch of view. "...
470,948
def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False, submenu=False): """ Changes the view dynamically @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: New arch of view. "...
def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False, submenu=False): """ Changes the view dynamically @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: New arch of view. "...
470,949
def create_returns(self, cr, uid, ids, context): """ Creates return picking. @param self: The object pointer. @param cr: A database cursor @param uid: ID of the user currently logged in @param ids: List of ids selected @param context: A standard dictionary @return: A dictionary which of fields with values. """ record_i...
def create_returns(self, cr, uid, ids, context): """ Creates return picking. @param self: The object pointer. @param cr: A database cursor @param uid: ID of the user currently logged in @param ids: List of ids selected @param context: A standard dictionary @return: A dictionary which of fields with values. """ record_i...
470,950
def create_returns(self, cr, uid, ids, context): """ Creates return picking. @param self: The object pointer. @param cr: A database cursor @param uid: ID of the user currently logged in @param ids: List of ids selected @param context: A standard dictionary @return: A dictionary which of fields with values. """ record_i...
def create_returns(self, cr, uid, ids, context): """ Creates return picking. @param self: The object pointer. @param cr: A database cursor @param uid: ID of the user currently logged in @param ids: List of ids selected @param context: A standard dictionary @return: A dictionary which of fields with values. """ record_i...
470,951
def create_returns(self, cr, uid, ids, context): """ Creates return picking. @param self: The object pointer. @param cr: A database cursor @param uid: ID of the user currently logged in @param ids: List of ids selected @param context: A standard dictionary @return: A dictionary which of fields with values. """ record_i...
def create_returns(self, cr, uid, ids, context): """ Creates return picking. @param self: The object pointer. @param cr: A database cursor @param uid: ID of the user currently logged in @param ids: List of ids selected @param context: A standard dictionary @return: A dictionary which of fields with values. """ record_i...
470,952
def create_returns(self, cr, uid, ids, context): """ Creates return picking. @param self: The object pointer. @param cr: A database cursor @param uid: ID of the user currently logged in @param ids: List of ids selected @param context: A standard dictionary @return: A dictionary which of fields with values. """ record_i...
def create_returns(self, cr, uid, ids, context): """ Creates return picking. @param self: The object pointer. @param cr: A database cursor @param uid: ID of the user currently logged in @param ids: List of ids selected @param context: A standard dictionary @return: A dictionary which of fields with values. """ record_i...
470,953
def create_returns(self, cr, uid, ids, context): """ Creates return picking. @param self: The object pointer. @param cr: A database cursor @param uid: ID of the user currently logged in @param ids: List of ids selected @param context: A standard dictionary @return: A dictionary which of fields with values. """ record_i...
def create_returns(self, cr, uid, ids, context): """ Creates return picking. @param self: The object pointer. @param cr: A database cursor @param uid: ID of the user currently logged in @param ids: List of ids selected @param context: A standard dictionary @return: A dictionary which of fields with values. """ record_i...
470,954
def create_returns(self, cr, uid, ids, context): """ Creates return picking. @param self: The object pointer. @param cr: A database cursor @param uid: ID of the user currently logged in @param ids: List of ids selected @param context: A standard dictionary @return: A dictionary which of fields with values. """ record_i...
def create_returns(self, cr, uid, ids, context): """ Creates return picking. @param self: The object pointer. @param cr: A database cursor @param uid: ID of the user currently logged in @param ids: List of ids selected @param context: A standard dictionary @return: A dictionary which of fields with values. """ record_i...
470,955
def create_returns(self, cr, uid, ids, context): """ Creates return picking. @param self: The object pointer. @param cr: A database cursor @param uid: ID of the user currently logged in @param ids: List of ids selected @param context: A standard dictionary @return: A dictionary which of fields with values. """ record_i...
def create_returns(self, cr, uid, ids, context): """ Creates return picking. @param self: The object pointer. @param cr: A database cursor @param uid: ID of the user currently logged in @param ids: List of ids selected @param context: A standard dictionary @return: A dictionary which of fields with values. """ record_i...
470,956
def create_returns(self, cr, uid, ids, context): """ Creates return picking. @param self: The object pointer. @param cr: A database cursor @param uid: ID of the user currently logged in @param ids: List of ids selected @param context: A standard dictionary @return: A dictionary which of fields with values. """ record_i...
def create_returns(self, cr, uid, ids, context): """ Creates return picking. @param self: The object pointer. @param cr: A database cursor @param uid: ID of the user currently logged in @param ids: List of ids selected @param context: A standard dictionary @return: A dictionary which of fields with values. """ record_i...
470,957
def _get_source(self, cr, uid, name, tt, lang, source=None): if not lang: return '' if source: #if isinstance(source, unicode): # source = source.encode('utf8') cr.execute('select value ' \ 'from ir_translation ' \ 'where lang=%s ' \ 'and type=%s ' \ 'and name=%s ' \ 'and src=%s', (lang, tt, tools.ustr(name), source)...
def _get_source(self, cr, uid, name, tt, lang, source=None): if not lang: return '' if source: #if isinstance(source, unicode): # source = source.encode('utf8') cr.execute('select value ' \ 'from ir_translation ' \ 'where lang=%s ' \ 'and type=%s ' \ 'and name=%s ' \ 'and src=%s', (lang or '', tt, tools.ustr(name), s...
470,958
def _get_source(self, cr, uid, name, tt, lang, source=None): if not lang: return '' if source: #if isinstance(source, unicode): # source = source.encode('utf8') cr.execute('select value ' \ 'from ir_translation ' \ 'where lang=%s ' \ 'and type=%s ' \ 'and name=%s ' \ 'and src=%s', (lang, tt, tools.ustr(name), source)...
def _get_source(self, cr, uid, name, tt, lang, source=None): if not lang: return '' if source: #if isinstance(source, unicode): # source = source.encode('utf8') cr.execute('select value ' \ 'from ir_translation ' \ 'where lang=%s ' \ 'and type=%s ' \ 'and name=%s ' \ 'and src=%s', (lang, tt, tools.ustr(name), source)...
470,959
def _record_to_report_line(record): return {'date': record.date, 'ref': record.ref, 'acode': record.account_id.code, 'name': record.name, 'debit': record.debit, 'credit': record.credit, 'pname': record.partner_id and record.partner_id.name or '', 'country': _get_country(record) }
def _record_to_report_line(record): return {'date': record.date, 'ref': record.ref, 'acode': record.account_id.code, 'name': record.name, 'debit': record.debit, 'credit': record.credit, 'pname': record.partner_id and record.partner_id.name or '', 'country': _get_country(record) }
470,960
def create_payment(self, cr, uid, ids, context=None): order_obj = self.pool.get('payment.order') line_obj = self.pool.get('account.move.line') payment_obj = self.pool.get('payment.line') if context is None: context = {} data = self.read(cr, uid, ids, [])[0] line_ids = data['entries'] if not line_ids: return {}
def create_payment(self, cr, uid, ids, context=None): order_obj = self.pool.get('payment.order') line_obj = self.pool.get('account.move.line') payment_obj = self.pool.get('payment.line') if context is None: context = {} data = self.read(cr, uid, ids, [])[0] line_ids = data['entries'] if not line_ids: return {}
470,961
def fields_view_get(self, cr, uid, view_id=None, view_type='form', context={}, toolbar=False, submenu=False): result = super(osv.osv, self).fields_view_get(cr, uid, view_id,view_type,context,toolbar=toolbar, submenu=submenu) if view_type != 'tree': return result
def fields_view_get(self, cr, uid, view_id=None, view_type='form', context={}, toolbar=False, submenu=False): result = super(osv.osv, self).fields_view_get(cr, uid, view_id,view_type,context,toolbar=toolbar, submenu=submenu) if view_type != 'tree': return result
470,962
def _compute_date(self, cr, uid, data, context):
def _compute_date(self, cr, uid, data, context):
470,963
def _compute_date(self, cr, uid, data, context):
def _compute_date(self, cr, uid, data, context):
470,964
def _compute_date(self, cr, uid, data, context):
def _compute_date(self, cr, uid, data, context):
470,965
def _compute_date(self, cr, uid, data, context):
def _compute_date(self, cr, uid, data, context):
470,966
def _compute_date(self, cr, uid, data, context):
def _compute_date(self, cr, uid, data, context):
470,967
def _compute_date(self, cr, uid, data, context):
def _compute_date(self, cr, uid, data, context):
470,968
def _compute_date(self, cr, uid, data, context):
def _compute_date(self, cr, uid, data, context):
470,969
def _compute_date(self, cr, uid, data, context):
def _compute_date(self, cr, uid, data, context):
470,970
def Project_1(): resource = user title = project.name start = ndt effort = hours
def Project_1(): resource = user title = project.name start = new_dt effort = hours
470,971
def task1(): start = ndt effort = hours title = task_obj[i].name
def task1(): start = new_dt effort = hours title = task_obj[i].name
470,972
def __init__(self, model, action, **kwargs): self.model = model self.action = action super(Workflow, self).__init__(**kwargs)
def __init__(self, model, action, **kwargs): self.model = model self.action = action super(Workflow, self).__init__(**kwargs)
470,973
def __init__(self, expression): self.expression = expression super(Eval, self).__init__()
def __init__(self, expression): self.expression = expression super(Eval, self).__init__()
470,974
def ref_constructor(loader, node): xmlid = loader.construct_scalar(node) return Ref(xmlid)
def ir_set_constructor(loader, node): kwargs = loader.construct_mapping(node) return IrSet(**kwargs)
470,975
def ref_constructor(loader, node): xmlid = loader.construct_scalar(node) return Ref(xmlid)
def ref_constructor(loader, node): xmlid = loader.construct_scalar(node) return Ref(xmlid)
470,976
def is_ref(node): return isinstance(node, Ref)
def is_ir_set(node): return _is_yaml_mapping(node, IrSet)
470,977
def _get_photo(self, cr, uid, context=None): paths = tools.config['addons_path'].split(",") for path in paths: full_path = os.path.join(path, 'hr/image', 'photo.png') if os.path.exists(full_path): return open(full_path,'rb') .read().encode('base64') raise Exception("photo.png could not be found")
def _get_photo(self, cr, uid, context=None): paths = tools.config['addons_path'].split(",") for path in paths: full_path = os.path.join(path, 'hr/image', 'photo.png') if os.path.exists(full_path): return open(full_path,'rb') .read().encode('base64') raise Exception("photo.png could not be found")
470,978
def create_shortcut(self, cr, uid, values, context={}): dataobj = self.pool.get('ir.model.data') menu_id = dataobj._get_id(cr, uid, 'base', 'menu_administration_shortcut', context) shortcut_menu_id = int(dataobj.read(cr, uid, menu_id, ['res_id'], context)['res_id']) action_id = self.pool.get('ir.actions.act_window').c...
def create_shortcut(self, cr, uid, values, context={}): dataobj = self.pool.get('ir.model.data') new_context = context.copy() for key in context: if key.startswith('default_'): del new_context[key] menu_id = dataobj._get_id(cr, uid, 'base', 'menu_administration_shortcut', new_context) shortcut_menu_id = int(dataobj.r...
470,979
def create_shortcut(self, cr, uid, values, context={}): dataobj = self.pool.get('ir.model.data') menu_id = dataobj._get_id(cr, uid, 'base', 'menu_administration_shortcut', context) shortcut_menu_id = int(dataobj.read(cr, uid, menu_id, ['res_id'], context)['res_id']) action_id = self.pool.get('ir.actions.act_window').c...
def create_shortcut(self, cr, uid, values, context={}): dataobj = self.pool.get('ir.model.data') menu_id = dataobj._get_id(cr, uid, 'base', 'menu_administration_shortcut', context) shortcut_menu_id = int(dataobj.read(cr, uid, menu_id, ['res_id'], context)['res_id']) action_id = self.pool.get('ir.actions.act_window').c...
470,980
def _product_partner_ref(self, cr, uid, ids, name, arg, context=None): res = {} if context is None: context = {} for p in self.browse(cr, uid, ids, context=context): data = self._get_partner_code_name(cr, uid, [], p, context.get('partner_id', None), context=context) if not data['variants']: data['variants'] = p.variant...
def _product_partner_ref(self, cr, uid, ids, name, arg, context=None): res = {} if context is None: context = {} for p in self.browse(cr, uid, ids, context=context): data = self._get_partner_code_name(cr, uid, [], p, context.get('partner_id', None), context=context) if not data['variants']: data['variants'] = p.variant...
470,981
def onchange_partner_id(self, cr, uid, ids, partner_id, journal_id=False, price=0.0, ttype=False, context={}): """price Returns a dict that contains new values and context @param partner_id: latest value from user input for field partner_id @param args: other arguments @param context: context arguments, like lang, tim...
def onchange_partner_id(self, cr, uid, ids, partner_id, journal_id=False, price=0.0, currency_id=False, ttype=False, context={}): """price Returns a dict that contains new values and context @param partner_id: latest value from user input for field partner_id @param args: other arguments @param context: context argume...
470,982
def onchange_partner_id(self, cr, uid, ids, partner_id, journal_id=False, price=0.0, ttype=False, context={}): """price Returns a dict that contains new values and context @param partner_id: latest value from user input for field partner_id @param args: other arguments @param context: context arguments, like lang, tim...
def onchange_partner_id(self, cr, uid, ids, partner_id, journal_id=False, price=0.0, ttype=False, context={}): """price Returns a dict that contains new values and context @param partner_id: latest value from user input for field partner_id @param args: other arguments @param context: context arguments, like lang, tim...
470,983
def onchange_partner_id(self, cr, uid, ids, partner_id, journal_id=False, price=0.0, ttype=False, context={}): """price Returns a dict that contains new values and context @param partner_id: latest value from user input for field partner_id @param args: other arguments @param context: context arguments, like lang, tim...
def onchange_partner_id(self, cr, uid, ids, partner_id, journal_id=False, price=0.0, ttype=False, context={}): """price Returns a dict that contains new values and context @param partner_id: latest value from user input for field partner_id @param args: other arguments @param context: context arguments, like lang, tim...
470,984
def onchange_company_id(self, cr, uid, ids, company_id, part_id, type, invoice_line, currency_id): val={} dom={} if company_id and part_id and type: acc_id = False partner_obj = self.pool.get('res.partner').browse(cr,uid,part_id) if partner_obj.property_account_payable and partner_obj.property_account_receivable: if pa...
def onchange_company_id(self, cr, uid, ids, company_id, part_id, type, invoice_line, currency_id): val = {} dom = {} obj_journal = self.pool.get('account.journal') if company_id and part_id and type: acc_id = False partner_obj = self.pool.get('res.partner').browse(cr,uid,part_id) if partner_obj.property_account_payable...
470,985
def onchange_company_id(self, cr, uid, ids, company_id, part_id, type, invoice_line, currency_id): val={} dom={} if company_id and part_id and type: acc_id = False partner_obj = self.pool.get('res.partner').browse(cr,uid,part_id) if partner_obj.property_account_payable and partner_obj.property_account_receivable: if pa...
def onchange_company_id(self, cr, uid, ids, company_id, part_id, type, invoice_line, currency_id): val={} dom={} if company_id and part_id and type: acc_id = False partner_obj = self.pool.get('res.partner').browse(cr,uid,part_id) if partner_obj.property_account_payable and partner_obj.property_account_receivable: if pa...
470,986
def onchange_company_id(self, cr, uid, ids, company_id, part_id, type, invoice_line, currency_id): val={} dom={} if company_id and part_id and type: acc_id = False partner_obj = self.pool.get('res.partner').browse(cr,uid,part_id) if partner_obj.property_account_payable and partner_obj.property_account_receivable: if pa...
def onchange_company_id(self, cr, uid, ids, company_id, part_id, type, invoice_line, currency_id): val={} dom={} if company_id and part_id and type: acc_id = False partner_obj = self.pool.get('res.partner').browse(cr,uid,part_id) if partner_obj.property_account_payable and partner_obj.property_account_receivable: if pa...
470,987
def get_lines_another(self, group): return self.result.get(group, [])
def get_lines_another(self, group): return self.result.get(group, [])
470,988
def _name_get_fnc(self, cr, uid, ids, prop, unknow_none, context=None): res = self.name_get(cr, uid, ids, context=context) return dict(res)
def _name_get_fnc(self, cr, uid, ids, prop, unknow_none, context=None): res = self.name_get(cr, uid, ids, context=context) return dict(res)
470,989
def _name_get_fnc(self, cr, uid, ids, prop, unknow_none, context=None): res = self.name_get(cr, uid, ids, context=context) return dict(res)
def _name_get_fnc(self, cr, uid, ids, prop, unknow_none, context=None): res = self.name_get(cr, uid, ids, context=context) return dict(res)
470,990
def default_get(self, cr, uid, fields, context=None): data = super(outlook_installer, self).default_get(cr, uid, fields, context=context) data['doc_file'] = 'http://doc.openerp.com/book/2/2_6_Comms/2_6_Comms_outlook.html' file = open(addons.get_module_resource('outlook','plugin','openerp-outlook-addin.exe'), 'r') data[...
def default_get(self, cr, uid, fields, context=None): data = super(outlook_installer, self).default_get(cr, uid, fields, context=context) data['doc_file'] = 'http://doc.openerp.com/book/2/2_6_Comms/2_6_Comms_outlook.html' file = open(addons.get_module_resource('outlook','plugin','openerp-outlook-addin.exe'), 'r') data[...
470,991
def run(self, cr, uid, ids, context={}): logger = netsvc.Logger() for action in self.browse(cr, uid, ids, context): obj_pool = self.pool.get(action.model_id.model) obj = obj_pool.browse(cr, uid, context['active_id'], context=context) cxt = { 'context':context, 'object': obj, 'time':time, 'cr': cr, 'pool' : self.pool, ...
def run(self, cr, uid, ids, context={}): logger = netsvc.Logger() for action in self.browse(cr, uid, ids, context): obj_pool = self.pool.get(action.model_id.model) obj = obj_pool.browse(cr, uid, context['active_id'], context=context) cxt = { 'context':context, 'object': obj, 'time':time, 'cr': cr, 'pool' : self.pool, ...
470,992
def search(self, cr, uid, args, offset = 0, limit = None, order = None, context = None, count = False): if context and context.has_key('parent_schema_id'): args = [('schema_id', '=', context['parent_schema_id'])]
def search(self, cr, uid, args, offset = 0, limit = None, order = None, context = None, count = False): if context and context.has_key('parent_schema_id'): args = [('schema_id', '=', context['parent_schema_id'])]
470,993
def exp_execute(self, db, uid, wiz_id, datas, action='init', context=None): if wiz_id not in self.wiz_uid: # TODO: To Check why need it #if wiz_id == 1: # wiz_name ='base_setup.base_setup' #if wiz_id == 2: # wiz_name ='module.upgrade' super(virtual_wizard,self).exp_create(db, uid, wiz_name, datas) new_ids = [] if...
def exp_execute(self, db, uid, wiz_id, datas, action='init', context=None): if wiz_id not in self.wiz_uid: # TODO: To Check why need it #if wiz_id == 1: # wiz_name ='base_setup.base_setup' #if wiz_id == 2: # wiz_name ='module.upgrade' super(virtual_wizard,self).exp_create(db, uid, wiz_name, datas) new_ids = [] if...
470,994
def _if_account(self, cr, uid, ids, context=None): chart = self.read(cr, uid, ids, ['charts'], context=context)[0]['charts'] self.logger.notifyChannel( 'installer', netsvc.LOG_DEBUG, 'Addon "account" selected, installing chart of accounts %s'%chart) return [chart]
def _if_account(self, cr, uid, ids, context=None): chart = self.read(cr, uid, ids, ['charts'], context=context)[0]['charts'] self.logger.notifyChannel( 'installer', netsvc.LOG_DEBUG, 'Addon "account" selected, installing chart of accounts %s'%chart) return [chart]
470,995
def create(self, cr, user, vals, context=None): if ('name' not in vals) or (vals.get('name')=='/'): seq_obj_name = 'stock.picking.' + vals['type'] vals['name'] = self.pool.get('ir.sequence').get(cr, user, seq_obj_name) type_list = { 'out':_('Packing List'), 'in':_('Reception'), 'internal': _('Internal picking'), 'deli...
def create(self, cr, user, vals, context=None): if ('name' not in vals) or (vals.get('name')=='/'): seq_obj_name = 'stock.picking.' + vals['type'] vals['name'] = self.pool.get('ir.sequence').get(cr, user, seq_obj_name) type_list = { 'out':_('Packing List'), 'in':_('Reception'), 'internal': _('Internal picking'), 'deli...
470,996
def _product_available(self, cr, uid, ids, field_names=None, arg=False, context=None): """ Finds the incoming and outgoing quantity of product. @return: Dictionary of values """ if not field_names: field_names = [] if context is None: context = {} res = {} for id in ids: res[id] = {}.fromkeys(field_names, 0.0) for f in...
def _product_available(self, cr, uid, ids, field_names=None, arg=False, context=None): """ Finds the incoming and outgoing quantity of product. @return: Dictionary of values """ if not field_names: field_names = [] if context is None: context = {} res = {} for id in ids: res[id] = {}.fromkeys(field_names, 0.0) for f in...
470,997
def view_init(self, cr, uid, fields_list, context=None): """ Creates view dynamically and adding fields at runtime. @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: New arch of view with new columns. """ res = sup...
def view_init(self, cr, uid, fields_list, context=None): """ Creates view dynamically and adding fields at runtime. @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: New arch of view with new columns. """ res = sup...
470,998
def onchange_uos_quantity(self, cr, uid, ids, product_id, product_uos_qty, product_uos, product_uom): """ On change of product quantity finds UoM and UoS quantities @param product_id: Product id @param product_uos_qty: Changed UoS Quantity of product @param product_uom: Unit of measure of product @param product_uos: Un...
def onchange_uos_quantity(self, cr, uid, ids, product_id, product_uos_qty, product_uos, product_uom): """ On change of product quantity finds UoM and UoS quantities @param product_id: Product id @param product_uos_qty: Changed UoS Quantity of product @param product_uom: Unit of measure of product @param product_uos: Un...
470,999