diff --git a/addons/account/account.py b/addons/account/account.py index a620c0b5ddc..529cbf96623 100644 --- a/addons/account/account.py +++ b/addons/account/account.py @@ -1384,6 +1384,7 @@ class account_move(osv.osv): 'ref':False, 'balance':False, 'account_tax_id':False, + 'statement_id': False, }) if 'journal_id' in vals and vals.get('journal_id', False): @@ -1420,6 +1421,7 @@ class account_move(osv.osv): context = {} if context is None else context.copy() default.update({ 'state':'draft', + 'ref': False, 'name':'/', }) context.update({ diff --git a/addons/account/account_invoice.py b/addons/account/account_invoice.py index 8fe79d87064..4feee980ae5 100644 --- a/addons/account/account_invoice.py +++ b/addons/account/account_invoice.py @@ -367,18 +367,6 @@ class account_invoice(osv.osv): context['view_id'] = view_id return context - def create(self, cr, uid, vals, context=None): - if context is None: - context = {} - try: - return super(account_invoice, self).create(cr, uid, vals, context) - except Exception, e: - if '"journal_id" viol' in e.args[0]: - raise orm.except_orm(_('Configuration Error!'), - _('There is no Sale/Purchase Journal(s) defined.')) - else: - raise orm.except_orm(_('Unknown Error!'), str(e)) - def invoice_print(self, cr, uid, ids, context=None): ''' This function prints the invoice and mark it as sent, so that we can see more easily the next step of the workflow diff --git a/addons/account_analytic_plans/account_analytic_plans_view.xml b/addons/account_analytic_plans/account_analytic_plans_view.xml index 3dcbcda6952..be46b9a6923 100644 --- a/addons/account_analytic_plans/account_analytic_plans_view.xml +++ b/addons/account_analytic_plans/account_analytic_plans_view.xml @@ -64,30 +64,6 @@ - - - - account.invoice.line.form.inherit - account.invoice.line - - - - - - - - - - account.invoice.supplier.form.inherit - account.invoice - - 2 - - - - - - diff --git a/addons/account_asset/account_asset.py b/addons/account_asset/account_asset.py index 5a22a888772..c35e1c4e807 100644 --- a/addons/account_asset/account_asset.py +++ b/addons/account_asset/account_asset.py @@ -80,7 +80,7 @@ class account_asset_asset(osv.osv): for asset in self.browse(cr, uid, ids, context=context): if asset.account_move_line_ids: raise osv.except_osv(_('Error!'), _('You cannot delete an asset that contains posted depreciation lines.')) - return super(account_account, self).unlink(cr, uid, ids, context=context) + return super(account_asset_asset, self).unlink(cr, uid, ids, context=context) def _get_period(self, cr, uid, context=None): periods = self.pool.get('account.period').find(cr, uid) diff --git a/addons/account_payment/report/order.rml b/addons/account_payment/report/order.rml index 07d549db618..02675baf0b2 100644 --- a/addons/account_payment/report/order.rml +++ b/addons/account_payment/report/order.rml @@ -256,7 +256,7 @@ [[not line.date and '-' or formatLang(line.date,date=True) ]] - [[ formatLang(line.amount or '-', currency_obj=line.company_currency) ]] + [[ formatLang(line.amount or 0.0, currency_obj=line.company_currency) ]] [[ formatLang(line.amount_currency, currency_obj=line.currency) ]] diff --git a/addons/analytic/analytic.py b/addons/analytic/analytic.py index 42651acb0c6..ac298713b04 100644 --- a/addons/analytic/analytic.py +++ b/addons/analytic/analytic.py @@ -171,9 +171,9 @@ class account_analytic_account(osv.osv): return result _columns = { - 'name': fields.char('Account/Contract Name', size=128, required=True), + 'name': fields.char('Account/Contract Name', size=128, required=True, track_visibility='onchange'), 'complete_name': fields.function(_get_full_name, type='char', string='Full Name'), - 'code': fields.char('Reference', select=True), + 'code': fields.char('Reference', select=True, track_visibility='onchange'), 'type': fields.selection([('view','Analytic View'), ('normal','Analytic Account'),('contract','Contract or Project'),('template','Template of Contract')], 'Type of Account', required=True, help="If you select the View Type, it means you won\'t allow to create journal entries using that account.\n"\ "The type 'Analytic account' stands for usual accounts that you only want to use in accounting.\n"\ @@ -191,10 +191,10 @@ class account_analytic_account(osv.osv): 'quantity': fields.function(_debit_credit_bal_qtty, type='float', string='Quantity', multi='debit_credit_bal_qtty'), 'quantity_max': fields.float('Prepaid Service Units', help='Sets the higher limit of time to work on the contract, based on the timesheet. (for instance, number of hours in a limited support contract.)'), 'partner_id': fields.many2one('res.partner', 'Customer'), - 'user_id': fields.many2one('res.users', 'Project Manager'), - 'manager_id': fields.many2one('res.users', 'Account Manager'), + 'user_id': fields.many2one('res.users', 'Project Manager', track_visibility='onchange'), + 'manager_id': fields.many2one('res.users', 'Account Manager', track_visibility='onchange'), 'date_start': fields.date('Start Date'), - 'date': fields.date('End Date', select=True), + 'date': fields.date('End Date', select=True, track_visibility='onchange'), 'company_id': fields.many2one('res.company', 'Company', required=False), #not required because we want to allow different companies to use the same chart of account, except for leaf accounts. 'state': fields.selection([('template', 'Template'),('draft','New'),('open','In Progress'),('pending','To Renew'),('close','Closed'),('cancelled', 'Cancelled')], 'Status', required=True, track_visibility='onchange'), 'currency_id': fields.function(_currency, fnct_inv=_set_company_currency, #the currency_id field is readonly except if it's a view account and if there is no company diff --git a/addons/base_calendar/base_calendar.py b/addons/base_calendar/base_calendar.py index fe5ffbc8988..9dac1c4d262 100644 --- a/addons/base_calendar/base_calendar.py +++ b/addons/base_calendar/base_calendar.py @@ -859,7 +859,9 @@ class calendar_alarm(osv.osv): if hasattr(res_obj, 'rrule') and res_obj.rrule: event_date = datetime.strptime(res_obj.date, '%Y-%m-%d %H:%M:%S') - recurrent_dates = get_recurrent_dates(res_obj.rrule, res_obj.exdate, event_date, res_obj.exrule) + #exdate is a string and we need a list + exdate = res_obj.exdate and res_obj.exdate.split(',') or [] + recurrent_dates = get_recurrent_dates(res_obj.rrule, exdate, event_date, res_obj.exrule) trigger_interval = alarm.trigger_interval if trigger_interval == 'days': diff --git a/addons/base_calendar/base_calendar_data.xml b/addons/base_calendar/base_calendar_data.xml index 727a0703db2..64aa7ba59b6 100644 --- a/addons/base_calendar/base_calendar_data.xml +++ b/addons/base_calendar/base_calendar_data.xml @@ -126,7 +126,7 @@ Run Event Reminder - 1 + 5 minutes -1 diff --git a/addons/base_report_designer/openerp_sxw2rml/normalized_odt2rml.xsl b/addons/base_report_designer/openerp_sxw2rml/normalized_odt2rml.xsl index 50ffb3d81be..9f9e5050d69 100644 --- a/addons/base_report_designer/openerp_sxw2rml/normalized_odt2rml.xsl +++ b/addons/base_report_designer/openerp_sxw2rml/normalized_odt2rml.xsl @@ -414,7 +414,7 @@ - . + diff --git a/addons/base_report_designer/openerp_sxw2rml/normalized_oo2rml.xsl b/addons/base_report_designer/openerp_sxw2rml/normalized_oo2rml.xsl index 66ef0b5b53c..ae68ae1ed1b 100644 --- a/addons/base_report_designer/openerp_sxw2rml/normalized_oo2rml.xsl +++ b/addons/base_report_designer/openerp_sxw2rml/normalized_oo2rml.xsl @@ -414,7 +414,7 @@ - . + diff --git a/addons/crm/crm_lead.py b/addons/crm/crm_lead.py index 6d195fec383..2361f12d61b 100644 --- a/addons/crm/crm_lead.py +++ b/addons/crm/crm_lead.py @@ -92,15 +92,6 @@ class crm_lead(base_stage, format_address, osv.osv): context['empty_list_help_document_name'] = _("leads") return super(crm_lead, self).get_empty_list_help(cr, uid, help, context=context) - def onchange_user_id(self, cr, uid, ids, section_id, user_id, context=None): - """ When changing the user, also set a section_id or restrict section id - to the ones user_id is member of. """ - if user_id: - section_ids = self.pool.get('crm.case.section').search(cr, uid, ['|', ('user_id', '=', user_id), ('member_ids', '=', user_id)], context=context) - if len(section_ids) > 0 and section_id not in section_ids: - section_id = section_ids[0] - return {'value': {'section_id': section_id}} - def create(self, cr, uid, vals, context=None): if context is None: context = {} @@ -372,6 +363,16 @@ class crm_lead(base_stage, format_address, osv.osv): } return {'value' : values} + def on_change_user(self, cr, uid, ids, user_id, context=None): + """ When changing the user, also set a section_id or restrict section id + to the ones user_id is member of. """ + section_id = False + if user_id: + section_ids = self.pool.get('crm.case.section').search(cr, uid, ['|', ('user_id', '=', user_id), ('member_ids', '=', user_id)], context=context) + if section_ids: + section_id = section_ids[0] + return {'value': {'section_id': section_id}} + def _check(self, cr, uid, ids=False, context=None): """ Override of the base.stage method. Function called by the scheduler to process cases for date actions diff --git a/addons/crm/crm_lead_view.xml b/addons/crm/crm_lead_view.xml index 3001e8b1d88..d94683f895f 100644 --- a/addons/crm/crm_lead_view.xml +++ b/addons/crm/crm_lead_view.xml @@ -152,7 +152,7 @@ --> -