diff --git a/addons/account/account.py b/addons/account/account.py index fbbbfd64537..bf072507aa0 100644 --- a/addons/account/account.py +++ b/addons/account/account.py @@ -595,12 +595,15 @@ class account_account(osv.osv): res.append((record['id'], name)) return res - def copy(self, cr, uid, id, default={}, context=None, done_list=[], local=False): + def copy(self, cr, uid, id, default=None, context=None, done_list=None, local=False): + if default is None: + default = {} + else: + default = default.copy() + if done_list is None: + done_list = [] account = self.browse(cr, uid, id, context=context) new_child_ids = [] - if not default: - default = {} - default = default.copy() default.update(code=_("%s (copy)") % (account['code'] or '')) if not local: done_list = [] @@ -777,11 +780,14 @@ class account_journal(osv.osv): (_check_currency, 'Configuration error!\nThe currency chosen should be shared by the default accounts too.', ['currency','default_debit_account_id','default_credit_account_id']), ] - def copy(self, cr, uid, id, default={}, context=None, done_list=[], local=False): - journal = self.browse(cr, uid, id, context=context) - if not default: + def copy(self, cr, uid, id, default=None, context=None, done_list=None, local=False): + if default is None: default = {} - default = default.copy() + else: + default = default.copy() + if done_list is None: + done_list = [] + journal = self.browse(cr, uid, id, context=context) default.update( code=_("%s (copy)") % (journal['code'] or ''), name=_("%s (copy)") % (journal['name'] or ''), @@ -1178,7 +1184,7 @@ class account_fiscalyear(osv.osv): 'end_journal_period_id':fields.many2one('account.journal.period','End of Year Entries Journal', readonly=True), } - def copy(self, cr, uid, id, default={}, context=None): + def copy(self, cr, uid, id, default=None, context=None): default.update({ 'period_ids': [], 'end_journal_period_id': False @@ -1437,9 +1443,15 @@ class account_move(osv.osv): result = super(account_move, self).create(cr, uid, vals, context) return result - def copy(self, cr, uid, id, default={}, context=None): + def copy(self, cr, uid, id, default=None, context=None): + if context is None: + default = {} + else: + default = default.copy() if context is None: context = {} + else: + context = context.copy() default.update({ 'state':'draft', 'name':'/', @@ -2269,7 +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={}, context=None): + + 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') @@ -2280,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") @@ -2467,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) @@ -3236,7 +3251,7 @@ class wizard_multi_charts_accounts(osv.osv_memory): property_obj.create(cr, uid, vals, context=context) return True - def _install_template(self, cr, uid, template_id, company_id, code_digits=None, obj_wizard=None, acc_ref={}, taxes_ref={}, tax_code_ref={}, context=None): + def _install_template(self, cr, uid, template_id, company_id, code_digits=None, obj_wizard=None, acc_ref=None, taxes_ref=None, tax_code_ref=None, context=None): ''' This function recursively loads the template objects and create the real objects from them. @@ -3254,6 +3269,12 @@ class wizard_multi_charts_accounts(osv.osv_memory): * a last identical containing the mapping of tax code templates and tax codes :rtype: tuple(dict, dict, dict) ''' + if acc_ref is None: + acc_ref = {} + if taxes_ref is None: + taxes_ref = {} + if tax_code_ref is None: + tax_code_ref = {} template = self.pool.get('account.chart.template').browse(cr, uid, template_id, context=context) if template.parent_id: tmp1, tmp2, tmp3 = self._install_template(cr, uid, template.parent_id.id, company_id, code_digits=code_digits, acc_ref=acc_ref, taxes_ref=taxes_ref, tax_code_ref=tax_code_ref, context=context) @@ -3266,7 +3287,7 @@ class wizard_multi_charts_accounts(osv.osv_memory): tax_code_ref.update(tmp3) return acc_ref, taxes_ref, tax_code_ref - def _load_template(self, cr, uid, template_id, company_id, code_digits=None, obj_wizard=None, account_ref={}, taxes_ref={}, tax_code_ref={}, context=None): + def _load_template(self, cr, uid, template_id, company_id, code_digits=None, obj_wizard=None, account_ref=None, taxes_ref=None, tax_code_ref=None, context=None): ''' This function generates all the objects from the templates @@ -3284,6 +3305,12 @@ class wizard_multi_charts_accounts(osv.osv_memory): * a last identical containing the mapping of tax code templates and tax codes :rtype: tuple(dict, dict, dict) ''' + if account_ref is None: + account_ref = {} + if taxes_ref is None: + taxes_ref = {} + if tax_code_ref is None: + tax_code_ref = {} template = self.pool.get('account.chart.template').browse(cr, uid, template_id, context=context) obj_tax_code_template = self.pool.get('account.tax.code.template') obj_acc_tax = self.pool.get('account.tax') diff --git a/addons/account/account_bank.py b/addons/account/account_bank.py index e44d2acd163..2323f8aaa8a 100644 --- a/addons/account/account_bank.py +++ b/addons/account/account_bank.py @@ -29,12 +29,12 @@ class bank(osv.osv): 'currency_id': fields.related('journal_id', 'currency', type="many2one", relation='res.currency', readonly=True, string="Currency", help="Currency of the related account journal."), } - def create(self, cr, uid, data, context={}): + def create(self, cr, uid, data, context=None): result = super(bank, self).create(cr, uid, data, context=context) self.post_write(cr, uid, [result], context=context) return result - def write(self, cr, uid, ids, data, context={}): + def write(self, cr, uid, ids, data, context=None): result = super(bank, self).write(cr, uid, ids, data, context=context) self.post_write(cr, uid, ids, context=context) return result @@ -53,7 +53,7 @@ class bank(osv.osv): data['currency_name'] = data['currency_id'] and currency_name[data['currency_id'][0]] or '' return super(bank, self)._prepare_name_get(cr, uid, bank_dicts, context=context) - def post_write(self, cr, uid, ids, context={}): + def post_write(self, cr, uid, ids, context=None): if isinstance(ids, (int, long)): ids = [ids] diff --git a/addons/account/account_bank_statement.py b/addons/account/account_bank_statement.py index b4fc2388a68..8b2a9aff257 100644 --- a/addons/account/account_bank_statement.py +++ b/addons/account/account_bank_statement.py @@ -461,10 +461,9 @@ class account_bank_statement(osv.osv): return {} balance_start = self._compute_balance_end_real(cr, uid, journal_id, context=context) - journal_data = self.pool.get('account.journal').read(cr, uid, journal_id, ['default_debit_account_id', 'company_id'], context=context) - account_id = journal_data['default_debit_account_id'] + journal_data = self.pool.get('account.journal').read(cr, uid, journal_id, ['company_id'], context=context) company_id = journal_data['company_id'] - return {'value': {'balance_start': balance_start, 'account_id': account_id, 'company_id': company_id}} + return {'value': {'balance_start': balance_start, 'company_id': company_id}} def unlink(self, cr, uid, ids, context=None): stat = self.read(cr, uid, ids, ['state'], context=context) diff --git a/addons/account/account_invoice.py b/addons/account/account_invoice.py index a1c53eff4b1..57f16473b82 100644 --- a/addons/account/account_invoice.py +++ b/addons/account/account_invoice.py @@ -1308,17 +1308,19 @@ class account_invoice(osv.osv): def create_send_note(self, cr, uid, ids, context=None): for obj in self.browse(cr, uid, ids, context=context): - self.message_post(cr, uid, [obj.id], body=_("%s created.") % (_(self._get_document_type(obj.type))), context=context) + self.message_post(cr, uid, [obj.id], body=_("%s created.") % (self._get_document_type(obj.type)), + subtype="account.mt_invoice_new", context=context) def confirm_paid_send_note(self, cr, uid, ids, context=None): - for obj in self.browse(cr, uid, ids, context=context): - self.message_post(cr, uid, [obj.id], body=_("%s paid.") % (_(self._get_document_type(obj.type))), context=context) + for obj in self.browse(cr, uid, ids, context=context): + self.message_post(cr, uid, [obj.id], body=_("%s paid.") % (self._get_document_type(obj.type)), + subtype="account.mt_invoice_paid", context=context) def invoice_cancel_send_note(self, cr, uid, ids, context=None): for obj in self.browse(cr, uid, ids, context=context): - self.message_post(cr, uid, [obj.id], body=_("%s cancelled.") % (_(self._get_document_type(obj.type))), context=context) + self.message_post(cr, uid, [obj.id], body=_("%s cancelled.") % (self._get_document_type(obj.type)), + context=context) -account_invoice() class account_invoice_line(osv.osv): @@ -1358,6 +1360,7 @@ class account_invoice_line(osv.osv): _columns = { 'name': fields.text('Description', required=True), 'origin': fields.char('Source', size=256, help="Reference of the document that produced this invoice."), + 'sequence': fields.integer('Sequence', help="Gives the sequence of this line when displaying the invoice."), 'invoice_id': fields.many2one('account.invoice', 'Invoice Reference', ondelete='cascade', select=True), 'uos_id': fields.many2one('product.uom', 'Unit of Measure', ondelete='set null'), 'product_id': fields.many2one('product.product', 'Product', ondelete='set null'), diff --git a/addons/account/account_invoice_view.xml b/addons/account/account_invoice_view.xml index 4a587eee6fe..26e18271dc2 100644 --- a/addons/account/account_invoice_view.xml +++ b/addons/account/account_invoice_view.xml @@ -189,7 +189,7 @@ - + @@ -278,7 +278,6 @@
-
@@ -438,7 +437,6 @@
-
diff --git a/addons/account/account_move_line.py b/addons/account/account_move_line.py index bb1ace992ca..b111cf2b771 100644 --- a/addons/account/account_move_line.py +++ b/addons/account/account_move_line.py @@ -1105,7 +1105,7 @@ class account_move_line(osv.osv): 'has been confirmed.') % res[2]) return res - def _remove_move_reconcile(self, cr, uid, move_ids=[], context=None): + def _remove_move_reconcile(self, cr, uid, move_ids=None, context=None): # Function remove move rencocile ids related with moves obj_move_line = self.pool.get('account.move.line') obj_move_rec = self.pool.get('account.move.reconcile') diff --git a/addons/account/account_view.xml b/addons/account/account_view.xml index 1fbda80a0fe..1c40bebba52 100644 --- a/addons/account/account_view.xml +++ b/addons/account/account_view.xml @@ -1549,10 +1549,7 @@ account_reconciliation_list

- Good job! -

- There is nothing to reconcile. All invoices and payments - have been reconciled, your partner balance is clean. + No journal items found.

diff --git a/addons/account/data/account_data.xml b/addons/account/data/account_data.xml index e8899d0348a..dd27cfbab4e 100644 --- a/addons/account/data/account_data.xml +++ b/addons/account/data/account_data.xml @@ -518,7 +518,6 @@ - Account Reconcile account.reconcile @@ -554,8 +553,6 @@ - - @@ -564,7 +561,14 @@ account.invoice - - + + + created + account.invoice + + + paid + account.invoice + diff --git a/addons/account/project/wizard/account_analytic_chart.py b/addons/account/project/wizard/account_analytic_chart.py index a10e938e293..92367e27da5 100644 --- a/addons/account/project/wizard/account_analytic_chart.py +++ b/addons/account/project/wizard/account_analytic_chart.py @@ -47,4 +47,4 @@ class account_analytic_chart(osv.osv_memory): return result account_analytic_chart() -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: \ No newline at end of file +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/account/project/wizard/account_analytic_inverted_balance_report.py b/addons/account/project/wizard/account_analytic_inverted_balance_report.py index 2c9690fee50..95365716a22 100644 --- a/addons/account/project/wizard/account_analytic_inverted_balance_report.py +++ b/addons/account/project/wizard/account_analytic_inverted_balance_report.py @@ -52,4 +52,4 @@ class account_analytic_inverted_balance(osv.osv_memory): } account_analytic_inverted_balance() -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: \ No newline at end of file +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/account/project/wizard/project_account_analytic_line.py b/addons/account/project/wizard/project_account_analytic_line.py index e49fbe911cb..54979d79b8a 100644 --- a/addons/account/project/wizard/project_account_analytic_line.py +++ b/addons/account/project/wizard/project_account_analytic_line.py @@ -55,4 +55,4 @@ class project_account_analytic_line(osv.osv_memory): project_account_analytic_line() -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: \ No newline at end of file +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/account/report/account_balance.py b/addons/account/report/account_balance.py index c3117e60379..fdda9cb11ce 100644 --- a/addons/account/report/account_balance.py +++ b/addons/account/report/account_balance.py @@ -68,7 +68,7 @@ class account_balance(report_sxw.rml_parse, common_report_header): return self.pool.get('account.account').browse(self.cr, self.uid, data['form']['id']).company_id.name return super(account_balance ,self)._get_account(data) - def lines(self, form, ids=[], done=None):#, level=1): + def lines(self, form, ids=None, done=None): def _process_child(accounts, disp_acc, parent): account_rec = [acct for acct in accounts if acct['id']==parent][0] currency_obj = self.pool.get('res.currency') diff --git a/addons/account/report/account_central_journal.py b/addons/account/report/account_central_journal.py index d3113b63133..a42712f40d7 100644 --- a/addons/account/report/account_central_journal.py +++ b/addons/account/report/account_central_journal.py @@ -105,4 +105,4 @@ class journal_print(report_sxw.rml_parse, common_report_header): report_sxw.report_sxw('report.account.central.journal', 'account.journal.period', 'addons/account/report/account_central_journal.rml', parser=journal_print, header='internal') -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: \ No newline at end of file +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/account/report/account_general_journal.py b/addons/account/report/account_general_journal.py index 9eb81157dba..0ffa08b31ef 100644 --- a/addons/account/report/account_general_journal.py +++ b/addons/account/report/account_general_journal.py @@ -158,4 +158,4 @@ class journal_print(report_sxw.rml_parse, common_report_header): report_sxw.report_sxw('report.account.general.journal', 'account.journal.period', 'addons/account/report/general_journal.rml', parser=journal_print, header='internal') -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: \ No newline at end of file +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/account/report/account_report.py b/addons/account/report/account_report.py index 59745355c5e..56e324bc361 100644 --- a/addons/account/report/account_report.py +++ b/addons/account/report/account_report.py @@ -284,4 +284,4 @@ class report_account_sales(osv.osv): )""") report_account_sales() -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: \ No newline at end of file +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/account/report/account_tax_report.py b/addons/account/report/account_tax_report.py index 2a0c5987b47..cef1cf54af0 100644 --- a/addons/account/report/account_tax_report.py +++ b/addons/account/report/account_tax_report.py @@ -160,7 +160,7 @@ class tax_report(report_sxw.rml_parse, common_report_header): i+=1 return res - def _get_codes(self, based_on, company_id, parent=False, level=0, period_list=[], context=None): + def _get_codes(self, based_on, company_id, parent=False, level=0, period_list=None, context=None): obj_tc = self.pool.get('account.tax.code') ids = obj_tc.search(self.cr, self.uid, [('parent_id','=',parent),('company_id','=',company_id)], order='sequence', context=context) @@ -171,7 +171,11 @@ class tax_report(report_sxw.rml_parse, common_report_header): res += self._get_codes(based_on, company_id, code.id, level+1, context=context) return res - def _add_codes(self, based_on, account_list=[], period_list=[], context=None): + def _add_codes(self, based_on, account_list=None, period_list=None, context=None): + if account_list is None: + account_list = [] + if period_list is None: + period_list = [] res = [] obj_tc = self.pool.get('account.tax.code') for account in account_list: diff --git a/addons/account/res_currency.py b/addons/account/res_currency.py index 8e02836274a..ce781a1e11a 100644 --- a/addons/account/res_currency.py +++ b/addons/account/res_currency.py @@ -45,4 +45,3 @@ class res_currency_account(osv.osv): res_currency_account() # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: - diff --git a/addons/account/static/src/xml/account_move_reconciliation.xml b/addons/account/static/src/xml/account_move_reconciliation.xml index c266e819198..d7b5301238d 100644 --- a/addons/account/static/src/xml/account_move_reconciliation.xml +++ b/addons/account/static/src/xml/account_move_reconciliation.xml @@ -3,10 +3,17 @@ + +
+

+ Good job! +

+ There is nothing to reconcile. All invoices and payments + have been reconciled, your partner balance is clean. +

+
+
+ + + + + + + + + + + @@ -196,7 +208,6 @@
-
@@ -218,7 +229,7 @@ - + @@ -453,7 +464,7 @@
-
diff --git a/addons/event/report/__init__.py b/addons/event/report/__init__.py index 1c60e2715df..4f2516e5615 100644 --- a/addons/event/report/__init__.py +++ b/addons/event/report/__init__.py @@ -21,4 +21,4 @@ import report_event_registration -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: \ No newline at end of file +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/event/report/report_event_registration_view.xml b/addons/event/report/report_event_registration_view.xml index 6ce2c199332..f39b6aecfe7 100644 --- a/addons/event/report/report_event_registration_view.xml +++ b/addons/event/report/report_event_registration_view.xml @@ -62,8 +62,8 @@ - - + + diff --git a/addons/event/wizard/event_confirm.py b/addons/event/wizard/event_confirm.py index e21d523bb12..e001aac9937 100644 --- a/addons/event/wizard/event_confirm.py +++ b/addons/event/wizard/event_confirm.py @@ -34,4 +34,4 @@ class event_confirm(osv.osv_memory): event_confirm() -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: \ No newline at end of file +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/event_moodle/event_moodle.py b/addons/event_moodle/event_moodle.py index 0a565200f35..0bac50ca445 100644 --- a/addons/event_moodle/event_moodle.py +++ b/addons/event_moodle/event_moodle.py @@ -127,7 +127,7 @@ class event_moodle(osv.osv): passwd = passwd + '+' return passwd - def check_email(self,email): + def check_email(self, email): """ check if email is correct diff --git a/addons/event_project/__init__.py b/addons/event_project/__init__.py deleted file mode 100644 index c43297c86f4..00000000000 --- a/addons/event_project/__init__.py +++ /dev/null @@ -1,25 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################## -# -# OpenERP, Open Source Management Solution -# Copyright (C) 2004-2010 Tiny SPRL (). -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -############################################################################## -import event_project -import wizard - -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: - diff --git a/addons/event_project/__openerp__.py b/addons/event_project/__openerp__.py deleted file mode 100644 index 81fb24455f5..00000000000 --- a/addons/event_project/__openerp__.py +++ /dev/null @@ -1,41 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################## -# -# OpenERP, Open Source Management Solution -# Copyright (C) 2004-2010 Tiny SPRL (). -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -############################################################################## - -{ - 'name': 'Retro-Planning on Events', - 'version': '0.1', - 'category': 'Tools', - 'description': """ -Organization and management of events. -====================================== - -This module allows you to create retro planning for managing your events. -""", - 'author': 'OpenERP SA', - 'images': ['images/event.jpeg'], - 'depends': ['project_retro_planning', 'event'], - 'data': ['wizard/event_project_retro_view.xml', 'event_project_view.xml'], - 'demo': [], - 'installable': True, - 'auto_install': False, -} - -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/event_project/event_project.py b/addons/event_project/event_project.py deleted file mode 100644 index 8590b84c4ad..00000000000 --- a/addons/event_project/event_project.py +++ /dev/null @@ -1,58 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################## -# -# OpenERP, Open Source Management Solution -# Copyright (C) 2004-2010 Tiny SPRL (). -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -############################################################################## - -from osv import fields, osv - -class one2many_mod_task(fields.one2many): - - def get(self, cr, obj, ids, name, user=None, offset=0, context=None, values=None): - if not values: - values = {} - res = {} - for id in ids: - res[id] = [] - for id in ids: - query = "select project_id from event_event where id = %s" - cr.execute(query, (id,)) - project_ids = [ x[0] for x in cr.fetchall()] - ids2 = obj.pool.get(self._obj).search(cr, user, [(self._fields_id, 'in', project_ids), ('state', '<>', 'done')], limit=self._limit) - for r in obj.pool.get(self._obj)._read_flat(cr, user, ids2, [self._fields_id], context=context, load='_classic_write'): - res[id].append( r['id'] ) - return res - -class event(osv.osv): - _inherit = 'event.event' - - def write(self, cr, uid, ids, vals, *args, **kwargs): - if 'date_begin' in vals and vals['date_begin']: - for eve in self.browse(cr, uid, ids): - if eve.project_id: - self.pool.get('project.project').write(cr, uid, [eve.project_id.id], {'date_end': eve.date_begin[:10]}) - return super(event,self).write(cr, uid, ids, vals, *args, **kwargs) - - _columns = { - 'project_id': fields.many2one('project.project', 'Project', readonly=True), - 'task_ids': one2many_mod_task('project.task', 'project_id', "Project tasks", readonly=True, domain="[('state', '<>', 'done')]"), - } - -event() - -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: \ No newline at end of file diff --git a/addons/event_project/event_project_view.xml b/addons/event_project/event_project_view.xml deleted file mode 100644 index e3b761aea30..00000000000 --- a/addons/event_project/event_project_view.xml +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - Events - event.event - - - - - - -