rem stringlengths 1 322k | add stringlengths 0 2.05M | context stringlengths 4 228k | meta stringlengths 156 215 |
|---|---|---|---|
if quantity_rest > 0: | if quantity_rest > 0: | def consume_moves(self, cr, uid, ids, quantity, location_id=False, location_dest_id=False, consume=True, context=None): if not context: context = {} if quantity <= 0: raise osv.except_osv(_('Warning!'), _('Please provide Proper Quantity !')) | d1c818f1f1c2c2310b1b2eff79c5c8c61511f900 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/d1c818f1f1c2c2310b1b2eff79c5c8c61511f900/stock.py |
'product_qty': quantity, 'product_uos_qty': uos_qty, 'state': move.state, | 'product_qty': quantity, 'product_uos_qty': uos_qty, 'state': move.state, | def consume_moves(self, cr, uid, ids, quantity, location_id=False, location_dest_id=False, consume=True, context=None): if not context: context = {} if quantity <= 0: raise osv.except_osv(_('Warning!'), _('Please provide Proper Quantity !')) | d1c818f1f1c2c2310b1b2eff79c5c8c61511f900 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/d1c818f1f1c2c2310b1b2eff79c5c8c61511f900/stock.py |
default_val.update({'location_dest_id': location_dest_id}) | default_val.update({'location_dest_id': location_dest_id}) | def consume_moves(self, cr, uid, ids, quantity, location_id=False, location_dest_id=False, consume=True, context=None): if not context: context = {} if quantity <= 0: raise osv.except_osv(_('Warning!'), _('Please provide Proper Quantity !')) | d1c818f1f1c2c2310b1b2eff79c5c8c61511f900 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/d1c818f1f1c2c2310b1b2eff79c5c8c61511f900/stock.py |
default_val.update({'location_id': location_id}) | default_val.update({'location_id': location_id}) | def consume_moves(self, cr, uid, ids, quantity, location_id=False, location_dest_id=False, consume=True, context=None): if not context: context = {} if quantity <= 0: raise osv.except_osv(_('Warning!'), _('Please provide Proper Quantity !')) | d1c818f1f1c2c2310b1b2eff79c5c8c61511f900 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/d1c818f1f1c2c2310b1b2eff79c5c8c61511f900/stock.py |
update_val = {} | update_val = {} | def consume_moves(self, cr, uid, ids, quantity, location_id=False, location_dest_id=False, consume=True, context=None): if not context: context = {} if quantity <= 0: raise osv.except_osv(_('Warning!'), _('Please provide Proper Quantity !')) | d1c818f1f1c2c2310b1b2eff79c5c8c61511f900 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/d1c818f1f1c2c2310b1b2eff79c5c8c61511f900/stock.py |
update_val['product_uos_qty'] = uos_qty_rest self.write(cr, uid, [move.id], update_val) else: quantity_rest = quantity | update_val['product_uos_qty'] = uos_qty_rest self.write(cr, uid, [move.id], update_val) else: quantity_rest = quantity | def consume_moves(self, cr, uid, ids, quantity, location_id=False, location_dest_id=False, consume=True, context=None): if not context: context = {} if quantity <= 0: raise osv.except_osv(_('Warning!'), _('Please provide Proper Quantity !')) | d1c818f1f1c2c2310b1b2eff79c5c8c61511f900 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/d1c818f1f1c2c2310b1b2eff79c5c8c61511f900/stock.py |
def consume_moves(self, cr, uid, ids, quantity, location_id=False, location_dest_id=False, consume=True, context=None): if not context: context = {} if quantity <= 0: raise osv.except_osv(_('Warning!'), _('Please provide Proper Quantity !')) | d1c818f1f1c2c2310b1b2eff79c5c8c61511f900 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/d1c818f1f1c2c2310b1b2eff79c5c8c61511f900/stock.py | ||
else: res += [move.id] update_val = {} | else: res += [move.id] update_val = {} | def consume_moves(self, cr, uid, ids, quantity, location_id=False, location_dest_id=False, consume=True, context=None): if not context: context = {} if quantity <= 0: raise osv.except_osv(_('Warning!'), _('Please provide Proper Quantity !')) | d1c818f1f1c2c2310b1b2eff79c5c8c61511f900 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/d1c818f1f1c2c2310b1b2eff79c5c8c61511f900/stock.py |
update_val.update({'location_dest_id': location_dest_id}) | update_val.update({'location_dest_id': location_dest_id}) | def consume_moves(self, cr, uid, ids, quantity, location_id=False, location_dest_id=False, consume=True, context=None): if not context: context = {} if quantity <= 0: raise osv.except_osv(_('Warning!'), _('Please provide Proper Quantity !')) | d1c818f1f1c2c2310b1b2eff79c5c8c61511f900 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/d1c818f1f1c2c2310b1b2eff79c5c8c61511f900/stock.py |
update_val.update({'location_id': location_id}) | update_val.update({'location_id': location_id}) | def consume_moves(self, cr, uid, ids, quantity, location_id=False, location_dest_id=False, consume=True, context=None): if not context: context = {} if quantity <= 0: raise osv.except_osv(_('Warning!'), _('Please provide Proper Quantity !')) | d1c818f1f1c2c2310b1b2eff79c5c8c61511f900 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/d1c818f1f1c2c2310b1b2eff79c5c8c61511f900/stock.py |
self.action_done(cr, uid, res) | self.action_done(cr, uid, res) | def consume_moves(self, cr, uid, ids, quantity, location_id=False, location_dest_id=False, consume=True, context=None): if not context: context = {} if quantity <= 0: raise osv.except_osv(_('Warning!'), _('Please provide Proper Quantity !')) | d1c818f1f1c2c2310b1b2eff79c5c8c61511f900 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/d1c818f1f1c2c2310b1b2eff79c5c8c61511f900/stock.py |
def action_done(self, cr, uid, ids, context=None): for inv in self.browse(cr, uid, ids): move_ids = [] move_line = [] for line in inv.inventory_line_id: pid = line.product_id.id # price = line.product_id.standard_price or 0.0 amount = self.pool.get('stock.location')._product_get(cr, uid, line.location_id.id, [pid], {'... | d1c818f1f1c2c2310b1b2eff79c5c8c61511f900 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/d1c818f1f1c2c2310b1b2eff79c5c8c61511f900/stock.py | ||
select stock.date, min(stock.id), sum(stock.product_qty) as qty, 0 as planned_qty | select stock.date, min(stock.id) as id, sum(stock.product_qty) as qty, 0 as planned_qty | def init(self, cr): tools.drop_view_if_exists(cr, 'report_products_to_received_planned') cr.execute(""" create or replace view report_products_to_received_planned as ( select stock.date, min(stock.id), sum(stock.product_qty) as qty, 0 as planned_qty from stock_picking picking inner join stock_move stock on picking.id =... | d1c818f1f1c2c2310b1b2eff79c5c8c61511f900 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/d1c818f1f1c2c2310b1b2eff79c5c8c61511f900/stock.py |
select stock.date_planned, min(stock.id), 0 as actual_qty, sum(stock.product_qty) as planned_qty | select stock.date_planned, min(stock.id) as id, 0 as actual_qty, sum(stock.product_qty) as planned_qty | def init(self, cr): tools.drop_view_if_exists(cr, 'report_products_to_received_planned') cr.execute(""" create or replace view report_products_to_received_planned as ( select stock.date, min(stock.id), sum(stock.product_qty) as qty, 0 as planned_qty from stock_picking picking inner join stock_move stock on picking.id =... | d1c818f1f1c2c2310b1b2eff79c5c8c61511f900 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/d1c818f1f1c2c2310b1b2eff79c5c8c61511f900/stock.py |
select stock.date, min(stock.id), sum(stock.product_qty) as qty, 0 as planned_qty | select stock.date, min(stock.id) as id, sum(stock.product_qty) as qty, 0 as planned_qty | def init(self, cr): tools.drop_view_if_exists(cr, 'report_delivery_products_planned') cr.execute(""" create or replace view report_delivery_products_planned as ( select stock.date, min(stock.id), sum(stock.product_qty) as qty, 0 as planned_qty from stock_picking picking inner join stock_move stock on picking.id = stock... | d1c818f1f1c2c2310b1b2eff79c5c8c61511f900 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/d1c818f1f1c2c2310b1b2eff79c5c8c61511f900/stock.py |
select stock.date_planned, min(stock.id), 0 as actual_qty, sum(stock.product_qty) as planned_qty | select stock.date_planned, min(stock.id) as id, 0 as actual_qty, sum(stock.product_qty) as planned_qty | def init(self, cr): tools.drop_view_if_exists(cr, 'report_delivery_products_planned') cr.execute(""" create or replace view report_delivery_products_planned as ( select stock.date, min(stock.id), sum(stock.product_qty) as qty, 0 as planned_qty from stock_picking picking inner join stock_move stock on picking.id = stock... | d1c818f1f1c2c2310b1b2eff79c5c8c61511f900 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/d1c818f1f1c2c2310b1b2eff79c5c8c61511f900/stock.py |
def execute(self, cr, uid, ids, context=None): if context is None: context = {} for o in self.browse(cr, uid, ids, context=context): ir_values_obj = self.pool.get('ir.values') ir_values_obj.set(cr, uid, 'default', False, 'picking_policy', ['sale.order'], o.picking_policy) ir_values_obj.set(cr, uid, 'default', False, 'o... | be22df97d650c445b4ada0638d186aa809c4ea44 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/be22df97d650c445b4ada0638d186aa809c4ea44/sale.py | ||
result = dict([(i, {}.fromkeys(field_names, 0.0)) for i in ids]) | def _product_value(self, cr, uid, ids, field_names, arg, context=None): """Computes stock value (real and virtual) for a product, as well as stock qty (real and virtual). @param field_names: Name of field @return: Dictionary of values """ result = dict([(i, {}.fromkeys(field_names, 0.0)) for i in ids]) | 83582f7648ef1db067baa25d9616ef310c208abd /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/83582f7648ef1db067baa25d9616ef310c208abd/stock.py | |
cr.execute('select id from '+_table+' where '+self._fields_id+'=%s and id <> ALL %s', (id,tuple(ids2))) | cr.execute('select id from '+_table+' where '+self._fields_id+'=%s and id <> ALL (%s)', (id,ids2)) | def set(self, cr, obj, id, field, values, user=None, context=None): result = [] if not context: context = {} if self._context: context = context.copy() context.update(self._context) context['no_store_function'] = True if not values: return _table = obj.pool.get(self._obj)._table obj = obj.pool.get(self._obj) for act in... | 03c28818a4b9045a599846880be300b157f8ea4c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/03c28818a4b9045a599846880be300b157f8ea4c/fields.py |
arch += '<graph string="%s" type="%s" orientation="%s">' % (report.name, report.view_graph_type, report.view_graph_orientation) | orientation_eval = {'horz':'horizontal','vert' :'vertical'} orientation = eval(report.view_graph_orientation,orientation_eval) arch +='<graph string="%s" type="%s" orientation="%s">' % (report.name, report.view_graph_type, orientation) i = 0 | def fields_view_get(self, cr, user, view_id=None, view_type='form', context=None, toolbar=False, submenu=False): """ Overrides orm field_view_get. @param cr: the current row, from the database cursor, @param user: the current user’s ID for security checks, @return: Dictionary of Fields, arch and toolbar. """ if not con... | dbf0c490da7ad949900a0bf5ab2934dfd9b3c4f1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/dbf0c490da7ad949900a0bf5ab2934dfd9b3c4f1/base_report_creator.py |
i = 0 | def fields_view_get(self, cr, user, view_id=None, view_type='form', context=None, toolbar=False, submenu=False): """ Overrides orm field_view_get. @param cr: the current row, from the database cursor, @param user: the current user’s ID for security checks, @return: Dictionary of Fields, arch and toolbar. """ if not con... | dbf0c490da7ad949900a0bf5ab2934dfd9b3c4f1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/dbf0c490da7ad949900a0bf5ab2934dfd9b3c4f1/base_report_creator.py | |
groupby.append(t+'.'+f.field_id.name) | def _sql_query_get(self, cr, uid, ids, prop, unknow_none, context, where_plus=[], limit=None, offset=None): """ Get sql query which return on sql_query field. @return: Dictionary of sql query. """ result = {} for obj in self.browse(cr, uid, ids): fields = [] groupby = [] i = 0 for f in obj.field_ids: # Allowing to use ... | dbf0c490da7ad949900a0bf5ab2934dfd9b3c4f1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/dbf0c490da7ad949900a0bf5ab2934dfd9b3c4f1/base_report_creator.py | |
def check_date(self, cr, uid, vals, context=None, check=True): | def _check_date(self, cr, uid, vals, context=None, check=True): | def check_date(self, cr, uid, vals, context=None, check=True): if context is None: context = {} if 'date' in vals.keys(): if 'journal_id' in vals and 'journal_id' not in context: journal_id = vals['journal_id'] if 'period_id' in vals and 'period_id' not in context: period_id = vals['period_id'] elif 'journal_id' not in... | 7f6da82144de31c93486aa211e5774bb0357fecf /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/7f6da82144de31c93486aa211e5774bb0357fecf/account_move_line.py |
journal=self.pool.get('account.journal').browse(cr,uid,[journal_id])[0] | journal = self.pool.get('account.journal').browse(cr,uid,[journal_id])[0] | def check_date(self, cr, uid, vals, context=None, check=True): if context is None: context = {} if 'date' in vals.keys(): if 'journal_id' in vals and 'journal_id' not in context: journal_id = vals['journal_id'] if 'period_id' in vals and 'period_id' not in context: period_id = vals['period_id'] elif 'journal_id' not in... | 7f6da82144de31c93486aa211e5774bb0357fecf /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/7f6da82144de31c93486aa211e5774bb0357fecf/account_move_line.py |
period=self.pool.get('account.period').browse(cr,uid,[period_id])[0] if not time.strptime(vals['date'],'%Y-%m-%d')>=time.strptime(period.date_start,'%Y-%m-%d') and time.strptime(vals['date'],'%Y-%m-%d')<=time.strptime(period.date_stop,'%Y-%m-%d'): | period = self.pool.get('account.period').browse(cr,uid,[period_id])[0] if not time.strptime(vals['date'],'%Y-%m-%d')>=time.strptime(period.date_start,'%Y-%m-%d') or not time.strptime(vals['date'],'%Y-%m-%d')<=time.strptime(period.date_stop,'%Y-%m-%d'): | def check_date(self, cr, uid, vals, context=None, check=True): if context is None: context = {} if 'date' in vals.keys(): if 'journal_id' in vals and 'journal_id' not in context: journal_id = vals['journal_id'] if 'period_id' in vals and 'period_id' not in context: period_id = vals['period_id'] elif 'journal_id' not in... | 7f6da82144de31c93486aa211e5774bb0357fecf /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/7f6da82144de31c93486aa211e5774bb0357fecf/account_move_line.py |
self.check_date(cr, uid, vals, context, check) | self._check_date(cr, uid, vals, context, check) | def write(self, cr, uid, ids, vals, context=None, check=True, update_check=True): if not context: context={} if vals.get('account_tax_id', False): raise osv.except_osv(_('Unable to change tax !'), _('You can not change the tax, you should remove and recreate lines !')) self.check_date(cr, uid, vals, context, check) acc... | 7f6da82144de31c93486aa211e5774bb0357fecf /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/7f6da82144de31c93486aa211e5774bb0357fecf/account_move_line.py |
self.check_date(cr, uid, vals, context, check) | self._check_date(cr, uid, vals, context, check) | def create(self, cr, uid, vals, context=None, check=True): account_obj = self.pool.get('account.account') tax_obj=self.pool.get('account.tax') if context is None: context = {} self.check_date(cr, uid, vals, context, check) if ('account_id' in vals) and not account_obj.read(cr, uid, vals['account_id'], ['active'])['acti... | 7f6da82144de31c93486aa211e5774bb0357fecf /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/7f6da82144de31c93486aa211e5774bb0357fecf/account_move_line.py |
statement_id = context.get('statement_id', False) if not statement_id: return {} data = self.read(cr, uid, ids, context=context)[0] line_ids = data['line_ids'] if not line_ids: return {} | def populate_statement(self, cr, uid, ids, context=None): | 119964f10e36e9da8fca2d48580dee6f7e59f0f3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/119964f10e36e9da8fca2d48580dee6f7e59f0f3/account_statement_from_invoice.py | |
data = self.read(cr, uid, ids, context=context)[0] line_ids = data['line_ids'] | def populate_statement(self, cr, uid, ids, context=None): | 119964f10e36e9da8fca2d48580dee6f7e59f0f3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/119964f10e36e9da8fca2d48580dee6f7e59f0f3/account_statement_from_invoice.py | |
if not line_ids: return {} statement_id = 'statement_id' in context and context['statement_id'] | def populate_statement(self, cr, uid, ids, context=None): | 119964f10e36e9da8fca2d48580dee6f7e59f0f3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/119964f10e36e9da8fca2d48580dee6f7e59f0f3/account_statement_from_invoice.py | |
def message_new(self, cr, uid, msg, context): """ Automatically calls when new email message arrives @param self: The object pointer @param cr: the current row, from the database cursor, @param uid: the current user’s ID for security checks """ | 93693b7372deeedc85a79b21f4f60d0c15a83e12 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/93693b7372deeedc85a79b21f4f60d0c15a83e12/crm_lead.py | ||
def message_new(self, cr, uid, msg, context): """ Automatically calls when new email message arrives @param self: The object pointer @param cr: the current row, from the database cursor, @param uid: the current user’s ID for security checks """ | 93693b7372deeedc85a79b21f4f60d0c15a83e12 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/93693b7372deeedc85a79b21f4f60d0c15a83e12/crm_lead.py | ||
res = mailgate_pool.get_partner(cr, uid, msg.get('from')) | res = mailgate_pool.get_partner(cr, uid, msg.get('from') or msg.get_unixfrom()) | def message_new(self, cr, uid, msg, context): """ Automatically calls when new email message arrives @param self: The object pointer @param cr: the current row, from the database cursor, @param uid: the current user’s ID for security checks """ | 93693b7372deeedc85a79b21f4f60d0c15a83e12 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/93693b7372deeedc85a79b21f4f60d0c15a83e12/crm_lead.py |
def message_new(self, cr, uid, msg, context): """ Automatically calls when new email message arrives @param self: The object pointer @param cr: the current row, from the database cursor, @param uid: the current user’s ID for security checks """ | 93693b7372deeedc85a79b21f4f60d0c15a83e12 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/93693b7372deeedc85a79b21f4f60d0c15a83e12/crm_lead.py | ||
""" | """ | def message_update(self, cr, uid, ids, vals={}, msg="", default_act='pending', context={}): """ @param self: The object pointer @param cr: the current row, from the database cursor, @param uid: the current user’s ID for security checks, @param ids: List of update mail’s IDs """ if isinstance(ids, (str, int, long)): id... | 93693b7372deeedc85a79b21f4f60d0c15a83e12 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/93693b7372deeedc85a79b21f4f60d0c15a83e12/crm_lead.py |
def message_update(self, cr, uid, ids, vals={}, msg="", default_act='pending', context={}): """ @param self: The object pointer @param cr: the current row, from the database cursor, @param uid: the current user’s ID for security checks, @param ids: List of update mail’s IDs """ if isinstance(ids, (str, int, long)): id... | 93693b7372deeedc85a79b21f4f60d0c15a83e12 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/93693b7372deeedc85a79b21f4f60d0c15a83e12/crm_lead.py | ||
def message_update(self, cr, uid, ids, vals={}, msg="", default_act='pending', context={}): """ @param self: The object pointer @param cr: the current row, from the database cursor, @param uid: the current user’s ID for security checks, @param ids: List of update mail’s IDs """ if isinstance(ids, (str, int, long)): id... | 93693b7372deeedc85a79b21f4f60d0c15a83e12 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/93693b7372deeedc85a79b21f4f60d0c15a83e12/crm_lead.py | ||
vals.update({ 'description': msg['body'] }) if msg.get('priority', False): | if msg.get('priority'): | def message_update(self, cr, uid, ids, vals={}, msg="", default_act='pending', context={}): """ @param self: The object pointer @param cr: the current row, from the database cursor, @param uid: the current user’s ID for security checks, @param ids: List of update mail’s IDs """ if isinstance(ids, (str, int, long)): id... | 93693b7372deeedc85a79b21f4f60d0c15a83e12 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/93693b7372deeedc85a79b21f4f60d0c15a83e12/crm_lead.py |
vls = { } | vls = {} | def message_update(self, cr, uid, ids, vals={}, msg="", default_act='pending', context={}): """ @param self: The object pointer @param cr: the current row, from the database cursor, @param uid: the current user’s ID for security checks, @param ids: List of update mail’s IDs """ if isinstance(ids, (str, int, long)): id... | 93693b7372deeedc85a79b21f4f60d0c15a83e12 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/93693b7372deeedc85a79b21f4f60d0c15a83e12/crm_lead.py |
if res and maps.get(res.group(1).lower(), False): | if res and maps.get(res.group(1).lower()): | def message_update(self, cr, uid, ids, vals={}, msg="", default_act='pending', context={}): """ @param self: The object pointer @param cr: the current row, from the database cursor, @param uid: the current user’s ID for security checks, @param ids: List of update mail’s IDs """ if isinstance(ids, (str, int, long)): id... | 93693b7372deeedc85a79b21f4f60d0c15a83e12 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/93693b7372deeedc85a79b21f4f60d0c15a83e12/crm_lead.py |
def message_update(self, cr, uid, ids, vals={}, msg="", default_act='pending', context={}): """ @param self: The object pointer @param cr: the current row, from the database cursor, @param uid: the current user’s ID for security checks, @param ids: List of update mail’s IDs """ if isinstance(ids, (str, int, long)): id... | 93693b7372deeedc85a79b21f4f60d0c15a83e12 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/93693b7372deeedc85a79b21f4f60d0c15a83e12/crm_lead.py | ||
'account.invoice.line': (_get_invoice_line, ['price_unit','invoice_line_tax_id','quantity','discount'], 20), | 'account.invoice.line': (_get_invoice_line, ['price_unit','invoice_line_tax_id','quantity','discount','invoice_id'], 20), | def _get_invoice_from_reconcile(self, cr, uid, ids, context=None): move = {} for r in self.pool.get('account.move.reconcile').browse(cr, uid, ids): for line in r.line_partial_ids: move[line.move_id.id] = True for line in r.line_id: move[line.move_id.id] = True | d2b96a3b3def3ef52aca2b99e2897609432f783a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/d2b96a3b3def3ef52aca2b99e2897609432f783a/invoice.py |
'account.invoice.line': (_get_invoice_line, ['price_unit','invoice_line_tax_id','quantity','discount'], 20), | 'account.invoice.line': (_get_invoice_line, ['price_unit','invoice_line_tax_id','quantity','discount','invoice_id'], 20), | def _get_invoice_from_reconcile(self, cr, uid, ids, context=None): move = {} for r in self.pool.get('account.move.reconcile').browse(cr, uid, ids): for line in r.line_partial_ids: move[line.move_id.id] = True for line in r.line_id: move[line.move_id.id] = True | d2b96a3b3def3ef52aca2b99e2897609432f783a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/d2b96a3b3def3ef52aca2b99e2897609432f783a/invoice.py |
'account.invoice.line': (_get_invoice_line, ['price_unit','invoice_line_tax_id','quantity','discount'], 20), | 'account.invoice.line': (_get_invoice_line, ['price_unit','invoice_line_tax_id','quantity','discount','invoice_id'], 20), | def _get_invoice_from_reconcile(self, cr, uid, ids, context=None): move = {} for r in self.pool.get('account.move.reconcile').browse(cr, uid, ids): for line in r.line_partial_ids: move[line.move_id.id] = True for line in r.line_id: move[line.move_id.id] = True | d2b96a3b3def3ef52aca2b99e2897609432f783a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/d2b96a3b3def3ef52aca2b99e2897609432f783a/invoice.py |
'account.invoice.line': (_get_invoice_line, ['price_unit','invoice_line_tax_id','quantity','discount'], 50), | 'account.invoice.line': (_get_invoice_line, ['price_unit','invoice_line_tax_id','quantity','discount','invoice_id'], 50), | def _get_invoice_from_reconcile(self, cr, uid, ids, context=None): move = {} for r in self.pool.get('account.move.reconcile').browse(cr, uid, ids): for line in r.line_partial_ids: move[line.move_id.id] = True for line in r.line_id: move[line.move_id.id] = True | d2b96a3b3def3ef52aca2b99e2897609432f783a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/d2b96a3b3def3ef52aca2b99e2897609432f783a/invoice.py |
return round(amount / currency.rounding,6) * currency.rounding | return round(amount / currency.rounding) * currency.rounding | def round(self, cr, uid, currency, amount): if currency.rounding == 0: return 0.0 else: return round(amount / currency.rounding,6) * currency.rounding | 7ce4e8e479fed419559e5ac986776dc982744676 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/7ce4e8e479fed419559e5ac986776dc982744676/res_currency.py |
debit = credit = 0.0 context.update({'date':inv.date_invoice}) context_unreconciled=context.copy() | if inv.reconciled: res[inv.id] = 0.0 continue inv_total = inv.amount_total context_unreconciled = context.copy() | def _amount_residual(self, cr, uid, ids, name, args, context=None): res = {} if context is None: context = {} | de07ce885d3aa664797929fae2a42f5331431229 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/de07ce885d3aa664797929fae2a42f5331431229/invoice.py |
debit_tmp = lines.debit credit_tmp = lines.credit if inv.company_id.currency_id.id <> inv.currency_id.id: if not inv.reconciled: context.update({'date':lines.date}) context_unreconciled.update({'date':lines.date}) if lines.amount_currency < 0: credit_tmp=abs(cur_obj.compute(cr, uid, lines.currency_id.id, inv.compan... | if lines.currency_id and lines.currency_id.id == inv.currency_id.id: if inv.type in ('out_invoice','in_refund'): inv_total += lines.amount_currency else: inv_total -= lines.amount_currency | def _amount_residual(self, cr, uid, ids, name, args, context=None): res = {} if context is None: context = {} | de07ce885d3aa664797929fae2a42f5331431229 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/de07ce885d3aa664797929fae2a42f5331431229/invoice.py |
debit+=debit_tmp credit+=credit_tmp if not inv.amount_total: result = 0.0 elif inv.type in ('out_invoice','in_refund'): amount = credit-debit result = inv.amount_total - amount else: amount = debit-credit result = inv.amount_total - amount res[inv.id] = not self.pool.get('res.currency').is_zero(cr, uid, inv.company_i... | context_unreconciled.update({'date': lines.date}) amount_in_invoice_currency = cur_obj.compute(cr, uid, inv.company_id.currency_id.id, inv.currency_id.id,abs(lines.debit-lines.credit),round=False,context=context_unreconciled) inv_total -= amount_in_invoice_currency result = inv_total res[inv.id] = self.pool.get('res.... | def _amount_residual(self, cr, uid, ids, name, args, context=None): res = {} if context is None: context = {} | de07ce885d3aa664797929fae2a42f5331431229 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/de07ce885d3aa664797929fae2a42f5331431229/invoice.py |
res = collection_obj.get_schedule_inbox_URL(cr, uid, ids, context=ctx) | res = dirobj.get_schedule_inbox_URL(cr, uid, ids, context=ctx) | def _get_caldav_schedule_inbox_URL(self, cr): import xml.dom.minidom import urllib dirobj = self.context._dirobj uid = self.context.uid ctx = self.context.context.copy() ctx.update(self.dctx) ids = [self.dir_id] res = collection_obj.get_schedule_inbox_URL(cr, uid, ids, context=ctx) doc = xml.dom.minidom.getDOMImplemen... | 4cc0c97a1bfb43a8fed4a22ab38d853af273e0ee /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/4cc0c97a1bfb43a8fed4a22ab38d853af273e0ee/caldav_node.py |
res = collection_obj.get_schedule_outbox_URL(cr, uid, ids, context=ctx) | res = dirobj.get_schedule_outbox_URL(cr, uid, ids, context=ctx) | def _get_caldav_schedule_outbox_URL(self, cr): import xml.dom.minidom import urllib dirobj = self.context._dirobj uid = self.context.uid ctx = self.context.context.copy() ctx.update(self.dctx) ids = [self.dir_id] res = collection_obj.get_schedule_outbox_URL(cr, uid, ids, context=ctx) doc = xml.dom.minidom.getDOMImplem... | 4cc0c97a1bfb43a8fed4a22ab38d853af273e0ee /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/4cc0c97a1bfb43a8fed4a22ab38d853af273e0ee/caldav_node.py |
launch_date = datetime.now() | launch_date = date | def _process_one(self, cr, uid, workitem, context=None): if workitem.state != 'todo': return | 6b4adfbab21f2784cf425c5711d0bf996b80f832 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/6b4adfbab21f2784cf425c5711d0bf996b80f832/marketing_campaign.py |
launch_date = datetime.now() + transition._delta() | launch_date = date + transition._delta() | def _process_one(self, cr, uid, workitem, context=None): if workitem.state != 'todo': return | 6b4adfbab21f2784cf425c5711d0bf996b80f832 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/6b4adfbab21f2784cf425c5711d0bf996b80f832/marketing_campaign.py |
def action_cancel(self, cr, uid, ids, context=None): res = super(stock_picking, self).action_cancel(cr, uid, ids, context=context) for pick in self.browse(cr, uid, ids, context=context): call_ship_end = True if pick.sale_id: for picks in pick.sale_id.picking_ids: if picks.state not in ('done', 'cancel'): call_ship_end ... | def action_cancel(self, cr, uid, ids, context=None): res = super(stock_picking, self).action_cancel(cr, uid, ids, context=context) for pick in self.browse(cr, uid, ids, context=context): call_ship_end = True if pick.sale_id: for picks in pick.sale_id.picking_ids: if picks.state not in ('done', 'cancel'): call_ship_end ... | 889038611dd172b989b1321b337ed0f2d3b4fed3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/889038611dd172b989b1321b337ed0f2d3b4fed3/stock.py | |
def action_cancel(self, cr, uid, ids, context=None): res = super(stock_picking, self).action_cancel(cr, uid, ids, context=context) for pick in self.browse(cr, uid, ids, context=context): call_ship_end = True if pick.sale_id: for picks in pick.sale_id.picking_ids: if picks.state not in ('done', 'cancel'): call_ship_end ... | 889038611dd172b989b1321b337ed0f2d3b4fed3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/889038611dd172b989b1321b337ed0f2d3b4fed3/stock.py | ||
'resource_id': fields.many2one('resource.resource', 'Resource', ondelete='cascade', required=True), 'phase_id': fields.many2one('project.phase', 'Project Phase', required=True), | 'resource_id': fields.many2one('resource.resource', 'Resource', required=True), 'phase_id': fields.many2one('project.phase', 'Project Phase', ondelete='cascade', required=True), | def set_done(self, cr, uid, ids, *args): self.write(cr, uid, ids, {'state': 'done'}) return True | 717c7c5b11fb0a4bd6821abc8f774bf6f4d5ceb4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/717c7c5b11fb0a4bd6821abc8f774bf6f4d5ceb4/project_long_term.py |
if not isinstance(result_line['id'], (int, long)) and len(str(result_line['id']).split('-')) > 1: result_line['id'] = int(str(result_line['id']).split('-')[0]) | def __getitem__(self, name): if name == 'id': return self._id | a31b0d9e0e7f3f1ef962ad9a4b491a9d573ef855 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/a31b0d9e0e7f3f1ef962ad9a4b491a9d573ef855/orm.py | |
sub_total[i]= entry.price_subtotal and entry.price_subtotal or 0.00 | sub_total[i]= entry.price_subtotal and entry.price_subtotal | def sale_order_lines(self,sale_order): result =[] sub_total={} info=[] order_lines=[] res={} list_in_seq=[] ids = self.pool.get('sale.order.line').search(self.cr, self.uid, [('order_id', '=', sale_order.id)]) for id in range(0,len(ids)): order = self.pool.get('sale.order.line').browse(self.cr, self.uid,ids[id], self.co... | e89137252be783f799895aceb8dd7ca761e2c2ba /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/e89137252be783f799895aceb8dd7ca761e2c2ba/report_sale_layout.py |
res['note']=entry.notes | res['note']=entry.notes or '' | def sale_order_lines(self,sale_order): result =[] sub_total={} info=[] order_lines=[] res={} list_in_seq=[] ids = self.pool.get('sale.order.line').search(self.cr, self.uid, [('order_id', '=', sale_order.id)]) for id in range(0,len(ids)): order = self.pool.get('sale.order.line').browse(self.cr, self.uid,ids[id], self.co... | e89137252be783f799895aceb8dd7ca761e2c2ba /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/e89137252be783f799895aceb8dd7ca761e2c2ba/report_sale_layout.py |
res['note']=entry.notes | res['note']=entry.notes or '' | def sale_order_lines(self,sale_order): result =[] sub_total={} info=[] order_lines=[] res={} list_in_seq=[] ids = self.pool.get('sale.order.line').search(self.cr, self.uid, [('order_id', '=', sale_order.id)]) for id in range(0,len(ids)): order = self.pool.get('sale.order.line').browse(self.cr, self.uid,ids[id], self.co... | e89137252be783f799895aceb8dd7ca761e2c2ba /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/e89137252be783f799895aceb8dd7ca761e2c2ba/report_sale_layout.py |
def rounding(fl, round_value): if not round_value: return fl return round(fl / round_value) * round_value | 6a21b5d661b74602c870fac41f3c8c42e8bc6c33 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/6a21b5d661b74602c870fac41f3c8c42e8bc6c33/stock_planning.py | ||
def _get_new_period_start(self,cr,uid,context={}): | def _get_new_period_start(self, cr, uid, context=None): | def _get_new_period_start(self,cr,uid,context={}): cr.execute("select max(date_stop) from stock_period") result=cr.fetchone() last_date = result and result[0] or False if last_date: period_start = mx.DateTime.strptime(last_date,"%Y-%m-%d %H:%M:%S")+ RelativeDateTime(days=1) period_start = period_start - RelativeDateTim... | 6a21b5d661b74602c870fac41f3c8c42e8bc6c33 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/6a21b5d661b74602c870fac41f3c8c42e8bc6c33/stock_planning.py |
result=cr.fetchone() | result = cr.fetchone() | def _get_new_period_start(self,cr,uid,context={}): cr.execute("select max(date_stop) from stock_period") result=cr.fetchone() last_date = result and result[0] or False if last_date: period_start = mx.DateTime.strptime(last_date,"%Y-%m-%d %H:%M:%S")+ RelativeDateTime(days=1) period_start = period_start - RelativeDateTim... | 6a21b5d661b74602c870fac41f3c8c42e8bc6c33 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/6a21b5d661b74602c870fac41f3c8c42e8bc6c33/stock_planning.py |
def _get_new_period_start(self,cr,uid,context={}): cr.execute("select max(date_stop) from stock_period") result=cr.fetchone() last_date = result and result[0] or False if last_date: period_start = mx.DateTime.strptime(last_date,"%Y-%m-%d %H:%M:%S")+ RelativeDateTime(days=1) period_start = period_start - RelativeDateTim... | 6a21b5d661b74602c870fac41f3c8c42e8bc6c33 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/6a21b5d661b74602c870fac41f3c8c42e8bc6c33/stock_planning.py | ||
'date_start':_get_new_period_start, | 'date_start': _get_new_period_start, | def _get_new_period_start(self,cr,uid,context={}): cr.execute("select max(date_stop) from stock_period") result=cr.fetchone() last_date = result and result[0] or False if last_date: period_start = mx.DateTime.strptime(last_date,"%Y-%m-%d %H:%M:%S")+ RelativeDateTime(days=1) period_start = period_start - RelativeDateTim... | 6a21b5d661b74602c870fac41f3c8c42e8bc6c33 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/6a21b5d661b74602c870fac41f3c8c42e8bc6c33/stock_planning.py |
def create_period_weekly(self,cr, uid, ids, context={}): res=self.create_period(cr, uid, ids, context, 6, 'Weekly') | def create_period_weekly(self, cr, uid, ids, context=None): res = self.create_period(cr, uid, ids, context, 6, 'Weekly') | def _get_new_period_start(self,cr,uid,context={}): cr.execute("select max(date_stop) from stock_period") result=cr.fetchone() last_date = result and result[0] or False if last_date: period_start = mx.DateTime.strptime(last_date,"%Y-%m-%d %H:%M:%S")+ RelativeDateTime(days=1) period_start = period_start - RelativeDateTim... | 6a21b5d661b74602c870fac41f3c8c42e8bc6c33 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/6a21b5d661b74602c870fac41f3c8c42e8bc6c33/stock_planning.py |
'type': 'ir.actions.act_window', | 'type': 'ir.actions.act_window', | def create_period_weekly(self,cr, uid, ids, context={}): res=self.create_period(cr, uid, ids, context, 6, 'Weekly') return { 'view_type': 'form', "view_mode": 'tree', 'res_model': 'stock.period', 'type': 'ir.actions.act_window', } | 6a21b5d661b74602c870fac41f3c8c42e8bc6c33 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/6a21b5d661b74602c870fac41f3c8c42e8bc6c33/stock_planning.py |
def create_period_monthly(self,cr, uid, ids, context={},interval=1): for p in self.browse(cr, uid, ids, context): | def create_period_monthly(self,cr, uid, ids, interval=1, context=None): for p in self.browse(cr, uid, ids, context=context): | def create_period_weekly(self,cr, uid, ids, context={}): res=self.create_period(cr, uid, ids, context, 6, 'Weekly') return { 'view_type': 'form', "view_mode": 'tree', 'res_model': 'stock.period', 'type': 'ir.actions.act_window', } | 6a21b5d661b74602c870fac41f3c8c42e8bc6c33 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/6a21b5d661b74602c870fac41f3c8c42e8bc6c33/stock_planning.py |
while ds.strftime('%Y-%m-%d')<p.date_stop: | while ds.strftime('%Y-%m-%d') < p.date_stop: | def create_period_monthly(self,cr, uid, ids, context={},interval=1): for p in self.browse(cr, uid, ids, context): dt = p.date_start ds = mx.DateTime.strptime(p.date_start, '%Y-%m-%d') while ds.strftime('%Y-%m-%d')<p.date_stop: de = ds + RelativeDateTime(months=interval, minutes=-1) self.pool.get('stock.period').create(... | 6a21b5d661b74602c870fac41f3c8c42e8bc6c33 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/6a21b5d661b74602c870fac41f3c8c42e8bc6c33/stock_planning.py |
'date_stop': de.strftime('%Y-%m-%d %H:%M:%S'), | 'date_stop': de.strftime('%Y-%m-%d %H:%M:%S'), | def create_period_monthly(self,cr, uid, ids, context={},interval=1): for p in self.browse(cr, uid, ids, context): dt = p.date_start ds = mx.DateTime.strptime(p.date_start, '%Y-%m-%d') while ds.strftime('%Y-%m-%d')<p.date_stop: de = ds + RelativeDateTime(months=interval, minutes=-1) self.pool.get('stock.period').create(... | 6a21b5d661b74602c870fac41f3c8c42e8bc6c33 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/6a21b5d661b74602c870fac41f3c8c42e8bc6c33/stock_planning.py |
'type': 'ir.actions.act_window', } def create_period(self,cr, uid, ids, context={}, interval=0, name='Daily'): for p in self.browse(cr, uid, ids, context): | 'type': 'ir.actions.act_window', } def create_period(self, cr, uid, ids, interval=0, name='Daily', context=None): for p in self.browse(cr, uid, ids, context=context): | def create_period_monthly(self,cr, uid, ids, context={},interval=1): for p in self.browse(cr, uid, ids, context): dt = p.date_start ds = mx.DateTime.strptime(p.date_start, '%Y-%m-%d') while ds.strftime('%Y-%m-%d')<p.date_stop: de = ds + RelativeDateTime(months=interval, minutes=-1) self.pool.get('stock.period').create(... | 6a21b5d661b74602c870fac41f3c8c42e8bc6c33 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/6a21b5d661b74602c870fac41f3c8c42e8bc6c33/stock_planning.py |
ds = mx.DateTime.strptime(p.date_start, '%Y-%m-%d') while ds.strftime('%Y-%m-%d')<p.date_stop: | ds = mx.DateTime.strptime(p.date_start, '%Y-%m-%d') while ds.strftime('%Y-%m-%d') < p.date_stop: | def create_period(self,cr, uid, ids, context={}, interval=0, name='Daily'): for p in self.browse(cr, uid, ids, context): dt = p.date_start ds = mx.DateTime.strptime(p.date_start, '%Y-%m-%d') while ds.strftime('%Y-%m-%d')<p.date_stop: de = ds + RelativeDateTime(days=interval, minutes =-1) if name=='Daily': new_name=de.s... | 6a21b5d661b74602c870fac41f3c8c42e8bc6c33 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/6a21b5d661b74602c870fac41f3c8c42e8bc6c33/stock_planning.py |
if name=='Daily': | if name =='Daily': | def create_period(self,cr, uid, ids, context={}, interval=0, name='Daily'): for p in self.browse(cr, uid, ids, context): dt = p.date_start ds = mx.DateTime.strptime(p.date_start, '%Y-%m-%d') while ds.strftime('%Y-%m-%d')<p.date_stop: de = ds + RelativeDateTime(days=interval, minutes =-1) if name=='Daily': new_name=de.s... | 6a21b5d661b74602c870fac41f3c8c42e8bc6c33 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/6a21b5d661b74602c870fac41f3c8c42e8bc6c33/stock_planning.py |
if name=="Weekly": new_name=de.strftime('%Y, week %W') | if name =="Weekly": new_name = de.strftime('%Y, week %W') | def create_period(self,cr, uid, ids, context={}, interval=0, name='Daily'): for p in self.browse(cr, uid, ids, context): dt = p.date_start ds = mx.DateTime.strptime(p.date_start, '%Y-%m-%d') while ds.strftime('%Y-%m-%d')<p.date_stop: de = ds + RelativeDateTime(days=interval, minutes =-1) if name=='Daily': new_name=de.s... | 6a21b5d661b74602c870fac41f3c8c42e8bc6c33 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/6a21b5d661b74602c870fac41f3c8c42e8bc6c33/stock_planning.py |
'type': 'ir.actions.act_window', | 'type': 'ir.actions.act_window', | def create_period(self,cr, uid, ids, context={}, interval=0, name='Daily'): for p in self.browse(cr, uid, ids, context): dt = p.date_start ds = mx.DateTime.strptime(p.date_start, '%Y-%m-%d') while ds.strftime('%Y-%m-%d')<p.date_stop: de = ds + RelativeDateTime(days=interval, minutes =-1) if name=='Daily': new_name=de.s... | 6a21b5d661b74602c870fac41f3c8c42e8bc6c33 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/6a21b5d661b74602c870fac41f3c8c42e8bc6c33/stock_planning.py |
'name': fields.char('Period Name', size=64), | 'name': fields.char('Period Name', size=64, required=True), | def create_period(self,cr, uid, ids, context={}, interval=0, name='Daily'): for p in self.browse(cr, uid, ids, context): dt = p.date_start ds = mx.DateTime.strptime(p.date_start, '%Y-%m-%d') while ds.strftime('%Y-%m-%d')<p.date_stop: de = ds + RelativeDateTime(days=interval, minutes =-1) if name=='Daily': new_name=de.s... | 6a21b5d661b74602c870fac41f3c8c42e8bc6c33 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/6a21b5d661b74602c870fac41f3c8c42e8bc6c33/stock_planning.py |
'date_stop': fields.datetime('End Date', required=True), 'state' : fields.selection([('draft','Draft'),('open','Open'),('close','Close')],'State') | 'date_stop': fields.datetime('End Date', required=True), 'state': fields.selection([('draft','Draft'), ('open','Open'),('close','Close')], 'State') | def create_period(self,cr, uid, ids, context={}, interval=0, name='Daily'): for p in self.browse(cr, uid, ids, context): dt = p.date_start ds = mx.DateTime.strptime(p.date_start, '%Y-%m-%d') while ds.strftime('%Y-%m-%d')<p.date_stop: de = ds + RelativeDateTime(days=interval, minutes =-1) if name=='Daily': new_name=de.s... | 6a21b5d661b74602c870fac41f3c8c42e8bc6c33 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/6a21b5d661b74602c870fac41f3c8c42e8bc6c33/stock_planning.py |
'state' : lambda * a : 'draft' | 'state': 'draft' | def create_period(self,cr, uid, ids, context={}, interval=0, name='Daily'): for p in self.browse(cr, uid, ids, context): dt = p.date_start ds = mx.DateTime.strptime(p.date_start, '%Y-%m-%d') while ds.strftime('%Y-%m-%d')<p.date_stop: de = ds + RelativeDateTime(days=interval, minutes =-1) if name=='Daily': new_name=de.s... | 6a21b5d661b74602c870fac41f3c8c42e8bc6c33 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/6a21b5d661b74602c870fac41f3c8c42e8bc6c33/stock_planning.py |
# def _get_latest_period(self,cr,uid,context={}): | 6a21b5d661b74602c870fac41f3c8c42e8bc6c33 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/6a21b5d661b74602c870fac41f3c8c42e8bc6c33/stock_planning.py | ||
# def _get_latest_period(self,cr,uid,context={}): | 6a21b5d661b74602c870fac41f3c8c42e8bc6c33 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/6a21b5d661b74602c870fac41f3c8c42e8bc6c33/stock_planning.py | ||
'copy_forecast' : fields.boolean('Copy Last Forecast', help="Copy quantities from last Stock and Sale Forecast."), | 'copy_forecast': fields.boolean('Copy Last Forecast', help="Copy quantities from last Stock and Sale Forecast."), } _defaults = { 'company_id': lambda self, cr, uid, c: self.pool.get('res.company')._company_default_get(cr, uid, 'stock.sale.forecast.createlines', context=c), | # def _get_latest_period(self,cr,uid,context={}): | 6a21b5d661b74602c870fac41f3c8c42e8bc6c33 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/6a21b5d661b74602c870fac41f3c8c42e8bc6c33/stock_planning.py |
_defaults = { 'company_id': lambda self,cr,uid,c: self.pool.get('res.company')._company_default_get(cr, uid, 'stock.sale.forecast.createlines', context=c), } def create_forecast(self,cr, uid, ids, context={}): | def create_forecast(self, cr, uid, ids, context=None): | # def _get_latest_period(self,cr,uid,context={}): | 6a21b5d661b74602c870fac41f3c8c42e8bc6c33 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/6a21b5d661b74602c870fac41f3c8c42e8bc6c33/stock_planning.py |
forecast_obj=self.pool.get('stock.sale.forecast') mod_obj =self.pool.get('ir.model.data') for f in self.browse(cr, uid, ids, context): prod_categ_obj=self.pool.get('product.category') template_obj=self.pool.get('product.template') | forecast_obj = self.pool.get('stock.sale.forecast') mod_obj = self.pool.get('ir.model.data') prod_categ_obj = self.pool.get('product.category') template_obj = self.pool.get('product.template') for f in self.browse(cr, uid, ids, context=context): | def create_forecast(self,cr, uid, ids, context={}): product_obj = self.pool.get('product.product') forecast_obj=self.pool.get('stock.sale.forecast') mod_obj =self.pool.get('ir.model.data') for f in self.browse(cr, uid, ids, context): prod_categ_obj=self.pool.get('product.category') template_obj=self.pool.get('product.t... | 6a21b5d661b74602c870fac41f3c8c42e8bc6c33 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/6a21b5d661b74602c870fac41f3c8c42e8bc6c33/stock_planning.py |
prod_categ_ids=prod_categ_obj.search(cr,uid,[('parent_id','child_of',categ_ids)]) templates_ids = template_obj.search(cr,uid,[('categ_id','in',prod_categ_ids)]) products_ids = product_obj.search(cr,uid,[('product_tmpl_id','in',templates_ids)]) if len(products_ids)==0: | prod_categ_ids = prod_categ_obj.search(cr, uid, [('parent_id','child_of', categ_ids)]) templates_ids = template_obj.search(cr, uid, [('categ_id','in',prod_categ_ids)]) products_ids = product_obj.search(cr, uid, [('product_tmpl_id','in',templates_ids)]) if len(products_ids) == 0: | def create_forecast(self,cr, uid, ids, context={}): product_obj = self.pool.get('product.product') forecast_obj=self.pool.get('stock.sale.forecast') mod_obj =self.pool.get('ir.model.data') for f in self.browse(cr, uid, ids, context): prod_categ_obj=self.pool.get('product.category') template_obj=self.pool.get('product.t... | 6a21b5d661b74602c870fac41f3c8c42e8bc6c33 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/6a21b5d661b74602c870fac41f3c8c42e8bc6c33/stock_planning.py |
def create_forecast(self,cr, uid, ids, context={}): product_obj = self.pool.get('product.product') forecast_obj=self.pool.get('stock.sale.forecast') mod_obj =self.pool.get('ir.model.data') for f in self.browse(cr, uid, ids, context): prod_categ_obj=self.pool.get('product.category') template_obj=self.pool.get('product.t... | 6a21b5d661b74602c870fac41f3c8c42e8bc6c33 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/6a21b5d661b74602c870fac41f3c8c42e8bc6c33/stock_planning.py | ||
ret=cr.fetchone() | ret = cr.fetchone() | def create_forecast(self,cr, uid, ids, context={}): product_obj = self.pool.get('product.product') forecast_obj=self.pool.get('stock.sale.forecast') mod_obj =self.pool.get('ir.model.data') for f in self.browse(cr, uid, ids, context): prod_categ_obj=self.pool.get('product.category') template_obj=self.pool.get('product.t... | 6a21b5d661b74602c870fac41f3c8c42e8bc6c33 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/6a21b5d661b74602c870fac41f3c8c42e8bc6c33/stock_planning.py |
forecast_qty = ret[1] | forecast_qty = ret[1] | def create_forecast(self,cr, uid, ids, context={}): product_obj = self.pool.get('product.product') forecast_obj=self.pool.get('stock.sale.forecast') mod_obj =self.pool.get('ir.model.data') for f in self.browse(cr, uid, ids, context): prod_categ_obj=self.pool.get('product.category') template_obj=self.pool.get('product.t... | 6a21b5d661b74602c870fac41f3c8c42e8bc6c33 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/6a21b5d661b74602c870fac41f3c8c42e8bc6c33/stock_planning.py |
'company_id' : f.warehouse_id1.company_id.id, | 'company_id': f.warehouse_id1.company_id.id, | def create_forecast(self,cr, uid, ids, context={}): product_obj = self.pool.get('product.product') forecast_obj=self.pool.get('stock.sale.forecast') mod_obj =self.pool.get('ir.model.data') for f in self.browse(cr, uid, ids, context): prod_categ_obj=self.pool.get('product.category') template_obj=self.pool.get('product.t... | 6a21b5d661b74602c870fac41f3c8c42e8bc6c33 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/6a21b5d661b74602c870fac41f3c8c42e8bc6c33/stock_planning.py |
'product_qty' : forecast_qty, 'product_amt' : 0.0, 'product_uom' : prod_uom, 'active_uom' : prod_uom, 'product_uom_categ' : p.uom_id.category_id.id, 'product_uos_categ' : prod_uos_categ, | 'product_qty': forecast_qty, 'product_amt': 0.0, 'product_uom': prod_uom, 'active_uom': prod_uom, 'product_uom_categ': p.uom_id.category_id.id, 'product_uos_categ': prod_uos_categ, | def create_forecast(self,cr, uid, ids, context={}): product_obj = self.pool.get('product.product') forecast_obj=self.pool.get('stock.sale.forecast') mod_obj =self.pool.get('ir.model.data') for f in self.browse(cr, uid, ids, context): prod_categ_obj=self.pool.get('product.category') template_obj=self.pool.get('product.t... | 6a21b5d661b74602c870fac41f3c8c42e8bc6c33 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/6a21b5d661b74602c870fac41f3c8c42e8bc6c33/stock_planning.py |
'search_view_id': id['res_id'], | 'search_view_id': id['res_id'], | def create_forecast(self,cr, uid, ids, context={}): product_obj = self.pool.get('product.product') forecast_obj=self.pool.get('stock.sale.forecast') mod_obj =self.pool.get('ir.model.data') for f in self.browse(cr, uid, ids, context): prod_categ_obj=self.pool.get('product.category') template_obj=self.pool.get('product.t... | 6a21b5d661b74602c870fac41f3c8c42e8bc6c33 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/6a21b5d661b74602c870fac41f3c8c42e8bc6c33/stock_planning.py |
def create_forecast(self,cr, uid, ids, context={}): product_obj = self.pool.get('product.product') forecast_obj=self.pool.get('stock.sale.forecast') mod_obj =self.pool.get('ir.model.data') for f in self.browse(cr, uid, ids, context): prod_categ_obj=self.pool.get('product.category') template_obj=self.pool.get('product.t... | 6a21b5d661b74602c870fac41f3c8c42e8bc6c33 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/6a21b5d661b74602c870fac41f3c8c42e8bc6c33/stock_planning.py | ||
'company_id': fields.many2one('res.company', 'Company', required=True), 'create_uid': fields.many2one('res.users', 'Responsible'), 'name' : fields.char('Name', size=64, readonly=True, states={'draft':[('readonly',False)]}), | 'company_id':fields.many2one('res.company', 'Company', required=True), 'create_uid': fields.many2one('res.users', 'Responsible'), 'name': fields.char('Name', size=64, readonly=True, states={'draft': [('readonly',False)]}), | def create_forecast(self,cr, uid, ids, context={}): product_obj = self.pool.get('product.product') forecast_obj=self.pool.get('stock.sale.forecast') mod_obj =self.pool.get('ir.model.data') for f in self.browse(cr, uid, ids, context): prod_categ_obj=self.pool.get('product.category') template_obj=self.pool.get('product.t... | 6a21b5d661b74602c870fac41f3c8c42e8bc6c33 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/6a21b5d661b74602c870fac41f3c8c42e8bc6c33/stock_planning.py |
'warehouse_id': fields.many2one('stock.warehouse' , 'Warehouse', required=True, readonly=True, states={'draft':[('readonly',False)]}, \ | 'warehouse_id': fields.many2one('stock.warehouse' , 'Warehouse', required=True, readonly=True, states={'draft': [('readonly',False)]}, \ | def create_forecast(self,cr, uid, ids, context={}): product_obj = self.pool.get('product.product') forecast_obj=self.pool.get('stock.sale.forecast') mod_obj =self.pool.get('ir.model.data') for f in self.browse(cr, uid, ids, context): prod_categ_obj=self.pool.get('product.category') template_obj=self.pool.get('product.t... | 6a21b5d661b74602c870fac41f3c8c42e8bc6c33 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/6a21b5d661b74602c870fac41f3c8c42e8bc6c33/stock_planning.py |
'product_qty' : fields.float('Product Quantity', required=True, readonly=True, states={'draft':[('readonly',False)]}, \ | 'product_qty': fields.float('Product Quantity', required=True, readonly=True, states={'draft':[('readonly',False)]}, \ | def create_forecast(self,cr, uid, ids, context={}): product_obj = self.pool.get('product.product') forecast_obj=self.pool.get('stock.sale.forecast') mod_obj =self.pool.get('ir.model.data') for f in self.browse(cr, uid, ids, context): prod_categ_obj=self.pool.get('product.category') template_obj=self.pool.get('product.t... | 6a21b5d661b74602c870fac41f3c8c42e8bc6c33 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/6a21b5d661b74602c870fac41f3c8c42e8bc6c33/stock_planning.py |
'product_amt' : fields.float('Product Amount', readonly=True, states={'draft':[('readonly',False)]}, \ | 'product_amt': fields.float('Product Amount', readonly=True, states={'draft':[('readonly',False)]}, \ | def create_forecast(self,cr, uid, ids, context={}): product_obj = self.pool.get('product.product') forecast_obj=self.pool.get('stock.sale.forecast') mod_obj =self.pool.get('ir.model.data') for f in self.browse(cr, uid, ids, context): prod_categ_obj=self.pool.get('product.category') template_obj=self.pool.get('product.t... | 6a21b5d661b74602c870fac41f3c8c42e8bc6c33 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/6a21b5d661b74602c870fac41f3c8c42e8bc6c33/stock_planning.py |
'product_uom_categ' : fields.many2one('product.uom.categ', 'Product UoM Category'), 'product_uom' : fields.many2one('product.uom', 'Product UoM', required=True, readonly=True, states={'draft':[('readonly',False)]}, \ | 'product_uom_categ': fields.many2one('product.uom.categ', 'Product UoM Category'), 'product_uom': fields.many2one('product.uom', 'Product UoM', required=True, readonly=True, states={'draft':[('readonly',False)]}, \ | def create_forecast(self,cr, uid, ids, context={}): product_obj = self.pool.get('product.product') forecast_obj=self.pool.get('stock.sale.forecast') mod_obj =self.pool.get('ir.model.data') for f in self.browse(cr, uid, ids, context): prod_categ_obj=self.pool.get('product.category') template_obj=self.pool.get('product.t... | 6a21b5d661b74602c870fac41f3c8c42e8bc6c33 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/6a21b5d661b74602c870fac41f3c8c42e8bc6c33/stock_planning.py |
'active_uom' :fields.many2one('product.uom', string = "Active UoM"), 'state' : fields.selection([('draft','Draft'),('validated','Validated')],'State',readonly=True), 'analyzed_period1_id' : fields.many2one('stock.period' , 'Period1', readonly=True, states={'draft':[('readonly',False)]},), 'analyzed_period2_id' : field... | 'active_uom': fields.many2one('product.uom', string = "Active UoM"), 'state': fields.selection([('draft','Draft'),('validated','Validated')],'State',readonly=True), 'analyzed_period1_id': fields.many2one('stock.period' , 'Period1', readonly=True, states={'draft':[('readonly',False)]},), 'analyzed_period2_id': fields.m... | def create_forecast(self,cr, uid, ids, context={}): product_obj = self.pool.get('product.product') forecast_obj=self.pool.get('stock.sale.forecast') mod_obj =self.pool.get('ir.model.data') for f in self.browse(cr, uid, ids, context): prod_categ_obj=self.pool.get('product.category') template_obj=self.pool.get('product.t... | 6a21b5d661b74602c870fac41f3c8c42e8bc6c33 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/6a21b5d661b74602c870fac41f3c8c42e8bc6c33/stock_planning.py |
'analyzed_warehouse_id' : fields.many2one('stock.warehouse' , 'This Warehouse', required=False, \ | 'analyzed_warehouse_id': fields.many2one('stock.warehouse' , 'This Warehouse', required=False, \ | def create_forecast(self,cr, uid, ids, context={}): product_obj = self.pool.get('product.product') forecast_obj=self.pool.get('stock.sale.forecast') mod_obj =self.pool.get('ir.model.data') for f in self.browse(cr, uid, ids, context): prod_categ_obj=self.pool.get('product.category') template_obj=self.pool.get('product.t... | 6a21b5d661b74602c870fac41f3c8c42e8bc6c33 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/6a21b5d661b74602c870fac41f3c8c42e8bc6c33/stock_planning.py |
'analyze_company' : fields.boolean('Per Company', readonly=True, states={'draft':[('readonly',False)]}, \ | 'analyze_company': fields.boolean('Per Company', readonly=True, states={'draft':[('readonly',False)]}, \ | def create_forecast(self,cr, uid, ids, context={}): product_obj = self.pool.get('product.product') forecast_obj=self.pool.get('stock.sale.forecast') mod_obj =self.pool.get('ir.model.data') for f in self.browse(cr, uid, ids, context): prod_categ_obj=self.pool.get('product.category') template_obj=self.pool.get('product.t... | 6a21b5d661b74602c870fac41f3c8c42e8bc6c33 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/6a21b5d661b74602c870fac41f3c8c42e8bc6c33/stock_planning.py |
'analyzed_period1_per_user' : fields.float('This User Period1', readonly=True), 'analyzed_period2_per_user' : fields.float('This User Period2', readonly=True), 'analyzed_period3_per_user' : fields.float('This User Period3', readonly=True), 'analyzed_period4_per_user' : fields.float('This User Period4', readonly=True), ... | 'analyzed_period1_per_user': fields.float('This User Period1', readonly=True), 'analyzed_period2_per_user': fields.float('This User Period2', readonly=True), 'analyzed_period3_per_user': fields.float('This User Period3', readonly=True), 'analyzed_period4_per_user': fields.float('This User Period4', readonly=True), 'ana... | def create_forecast(self,cr, uid, ids, context={}): product_obj = self.pool.get('product.product') forecast_obj=self.pool.get('stock.sale.forecast') mod_obj =self.pool.get('ir.model.data') for f in self.browse(cr, uid, ids, context): prod_categ_obj=self.pool.get('product.category') template_obj=self.pool.get('product.t... | 6a21b5d661b74602c870fac41f3c8c42e8bc6c33 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/6a21b5d661b74602c870fac41f3c8c42e8bc6c33/stock_planning.py |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.