From 0d565d8882c50555677fd9cbece509796e44e1e5 Mon Sep 17 00:00:00 2001 From: Mantavya Gajjar Date: Tue, 15 Sep 2009 11:14:50 +0530 Subject: [PATCH 01/74] [ADD]: add new data file which will add over due payment message to company bzr revid: mga@tinyerp.com-20090915054450-1ju59ok5ev4pw8yg --- addons/account_followup/__terp__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/account_followup/__terp__.py b/addons/account_followup/__terp__.py index 00e86ef2d96..5122204fa68 100644 --- a/addons/account_followup/__terp__.py +++ b/addons/account_followup/__terp__.py @@ -53,6 +53,7 @@ 'wizard/wizard_view.xml', 'followup_report_view.xml', 'followup_view.xml', + 'followup_data.xml' ], 'demo_xml': ['followup_demo.xml'], 'installable': True, From d16353aad85dd6c66005f972b8f2ac108823b86a Mon Sep 17 00:00:00 2001 From: Mantavya Gajjar Date: Tue, 15 Sep 2009 11:15:34 +0530 Subject: [PATCH 02/74] [IMP]: add new filed to company object which will store the mesages bzr revid: mga@tinyerp.com-20090915054534-7ancl4t5bcqsif7q --- addons/account_followup/followup.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/addons/account_followup/followup.py b/addons/account_followup/followup.py index 459e3e38e3c..9efd1d0a1ff 100644 --- a/addons/account_followup/followup.py +++ b/addons/account_followup/followup.py @@ -55,6 +55,29 @@ class account_move_line(osv.osv): } account_move_line() +class res_company(osv.osv): + _inherit = "res.company" + _columns = { + 'follow_up_msg' : fields.text('Follow-up Message', translate=True), + } + + _defaults = { + 'overdue_msg': lambda *a: ''' +Date : %(date)s + +Dear %(partner_name)s, + +Please find in attachment a reminder of all your unpaid invoices, for a total amount due of: + +%(followup_amount).2f %(company_currency)s + +Thanks, +-- +%(user_signature)s +%(company_name)s + ''' + } +res_company() # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: From 2168cad83e586daa9d0b5d1694812fd0dc0794b8 Mon Sep 17 00:00:00 2001 From: Mantavya Gajjar Date: Tue, 15 Sep 2009 11:16:21 +0530 Subject: [PATCH 03/74] [IMP]: add inherited view for company bzr revid: mga@tinyerp.com-20090915054621-7iyfnle7otqkday3 --- addons/account_followup/followup_view.xml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/addons/account_followup/followup_view.xml b/addons/account_followup/followup_view.xml index 1b2d40a7cd9..cd02355dc7e 100644 --- a/addons/account_followup/followup_view.xml +++ b/addons/account_followup/followup_view.xml @@ -125,7 +125,6 @@ - @@ -136,6 +135,17 @@ - + + res.company.followup.form.inherit + + res.company + form + + + + + + + From 24233606a20a6422abc6f0b5c3aae895f4320401 Mon Sep 17 00:00:00 2001 From: Mantavya Gajjar Date: Tue, 15 Sep 2009 11:16:42 +0530 Subject: [PATCH 04/74] [CHANGE]: change a logic to read the message from company configuration bzr revid: mga@tinyerp.com-20090915054642-qg0zz31wkgdv24u8 --- addons/account_followup/wizard/wizard_followup_print.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/addons/account_followup/wizard/wizard_followup_print.py b/addons/account_followup/wizard/wizard_followup_print.py index e271d1dbd27..9d1f4c6deef 100644 --- a/addons/account_followup/wizard/wizard_followup_print.py +++ b/addons/account_followup/wizard/wizard_followup_print.py @@ -256,8 +256,10 @@ class followup_all_print(wizard.interface): if partner_id not in partner_list: partner_list.append(partner_id) to_update[str(id)] = fups[followup_line_id][1] - - return {'partner_ids': partner_list, 'to_update': to_update} + + message = pool.get('res.users').browse(cr, uid, uid).company_id.follow_up_msg + + return {'partner_ids': partner_list, 'to_update': to_update, 'email_body':message} def _get_screen1_values(self, cr, uid, data, context): pool = pooler.get_pool(cr.dbname) From 323d71fecb5a61c9bdd9be3faf0ed21a26f865f5 Mon Sep 17 00:00:00 2001 From: "Jay (Open ERP)" Date: Tue, 15 Sep 2009 12:43:23 +0530 Subject: [PATCH 06/74] [IMP] Rng : Accepting Groups under/after/replacing Buttons bzr revid: jvo@tinyerp.com-20090915071323-c4hcvh1uzg18p7si --- bin/addons/base/rng/view.rng | 1 + 1 file changed, 1 insertion(+) diff --git a/bin/addons/base/rng/view.rng b/bin/addons/base/rng/view.rng index 78944519593..d69c09df72a 100644 --- a/bin/addons/base/rng/view.rng +++ b/bin/addons/base/rng/view.rng @@ -378,6 +378,7 @@ + From 4c3b285cbfed2c5920a5aed97e214b29e722b76c Mon Sep 17 00:00:00 2001 From: Fabien Pinckaers Date: Tue, 15 Sep 2009 09:42:59 +0200 Subject: [PATCH 07/74] [FIX] #416908 computation of invoice lines bzr revid: fp@tinyerp.com-20090915074259-bbnrkmbftvawuz9d --- addons/account/invoice.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account/invoice.py b/addons/account/invoice.py index be9b4f63246..467bf02f661 100644 --- a/addons/account/invoice.py +++ b/addons/account/invoice.py @@ -435,7 +435,7 @@ class account_invoice(osv.osv): for taxe in ait_obj.compute(cr, uid, id, context=context).values(): ait_obj.create(cr, uid, taxe) # Update the stored value (fields.function), so we write to trigger recompute - self.pool.get('account.invoice').write(cr, uid, ids, {}, context=context) + self.pool.get('account.invoice').write(cr, uid, ids, {'invoice_line':[]}, context=context) # self.pool.get('account.invoice').write(cr, uid, ids, {}, context=context) return True From dbc2adadf22d414d3fa5881293d5ee8c7ac71f2f Mon Sep 17 00:00:00 2001 From: Fabien Pinckaers Date: Tue, 15 Sep 2009 10:17:44 +0200 Subject: [PATCH 08/74] [FIX] regression in fields.function computation bzr revid: fp@tinyerp.com-20090915081744-0l9k2v8a86fl036l --- bin/osv/orm.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bin/osv/orm.py b/bin/osv/orm.py index 08086f5d49b..f5be539a6d6 100644 --- a/bin/osv/orm.py +++ b/bin/osv/orm.py @@ -2469,9 +2469,10 @@ class orm(orm_template): if c[0].startswith('default_'): del rel_context[c[0]] + result = [] for field in upd_todo: for id in ids: - self._columns[field].set(cr, self, id, field, vals[field], user, context=rel_context) + result += self._columns[field].set(cr, self, id, field, vals[field], user, context=rel_context) or [] for table in self._inherits: col = self._inherits[table] @@ -2533,7 +2534,7 @@ class orm(orm_template): cr.execute('update '+self._table+' set parent_right=parent_right+%s where parent_right>=%s', (distance, position)) cr.execute('update '+self._table+' set parent_left=parent_left-%s, parent_right=parent_right-%s where parent_left>=%s and parent_left<%s', (pleft-position+distance,pleft-position+distance, pleft+distance, pright+distance)) - result = self._store_get_values(cr, user, ids, vals.keys(), context) + result += self._store_get_values(cr, user, ids, vals.keys(), context) for order, object, ids, fields in result: self.pool.get(object)._store_set_values(cr, user, ids, fields, context) From 1bb8131a248921265139984f7008bb1494cab70c Mon Sep 17 00:00:00 2001 From: Mantavya Gajjar Date: Tue, 15 Sep 2009 15:16:27 +0530 Subject: [PATCH 09/74] [ADD]: add missing file for the followup date bzr revid: mga@tinyerp.com-20090915094627-kqjklsjvaqcehsgh --- addons/account_followup/followup_data.xml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 addons/account_followup/followup_data.xml diff --git a/addons/account_followup/followup_data.xml b/addons/account_followup/followup_data.xml new file mode 100644 index 00000000000..2a33e65b2c8 --- /dev/null +++ b/addons/account_followup/followup_data.xml @@ -0,0 +1,19 @@ + + + + + Date : %(date)s + +Dear %(partner_name)s, + +Please find in attachment a reminder of all your unpaid invoices, for a total amount due of: + +%(followup_amount).2f %(company_currency)s + +Thanks, +-- +%(user_signature)s +%(company_name)s + + + From 7955f8e23c26ba519e07a99747636cbaef40242b Mon Sep 17 00:00:00 2001 From: Mantavya Gajjar Date: Tue, 15 Sep 2009 15:21:33 +0530 Subject: [PATCH 10/74] [FIX]: fix problem to get the detault message bzr revid: mga@tinyerp.com-20090915095133-52t8294uj75h7a9i --- addons/account_followup/wizard/wizard_followup_print.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/account_followup/wizard/wizard_followup_print.py b/addons/account_followup/wizard/wizard_followup_print.py index 9d1f4c6deef..004f62503bd 100644 --- a/addons/account_followup/wizard/wizard_followup_print.py +++ b/addons/account_followup/wizard/wizard_followup_print.py @@ -156,6 +156,7 @@ class followup_all_print(wizard.interface): if adr.email: dest = [adr.email] src = tools.config.options['smtp_user'] + #TODO : fix me to get message according to the partner language body=data['form']['email_body'] total_amt = followup_data.debit - followup_data.credit move_line = '' @@ -257,7 +258,7 @@ class followup_all_print(wizard.interface): partner_list.append(partner_id) to_update[str(id)] = fups[followup_line_id][1] - message = pool.get('res.users').browse(cr, uid, uid).company_id.follow_up_msg + message = pool.get('res.users').browse(cr, uid, uid, context=context).company_id.follow_up_msg return {'partner_ids': partner_list, 'to_update': to_update, 'email_body':message} From c2d470b4f77966cc71cbea9bcba8d79a32cc935f Mon Sep 17 00:00:00 2001 From: Mantavya Gajjar Date: Tue, 15 Sep 2009 15:38:24 +0530 Subject: [PATCH 11/74] [FIX]: fix a problem for the overdue payment message message should be depending on the partner language and not according to the company language bzr revid: mga@tinyerp.com-20090915100824-618bu2tot1l5jlwu --- addons/account/company.py | 2 +- addons/account/report/overdue.py | 8 +++++++- addons/account/report/overdue.rml | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/addons/account/company.py b/addons/account/company.py index 403b886e012..e724b3a9775 100644 --- a/addons/account/company.py +++ b/addons/account/company.py @@ -25,7 +25,7 @@ from osv import fields, osv class res_company(osv.osv): _inherit = "res.company" _columns = { - 'overdue_msg' : fields.text('Overdue Payments Message'), + 'overdue_msg' : fields.text('Overdue Payments Message', translate=True), } _defaults = { diff --git a/addons/account/report/overdue.py b/addons/account/report/overdue.py index 76ebbe7efa4..861ad82ef9c 100644 --- a/addons/account/report/overdue.py +++ b/addons/account/report/overdue.py @@ -35,6 +35,7 @@ class Overdue(report_sxw.rml_parse): 'adr_get' : self._adr_get, 'getLines' : self._lines_get, 'tel_get' : self._tel_get, + 'message' : self._message, }) self.context = context def _adr_get(self, partner, type): @@ -80,7 +81,12 @@ class Overdue(report_sxw.rml_parse): ('state', '<>', 'draft'), ('reconcile_id', '=', False)]) movelines = moveline_obj.browse(self.cr, self.uid, movelines) return movelines - + + def _message(self, obj, company): + company_pool = pooler.get_pool(self.cr.dbname).get('res.company') + message = company_pool.browse(self.cr, self.uid, company.id, {'lang':obj.lang}).overdue_msg + return message + report_sxw.report_sxw('report.account.overdue', 'res.partner', 'addons/account/report/overdue.rml', parser=Overdue) diff --git a/addons/account/report/overdue.rml b/addons/account/report/overdue.rml index df4c69c45b4..2713b665d06 100644 --- a/addons/account/report/overdue.rml +++ b/addons/account/report/overdue.rml @@ -127,7 +127,7 @@ - [[ company.overdue_msg ]] + [[ message(o, company) ]] From 4e81bf70fc1c9d48d40648fb723441eab681af1b Mon Sep 17 00:00:00 2001 From: Mantavya Gajjar Date: Tue, 15 Sep 2009 15:53:46 +0530 Subject: [PATCH 12/74] [FIX]: fix the problem of message depending on the partner language bzr revid: mga@tinyerp.com-20090915102346-dk516xhreyex04w9 --- .../wizard/wizard_followup_print.py | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/addons/account_followup/wizard/wizard_followup_print.py b/addons/account_followup/wizard/wizard_followup_print.py index 004f62503bd..70f90f2d6ae 100644 --- a/addons/account_followup/wizard/wizard_followup_print.py +++ b/addons/account_followup/wizard/wizard_followup_print.py @@ -60,8 +60,9 @@ _followup_wizard_all_form = """ + - + @@ -94,6 +95,12 @@ _followup_wizard_all_fields = { 'size': 64, 'default': 'Invoices Reminder' }, + 'partner_lang':{ + 'string': "Send Email in Partner Language", + 'type': 'boolean', + 'default':True, + 'help':'Do not change message text, if you want to send email in partner language, or configre from company' + }, 'email_body': { 'string': "Email body", 'type': 'text', @@ -156,8 +163,13 @@ class followup_all_print(wizard.interface): if adr.email: dest = [adr.email] src = tools.config.options['smtp_user'] - #TODO : fix me to get message according to the partner language - body=data['form']['email_body'] + if not data['form']['partner_lang']: + body = data['form']['email_body'] + else: + cxt = context.copy() + cxt['lang'] = partner.lang + body = pool.get('res.users').browse(cr, uid, uid, context=cxt).company_id.follow_up_msg + total_amt = followup_data.debit - followup_data.credit move_line = '' subtotal_due = 0.0 From 8316098a65481a400d00d10320301b699be4d210 Mon Sep 17 00:00:00 2001 From: "Harry (Open ERP)" Date: Tue, 15 Sep 2009 16:00:41 +0530 Subject: [PATCH 13/74] [IMP]quality_integration_server: get message from base_quality_module if module can not success to reach minimun score bzr revid: hmo@tinyerp.com-20090915103041-ehna9rq1sm9q1xyt --- .../quality_integration_server/base_quality_interrogation.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/addons/quality_integration_server/base_quality_interrogation.py b/bin/addons/quality_integration_server/base_quality_interrogation.py index 48c2ef29278..a5a69898752 100755 --- a/bin/addons/quality_integration_server/base_quality_interrogation.py +++ b/bin/addons/quality_integration_server/base_quality_interrogation.py @@ -114,6 +114,7 @@ def check_quality(uri, user, pwd, dbname, modules): for module in modules: quality_result = execute(conn,'execute', dbname, uid, pwd,'module.quality.check','check_quality',module) detail_html = '' + msg = detail.get('message','') html = '''''' html +="

Module : %s

"%(quality_result['name']) html += "

Final score : %s

"%(quality_result['final_score']) @@ -124,7 +125,7 @@ def check_quality(uri, user, pwd, dbname, modules): score = round(float(detail.get('score',0)),2) html += "
  • %s
  • "%(test.replace(' ','-'),test) detail_html +="

    %s (Score : %s)

    %s
    "%(test.replace(' ','-'),test,score,detail.get('detail')) - test_detail[test] = (score,detail.get('detail','')) + test_detail[test] = (score,msg,detail.get('detail','')) html += "%s"%(detail_html) html += "" final[quality_result['name']] = (quality_result['final_score'],html,test_detail) From 7cb036f0e13e7816685cb8a24e18950247d487a5 Mon Sep 17 00:00:00 2001 From: Fabien Pinckaers Date: Tue, 15 Sep 2009 13:24:51 +0200 Subject: [PATCH 14/74] [IMP] changed interval CRM calls to 4 hours instead of one -> efficient connection pooling with cron bzr revid: fp@tinyerp.com-20090915112451-xf4j2q3pttfy2brh --- addons/crm/crm_data.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/crm/crm_data.xml b/addons/crm/crm_data.xml index 7ba270d268f..5fc5ad1bd94 100644 --- a/addons/crm/crm_data.xml +++ b/addons/crm/crm_data.xml @@ -58,7 +58,7 @@ Check cases rules - 1 + 4 hours -1 From a5c907c11a712e976144bb03f1908f64eb0b9d47 Mon Sep 17 00:00:00 2001 From: "Harry (Open ERP)" Date: Tue, 15 Sep 2009 17:17:48 +0530 Subject: [PATCH 15/74] [FIX]quality_integration_server: get message from base_quality_module if module can not success to reach minimun score bzr revid: hmo@tinyerp.com-20090915114748-qk1mwa5s98j1x0wu --- .../quality_integration_server/base_quality_interrogation.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/addons/quality_integration_server/base_quality_interrogation.py b/bin/addons/quality_integration_server/base_quality_interrogation.py index a5a69898752..65bb7f5f849 100755 --- a/bin/addons/quality_integration_server/base_quality_interrogation.py +++ b/bin/addons/quality_integration_server/base_quality_interrogation.py @@ -113,8 +113,7 @@ def check_quality(uri, user, pwd, dbname, modules): test_detail = {} for module in modules: quality_result = execute(conn,'execute', dbname, uid, pwd,'module.quality.check','check_quality',module) - detail_html = '' - msg = detail.get('message','') + detail_html = '' html = '''''' html +="

    Module : %s

    "%(quality_result['name']) html += "

    Final score : %s

    "%(quality_result['final_score']) @@ -122,6 +121,7 @@ def check_quality(uri, user, pwd, dbname, modules): html += "
      " for x,y,detail in quality_result['check_detail_ids']: test = detail.get('name') + msg = detail.get('message','') score = round(float(detail.get('score',0)),2) html += "
    • %s
    • "%(test.replace(' ','-'),test) detail_html +="

      %s (Score : %s)

      %s
      "%(test.replace(' ','-'),test,score,detail.get('detail')) From 5ecb23eb538ca750e7ec2f80844b35c1f5cd702c Mon Sep 17 00:00:00 2001 From: Fabien Pinckaers Date: Tue, 15 Sep 2009 15:01:18 +0200 Subject: [PATCH 16/74] [IMP] Invoice Supplier Control per line/manual bzr revid: fp@tinyerp.com-20090915130118-p7ynmca1tp9wyer0 --- addons/purchase_manual/__init__.py | 25 +++ addons/purchase_manual/__terp__.py | 42 +++++ addons/purchase_manual/purchase_manual.py | 78 +++++++++ .../purchase_manual/purchase_manual_view.xml | 117 +++++++++++++ .../purchase_manual_wizard.xml | 14 ++ addons/purchase_manual/wizard/__init__.py | 1 + .../wizard/wizard_purchase_line_invoice.py | 161 ++++++++++++++++++ addons/sale/sale.py | 2 +- 8 files changed, 439 insertions(+), 1 deletion(-) create mode 100644 addons/purchase_manual/__init__.py create mode 100644 addons/purchase_manual/__terp__.py create mode 100644 addons/purchase_manual/purchase_manual.py create mode 100644 addons/purchase_manual/purchase_manual_view.xml create mode 100644 addons/purchase_manual/purchase_manual_wizard.xml create mode 100644 addons/purchase_manual/wizard/__init__.py create mode 100644 addons/purchase_manual/wizard/wizard_purchase_line_invoice.py diff --git a/addons/purchase_manual/__init__.py b/addons/purchase_manual/__init__.py new file mode 100644 index 00000000000..c15d258564d --- /dev/null +++ b/addons/purchase_manual/__init__.py @@ -0,0 +1,25 @@ +# -*- encoding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# Copyright (C) 2004-2009 Tiny SPRL (). All Rights Reserved +# $Id$ +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU 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 General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +############################################################################## + +import purchase_manual +import wizard + diff --git a/addons/purchase_manual/__terp__.py b/addons/purchase_manual/__terp__.py new file mode 100644 index 00000000000..d9c3087c86c --- /dev/null +++ b/addons/purchase_manual/__terp__.py @@ -0,0 +1,42 @@ +# -*- encoding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# Copyright (C) 2004-2009 Tiny SPRL (). All Rights Reserved +# $Id$ +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU 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 General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +############################################################################## + + +{ + 'name': 'Purchase Management - Manual Control of Invoice', + 'version': '1.1', + 'category': 'Generic Modules/Sales & Purchases', + 'description': """Module for purchase management, manual control of invoice""", + 'author': 'Tiny', + 'website': 'http://www.openerp.com', + 'depends': ['purchase'], + 'init_xml': [], + 'update_xml': [ + 'purchase_manual_view.xml', + 'purchase_manual_wizard.xml', + ], + 'demo_xml': [], + 'installable': True, + 'active': False, + 'certificate': False, +} +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/purchase_manual/purchase_manual.py b/addons/purchase_manual/purchase_manual.py new file mode 100644 index 00000000000..e5d32ca49cc --- /dev/null +++ b/addons/purchase_manual/purchase_manual.py @@ -0,0 +1,78 @@ +# -*- encoding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# Copyright (C) 2004-2009 Tiny SPRL (). All Rights Reserved +# $Id$ +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU 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 General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +############################################################################## + +from osv import fields +from osv import osv +import netsvc + +class purchase_order_line(osv.osv): + _inherit='purchase.order.line' + _columns = { + 'state': fields.selection([('draft', 'Draft'), ('confirmed', 'Confirmed'), ('done', 'Done'), ('cancel', 'Cancelled')], 'Status', required=True, readonly=True), + 'invoice_lines': fields.many2many('account.invoice.line', 'purchase_order_line_invoice_rel', 'order_line_id', 'invoice_id', 'Invoice Lines', readonly=True), + 'invoiced': fields.boolean('Invoiced', readonly=True), + 'partner_id': fields.related('order_id','partner_id',string='Partner',readonly=True,type="many2one", relation="res.partner"), + 'date_order': fields.related('order_id','date_order',string='Order Date',readonly=True,type="date") + } + _defaults = { + 'state': lambda *args: 'draft', + 'invoiced': lambda *a: 0, + + } + def copy_data(self, cr, uid, id, default=None, context={}): + print 'copy called' + if not default: + default = {} + default.update({ + 'state':'draft', + 'invoiced':0, + 'invoice_lines':[], + }) + return super(purchase_order_line, self).copy_data(cr, uid, id, default, context) + + def action_confirm(self, cr, uid, ids, context={}): + self.write(cr, uid, ids, {'state': 'confirmed'}, context) + return True +purchase_order_line() + +class purchase_order(osv.osv): + _inherit='purchase.order' + def action_invoice_create(self, cr, uid, ids, context={}): + print 'Invoice Create' + res = super(purchase_order, self).action_invoice_create(cr, uid, ids, context) + for po in self.browse(cr, uid, ids, context): + todo = [] + for line in po.order_line: + todo.append(line.id) + self.pool.get('purchase.order.line').write(cr, uid, todo, {'invoiced':True}, context) + return res + + def wkf_confirm_order(self, cr, uid, ids, context={}): + res = super(purchase_order, self).wkf_confirm_order(cr, uid, ids, context) + todo = [] + for po in self.browse(cr, uid, ids, context): + for line in po.order_line: + if line.state=='draft': + todo.append(line.id) + self.pool.get('purchase.order.line').action_confirm(cr, uid, todo, context) + return res +purchase_order() diff --git a/addons/purchase_manual/purchase_manual_view.xml b/addons/purchase_manual/purchase_manual_view.xml new file mode 100644 index 00000000000..5ef2d7ac3bb --- /dev/null +++ b/addons/purchase_manual/purchase_manual_view.xml @@ -0,0 +1,117 @@ + + + + + # + # Define PO Line Views + # + + purchase.order.line.form + purchase.order.line + form + 20 + +
      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      +
      +
      + + + purchase.order.line.tree + purchase.order.line + tree + 20 + + + + + + + + + + + + + + + + + + # + # Inherit PO view to get buttons + # + + + Purchase Order Lines + ir.actions.act_window + purchase.order.line + tree,form + + + + tree + + + + + + form + + + + + + + Uninvoiced Purchase Order Lines + ir.actions.act_window + purchase.order.line + [('state','in',('confirmed','done')), ('invoiced','=',False)] + form + tree,form + + + + tree + + + + + + form + + + + + +
      +
      diff --git a/addons/purchase_manual/purchase_manual_wizard.xml b/addons/purchase_manual/purchase_manual_wizard.xml new file mode 100644 index 00000000000..62771cf9fbb --- /dev/null +++ b/addons/purchase_manual/purchase_manual_wizard.xml @@ -0,0 +1,14 @@ + + + + + + + + diff --git a/addons/purchase_manual/wizard/__init__.py b/addons/purchase_manual/wizard/__init__.py new file mode 100644 index 00000000000..616c5c7090c --- /dev/null +++ b/addons/purchase_manual/wizard/__init__.py @@ -0,0 +1 @@ +import wizard_purchase_line_invoice diff --git a/addons/purchase_manual/wizard/wizard_purchase_line_invoice.py b/addons/purchase_manual/wizard/wizard_purchase_line_invoice.py new file mode 100644 index 00000000000..89d7d188287 --- /dev/null +++ b/addons/purchase_manual/wizard/wizard_purchase_line_invoice.py @@ -0,0 +1,161 @@ +# -*- encoding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# Copyright (C) 2004-2009 Tiny SPRL (). All Rights Reserved +# $Id$ +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU 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 General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +############################################################################## + +import wizard +import netsvc +import ir +import pooler + +invoice_form = """ +
      + + +""" + +invoice_fields = { +} + +def _makeInvoices(self, cr, uid, data, context): + pool = pooler.get_pool(cr.dbname) + res = False + invoices = {} + + def make_invoice(order, lines): + a = order.partner_id.property_account_payable.id + if order.partner_id and order.partner_id.property_payment_term.id: + pay_term = order.partner_id.property_payment_term.id + else: + pay_term = False + inv = { + 'name': order.name, + 'origin': order.name, + 'type': 'in_invoice', + 'reference': "P%dPO%d" % (order.partner_id.id, order.id), + 'account_id': a, + 'partner_id': order.partner_id.id, + 'address_invoice_id': order.partner_address_id.id, + 'address_contact_id': order.partner_address_id.id, + 'invoice_line': [(6,0,lines)], + 'currency_id' : order.pricelist_id.currency_id.id, + 'comment': order.notes, + 'payment_term': pay_term, + 'fiscal_position': order.partner_id.property_account_position.id + } + inv_id = pool.get('account.invoice').create(cr, uid, inv) + return inv_id + + for line in pool.get('purchase.order.line').browse(cr,uid,data['ids']): + if (not line.invoiced) and (line.state not in ('draft','cancel')): + if not line.order_id.id in invoices: + invoices[line.order_id.id] = [] + if line.product_id: + a = line.product_id.product_tmpl_id.property_account_expense.id + if not a: + a = line.product_id.categ_id.property_account_expense_categ.id + if not a: + raise osv.except_osv(_('Error !'), + _('There is no expense account defined ' \ + 'for this product: "%s" (id:%d)') % \ + (line.product_id.name, line.product_id.id,)) + else: + a = pool.get('ir.property').get(cr, uid, + 'property_account_expense_categ', 'product.category', + context=context) + fpos = line.order_id.fiscal_position or False + a = pool.get('account.fiscal.position').map_account(cr, uid, fpos, a) + inv_id = pool.get('account.invoice.line').create(cr, uid, { + 'name': line.name, + 'origin': line.order_id.name, + 'account_id': a, + 'price_unit': line.price_unit, + 'quantity': line.product_qty, + 'uos_id': line.product_uom.id, + 'product_id': line.product_id.id or False, + 'invoice_line_tax_id': [(6, 0, [x.id for x in line.taxes_id])], + 'note': line.notes, + 'account_analytic_id': line.account_analytic_id and line.account_analytic_id.id or False, + }) + cr.execute('insert into purchase_order_line_invoice_rel (order_line_id,invoice_id) values (%s,%s)', (line.id, inv_id)) + pool.get('purchase.order.line').write(cr, uid, [line.id], {'invoiced': True}) + invoices[line.order_id.id].append((line,inv_id)) + + res = [] + for result in invoices.values(): + order = result[0][0].order_id + il = map(lambda x: x[1], result) + res.append(make_invoice(order, il)) + return {'invoice_ids': res} + + return { + 'domain': "[('id','in', ["+','.join(map(str,res))+"])]", + 'name': _('Supplier Invoices'), + 'view_type': 'form', + 'view_mode': 'tree,form', + 'res_model': 'account.invoice', + 'view_id': False, + 'context': "{'type':'in_invoice'}", + 'type': 'ir.actions.act_window' + } + +class line_make_invoice(wizard.interface): + def _open_invoice(self, cr, uid, data, context): + pool_obj = pooler.get_pool(cr.dbname) + model_data_ids = pool_obj.get('ir.model.data').search(cr,uid,[('model','=','ir.ui.view'),('name','=','invoice_supplier_form')]) + resource_id = pool_obj.get('ir.model.data').read(cr,uid,model_data_ids,fields=['res_id'])[0]['res_id'] + return { + 'domain': "[('id','in', ["+','.join(map(str,data['form']['invoice_ids']))+"])]", + 'name': 'Invoices', + 'view_type': 'form', + 'view_mode': 'tree,form', + 'res_model': 'account.invoice', + 'views': [(False,'tree'),(resource_id,'form')], + 'context': "{'type':'in_invoice'}", + 'type': 'ir.actions.act_window' + } + + states = { + 'init' : { + 'actions': [], + 'result': { + 'type': 'form', + 'arch': invoice_form, + 'fields': invoice_fields, + 'state': [ + ('end', 'Cancel'), + ('invoice', 'Create invoices') + ] + } + }, + 'invoice' : { + 'actions' : [_makeInvoices], + 'result' : {'type': 'state', 'state': 'open'} + }, + 'open': { + 'actions': [], + 'result': {'type':'action', 'action':_open_invoice, 'state':'end'} + } + } + +line_make_invoice("purchase.order.line.make_invoice") + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: + diff --git a/addons/sale/sale.py b/addons/sale/sale.py index 1492143a7d0..6b50cd3cb48 100644 --- a/addons/sale/sale.py +++ b/addons/sale/sale.py @@ -829,7 +829,7 @@ class sale_order_line(osv.osv): 'product_id': line.product_id.id or False, 'invoice_line_tax_id': [(6, 0, [x.id for x in line.tax_id])], 'note': line.notes, - 'account_analytic_id': line.order_id.project_id.id, + 'account_analytic_id': line.order_id.project_id and line.order_id.project_id.id or False, }) cr.execute('insert into sale_order_line_invoice_rel (order_line_id,invoice_id) values (%s,%s)', (line.id, inv_id)) self.write(cr, uid, [line.id], {'invoiced': True}) From 7a3717d54ce772c5ba61fbf30f85b64a36d26409 Mon Sep 17 00:00:00 2001 From: "Jay (Open ERP)" Date: Tue, 15 Sep 2009 21:09:38 +0530 Subject: [PATCH 17/74] [FIX] Hr_timesheet_invoice : Query calculation corrected lp bug: https://launchpad.net/bugs/430043 fixed bzr revid: jvo@tinyerp.com-20090915153938-2lcgt5kwwhvmayse --- addons/hr_timesheet_invoice/hr_timesheet_invoice.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/hr_timesheet_invoice/hr_timesheet_invoice.py b/addons/hr_timesheet_invoice/hr_timesheet_invoice.py index 6f29c056d34..0c16fb4ffd4 100644 --- a/addons/hr_timesheet_invoice/hr_timesheet_invoice.py +++ b/addons/hr_timesheet_invoice/hr_timesheet_invoice.py @@ -44,7 +44,7 @@ class account_analytic_account(osv.osv): res = {} for account in self.browse(cr, uid, ids): invoiced = {} - cr.execute('select distinct l.invoice_id from hr_analytic_timesheet h left join account_analytic_line l on (h.line_id=l.id) where account_id=1', (account.id,)) + cr.execute('select distinct(l.invoice_id) from hr_analytic_timesheet h left join account_analytic_line l on (h.line_id=l.id) where account_id=%s', (account.id,)) invoice_ids = filter(None, map(lambda x: x[0], cr.fetchall())) for invoice in self.pool.get('account.invoice').browse(cr, uid, invoice_ids, context): res.setdefault(account.id, 0.0) From d3206b046ab59987d80ac535a164d50632d36a78 Mon Sep 17 00:00:00 2001 From: "Jay (Open ERP)" Date: Wed, 16 Sep 2009 12:46:34 +0530 Subject: [PATCH 18/74] [FIX] Base_report_creator : Print screen report is now available for custom reports lp bug: https://launchpad.net/bugs/379645 fixed bzr revid: jvo@tinyerp.com-20090916071634-43xkyf15v1stzn4q --- addons/base_report_creator/base_report_creator.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/addons/base_report_creator/base_report_creator.py b/addons/base_report_creator/base_report_creator.py index 9959c3638db..af7049bd894 100644 --- a/addons/base_report_creator/base_report_creator.py +++ b/addons/base_report_creator/base_report_creator.py @@ -51,7 +51,7 @@ from tools.translate import _ class report_creator(osv.osv): _name = "base_report_creator.report" _description = "Report" - + model_set_id = False # # Should request only used fields # @@ -131,7 +131,9 @@ class report_creator(osv.osv): if (not context) or 'report_id' not in context: return super(report_creator, self).read(cr, user, ids, fields, context, load) ctx = context or {} - wp = [self._id_get(cr, user, context['report_id'], context)+(' in (%s)' % (','.join(map(lambda x: "'"+str(x)+"'",ids))))] + wp = '' + if self.model_set_id: + wp = [self._id_get(cr, user, context['report_id'], context)+(' in (%s)' % (','.join(map(lambda x: "'"+str(x)+"'",ids))))] report = self._sql_query_get(cr, user, [context['report_id']], 'sql_query', None, ctx, where_plus = wp) sql_query = report[context['report_id']] cr.execute(sql_query) From bc39c5a14b65902348b5a5ddc15b1e6a93e39ba5 Mon Sep 17 00:00:00 2001 From: "Jay (Open ERP)" Date: Wed, 16 Sep 2009 12:47:08 +0530 Subject: [PATCH 19/74] [FIX] Print screen : Correction when text for report is already encoded lp bug: https://launchpad.net/bugs/379645 fixed bzr revid: jvo@tinyerp.com-20090916071708-xc93saplay5apvjn --- bin/report/printscreen/ps_list.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bin/report/printscreen/ps_list.py b/bin/report/printscreen/ps_list.py index 8534fd5c887..d2f946e6715 100644 --- a/bin/report/printscreen/ps_list.py +++ b/bin/report/printscreen/ps_list.py @@ -51,7 +51,10 @@ class report_printscreen_list(report_int): return result def _parse_string(self, view): - dom = etree.XML(view) + try: + dom = etree.XML(view.encode('utf-8')) + except: + dom = etree.XML(view) return self._parse_node(dom) def create(self, cr, uid, ids, datas, context=None): From 81b8e008d3a99f0bd7e4ca2b54d38faf87100eaa Mon Sep 17 00:00:00 2001 From: "Harry (Open ERP)" Date: Wed, 16 Sep 2009 13:10:51 +0530 Subject: [PATCH 20/74] [IMP]quality_integration_server: make link of extra-addons module in addons module automatic on install-module command bzr revid: hmo@tinyerp.com-20090916074051-hyoq3atsctz8jdhd --- Makefile | 3 +- .../base_quality_interrogation.py | 37 +++++++++++++++++-- 2 files changed, 35 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 39ab146c13a..7b410d19dee 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,7 @@ # -*- makefile -*- addons-path := bin/addons/ +extra-addons:= '' root-path := bin/ port := 8069 net_port := 8070 @@ -22,7 +23,7 @@ drop-db: python $(interrogation_file) drop-db --database=$(database) --root-path=$(root-path) --addons-path=$(addons-path) --port=$(port) install-module: - python $(interrogation_file) install-module --modules=$(module) --database=$(database) --root-path=$(root-path) --addons-path=$(addons-path) --port=$(port) --login=$(login) --password=$(password) + python $(interrogation_file) install-module --modules=$(module) --database=$(database) --root-path=$(root-path) --addons-path=$(addons-path) --extra-addons=$(extra-addons) --port=$(port) --login=$(login) --password=$(password) upgrade-module: python $(interrogation_file) upgrade-module --modules=$(module) --database=$(database) --root-path=$(root-path) --addons-path=$(addons-path) --port=$(port) --login=$(login) --password=$(password) diff --git a/bin/addons/quality_integration_server/base_quality_interrogation.py b/bin/addons/quality_integration_server/base_quality_interrogation.py index 65bb7f5f849..b07c2baef40 100755 --- a/bin/addons/quality_integration_server/base_quality_interrogation.py +++ b/bin/addons/quality_integration_server/base_quality_interrogation.py @@ -180,7 +180,7 @@ def create_db(uri, dbname, user='admin', pwd='admin', lang='en_US'): elif res['type']=='state': state = res['state'] res = execute(wiz_conn, 'execute', dbname, uid, pwd, wiz_id, datas, state, {}) - install_module(uri, dbname, ['base_module_quality'],user,pwd) + install_module(uri, dbname, ['base_module_quality'],user=user,pwd=pwd) return True def drop_db(uri, dbname): @@ -190,12 +190,37 @@ def drop_db(uri, dbname): execute(conn, 'drop', admin_passwd, dbname) return True -def install_module(uri, dbname, modules, user='admin', pwd='admin'): +def make_links(uri, uid, dbname, source, destination, module, user, pwd): + if module in ('base','quality_integration_server'): + return True + if not os.path.islink(destination + module): + if not os.path.isdir(destination + module): + for path in source: + if os.path.isdir(path + '/' + module): + os.symlink(path + '/' + module, destination + '/' + module) + obj_conn = xmlrpclib.ServerProxy(uri + '/xmlrpc/object') + execute(obj_conn, 'execute', dbname, uid, pwd, 'ir.module.module', 'update_list') + module_ids = execute(obj_conn, 'execute', dbname, uid, pwd, 'ir.module.module', 'search', [('name','=',module)]) + if len(module_ids): + data = execute(obj_conn, 'execute', dbname, uid, pwd, 'ir.module.module', 'read', module_ids[0],['name','dependencies_id']) + dep_datas = execute(obj_conn, 'execute', dbname, uid, pwd, 'ir.module.module.dependency', 'read', data['dependencies_id'],['name']) + for dep_data in dep_datas: + make_links(uri, uid, dbname, source, destination, dep_data['name'], user, pwd) + return True + return False + +def install_module(uri, dbname, modules, addons='', extra_addons='', user='admin', pwd='admin'): uid = login(uri, dbname, user, pwd) + if extra_addons: + extra_addons = extra_addons.split(',') if uid: + if addons and extra_addons: + for module in modules: + make_links(uri, uid, dbname, extra_addons, addons, module, user, pwd) + obj_conn = xmlrpclib.ServerProxy(uri + '/xmlrpc/object') wizard_conn = xmlrpclib.ServerProxy(uri + '/xmlrpc/wizard') - module_ids = execute(obj_conn, 'execute', dbname, uid, pwd, 'ir.module.module', 'search', [('name','in',modules)]) + module_ids = execute(obj_conn, 'execute', dbname, uid, pwd, 'ir.module.module', 'search', [('name','in',modules)]) execute(obj_conn, 'execute', dbname, uid, pwd, 'ir.module.module', 'button_install', module_ids) wiz_id = execute(wizard_conn, 'create', dbname, uid, pwd, 'module.upgrade.simple') state = 'init' @@ -255,6 +280,9 @@ parser.add_option("--login", dest="login", help="specify the User Login") parser.add_option("--password", dest="pwd", help="specify the User Password") parser.add_option("--translate-in", dest="translate_in", help="specify .po files to import translation terms") +parser.add_option("--extra-addons", dest="extra_addons", + help="specify extra_addons and trunkCommunity modules path ") + (opt, args) = parser.parse_args() if len(args) != 1: parser.error("incorrect number of arguments") @@ -282,6 +310,7 @@ options = { 'modules' : opt.modules or [], 'login' : opt.login or 'admin', 'pwd' : opt.pwd or '', + 'extra-addons':opt.extra_addons or [] } options['modules'] = opt.modules and map(lambda m: m.strip(), opt.modules.split(',')) or [] @@ -297,7 +326,7 @@ try: if command == 'drop-db': drop_db(uri, options['database']) if command == 'install-module': - install_module(uri, options['database'], options['modules'], options['login'], options['pwd']) + install_module(uri, options['database'], options['modules'],options['addons-path'],options['extra-addons'],options['login'], options['pwd']) if command == 'upgrade-module': upgrade_module(uri, options['database'], options['modules'], options['login'], options['pwd']) if command == 'check-quality': From c415a9d72f4e32c265058b94f256631e99f5f17d Mon Sep 17 00:00:00 2001 From: "Harry (Open ERP)" Date: Wed, 16 Sep 2009 14:50:36 +0530 Subject: [PATCH 21/74] [FIX]base : ir_cron : take minimun next_call from database for job waiting. if database does not has any job, it will take 1 day for job waiting bzr revid: hmo@tinyerp.com-20090916092036-pevdiwq24d42zanl --- bin/addons/base/ir/ir_cron.py | 38 ++++++++++++++++++++++++++--------- 1 file changed, 29 insertions(+), 9 deletions(-) diff --git a/bin/addons/base/ir/ir_cron.py b/bin/addons/base/ir/ir_cron.py index 7da956c36af..166a5781d44 100644 --- a/bin/addons/base/ir/ir_cron.py +++ b/bin/addons/base/ir/ir_cron.py @@ -27,8 +27,6 @@ import tools import pooler from osv import fields,osv -next_wait = 60 - _intervalTypes = { 'work_days': lambda interval: DateTime.RelativeDateTime(days=interval), 'days': lambda interval: DateTime.RelativeDateTime(days=interval), @@ -74,20 +72,18 @@ class ir_cron(osv.osv, netsvc.Agent): f = getattr(m, func) f(cr, uid, *args) - def _poolJobs(self, db_name, check=False): + def _poolJobs(self, db_name, check=False): try: db, pool = pooler.get_db_and_pool(db_name) except: - return False - + return False if pool._init: # retry in a few minutes - next_call = 600 + next_call = 600 else: - next_call = next_wait - cr = db.cursor() now = DateTime.now() try: + cr = db.cursor() cr.execute('select * from ir_cron where numbercall<>0 and active and nextcall<=now() order by priority') for job in cr.dictfetchall(): nextcall = DateTime.strptime(job['nextcall'], '%Y-%m-%d %H:%M:%S') @@ -115,8 +111,32 @@ class ir_cron(osv.osv, netsvc.Agent): # Can be improved to do at the min(min(nextcalls), time()+next_call) # But is this an improvement ? # + cr = db.cursor() + cr.execute('select min(nextcall) as min_next_call from ir_cron where numbercall<>0 and active and nextcall>=now()') + next_call = cr.dictfetchone()['min_next_call'] + cr.close() + if next_call: + next_call = time.mktime(time.strptime(next_call, '%Y-%m-%d %H:%M:%S')) + else: + next_call = int(time.time()) + 3600 # if do not find active cron job from database, it will run again after 1 day if not check: - self.setAlarm(self._poolJobs, int(time.time()) + next_call, db_name, db_name) + self.setAlarm(self._poolJobs, next_call, db_name, db_name) + + def create(self, cr, uid, vals, context=None): + res = super(ir_cron, self).create(cr, uid, vals, context=context) + cr.commit() + self._poolJobs(cr.dbname) + return res + def write(self, cr, user, ids, vals, context=None): + res = super(ir_cron, self).write(cr, user, ids, vals, context=context) + cr.commit() + self._poolJobs(cr.dbname) + return res + def unlink(self, cr, uid, ids, context=None): + res = super(ir_cron, self).unlink(cr, uid, ids, context=context) + cr.commit() + self._poolJobs(cr.dbname) + return res ir_cron() # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: From c92e018556e66c9f2e1b4547d5522ca664566d97 Mon Sep 17 00:00:00 2001 From: Mantavya Gajjar Date: Wed, 16 Sep 2009 15:55:21 +0530 Subject: [PATCH 22/74] [REM]: remove the name search method, as this method was implemented for the email address field this was looking for the related fields too in the action object, but now that is not required as now email address can be located by object.object.object.....field so its better to make this method close bzr revid: mga@tinyerp.com-20090916102521-m5xmlbmle8y2zc64 --- bin/addons/base/ir/ir_actions.py | 82 ++++++++++++++++---------------- 1 file changed, 41 insertions(+), 41 deletions(-) diff --git a/bin/addons/base/ir/ir_actions.py b/bin/addons/base/ir/ir_actions.py index 591a8ef2e73..1403923c040 100644 --- a/bin/addons/base/ir/ir_actions.py +++ b/bin/addons/base/ir/ir_actions.py @@ -284,57 +284,57 @@ class ir_model_fields(osv.osv): 'complete_name': fields.char('Complete Name', size=64, select=1), } - def name_search(self, cr, uid, name, args=None, operator='ilike', context=None, limit=800): - def get_fields(cr, uid, field, rel): - result = [] - mobj = self.pool.get('ir.model') - id = mobj.search(cr, uid, [('model','=',rel)]) + def name_search(self, cr, uid, name, args=None, operator='ilike', context=None, limit=80): + return super(ir_model_fields, self).name_search(cr, uid, name, args, operator, context, limit) +# def get_fields(cr, uid, field, rel): +# result = [] +# mobj = self.pool.get('ir.model') +# id = mobj.search(cr, uid, [('model','=',rel)]) - obj = self.pool.get('ir.model.fields') - ids = obj.search(cr, uid, [('model_id','in',id)]) - records = obj.read(cr, uid, ids) - for record in records: - id = record['id'] - fld = field + '/' + record['name'] +# obj = self.pool.get('ir.model.fields') +# ids = obj.search(cr, uid, [('model_id','in',id)]) +# records = obj.read(cr, uid, ids) +# for record in records: +# id = record['id'] +# fld = field + '/' + record['name'] - result.append((id, fld)) - return result +# result.append((id, fld)) +# return result - if not args: - args=[] - if not context: - context={} - return super(ir_model_fields, self).name_search(cr, uid, name, args, operator, context, limit) +# if not args: +# args=[] +# if not context: +# context={} +# return super(ir_model_fields, self).name_search(cr, uid, name, args, operator, context, limit) - if context.get('key') != 'server_action': - return super(ir_model_fields, self).name_search(cr, uid, name, args, operator, context, limit) +# if context.get('key') != 'server_action': +# return super(ir_model_fields, self).name_search(cr, uid, name, args, operator, context, limit) +# result = [] +# obj = self.pool.get('ir.model.fields') +# ids = obj.search(cr, uid, args) +# records = obj.read(cr, uid, ids) +# for record in records: +# id = record['id'] +# field = record['name'] - result = [] - obj = self.pool.get('ir.model.fields') - ids = obj.search(cr, uid, args) - records = obj.read(cr, uid, ids) - for record in records: - id = record['id'] - field = record['name'] +# if record['ttype'] == 'many2one': +# rel = record['relation'] +# res = get_fields(cr, uid, field, record['relation']) +# for rs in res: +# result.append(rs) - if record['ttype'] == 'many2one': - rel = record['relation'] - res = get_fields(cr, uid, field, record['relation']) - for rs in res: - result.append(rs) +# result.append((id, field)) - result.append((id, field)) +# for rs in result: +# obj.write(cr, uid, [rs[0]], {'complete_name':rs[1]}) - for rs in result: - obj.write(cr, uid, [rs[0]], {'complete_name':rs[1]}) +# iids = [] +# for rs in result: +# iids.append(rs[0]) - iids = [] - for rs in result: - iids.append(rs[0]) +# result = super(ir_model_fields, self).name_search(cr, uid, name, [('complete_name','ilike',name), ('id','in',iids)], operator, context, limit) - result = super(ir_model_fields, self).name_search(cr, uid, name, [('complete_name','ilike',name), ('id','in',iids)], operator, context, limit) - - return result +# return result ir_model_fields() From b3a239601f9cdfde4242b560f564c530baa497b0 Mon Sep 17 00:00:00 2001 From: "Harry (Open ERP)" Date: Wed, 16 Sep 2009 16:37:22 +0530 Subject: [PATCH 23/74] [REM] document : remove code of get_translation and remove user context_lang from node context on getting new node because of we see some problem in this code for translation term of french bzr revid: hmo@tinyerp.com-20090916110722-4kl5t5q71im6c76i --- addons/document/document.py | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/addons/document/document.py b/addons/document/document.py index 21aa59661a7..082ea0144da 100644 --- a/addons/document/document.py +++ b/addons/document/document.py @@ -125,16 +125,7 @@ class node_class(object): def get_translation(self,value,lang): result = value - pool = pooler.get_pool(self.cr.dbname) - translation_ids = pool.get('ir.translation').search(self.cr, self.uid, [('value','=',value),('lang','=',lang),('type','=','model')]) - if len(translation_ids): - tran_id = translation_ids[0] - translation = pool.get('ir.translation').read(self.cr, self.uid, tran_id, ['res_id','name']) - res_model,field_name = tuple(translation['name'].split(',')) - res_id = translation['res_id'] - res = pool.get(res_model).read(self.cr, self.uid, res_id, [field_name]) - if res: - result = res[field_name] + #TODO : to get translation term return result def directory_list_for_child(self,nodename,parent=False): @@ -346,12 +337,8 @@ class document_directory(osv.osv): object: the object.directory or object.directory.content object2: the other object linked (if object.directory.content) """ - def get_object(self, cr, uid, uri, context={}): - lang = context.get('lang',False) - if not lang: - user = self.pool.get('res.users').browse(cr, uid, uid) - lang = user.context_lang - context['lang'] = lang + def get_object(self, cr, uid, uri, context={}): + #TODO : set user's context_lang in context if not uri: return node_class(cr, uid, '', False, context=context, type='database') turi = tuple(uri) From 4f50981946228dc2ef5075fa6f865898eb6a42ea Mon Sep 17 00:00:00 2001 From: "Jay (Open ERP)" Date: Wed, 16 Sep 2009 20:17:04 +0530 Subject: [PATCH 24/74] [FIX + IMP] Sale :consistency in order report(addresses,date) lp bug: https://launchpad.net/bugs/430516 fixed lp bug: https://launchpad.net/bugs/430522 fixed bzr revid: jvo@tinyerp.com-20090916144704-1dyh5w84ng9m27td --- addons/sale/report/order.rml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/addons/sale/report/order.rml b/addons/sale/report/order.rml index fac75e4f4d9..fa03eb1624b 100644 --- a/addons/sale/report/order.rml +++ b/addons/sale/report/order.rml @@ -138,14 +138,16 @@ [[ o.partner_shipping_id.title or '' ]] [[ o.partner_shipping_id.name ]] [[ o.partner_shipping_id.street ]] [[ o.partner_shipping_id.street2 or '' ]] - [[ o.partner_shipping_id.city or '' ]] [[ o.partner_shipping_id.zip or '' ]] + [[ o.partner_shipping_id.zip or '' ]] [[ o.partner_shipping_id.city or '' ]] [[ o.partner_shipping_id.state_id and o.partner_shipping_id.state_id.name or '' ]] [[ o.partner_shipping_id.country_id and o.partner_shipping_id.country_id.name or '' ]] Invoice address : + [[ o.partner_invoice_id.title or '' ]] [[ o.partner_invoice_id.name or '' ]] [[ o.partner_invoice_id.street ]] [[ o.partner_invoice_id.street2 and (', %s' % o.partner_invoice_id.street2 or '') ]] - [[ o.partner_invoice_id.zip or '' ]] [[ o.partner_invoice_id.city or '' ]] [[ o.partner_invoice_id.country_id and (', %s' % (o.partner_invoice_id.country_id and o.partner_invoice_id.country_id.name or '')) ]] + [[ o.partner_invoice_id.zip or '' ]] [[ o.partner_invoice_id.city or '' ]] + [[ o.partner_invoice_id.state_id and o.partner_invoice_id.state_id.name or '' ]] [[ o.partner_invoice_id.country_id and o.partner_invoice_id.country_id.name or '' ]] @@ -185,7 +187,7 @@ Your Reference - Date Ordered + [[ o.state=='draft' and 'Quotation Date' or 'Date Ordered' ]] Our Salesman From 5f2ab89a72fbaf4a1bec960ec137523670d0352b Mon Sep 17 00:00:00 2001 From: "Jay (Open ERP)" Date: Wed, 16 Sep 2009 20:26:33 +0530 Subject: [PATCH 25/74] [FIX] Sale : Order Lines switches view from tree,form and view lp bug: https://launchpad.net/bugs/430577 fixed bzr revid: jvo@tinyerp.com-20090916145633-h0wic35v1p4bbe96 --- addons/sale/sale_view.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/sale/sale_view.xml b/addons/sale/sale_view.xml index f0b8da9a017..168d8c39ee6 100644 --- a/addons/sale/sale_view.xml +++ b/addons/sale/sale_view.xml @@ -110,7 +110,7 @@ - +
      From 03a072b4b78aa348a92fdfdcfa16350aadff132b Mon Sep 17 00:00:00 2001 From: "GPA(OpenERP)" <> Date: Wed, 16 Sep 2009 20:37:35 +0530 Subject: [PATCH 26/74] [FIX] Hr_holidays : Workflow actions validations corrected lp bug: https://launchpad.net/bugs/430098 fixed bzr revid: jvo@tinyerp.com-20090916150735-2d3cb8a1ybqt164r --- addons/hr_holidays/hr.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/addons/hr_holidays/hr.py b/addons/hr_holidays/hr.py index 5e4b1ed7a05..dc0f7a82d66 100644 --- a/addons/hr_holidays/hr.py +++ b/addons/hr_holidays/hr.py @@ -187,8 +187,11 @@ class hr_holidays(osv.osv): 'state':'validate', } ids2 = self.pool.get('hr.employee').search(cr, uid, [('user_id','=', uid)]) + if ids2: vals['manager_id'] = ids2[0] + else: + raise osv.except_osv(_('Warning !'),_('Either there is no Employee defined, or no User attached with it.')) self.write(cr, uid, ids, vals) self._create_holiday(cr, uid, ids) return True @@ -207,6 +210,8 @@ class hr_holidays(osv.osv): def holidays_refuse(self, cr, uid, ids, *args): ids2 = self.pool.get('hr.employee').search(cr, uid, [('user_id','=', uid)]) + if not ids2: + raise osv.except_osv(_('Warning !'),_('Either there is no Employee defined, or no User attached with it.')) self.write(cr, uid, ids, { 'state':'refuse', 'manager_id':ids2[0] From acfd835091f38c29a91dec8de08265c8a9800759 Mon Sep 17 00:00:00 2001 From: "Harry (Open ERP)" Date: Thu, 17 Sep 2009 10:17:14 +0530 Subject: [PATCH 27/74] [FIX]quality_integration_server : quality log : reduce overwrite last test log in other test logs bzr revid: hmo@tinyerp.com-20090917044714-onj9maung7o7gi97 --- .../base_quality_interrogation.py | 28 ++++++++++--------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/bin/addons/quality_integration_server/base_quality_interrogation.py b/bin/addons/quality_integration_server/base_quality_interrogation.py index b07c2baef40..9a453d85c38 100755 --- a/bin/addons/quality_integration_server/base_quality_interrogation.py +++ b/bin/addons/quality_integration_server/base_quality_interrogation.py @@ -49,14 +49,14 @@ def clean(): ps.close() if pid: os.kill(pid,9) - + def execute(connector, method, *args): - global wait_count + global wait_count res = False try: res = getattr(connector,method)(*args) except socket.error,e: - if e.args[0] == 111: + if e.args[0] == 111: if wait_count > wait_limit: print "Server is taking too long to start, it has exceeded the maximum limit of %d seconds."%(wait_limit) clean() @@ -68,8 +68,7 @@ def execute(connector, method, *args): else: raise e wait_count = 0 - return res - + return res def login(uri, dbname, user, pwd): conn = xmlrpclib.ServerProxy(uri + '/xmlrpc/common') @@ -108,12 +107,12 @@ def check_quality(uri, user, pwd, dbname, modules): uid = login(uri, dbname, user, pwd) if uid: conn = xmlrpclib.ServerProxy(uri + '/xmlrpc/object') - qualityresult = {} final = {} - test_detail = {} - for module in modules: + for module in modules: + qualityresult = {} + test_detail = {} quality_result = execute(conn,'execute', dbname, uid, pwd,'module.quality.check','check_quality',module) - detail_html = '' + detail_html = '' html = '''''' html +="

      Module : %s

      "%(quality_result['name']) html += "

      Final score : %s

      "%(quality_result['final_score']) @@ -124,7 +123,10 @@ def check_quality(uri, user, pwd, dbname, modules): msg = detail.get('message','') score = round(float(detail.get('score',0)),2) html += "
    • %s
    • "%(test.replace(' ','-'),test) - detail_html +="

      %s (Score : %s)

      %s
      "%(test.replace(' ','-'),test,score,detail.get('detail')) + if test == 'Unit Test': + if not detail.get('detail',''): + detail['detail'] = '''%s'''%(detail.get('summary','')) + detail_html +="

      %s (Score : %s)

      %s
      "%(test.replace(' ','-'),test,score,detail.get('detail','')) test_detail[test] = (score,msg,detail.get('detail','')) html += "
    %s"%(detail_html) html += "" @@ -138,7 +140,7 @@ def check_quality(uri, user, pwd, dbname, modules): else: print 'Login Failed...' clean() - sys.exit(1) + sys.exit(1) @@ -189,7 +191,7 @@ def drop_db(uri, dbname): if dbname in db_list: execute(conn, 'drop', admin_passwd, dbname) return True - + def make_links(uri, uid, dbname, source, destination, module, user, pwd): if module in ('base','quality_integration_server'): return True @@ -207,7 +209,7 @@ def make_links(uri, uid, dbname, source, destination, module, user, pwd): for dep_data in dep_datas: make_links(uri, uid, dbname, source, destination, dep_data['name'], user, pwd) return True - return False + return False def install_module(uri, dbname, modules, addons='', extra_addons='', user='admin', pwd='admin'): uid = login(uri, dbname, user, pwd) From 38633249301299371a0cd823f941a958f24074c5 Mon Sep 17 00:00:00 2001 From: "Harry (Open ERP)" Date: Thu, 17 Sep 2009 12:51:25 +0530 Subject: [PATCH 28/74] [FIX]quality_integration_server: fixe problem on make link of extra-module in addons bzr revid: hmo@tinyerp.com-20090917072125-y63krel1152ox742 --- .../quality_integration_server/base_quality_interrogation.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/addons/quality_integration_server/base_quality_interrogation.py b/bin/addons/quality_integration_server/base_quality_interrogation.py index 9a453d85c38..a75477ed0f8 100755 --- a/bin/addons/quality_integration_server/base_quality_interrogation.py +++ b/bin/addons/quality_integration_server/base_quality_interrogation.py @@ -195,8 +195,8 @@ def drop_db(uri, dbname): def make_links(uri, uid, dbname, source, destination, module, user, pwd): if module in ('base','quality_integration_server'): return True - if not os.path.islink(destination + module): - if not os.path.isdir(destination + module): + if not os.path.islink(destination + '/' + module): + if not os.path.isdir(destination + '/' + module): for path in source: if os.path.isdir(path + '/' + module): os.symlink(path + '/' + module, destination + '/' + module) From 6d6bc82fca30c840cf1713dc6d5b683dc6e26475 Mon Sep 17 00:00:00 2001 From: "Jay (Open ERP)" Date: Thu, 17 Sep 2009 18:35:29 +0530 Subject: [PATCH 29/74] [FIX] Purchase_manual : certificate on terp displayed wrong value bzr revid: jvo@tinyerp.com-20090917130529-vdzbrr2u2yx4gjeq --- addons/purchase_manual/__terp__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/purchase_manual/__terp__.py b/addons/purchase_manual/__terp__.py index d9c3087c86c..885ac4d9d98 100644 --- a/addons/purchase_manual/__terp__.py +++ b/addons/purchase_manual/__terp__.py @@ -37,6 +37,6 @@ 'demo_xml': [], 'installable': True, 'active': False, - 'certificate': False, +# 'certificate': False, } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: From e6f996e75b9abcb5210685e855173597a418ea11 Mon Sep 17 00:00:00 2001 From: "Harry (Open ERP)" Date: Thu, 17 Sep 2009 18:39:17 +0530 Subject: [PATCH 30/74] [REF]quality_integration_server: now intsall-translate command accept input like i18n-import=purchase:ar_AR.po+sale:fr_FR.po,nl_BE.po bzr revid: hmo@tinyerp.com-20090917130917-hj4nos9bcxpqsxzv --- .../base_quality_interrogation.py | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/bin/addons/quality_integration_server/base_quality_interrogation.py b/bin/addons/quality_integration_server/base_quality_interrogation.py index a75477ed0f8..f4e84f5194a 100755 --- a/bin/addons/quality_integration_server/base_quality_interrogation.py +++ b/bin/addons/quality_integration_server/base_quality_interrogation.py @@ -37,10 +37,8 @@ waittime = 10 wait_count = 0 wait_limit = 12 -def start_server(root_path, port, addons_path): - if root_path: - root_path += '/' - os.system('python2.5 '+root_path+'openerp-server.py --pidfile=openerp.pid --port=%s --no-netrpc --addons-path=%s' %(str(port),addons_path)) +def start_server(root_path, port, addons_path): + os.system('python2.5 %sopenerp-server.py --pidfile=openerp.pid --port=%s --no-netrpc --addons-path=%s' %(root_path, str(port), addons_path)) def clean(): if os.path.isfile('openerp.pid'): ps = open('openerp.pid') @@ -306,7 +304,7 @@ die(opt.translate_in and (not opt.db_name), options = { 'addons-path' : opt.addons_path or 'addons', 'root-path' : opt.root_path or '', - 'translate-in': opt.translate_in, + 'translate-in': [], 'port' : opt.port or 8069, 'database': opt.db_name or 'terp', 'modules' : opt.modules or [], @@ -316,7 +314,14 @@ options = { } options['modules'] = opt.modules and map(lambda m: m.strip(), opt.modules.split(',')) or [] -options['translate_in'] = opt.translate_in and map(lambda m: m.strip(), opt.translate_in.split(',')) or [] +# Hint:i18n-import=purchase:ar_AR.po+sale:fr_FR.po,nl_BE.po +if opt.translate_in: + translate = opt.translate_in + for module_name,po_files in map(lambda x:tuple(x.split(':')),translate.split('+')): + for po_file in po_files.split(','): + po_link = '%s/%s/i18n/%s'%(options['addons-path'], module_name, po_file) + options['translate-in'].append(po_link) + uri = 'http://localhost:' + str(options['port']) server_thread = threading.Thread(target=start_server, @@ -334,7 +339,7 @@ try: if command == 'check-quality': check_quality(uri, options['login'], options['pwd'], options['database'], options['modules']) if command == 'install-translation': - import_translate(uri, options['login'], options['pwd'], options['database'], options['translate_in']) + import_translate(uri, options['login'], options['pwd'], options['database'], options['translate-in']) clean() sys.exit(0) From fcf202751d872861e9a5319ec95b3d059a36dae4 Mon Sep 17 00:00:00 2001 From: Quentin De Paoli Date: Thu, 17 Sep 2009 15:16:16 +0200 Subject: [PATCH 31/74] [FIX] account: bugfixed the fiscalyear closing wizard: * wizard wasn't working if there weren't entries to report: uneeded error was raised * wizard wasn't reconciling the reported entries of the new fiscalyear (but of the old fiscalyear) bzr revid: qdp@cyan-20090917131616-hy6kdupx5j0em41q --- .../account/wizard/wizard_fiscalyear_close.py | 21 +++++++++++-------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/addons/account/wizard/wizard_fiscalyear_close.py b/addons/account/wizard/wizard_fiscalyear_close.py index 68e69941b5c..ac9518e006b 100644 --- a/addons/account/wizard/wizard_fiscalyear_close.py +++ b/addons/account/wizard/wizard_fiscalyear_close.py @@ -192,21 +192,24 @@ def _data_save(self, cr, uid, data, context): }) pool.get('account.move.line').create(cr, uid, move) offset += limit - ids = pool.get('account.move.line').search(cr, uid, [('journal_id','=',new_journal.id), - ('period_id.fiscalyear_id','=',old_fyear.id)]) + ('period_id.fiscalyear_id','=',new_fyear.id)]) context['fy_closing'] = True - if not ids: - raise wizard.except_wizard(_('UserError'), - _('The old fiscal year does not have any entry to reconcile!')) - pool.get('account.move.line').reconcile(cr, uid, ids, context=context) + if ids: + pool.get('account.move.line').reconcile(cr, uid, ids, context=context) new_period = data['form']['period_id'] ids = pool.get('account.journal.period').search(cr, uid, [('journal_id','=',new_journal.id),('period_id','=',new_period)]) - if ids: - cr.execute('UPDATE account_fiscalyear ' \ + if not ids: + ids = [pool.get('account.journal.period').create(cr, uid, { + 'name': (new_journal.name or '')+':'+(period.code or ''), + 'journal_id': new_journal.id, + 'period_id': period.id + })] + cr.execute('UPDATE account_fiscalyear ' \ 'SET end_journal_period_id = %s ' \ - 'WHERE id = %s', (ids[0], new_fyear.id)) + 'WHERE id = %s', (ids[0], old_fyear.id)) + return {} class wiz_journal_close(wizard.interface): From cdb2371b83f20f6026f69d9228ee46d392cf9b3b Mon Sep 17 00:00:00 2001 From: "olt@tinyerp.com" <> Date: Thu, 17 Sep 2009 15:21:26 +0200 Subject: [PATCH 32/74] [IMP] updated changelog file bzr revid: olt@tinyerp.com-20090917132126-bghsqfgbvfod54ac --- doc/Changelog | 133 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 133 insertions(+) diff --git a/doc/Changelog b/doc/Changelog index 577dfc5a651..53607a2b975 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -1,3 +1,136 @@ + +2009-09-17: 5.0.5 +================= + +Bugfixes (server) +----------------- + + * Not linked to a bug report: + * quality_integration_server: fixe problem on make link of extra-module in addons + * quality_integration_server : quality log : reduce overwrite last test log in other test logs + * base : ir_cron : take minimun next_call from database for job waiting. if database does not has any job, it will take 1 day for job waiting + * quality_integration_server: get message from base_quality_module if module can not success to reach minimun score + * regression in fields.function computation + * better log error, new line + * Report: context was missing while printing any report with header in a non-English Language + * https://launchpad.net/bugs/425131 + * Better translation exportation. + * https://launchpad.net/bugs/379645 + * Print screen : Correction when text for report is already encoded + * https://launchpad.net/bugs/421162 + * Send Mail : Unicode error handled + * Send mail : Non-English characters were throwing error. + * https://launchpad.net/bugs/421137 + * Base : 'Supplier Partners' menu will open new record with supplier=1,customer=0 + * https://launchpad.net/bugs/425430 + * Export : Error solved while Exporting O2M records with None value of any field + * https://launchpad.net/bugs/399208 + * Translation issue with cache: it needed to restart server,SOLVED + * https://launchpad.net/bugs/422563 + * Security Loophole corrected + + +Improvements (server) +--------------------- + + * quality_integration_server: make link of extra-addons module in addons module automatic on install-module command + * quality_integration_server: get message from base_quality_module if module can not success to reach minimun score + * Rng : Accepting Groups under/after/replacing Buttons + * quality_integration_server : quality html log + * quality_integration_server: put max_limit in server connection + * Base : Rate for ARS Added + * cchange version number + + +Bugfixes (addons) +----------------- + + * Not linked to a bug report: + * Purchase_manual : certificate on terp displayed wrong value + * fix the problem of message depending on the partner language + * fix a problem for the overdue payment message + * fix problem to get the detault message + * #416908 computation of invoice lines + * Project : Taks hours computed accurately. + * base_module_record: avoid duplications + * document: do not try to index binary documents + * +1 on the lengthmonth returns was too much, removed it + * Problem when using hr_holidays Summary Report when entering date 1 jan 2009 for example. + * multi currency reconciliations on bank statements weren't properly displayed + * multi currency payments weren't correctly computed on invoice's residual amount + * Project_gtd : Demo data defined for tasks(inboxes) + * Module:product Added report tag for product pricelist reportso that it can be modified using OODesigner + * Document : error on create if attachment not specified + * https://launchpad.net/bugs/422401 + * project_gtd : timebox field re-arranged + * https://launchpad.net/bugs/421907 + * Account : Aged Partner Balance report for Future analysis corrected + * https://launchpad.net/bugs/427388 + * Project : task work behavior towards task hours corrected + * https://launchpad.net/bugs/422408 + * Project_gtd : Hierarchical timeboxes allowed to open + * https://launchpad.net/bugs/403972 + * Account : Reports from Chart of Accounts were not considering contextual value of MOVE(draft,posted) + * https://launchpad.net/bugs/430577 + * Sale : Order Lines switches view from tree,form and view + * https://launchpad.net/bugs/425257 + * Project_gtd : improved menuitems names to avoid user confusion,domain improved + * https://launchpad.net/bugs/422078 + * Account_tax_include : floatdivision error corrected + * https://launchpad.net/bugs/423585 + * https://launchpad.net/bugs/423581 + * https://launchpad.net/bugs/416807 + * report_document : Dashboard should not display partner with no files + * https://launchpad.net/bugs/430522 + * https://launchpad.net/bugs/424214 + * Account :Residual amount unclear when used with partial payments. + * https://launchpad.net/bugs/424177 + * hr_timesheet_sheet : Rounding value problem in float_time widget + * https://launchpad.net/bugs/415056 + * https://launchpad.net/bugs/421636 + * added tooltip on tax and payment term + * https://launchpad.net/bugs/407290 + * https://launchpad.net/bugs/407293 + * Account : Making account.invoice.tax field language-depenant from account.tax + * https://launchpad.net/bugs/430043 + * Hr_timesheet_invoice : Query calculation corrected + * https://launchpad.net/bugs/379645 + * Base_report_creator : Print screen report is now available for custom reports + * https://launchpad.net/bugs/423260 + * Account : Title of of Move Line widnows renamed + * https://launchpad.net/bugs/427982 + * hr_timesheet_invoice : Invoicing analytic entries wizard corrected for product + * https://launchpad.net/bugs/426243 + * Account : Context was missing in report + * https://launchpad.net/bugs/426831 + * l10n_ch : default_value() of res.partner.bank corrected + * https://launchpad.net/bugs/430098 + * Hr_holidays : Workflow actions validations corrected + * https://launchpad.net/bugs/430516 + * https://launchpad.net/bugs/379191 + * its better to aply the patch + * fix the problem for related fields, related fields act as a many2one fields + * https://launchpad.net/bugs/429203 + * CRM : Mailgate script used default uid=3 instead of 1 + * https://launchpad.net/bugs/399817 + * Fixed Partial deliveries problem + + +Improvements (addons) +--------------------- + + * Invoice Supplier Control per line/manual + * add missing file for the followup date + * changed interval CRM calls to 4 hours instead of one -> efficient connection pooling with cron + * add inherited view for company + * add new filed to company object which will store the mesages + * add new data file which will add over due payment message to company + * Account : Analytic Account report following parental relationship approach(account with all its children + * hr_timesheet_invoice : Misleading string on invoice analytic entries' wizard + * base_module_quality: remove certificate tag from terp test + * report_dcoument : changed the misleading name of action + + 2009-08-28: 5.0.4 ================= From 0d7199a133edff51fdbd109b9337f67ba8699285 Mon Sep 17 00:00:00 2001 From: "olt@tinyerp.com" <> Date: Thu, 17 Sep 2009 15:23:35 +0200 Subject: [PATCH 33/74] [IMP] updated changelog file bzr revid: olt@tinyerp.com-20090917132335-so2fugos4sutat90 --- doc/Changelog | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/Changelog b/doc/Changelog index 53607a2b975..9ecc752e9ff 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -13,6 +13,7 @@ Bugfixes (server) * regression in fields.function computation * better log error, new line * Report: context was missing while printing any report with header in a non-English Language + * quality_integration_server: fixe problem on make link of extra-module in addons * https://launchpad.net/bugs/425131 * Better translation exportation. * https://launchpad.net/bugs/379645 From a0c0cb3bca6c0a6d9d45cceda03a41fed1cdcbc1 Mon Sep 17 00:00:00 2001 From: "olt@tinyerp.com" <> Date: Thu, 17 Sep 2009 15:53:46 +0200 Subject: [PATCH 34/74] [IMP] updated release.py to 5.0.5 bzr revid: olt@tinyerp.com-20090917135346-9vylvoy89xoffkep --- bin/release.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/release.py b/bin/release.py index 158af8793e4..f26d235c5e1 100644 --- a/bin/release.py +++ b/bin/release.py @@ -22,7 +22,7 @@ ############################################################################## name = 'openerp-server' -version = '5.0.5-bzr' +version = '5.0.5' major_version = '5.0' description = 'OpenERP Server' long_desc = '''\ From 35ca7bf8a746180743701efeaadf67e3c9d9d20c Mon Sep 17 00:00:00 2001 From: "Jay (Open ERP)" Date: Fri, 18 Sep 2009 11:39:13 +0530 Subject: [PATCH 35/74] [FIX] Account_followup : Sending email while sending follow up corrected. lp bug: https://launchpad.net/bugs/431821 fixed bzr revid: jvo@tinyerp.com-20090918060913-v05i5qp2468o3ufv --- .../account_followup/wizard/wizard_followup_print.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/addons/account_followup/wizard/wizard_followup_print.py b/addons/account_followup/wizard/wizard_followup_print.py index 70f90f2d6ae..7729d267365 100644 --- a/addons/account_followup/wizard/wizard_followup_print.py +++ b/addons/account_followup/wizard/wizard_followup_print.py @@ -179,7 +179,7 @@ class followup_all_print(wizard.interface): l = '--------------------------------------------------------------------------------------------------------------------------' head = l+ '\n' + 'Date'.rjust(10) + '\t' + 'Description'.rjust(10) + '\t' + 'Ref'.rjust(10) + '\t' + 'Maturity date'.rjust(10) + '\t' + 'Due'.rjust(10) + '\t' + 'Paid'.rjust(10) + '\t' + 'Maturity'.rjust(10) + '\t' + 'Litigation'.rjust(10) + '\n' + l for i in data_lines: - maturity = '' + maturity = 0.00 if i.date_maturity < time.strftime('%Y-%m-%d') and (i.debit - i.credit): maturity = i.debit - i.credit subtotal_due = subtotal_due + i.debit @@ -200,7 +200,7 @@ class followup_all_print(wizard.interface): 'date':time.strftime('%Y-%m-%d'), } body = body%val - sub = str(data['form']['email_subject']) + sub = tools.ustr(data['form']['email_subject']) msg = '' if dest: tools.email_send(src,dest,sub,body) @@ -209,15 +209,15 @@ class followup_all_print(wizard.interface): msg += partner.name + '\n' msg_unsent += msg if not msg_unsent: - summary = _("All emails have been successfully sent to Partners:.\n\n") + msg_sent + summary = _("All E-mails have been successfully sent to Partners:.\n\n") + msg_sent else: - msg_unsent = _("Mail not sent to following Partners, Email not available !\n\n") + msg_unsent - msg_sent = msg_sent and _("\n\nMail sent to following Partners successfully, !\n\n") + msg_sent + msg_unsent = _("E-Mail not sent to following Partners, Email not available !\n\n") + msg_unsent + msg_sent = msg_sent and _("\n\nE-Mail sent to following Partners successfully. !\n\n") + msg_sent line = '==========================================================================' summary = msg_unsent + line + msg_sent return {'summary' : summary} else: - return {'summary' : '\n\n\nMail not sent to any partner if you want to sent it please tick send email confirmation on wizard'} + return {'summary' : '\n\n\nE-Mail has not been sent to any partner. If you want to send it, please tick send email confirmation on wizard.'} def _get_partners(self, cr, uid, data, context): pool = pooler.get_pool(cr.dbname) From 62749f58231d3dcb6ceef161f846fdb3b39782ba Mon Sep 17 00:00:00 2001 From: "GPA(Open ERP)" <> Date: Fri, 18 Sep 2009 16:03:21 +0530 Subject: [PATCH 36/74] [FIX] Account : Move line creation was giving encoding error while automated entries were inserted,corrected lp bug: https://launchpad.net/bugs/431871 fixed bzr revid: jvo@tinyerp.com-20090918103321-duidpcu12b358dlv --- addons/account/account_move_line.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/addons/account/account_move_line.py b/addons/account/account_move_line.py index 1ed28ff2588..d7c098de206 100644 --- a/addons/account/account_move_line.py +++ b/addons/account/account_move_line.py @@ -28,6 +28,8 @@ from tools.translate import _ import mx.DateTime from mx.DateTime import RelativeDateTime, now, DateTime, localtime +import tools + class account_move_line(osv.osv): _name = "account.move.line" _description = "Entry lines" @@ -908,7 +910,7 @@ class account_move_line(osv.osv): 'move_id': vals['move_id'], 'journal_id': vals['journal_id'], 'period_id': vals['period_id'], - 'name': vals['name']+' '+tax['name'], + 'name': tools.ustr(vals['name'] or '') + ' ' + tools.ustr(tax['name'] or ''), 'date': vals['date'], 'partner_id': vals.get('partner_id',False), 'ref': vals.get('ref',False), @@ -927,7 +929,7 @@ class account_move_line(osv.osv): 'move_id': vals['move_id'], 'journal_id': vals['journal_id'], 'period_id': vals['period_id'], - 'name': vals['name']+' '+tax['name'], + 'name': tools.ustr(vals['name'] or '') + ' ' + tools.ustr(tax['name'] or ''), 'date': vals['date'], 'partner_id': vals.get('partner_id',False), 'ref': vals.get('ref',False), From cc08f8e3d299736731f7b5ced33d6a89c8f2980e Mon Sep 17 00:00:00 2001 From: Christophe Simonis Date: Fri, 18 Sep 2009 14:28:07 +0200 Subject: [PATCH 37/74] [IMP] purchase: improve views to be directly usable in portals... bzr revid: chs@tinyerp.com-20090918122807-s6iaqfw5htxs4poe --- addons/purchase/purchase_view.xml | 35 +++++++++++++++++++++++-------- 1 file changed, 26 insertions(+), 9 deletions(-) diff --git a/addons/purchase/purchase_view.xml b/addons/purchase/purchase_view.xml index df971a84b04..972d91206f3 100644 --- a/addons/purchase/purchase_view.xml +++ b/addons/purchase/purchase_view.xml @@ -51,7 +51,18 @@ - + + + + + + + + + + + + @@ -71,7 +82,7 @@