From 4c8838b8ff1995002e5edc1cf71121cfbe916b8b Mon Sep 17 00:00:00 2001 From: Mantavya Gajjar Date: Fri, 24 Oct 2008 17:27:48 +0530 Subject: [PATCH 01/12] bug-fix for the account voucher create an analytic entry when voicher entry created bzr revid: mga@mga-laptop-20081024115748-s75ewnn2yxw213jh --- addons/account_voucher/voucher.py | 30 ++++++++++++------------- addons/account_voucher/voucher_view.xml | 7 +++--- 2 files changed, 19 insertions(+), 18 deletions(-) diff --git a/addons/account_voucher/voucher.py b/addons/account_voucher/voucher.py index d3b3343395c..9fba3d1ed8d 100755 --- a/addons/account_voucher/voucher.py +++ b/addons/account_voucher/voucher.py @@ -8,7 +8,6 @@ from mx.DateTime import RelativeDateTime from tools import config - class account_voucher(osv.osv): def _get_period(self, cr, uid, context): periods = self.pool.get('account.period').find(cr, uid) @@ -24,10 +23,8 @@ class account_voucher(osv.osv): def _get_reference_type(self, cursor, user, context=None): return [('none', 'Free Reference')] - - def _get_journal(self, cr, uid, context): - type_inv = context.get('type', 'rec_voucher') + type_inv = context #.get('type', 'rec_voucher') type2journal = {'rec_voucher': 'cash', 'bank_rec_voucher': 'cash','pay_voucher': 'cash','bank_pay_voucher': 'cash', 'cont_voucher': 'cash','journal_sale_voucher': 'sale','journal_pur_voucher': 'purchase' } journal_obj = self.pool.get('account.journal') res = journal_obj.search(cr, uid, [('type', '=', type2journal.get(type_inv, 'cash'))], limit=1) @@ -72,8 +69,7 @@ class account_voucher(osv.osv): ('cancel','Cancel') ], 'State', readonly=True), - 'amount':fields.float('Amount', readonly=True), -# , states={'draft':[('readonly',False)]} + 'amount':fields.float('Amount'), 'number':fields.char('Number', size=32, readonly=True), 'reference': fields.char('Voucher Reference', size=64), 'reference_type': fields.selection(_get_reference_type, 'Reference Type', @@ -147,11 +143,13 @@ class account_voucher(osv.osv): self.write(cr,uid,ids,{'amount':total}) self.write(cr, uid, ids, {'state':'proforma'}) return True + def proforma_voucher(self, cr, uid, ids, context={}): self.action_move_line_create(cr, uid, ids) self.action_number(cr, uid, ids) self.write(cr, uid, ids, {'state':'posted'}) return True + def cancel_voucher(self,cr,uid,ids,context={}): self.action_cancel(cr, uid, ids) self.write(cr, uid, ids, {'state':'cancel'}) @@ -192,12 +190,13 @@ class account_voucher(osv.osv): ref = inv.reference else: ref = self._convert_ref(cr, uid, inv.number) + il['analytic_lines'] = [(0,0, { 'name': il['name'], 'date': inv['date'], 'account_id': il['account_analytic_id'], 'amount': inv['amount'] * sign, - 'partner_id': il['partner_id'] or False, + #'partner_id': il['partner_id'] or False, 'general_account_id': il['account_id'] or False, 'journal_id': self._get_journal(cr, uid, inv.type), 'ref': ref, @@ -206,10 +205,14 @@ class account_voucher(osv.osv): return iml def action_move_line_create(self, cr, uid, ids, *args): + for inv in self.browse(cr, uid, ids): + if inv.move_id: continue + company_currency = inv.company_id.currency_id.id + # create the analytical lines line_ids = self.read(cr, uid, [inv.id], ['payment_ids'])[0]['payment_ids'] ils = self.pool.get('account.voucher.line').read(cr, uid, line_ids) @@ -256,13 +259,12 @@ class account_voucher(osv.osv): 'currency_id': diff_currency_p \ and inv.currency_id.id or False, 'ref': ref - }) + }) date = inv.date inv.amount=total - - line = map(lambda x:(0,0,self.line_get_convert(cr, uid, x,date, context={})) ,iml) + line = map(lambda x:(0, 0, self.line_get_convert(cr, uid, x,date, context={})), iml) journal_id = inv.journal_id.id #self._get_journal(cr, uid, {'type': inv['type']}) journal = self.pool.get('account.journal').browse(cr, uid, journal_id) @@ -270,6 +272,7 @@ class account_voucher(osv.osv): name = self.pool.get('ir.sequence').get_id(cr, uid, journal.sequence_id.id) move = {'name': name, 'line_id': line, 'journal_id': journal_id} + if inv.period_id: move['period_id'] = inv.period_id.id for i in line: @@ -280,12 +283,9 @@ class account_voucher(osv.osv): obj=self.pool.get('account.move').browse(cr,uid,move_id) for line in obj.line_id : cr.execute('insert into voucher_id (account_id,rel_account_move) values (%d, %d)',(int(ids[0]),int(line.id))) -# self.pool.get('account.move').post(cr, uid, [move_id]) -# self._log_event(cr, uid, ids) - return True - - + return True + def line_get_convert(self, cr, uid, x, date, context={}): return { 'date':date, diff --git a/addons/account_voucher/voucher_view.xml b/addons/account_voucher/voucher_view.xml index 5b625f1c267..a1f6907c701 100755 --- a/addons/account_voucher/voucher_view.xml +++ b/addons/account_voucher/voucher_view.xml @@ -30,13 +30,14 @@ - + + - - + + From 061f40983750c350428a72eab1eef60084b56221 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Valyi?= Date: Mon, 3 Nov 2008 11:10:09 +0100 Subject: [PATCH 02/12] correct Analytic Account form view (fixes a regression where the form view and associated wizards and reports were disabled) bzr revid: rvalyi@gmail.com-20081103101009-6llklx561pp8vxmg --- addons/account/project/project_view.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account/project/project_view.xml b/addons/account/project/project_view.xml index cb71e1c1091..0bd405feba2 100644 --- a/addons/account/project/project_view.xml +++ b/addons/account/project/project_view.xml @@ -74,7 +74,7 @@ ir.actions.act_window account.analytic.account form - tree,graph + tree,graph,form From b82b6fb992826407fb241154520eedfb4462724f Mon Sep 17 00:00:00 2001 From: Najlaa Date: Mon, 3 Nov 2008 14:03:51 +0100 Subject: [PATCH 03/12] mo bzr revid: nel@silver-20081103130351-jux5jns5w1kzzvzz --- addons/account/wizard/wizard_general_ledger_report.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account/wizard/wizard_general_ledger_report.py b/addons/account/wizard/wizard_general_ledger_report.py index 1b22e75d424..86ff2f8053d 100644 --- a/addons/account/wizard/wizard_general_ledger_report.py +++ b/addons/account/wizard/wizard_general_ledger_report.py @@ -109,7 +109,7 @@ period_fields = { 'fiscalyear': {'string': 'Fiscal year', 'type': 'many2one', 'relation': 'account.fiscalyear', 'help': 'Keep empty for all open fiscal year'}, 'periods': {'string': 'Periods', 'type': 'many2many', 'relation': 'account.period', 'help': 'All periods if empty'}, - 'sortbydate':{'string':"Sort by:",'type':'selection','selection':[('sort_date','Date'),('sort_mvt','Mouvement')]}, + 'sortbydate':{'string':"Sort by:",'type':'selection','selection':[('sort_date','Date'),('sort_mvt','Movement')]}, 'display_account':{'string':"Display accounts ",'type':'selection','selection':[('bal_mouvement','With movements'),('bal_all','All'),('bal_solde','With balance is not equal to 0')]}, 'landscape':{'string':"Landscape Mode",'type':'boolean'}, 'soldeinit':{'string':"Inclure les soldes initiaux",'type':'boolean'}, From cd02196d3d08b84066095d08aa7e839c64401e7d Mon Sep 17 00:00:00 2001 From: Mantavya Gajjar Date: Tue, 4 Nov 2008 12:34:05 +0530 Subject: [PATCH 04/12] test commit bzr revid: mga@tinyerp.com-20081104070405-25i73uuf97gq3qga --- addons/account_voucher/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/account_voucher/__init__.py b/addons/account_voucher/__init__.py index 0d2aa068a86..a5eeb4d4b27 100755 --- a/addons/account_voucher/__init__.py +++ b/addons/account_voucher/__init__.py @@ -19,6 +19,7 @@ # along with this program. If not, see . # ############################################################################## + import voucher import voucher_account -import report \ No newline at end of file +import report From 00e0e94a27649eccfd96e0075a74cf594d4b0c31 Mon Sep 17 00:00:00 2001 From: apa-tiny Date: Tue, 4 Nov 2008 14:05:46 +0530 Subject: [PATCH 05/12] General ledger landscape prob solved... bzr revid: patelamit2003@gmail.com-20081104083546-rju6owjndl3x0ass --- .../report/general_ledger_landscape.rml | 87 +++++++++++-------- 1 file changed, 51 insertions(+), 36 deletions(-) diff --git a/addons/account/report/general_ledger_landscape.rml b/addons/account/report/general_ledger_landscape.rml index ebc0d822f2b..a36c53746dc 100755 --- a/addons/account/report/general_ledger_landscape.rml +++ b/addons/account/report/general_ledger_landscape.rml @@ -37,13 +37,13 @@ - + - + @@ -91,9 +91,9 @@ - [[ data['form']['amount_currency'] == True or removeParentNode('blockTable') ]] + [[ data['form']['amount_currency'] == True or removeParentNode('blockTable') ]] - Date + Date JNRL Partner Ref @@ -105,9 +105,10 @@ Balance Currency + + [[ repeatIn(objects, 'a') ]] [[ repeatIn(get_children_accounts(a,data['form']), 'o') ]] - @@ -118,28 +119,34 @@ [[ sum_solde_account(o, data['form']) or '0.0' ]] [[ sum_currency_amount_account(o, data['form']) or '0.0' ]] + + + + + [[ repeatIn(lines(o, data['form']), 'line') ]] + [[ line['date'] ]] + [[ line['code'] ]] + [[ line['partner'] ]] + [[ line['ref'] ]] + [[ line['move'] ]] + [[ line['name'] ]] + [[ strip_name(line['line_corresp'],55) ]] + [[ line['debit'] and line['debit'] or '0.0' ]] + [[ line['credit'] and line['credit'] or '0.0' ]] + [[ line['progress'] and line['progress'] or '0.0' ]] + [[ line['amount_currency'] or '0.0' ]] [[ line['currency_code'] ]] + + + + - - - [[ repeatIn(lines(o, data['form']), 'line') ]] - [[ line['date'] ]] - [[ line['code'] ]] - [[ line['partner'] ]] - [[ line['ref'] ]] - [[ line['move'] ]] - [[ line['name'] ]] - [[ strip_name(line['line_corresp'],55) ]] - [[ line['debit'] and line['debit'] or '0.0' ]] - [[ line['credit'] and line['credit'] or '0.0' ]] - [[ line['progress'] and line['progress'] or '0.0' ]] - [[ line['amount_currency'] or '0.0' ]] [[ line['currency_code'] ]] - [[ data['form']['amount_currency'] == False or removeParentNode('blockTable') ]] + [[ data['form']['amount_currency'] == False or removeParentNode('blockTable') ]] - Date + Date JNRL Partner Ref @@ -150,9 +157,10 @@ Credit Balance - [[ repeatIn(objects, 'a') ]] - [[ repeatIn(get_children_accounts(a,data['form']), 'o') ]] + + [[ repeatIn(objects, 'a') ]] + [[ repeatIn(get_children_accounts(a,data['form']), 'o') ]] @@ -162,22 +170,29 @@ [[sum_credit_account(o, data['form']) or '0.0']] [[sum_solde_account(o, data['form']) or '0.0' ]] + + + + + [[ repeatIn(lines(o, data['form']), 'line') ]] + [[ line['date'] ]] + [[ line['code'] ]] + [[ line['partner'] ]] + [[ line['ref'] ]] + [[ line['move'] ]] + [[ line['name'] ]] + [[ strip_name(line['line_corresp'],55) ]] + [[ line['debit'] and line['debit'] or '0.0' ]] + [[ line['credit'] and line['credit'] or '0.0' ]] + [[ line['progress'] and line['progress'] or '0.0' ]] + + + + - - [[ repeatIn(lines(o, data['form']), 'line') ]] - [[ line['date'] ]] - [[ line['code'] ]] - [[ line['partner'] ]] - [[ line['ref'] ]] - [[ line['move'] ]] - [[ line['name'] ]] - [[ strip_name(line['line_corresp'],55) ]] - [[ line['debit'] and line['debit'] or '0.0' ]] - [[ line['credit'] and line['credit'] or '0.0' ]] - [[ line['progress'] and line['progress'] or '0.0' ]] - + \ No newline at end of file From 4713caafb1dbe597eb5e57fb588733d36905113f Mon Sep 17 00:00:00 2001 From: apa-tiny Date: Tue, 4 Nov 2008 15:40:08 +0530 Subject: [PATCH 06/12] Add General ledger Landscape bzr revid: patelamit2003@gmail.com-20081104101008-69shfmg8jjs08lg7 --- addons/account/report/general_ledger_landscape.rml | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 addons/account/report/general_ledger_landscape.rml diff --git a/addons/account/report/general_ledger_landscape.rml b/addons/account/report/general_ledger_landscape.rml old mode 100755 new mode 100644 From bc41b4add435bb3c55dc5b4ee55a4aee627a7c4e Mon Sep 17 00:00:00 2001 From: Sofia Date: Tue, 4 Nov 2008 15:52:19 +0530 Subject: [PATCH 07/12] added views and demo data for claims and phone calls bzr revid: sahibsofia@gmail.com-20081104102219-1qsv957peetq6suz --- addons/crm_configuration/__terp__.py | 8 + addons/crm_configuration/crm_claims_data.xml | 61 ++++ addons/crm_configuration/crm_claims_demo.xml | 120 +++++++ addons/crm_configuration/crm_claims_menu.xml | 190 +++++++++++ addons/crm_configuration/crm_claims_view.xml | 144 ++++++++ addons/crm_configuration/crm_config.py | 5 +- addons/crm_configuration/crm_config_view.xml | 2 + .../crm_configuration/crm_phonecall_data.xml | 37 ++ .../crm_configuration/crm_phonecall_demo.xml | 99 ++++++ .../crm_configuration/crm_phonecall_menu.xml | 316 ++++++++++++++++++ .../crm_configuration/crm_phonecall_view.xml | 137 ++++++++ 11 files changed, 1118 insertions(+), 1 deletion(-) create mode 100644 addons/crm_configuration/crm_claims_data.xml create mode 100644 addons/crm_configuration/crm_claims_demo.xml create mode 100644 addons/crm_configuration/crm_claims_menu.xml create mode 100644 addons/crm_configuration/crm_claims_view.xml create mode 100644 addons/crm_configuration/crm_phonecall_data.xml create mode 100644 addons/crm_configuration/crm_phonecall_demo.xml create mode 100644 addons/crm_configuration/crm_phonecall_menu.xml create mode 100644 addons/crm_configuration/crm_phonecall_view.xml diff --git a/addons/crm_configuration/__terp__.py b/addons/crm_configuration/__terp__.py index 9ad4a89dd7f..881b7595162 100644 --- a/addons/crm_configuration/__terp__.py +++ b/addons/crm_configuration/__terp__.py @@ -45,6 +45,8 @@ meetings, eso. "crm_meeting_view.xml", "crm_opportunity_view.xml", "crm_fund_view.xml", + "crm_claims_view.xml", + "crm_phonecall_view.xml", "crm_report_view.xml" ], "demo_xml" : [ @@ -54,6 +56,8 @@ meetings, eso. # "crm_meeting_demo.xml", # "crm_lead_demo.xml", # "crm_opportunity_demo.xml", +# "crm_claims_demo.xml", +# "crm_phonecall_demo.xml", ], "update_xml" : [ # "crm_bugs_data.xml", @@ -69,6 +73,10 @@ meetings, eso. # "crm_meeting_menu.xml", # "crm_opportunity_data.xml", # "crm_opportunity_menu.xml", +# "crm_claims_data.xml", +# "crm_claims_menu.xml", +# "crm_phonecall_data.xml", +# "crm_phonecall_menu.xml", "security/ir.model.access.csv", "process/crm_configuration_process.xml", ], diff --git a/addons/crm_configuration/crm_claims_data.xml b/addons/crm_configuration/crm_claims_data.xml new file mode 100644 index 00000000000..c4b41a30b9e --- /dev/null +++ b/addons/crm_configuration/crm_claims_data.xml @@ -0,0 +1,61 @@ + + + + + Claims + Claim + + + + + Factual Claims + + + + Value Claims + + + + Policy Claims + + + + + + Corrective + + + + Preventive + + + + + + Accepted as Claim + + + + Fixed + + + + Won't fix + + + + Invalid + + + + Awaiting Response + + + + \ No newline at end of file diff --git a/addons/crm_configuration/crm_claims_demo.xml b/addons/crm_configuration/crm_claims_demo.xml new file mode 100644 index 00000000000..e916399fee7 --- /dev/null +++ b/addons/crm_configuration/crm_claims_demo.xml @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/addons/crm_configuration/crm_claims_menu.xml b/addons/crm_configuration/crm_claims_menu.xml new file mode 100644 index 00000000000..2918acbf1dc --- /dev/null +++ b/addons/crm_configuration/crm_claims_menu.xml @@ -0,0 +1,190 @@ + + + + + + ######################## CLAIMS (menu) ########################### + + All Claims + crm.case + form + tree,calendar + + + + + + tree + + + + + + calendar + + + + + + form + + + + + + + + My Claims + crm.case + tree,form,calendar + + + + + + tree + + + + + + calendar + + + + + + form + + + + + + + Funds + crm.case + form + + + + + + form + + + + + + + My Unclosed Claims + crm.case + tree,calendar,form + + + + + + tree + + + + + + calendar + + + + + + form + + + + + + + My Cancelled Claims + crm.case + tree,calendar,form + + + + + + tree + + + + + + calendar + + + + + + form + + + + + + + + + + All Unclosed Claims + crm.case + tree,calendar,form + + + + + + tree + + + + + + calendar + + + + + + form + + + + + + + All Cancelled Claims + crm.case + tree,calendar,form + + + + + + tree + + + + + + calendar + + + + + + form + + + + + + + \ No newline at end of file diff --git a/addons/crm_configuration/crm_claims_view.xml b/addons/crm_configuration/crm_claims_view.xml new file mode 100644 index 00000000000..254c9e30223 --- /dev/null +++ b/addons/crm_configuration/crm_claims_view.xml @@ -0,0 +1,144 @@ + + + + # ------------------------------------------------------ + # Claims + # ------------------------------------------------------ + + + CRM - Claims Tree + crm.case + tree + + + + + + + + + + + + + + + CRM - Claims Form + crm.case + form + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +