diff --git a/addons/account_invoice_layout/account_invoice_layout_report.xml b/addons/account_invoice_layout/account_invoice_layout_report.xml index 034e869d912..2579609bfbf 100644 --- a/addons/account_invoice_layout/account_invoice_layout_report.xml +++ b/addons/account_invoice_layout/account_invoice_layout_report.xml @@ -1,7 +1,7 @@ - [[ format((o.payment_term and o.payment_term.note) or '') ]] +
[[ repeatIn((spcl_msg(data['form']) and spcl_msg(data['form']).splitlines()) or [], 'note') ]] -[[ note or removeParentNode('table') ]] - +[[ note or removeParentNode('para') ]] +
diff --git a/addons/auction/__terp__.py b/addons/auction/__terp__.py index 24516e3fea7..3f70590d346 100644 --- a/addons/auction/__terp__.py +++ b/addons/auction/__terp__.py @@ -22,8 +22,14 @@ { "name" : "Auction module", "version" : "1.0", + "author" : "Tiny", "category" : "Generic Modules/Auction", "depends" : ["base","account","hr_attendance"], + "description": '''This module provides functionality to + manage artists, articles, sellers, buyers and auction. + Manage bids, track of sold, paid and unpaid objects. + Delivery Management. + ''', "update_xml" : [ # FIXME: review security rules... "security/ir.model.access.csv", diff --git a/addons/base_module_quality/__terp__.py b/addons/base_module_quality/__terp__.py index 4a4d5b9fc60..5588ab05780 100644 --- a/addons/base_module_quality/__terp__.py +++ b/addons/base_module_quality/__terp__.py @@ -34,7 +34,7 @@ This module's aim is to check the quality of other modules. """, "init_xml" : [], - "update_xml" : ["base_module_quality_wizard.xml"], + "update_xml" : ["base_module_quality_wizard.xml", "security/ir.model.access.csv",], "category" : "Tiny Specific Modules/Base module quality", "active": False, "installable": True diff --git a/addons/base_module_quality/base_module_quality.py b/addons/base_module_quality/base_module_quality.py index 195e345e8ef..ef4a0c3c515 100644 --- a/addons/base_module_quality/base_module_quality.py +++ b/addons/base_module_quality/base_module_quality.py @@ -19,7 +19,7 @@ # along with this program. If not, see . # ############################################################################## - +import pooler class abstract_quality_check(object): ''' @@ -41,11 +41,11 @@ class abstract_quality_check(object): #This bool defines if the test can be run only if the module is installed. #True => the module have to be installed. #False => the module can be uninstalled. - bool_installed_only = True + bool_installed_only = True def __init__(self): ''' - this method should initialize the var + this method should initialize the var ''' raise 'Not Implemented' @@ -55,7 +55,27 @@ class abstract_quality_check(object): ''' raise 'Not Implemented' + def get_objects(self, cr, uid, module): + # This function returns all object of the given module.. + pool = pooler.get_pool(cr.dbname) + ids2 = pool.get('ir.model.data').search(cr, uid, [('module','=', module), ('model','=','ir.model')]) + model_list = [] + model_data = pool.get('ir.model.data').browse(cr, uid, ids2) + for model in model_data: + model_list.append(model.res_id) + obj_list = [] + for mod in pool.get('ir.model').browse(cr, uid, model_list): + obj_list.append(str(mod.model)) + return obj_list + def get_ids(self, cr, uid, object_list): + #This method return dictionary with ids of records of object for module + pool = pooler.get_pool(cr.dbname) + result_ids = {} + for obj in object_list: + ids = pool.get(obj).search(cr, uid, []) + result_ids[obj] = ids + return result_ids # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/base_module_quality/base_module_quality_wizard.xml b/addons/base_module_quality/base_module_quality_wizard.xml index c99b949be35..b49c17667a7 100644 --- a/addons/base_module_quality/base_module_quality_wizard.xml +++ b/addons/base_module_quality/base_module_quality_wizard.xml @@ -16,7 +16,7 @@ D +With this module: + A + B + C -> D + E + """, "demo_xml" : [], "update_xml" : [ "mrp_subproduct_view.xml", diff --git a/addons/process/process.py b/addons/process/process.py index 4eba1a44410..8f88b0b92c5 100644 --- a/addons/process/process.py +++ b/addons/process/process.py @@ -60,15 +60,13 @@ class process_process(osv.osv): def search_by_model(self, cr, uid, res_model, context): pool = pooler.get_pool(cr.dbname) + model_ids = (res_model or None) and pool.get('ir.model').search(cr, uid, [('model', '=', res_model)]) - model_ids = pool.get('ir.model').search(cr, uid, [('model', '=', res_model)]) - if not model_ids: - return [] - + domain = (model_ids or []) and [('model_id', 'in', model_ids)] result = [] # search all processes - res = pool.get('process.process').search(cr, uid, [('model_id', 'in', model_ids)]) + res = pool.get('process.process').search(cr, uid, domain) if res: res = pool.get('process.process').browse(cr, uid, res, context) for process in res: @@ -76,9 +74,9 @@ class process_process(osv.osv): return result # else search process nodes - res = pool.get('process.node').search(cr, uid, [('model_id', 'in', model_ids)]) + res = pool.get('process.node').search(cr, uid, domain) if res: - res = pool.get('process.node').browse(cr, uid, res, context) + res = pool.get('process.node').browse(cr, uid, res, context) for node in res: if (node.process_id.id, node.process_id.name) not in result: result.append((node.process_id.id, node.process_id.name)) @@ -92,13 +90,15 @@ class process_process(osv.osv): pool = pooler.get_pool(cr.dbname) process = pool.get('process.process').browse(cr, uid, [id])[0] - states = dict(pool.get(res_model).fields_get(cr, uid, context=context).get('state', {}).get('selection', {})) - title = process.name expr_context = {} + states = {} perm = None + if res_model: + states = dict(pool.get(res_model).fields_get(cr, uid, context=context).get('state', {}).get('selection', {})) + if res_id: current_object = pool.get(res_model).browse(cr, uid, [res_id], context)[0] current_user = pool.get('res.users').browse(cr, uid, [uid], context)[0] diff --git a/addons/product/pricelist.py b/addons/product/pricelist.py index 2ca74463dfd..01749be89cb 100644 --- a/addons/product/pricelist.py +++ b/addons/product/pricelist.py @@ -91,6 +91,16 @@ class product_pricelist(osv.osv): 'version_id': fields.one2many('product.pricelist.version', 'pricelist_id', 'Pricelist Versions'), 'currency_id': fields.many2one('res.currency', 'Currency', required=True), } + + def name_get(self, cr, uid, ids, context={}): + result= [] + + for pl in self.browse(cr, uid, ids, context): + name = str(pl.name) + ' ('+ str(pl.currency_id.name) + ')' + result.append((pl.id,name)) + return result + + def _get_currency(self, cr, uid, ctx): comp = self.pool.get('res.users').browse(cr,uid,uid).company_id if not comp: diff --git a/addons/product_margin/__terp__.py b/addons/product_margin/__terp__.py index a5d7e5cc4c9..89021c66c10 100644 --- a/addons/product_margin/__terp__.py +++ b/addons/product_margin/__terp__.py @@ -24,6 +24,11 @@ "version":"1.0", "author":"Tiny", "category":"Custom", + "description": """ +Adds a reporting menu in products that computes sales, purchases, margins +and others interresting indicators based on invoices. The wizard to launch +the report has several options to help you get the data you need. +""", "depends":["base","product","account"], "demo_xml":[], "update_xml":["product_margin_view.xml"], diff --git a/addons/profile_accounting/__terp__.py b/addons/profile_accounting/__terp__.py index bf4b8795721..c96abadf26d 100644 --- a/addons/profile_accounting/__terp__.py +++ b/addons/profile_accounting/__terp__.py @@ -24,6 +24,7 @@ "version":"1.0", "author":"Tiny", "category":"Profile", + "description": "Profile for Accounting", "depends":["account","report_analytic","board_account","account_followup"], "demo_xml":[], "update_xml":[ diff --git a/addons/profile_association/__terp__.py b/addons/profile_association/__terp__.py index 879bbb9e3f3..ca50e11f0ff 100644 --- a/addons/profile_association/__terp__.py +++ b/addons/profile_association/__terp__.py @@ -24,6 +24,7 @@ "version":"0.1", "author":"Tiny", "category":"Profile", + "description": "Profile for Associates", "depends":["membership", "board_association"], "demo_xml":[], "update_xml":[ diff --git a/addons/profile_auction/__terp__.py b/addons/profile_auction/__terp__.py index 3190930f14d..681a183ea9c 100644 --- a/addons/profile_auction/__terp__.py +++ b/addons/profile_auction/__terp__.py @@ -24,6 +24,7 @@ "version":"1.0", "author":"Tiny", "category":"Profile", + "description": "Profile for Auction house", "depends":["auction", "board_auction","account","hr_timesheet_sheet"], "demo_xml":[], "update_xml":[], diff --git a/addons/profile_crm/__terp__.py b/addons/profile_crm/__terp__.py index 6c1ddda28bd..e66a8dddd4e 100644 --- a/addons/profile_crm/__terp__.py +++ b/addons/profile_crm/__terp__.py @@ -24,6 +24,7 @@ "version":"1.0", "author":"Tiny", "category":"Profile", + "description": "Profile for CRM", "depends":[ "crm_vertical", "board_crm_configuration", ], diff --git a/addons/profile_manufacturing/__terp__.py b/addons/profile_manufacturing/__terp__.py index 6b90856f6d5..8527539cae5 100644 --- a/addons/profile_manufacturing/__terp__.py +++ b/addons/profile_manufacturing/__terp__.py @@ -24,6 +24,7 @@ "version":"1.0", "author":"Tiny", "category":"Profile", + "description": "Profile for manufacturing industries", "depends":["mrp", "sale", "delivery","board_manufacturing","product_margin"], "demo_xml":[], "update_xml":[ diff --git a/addons/profile_service/__terp__.py b/addons/profile_service/__terp__.py index 26ccbca8fdb..ce20d5b34cd 100644 --- a/addons/profile_service/__terp__.py +++ b/addons/profile_service/__terp__.py @@ -24,6 +24,7 @@ "version":"1.0", "author":"Tiny", "category":"Profile", + "description": "Profile for service companies", "depends":[ "hr", "project", diff --git a/addons/project_gtd/__terp__.py b/addons/project_gtd/__terp__.py index 105289b7469..19c3190e924 100644 --- a/addons/project_gtd/__terp__.py +++ b/addons/project_gtd/__terp__.py @@ -25,7 +25,19 @@ "author" : "Tiny", "category" : "Generic Modules/Projects & Services", "depends" : ["project"], - "description": "", + "description": """ +This module implements all concepts defined by the Getting Things Done +methodology. This world-wide used methodology is used for personnal +time management improvement. + +Getting Things Done (commonly abbreviated as GTD) is an action management +method created by David Allen, and described in a book of the same name. + +GTD rests on the principle that a person needs to move tasks out of the mind by +recording them externally. That way, the mind is freed from the job of +remembering everything that needs to be done, and can concentrate on actually +performing those tasks. + """, "init_xml" : [], "demo_xml" : ["project_gtd_demo.xml"], "update_xml": [ diff --git a/addons/purchase/__terp__.py b/addons/purchase/__terp__.py index 7900d753dbd..780a37c3af0 100644 --- a/addons/purchase/__terp__.py +++ b/addons/purchase/__terp__.py @@ -26,6 +26,7 @@ "website" : "http://www.openerp.com", "depends" : ["base", "account", "stock", "process"], "category" : "Generic Modules/Sales & Purchases", + "description": "Module for purchase management", "init_xml" : [], "demo_xml" : ["purchase_demo.xml", #"purchase_unit_test.xml" diff --git a/addons/purchase/purchase.py b/addons/purchase/purchase.py index 514dbba6e4f..76fd89df292 100644 --- a/addons/purchase/purchase.py +++ b/addons/purchase/purchase.py @@ -43,39 +43,24 @@ class purchase_order(osv.osv): res[order.id] += oline.price_unit * oline.product_qty return res - def _amount_untaxed(self, cr, uid, ids, field_name, arg, context): - res = {} - cur_obj=self.pool.get('res.currency') - for purchase in self.browse(cr, uid, ids): - res[purchase.id] = 0.0 - for line in purchase.order_line: - res[purchase.id] += line.price_subtotal - cur = purchase.pricelist_id.currency_id - res[purchase.id] = cur_obj.round(cr, uid, cur, res[purchase.id]) - - return res - - def _amount_tax(self, cr, uid, ids, field_name, arg, context): + def _amount_all(self, cr, uid, ids, field_name, arg, context): res = {} cur_obj=self.pool.get('res.currency') for order in self.browse(cr, uid, ids): - val = 0.0 + res[order.id] = { + 'amount_untaxed': 0.0, + 'amount_tax': 0.0, + 'amount_total': 0.0, + } + val = val1 = 0.0 cur=order.pricelist_id.currency_id for line in order.order_line: for c in self.pool.get('account.tax').compute(cr, uid, line.taxes_id, line.price_unit, line.product_qty, order.partner_address_id.id, line.product_id, order.partner_id): val+= c['amount'] - res[order.id]=cur_obj.round(cr, uid, cur, val) - return res - - def _amount_total(self, cr, uid, ids, field_name, arg, context): - res = {} - untax = self._amount_untaxed(cr, uid, ids, field_name, arg, context) - tax = self._amount_tax(cr, uid, ids, field_name, arg, context) - cur_obj=self.pool.get('res.currency') - for id in ids: - order=self.browse(cr, uid, [id])[0] - cur=order.pricelist_id.currency_id - res[id] = cur_obj.round(cr, uid, cur, untax.get(id, 0.0) + tax.get(id, 0.0)) + val1 += line.price_subtotal + res[order.id]['amount_tax']=cur_obj.round(cr, uid, cur, val) + res[order.id]['amount_untaxed']=cur_obj.round(cr, uid, cur, val1) + res[order.id]['amount_total']=res[order.id]['amount_untaxed'] + res[order.id]['amount_tax'] return res def _set_minimum_planned_date(self, cr, uid, ids, name, value, arg, context): @@ -144,6 +129,12 @@ class purchase_order(osv.osv): res[r] = 100.0 * res[r][0] / res[r][1] return res + def _get_order(self, cr, uid, ids, context={}): + result = {} + for line in self.pool.get('purchase.order.line').browse(cr, uid, ids, context=context): + result[line.order_id.id] = True + return result.keys() + _columns = { 'name': fields.char('Order Reference', size=64, required=True, select=True), 'origin': fields.char('Origin', size=64, @@ -181,9 +172,18 @@ class purchase_order(osv.osv): "Manual: no invoice will be pre-generated. The accountant will have to encode manually." ), 'minimum_planned_date':fields.function(_minimum_planned_date, fnct_inv=_set_minimum_planned_date, method=True,store=True, string='Planned Date', type='datetime', help="This is computed as the minimum scheduled date of all purchase order lines' products."), - 'amount_untaxed': fields.function(_amount_untaxed, method=True, string='Untaxed Amount'), - 'amount_tax': fields.function(_amount_tax, method=True, string='Taxes'), - 'amount_total': fields.function(_amount_total, method=True, string='Total'), + 'amount_untaxed': fields.function(_amount_all, method=True, string='Untaxed Amount', + store={ + 'purchase.order.line': (_get_order, None, 10), + }, multi="sums"), + 'amount_tax': fields.function(_amount_all, method=True, string='Taxes', + store={ + 'purchase.order.line': (_get_order, None, 10), + }, multi="sums"), + 'amount_total': fields.function(_amount_all, method=True, string='Total', + store={ + 'purchase.order.line': (_get_order, None, 10), + }, multi="sums"), } _defaults = { 'date_order': lambda *a: time.strftime('%Y-%m-%d'), diff --git a/addons/report_purchase/__terp__.py b/addons/report_purchase/__terp__.py index c74a09ca3e8..70902eed4bc 100644 --- a/addons/report_purchase/__terp__.py +++ b/addons/report_purchase/__terp__.py @@ -20,12 +20,14 @@ # ############################################################################## { - "name" : "Sales Management - Reporting", + "name" : "Purchase Management - Reporting", "version" : "1.0", "author" : "Tiny", "website" : "http://www.openerp.com", "depends" : ["purchase"], "category" : "Generic Modules/Sales & Purchases", + "description": '''Module to add views like + Purchase By Product, Purchase By Category of Product, All Months, Current Month.''', "init_xml" : [], "demo_xml" : [], "update_xml" : [ diff --git a/addons/report_timesheet/__terp__.py b/addons/report_timesheet/__terp__.py index 73792922a70..110ce5ca8c7 100644 --- a/addons/report_timesheet/__terp__.py +++ b/addons/report_timesheet/__terp__.py @@ -24,6 +24,8 @@ "version" : "1.0", "author" : "Tiny", "website" : "http://www.openerp.com", + "description": '''Module to add timesheet views like + All Month, Timesheet By User, Timesheet Of Month, Timesheet By Account''', "depends" : ["hr_timesheet",'hr_timesheet_invoice'], "category" : "Generic Modules/Human Resources", "init_xml" : [], diff --git a/addons/stock/__terp__.py b/addons/stock/__terp__.py index 1d012329503..439b32f6b66 100644 --- a/addons/stock/__terp__.py +++ b/addons/stock/__terp__.py @@ -26,6 +26,10 @@ "website" : "http://www.openerp.com", "depends" : ["product", "account"], "category" : "Generic Modules/Inventory Control", + "description": '''Module provides Inventory Management, define warehouse, stock location, Pickings, + Incoming products, Outgoing products, Internal movements of product, Traceability. + Reports for stock like lots by location, Stock Forecast, Item Labels, Picking List etc.. + ''', "init_xml" : [], "demo_xml" : ["stock_demo.xml"], "update_xml" : [ diff --git a/addons/stock/stock.py b/addons/stock/stock.py index e74165e8c15..55421013ca4 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -1062,20 +1062,16 @@ class stock_move(osv.osv): if move.state in ('confirmed','waiting','assigned','draft'): if move.picking_id: pickings[move.picking_id.id] = True - if move.move_dest_id and move.move_dest_id.state=='waiting': - self.write(cr, uid, [move.move_dest_id.id], {'state':'assigned'}) - if move.move_dest_id.picking_id: - wf_service = netsvc.LocalService("workflow") - wf_service.trg_write(uid, 'stock.picking', move.move_dest_id.picking_id.id, cr) + if move.move_dest_id and move.move_dest_id.state=='waiting': + self.write(cr, uid, [move.move_dest_id.id], {'state':'assigned'}) + if move.move_dest_id.picking_id: + wf_service = netsvc.LocalService("workflow") + wf_service.trg_write(uid, 'stock.picking', move.move_dest_id.picking_id.id, cr) self.write(cr, uid, ids, {'state':'cancel', 'move_dest_id': False}) - #for pick_id in pickings: - # wf_service = netsvc.LocalService("workflow") - # wf_service.trg_validate(uid, 'stock.picking', pick_id, 'button_cancel', cr) - #ids2 = [] - #for res in self.read(cr, uid, ids, ['move_dest_id']): - # if res['move_dest_id']: - # ids2.append(res['move_dest_id'][0]) + for pick in self.pool.get('stock.picking').browse(cr,uid,pickings.keys()): + if all(move.state == 'cancle' for move in pick.move_lines): + self.pool.get('stock.picking').write(cr,uid,[pick.id],{'state':'cancel'}) wf_service = netsvc.LocalService("workflow") for id in ids: diff --git a/addons/subscription/__terp__.py b/addons/subscription/__terp__.py index da3ae32a7ea..8d4fb042cb7 100644 --- a/addons/subscription/__terp__.py +++ b/addons/subscription/__terp__.py @@ -24,6 +24,7 @@ "version" : "1.0", "author" : "Tiny", "category" : "Generic Modules/Others", + "description": '''Module allows to create new documents and add subscription on that document.''', "depends" : ["base"], "init_xml" : [], "demo_xml" : [],