From 2405f334e2e39f06e2de569b86042b2693400d8b Mon Sep 17 00:00:00 2001 From: Numerigraphe - Lionel Sausin Date: Wed, 7 Jul 2010 17:29:09 +0200 Subject: [PATCH 01/17] [FIX] account: wrong invoice number sequence for fiscal year in a certain case [FIX] account: context not initialized correctly in sequence lp bug: https://launchpad.net/bugs/602188 fixed bzr revid: ls@numerigraphe.fr-20100707152909-ocjbj6c784oqeg54 --- addons/account/invoice.py | 8 ++++++-- addons/account/sequence.py | 11 ++++++----- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/addons/account/invoice.py b/addons/account/invoice.py index 62f998fa751..6e2ff2a7baa 100644 --- a/addons/account/invoice.py +++ b/addons/account/invoice.py @@ -923,12 +923,16 @@ class account_invoice(osv.osv): obj_inv = self.browse(cr, uid, ids)[0] for (id, invtype, number, move_id, reference) in cr.fetchall(): if not number: + tmp_context = { + 'fiscalyear_id': inv.period_id.fiscalyear_id.id + } if obj_inv.journal_id.invoice_sequence_id: sid = obj_inv.journal_id.invoice_sequence_id.id number = self.pool.get('ir.sequence').get_id(cr, uid, sid, 'id', {'fiscalyear_id': obj_inv.period_id.fiscalyear_id.id}) else: - number = self.pool.get('ir.sequence').get(cr, uid, - 'account.invoice.' + invtype) + number = obj_seq.get_id(cr, uid, + 'account.invoice.%s' % invtype, + 'code=%s', context=tmp_context) if invtype in ('in_invoice', 'in_refund'): ref = reference else: diff --git a/addons/account/sequence.py b/addons/account/sequence.py index c90e9ef93c7..1186d4b8c7f 100644 --- a/addons/account/sequence.py +++ b/addons/account/sequence.py @@ -19,7 +19,7 @@ # ############################################################################## -from osv import fields,osv +from osv import fields, osv class ir_sequence_fiscalyear(osv.osv): _name = 'account.sequence.fiscalyear' @@ -31,7 +31,7 @@ class ir_sequence_fiscalyear(osv.osv): } _sql_constraints = [ - ('main_id', 'CHECK (sequence_main_id != sequence_id)', 'Main Sequence must be different from current !'), + ('main_id', 'CHECK (sequence_main_id != sequence_id)', 'Main Sequence must be different from current !'), ] ir_sequence_fiscalyear() @@ -41,15 +41,16 @@ class ir_sequence(osv.osv): _columns = { 'fiscal_ids' : fields.one2many('account.sequence.fiscalyear', 'sequence_main_id', 'Sequences') } - def get_id(self, cr, uid, sequence_id, test='id', context={}): + def get_id(self, cr, uid, sequence_id, test='id', context=None): + if context is None: + context = {} cr.execute('select id from ir_sequence where '+test+'=%s and active=%s', (sequence_id, True,)) res = cr.dictfetchone() if res: for line in self.browse(cr, uid, res['id'], context=context).fiscal_ids: if line.fiscalyear_id.id==context.get('fiscalyear_id', False): return super(ir_sequence, self).get_id(cr, uid, line.sequence_id.id, test="id", context=context) - return super(ir_sequence, self).get_id(cr, uid, sequence_id, test, context) + return super(ir_sequence, self).get_id(cr, uid, sequence_id, test, context=context) ir_sequence() - # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: From dbf34fd87eed009dfecf0c15c42430d1c42a0231 Mon Sep 17 00:00:00 2001 From: Numerigraphe - Lionel Sausin Date: Wed, 7 Jul 2010 17:33:14 +0200 Subject: [PATCH 02/17] [REF] account: code formating in sequence bzr revid: ls@numerigraphe.fr-20100707153314-thxkmi5k9my09eq4 --- addons/account/sequence.py | 31 +++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/addons/account/sequence.py b/addons/account/sequence.py index 1186d4b8c7f..b75e7f3e34e 100644 --- a/addons/account/sequence.py +++ b/addons/account/sequence.py @@ -25,13 +25,17 @@ class ir_sequence_fiscalyear(osv.osv): _name = 'account.sequence.fiscalyear' _rec_name = "sequence_main_id" _columns = { - "sequence_id": fields.many2one("ir.sequence", 'Sequence', required=True, ondelete='cascade'), - "sequence_main_id": fields.many2one("ir.sequence", 'Main Sequence', required=True, ondelete='cascade'), - "fiscalyear_id": fields.many2one('account.fiscalyear', 'Fiscal Year', required=True, ondelete='cascade') + "sequence_id": fields.many2one("ir.sequence", 'Sequence', required=True, + ondelete='cascade'), + "sequence_main_id": fields.many2one("ir.sequence", 'Main Sequence', + required=True, ondelete='cascade'), + "fiscalyear_id": fields.many2one('account.fiscalyear', 'Fiscal Year', + required=True, ondelete='cascade') } _sql_constraints = [ - ('main_id', 'CHECK (sequence_main_id != sequence_id)', 'Main Sequence must be different from current !'), + ('main_id', 'CHECK (sequence_main_id != sequence_id)', + 'Main Sequence must be different from current !'), ] ir_sequence_fiscalyear() @@ -39,18 +43,25 @@ ir_sequence_fiscalyear() class ir_sequence(osv.osv): _inherit = 'ir.sequence' _columns = { - 'fiscal_ids' : fields.one2many('account.sequence.fiscalyear', 'sequence_main_id', 'Sequences') + 'fiscal_ids' : fields.one2many('account.sequence.fiscalyear', + 'sequence_main_id', 'Sequences') } def get_id(self, cr, uid, sequence_id, test='id', context=None): if context is None: context = {} - cr.execute('select id from ir_sequence where '+test+'=%s and active=%s', (sequence_id, True,)) + cr.execute('select id from ir_sequence where ' + + test + '=%s and active=%s', (sequence_id, True,)) res = cr.dictfetchone() if res: - for line in self.browse(cr, uid, res['id'], context=context).fiscal_ids: - if line.fiscalyear_id.id==context.get('fiscalyear_id', False): - return super(ir_sequence, self).get_id(cr, uid, line.sequence_id.id, test="id", context=context) - return super(ir_sequence, self).get_id(cr, uid, sequence_id, test, context=context) + for line in self.browse(cr, uid, res['id'], + context=context).fiscal_ids: + if line.fiscalyear_id.id == context.get('fiscalyear_id', False): + return super(ir_sequence, self).get_id(cr, uid, + line.sequence_id.id, + test="id", + context=context) + return super(ir_sequence, self).get_id(cr, uid, sequence_id, test, + context=context) ir_sequence() # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: From 4dc7691b1a6840b26d13350edeed29ed78c55dc8 Mon Sep 17 00:00:00 2001 From: Numerigraphe - Lionel Sausin Date: Mon, 12 Jul 2010 12:12:41 +0200 Subject: [PATCH 03/17] [FIX] account: wrong variable name bzr revid: ls@numerigraphe.fr-20100712101241-cn1unvdzds3dy2ol --- addons/account/invoice.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/addons/account/invoice.py b/addons/account/invoice.py index 6e2ff2a7baa..05ca7d5d36e 100644 --- a/addons/account/invoice.py +++ b/addons/account/invoice.py @@ -920,15 +920,15 @@ class account_invoice(osv.osv): 'FROM account_invoice ' \ 'WHERE id IN %s', (tuple(ids),)) - obj_inv = self.browse(cr, uid, ids)[0] + inv = self.browse(cr, uid, ids)[0] for (id, invtype, number, move_id, reference) in cr.fetchall(): if not number: tmp_context = { 'fiscalyear_id': inv.period_id.fiscalyear_id.id } - if obj_inv.journal_id.invoice_sequence_id: - sid = obj_inv.journal_id.invoice_sequence_id.id - number = self.pool.get('ir.sequence').get_id(cr, uid, sid, 'id', {'fiscalyear_id': obj_inv.period_id.fiscalyear_id.id}) + if inv.journal_id.invoice_sequence_id: + sid = inv.journal_id.invoice_sequence_id.id + number = self.pool.get('ir.sequence').get_id(cr, uid, sid, 'id', {'fiscalyear_id': inv.period_id.fiscalyear_id.id}) else: number = obj_seq.get_id(cr, uid, 'account.invoice.%s' % invtype, @@ -1578,4 +1578,4 @@ class res_partner(osv.osv): res_partner() -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: \ No newline at end of file +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: From 3dec5629c96aab45601f8277e2c1264fcca32d3b Mon Sep 17 00:00:00 2001 From: Numerigraphe - Lionel Sausin Date: Mon, 12 Jul 2010 12:40:05 +0200 Subject: [PATCH 04/17] [FIX] account: wrong variable name [IMP] account: sequence view [REF] account: small cleanup lp bug: https://launchpad.net/bugs/602188 fixed bzr revid: ls@numerigraphe.fr-20100712104005-4vkqdu4lcsqgzt21 --- addons/account/invoice.py | 14 +++++++++----- addons/account/sequence_view.xml | 4 ++++ 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/addons/account/invoice.py b/addons/account/invoice.py index 05ca7d5d36e..d475a2e19b4 100644 --- a/addons/account/invoice.py +++ b/addons/account/invoice.py @@ -927,12 +927,16 @@ class account_invoice(osv.osv): 'fiscalyear_id': inv.period_id.fiscalyear_id.id } if inv.journal_id.invoice_sequence_id: - sid = inv.journal_id.invoice_sequence_id.id - number = self.pool.get('ir.sequence').get_id(cr, uid, sid, 'id', {'fiscalyear_id': inv.period_id.fiscalyear_id.id}) + sequence_id = inv.journal_id.invoice_sequence_id.id + number = self.pool.get('ir.sequence').get_id(cr, uid, + sequence_id, + 'id', + context=tmp_context) else: - number = obj_seq.get_id(cr, uid, - 'account.invoice.%s' % invtype, - 'code=%s', context=tmp_context) + number = self.pool.get('ir.sequence').get_id(cr, uid, + 'account.invoice.%s' % invtype, + 'code', + context=tmp_context) if invtype in ('in_invoice', 'in_refund'): ref = reference else: diff --git a/addons/account/sequence_view.xml b/addons/account/sequence_view.xml index 2d4d159cb41..565725d5d71 100644 --- a/addons/account/sequence_view.xml +++ b/addons/account/sequence_view.xml @@ -14,6 +14,10 @@ +
+ + + From 0b510c279838bd48f26bed5d80a7bc5c1f20fcf0 Mon Sep 17 00:00:00 2001 From: Numerigraphe - Lionel Sausin Date: Tue, 13 Jul 2010 10:58:52 +0200 Subject: [PATCH 05/17] [ADD] test for bug 602188: wrong invoice number sequence for fiscal year in a certain case bzr revid: ls@numerigraphe.fr-20100713085852-mkvywgcdmx2ule58 --- addons/account/__openerp__.py | 1 + .../account/test/sequence_bug602188_test.xml | 53 +++++++++++++++++++ 2 files changed, 54 insertions(+) create mode 100644 addons/account/test/sequence_bug602188_test.xml diff --git a/addons/account/__openerp__.py b/addons/account/__openerp__.py index d3a58272b89..c663ed29e06 100644 --- a/addons/account/__openerp__.py +++ b/addons/account/__openerp__.py @@ -124,6 +124,7 @@ module named account_vouchers 'project/analytic_account_demo.xml', 'demo/account_minimal.xml', 'account_unit_test.xml', + 'test/sequence_bug602188_test.xml', 'board_account_demo.xml', ], 'test': [ diff --git a/addons/account/test/sequence_bug602188_test.xml b/addons/account/test/sequence_bug602188_test.xml new file mode 100644 index 00000000000..3a9200b98e6 --- /dev/null +++ b/addons/account/test/sequence_bug602188_test.xml @@ -0,0 +1,53 @@ + + + + + + + + + + account.invoice.out_invoice + + TEST- + -bug602188 + + + + + + + + + + + + + + + + + draft + out_invoice + + lp:602188 + + + + + + open + TEST-042-bug602188 + + + + + + + + From a9a8c13e68a3a8d75a61d625cc783e523de054db Mon Sep 17 00:00:00 2001 From: Numerigraphe - Lionel Sausin Date: Tue, 13 Jul 2010 17:53:13 +0200 Subject: [PATCH 06/17] [REF] account: rewrite the sequence test in YAML bzr revid: ls@numerigraphe.fr-20100713155313-cw7e9l5gjhfkba70 --- addons/account/__openerp__.py | 2 +- addons/account/test/account_sequence_test.yml | 45 ++++++++++++++++ .../account/test/sequence_bug602188_test.xml | 53 ------------------- 3 files changed, 46 insertions(+), 54 deletions(-) create mode 100644 addons/account/test/account_sequence_test.yml delete mode 100644 addons/account/test/sequence_bug602188_test.xml diff --git a/addons/account/__openerp__.py b/addons/account/__openerp__.py index c663ed29e06..09e51486ad2 100644 --- a/addons/account/__openerp__.py +++ b/addons/account/__openerp__.py @@ -124,10 +124,10 @@ module named account_vouchers 'project/analytic_account_demo.xml', 'demo/account_minimal.xml', 'account_unit_test.xml', - 'test/sequence_bug602188_test.xml', 'board_account_demo.xml', ], 'test': [ + 'test/account_sequence_test.yml', 'test/account_customer_invoice.yml', 'test/account_supplier_invoice.yml', 'test/account_change_currency.yml', diff --git a/addons/account/test/account_sequence_test.yml b/addons/account/test/account_sequence_test.yml new file mode 100644 index 00000000000..3be824d2ca0 --- /dev/null +++ b/addons/account/test/account_sequence_test.yml @@ -0,0 +1,45 @@ +- In order to test the invoice numbering, I create a sequence for out invoices. +- !record {model: ir.sequence, id: seq_out_invoice_test}: + name: Account Invoice Out for the demonstration Fiscal Year # XXX indicate the name of the fiscal year + code: account.invoice.out_invoice + padding: 3 + prefix: FY- + suffix: -TEST + number_next: 42 + +- I link the new sequence to the demo sequence and the demo fiscal years. +- !record {model: account.sequence.fiscalyear, id: seq_out_invoice_test_fy}: + sequence_id: seq_out_invoice_test + sequence_main_id: seq_out_invoice + fiscalyear_id: data_fiscalyear + +- I create a draft customer invoice in a period of the demo fiscal year +- !record {model: account.invoice, id: invoice_seq_test}: + account_id: account.a_recv + address_contact_id: base.res_partner_address_zen + address_invoice_id: base.res_partner_address_zen + company_id: base.main_company + currency_id: base.EUR + invoice_line: + - account_id: account.a_sale + name: '[PC3] Medium PC' + price_unit: 900.0 + quantity: 10.0 + product_id: product.product_product_pc3 + uos_id: product.product_uom_unit + journal_id: account.sales_journal + partner_id: base.res_partner_3 + reference_type: none + period_id: period_1 + +- I create the invoice, as is I clicked on the "Create" button +- !workflow {model: account.invoice, action: invoice_open, ref: invoice_seq_test} + +- I check that the invoice state is "Open" +- !assert {model: account.invoice, id: invoice_seq_test}: + - state == 'open' + +- I check that the invoice got the right number using our sequence + # This used to fail because of bug #602188 +- !assert {model: account.invoice, id: invoice_seq_test}: + - number == 'FY-042-TEST' diff --git a/addons/account/test/sequence_bug602188_test.xml b/addons/account/test/sequence_bug602188_test.xml deleted file mode 100644 index 3a9200b98e6..00000000000 --- a/addons/account/test/sequence_bug602188_test.xml +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - - - - account.invoice.out_invoice - - TEST- - -bug602188 - - - - - - - - - - - - - - - - - draft - out_invoice - - lp:602188 - - - - - - open - TEST-042-bug602188 - - - - - - - - From b708c94a79cee2440111ed3c5eda7276ffc92c00 Mon Sep 17 00:00:00 2001 From: "rpa (Open ERP)" Date: Thu, 15 Jul 2010 18:16:23 +0530 Subject: [PATCH 07/17] [FIX]: crm: Fixed problem of sending mail to CC separated by semicolon bzr revid: rpa@tinyerp.com-20100715124623-rpb7ut4tv9n7ql5p --- addons/crm/crm_lead.py | 2 +- addons/crm/wizard/crm_send_email.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/addons/crm/crm_lead.py b/addons/crm/crm_lead.py index 5c7fdb08522..f7d551e1313 100644 --- a/addons/crm/crm_lead.py +++ b/addons/crm/crm_lead.py @@ -117,7 +117,7 @@ class crm_lead(osv.osv, crm_case): Defines responsible user and e-mail address for the mail gateway.'), 'create_date': fields.datetime('Creation Date' , readonly=True), 'email_cc': fields.text('Watchers Emails', size=252 , help="These \ -addresses will receive a copy of the future e-mail communication between partner \ +addresses(Comma-separated) will receive a copy of the future e-mail communication between partner \ and users"), 'description': fields.text('Notes'), 'write_date': fields.datetime('Update Date' , readonly=True), diff --git a/addons/crm/wizard/crm_send_email.py b/addons/crm/wizard/crm_send_email.py index 58aa729e454..022f987e295 100644 --- a/addons/crm/wizard/crm_send_email.py +++ b/addons/crm/wizard/crm_send_email.py @@ -26,6 +26,7 @@ from tools.translate import _ import base64 import itertools import tools +import re class crm_send_new_email_attachment(osv.osv_memory): _name = 'crm.send.mail.attachment' @@ -105,7 +106,7 @@ class crm_send_new_email(osv.osv_memory): ref_id = hist.ref_id case = case_pool.browse(cr, uid, res_id, context=context) emails = [obj.email_to] - email_cc = obj.email_cc and obj.email_cc.split(',') or '' + email_cc = re.findall(r'([^ ,<@]+@[^> ,]+)', obj.email_cc) emails = filter(None, emails) body = obj.body From 153d6b75eb1de69508ca56ea97cf2927af9b5e46 Mon Sep 17 00:00:00 2001 From: "qdp-launchpad@tinyerp.com" <> Date: Thu, 15 Jul 2010 18:37:11 +0530 Subject: [PATCH 08/17] [IMP] account: improve as per decimal_precision module bzr revid: qdp-launchpad@tinyerp.com-20100715130711-3m0akfyrsg1gjp35 --- addons/account/account_bank_statement.py | 5 +++-- addons/account/account_cash_statement.py | 7 ++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/addons/account/account_bank_statement.py b/addons/account/account_bank_statement.py index e0d31b9cf18..d0d8a8e9458 100644 --- a/addons/account/account_bank_statement.py +++ b/addons/account/account_bank_statement.py @@ -25,6 +25,7 @@ from osv import fields, osv from tools.misc import currency from tools.translate import _ +import decimal_precision as dp class account_bank_statement(osv.osv): @@ -130,9 +131,9 @@ class account_bank_statement(osv.osv): states={'confirm': [('readonly', True)]}, domain=[('type', '=', 'cash')]), 'period_id': fields.many2one('account.period', 'Period', required=True, states={'confirm':[('readonly', True)]}), - 'balance_start': fields.float('Starting Balance', digits=(16,2), + 'balance_start': fields.float('Starting Balance', digits_compute=dp.get_precision('Account'), states={'confirm':[('readonly',True)]}), - 'balance_end_real': fields.float('Ending Balance', digits=(16,2), + 'balance_end_real': fields.float('Ending Balance', digits_compute=dp.get_precision('Account'), states={'confirm':[('readonly', True)]}), 'balance_end': fields.function(_end_balance, method=True, string='Balance'), 'line_ids': fields.one2many('account.bank.statement.line', diff --git a/addons/account/account_cash_statement.py b/addons/account/account_cash_statement.py index 1a0727e626f..b6c36dd3337 100644 --- a/addons/account/account_cash_statement.py +++ b/addons/account/account_cash_statement.py @@ -25,6 +25,7 @@ import time from mx import DateTime from decimal import Decimal from tools.translate import _ +import decimal_precision as dp class account_cashbox_line(osv.osv): @@ -55,9 +56,9 @@ class account_cashbox_line(osv.osv): return {'value':{'subtotal': sub or 0.0}} _columns = { - 'pieces': fields.float('Values', digits=(16,2)), + 'pieces': fields.float('Values', digits_compute=dp.get_precision('Account')), 'number': fields.integer('Number'), - 'subtotal': fields.function(_sub_total, method=True, string='Sub Total', type='float',digits=(16,2)), + 'subtotal': fields.function(_sub_total, method=True, string='Sub Total', type='float', digits_compute=dp.get_precision('Account')), 'starting_id': fields.many2one('account.bank.statement',ondelete='cascade'), 'ending_id': fields.many2one('account.bank.statement',ondelete='cascade'), } @@ -176,7 +177,7 @@ class account_cash_statement(osv.osv): _columns = { 'company_id':fields.many2one('res.company', 'Company', required=False), 'journal_id': fields.many2one('account.journal', 'Journal', required=True), - 'balance_end_real': fields.float('Closing Balance', digits=(16,2), states={'confirm':[('readonly', True)]}, help="closing balance entered by the cashbox verifier"), + 'balance_end_real': fields.float('Closing Balance', digits_compute=dp.get_precision('Account'), states={'confirm':[('readonly', True)]}, help="closing balance entered by the cashbox verifier"), 'state': fields.selection( [('draft', 'Draft'), ('confirm', 'Confirm'), From faa93321e3343358af7a9bc005af079259716a49 Mon Sep 17 00:00:00 2001 From: Mustufa Rangwala Date: Thu, 15 Jul 2010 18:45:31 +0530 Subject: [PATCH 09/17] [FIX] Account: search view of account object bzr revid: mra@mra-laptop-20100715131531-rk5bf3l7mqf0h36q --- addons/account/account_view.xml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/addons/account/account_view.xml b/addons/account/account_view.xml index 1eb238fa04f..cbcc714ff0f 100644 --- a/addons/account/account_view.xml +++ b/addons/account/account_view.xml @@ -196,7 +196,7 @@
- + account.account.list account.account @@ -206,6 +206,7 @@ + @@ -365,7 +366,7 @@ - + @@ -1213,13 +1214,13 @@ [('to_check','=',True), ('state','=','draft')] - - - + From 8a2aee7d1a1279f36c5573d8329358e38caa015e Mon Sep 17 00:00:00 2001 From: "rpa (Open ERP)" Date: Thu, 15 Jul 2010 18:48:56 +0530 Subject: [PATCH 10/17] [FIX]: crm, crm_claim, crm_helpdesk, crm_fundraising: Improvement in tooltips bzr revid: rpa@tinyerp.com-20100715131856-iyc19cuv0brtpcpb --- addons/crm/crm.py | 10 ++++------ addons/crm/crm_lead.py | 3 +-- addons/crm/crm_meeting.py | 3 +-- addons/crm/crm_phonecall.py | 3 +-- addons/crm/wizard/crm_send_email.py | 3 +-- addons/crm_claim/crm_claim.py | 2 +- addons/crm_fundraising/crm_fundraising.py | 2 +- addons/crm_helpdesk/crm_helpdesk.py | 4 +--- 8 files changed, 11 insertions(+), 19 deletions(-) diff --git a/addons/crm/crm.py b/addons/crm/crm.py index 743650d5497..4b1aad7cce9 100644 --- a/addons/crm/crm.py +++ b/addons/crm/crm.py @@ -441,14 +441,13 @@ class crm_case_section(osv.osv): _columns = { 'name': fields.char('Sales Team', size=64, required=True, translate=True), 'code': fields.char('Code', size=8), - 'active': fields.boolean('Active', help="If the active field is set to \ - true, it will allow you to hide the sales team without removing it."), + 'active': fields.boolean('Active', help="If the active field is set to "\ + "true, it will allow you to hide the sales team without removing it."), 'allow_unlink': fields.boolean('Allow Delete', help="Allows to delete non draft cases"), 'change_responsible': fields.boolean('Change Responsible', help="Thick this box if you want that on escalation, the responsible of this sale team automatically becomes responsible of the lead/opportunity escaladed"), 'user_id': fields.many2one('res.users', 'Responsible User'), 'member_ids':fields.many2many('res.users', 'sale_member_rel', 'section_id', 'member_id', 'Team Members'), - 'reply_to': fields.char('Reply-To', size=64, help="The email address put \ - in the 'Reply-To' of all emails sent by Open ERP about cases in this sales team"), + 'reply_to': fields.char('Reply-To', size=64, help="The email address put in the 'Reply-To' of all emails sent by Open ERP about cases in this sales team"), 'parent_id': fields.many2one('crm.case.section', 'Parent Team'), 'child_ids': fields.one2many('crm.case.section', 'parent_id', 'Child Teams'), 'resource_calendar_id': fields.many2one('resource.calendar', "Resource's Calendar"), @@ -586,8 +585,7 @@ class crm_case_stage(osv.osv): _columns = { 'name': fields.char('Stage Name', size=64, required=True, translate=True), 'section_id': fields.many2one('crm.case.section', 'Sales Team'), - 'sequence': fields.integer('Sequence', help="Gives the sequence order \ - when displaying a list of case stages."), + 'sequence': fields.integer('Sequence', help="Gives the sequence order when displaying a list of case stages."), 'object_id': fields.many2one('ir.model', 'Object Name'), 'probability': fields.float('Probability (%)', required=True), 'on_change': fields.boolean('Change Probability Automatically', \ diff --git a/addons/crm/crm_lead.py b/addons/crm/crm_lead.py index f7d551e1313..08a58ac145c 100644 --- a/addons/crm/crm_lead.py +++ b/addons/crm/crm_lead.py @@ -113,8 +113,7 @@ class crm_lead(osv.osv, crm_case): 'date_action_next': fields.datetime('Next Action', readonly=1), 'email_from': fields.char('Email', size=128, help="E-mail address of the contact"), 'section_id': fields.many2one('crm.case.section', 'Sales Team', \ - select=True, help='Sales team to which this case belongs to.\ - Defines responsible user and e-mail address for the mail gateway.'), + select=True, help='Sales team to which this case belongs to. Defines responsible user and e-mail address for the mail gateway.'), 'create_date': fields.datetime('Creation Date' , readonly=True), 'email_cc': fields.text('Watchers Emails', size=252 , help="These \ addresses(Comma-separated) will receive a copy of the future e-mail communication between partner \ diff --git a/addons/crm/crm_meeting.py b/addons/crm/crm_meeting.py index 1bc5948fe73..159e0b31691 100644 --- a/addons/crm/crm_meeting.py +++ b/addons/crm/crm_meeting.py @@ -51,8 +51,7 @@ class crm_meeting(osv.osv, crm_case): 'partner_address_id': fields.many2one('res.partner.address', 'Partner Contact', \ domain="[('partner_id','=',partner_id)]", states={'done': [('readonly', True)]}), 'section_id': fields.many2one('crm.case.section', 'Sales Team', states={'done': [('readonly', True)]}, \ - select=True, help='Sales team to which Case belongs to.\ - Define Responsible user and Email account for mail gateway.'), + select=True, help='Sales team to which Case belongs to.'), 'email_from': fields.char('Email', size=128, states={'done': [('readonly', True)]}, help="These people will receive email."), 'id': fields.integer('ID'), 'create_date': fields.datetime('Creation Date' , readonly=True), diff --git a/addons/crm/crm_phonecall.py b/addons/crm/crm_phonecall.py index 05413ddcd8f..1f1311e1191 100644 --- a/addons/crm/crm_phonecall.py +++ b/addons/crm/crm_phonecall.py @@ -41,8 +41,7 @@ class crm_phonecall(osv.osv, crm_case): 'date_action_next': fields.datetime('Next Action', readonly=1), 'create_date': fields.datetime('Creation Date' , readonly=True), 'section_id': fields.many2one('crm.case.section', 'Sales Team', \ - select=True, help='Sales team to which Case belongs to.\ - Define Responsible user and Email account for mail gateway.'), + select=True, help='Sales team to which Case belongs to.'), 'user_id': fields.many2one('res.users', 'Responsible'), 'partner_id': fields.many2one('res.partner', 'Partner'), 'partner_address_id': fields.many2one('res.partner.address', 'Partner Contact', \ diff --git a/addons/crm/wizard/crm_send_email.py b/addons/crm/wizard/crm_send_email.py index 022f987e295..3f1c1916585 100644 --- a/addons/crm/wizard/crm_send_email.py +++ b/addons/crm/wizard/crm_send_email.py @@ -48,8 +48,7 @@ class crm_send_new_email(osv.osv_memory): 'email_to' : fields.char('To', size=512, required=True), 'email_from' : fields.char('From', size=128, required=True), 'reply_to' : fields.char('Reply To', size=128, required=True, help="Reply-to of the Sales team defined on this case"), - 'email_cc' : fields.char('CC', size=512, help="Carbon Copy: list of recipients that will receive"\ - " a copy of this mail, and future communication related to this case"), + 'email_cc' : fields.char('CC', size=512, help="Carbon Copy: list of recipients that will receive a copy of this mail"), 'subject': fields.char('Subject', size=512, required=True), 'body': fields.text('Message Body', required=True), 'state': fields.selection(crm.AVAILABLE_STATES, string='Set New State To', required=True), diff --git a/addons/crm_claim/crm_claim.py b/addons/crm_claim/crm_claim.py index 85dfc8b9dd0..1625cc2ae8b 100644 --- a/addons/crm_claim/crm_claim.py +++ b/addons/crm_claim/crm_claim.py @@ -74,7 +74,7 @@ class crm_claim(osv.osv, crm.crm_case): 'partner_address_id': fields.many2one('res.partner.address', 'Partner Contact', \ # domain="[('partner_id','=',partner_id)]" ), - 'email_cc': fields.text('Watchers Emails', size=252, help="These people will receive a copy of the future communication between partner and users by email"), + 'email_cc': fields.text('Watchers Emails', size=252, help="These addresses(Comma-separated) will receive a copy of the future communication between partner and users"), 'email_from': fields.char('Email', size=128, help="These people will receive email."), 'partner_name': fields.char("Employee's Name", size=64), 'partner_mobile': fields.char('Mobile', size=32), diff --git a/addons/crm_fundraising/crm_fundraising.py b/addons/crm_fundraising/crm_fundraising.py index 2fd7f4c6f52..1dd6211e915 100644 --- a/addons/crm_fundraising/crm_fundraising.py +++ b/addons/crm_fundraising/crm_fundraising.py @@ -46,7 +46,7 @@ class crm_fundraising(osv.osv, crm.crm_case): 'partner_id': fields.many2one('res.partner', 'Partner'), 'partner_address_id': fields.many2one('res.partner.address', 'Partner Contact', \ domain="[('partner_id','=',partner_id)]"), - 'email_cc': fields.text('Watchers Emails', size=252 , help="These people will receive a copy of the future communication between partner and users by email"), + 'email_cc': fields.text('Watchers Emails', size=252 , help="These addresses(Comma-separated) will receive a copy of the future communication between partner and users"), 'email_from': fields.char('Email', size=128, help="These people will receive email."), 'date_closed': fields.datetime('Closed', readonly=True), 'date': fields.datetime('Date'), diff --git a/addons/crm_helpdesk/crm_helpdesk.py b/addons/crm_helpdesk/crm_helpdesk.py index 38352691db0..8d9985e5cb1 100644 --- a/addons/crm_helpdesk/crm_helpdesk.py +++ b/addons/crm_helpdesk/crm_helpdesk.py @@ -49,9 +49,7 @@ class crm_helpdesk(osv.osv, crm.crm_case): 'partner_id': fields.many2one('res.partner', 'Partner'), 'partner_address_id': fields.many2one('res.partner.address', 'Partner Contact', \ domain="[('partner_id','=',partner_id)]"), - 'email_cc': fields.text('Watchers Emails', size=252 , help="These people\ - will receive a copy of the future" \ -" communication between partner and users by email"), + 'email_cc': fields.text('Watchers Emails', size=252 , help="These addresses(Comma-separated) will receive a copy of the future communication between partner and users"), 'email_from': fields.char('Email', size=128, help="These people will receive email."), 'date': fields.datetime('Date'), 'ref' : fields.reference('Reference', selection=crm._links_get, size=128), From 4ba8b23c39a7ca0b21e8b83c58402156661279cc Mon Sep 17 00:00:00 2001 From: "rpa (Open ERP)" Date: Thu, 15 Jul 2010 18:56:15 +0530 Subject: [PATCH 11/17] [FIX]: partner_geo_assign: Wrong file reference bzr revid: rpa@tinyerp.com-20100715132615-j0c6wikxumznvrwd --- addons/partner_geo_assign/__openerp__.py | 1 - 1 file changed, 1 deletion(-) diff --git a/addons/partner_geo_assign/__openerp__.py b/addons/partner_geo_assign/__openerp__.py index ccfe6ba7c45..cf57609b4a6 100644 --- a/addons/partner_geo_assign/__openerp__.py +++ b/addons/partner_geo_assign/__openerp__.py @@ -32,7 +32,6 @@ based on geolocalization. 'depends': ['crm'], 'data': [ 'res_partner_view.xml', - 'crm_lead_view.xml', ], 'installable': True, 'active': False, From e58e5b6cf14829cf6d94c154b88ab0595d45ce3e Mon Sep 17 00:00:00 2001 From: Mustufa Rangwala Date: Thu, 15 Jul 2010 19:04:43 +0530 Subject: [PATCH 12/17] [FIX] project planning bzr revid: mra@mra-laptop-20100715133443-0fr1r76h0jof8n11 --- addons/project_planning/project_planning.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/project_planning/project_planning.py b/addons/project_planning/project_planning.py index 69dfde4e6bf..38fadb88f5d 100644 --- a/addons/project_planning/project_planning.py +++ b/addons/project_planning/project_planning.py @@ -214,7 +214,7 @@ class project_task(osv.osv): def search(self, cr, user, args, offset=0, limit=None, order=None, context=None, count=False): if not context: - context = context + context = {} if not context.get('planning'): return super(project_task,self).search(cr, user, args, offset, limit, order, context) cr.execute(" SELECT t.id, t.name \ @@ -498,7 +498,7 @@ class report_account_analytic_planning_stat(osv.osv): WHERE user_id=%s and account_id=%s and date>=%s and date<=%s''', (line.user_id.id, line.account_id.id, line.planning_id.date_from, line.planning_id.date_to)) else: cr.execute('SELECT sum(unit_amount) FROM account_analytic_line WHERE account_id=%s AND date>=%s AND date<=%s', (line.account_id.id, line.planning_id.date_from, line.planning_id.date_to)) - + sum = cr.fetchone() if sum and sum[0]: result[line.id] = sum[0] * div2 From 2b0c33b3f428ba11e87cbde6bfa11e9e3ee7e4f2 Mon Sep 17 00:00:00 2001 From: Mantavya Gajjar Date: Thu, 15 Jul 2010 19:06:25 +0530 Subject: [PATCH 13/17] [FIX]: make refund invoice available after confirmation of invoice bzr revid: mga@tinyerp.com-20100715133625-7rph8osnlnto1rhe --- addons/account/account_invoice_view.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/addons/account/account_invoice_view.xml b/addons/account/account_invoice_view.xml index e9c66c3036d..6e770864799 100644 --- a/addons/account/account_invoice_view.xml +++ b/addons/account/account_invoice_view.xml @@ -201,13 +201,13 @@ - +