diff --git a/addons/account/__terp__.py b/addons/account/__terp__.py index 40a4b2d1d5d..136731fbac6 100644 --- a/addons/account/__terp__.py +++ b/addons/account/__terp__.py @@ -59,7 +59,8 @@ "project/project_report.xml", "product_view.xml", "account_assert_test.xml", - "process/invoice_process.xml", + "process/customer_invoice_process.xml", + "process/supplier_invoice_process.xml", "process/statement_process.xml", ], "translations" : { diff --git a/addons/account/account_move_line.py b/addons/account/account_move_line.py index 66ba78871fd..feda9b9a1e0 100644 --- a/addons/account/account_move_line.py +++ b/addons/account/account_move_line.py @@ -104,6 +104,8 @@ class account_move_line(osv.osv): s = -total_new data['debit'] = s>0 and s or 0.0 data['credit'] = s<0 and -s or 0.0 + del(data['analytic_account_id']) + del(data['account_tax_id']) return data # Ends: Manual entry from account.move form diff --git a/addons/account/account_view.xml b/addons/account/account_view.xml index f84f5181342..e66115f1f57 100644 --- a/addons/account/account_view.xml +++ b/addons/account/account_view.xml @@ -247,10 +247,14 @@ form
- - - - + + + + + + + + @@ -853,6 +857,8 @@ + + diff --git a/addons/account/demo/account_minimal.xml b/addons/account/demo/account_minimal.xml index d36d10b374f..a8c8b75b88c 100644 --- a/addons/account/demo/account_minimal.xml +++ b/addons/account/demo/account_minimal.xml @@ -171,6 +171,18 @@ your own chart of account. + + x Sales Credit Note Journal + SCNJ + sale + True + + + + + + + x Expenses Journal EXJ @@ -181,6 +193,17 @@ your own chart of account. + + x Expenses Credit Notes Journal + ECNJ + purchase + True + + + + + + x Bank Journal @@ -192,6 +215,16 @@ your own chart of account. + + x Checks Journal + CHK + cash + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/addons/account/process/statement_process.xml b/addons/account/process/statement_process.xml index 3ee13ace8d5..89710174453 100644 --- a/addons/account/process/statement_process.xml +++ b/addons/account/process/statement_process.xml @@ -26,6 +26,17 @@ + + + + + + + + + + + @@ -43,47 +54,24 @@ - + - - - - - - - - - - - - + - + - - - - - - - - - - - - - - @@ -95,6 +83,15 @@ + + + + + + + + + @@ -110,28 +107,10 @@ - + - - - - - - - - - - - - - - - - - - @@ -141,9 +120,11 @@ - + + + diff --git a/addons/account/process/supplier_invoice_process.xml b/addons/account/process/supplier_invoice_process.xml new file mode 100644 index 00000000000..e43ee096ebc --- /dev/null +++ b/addons/account/process/supplier_invoice_process.xml @@ -0,0 +1,175 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/addons/base_contact/__terp__.py b/addons/base_contact/__terp__.py index b8a419e1ee9..581dfe8b26b 100644 --- a/addons/base_contact/__terp__.py +++ b/addons/base_contact/__terp__.py @@ -40,14 +40,15 @@ Pay attention that this module converts the existing addresses into "addresses + contacts". It means that some fields of the addresses will be missing (like the contact name), since these are supposed to be defined in an other object. """, - "depends" : ["base"], + "depends" : ["base", "process"], "init_xml" : [], "demo_xml" : [ "base_contact_demo.xml" ], "update_xml" : [ "security/ir.model.access.csv", - 'base_contact_view.xml' + 'base_contact_view.xml', + "process/base_contact_process.xml" ], "active": False, "installable": True diff --git a/addons/base_contact/process/base_contact_process.xml b/addons/base_contact/process/base_contact_process.xml new file mode 100644 index 00000000000..c446e91b104 --- /dev/null +++ b/addons/base_contact/process/base_contact_process.xml @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/addons/base_vat/partner.py b/addons/base_vat/partner.py index ffcd070cc6b..f0430807625 100644 --- a/addons/base_vat/partner.py +++ b/addons/base_vat/partner.py @@ -30,6 +30,9 @@ from osv import osv from osv import fields +def mult_add(i, j): + """Sum each digits of the multiplication of i and j.""" + return reduce(lambda x, y: x + int(y), str(i*j), 0) class res_partner(osv.osv): _inherit = 'res.partner' diff --git a/addons/crm_configuration/process/crm_configuration_process.xml b/addons/crm_configuration/process/crm_configuration_process.xml index 84155528f92..2218610390e 100644 --- a/addons/crm_configuration/process/crm_configuration_process.xml +++ b/addons/crm_configuration/process/crm_configuration_process.xml @@ -1,106 +1,132 @@ - - - - + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + \ No newline at end of file diff --git a/addons/custom/__init__.py b/addons/custom/__init__.py deleted file mode 100644 index 16559a79431..00000000000 --- a/addons/custom/__init__.py +++ /dev/null @@ -1,24 +0,0 @@ -# -*- encoding: utf-8 -*- -############################################################################## -# -# OpenERP, Open Source Management Solution -# Copyright (C) 2004-2008 Tiny SPRL (). All Rights Reserved -# $Id$ -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . -# -############################################################################## - -import crm_building - diff --git a/addons/custom/__terp__.py b/addons/custom/__terp__.py deleted file mode 100644 index cc6e3a187b2..00000000000 --- a/addons/custom/__terp__.py +++ /dev/null @@ -1,37 +0,0 @@ -# -*- encoding: utf-8 -*- -############################################################################## -# -# OpenERP, Open Source Management Solution -# Copyright (C) 2004-2008 Tiny SPRL (). All Rights Reserved -# $Id$ -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . -# -############################################################################## -{ - "name" : "CRM for House Building", - "version" : "1.0", - "author" : "Tiny", - "category" : "Generic Modules/Others", - "website": "http://www.tinyerp.com", - "description": "CRM", - "depends" : ["crm_configuration"], - "init_xml" : [], - "update_xml" : ["crm_build_view.xml"], - "active": False, - "installable": True -} - -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: - diff --git a/addons/document/ftpserver/__init__.py b/addons/document/ftpserver/__init__.py index 62c9191497d..f4b12525426 100644 --- a/addons/document/ftpserver/__init__.py +++ b/addons/document/ftpserver/__init__.py @@ -2,20 +2,30 @@ import threading import ftpserver import authorizer import abstracted_fs +import netsvc PORT = 8021 HOST = '' class ftp_server(threading.Thread): - def run(self): - autho = authorizer.authorizer() - ftpserver.FTPHandler.authorizer = autho - ftpserver.max_cons = 300 - ftpserver.max_cons_per_ip = 50 - ftpserver.FTPHandler.abstracted_fs = abstracted_fs.abstracted_fs - address = (HOST, PORT) - ftpd = ftpserver.FTPServer(address, ftpserver.FTPHandler) - ftpd.serve_forever() + def log(self, level, message): + logger = netsvc.Logger() + logger.notifyChannel('FTP', level, message) + + def run(self): + autho = authorizer.authorizer() + ftpserver.FTPHandler.authorizer = autho + ftpserver.max_cons = 300 + ftpserver.max_cons_per_ip = 50 + ftpserver.FTPHandler.abstracted_fs = abstracted_fs.abstracted_fs + + ftpserver.log = lambda msg: self.log(netsvc.LOG_INFO, msg) + ftpserver.logline = lambda msg: None + ftpserver.logerror = lambda msg: self.log(netsvc.LOG_ERROR, msg) + + address = (HOST, PORT) + ftpd = ftpserver.FTPServer(address, ftpserver.FTPHandler) + ftpd.serve_forever() ds = ftp_server() ds.start() diff --git a/addons/document/ftpserver/abstracted_fs.py b/addons/document/ftpserver/abstracted_fs.py index fe624da7de4..4c0183122b8 100644 --- a/addons/document/ftpserver/abstracted_fs.py +++ b/addons/document/ftpserver/abstracted_fs.py @@ -12,6 +12,10 @@ import netsvc import os from service import security +def log(message): + logger = netsvc.Logger() + logger.notifyChannel('DMS', netsvc.LOG_ERROR, message) + class file_wrapper(StringIO.StringIO): def __init__(self, sstr='', ressource_id=False, dbname=None, uid=1, name=''): StringIO.StringIO.__init__(self, sstr) @@ -68,15 +72,25 @@ class abstracted_fs: def db_list(self): s = netsvc.LocalService('db') result = s.list() - self.db_name_list=[] + self.db_name_list = [] for db_name in result: - db = pooler.get_db_only(db_name) - cr = db.cursor() - cr.execute("select id from ir_module_module where name like 'document%' and state='installed' ") - res=cr.fetchone() - if res and len(res): - self.db_name_list.append(db_name) - cr.close() + db, cr = None, None + try: + db = pooler.get_db_only(db_name) + cr = db.cursor() + cr.execute("SELECT 1 FROM pg_class WHERE relkind = 'r' AND relname = 'ir_module_module'") + if not cr.fetchone(): + continue + + cr.execute("select id from ir_module_module where name like 'document%' and state='installed' ") + res = cr.fetchone() + if res and len(res): + self.db_name_list.append(db_name) + finally: + if cr is not None: + cr.close() + if db is not None: + pooler.close_db(db_name) return self.db_name_list # Ok @@ -210,7 +224,7 @@ class abstracted_fs: s = file_wrapper('', cid, cr.dbname, uid, ) return s except Exception,e: - print e + log(e) raise OSError(1, 'Operation not permited.') # Ok @@ -305,7 +319,7 @@ class abstracted_fs: pool.get('document.directory').create(cr, uid, val) cr.commit() except Exception,e: - print e + log(e) raise OSError(1, 'Operation not permited.') @@ -344,7 +358,6 @@ class abstracted_fs: for db in self.db_list(): result.append(false_node(db)) return result - print path.children() return path.children() # Ok @@ -495,7 +508,7 @@ class abstracted_fs: else: raise OSError(1, 'Operation not permited.') except Exception,err: - print err + log(err) raise OSError(1,'Operation not permited.') diff --git a/addons/document/ftpserver/ftpserver.py b/addons/document/ftpserver/ftpserver.py index 814b6820d3c..f8af54fbb1a 100644 --- a/addons/document/ftpserver/ftpserver.py +++ b/addons/document/ftpserver/ftpserver.py @@ -1754,7 +1754,6 @@ class FTPHandler(asynchat.async_chat): - (file) file: the file[-like] object to send (if any). """ if self.data_channel: - print 'DATA', data self.respond("125 Data connection already open. Transfer starting.") if file: self.data_channel.file_obj = file @@ -2075,10 +2074,8 @@ class FTPHandler(asynchat.async_chat): self.fs.close_cr(data) data = '' if listing: - print listing listing.sort() data = '\r\n'.join(listing) + '\r\n' - print data self.log('OK NLST "%s". Transfer starting.' %line) self.push_dtp_data(data) diff --git a/addons/hr/process/hr_process.xml b/addons/hr/process/hr_process.xml index 1afb90f3020..5984ed7e924 100644 --- a/addons/hr/process/hr_process.xml +++ b/addons/hr/process/hr_process.xml @@ -17,9 +17,11 @@ --> + - + @@ -54,11 +56,20 @@ - + - + + + + + + + + + + @@ -76,7 +87,6 @@ - diff --git a/addons/hr_expense/__terp__.py b/addons/hr_expense/__terp__.py index 7787db5e235..1cb45d7cade 100644 --- a/addons/hr_expense/__terp__.py +++ b/addons/hr_expense/__terp__.py @@ -48,6 +48,7 @@ "hr_expense_workflow.xml", "hr_expense_view.xml", "hr_expense_report.xml", + "process/hr_expense_process.xml" ], "active": False, "installable": True diff --git a/addons/hr_expense/process/hr_expense_process.xml b/addons/hr_expense/process/hr_expense_process.xml new file mode 100644 index 00000000000..5a00f2dc646 --- /dev/null +++ b/addons/hr_expense/process/hr_expense_process.xml @@ -0,0 +1,187 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/addons/hr_holidays/process/hr_holidays_process.xml b/addons/hr_holidays/process/hr_holidays_process.xml index 4cbddc9c423..2cdb83885ab 100644 --- a/addons/hr_holidays/process/hr_holidays_process.xml +++ b/addons/hr_holidays/process/hr_holidays_process.xml @@ -2,43 +2,177 @@ - - + + + + + + + + + + + + + + + + + + + + + + - - - + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + + + + + + + + + + + + + + - - - + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/addons/membership/__terp__.py b/addons/membership/__terp__.py index 16172f9f2e4..a40c92eab5a 100644 --- a/addons/membership/__terp__.py +++ b/addons/membership/__terp__.py @@ -25,7 +25,7 @@ "author" : "Tiny", "category" : "Generic Modules/Association", "depends" : [ - "base", "product", "account", + "base", "product", "account","process" ], "demo_xml" : [ #"demo_data.xml", @@ -36,7 +36,8 @@ ], "update_xml" : [ "security/ir.model.access.csv", - "membership_view.xml","membership_wizard.xml" + "membership_view.xml","membership_wizard.xml", + "process/membership_process.xml" ], "active" : False, "installable" : True, diff --git a/addons/membership/process/membership_process.xml b/addons/membership/process/membership_process.xml new file mode 100644 index 00000000000..5e4b9e0703b --- /dev/null +++ b/addons/membership/process/membership_process.xml @@ -0,0 +1,139 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/addons/mrp/__terp__.py b/addons/mrp/__terp__.py index 98c88413e3c..9dcaa397b14 100644 --- a/addons/mrp/__terp__.py +++ b/addons/mrp/__terp__.py @@ -25,7 +25,7 @@ "author" : "Tiny", "website" : "http://tinyerp.com/module_mrp.html", "category" : "Generic Modules/Production", - "depends" : ["stock", "hr", "purchase", "product", "process"], + "depends" : ["stock", "hr", "purchase", "product","process"], "description": """ This is the base module to manage the manufacturing process in Tiny ERP. diff --git a/addons/mrp/process/procurement_process.xml b/addons/mrp/process/procurement_process.xml index 866ad784349..d05eb28eaef 100644 --- a/addons/mrp/process/procurement_process.xml +++ b/addons/mrp/process/procurement_process.xml @@ -15,6 +15,16 @@ Process Node --> + + + + + + + + + + @@ -25,26 +35,34 @@ - - - + + + - - + + - - - - - - - - - - + + + + + + + + + + + + + + + + + + @@ -80,40 +98,40 @@ - - - - - - - - - - - - + - - - - - - - - - - + + + + + + + + + + - - + + + + + + + + + + + + + @@ -126,7 +144,7 @@ - + @@ -152,8 +170,8 @@ - - + + @@ -164,14 +182,14 @@ - - + + - + @@ -183,6 +201,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -207,10 +252,10 @@ - + - + @@ -219,17 +264,7 @@ - - - - - - - - - - - + @@ -239,6 +274,15 @@ + + + + + + + + + @@ -247,22 +291,22 @@ - - + + - - - - + + + + - + - + @@ -273,19 +317,10 @@ - + - - - - - - - - - @@ -304,15 +339,6 @@ - - - - - - - - - @@ -335,34 +361,6 @@ Process Action --> - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -404,6 +402,6 @@ - + \ No newline at end of file diff --git a/addons/product/process/product_process.xml b/addons/product/process/product_process.xml index d7e985eca7d..1264cf09f33 100644 --- a/addons/product/process/product_process.xml +++ b/addons/product/process/product_process.xml @@ -29,38 +29,16 @@ - + - - + + - - - - - - - - - - - - - - - - - - - - - - @@ -72,23 +50,5 @@ - - - - - - - - - - - - - - - - - - diff --git a/addons/project/process/task_process.xml b/addons/project/process/task_process.xml index f987ba07af3..c5179ff6e23 100644 --- a/addons/project/process/task_process.xml +++ b/addons/project/process/task_process.xml @@ -39,7 +39,7 @@ - + diff --git a/addons/project_mrp/process/project_mrp_process.xml b/addons/project_mrp/process/project_mrp_process.xml index 125d325f223..3d08bd11394 100644 --- a/addons/project_mrp/process/project_mrp_process.xml +++ b/addons/project_mrp/process/project_mrp_process.xml @@ -6,12 +6,12 @@ Process Node --> - + - - + + @@ -33,35 +33,24 @@ - - + + - - - - - - - - - - + - - - - + + + + @@ -79,7 +68,7 @@ - + diff --git a/addons/purchase/process/purchase_process.xml b/addons/purchase/process/purchase_process.xml index 23891fda515..0d17b36dc06 100644 --- a/addons/purchase/process/purchase_process.xml +++ b/addons/purchase/process/purchase_process.xml @@ -21,8 +21,8 @@ - - + + @@ -32,19 +32,30 @@ - - + + + + + + + + + + + + + - - + + @@ -54,8 +65,8 @@ - - + + @@ -65,8 +76,8 @@ - - + + @@ -77,8 +88,8 @@ - - + + @@ -88,14 +99,32 @@ - - + + - + + + + + + + + + + + + + + + + + @@ -122,6 +151,15 @@ + + + + + + + + + @@ -164,7 +202,7 @@ - + diff --git a/addons/sale/process/sale_process.xml b/addons/sale/process/sale_process.xml index 973c39ec2dc..231d1900ff7 100644 --- a/addons/sale/process/sale_process.xml +++ b/addons/sale/process/sale_process.xml @@ -1,161 +1,188 @@ - - - + - - + + - - - + - - - + + + - object.state=='draft' + - + - - - + + + - object.state in ('draft','waiting_date','manual','progress','shipping_except','invoice_except','done','cancel') + - + - - - + + + - object.state=='draft' - + + - - + + + - object.state in ('waiting_date','manual','progress') + + + + + + + + + + + + + - - + + + - object.state in ('assigned', 'confirmed') + + - - - + + + - object.state in ('done') + + - - - + + + + + - - - + + + + - - - object.order_policy=='postpaid' - + + - - - + - + - + - - + + - + - - + + - - + + - - - + + + + + + + + + + + - - + + - - + + @@ -163,103 +190,103 @@ - - + + - + - - + + - - + + - + - - + + - - - + - - - + + + - - - + + + - + - - - + + + - - - + + + - - - + + + - + - - - + + + - - - + + + - - - + + + - + - - - + + + - - - - - + + + + + - + diff --git a/addons/sale/sale_view.xml b/addons/sale/sale_view.xml index 4090262a5b7..52a84c6cfa7 100644 --- a/addons/sale/sale_view.xml +++ b/addons/sale/sale_view.xml @@ -204,7 +204,7 @@ - + diff --git a/addons/sale_crm/process/sale_crm_process.xml b/addons/sale_crm/process/sale_crm_process.xml index 6aaa146b250..307b1cfd618 100644 --- a/addons/sale_crm/process/sale_crm_process.xml +++ b/addons/sale_crm/process/sale_crm_process.xml @@ -2,25 +2,55 @@ - - - - - - + + + + + + + + - + - + + + + + + + + + + + + + + - - - - + + + + - + + + + + + + + + + + + \ No newline at end of file diff --git a/addons/stock/__terp__.py b/addons/stock/__terp__.py index d4a14976c2b..1937aad9428 100644 --- a/addons/stock/__terp__.py +++ b/addons/stock/__terp__.py @@ -42,6 +42,7 @@ "report_stock_view.xml", "security/stock_security.xml", "security/ir.model.access.csv", + "process/stock_process.xml" ], "active": False, "installable": True diff --git a/addons/stock/process/stock_process.xml b/addons/stock/process/stock_process.xml new file mode 100644 index 00000000000..aef4e3b89aa --- /dev/null +++ b/addons/stock/process/stock_process.xml @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file