From 6f9879c7ee5d6362afbc4e36e7b8f581f5e455cc Mon Sep 17 00:00:00 2001 From: Xavier ALT Date: Mon, 20 Oct 2008 19:30:41 +0200 Subject: [PATCH 001/211] Fixes for packaging - Add 'import int_to_text' so py2exe detect and copy it. - setup.py: Add dependencies to `asyncore', `asynchat' (addon `document') - setup.py: Add `import_xml.rng' in data files (crash on DB creation) bzr revid: x.alt@ajm.lu-20081020173041-bh5m3z4ljgcr8i4o --- bin/report/__init__.py | 1 + setup.py | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/bin/report/__init__.py b/bin/report/__init__.py index adbe1d7ee74..347e8670433 100644 --- a/bin/report/__init__.py +++ b/bin/report/__init__.py @@ -34,6 +34,7 @@ import print_fnc import custom import render import pychart +import int_to_text import report_sxw diff --git a/setup.py b/setup.py index 0000ae6c152..164d834a1e2 100644 --- a/setup.py +++ b/setup.py @@ -86,6 +86,8 @@ def find_addons(): def data_files(): '''Build list of data files to be installed''' + + print "Here" files = [] if os.name == 'nt': os.chdir('bin') @@ -138,6 +140,7 @@ def data_files(): glob.glob(opj(add_path, 'report', '*sxw')) + glob.glob(opj(add_path, 'report', '*xsl')))] files.extend(pathfiles) + files.append(('.', [('bin/import_xml.rng')])) return files check_modules() @@ -158,7 +161,7 @@ options = {"py2exe": { "packages": ["lxml", "lxml.builder", "lxml._elementpath", "lxml.etree", "lxml.objectify", "decimal", "xml", "xml.dom", "xml.xpath", "encodings","mx.DateTime","wizard","pychart","PIL", "pyparsing", - "pydot"], + "pydot","asyncore","asynchat"], "excludes" : ["Tkconstants","Tkinter","tcl"], }} From bee4463a819de4161d8536a1630a5c6e3374a9b8 Mon Sep 17 00:00:00 2001 From: Xavier ALT Date: Mon, 20 Oct 2008 20:45:50 +0200 Subject: [PATCH 002/211] Win32 compatibility fix for `document' addon * use os.stat_result(r) instead of posix.stat_result(r) bzr revid: x.alt@ajm.lu-20081020184550-vl2wagunsor236eb --- addons/document/ftpserver/abstracted_fs.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/document/ftpserver/abstracted_fs.py b/addons/document/ftpserver/abstracted_fs.py index 2ff2bdbb41c..bcd271ddeb3 100644 --- a/addons/document/ftpserver/abstracted_fs.py +++ b/addons/document/ftpserver/abstracted_fs.py @@ -9,7 +9,7 @@ import fnmatch import pooler import netsvc -import posix +import os from service import security class abstracted_fs: @@ -491,7 +491,7 @@ class abstracted_fs: r[7] = self.getmtime(node) r[8] = self.getmtime(node) r[9] = self.getmtime(node) - return posix.stat_result(r) + return os.stat_result(r) lstat = stat # --- Wrapper methods around os.path.* From afd3cd6b6338b1c8c3029d930110d5630b7da9c1 Mon Sep 17 00:00:00 2001 From: Xavier ALT Date: Mon, 20 Oct 2008 21:45:35 +0200 Subject: [PATCH 003/211] Remove print statment bzr revid: x.alt@ajm.lu-20081020194535-y7o7kuh0bxoj6am3 --- setup.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/setup.py b/setup.py index 164d834a1e2..f4385cb05e0 100644 --- a/setup.py +++ b/setup.py @@ -86,8 +86,6 @@ def find_addons(): def data_files(): '''Build list of data files to be installed''' - - print "Here" files = [] if os.name == 'nt': os.chdir('bin') From 17ac0408cd3c9dc2d14e76642e82e1fea4df907f Mon Sep 17 00:00:00 2001 From: Priyesh Date: Wed, 22 Oct 2008 19:05:41 +0530 Subject: [PATCH 004/211] process files bzr revid: solanki.priyesh@gmail.com-20081022133541-0nyssffgvka9pco3 --- addons/.project | 17 +++ addons/crm_configuration/__terp__.py | 4 +- .../process/crm_configuration_process.xml | 113 ++++++++++++++++++ addons/document/__terp__.py | 3 +- addons/document/process/document_process.xml | 25 ++++ addons/hr/__terp__.py | 3 +- addons/hr/process/hr_process.xml | 84 +++++++++++++ addons/hr_holidays/__terp__.py | 2 +- .../process/hr_holidays_process.xml | 45 +++++++ addons/hr_timesheet_project/__terp__.py | 2 +- addons/sale_crm/__terp__.py | 6 +- addons/sale_crm/process/sale_crm_process.xml | 26 ++++ 12 files changed, 322 insertions(+), 8 deletions(-) create mode 100644 addons/.project create mode 100644 addons/crm_configuration/process/crm_configuration_process.xml create mode 100644 addons/document/process/document_process.xml create mode 100644 addons/hr/process/hr_process.xml create mode 100644 addons/hr_holidays/process/hr_holidays_process.xml create mode 100644 addons/sale_crm/process/sale_crm_process.xml diff --git a/addons/.project b/addons/.project new file mode 100644 index 00000000000..8fc3cc934ff --- /dev/null +++ b/addons/.project @@ -0,0 +1,17 @@ + + + pso-newaddons + + + + + + org.python.pydev.PyDevBuilder + + + + + + org.python.pydev.pythonNature + + diff --git a/addons/crm_configuration/__terp__.py b/addons/crm_configuration/__terp__.py index 1e5653dba61..0f6ccf2cabf 100644 --- a/addons/crm_configuration/__terp__.py +++ b/addons/crm_configuration/__terp__.py @@ -9,7 +9,7 @@ people to intelligently and efficiently manage tasks, issues, and requests. It manages key tasks such as communication, identification, prioritization, assignment, resolution and notification.""", - "depends" : ["crm","report_crm", "process"], + "depends" : ["crm","report_crm", "process", "account"], "init_xml" : [ "crm_config_view.xml", "crm_bugs_view.xml", @@ -40,7 +40,7 @@ "crm_helpdesk_menu.xml", "crm_lead_menu.xml", "crm_meeting_menu.xml", "security/ir.model.access.csv", -# "process/crm_configuration_process.xml", + "process/crm_configuration_process.xml", ], "active": False, "installable": True diff --git a/addons/crm_configuration/process/crm_configuration_process.xml b/addons/crm_configuration/process/crm_configuration_process.xml new file mode 100644 index 00000000000..b7fa5202017 --- /dev/null +++ b/addons/crm_configuration/process/crm_configuration_process.xml @@ -0,0 +1,113 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/addons/document/__terp__.py b/addons/document/__terp__.py index 94abf642361..aafdbebdb1a 100644 --- a/addons/document/__terp__.py +++ b/addons/document/__terp__.py @@ -12,12 +12,13 @@ * User Authentification * Document Indexation """, - "depends" : ["base", "process"], + "depends" : ["base", "process", "hr"], "init_xml" : ["document_data.xml"], "update_xml" : [ "document_view.xml", "security/document_security.xml", "security/ir.model.access.csv", + "process/document_process.xml" ], "demo_xml" : ["document_demo.xml"], "active": False, diff --git a/addons/document/process/document_process.xml b/addons/document/process/document_process.xml new file mode 100644 index 00000000000..3c37c793ab4 --- /dev/null +++ b/addons/document/process/document_process.xml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/addons/hr/__terp__.py b/addons/hr/__terp__.py index 7da1af96772..1e5c9ff7e12 100644 --- a/addons/hr/__terp__.py +++ b/addons/hr/__terp__.py @@ -40,7 +40,7 @@ Different reports are also provided, mainly for attendance statistics. """, - "depends" : ["base", "process"], + "depends" : ["base", "crm_configuration", "process"], "init_xml" : [], "demo_xml" : [ "hr_demo.xml", @@ -52,6 +52,7 @@ "hr_view.xml", "hr_wizard.xml", "hr_department_view.xml", + "process/hr_process.xml" ], "active": False, "installable": True diff --git a/addons/hr/process/hr_process.xml b/addons/hr/process/hr_process.xml new file mode 100644 index 00000000000..bfb0ad21f2a --- /dev/null +++ b/addons/hr/process/hr_process.xml @@ -0,0 +1,84 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/addons/hr_holidays/__terp__.py b/addons/hr_holidays/__terp__.py index 6f3188d6acf..982b5624c19 100644 --- a/addons/hr_holidays/__terp__.py +++ b/addons/hr_holidays/__terp__.py @@ -32,7 +32,7 @@ "hr_view.xml", "hr_holidays_report.xml", "hr_holidays_wizard.xml", -# "process/hr_holidays_process.xml" + "process/hr_holidays_process.xml" ], # "demo_xml" : ["hr_bel_holidays_2008.xml",], "demo_xml" : [], diff --git a/addons/hr_holidays/process/hr_holidays_process.xml b/addons/hr_holidays/process/hr_holidays_process.xml new file mode 100644 index 00000000000..4cbddc9c423 --- /dev/null +++ b/addons/hr_holidays/process/hr_holidays_process.xml @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/addons/hr_timesheet_project/__terp__.py b/addons/hr_timesheet_project/__terp__.py index 0e41dbc8420..e3c24de5ea0 100644 --- a/addons/hr_timesheet_project/__terp__.py +++ b/addons/hr_timesheet_project/__terp__.py @@ -35,7 +35,7 @@ "website" : "http://tinyerp.com/module_hr.html", "depends" : ["project", "hr_timesheet_sheet"], "update_xml" : ["hr_timesheet_project_view.xml", -# "process/hr_timesheet_project_process.xml", + "process/hr_timesheet_project_process.xml", ], "active": False, "installable": True diff --git a/addons/sale_crm/__terp__.py b/addons/sale_crm/__terp__.py index abb4374837d..c66bd1f2e6e 100644 --- a/addons/sale_crm/__terp__.py +++ b/addons/sale_crm/__terp__.py @@ -4,7 +4,7 @@ "version" : "1.0", "author" : "Tiny", "website" : "http://tinyerp.com/module_sale.html", - "depends" : ["sale", "crm", "product", "account"], + "depends" : ["sale", "crm_configuration", "product", "account"], "category" : "Generic Modules/Sales & Purchases", "description": """ This module adds a shortcut on one or several cases in the CRM. @@ -18,7 +18,9 @@ """, "init_xml" : [], "demo_xml" : [], - "update_xml" : ["sale_crm_wizard.xml"], + "update_xml" : ["sale_crm_wizard.xml", + "process/sale_crm_process.xml" + ], "active": False, "installable": True } diff --git a/addons/sale_crm/process/sale_crm_process.xml b/addons/sale_crm/process/sale_crm_process.xml new file mode 100644 index 00000000000..6aaa146b250 --- /dev/null +++ b/addons/sale_crm/process/sale_crm_process.xml @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file From 587983e6b762bc4dac069dc4e5ff1c1c7b7b118e Mon Sep 17 00:00:00 2001 From: apa-tiny Date: Fri, 24 Oct 2008 15:41:05 +0530 Subject: [PATCH 006/211] 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 = ''' - +