[FIX] a few problems introduced with the last merge
bzr revid: abo@openerp.com-20121002111231-zo41jejkrm8afavu
This commit is contained in:
parent
1653332080
commit
2b2288a3bd
|
@ -595,7 +595,7 @@ class account_account(osv.osv):
|
|||
res.append((record['id'], name))
|
||||
return res
|
||||
|
||||
def copy(self, cr, uid, id, None, context=None, done_list=None, local=False):
|
||||
def copy(self, cr, uid, id, default=None, context=None, done_list=None, local=False):
|
||||
if default is None:
|
||||
default = {}
|
||||
else:
|
||||
|
@ -2281,9 +2281,10 @@ class account_model(osv.osv):
|
|||
_defaults = {
|
||||
'legend': lambda self, cr, uid, context:_('You can specify year, month and date in the name of the model using the following labels:\n\n%(year)s: To Specify Year \n%(month)s: To Specify Month \n%(date)s: Current Date\n\ne.g. My model on %(date)s'),
|
||||
}
|
||||
def generate(self, cr, uid, ids, datas=None, context=None):
|
||||
if datas is None:
|
||||
datas = {}
|
||||
|
||||
def generate(self, cr, uid, ids, data=None, context=None):
|
||||
if data is None:
|
||||
data = {}
|
||||
move_ids = []
|
||||
entry = {}
|
||||
account_move_obj = self.pool.get('account.move')
|
||||
|
@ -2294,8 +2295,8 @@ class account_model(osv.osv):
|
|||
if context is None:
|
||||
context = {}
|
||||
|
||||
if datas.get('date', False):
|
||||
context.update({'date': datas['date']})
|
||||
if data.get('date', False):
|
||||
context.update({'date': data['date']})
|
||||
|
||||
move_date = context.get('date', time.strftime('%Y-%m-%d'))
|
||||
move_date = datetime.strptime(move_date,"%Y-%m-%d")
|
||||
|
@ -2481,10 +2482,10 @@ class account_subscription_line(osv.osv):
|
|||
all_moves = []
|
||||
obj_model = self.pool.get('account.model')
|
||||
for line in self.browse(cr, uid, ids, context=context):
|
||||
datas = {
|
||||
data = {
|
||||
'date': line.date,
|
||||
}
|
||||
move_ids = obj_model.generate(cr, uid, [line.subscription_id.model_id.id], datas, context)
|
||||
move_ids = obj_model.generate(cr, uid, [line.subscription_id.model_id.id], data, context)
|
||||
tocheck[line.subscription_id.id] = True
|
||||
self.write(cr, uid, [line.id], {'move_id':move_ids[0]})
|
||||
all_moves.extend(move_ids)
|
||||
|
|
|
@ -439,6 +439,8 @@ class audittrail_objects_proxy(object_proxy):
|
|||
on specific fields only.
|
||||
:return: True
|
||||
"""
|
||||
if field_list is None:
|
||||
field_list = []
|
||||
# loop on all the given ids
|
||||
for res_id in res_ids:
|
||||
# compare old and new values and get audittrail log lines accordingly
|
||||
|
|
|
@ -216,6 +216,8 @@ class ConvertBracesToField( unohelper.Base, XJobExecutor ):
|
|||
return sObject
|
||||
|
||||
def getBraces(self, aReportSyntex=None):
|
||||
if aReportSyntex is None:
|
||||
aReportSyntex = []
|
||||
desktop=getDesktop()
|
||||
doc = desktop.getCurrentComponent()
|
||||
aSearchString=[]
|
||||
|
|
|
@ -15,6 +15,8 @@ def get(object, level=3, ending=None, ending_excl=None, recur=None, root=''):
|
|||
ending = []
|
||||
if ending_excl is None:
|
||||
ending_excl = []
|
||||
if recur is None:
|
||||
recur = []
|
||||
res = sock.execute('terp', 3, 'admin', 'account.invoice', 'fields_get')
|
||||
key = res.keys()
|
||||
key.sort()
|
||||
|
|
|
@ -339,6 +339,7 @@ class _html2text(sgmllib.SGMLParser):
|
|||
if self.p_p == 0: self.p_p = 1
|
||||
|
||||
def p(self):
|
||||
self.p_p = 2
|
||||
|
||||
def o(self, data, puredata=0, force=0):
|
||||
if self.abbr_data is not None: self.abbr_data += data
|
||||
|
|
|
@ -52,6 +52,8 @@ class account_analytic_line(osv.osv):
|
|||
invoices = []
|
||||
if context is None:
|
||||
context = {}
|
||||
if data is None:
|
||||
data = {}
|
||||
|
||||
account_ids = {}
|
||||
for line in self.pool.get('account.analytic.line').browse(cr, uid, ids, context=context):
|
||||
|
|
|
@ -50,4 +50,14 @@ class l10n_fr_line(osv.osv):
|
|||
|
||||
l10n_fr_line()
|
||||
|
||||
class res_company(osv.osv):
|
||||
_inherit = 'res.company'
|
||||
|
||||
_columns = {
|
||||
'siret': fields.char('SIRET', size=64),
|
||||
'ape': fields.char('APE', size=64),
|
||||
}
|
||||
|
||||
res_company()
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
|
@ -616,6 +616,8 @@ class mrp_production(osv.osv):
|
|||
@param properties: List containing dictionaries of properties.
|
||||
@return: No. of products.
|
||||
"""
|
||||
if properties is None:
|
||||
properties = []
|
||||
results = []
|
||||
bom_obj = self.pool.get('mrp.bom')
|
||||
uom_obj = self.pool.get('product.uom')
|
||||
|
|
|
@ -312,8 +312,9 @@ class project(osv.osv):
|
|||
def copy(self, cr, uid, id, default=None, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
if default is None:
|
||||
default = {}
|
||||
|
||||
default = default or {}
|
||||
context['active_test'] = False
|
||||
default['state'] = 'open'
|
||||
default['tasks'] = []
|
||||
|
|
Loading…
Reference in New Issue