From 3a3ac548012f0a2f6e50833d710958566c708fed Mon Sep 17 00:00:00 2001 From: Mustufa Rangwala Date: Fri, 24 Oct 2008 12:15:23 +0530 Subject: [PATCH 1/6] account.tax tree view open only parent=false taxes now and remove central journal which has double entries bzr revid: mra@tinyerp.com-20081024064523-clv0zan46cdinbep --- addons/account/account_view.xml | 1 + addons/account/account_wizard.xml | 5 ----- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/addons/account/account_view.xml b/addons/account/account_view.xml index 31b6c73d179..5c1acf39e1c 100644 --- a/addons/account/account_view.xml +++ b/addons/account/account_view.xml @@ -610,6 +610,7 @@ account.tax form + [('parent_id','=',False)] diff --git a/addons/account/account_wizard.xml b/addons/account/account_wizard.xml index 525fa46607a..e9e0d6826f5 100644 --- a/addons/account/account_wizard.xml +++ b/addons/account/account_wizard.xml @@ -89,14 +89,9 @@ - - - - - From 6ecdbc0e9d4342d955a9bf930e9aef10811e15ce Mon Sep 17 00:00:00 2001 From: Christophe Simonis Date: Fri, 24 Oct 2008 09:08:49 +0200 Subject: [PATCH 2/6] fix access rights bzr revid: christophe@tinyerp.com-20081024070849-cjjlrvz52t67ll0m --- addons/account/security/ir.model.access.csv | 13 ++++++------- addons/event/__terp__.py | 5 ++++- addons/event/security/event_security.xml | 13 +++++++++++++ addons/event/security/ir.model.access.csv | 3 ++- addons/idea/__terp__.py | 9 +++++---- addons/idea/security/idea_security.xml | 13 +++++++++++++ addons/idea/security/ir.model.access | 6 ------ addons/idea/security/ir.model.access.csv | 13 +++++++------ addons/project/security/project_security.xml | 7 +++++++ 9 files changed, 57 insertions(+), 25 deletions(-) create mode 100644 addons/event/security/event_security.xml create mode 100644 addons/idea/security/idea_security.xml delete mode 100644 addons/idea/security/ir.model.access diff --git a/addons/account/security/ir.model.access.csv b/addons/account/security/ir.model.access.csv index 9dbdcb18b55..d231315c175 100644 --- a/addons/account/security/ir.model.access.csv +++ b/addons/account/security/ir.model.access.csv @@ -13,6 +13,7 @@ "access_account_journal_period_manager","account.journal.period manager","model_account_journal_period","account.group_account_manager",1,1,1,1 "access_account_journal_period","account.journal.period","model_account_journal_period","account.group_account_user",1,1,1,1 "access_account_move","account.move","model_account_move","account.group_account_user",1,1,1,1 +"access_account_move_line","account.move.line","model_account_move_line","account.group_account_user",1,1,1,1 "access_account_move_reconcile","account.move.reconcile","model_account_move_reconcile","account.group_account_user",1,1,1,1 "access_account_tax_code","account.tax.code","model_account_tax_code",,1,0,0,0 "access_account_tax","account.tax","model_account_tax",,1,0,0,0 @@ -27,7 +28,6 @@ "access_account_tax_template","account.tax.template","model_account_tax_template","account.group_account_manager",1,1,1,1 "access_wizard_multi_charts_accounts","wizard.multi.charts.accounts","model_wizard_multi_charts_accounts","account.group_account_manager",1,1,1,1 "access_account_bank_accounts_wizard","account.bank.accounts.wizard","model_account_bank_accounts_wizard","account.group_account_manager",1,1,1,1 -"access_account_move_line","account.move.line invoice","model_account_move_line","account.group_account_invoice",1,1,1,1 "access_account_bank_statement","account.bank.statement","model_account_bank_statement","account.group_account_user",1,1,1,1 "access_account_bank_statement_reconcile","account.bank.statement.reconcile","model_account_bank_statement_reconcile","account.group_account_user",1,1,1,1 "access_account_bank_statement_reconcile_line","account.bank.statement.reconcile.line","model_account_bank_statement_reconcile_line","account.group_account_user",1,1,1,1 @@ -41,6 +41,7 @@ "access_account_invoice_tax_uinvoice","account.invoice.tax","model_account_invoice_tax","account.group_account_invoice",1,1,1,1 "access_account_analytic_line_uinvoice","account.analytic.line","model_account_analytic_line","account.group_account_user",1,1,1,1 "access_account_move_uinvoice","account.move","model_account_move","account.group_account_invoice",1,1,1,1 +"access_account_move_line_uinvoice","account.move.line invoice","model_account_move_line","account.group_account_invoice",1,1,1,1 "access_account_move_reconcile_uinvoice","account.move.reconcile","model_account_move_reconcile","account.group_account_invoice",1,1,1,1 "access_account_journal_period_uinvoice","account.journal.period","model_account_journal_period","account.group_account_invoice",1,1,1,1 "access_account_payment_term_manager","account.payment.term","model_account_payment_term","account.group_account_manager",1,1,1,1 @@ -66,16 +67,14 @@ "access_res_currency_rate_account_manager","res.currency.rate account manager","base.model_res_currency_rate","group_account_manager",1,1,1,1 "access_account_config_wizard_account_manager","account.config.wizard account manager","model_account_config_wizard","group_account_manager",1,1,1,1 "access_account_config_wizard_system_manager","account.config.wizard system manager","model_account_config_wizard","base.group_system",1,1,1,1 -"access_account_invoice_partner_manager","account.invoice partner manager","model_account_invoice","base.group_partner_manager",1,0,0,0 -"access_account_invoice_line_partner_manager","account.invoice.line partner manager","model_account_invoice_line","base.group_partner_manager",1,0,0,0 -"access_account_invoice_tax_partner_manager","account.invoice.tax partner manager","model_account_invoice_tax","base.group_partner_manager",1,0,0,0 +"access_account_invoice_user","account.invoice user","model_account_invoice","base.group_user",1,0,0,0 +"access_account_invoice_user","account.invoice.line user","model_account_invoice_line","base.group_user",1,0,0,0 +"access_account_invoice_user","account.invoice.tax user","model_account_invoice_tax","base.group_user",1,0,0,0 "access_account_payment_term_partner_manager","account.payment.term partner manager","model_account_payment_term","base.group_user",1,0,0,0 "access_account_payment_term_line_partner_manager","account.payment.term.line partner manager","model_account_payment_term_line","base.group_user",1,0,0,0 "access_account_account_product_manager","account.account product manager","model_account_account","product.group_product_manager",1,0,0,0 "access_account_journal_product_manager","account.journal product manager","model_account_journal","product.group_product_manager",1,0,0,0 "access_account_fiscal_position_product_manager","account.fiscal.position account.manager","model_account_fiscal_position","account.group_account_manager",1,1,1,1 -"access_account_fiscal_position","account.fiscal.position all","model_account_fiscal_position","base.group_user",1,0,0,0 -"access_account_fiscal_position_tax_product_manager","account.fiscal.position.tax account.manager","model_account_fiscal_position_tax","account.group_account_manager",1,1,1,1 -"access_account_fiscal_position_tax","account.fiscal.position.tax all","model_account_fiscal_position_tax","base.group_user",1,0,0,0 "access_account_fiscal_position_account_product_manager","account.fiscal.position account.manager","model_account_fiscal_position_account","account.group_account_manager",1,1,1,1 +"access_account_fiscal_position","account.fiscal.position all","model_account_fiscal_position","base.group_user",1,0,0,0 "access_account_fiscal_position_account","account.fiscal.position all","model_account_fiscal_position_account","base.group_user",1,0,0,0 diff --git a/addons/event/__terp__.py b/addons/event/__terp__.py index 9fd8dec7f09..705108fd7cb 100644 --- a/addons/event/__terp__.py +++ b/addons/event/__terp__.py @@ -24,8 +24,11 @@ "demo_xml" : ["event_demo.xml"], "init_xml" : ["event_data.xml"], "update_xml" : [ + "event_wizard.xml", + "event_view.xml", + "event_sequence.xml", + "security/event_security.xml", "security/ir.model.access.csv", - "event_wizard.xml","event_view.xml","event_sequence.xml" ], "active" : False, "installable" : True, diff --git a/addons/event/security/event_security.xml b/addons/event/security/event_security.xml new file mode 100644 index 00000000000..db731e1ccd3 --- /dev/null +++ b/addons/event/security/event_security.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/addons/event/security/ir.model.access.csv b/addons/event/security/ir.model.access.csv index 126c78ea6ad..e38e82ef27c 100644 --- a/addons/event/security/ir.model.access.csv +++ b/addons/event/security/ir.model.access.csv @@ -1,5 +1,6 @@ "id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink" -"access_event_type","event.type","model_event_type","crm.group_crm_user",1,1,1,1 +"access_event_type","event.type","model_event_type","crm.group_crm_user",1,0,0,0 +"access_event_type_manager","event.type manager","model_event_type","crm.group_crm_manager",1,1,1,1 "access_event_event","event.event","model_event_event","crm.group_crm_user",1,1,1,1 "access_event_registration","event.registration","model_event_registration","crm.group_crm_user",1,1,1,1 "access_report_event_registration","report.event.registration","model_report_event_registration","crm.group_crm_user",1,0,0,0 diff --git a/addons/idea/__terp__.py b/addons/idea/__terp__.py index d31ea7441e4..6d98ef5a1e8 100644 --- a/addons/idea/__terp__.py +++ b/addons/idea/__terp__.py @@ -6,15 +6,16 @@ "author" : "Tiny", "website" : "http://openerp.com", "category" : "Tools", - "description": """This module allows your user to easily and efficiently participate in the innovation of the enterprise. It allows everybody to express ideas about different subjects. Then, others userscan comment these ideas and vote for particular ideas. Each idea as a score based on the different votes. The managers can obtain an easy view on best ideas from all the users. Once installed, check the menu 'Ideas' in the 'Tools' main menu.""", + "description": """This module allows your user to easily and efficiently participate in the innovation of the enterprise. It allows everybody to express ideas about different subjects. Then, others users can comment these ideas and vote for particular ideas. Each idea as a score based on the different votes. The managers can obtain an easy view on best ideas from all the users. Once installed, check the menu 'Ideas' in the 'Tools' main menu.""", "depends" : ['base'], "init_xml" : [ ], "demo_xml" : [ ], "update_xml" : [ - "security/ir.model.access.csv", 'idea_view.xml', - 'idea_workflow.xml' - ], + 'idea_workflow.xml', + "security/idea_security.xml", + "security/ir.model.access.csv", + ], "installable": True } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/idea/security/idea_security.xml b/addons/idea/security/idea_security.xml new file mode 100644 index 00000000000..522560a0bb5 --- /dev/null +++ b/addons/idea/security/idea_security.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/addons/idea/security/ir.model.access b/addons/idea/security/ir.model.access deleted file mode 100644 index f92071265ec..00000000000 --- a/addons/idea/security/ir.model.access +++ /dev/null @@ -1,6 +0,0 @@ -id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink -access_idea_category,idea.category,model_idea_category,base.group_system,1,1,1,1 -access_idea_idea,idea.idea,model_idea_idea,base.group_user,1,1,1,1 -access_idea_comment,idea.comment,model_idea_comment,base.group_user,1,1,1,1 -access_idea_vote,idea.vote,model_idea_vote,base.group_user,1,1,1,1 -access_idea_vote_stat,idea.vote.stat,model_idea_vote_stat,base.group_user,1,1,1,1 diff --git a/addons/idea/security/ir.model.access.csv b/addons/idea/security/ir.model.access.csv index 4b23bfa0540..4218f118772 100644 --- a/addons/idea/security/ir.model.access.csv +++ b/addons/idea/security/ir.model.access.csv @@ -1,6 +1,7 @@ -id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink -access_idea_category,idea.category,model_idea_category,base.group_user,1,0,0,0 -access_idea_idea,idea.idea,model_idea_idea,base.group_user,1,0,0,0 -access_idea_comment,idea.comment,model_idea_comment,base.group_user,1,0,0,0 -access_idea_vote,idea.vote,model_idea_vote,base.group_user,1,0,0,0 -access_idea_vote_stat,idea.vote.stat,model_idea_vote_stat,base.group_user,1,0,0,0 +"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink" +"access_idea_category","idea.category","model_idea_category","base.group_user",1,0,0,0 +"access_idea_idea","idea.idea","model_idea_idea","base.group_user",1,1,1,1 +"access_idea_comment","idea.comment","model_idea_comment","base.group_user",1,1,1,1 +"access_idea_vote","idea.vote","model_idea_vote","base.group_user",1,1,1,1 +"access_idea_vote_stat","idea.vote.stat","model_idea_vote_stat","base.group_user",1,0,0,0 +"access_idea_category_system","idea.category system","model_idea_category","base.group_system",1,1,1,1 diff --git a/addons/project/security/project_security.xml b/addons/project/security/project_security.xml index 2fee59e9ad0..dd859f0f882 100644 --- a/addons/project/security/project_security.xml +++ b/addons/project/security/project_security.xml @@ -12,5 +12,12 @@ Project / User + + + + + + + From 587983e6b762bc4dac069dc4e5ff1c1c7b7b118e Mon Sep 17 00:00:00 2001 From: apa-tiny Date: Fri, 24 Oct 2008 15:41:05 +0530 Subject: [PATCH 3/6] No, If I display all accounts, it should shows all accounts, no matter is there is entries or not Fiscal year: always modifiable check with l10n_be bzr revid: patelamit2003@gmail.com-20081024101105-6ipq8n108k531qg4 --- addons/account/report/general_ledger.py | 49 ++++++++++--------- .../report/general_ledger_landscape.py | 9 ++-- .../wizard/wizard_account_balance_report.py | 12 +---- .../wizard/wizard_general_ledger_report.py | 15 +----- 4 files changed, 35 insertions(+), 50 deletions(-) diff --git a/addons/account/report/general_ledger.py b/addons/account/report/general_ledger.py index c27f3fcee24..e00a594f95f 100755 --- a/addons/account/report/general_ledger.py +++ b/addons/account/report/general_ledger.py @@ -167,31 +167,34 @@ class general_ledger(rml_parse.rml_parse): ## We will now compute solde initiaux - for move in res: - - SOLDEINIT = "SELECT sum(l.debit) AS sum_debit, sum(l.credit) AS sum_credit FROM account_move_line l WHERE l.account_id = " + str(move.id) + " AND l.date <= '" + self.borne_date['max_date'] + "'" + " AND l.date >= '" + self.borne_date['min_date'] + "'" - self.cr.execute(SOLDEINIT) - resultat = self.cr.dictfetchall() - - if resultat[0] : + if not len(res): + return[account] + else: + for move in res: - if resultat[0]['sum_debit'] == None: - sum_debit = 0 - else: - - sum_debit = resultat[0]['sum_debit'] - if resultat[0]['sum_credit'] == None: - sum_credit = 0 - else: - sum_credit = resultat[0]['sum_credit'] - - move.init_credit = sum_credit - move.init_debit = sum_debit + SOLDEINIT = "SELECT sum(l.debit) AS sum_debit, sum(l.credit) AS sum_credit FROM account_move_line l WHERE l.account_id = " + str(move.id) + " AND l.date <= '" + self.borne_date['max_date'] + "'" + " AND l.date >= '" + self.borne_date['min_date'] + "'" + self.cr.execute(SOLDEINIT) + resultat = self.cr.dictfetchall() - else: - move.init_credit = 0 - move.init_debit = 0 - + if resultat[0] : + + if resultat[0]['sum_debit'] == None: + sum_debit = 0 + else: + + sum_debit = resultat[0]['sum_debit'] + if resultat[0]['sum_credit'] == None: + sum_credit = 0 + else: + sum_credit = resultat[0]['sum_credit'] + + move.init_credit = sum_credit + move.init_debit = sum_debit + + else: + move.init_credit = 0 + move.init_debit = 0 + ## return res diff --git a/addons/account/report/general_ledger_landscape.py b/addons/account/report/general_ledger_landscape.py index 3410d1ffc11..762e7035f61 100755 --- a/addons/account/report/general_ledger_landscape.py +++ b/addons/account/report/general_ledger_landscape.py @@ -179,7 +179,7 @@ class general_ledger_landscape(rml_parse.rml_parse): def get_children_accounts(self, account, form): - + print"account",account self.child_ids = self.pool.get('account.account').search(self.cr, self.uid, [('parent_id', 'child_of', self.ids)]) # @@ -223,7 +223,10 @@ class general_ledger_landscape(rml_parse.rml_parse): context=ctx)) <> 0 : res.append(child_account) ## - if form['soldeinit']: + if not len(res): + print"===================" + return [account] + else: ## We will now compute solde initiaux for move in res: SOLDEINIT = "SELECT sum(l.debit) AS sum_debit, sum(l.credit) AS sum_credit FROM account_move_line l WHERE l.account_id = " + str(move.id) + " AND l.date < '" + self.borne_date['max_date'] + "'" + " AND l.date > '" + self.borne_date['min_date'] + "'" @@ -246,7 +249,7 @@ class general_ledger_landscape(rml_parse.rml_parse): move.init_credit = 0 move.init_debit = 0 - ## + print"res",res return res def lines(self, account, form): diff --git a/addons/account/wizard/wizard_account_balance_report.py b/addons/account/wizard/wizard_account_balance_report.py index af23f0581ca..8e3b2a142c9 100644 --- a/addons/account/wizard/wizard_account_balance_report.py +++ b/addons/account/wizard/wizard_account_balance_report.py @@ -35,7 +35,7 @@ period_form = ''' - +