diff --git a/addons/account/account.py b/addons/account/account.py index 86d7ac16c68..f218e5b5bd7 100644 --- a/addons/account/account.py +++ b/addons/account/account.py @@ -451,8 +451,9 @@ class account_journal(osv.osv): 'view_id': fields.many2one('account.journal.view', 'View', required=True, help="Gives the view used when writing or browsing entries in this journal. The view tell Open ERP which fields should be visible, required or readonly and in which order. You can create your own view for a faster encoding in each journal."), 'default_credit_account_id': fields.many2one('account.account', 'Default Credit Account'), 'default_debit_account_id': fields.many2one('account.account', 'Default Debit Account'), - 'centralisation': fields.boolean('Centralised counterpart', help="Check this box if you want that each entry doesn't create a counterpart but share the same counterpart for each entry of this journal."), + 'centralisation': fields.boolean('Centralised counterpart', help="Check this box if you want that each entry doesn't create a counterpart but share the same counterpart for each entry of this journal. This is used in fiscal year closing."), 'update_posted': fields.boolean('Allow Cancelling Entries'), + 'group_invoice_lines': fields.boolean('Group invoice lines', help="If this box is cheked, the system will try to group the accouting lines when generating them from invoices."), 'sequence_id': fields.many2one('ir.sequence', 'Entry Sequence', help="The sequence gives the display order for a list of journals", required=True), 'user_id': fields.many2one('res.users', 'User', help="The responsible user of this journal"), 'groups_id': fields.many2many('res.groups', 'account_journal_group_rel', 'journal_id', 'group_id', 'Groups'), diff --git a/addons/account/account_move_line.py b/addons/account/account_move_line.py index f32d150906d..4dbc8819893 100644 --- a/addons/account/account_move_line.py +++ b/addons/account/account_move_line.py @@ -61,6 +61,8 @@ class account_move_line(osv.osv): def create_analytic_lines(self, cr, uid, ids, context={}): for obj_line in self.browse(cr, uid, ids, context): if obj_line.analytic_account_id: + if not obj_line.journal_id.analytic_journal_id: + raise osv.except_osv(_('No Analytic Journal !'),_("You have to define an analytic journal on the '%s' journal!") % (obj_line.journal_id.name,)) amt = (obj_line.credit or 0.0) - (obj_line.debit or 0.0) vals_lines={ 'name': obj_line.name, diff --git a/addons/account/account_view.xml b/addons/account/account_view.xml index 02ad8648b95..b471343863b 100644 --- a/addons/account/account_view.xml +++ b/addons/account/account_view.xml @@ -267,6 +267,8 @@ + + diff --git a/addons/account/invoice.py b/addons/account/invoice.py index 39e03c710ad..606b8b00f50 100644 --- a/addons/account/invoice.py +++ b/addons/account/invoice.py @@ -68,7 +68,7 @@ class account_invoice(osv.osv): tt = type2journal.get(type_inv, 'sale') result = self.pool.get('account.analytic.journal').search(cr, uid, [('type','=',tt)], context=context) if not result: - raise osv.except_osv(_('No Analytic Journal !'),("You have to define an analytic journal of type '%s' !") % (tt,)) + raise osv.except_osv(_('No Analytic Journal !'),_("You have to define an analytic journal of type '%s' !") % (tt,)) return result[0] def _get_type(self, cr, uid, context={}): @@ -448,7 +448,7 @@ class account_invoice(osv.osv): ait_obj = self.pool.get('account.invoice.tax') cur_obj = self.pool.get('res.currency') acc_obj = self.pool.get('account.account') - self.button_compute(cr, uid, ids, context={}, set_total=True) + self.button_compute(cr, uid, ids, context={}, set_total=False) for inv in self.browse(cr, uid, ids): if inv.move_id: continue @@ -598,14 +598,34 @@ class account_invoice(osv.osv): date = inv.date_invoice or time.strftime('%Y-%m-%d') part = inv.partner_id.id + line = map(lambda x:(0,0,self.line_get_convert(cr, uid, x, part, date, context={})) ,iml) + if inv.journal_id.group_invoice_lines: + line2 = {} + for x, y, l in line: + tmp = str(l['account_id']) + tmp += '-'+str('tax_code_id' in l and l['tax_code_id'] or "False") + tmp += '-'+str('product_id' in l and l['product_id'] or "False") + tmp += '-'+str('analytic_account_id' in l and l['analytic_account_id'] or "False") + + if tmp in line2: + am = line2[tmp]['debit'] - line2[tmp]['credit'] + (l['debit'] - l['credit']) + line2[tmp]['debit'] = (am > 0) and am or 0.0 + line2[tmp]['credit'] = (am < 0) and -am or 0.0 + line2[tmp]['tax_amount'] += l['tax_amount'] + line2[tmp]['analytic_lines'] += l['analytic_lines'] + else: + line2[tmp] = l + line = [] + for key, val in line2.items(): + line.append((0,0,val)) + 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) if journal.centralisation: raise osv.except_osv(_('UserError'), _('Can not create invoice move on centralized journal')) - move = {'ref': inv.number, 'line_id': line, 'journal_id': journal_id, 'date': date} period_id=inv.period_id and inv.period_id.id or False if not period_id: 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/account_voucher/__terp__.py b/addons/account_voucher/__terp__.py index 867711e5fe4..dacd296cb85 100755 --- a/addons/account_voucher/__terp__.py +++ b/addons/account_voucher/__terp__.py @@ -43,6 +43,7 @@ Basic Accounting, plus new things which available are: ], "update_xml" : [ + "security/ir.model.access.csv", "account_voucher_sequence.xml", "account_view.xml", "account_report.xml", diff --git a/addons/account_voucher/security/ir.model.access.csv b/addons/account_voucher/security/ir.model.access.csv new file mode 100644 index 00000000000..b4203be5416 --- /dev/null +++ b/addons/account_voucher/security/ir.model.access.csv @@ -0,0 +1,6 @@ +"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink" +"access_account_voucher_user","account.voucher","model_account_voucher","account.group_account_user",1,0,0,0 +"access_account_voucher_line_user","account.voucher.line","model_account_voucher_line","account.group_account_user",1,0,0,0 +"access_account_voucher_manager","account.voucher","model_account_voucher","account.group_account_manager",1,1,1,1 +"access_account_voucher_line_manager","account.voucher.line","model_account_voucher_line","account.group_account_manager",1,1,1,1 + 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/auction/report/huissier.py b/addons/auction/report/huissier.py index e01063ba9c0..9afe67834c1 100644 --- a/addons/auction/report/huissier.py +++ b/addons/auction/report/huissier.py @@ -25,9 +25,8 @@ from osv.osv import osv, orm from report.interface import report_rml #FIXME: use the one from tools and delete the one from report from report.int_to_text import int_to_text - -def toxml(val): - return val.replace('&', '&').replace('<','<').replace('>','>').decode('utf-8').encode('latin1', 'replace') +from tools import to_xml as toxml +from tools import ustr class report_custom(report_rml): def __init__(self, name, table, tmpl, xsl): @@ -38,7 +37,7 @@ class report_custom(report_rml): lots = pool.get('auction.lots').browse(cr, uid, ids) auction = lots[0].auction_id - xml = ''' + xml = ''' %s @@ -49,7 +48,7 @@ class report_custom(report_rml): for l in lots: # l['id_cont'] = str(i) if l['obj_price']==0: - price_french = 'retiré' + price_french = u'retiré' else: price_french = int_to_text(int(l['obj_price'] or 0.0))+' eur' i+=1 @@ -59,10 +58,9 @@ class report_custom(report_rml): %s %s %s - ''' % (i, l['obj_num'], toxml(l['name']), price_french, str(l['obj_price'] or '/')) + ''' % (i, l['obj_num'], ustr(toxml(l['name'])), ustr(price_french), ustr(l['obj_price'] or '/')) xml += '' -# file('/tmp/terp.xml','wb+').write(xml) return xml report_custom('report.flagey.huissier', 'auction.lots', '', 'addons/auction/report/huissier.xsl') diff --git a/addons/l10n_chart_uk_minimal/__terp__.py b/addons/l10n_chart_uk_minimal/__terp__.py index 94da21b59ac..516061768bf 100644 --- a/addons/l10n_chart_uk_minimal/__terp__.py +++ b/addons/l10n_chart_uk_minimal/__terp__.py @@ -63,6 +63,7 @@ "author" : "Seath Solutions Ltd", "website": "http://www.seathsolutions.com", "category" : "Localisation/Account Charts", + "description": "This is the base module to manage the accounting chart for United Kingdom in Open ERP.", "depends" : ["base", "account", "base_iban", "base_vat", "account_chart"], "init_xml" : [], "demo_xml" : [], diff --git a/addons/mrp_subproduct/__terp__.py b/addons/mrp_subproduct/__terp__.py index 14b0152d532..b24501839bd 100644 --- a/addons/mrp_subproduct/__terp__.py +++ b/addons/mrp_subproduct/__terp__.py @@ -37,6 +37,7 @@ With this module: """, "demo_xml" : [], "update_xml" : [ + "security/ir.model.access.csv", "mrp_subproduct_view.xml", ], "active": False, diff --git a/addons/mrp_subproduct/security/ir.model.access.csv b/addons/mrp_subproduct/security/ir.model.access.csv new file mode 100644 index 00000000000..3c6547410d4 --- /dev/null +++ b/addons/mrp_subproduct/security/ir.model.access.csv @@ -0,0 +1,3 @@ +"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink" +"access_mrp_subproduct_user","mrp.subproduct","model_mrp_subproduct","mrp.group_mrp_user",1,0,0,0 +"access_mrp_subproduct_manager","mrp.subproduct","model_mrp_subproduct","mrp.group_mrp_manager",1,1,1,1 diff --git a/addons/product/pricelist.py b/addons/product/pricelist.py index bd612c246e8..01749be89cb 100644 --- a/addons/product/pricelist.py +++ b/addons/product/pricelist.py @@ -91,11 +91,15 @@ 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= {} + result= [] + for pl in self.browse(cr, uid, ids, context): - result[pl.id] = pl.name + ' ('+ pl.currency_id.name + ')' + 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 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/wizard/project_gtd_daily.py b/addons/project_gtd/wizard/project_gtd_daily.py index ad62ee39a4f..3a87f1bd3ed 100644 --- a/addons/project_gtd/wizard/project_gtd_daily.py +++ b/addons/project_gtd/wizard/project_gtd_daily.py @@ -33,7 +33,7 @@ class wiz_timebox_open(wizard.interface): pool = pooler.get_pool(cr.dbname) ids = pool.get('project.gtd.timebox').search(cr, uid, [('user_id','=',uid),('type','=',tbtype)]) if not len(ids): - raise wizard.except_wizard('Error !', 'No timebox of the type "%s" defined !') + raise wizard.except_wizard('Error !', 'No timebox of the type "%s" defined !' % (tbtype,)) view_type = 'form,tree' if len(ids) >= 1: domain = "[('id','in',["+','.join(map(str,ids))+"])]" 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/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" : [], diff --git a/addons/wiki/security/ir.model.access.csv b/addons/wiki/security/ir.model.access.csv index a54122e0231..acb871141ff 100644 --- a/addons/wiki/security/ir.model.access.csv +++ b/addons/wiki/security/ir.model.access.csv @@ -3,4 +3,6 @@ "wiki_groups_all","wiki.groups","model_wiki_groups",,1,0,0,0 "wiki_wiki","wiki.wiki","model_wiki_wiki","base.group_user",1,1,1,1 "wiki_groups","wiki.groups","model_wiki_groups","base.group_system",1,1,1,1 +"wiki_groups_link","wiki.groups.link","model_wiki_groups_link","base.group_system",1,1,1,1 "wiki_wiki_history","wiki.wiki.history","model_wiki_wiki_history","base.group_user",1,0,1,0 +"wiki_wizard_wiki_history_show_diff","wizard.wiki.history.show_diff","model_wizard_wiki_history_show_diff","base.group_user",1,1,1,1