From c4476c4ad3d5953c5677127aa542f1ce61816f53 Mon Sep 17 00:00:00 2001 From: "Turkesh Patel (Open ERP)" Date: Mon, 2 Jul 2012 17:46:46 +0530 Subject: [PATCH 001/157] [FIX] plugin:when create the partner from the thunderbird at that time create partner two times. bzr revid: tpa@tinyerp.com-20120702121646-bzom7r2buerwj5n7 --- addons/plugin/plugin_handler.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/addons/plugin/plugin_handler.py b/addons/plugin/plugin_handler.py index 700b9648237..2de179f6744 100644 --- a/addons/plugin/plugin_handler.py +++ b/addons/plugin/plugin_handler.py @@ -126,9 +126,10 @@ class plugin_handler(osv.osv_memory): partner_obj = self.pool.get('res.partner') dictcreate = dict(data) if partner_id == 0: - partner_id = partner_obj.create(cr, uid, {'name':dictcreate.get('name')}) - dictcreate['partner_id'] = partner_id - self.pool.get('res.partner').create(cr, uid, dictcreate) + partner_id = partner_obj.create(cr, uid, dictcreate) + else: + dictcreate['parent_id'] = partner_id + partner_obj.create(cr, uid, dictcreate) url = self._make_url(cr, uid, partner_id, 'res.partner') return ('res.partner', partner_id, url) From edfac27fac7696f61d616919ab74fd59dd9488d2 Mon Sep 17 00:00:00 2001 From: "Turkesh Patel (Open ERP)" Date: Mon, 2 Jul 2012 18:29:26 +0530 Subject: [PATCH 002/157] [IMP] improved code bzr revid: tpa@tinyerp.com-20120702125926-r9mtwclvb9mrm5f7 --- addons/plugin/plugin_handler.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/addons/plugin/plugin_handler.py b/addons/plugin/plugin_handler.py index 2de179f6744..a026eb61d4b 100644 --- a/addons/plugin/plugin_handler.py +++ b/addons/plugin/plugin_handler.py @@ -125,11 +125,9 @@ class plugin_handler(osv.osv_memory): """ partner_obj = self.pool.get('res.partner') dictcreate = dict(data) - if partner_id == 0: - partner_id = partner_obj.create(cr, uid, dictcreate) - else: + if partner_id: dictcreate['parent_id'] = partner_id - partner_obj.create(cr, uid, dictcreate) + partner_id = partner_obj.create(cr, uid, dictcreate) url = self._make_url(cr, uid, partner_id, 'res.partner') return ('res.partner', partner_id, url) From ee941671d2c391d085f153f6496bc755a900813d Mon Sep 17 00:00:00 2001 From: "Amit Bhavsar (Open ERP)" Date: Thu, 19 Jul 2012 14:15:42 +0530 Subject: [PATCH 003/157] [FIX] account : Improve the code. lp bug: https://launchpad.net/bugs/1026434 fixed bzr revid: amb@tinyerp.com-20120719084542-la8jx5qxiefwoojr --- addons/account/wizard/account_move_journal.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account/wizard/account_move_journal.py b/addons/account/wizard/account_move_journal.py index 66f634bd59f..a84c7f8eabb 100644 --- a/addons/account/wizard/account_move_journal.py +++ b/addons/account/wizard/account_move_journal.py @@ -99,7 +99,7 @@ class account_move_journal(osv.osv_memory): period = False if period_id: - period = period_pool.browse(cr, uid, [period_id], ['name'])[0]['name'] + period = period_pool.browse(cr, uid, [period_id], context=None)[0]['name'] period_string = _("Period: %s") % tools.ustr(period) open_string = _("Open") From 5c31f52c47c8205703a4da666a01916f9971b522 Mon Sep 17 00:00:00 2001 From: "Cristian Salamea (Gnuthink)" <> Date: Thu, 19 Jul 2012 17:49:45 +0530 Subject: [PATCH 004/157] [FIX]l10n_ec: Change The name of Author lp bug: https://launchpad.net/bugs/1026085 fixed bzr revid: dsi@tinyerp.com-20120719121945-nmad9m98t3q77tet --- addons/l10n_ec/__openerp__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/l10n_ec/__openerp__.py b/addons/l10n_ec/__openerp__.py index 9dd81606036..13d11f03b9d 100644 --- a/addons/l10n_ec/__openerp__.py +++ b/addons/l10n_ec/__openerp__.py @@ -27,7 +27,7 @@ This is the base module to manage the accounting chart for Ecuador in OpenERP. Accounting chart and localization for Ecuador. """, - 'author': 'OpenERP SA', + 'author': 'Gnuthink Co.Ltd.', 'depends': [ 'account', 'base_vat', From dd55d30961d370546267deafefc0ba614e728a0e Mon Sep 17 00:00:00 2001 From: "Amit Bhavsar (Open ERP)" Date: Fri, 20 Jul 2012 11:35:06 +0530 Subject: [PATCH 005/157] [FIX] account : Improve the code lp bug: https://launchpad.net/bugs/1026434 fixed bzr revid: amb@tinyerp.com-20120720060506-clb6z56xa5tqzyy3 --- addons/account/wizard/account_move_journal.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account/wizard/account_move_journal.py b/addons/account/wizard/account_move_journal.py index a84c7f8eabb..ea2244edb15 100644 --- a/addons/account/wizard/account_move_journal.py +++ b/addons/account/wizard/account_move_journal.py @@ -99,7 +99,7 @@ class account_move_journal(osv.osv_memory): period = False if period_id: - period = period_pool.browse(cr, uid, [period_id], context=None)[0]['name'] + period = period_pool.browse(cr, uid, [period_id], context=context)[0]['name'] period_string = _("Period: %s") % tools.ustr(period) open_string = _("Open") From f444fe08765ac817d88b16591110784ec1ffade2 Mon Sep 17 00:00:00 2001 From: "Bhumi Thakkar (Open ERP)" Date: Tue, 21 Aug 2012 16:25:13 +0530 Subject: [PATCH 006/157] [IMP] required=true on alias_id field and create alias_force_id field. bzr revid: bth@tinyerp.com-20120821105513-lq4am6na04rjqncc --- addons/mail/mail_alias.py | 3 ++- addons/mail/mail_group.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/addons/mail/mail_alias.py b/addons/mail/mail_alias.py index 82b20f39480..ea4c91b2435 100644 --- a/addons/mail/mail_alias.py +++ b/addons/mail/mail_alias.py @@ -54,10 +54,11 @@ class mail_alias(osv.Model): def _get_alias_domain(self, cr, uid, ids, name, args, context=None): ir_config_parameter = self.pool.get("ir.config_parameter") - domain = ir_config_parameter.get_param(cr, uid, "mail.catchall.domain", context=context) + domain = ir_config_parameter.get_param(cr, uid, "mail.catchall.domain", context=context) return dict.fromkeys(ids, domain or "") _columns = { + 'alias_force_id': fields.integer('Alias Force Id'), 'alias_name': fields.char('Alias', required=True, help="The name of the email alias, e.g. 'jobs' " "if you want to catch emails for ",), diff --git a/addons/mail/mail_group.py b/addons/mail/mail_group.py index 6a14fef83aa..39a1707bc8a 100644 --- a/addons/mail/mail_group.py +++ b/addons/mail/mail_group.py @@ -98,7 +98,7 @@ class mail_group(osv.Model): "Use this field anywhere a small image is required."), 'last_month_msg_nbr': fields.function(_get_last_month_msg_nbr, type='integer', string='Messages count for last month'), - 'alias_id': fields.many2one('mail.alias', 'Alias', ondelete="cascade", + 'alias_id': fields.many2one('mail.alias', 'Alias', required=True, ondelete="cascade", help="The email address associated with this group. New emails received will automatically " "create new topics."), } From 10ae5349077fbf938218f3f66eeeb2eccf6a5a24 Mon Sep 17 00:00:00 2001 From: "Bhumi Thakkar (Open ERP)" Date: Tue, 21 Aug 2012 17:11:38 +0530 Subject: [PATCH 007/157] [IMP] Add field section_id. bzr revid: bth@tinyerp.com-20120821114138-qiujc10jud40da6u --- addons/hr_recruitment/hr_recruitment.py | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/hr_recruitment/hr_recruitment.py b/addons/hr_recruitment/hr_recruitment.py index 81a7ae6129e..56110322b1c 100644 --- a/addons/hr_recruitment/hr_recruitment.py +++ b/addons/hr_recruitment/hr_recruitment.py @@ -230,6 +230,7 @@ class hr_applicant(base_stage, osv.Model): 'color': fields.integer('Color Index'), 'emp_id': fields.many2one('hr.employee', 'employee'), 'user_email': fields.related('user_id', 'email', type='char', string='User Email', readonly=True), + 'section_id': fields.integer('Section Id'), } _defaults = { From 44ccdd6a59c0407b5d507f6f170872461a0e8a74 Mon Sep 17 00:00:00 2001 From: "Bhumi Thakkar (Open ERP)" Date: Wed, 22 Aug 2012 15:19:22 +0530 Subject: [PATCH 008/157] [IMP] created field property_ids for procurement.order object. bzr revid: bth@tinyerp.com-20120822094922-u3jad3okwg15688h --- addons/sale/sale.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/addons/sale/sale.py b/addons/sale/sale.py index c525ba04df1..ad066c3d374 100644 --- a/addons/sale/sale.py +++ b/addons/sale/sale.py @@ -1490,4 +1490,10 @@ class mail_message(osv.osv): mail_message() +class procurement_order(osv.osv): + _inherit = "procurement.order" + + _columns = { + 'property_ids': fields.many2many('sale.order', 'sale_order_property_rel', 'procurement_id','order_id', 'Properties'), + } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: From edb6e7e0d32b8b8300a9fa35777baa0279268889 Mon Sep 17 00:00:00 2001 From: "Bhumi Thakkar (Open ERP)" Date: Wed, 22 Aug 2012 16:51:37 +0530 Subject: [PATCH 009/157] [IMP] Replace field name type with message_type. bzr revid: bth@tinyerp.com-20120822112137-u6i2dujnpisk7t1p --- addons/mail/mail_message.py | 16 ++++++++-------- addons/mail/mail_message_view.xml | 18 +++++++++--------- addons/mail/mail_thread.py | 6 +++--- 3 files changed, 20 insertions(+), 20 deletions(-) diff --git a/addons/mail/mail_message.py b/addons/mail/mail_message.py index 7801a9b42d9..15e9121cee9 100644 --- a/addons/mail/mail_message.py +++ b/addons/mail/mail_message.py @@ -199,9 +199,9 @@ class mail_message(osv.Model): 'nodestroy': True }) return action_data - + _columns = { - 'type': fields.selection([ + 'message_type': fields.selection([ ('email', 'email'), ('comment', 'Comment'), ('notification', 'System notification'), @@ -235,16 +235,16 @@ class mail_message(osv.Model): help="Parent message, used for displaying as threads with hierarchy"), 'child_ids': fields.one2many('mail.message', 'parent_id', 'Child Messages'), } - + _defaults = { - 'type': 'email', + 'message_type': 'email', 'state': 'received', } - + #------------------------------------------------------ # Email api #------------------------------------------------------ - + def init(self, cr): cr.execute("""SELECT indexname FROM pg_indexes WHERE indexname = 'mail_message_model_res_id_idx'""") if not cr.fetchone(): @@ -356,7 +356,7 @@ class mail_message(osv.Model): 'user_id': uid, 'model': model, 'res_id': res_id, - 'type': type, + 'message_type': type, 'body_text': body if content_subtype != 'html' else False, 'body_html': body if content_subtype == 'html' else False, 'email_from': email_from, @@ -414,7 +414,7 @@ class mail_message(osv.Model): if context is None: context = {} if not ids: - filters = ['&', ('state', '=', 'outgoing'), ('type', '=', 'email')] + filters = ['&', ('state', '=', 'outgoing'), ('message_type', '=', 'email')] if 'filters' in context: filters.extend(context['filters']) ids = self.search(cr, uid, filters, context=context) diff --git a/addons/mail/mail_message_view.xml b/addons/mail/mail_message_view.xml index 0aa5261d7e7..614b70820d0 100644 --- a/addons/mail/mail_message_view.xml +++ b/addons/mail/mail_message_view.xml @@ -30,7 +30,7 @@ - + @@ -75,19 +75,19 @@ - + + domain="[('message_type', '=', 'comment')]"/> + domain="[('message_type', '=', 'notification')]"/> + domain="[('message_type', '=', 'email')]"/> - + @@ -205,9 +205,9 @@ - - - + + + diff --git a/addons/mail/mail_thread.py b/addons/mail/mail_thread.py index 56c7e6b7088..1168a677472 100644 --- a/addons/mail/mail_thread.py +++ b/addons/mail/mail_thread.py @@ -440,7 +440,7 @@ class mail_thread(osv.Model): 'body_html': body_html or '', 'parent_id': parent_id, 'date': email_date or fields.datetime.now(), - 'type': type, + 'message_type': type, 'content_subtype': content_subtype, 'state': state, 'message_id': message_id, @@ -491,7 +491,7 @@ class mail_thread(osv.Model): body_text = msg_dict.get('body_text'), body_html= msg_dict.get('body_html'), parent_id = msg_dict.get('parent_id', False), - type = msg_dict.get('type', 'email'), + message_type = msg_dict.get('message_type', 'email'), content_subtype = msg_dict.get('content_subtype'), state = msg_dict.get('state'), partner_ids = msg_dict.get('partner_ids'), @@ -1107,7 +1107,7 @@ class mail_thread(osv.Model): if body_text: body_text += '\n\n----------\nThis email was send automatically by OpenERP, because you have subscribed to a document.' values.update({ - 'type': 'email', + 'message_type': 'email', 'state': 'outgoing', 'email_from': email_from, 'email_to': email_to, From 9eac8aadaf0b2f309f00afa958319428dd6b6064 Mon Sep 17 00:00:00 2001 From: "Bhumi Thakkar (Open ERP)" Date: Wed, 22 Aug 2012 17:00:34 +0530 Subject: [PATCH 010/157] [IMP] Remove property_ids:value from _prepare_order_line_procurement function which is unused and also created field. bzr revid: bth@tinyerp.com-20120822113034-p7rth1ps829bt0qd --- addons/sale/sale.py | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/addons/sale/sale.py b/addons/sale/sale.py index ad066c3d374..d2bb4e145cc 100644 --- a/addons/sale/sale.py +++ b/addons/sale/sale.py @@ -845,8 +845,7 @@ class sale_order(osv.osv): 'procure_method': line.type, 'move_id': move_id, 'company_id': order.company_id.id, - 'note': '\n'.join(line.name.split('\n')[1:]), - 'property_ids': [(6, 0, [x.id for x in line.property_ids])] + 'note': '\n'.join(line.name.split('\n')[1:]) } def _prepare_order_line_move(self, cr, uid, order, line, picking_id, date_planned, context=None): @@ -1490,10 +1489,4 @@ class mail_message(osv.osv): mail_message() -class procurement_order(osv.osv): - _inherit = "procurement.order" - - _columns = { - 'property_ids': fields.many2many('sale.order', 'sale_order_property_rel', 'procurement_id','order_id', 'Properties'), - } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: From ec283ff4ac3abff9ce70f33e11d793024f4d27d1 Mon Sep 17 00:00:00 2001 From: Paramjit Singh Sahota Date: Wed, 22 Aug 2012 18:03:48 +0530 Subject: [PATCH 011/157] [IMP] Given the access rights for the account.journal.cashbox.line in ACCOUNT. bzr revid: psa@tinyerp.com-20120822123348-2gghmwi0k78oopkr --- addons/account/security/ir.model.access.csv | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/account/security/ir.model.access.csv b/addons/account/security/ir.model.access.csv index a5049c0a345..28bedbf65a1 100644 --- a/addons/account/security/ir.model.access.csv +++ b/addons/account/security/ir.model.access.csv @@ -82,6 +82,7 @@ access_account_entries_report_invoice,account.entries.report,model_account_entri access_account_entries_report_employee,account.entries.report employee,model_account_entries_report,base.group_user,1,0,0,0 access_analytic_entries_report_manager,analytic.entries.report,model_analytic_entries_report,account.group_account_manager,1,0,0,0 access_account_cashbox_line,account.cashbox.line,model_account_cashbox_line,account.group_account_user,1,1,1,1 +access_account_journal_cashbox_line,account.journal.cashbox.line,model_account_journal_cashbox_line,account.group_account_user,1,1,1,0 access_account_journal_view_invoice,account.journal.view invoice,model_account_journal_view,account.group_account_invoice,1,1,1,1 access_account_journal_column_invoice,account.journal.column invoice,model_account_journal_column,account.group_account_invoice,1,1,1,1 access_account_invoice_tax_accountant,account.invoice.tax accountant,model_account_invoice_tax,account.group_account_user,1,0,0,0 From 189a5ef346add8487e0ef3738b150bf1148e82c0 Mon Sep 17 00:00:00 2001 From: "Bhumi Thakkar (Open ERP)" Date: Wed, 22 Aug 2012 18:45:49 +0530 Subject: [PATCH 012/157] [IMP] report_type function field is be stored in table. bzr revid: bth@tinyerp.com-20120822131549-hkmnezfia8g03zm3 --- addons/account/account.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account/account.py b/addons/account/account.py index fa30b20f2ca..7da0753be8f 100644 --- a/addons/account/account.py +++ b/addons/account/account.py @@ -184,7 +184,7 @@ class account_account_type(osv.osv): ('income', _('Profit & Loss (Income account)')), ('expense', _('Profit & Loss (Expense account)')), ('asset', _('Balance Sheet (Asset account)')), - ('liability', _('Balance Sheet (Liability account)'))], help="This field is used to generate legal reports: profit and loss, balance sheet.", required=True), + ('liability', _('Balance Sheet (Liability account)'))], store=True, help="This field is used to generate legal reports: profit and loss, balance sheet.", required=True), 'note': fields.text('Description'), } _defaults = { From 77905719d3b11e5e7b1a0bc11bbdd5c15b546e0f Mon Sep 17 00:00:00 2001 From: "Bhumi Thakkar (Open ERP)" Date: Thu, 23 Aug 2012 13:02:01 +0530 Subject: [PATCH 013/157] [IMP] remove type field from model=ir.ui.view. bzr revid: bth@tinyerp.com-20120823073201-vgtmu5ohmjhfhagu --- addons/sale/res_partner_view.xml | 1 - 1 file changed, 1 deletion(-) diff --git a/addons/sale/res_partner_view.xml b/addons/sale/res_partner_view.xml index f076bfda67c..e524fe4415d 100644 --- a/addons/sale/res_partner_view.xml +++ b/addons/sale/res_partner_view.xml @@ -58,7 +58,6 @@ res.partner.view.address_type res.partner - form From ee8b2cc93467f4b234d161575fafc4fce21591f5 Mon Sep 17 00:00:00 2001 From: "Bhumi Thakkar (Open ERP)" Date: Thu, 23 Aug 2012 13:09:13 +0530 Subject: [PATCH 014/157] [IMP] Remove type field from model=ir.ui.view. bzr revid: bth@tinyerp.com-20120823073913-hqm60kysmk8xwyv8 --- addons/mail/mail_followers_view.xml | 1 - 1 file changed, 1 deletion(-) diff --git a/addons/mail/mail_followers_view.xml b/addons/mail/mail_followers_view.xml index 62e93430675..8b19d51ca2a 100644 --- a/addons/mail/mail_followers_view.xml +++ b/addons/mail/mail_followers_view.xml @@ -6,7 +6,6 @@ mail.followers.tree mail.followers - tree 10 From ec11fa23a86e2a979432e28ce8d0fba546ccbea3 Mon Sep 17 00:00:00 2001 From: Paramjit Singh Sahota Date: Thu, 23 Aug 2012 15:36:40 +0530 Subject: [PATCH 015/157] [IMP] Given the access rights for the account.journal.cashbox.line in ACCOUNT. bzr revid: psa@tinyerp.com-20120823100640-5i00hwtv12wei7re --- addons/account/security/ir.model.access.csv | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/account/security/ir.model.access.csv b/addons/account/security/ir.model.access.csv index a5049c0a345..28bedbf65a1 100644 --- a/addons/account/security/ir.model.access.csv +++ b/addons/account/security/ir.model.access.csv @@ -82,6 +82,7 @@ access_account_entries_report_invoice,account.entries.report,model_account_entri access_account_entries_report_employee,account.entries.report employee,model_account_entries_report,base.group_user,1,0,0,0 access_analytic_entries_report_manager,analytic.entries.report,model_analytic_entries_report,account.group_account_manager,1,0,0,0 access_account_cashbox_line,account.cashbox.line,model_account_cashbox_line,account.group_account_user,1,1,1,1 +access_account_journal_cashbox_line,account.journal.cashbox.line,model_account_journal_cashbox_line,account.group_account_user,1,1,1,0 access_account_journal_view_invoice,account.journal.view invoice,model_account_journal_view,account.group_account_invoice,1,1,1,1 access_account_journal_column_invoice,account.journal.column invoice,model_account_journal_column,account.group_account_invoice,1,1,1,1 access_account_invoice_tax_accountant,account.invoice.tax accountant,model_account_invoice_tax,account.group_account_user,1,0,0,0 From de6d26886ab91e6d5e4aee69a73ae574be39d78b Mon Sep 17 00:00:00 2001 From: "Bhumi Thakkar (Open ERP)" Date: Thu, 23 Aug 2012 18:23:11 +0530 Subject: [PATCH 016/157] [IMP] Remove type field from ir.ui.view model. bzr revid: bth@tinyerp.com-20120823125311-nx4x46ea3g2ercl8 --- addons/point_of_sale/point_of_sale_view.xml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/addons/point_of_sale/point_of_sale_view.xml b/addons/point_of_sale/point_of_sale_view.xml index 6487eebbe4f..67b1c91e025 100644 --- a/addons/point_of_sale/point_of_sale_view.xml +++ b/addons/point_of_sale/point_of_sale_view.xml @@ -1064,9 +1064,8 @@ pos.ean_wizard pos.ean_wizard - form -
+