From 6f9879c7ee5d6362afbc4e36e7b8f581f5e455cc Mon Sep 17 00:00:00 2001 From: Xavier ALT Date: Mon, 20 Oct 2008 19:30:41 +0200 Subject: [PATCH 001/229] 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/229] 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/229] 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/229] 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 d8ea3c99d9bb33606c24b943e5df6bdd0f7f84b5 Mon Sep 17 00:00:00 2001 From: "hda@tinyerp.com" <> Date: Fri, 24 Oct 2008 16:11:31 +0530 Subject: [PATCH 006/229] Added fearutes tab in module bzr revid: hda@tinyerp.com-20081024104131-zirn6p2mu806a1o6 --- bin/addons/base/module/module.py | 63 ++++++++++++++++++++++++++ bin/addons/base/module/module_view.xml | 33 +++++++++----- 2 files changed, 85 insertions(+), 11 deletions(-) diff --git a/bin/addons/base/module/module.py b/bin/addons/base/module/module.py index 836a6a3ed7d..ff821818144 100644 --- a/bin/addons/base/module/module.py +++ b/bin/addons/base/module/module.py @@ -219,6 +219,65 @@ class module(osv.osv): res[m.id] = '' return res + def _get_menus(self, cr, uid, ids, field_name=None, arg=None, context={}): + res = {} + model_data_obj = self.pool.get('ir.model.data') + menu_obj = self.pool.get('ir.ui.menu') + for m in self.browse(cr, uid, ids): + if m.state == 'installed': + menu_txt = '' + menus_id = model_data_obj.search(cr,uid,[('module','=',m.name),('model','=','ir.ui.menu')]) + for data_id in model_data_obj.browse(cr,uid,menus_id): + menu_txt += menu_obj.browse(cr,uid,data_id.res_id).complete_name + '\n' + res[m.id] = menu_txt + else: + res[m.id] = '' + return res + + def _get_reports(self, cr, uid, ids, field_name=None, arg=None, context={}): + res = {} + model_data_obj = self.pool.get('ir.model.data') + report_obj = self.pool.get('ir.actions.report.xml') + for m in self.browse(cr, uid, ids): + if m.state == 'installed': + report_txt = '' + report_id = model_data_obj.search(cr,uid,[('module','=',m.name),('model','=','ir.actions.report.xml')]) + for data_id in model_data_obj.browse(cr,uid,report_id): + report_txt += report_obj.browse(cr,uid,data_id.res_id).name + '\n' + res[m.id] = report_txt + else: + res[m.id] = '' + return res + + def _get_views(self, cr, uid, ids, field_name=None, arg=None, context={}): + res = {} + model_data_obj = self.pool.get('ir.model.data') + view_obj = self.pool.get('ir.ui.view') + for m in self.browse(cr, uid, ids): + if m.state == 'installed': + view_txt = '' + view_id = model_data_obj.search(cr,uid,[('module','=',m.name),('model','=','ir.ui.view')]) + for data_id in model_data_obj.browse(cr,uid,view_id): + view_txt += view_obj.browse(cr,uid,data_id.res_id).name + '\n' + res[m.id] = view_txt + else: + res[m.id] = '' + return res + + def _get_objects(self, cr, uid, ids, field_name=None, arg=None, context={}): + res = {} + model_data_obj=self.pool.get('ir.model.data') + for m in self.browse(cr, uid, ids): + if m.state=='installed': + cr.execute('''select distinct model from ir_model_data where module = '%s' '''%(m.name)) + objects = cr.fetchall() + obj_lst=map(lambda x:x[0],objects) + res[m.id] = '\n'.join(obj_lst) + else: + res[m.id] = '' + return res + + _columns = { 'name': fields.char("Name", size=128, readonly=True, required=True), 'category_id': fields.many2one('ir.module.category', 'Category', readonly=True), @@ -245,6 +304,10 @@ class module(osv.osv): 'license': fields.selection([('GPL-2', 'GPL-2'),('GPL-3', 'GPL-3'), ('Other proprietary', 'Other proprietary')], string='License', readonly=True), + 'menus_by_module': fields.function(_get_menus, method=True, string='Menus', type='text'), + 'reports_by_module': fields.function(_get_reports, method=True, string='Reports', type='text'), + 'views_by_module': fields.function(_get_views, method=True, string='Views', type='text'), + 'objects_by_module': fields.function(_get_objects, method=True, string='Objects', type='text'), } _defaults = { diff --git a/bin/addons/base/module/module_view.xml b/bin/addons/base/module/module_view.xml index dfec0514bd7..38e4da4f9aa 100644 --- a/bin/addons/base/module/module_view.xml +++ b/bin/addons/base/module/module_view.xml @@ -1,9 +1,9 @@ - + - + ir.module.category.form ir.module.category @@ -16,7 +16,7 @@ - + ir.module.category.tree ir.module.category @@ -36,9 +36,9 @@ [('parent_id','=',False)] - + - + Modules ir.module.module @@ -53,10 +53,10 @@ - - + + - + ir.module.module.form ir.module.module @@ -95,6 +95,17 @@ + + + + + + + + + + + @@ -123,7 +134,7 @@ - + Installed modules ir.module.module @@ -148,7 +159,7 @@ [('state','in', ['to upgrade', 'to remove', 'to install'])] - + ir.module.repository.form ir.module.repository @@ -183,7 +194,7 @@ tree,form {'active_test': False} - + From 4c8838b8ff1995002e5edc1cf71121cfbe916b8b Mon Sep 17 00:00:00 2001 From: Mantavya Gajjar Date: Fri, 24 Oct 2008 17:27:48 +0530 Subject: [PATCH 007/229] 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 6b87952e2314ab44428cdda04eb17b0ead4c5e7d Mon Sep 17 00:00:00 2001 From: Fabien Pinckaers Date: Fri, 24 Oct 2008 16:47:33 +0200 Subject: [PATCH 008/229] bugfix bzr revid: fp@tinyerp.com-20081024144733-qxsdkum4c8arcb5a --- bin/addons/base/ir/ir.xml | 2 -- bin/addons/base/res/partner/partner_view.xml | 5 +++++ bin/addons/base/res/res_currency.py | 6 ++++-- bin/osv/orm.py | 3 +-- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/bin/addons/base/ir/ir.xml b/bin/addons/base/ir/ir.xml index f4130da55a4..aa45e0fcd6d 100644 --- a/bin/addons/base/ir/ir.xml +++ b/bin/addons/base/ir/ir.xml @@ -663,7 +663,6 @@ - @@ -742,7 +741,6 @@ - diff --git a/bin/addons/base/res/partner/partner_view.xml b/bin/addons/base/res/partner/partner_view.xml index f53362107cd..1146d019426 100644 --- a/bin/addons/base/res/partner/partner_view.xml +++ b/bin/addons/base/res/partner/partner_view.xml @@ -527,5 +527,10 @@ + + diff --git a/bin/addons/base/res/res_currency.py b/bin/addons/base/res/res_currency.py index 909d8b1785b..0eb1befb599 100644 --- a/bin/addons/base/res/res_currency.py +++ b/bin/addons/base/res/res_currency.py @@ -79,7 +79,7 @@ class res_currency(osv.osv): def is_zero(self, cr, uid, currency, amount): return abs(self.round(cr, uid, currency, amount)) < currency.rounding - def compute(self, cr, uid, from_currency_id, to_currency_id, from_amount, round=True, context={}, account=None): + def compute(self, cr, uid, from_currency_id, to_currency_id, from_amount, round=True, context={}, account=None, account_invert=False): if not from_currency_id: from_currency_id = to_currency_id xc=self.browse(cr, uid, [from_currency_id,to_currency_id], context=context) @@ -100,8 +100,10 @@ class res_currency(osv.osv): cr.execute('select sum(debit-credit),sum(amount_currency) from account_move_line l ' \ 'where l.currency_id=%d and l.account_id=%d and '+q, (account.currency_id.id,account.id,)) tot1,tot2 = cr.fetchone() - if tot2: + if tot2 and not account_invert: rate = float(tot1)/float(tot2) + elif tot1 and account_invert: + rate = float(tot2)/float(tot1) if to_currency_id==from_currency_id: if round: return self.round(cr, uid, to_currency, from_amount) diff --git a/bin/osv/orm.py b/bin/osv/orm.py index 56a97a285bc..5480dab817c 100644 --- a/bin/osv/orm.py +++ b/bin/osv/orm.py @@ -1542,6 +1542,7 @@ class orm(orm_template): def __init__(self, cr): super(orm, self).__init__(cr) + self._columns = self._columns.copy() f = filter(lambda a: isinstance(self._columns[a], fields.function) and self._columns[a].store, self._columns) if f: list_store = [] @@ -1587,8 +1588,6 @@ class orm(orm_template): 'translate': (field['translate']), #'select': int(field['select_level']) } - #if field['relation']: - # attrs['relation'] = field['relation'] if field['ttype'] == 'selection': self._columns[field['name']] = getattr(fields, field['ttype'])(eval(field['selection']), **attrs) elif field['ttype'] == 'many2one': From be2fe6fe1e93d1d5217b978798c8db8ac0075066 Mon Sep 17 00:00:00 2001 From: Christophe Simonis Date: Fri, 24 Oct 2008 17:07:43 +0200 Subject: [PATCH 009/229] fix bug with language update when upgrading a module + PEP8 bzr revid: christophe@tinyerp.com-20081024150743-4u8iolu21xhi0a2r --- bin/addons/base/module/module.py | 8 ++++---- .../module/wizard/wizard_module_upgrade.py | 19 ++++++------------- 2 files changed, 10 insertions(+), 17 deletions(-) diff --git a/bin/addons/base/module/module.py b/bin/addons/base/module/module.py index ff821818144..c581ee1620d 100644 --- a/bin/addons/base/module/module.py +++ b/bin/addons/base/module/module.py @@ -604,9 +604,9 @@ class module(osv.osv): if not filter_lang: pool = pooler.get_pool(cr.dbname) - lang_obj=pool.get('res.lang') - lang_ids=lang_obj.search(cr, uid, [('translatable', '=', True)]) - filter_lang= [lang.code for lang in lang_obj.browse(cr, uid, lang_ids)] + lang_obj = pool.get('res.lang') + lang_ids = lang_obj.search(cr, uid, [('translatable', '=', True)]) + filter_lang = [lang.code for lang in lang_obj.browse(cr, uid, lang_ids)] elif not isinstance(filter_lang, (list, tuple)): filter_lang = [filter_lang] @@ -617,7 +617,7 @@ class module(osv.osv): for lang in filter_lang: f = os.path.join(tools.config['addons_path'], mod.name, 'i18n', lang + '.po') if os.path.exists(f): - logger.notifyChannel("init", netsvc.LOG_INFO, 'addons %s: loading translation file for language %s' % (mod.name, lang)) + logger.notifyChannel("init", netsvc.LOG_INFO, 'addon %s: loading translation file for language %s' % (mod.name, lang)) tools.trans_load(cr.dbname, f, lang, verbose=False) module() diff --git a/bin/addons/base/module/wizard/wizard_module_upgrade.py b/bin/addons/base/module/wizard/wizard_module_upgrade.py index 15a0195b151..2839048a050 100644 --- a/bin/addons/base/module/wizard/wizard_module_upgrade.py +++ b/bin/addons/base/module/wizard/wizard_module_upgrade.py @@ -87,26 +87,19 @@ class wizard_info_get(wizard.interface): db, pool = pooler.get_db_and_pool(cr.dbname) cr = db.cursor() mod_obj = pool.get('ir.module.module') - ids = mod_obj.search(cr, uid, [ - ('state', 'in', ['to upgrade', 'to remove', 'to install'])]) - unmet_packages=[] + ids = mod_obj.search(cr, uid, [('state', 'in', ['to upgrade', 'to remove', 'to install'])]) + unmet_packages = [] mod_dep_obj = pool.get('ir.module.module.dependency') - for mod in mod_obj.browse(cr,uid,ids): - depends_mod_ids=mod_dep_obj.search(cr,uid,[('module_id','=',mod.id)]) - for dep_mod in mod_dep_obj.browse(cr,uid,depends_mod_ids): + for mod in mod_obj.browse(cr, uid, ids): + depends_mod_ids = mod_dep_obj.search(cr, uid, [('module_id', '=', mod.id)]) + for dep_mod in mod_dep_obj.browse(cr, uid, depends_mod_ids): if dep_mod.state in ('unknown','uninstalled'): unmet_packages.append(dep_mod.name) if len(unmet_packages): - raise wizard.except_wizard('Unmet dependency !','Following modules are uninstalled or unknown. \n\n'+'\n'.join(unmet_packages)) + raise wizard.except_wizard('Unmet dependency !', 'Following modules are uninstalled or unknown. \n\n'+'\n'.join(unmet_packages)) mod_obj.download(cr, uid, ids, context=context) cr.commit() db, pool = pooler.restart_pool(cr.dbname, update_module=True) - - # Update translations for all installed languages - cr = db.cursor() - modobj = pool.get('ir.module.module') - mids = modobj.search(cr, uid, [('state', '=', 'installed')]) - modobj.update_translations(cr, uid, mids, None) return {} def _config(self, cr, uid, data, context=None): From d5e50a5159409c248d00233708b75e932054fc6b Mon Sep 17 00:00:00 2001 From: Fabien Pinckaers Date: Sat, 25 Oct 2008 10:53:56 +0200 Subject: [PATCH 010/229] improvement bzr revid: fp@tinyerp.com-20081025085356-9ezz9r2qj6q52a3r --- bin/addons/base/module/module.py | 2 +- bin/osv/fields.py | 8 +++++++- bin/osv/orm.py | 1 + 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/bin/addons/base/module/module.py b/bin/addons/base/module/module.py index c581ee1620d..e3793a298d6 100644 --- a/bin/addons/base/module/module.py +++ b/bin/addons/base/module/module.py @@ -373,7 +373,7 @@ class module(osv.osv): m.state not in ('uninstalled','uninstallable','to remove')''', (module.name,)) res = cr.fetchall() if res: - raise orm.except_orm(_('Error'), _('The module you are trying to remove depends on installed modules :\n %s') % '\n'.join(map(lambda x: '\t%s: %s' % (x[0], x[1]), res))) + raise orm.except_orm(_('Error'), _('Some installed modules depends on the module you plan to desinstall :\n %s') % '\n'.join(map(lambda x: '\t%s: %s' % (x[0], x[1]), res))) self.write(cr, uid, ids, {'state': 'to remove'}) return True diff --git a/bin/osv/fields.py b/bin/osv/fields.py index 38f6f569bd9..e03f76b3541 100644 --- a/bin/osv/fields.py +++ b/bin/osv/fields.py @@ -124,6 +124,12 @@ class boolean(_column): _symbol_set = (_symbol_c, _symbol_f) +class integer_big(_column): + _type = 'integer_big' + _symbol_c = '%d' + _symbol_f = lambda x: int(x or 0) + _symbol_set = (_symbol_c, _symbol_f) + class integer(_column): _type = 'integer' _symbol_c = '%d' @@ -675,7 +681,7 @@ class related(function): where += " %s.%s %s '%%%s%%' and" % (obj_child._table, self._arg[i], context[0][1], context[0][2]) if field_detail[1] in ('date'): where += " %s.%s %s '%s' and" % (obj_child._table, self._arg[i], context[0][1], context[0][2]) - if field_detail[1] in ['integer', 'long', 'float']: + if field_detail[1] in ['integer', 'long', 'float','integer_big']: where += " %s.%s %s '%d' and" % (obj_child._table, self._arg[i], context[0][1], context[0][2]) query += where.rstrip('and') cr.execute(query) diff --git a/bin/osv/orm.py b/bin/osv/orm.py index 5480dab817c..f65c9183b20 100644 --- a/bin/osv/orm.py +++ b/bin/osv/orm.py @@ -244,6 +244,7 @@ def get_pg_type(f): type_dict = { fields.boolean: 'bool', fields.integer: 'int4', + fields.integer_big: 'int8', fields.text: 'text', fields.date: 'date', fields.time: 'time', From bb73b0aa2256a4f557c8a58d6c6490508b47ab11 Mon Sep 17 00:00:00 2001 From: Fabien Pinckaers Date: Sat, 25 Oct 2008 12:11:07 +0200 Subject: [PATCH 011/229] improve_view bzr revid: fp@tinyerp.com-20081025101107-0g1yshfqaxoiu5an --- addons/warning/warning.py | 18 ++++++------- addons/warning/warning_view.xml | 46 ++++++++++++++++++--------------- 2 files changed, 34 insertions(+), 30 deletions(-) diff --git a/addons/warning/warning.py b/addons/warning/warning.py index be2c3f74ca1..fb7a91de9ec 100644 --- a/addons/warning/warning.py +++ b/addons/warning/warning.py @@ -35,13 +35,13 @@ class res_partner(osv.osv): _inherit = 'res.partner' _columns = { 'sale_warn' : fields.boolean('Sale Order'), - 'sale_warn_msg' : fields.char('Message for Sale Order', size=64), + 'sale_warn_msg' : fields.text('Message for Sale Order'), 'purchase_warn' : fields.boolean('Purchase Order'), - 'purchase_warn_msg' : fields.char('Message for Purchase Order', size=64), + 'purchase_warn_msg' : fields.text('Message for Purchase Order'), 'picking_warn' : fields.boolean('Stock Picking'), - 'picking_warn_msg' : fields.char('Message for Stock Picking', size=64), + 'picking_warn_msg' : fields.text('Message for Stock Picking'), 'invoice_warn' : fields.boolean('Invoice'), - 'invoice_warn_msg' : fields.char('Message for Invoice', size=64), + 'invoice_warn_msg' : fields.text('Message for Invoice'), } res_partner() @@ -131,11 +131,11 @@ stock_picking() class product_product(osv.osv): _inherit = 'product.product' _columns = { - 'sale_line_warn' : fields.boolean('Sale Order Line'), - 'sale_line_warn_msg' : fields.char('Message for Sale Order Line', size=64), - 'purchase_line_warn' : fields.boolean('Purchase Order Line'), - 'purchase_line_warn_msg' : fields.char('Message for Purchase Order Line', size=64), - } + 'sale_line_warn' : fields.boolean('Sale Order Line'), + 'sale_line_warn_msg' : fields.text('Message for Sale Order Line'), + 'purchase_line_warn' : fields.boolean('Purchase Order Line'), + 'purchase_line_warn_msg' : fields.text('Message for Purchase Order Line'), + } product_product() class sale_order_line(osv.osv): diff --git a/addons/warning/warning_view.xml b/addons/warning/warning_view.xml index 769ddc8d5d2..2adba29c996 100644 --- a/addons/warning/warning_view.xml +++ b/addons/warning/warning_view.xml @@ -1,30 +1,32 @@ - + res.partner.warning.form.inherit res.partner form - - - - - - - - - - - - + + + + + + + + + + + + + + + - - + product.warning.form.inherit product.product @@ -32,15 +34,17 @@ - - - - - + + + + + + + - + From 6bb2d489bdddd913ddce6ca3117caf0835a9f65c Mon Sep 17 00:00:00 2001 From: apa-tiny Date: Mon, 27 Oct 2008 12:41:53 +0530 Subject: [PATCH 012/229] Add level in tax report bzr revid: patelamit2003@gmail.com-20081027071153-5r8yp0au66ifz2h4 --- addons/account/report/tax_report.rml | 57 ++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) diff --git a/addons/account/report/tax_report.rml b/addons/account/report/tax_report.rml index 3b34e3bb618..0c68e10e35b 100755 --- a/addons/account/report/tax_report.rml +++ b/addons/account/report/tax_report.rml @@ -102,6 +102,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -135,6 +159,39 @@ + + + + + + + + + Date: Mon, 27 Oct 2008 08:23:22 +0100 Subject: [PATCH 013/229] bugfix bzr revid: fp@tinyerp.com-20081027072322-p9w06dejvb1c83xq --- addons/stock/stock.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/addons/stock/stock.py b/addons/stock/stock.py index 5718c344e4d..3cc80113a17 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -612,6 +612,9 @@ class stock_picking(osv.osv): continue payment_term_id = False partner = picking.address_id and picking.address_id.partner_id + raise osv.except_osv(_('Error, no partner !'), + _('Please put a partner on the picking list if you want to generate invoice.')) + if type in ('out_invoice', 'out_refund'): account_id = partner.property_account_receivable.id if picking.sale_id and picking.sale_id.payment_term: From e80eb0dc6d790f3c0d1801eec6139aeac4010a43 Mon Sep 17 00:00:00 2001 From: Jay Vora Date: Mon, 27 Oct 2008 14:23:16 +0530 Subject: [PATCH 014/229] l10n_fr:Bugfixed for generating charts of accounts and added description for terp file. bzr revid: jvo@tinyerp.com-20081027085316-vs4n523johgxvxdj --- addons/account/account.py | 1 + addons/l10n_fr/__terp__.py | 12 ++++++++++++ addons/l10n_lu/__terp__.py | 6 +++--- 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/addons/account/account.py b/addons/account/account.py index 3f436373ef1..9a1b796ef5e 100644 --- a/addons/account/account.py +++ b/addons/account/account.py @@ -1939,6 +1939,7 @@ class wizard_multi_charts_accounts(osv.osv_memory): self.pool._init = True children_acc_template = obj_acc_template.search(cr, uid, [('parent_id','child_of',[obj_acc_root.id])]) + children_acc_template.sort() for account_template in obj_acc_template.browse(cr, uid, children_acc_template): tax_ids = [] for tax in account_template.tax_ids: diff --git a/addons/l10n_fr/__terp__.py b/addons/l10n_fr/__terp__.py index 0eeb3ba5eee..2e5fc8bd3bd 100644 --- a/addons/l10n_fr/__terp__.py +++ b/addons/l10n_fr/__terp__.py @@ -40,6 +40,18 @@ "category" : "Localisation/Account Charts", "website": "http://erp-libre.info", "depends" : ["base", "account", "account_chart", 'base_vat'], + "description": """ + This is the base module to manage the accounting chart for France in Tiny ERP. + + After Installing this module,The Configuration wizard for accounting is launched. + * We have the account templates which can be helpful to generate Charts of Accounts. + * On that particular wizard,You will be asked to pass the name of the company,the chart template to follow,the no. of digits to generate the code for your account and Bank account,currency to create Journals. + Thus,the pure copy of Chart Template is generated. + * This is the same wizard that runs from Financial Managament/Configuration/Financial Accounting/Financial Accounts/Generate Chart of Accounts from a Chart Template. + + * This module installs : + The Tax Code chart and taxes for French Accounting. + """, "init_xml" : [], "update_xml" : ["types.xml", "plan-99-03_societe.xml", "taxes.xml","fr_wizard.xml"], "demo_xml" : [], diff --git a/addons/l10n_lu/__terp__.py b/addons/l10n_lu/__terp__.py index 49761b3fdb5..7e0d9e89dbf 100644 --- a/addons/l10n_lu/__terp__.py +++ b/addons/l10n_lu/__terp__.py @@ -4,8 +4,8 @@ "author" : "Tiny", "website" : "http://openerp.com", "category" : "Localisation/Account Charts", - "description": """ -This module install: + "description": """ +This module installs: *the KLUWER Chart of Accounts, *the Tax Code Chart for Luxembourg @@ -21,4 +21,4 @@ This module install: "l10n_lu_report.xml", ], "installable": True -} +} From 28b4f314fd2404605ef3b7104198538aed75642e Mon Sep 17 00:00:00 2001 From: Fabien Pinckaers Date: Mon, 27 Oct 2008 10:23:52 +0100 Subject: [PATCH 015/229] push bzr revid: fp@tinyerp.com-20081027092352-949s0q4ewrs8vuej --- bin/osv/expression.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/osv/expression.py b/bin/osv/expression.py index 7397a82e88b..54abce1b22c 100644 --- a/bin/osv/expression.py +++ b/bin/osv/expression.py @@ -232,9 +232,9 @@ class expression(object): query = '(%s OR %s IS NULL)' % (query, left) else: params = [] - if (right == False or right is None) and operator == '=': + if (((right == False) and (type(right)==bool)) or (right is None)) and (operator == '='): query = '%s IS NULL' % left - elif (right == False or right is None) and operator in ['<>', '!=']: + elif (((right == False) and (type(right)==bool)) or right is None) and (operator in ['<>', '!=']): query = '%s IS NOT NULL' % left else: if left == 'id': From 0c8ae5b9c11eb0b5741d69037b66693c5be421a3 Mon Sep 17 00:00:00 2001 From: Jay Vora Date: Mon, 27 Oct 2008 14:55:49 +0530 Subject: [PATCH 016/229] Account_report:Added notification to select record to fit report page-width. bzr revid: jvo@tinyerp.com-20081027092549-g25sbbkoklda5f20 --- addons/account_report/wizard/wizard_print_indicators.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/addons/account_report/wizard/wizard_print_indicators.py b/addons/account_report/wizard/wizard_print_indicators.py index b781073ddf4..17252e8b3c8 100644 --- a/addons/account_report/wizard/wizard_print_indicators.py +++ b/addons/account_report/wizard/wizard_print_indicators.py @@ -61,6 +61,11 @@ def _load_base(self, cr, uid, data, context): next_fields['base_selection']['relation']='account.period' return data['form'] +def _check_len(self, cr, uid, data, context): + if len(data['form']['base_selection'][0][2])>12: + raise wizard.except_wizard('User Error!',"Please select maximum 12 records to fit the page-width.") + return data['form'] + class wizard_print_indicators(wizard.interface): states = { 'init': { @@ -72,7 +77,7 @@ class wizard_print_indicators(wizard.interface): 'result': {'type':'form', 'arch':next_form, 'fields':next_fields, 'state':[('end','Cancel'),('print','Print')]} }, 'print': { - 'actions':[], + 'actions':[_check_len], 'result' :{'type':'print','report':'print.indicators', 'state':'end'} } } From a2ed84fe237f0abcc2441150475e74440ba806e8 Mon Sep 17 00:00:00 2001 From: Fabien Pinckaers Date: Mon, 27 Oct 2008 10:27:57 +0100 Subject: [PATCH 017/229] bugfix_paid_invoices bzr revid: fp@tinyerp.com-20081027092757-u1cehp9yc9tpvhb4 --- 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 8e236c6879c..ed9a62703df 100644 --- a/addons/account/invoice.py +++ b/addons/account/invoice.py @@ -194,7 +194,7 @@ class account_invoice(osv.osv): 'journal_id': fields.many2one('account.journal', 'Journal', required=True,readonly=True, states={'draft':[('readonly',False)]}), 'company_id': fields.many2one('res.company', 'Company', required=True), 'check_total': fields.float('Total', digits=(16,2), states={'open':[('readonly',True)],'close':[('readonly',True)]}), - 'reconciled': fields.function(_reconciled, method=True, string='Paid/Reconciled', type='boolean', help="The account moves of the invoice have been reconciled with account moves of the payment(s)."), + 'reconciled': fields.function(_reconciled, method=True, string='Paid/Reconciled', type='boolean', store=True, help="The account moves of the invoice have been reconciled with account moves of the payment(s)."), 'partner_bank': fields.many2one('res.partner.bank', 'Bank Account', help='The bank account to pay to or to be paid from'), 'move_lines':fields.function(_get_lines , method=True,type='many2many' , relation='account.move.line',string='Move Lines'), From ae152b5186598b323d859774583342081483eabd Mon Sep 17 00:00:00 2001 From: Olivier Laurent Date: Mon, 27 Oct 2008 10:40:14 +0100 Subject: [PATCH 018/229] Bugfix: wrong reference bzr revid: olt@tinyerp.com-20081027094014-vfdwt6oy48s891o6 --- .../process/hr_timesheet_project_process.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/hr_timesheet_project/process/hr_timesheet_project_process.xml b/addons/hr_timesheet_project/process/hr_timesheet_project_process.xml index d514b14bf17..edcb92038d5 100644 --- a/addons/hr_timesheet_project/process/hr_timesheet_project_process.xml +++ b/addons/hr_timesheet_project/process/hr_timesheet_project_process.xml @@ -58,7 +58,7 @@ - + @@ -72,4 +72,4 @@ - \ No newline at end of file + From 632cb94c244f9e63cc76aea7309de4041583b0d8 Mon Sep 17 00:00:00 2001 From: Fabien Pinckaers Date: Mon, 27 Oct 2008 10:48:02 +0100 Subject: [PATCH 019/229] tooltip_analytic bzr revid: fp@tinyerp.com-20081027094802-xt9dt17h9m08yc3k --- .../account_analytic_analysis.py | 32 +++++++++---------- addons/project/project_view.xml | 5 ++- 2 files changed, 18 insertions(+), 19 deletions(-) diff --git a/addons/account_analytic_analysis/account_analytic_analysis.py b/addons/account_analytic_analysis/account_analytic_analysis.py index 15db30b6a4b..e460c2872b4 100644 --- a/addons/account_analytic_analysis/account_analytic_analysis.py +++ b/addons/account_analytic_analysis/account_analytic_analysis.py @@ -407,22 +407,22 @@ class account_analytic_account(osv.osv): return res _columns ={ - 'ca_invoiced': fields.function(_ca_invoiced_calc, method=True, type='float', string='Invoiced amount'), - 'total_cost': fields.function(_total_cost_calc, method=True, type='float', string='Total cost'), - 'ca_to_invoice': fields.function(_ca_to_invoice_calc, method=True, type='float', string='Uninvoiced amount'), - 'ca_theorical': fields.function(_ca_theorical_calc, method=True, type='float', string='Theorical revenue'), - 'hours_quantity': fields.function(_hours_quantity_calc, method=True, type='float', string='Hours tot'), - 'last_invoice_date': fields.function(_last_invoice_date_calc, method=True, type='date', string='Last invoice date'), - 'last_worked_invoiced_date': fields.function(_last_worked_invoiced_date_calc, method=True, type='date', string='Last invoiced worked date'), - 'last_worked_date': fields.function(_last_worked_date_calc, method=True, type='date', string='Last worked date'), - 'hours_qtt_non_invoiced': fields.function(_hours_qtt_non_invoiced_calc, method=True, type='float', string='Uninvoiced hours'), - 'hours_qtt_invoiced': fields.function(_hours_qtt_invoiced_calc, method=True, type='float', string='Invoiced hours'), - 'remaining_hours': fields.function(_remaining_hours_calc, method=True, type='float', string='Remaining hours'), - 'remaining_ca': fields.function(_remaining_ca_calc, method=True, type='float', string='Remaining revenue'), - 'revenue_per_hour': fields.function(_revenue_per_hour_calc, method=True, type='float', string='Revenue per hours (real)'), - 'real_margin': fields.function(_real_margin_calc, method=True, type='float', string='Real margin'), - 'theorical_margin': fields.function(_theorical_margin_calc, method=True, type='float', string='Theorical margin'), - 'real_margin_rate': fields.function(_real_margin_rate_calc, method=True, type='float', string='Real margin rate (%)'), + 'ca_invoiced': fields.function(_ca_invoiced_calc, method=True, type='float', string='Invoiced Amount', help="Total customer invoiced amount for this account."), + 'total_cost': fields.function(_total_cost_calc, method=True, type='float', string='Total Costs', help="Total of costs for this account. It includes real costs (from invoices) and indirect costs, like time spent on timesheets."), + 'ca_to_invoice': fields.function(_ca_to_invoice_calc, method=True, type='float', string='Uninvoiced Amount', help="If invoice from analytic account, the remaining amount you can invoice to the customer based on the total costs."), + 'ca_theorical': fields.function(_ca_theorical_calc, method=True, type='float', string='Theorical Revenue', help="Based on the costs you had on the project, what would have been the revenue of all these costs have been invoiced at the normal sale price provided by the pricelist."), + 'hours_quantity': fields.function(_hours_quantity_calc, method=True, type='float', string='Hours Tot', help="Number of hours on spent on the analytic account (from timesheet). It computes on all journal of type 'general'."), + 'last_invoice_date': fields.function(_last_invoice_date_calc, method=True, type='date', string='Last Invoice Date', help="Date of the last invoice created for this analytic account."), + 'last_worked_invoiced_date': fields.function(_last_worked_invoiced_date_calc, method=True, type='date', string='Last Invoiced Worked Date', help="If invoice from the costs, this is the date of the latest work or cost that have been invoiced."), + 'last_worked_date': fields.function(_last_worked_date_calc, method=True, type='date', string='Last Worked Date', help="Date of the latest work done on this account."), + 'hours_qtt_non_invoiced': fields.function(_hours_qtt_non_invoiced_calc, method=True, type='float', string='Uninvoiced Hours', help="Number of hours (from journal of type 'general') that can be invoiced if you invoice based on analytic account."), + 'hours_qtt_invoiced': fields.function(_hours_qtt_invoiced_calc, method=True, type='float', string='Invoiced Hours', help="Number of hours that already have invoiced. If you don't invoice based on costs, it's the number of hours spent. If you invoice based on hours, it's the hours that have been invoiced."), + 'remaining_hours': fields.function(_remaining_hours_calc, method=True, type='float', string='Remaining Hours', help="Computed using the forumla: Maximum Quantity - Hours Tot."), + 'remaining_ca': fields.function(_remaining_ca_calc, method=True, type='float', string='Remaining Revenue', help="If you invoice based on costs, this is the revenue you will invoice to the customer when you will launch the invoicing wizard."), + 'revenue_per_hour': fields.function(_revenue_per_hour_calc, method=True, type='float', string='Revenue per Hours (real)', help="Computed using the formula: Invoiced Amount / Hours Tot."), + 'real_margin': fields.function(_real_margin_calc, method=True, type='float', string='Real Margin', help="Computed using the formula: Invoiced Amount - Total Costs."), + 'theorical_margin': fields.function(_theorical_margin_calc, method=True, type='float', string='Theorical Margin', help="Computed using the formula: (Theorical Revenue / Total Costs) * 100."), + 'real_margin_rate': fields.function(_real_margin_rate_calc, method=True, type='float', string='Real Margin Rate (%)', help="Computes using the formula: (Invoiced Amount / Total Costs) * 100."), 'month_ids': fields.function(_month, method=True, type='many2many', relation='account_analytic_analysis.summary.month', string='Month'), 'user_ids': fields.function(_user, method=True, type="many2many", relation='account_analytic_analysis.summary.user', string='User'), } diff --git a/addons/project/project_view.xml b/addons/project/project_view.xml index 12f9a17491f..e25836c21c9 100644 --- a/addons/project/project_view.xml +++ b/addons/project/project_view.xml @@ -119,14 +119,13 @@ - Template projects + Template of Projects project.project form [('state','=','template')] - - + New Project From 2a3886ad8db740696f4188264a37d07fa1862404 Mon Sep 17 00:00:00 2001 From: Fabien Pinckaers Date: Mon, 27 Oct 2008 10:59:15 +0100 Subject: [PATCH 020/229] bugfix bzr revid: fp@tinyerp.com-20081027095915-09h3vgie0as5pqn6 --- .../account_analytic_analysis_view.xml | 2 +- addons/project/project_view.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/account_analytic_analysis/account_analytic_analysis_view.xml b/addons/account_analytic_analysis/account_analytic_analysis_view.xml index fb4a3d774d2..748b4b53201 100644 --- a/addons/account_analytic_analysis/account_analytic_analysis_view.xml +++ b/addons/account_analytic_analysis/account_analytic_analysis_view.xml @@ -46,7 +46,7 @@ - + diff --git a/addons/project/project_view.xml b/addons/project/project_view.xml index e25836c21c9..edbabad208d 100644 --- a/addons/project/project_view.xml +++ b/addons/project/project_view.xml @@ -125,7 +125,7 @@ [('state','=','template')] - + New Project From b53ac077ce17b1b9000378292c3761f20a418ec7 Mon Sep 17 00:00:00 2001 From: Fabien Pinckaers Date: Mon, 27 Oct 2008 11:03:15 +0100 Subject: [PATCH 021/229] bugfix bzr revid: fp@tinyerp.com-20081027100315-ci2dsyssngiy2k0z --- .../account_analytic_analysis_menu.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/addons/account_analytic_analysis/account_analytic_analysis_menu.xml b/addons/account_analytic_analysis/account_analytic_analysis_menu.xml index 77eedf9f8f6..fc953b9d74c 100644 --- a/addons/account_analytic_analysis/account_analytic_analysis_menu.xml +++ b/addons/account_analytic_analysis/account_analytic_analysis_menu.xml @@ -74,7 +74,7 @@ [('state','=','draft')] - + Open Analytic Accounts @@ -85,7 +85,7 @@ [('state','=','open')] - + Pending Analytic Accounts @@ -96,7 +96,7 @@ [('state','=','pending')] - + Simplified View Analytic Accounts @@ -107,7 +107,7 @@ [] - + From 9208606745c8df2459fa1cfe162f85889e812be0 Mon Sep 17 00:00:00 2001 From: Fabien Pinckaers Date: Mon, 27 Oct 2008 11:05:33 +0100 Subject: [PATCH 022/229] improve bzr revid: fp@tinyerp.com-20081027100533-226gf1gbj1hpnif2 --- addons/project/project_demo.xml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/addons/project/project_demo.xml b/addons/project/project_demo.xml index e95faefc384..876534f61e8 100644 --- a/addons/project/project_demo.xml +++ b/addons/project/project_demo.xml @@ -6,6 +6,19 @@ Resource: project.project --> + + Analysis + + + New Feature + + + Quotation + + + Bug + + 1 Tiny ERP Integration @@ -37,6 +50,7 @@ 38.0 38.0 + BoM, After sales returns, interventions. Tracability. @@ -45,6 +59,7 @@ 16.0 16.0 + Data importation + Doc @@ -52,6 +67,7 @@ 16.0 16.0 + Modifications asked by the customer. @@ -59,6 +75,7 @@ 16.0 16.0 + 0 @@ -68,6 +85,7 @@ 15 8.0 8.0 + Internal testing + Software Install @@ -77,6 +95,7 @@ 17 16.0 16.0 + 2 From f23aba092c962c953a81109261c92f0beea6f0fd Mon Sep 17 00:00:00 2001 From: Fabien Pinckaers Date: Mon, 27 Oct 2008 11:07:33 +0100 Subject: [PATCH 023/229] improve bzr revid: fp@tinyerp.com-20081027100733-kr1jospf7yh5kta0 --- .../account_analytic_analysis_menu.xml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/addons/account_analytic_analysis/account_analytic_analysis_menu.xml b/addons/account_analytic_analysis/account_analytic_analysis_menu.xml index fc953b9d74c..a6e5e9ce3f3 100644 --- a/addons/account_analytic_analysis/account_analytic_analysis_menu.xml +++ b/addons/account_analytic_analysis/account_analytic_analysis_menu.xml @@ -45,13 +45,12 @@ - Overpassed accounts + Overpassed Accounts account.analytic.account form tree,form,graph [('date','<=',time.strftime('%Y-%m-%d')),('state','=','open')] - From dd568bc5da924b874631e4591b0dc7efd0b81f0a Mon Sep 17 00:00:00 2001 From: Olivier Laurent Date: Mon, 27 Oct 2008 11:10:04 +0100 Subject: [PATCH 024/229] French translation: 'CRM' -> 'CRM' (instead of GRC) 'SRM' -> 'SRM' (instead of GRM) bzr revid: olt@tinyerp.com-20081027101004-bs3vk73i69l1ljqi --- addons/crm/i18n/fr_FR.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/crm/i18n/fr_FR.po b/addons/crm/i18n/fr_FR.po index be36fca66ff..efb9ced9d26 100644 --- a/addons/crm/i18n/fr_FR.po +++ b/addons/crm/i18n/fr_FR.po @@ -90,7 +90,7 @@ msgstr "E-mails en copie" #. module: crm #: model:ir.ui.menu,name:crm.menu_crm msgid "CRM & SRM" -msgstr "GRC & GRF" +msgstr "CRM & SRM" #. module: crm #: view:crm.segmentation:0 From 2a2108247744a276b812432bedb4530f023634e2 Mon Sep 17 00:00:00 2001 From: Fabien Pinckaers Date: Mon, 27 Oct 2008 11:20:25 +0100 Subject: [PATCH 025/229] improve_translation_view bzr revid: fp@tinyerp.com-20081027102025-7h2onj6b4brlok21 --- bin/addons/base/module/wizard/wizard_module_lang_install.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/addons/base/module/wizard/wizard_module_lang_install.py b/bin/addons/base/module/wizard/wizard_module_lang_install.py index 2ebe243b705..ef9c0c0b43c 100644 --- a/bin/addons/base/module/wizard/wizard_module_lang_install.py +++ b/bin/addons/base/module/wizard/wizard_module_lang_install.py @@ -47,7 +47,7 @@ view_form = """ """ From b45035985942fabc2c36f11713f2b0d26582a9ef Mon Sep 17 00:00:00 2001 From: Sofia Date: Mon, 27 Oct 2008 16:00:00 +0530 Subject: [PATCH 026/229] - Menus in calendar view by default for meetings - Changes in form views - Arrange the menus as per Invoice menu - Add graph view for opportunity and jobs requests bzr revid: sahibsofia@gmail.com-20081027103000-wf6ez55l95043c0l --- addons/crm_configuration/crm_bugs_menu.xml | 46 +- addons/crm_configuration/crm_bugs_view.xml | 62 +-- addons/crm_configuration/crm_config_view.xml | 14 + addons/crm_configuration/crm_fund_menu.xml | 81 ++-- addons/crm_configuration/crm_fund_view.xml | 19 +- .../crm_configuration/crm_helpdesk_menu.xml | 76 +-- addons/crm_configuration/crm_jobs_menu.xml | 447 +++++++++++------- addons/crm_configuration/crm_jobs_view.xml | 17 +- addons/crm_configuration/crm_lead_demo.xml | 2 +- addons/crm_configuration/crm_lead_menu.xml | 45 +- addons/crm_configuration/crm_lead_view.xml | 12 +- addons/crm_configuration/crm_meeting_demo.xml | 2 +- addons/crm_configuration/crm_meeting_menu.xml | 151 +++--- .../crm_opportunity_data.xml | 2 +- .../crm_opportunity_demo.xml | 7 +- .../crm_opportunity_menu.xml | 102 ++-- .../crm_opportunity_view.xml | 19 +- 17 files changed, 642 insertions(+), 462 deletions(-) diff --git a/addons/crm_configuration/crm_bugs_menu.xml b/addons/crm_configuration/crm_bugs_menu.xml index 4f24f096b47..e2caeb9818e 100644 --- a/addons/crm_configuration/crm_bugs_menu.xml +++ b/addons/crm_configuration/crm_bugs_menu.xml @@ -61,31 +61,9 @@ - + - - New Bug - crm.case - form - form,tree - - - - - - form - - - - - - tree - - - - - Bugs Waiting Approval crm.case @@ -341,6 +319,28 @@ + + New Bug + crm.case + form + form,tree + + + + + + form + + + + + + tree + + + + + My Open Bugs crm.case diff --git a/addons/crm_configuration/crm_bugs_view.xml b/addons/crm_configuration/crm_bugs_view.xml index 14e57133bad..4651825e0c9 100644 --- a/addons/crm_configuration/crm_bugs_view.xml +++ b/addons/crm_configuration/crm_bugs_view.xml @@ -14,43 +14,45 @@ form
+ + + + + + + - - - - - - - - - - - - - - + + + + + + + + + + + - - - - - - - - - - - - - - +
+ + + + + + + + + + + + + - -