diff --git a/addons/account/account_cash_statement.py b/addons/account/account_cash_statement.py index 07767328a55..7cd084eb7f9 100644 --- a/addons/account/account_cash_statement.py +++ b/addons/account/account_cash_statement.py @@ -241,14 +241,14 @@ class account_cash_statement(osv.osv): def create(self, cr, uid, vals, context=None): if 'journal_id' not in vals: - raise osv.except_osv('Error', _('You cannot create a bank or cash register without a journal!')) + raise osv.except_osv(_('Error'), _('You cannot create a bank or cash register without a journal!')) sql = [ ('journal_id', '=', vals.get('journal_id', False)), ('state', '=', 'open') ] open_jrnl = self.search(cr, uid, sql) if open_jrnl: - raise osv.except_osv('Error', _('You can not have two open register for the same journal')) + raise osv.except_osv(_('Error'), _('You can not have two open register for the same journal')) if self.pool.get('account.journal').browse(cr, uid, vals['journal_id']).type == 'cash': open_close = self._get_cash_open_close_box_lines(cr, uid, context) @@ -328,8 +328,8 @@ class account_cash_statement(osv.osv): statement_pool = self.pool.get('account.bank.statement') for statement in statement_pool.browse(cr, uid, ids, context=context): vals = {} - - if not self._user_allow(cr, uid, statement.id, context=context): + force_allow = context.get('force_allow',False) + if not force_allow and not self._user_allow(cr, uid, statement.id, context=context): raise osv.except_osv(_('Error !'), _('User %s does not have rights to access %s journal !' % (statement.user_id.name, statement.journal_id.name))) if statement.name and statement.name == '/': diff --git a/addons/account/i18n/account.pot b/addons/account/i18n/account.pot index c2a022403a1..45725e1bc84 100644 --- a/addons/account/i18n/account.pot +++ b/addons/account/i18n/account.pot @@ -5617,6 +5617,7 @@ msgstr "" #: code:addons/account/invoice.py:0 #: code:addons/account/wizard/account_invoice_refund.py:0 #: code:addons/account/wizard/account_use_model.py:0 +#: code:addons/account/account_cash_statement.py:0 #, python-format msgid "Error !" msgstr "" @@ -6138,6 +6139,12 @@ msgstr "" msgid "You can not have two open register for the same journal" msgstr "" +#. module: account +#: code:addons/account/account_cash_statement.py:0 +#, python-format +msgid "You cannot create a bank or cash register without a journal!" +msgstr "" + #. module: account #: view:account.payment.term.line:0 msgid " day of the month= -1" diff --git a/addons/account/test/account_cash_statement.yml b/addons/account/test/account_cash_statement.yml index 03d0d54db83..67e6d4d2607 100644 --- a/addons/account/test/account_cash_statement.yml +++ b/addons/account/test/account_cash_statement.yml @@ -26,7 +26,7 @@ I clicked on Open CashBox button to open the cashbox - !python {model: account.bank.statement}: | - self.button_open(cr, uid, [ref("account_bank_statement_1")], {"lang": "en_US", "tz": False, "active_model": "account.bank.statement", "active_ids": [ref("account_bank_statement_1")], "active_id": ref("account_bank_statement_1"), }) + self.button_open(cr, uid, [ref("account_bank_statement_1")], {"force_allow":True, "lang": "en_US", "tz": False, "active_model": "account.bank.statement", "active_ids": [ref("account_bank_statement_1")], "active_id": ref("account_bank_statement_1"), }) - I check that now bank statement is in the "Open" state diff --git a/addons/auction/i18n/auction.pot b/addons/auction/i18n/auction.pot index 8c8e0dc2a96..2027ab85202 100644 --- a/addons/auction/i18n/auction.pot +++ b/addons/auction/i18n/auction.pot @@ -307,6 +307,54 @@ msgstr "" msgid "The Buyer \"%s\" has no Invoice Address." msgstr "" +#. module: auction +#: code:addons/auction/wizard/auction_pay_buy.py:0 +#, python-format +msgid "Payment aborted !" +msgstr "" + +#. module: auction +#: code:addons/auction/wizard/auction_pay_buy.py:0 +#, python-format +msgid "You should pay all the total: "%.2f" are missing to accomplish the payment." +msgstr "" + +#. module: auction +#: code:addons/auction/wizard/auction_pay_buy.py:0 +#, python-format +msgid "Error!" +msgstr "" + +#. module: auction +#: code:addons/auction/wizard/auction_catalog_flagey_report.py:0 +#, python-format +msgid "No Lots belong to this Auction Date" +msgstr "" + +#. module: auction +#: code:addons/auction/wizard/auction_lots_numerotate.py:0 +#, python-format +msgid "This record does not exist !" +msgstr "" + +#. module: auction +#: code:addons/auction/wizard/auction_lots_numerotate.py:0 +#, python-format +msgid "This lot does not exist !" +msgstr "" + +#. module: auction +#: code:addons/auction/wizard/auction_lots_buyer_map.py:0 +#, python-format +msgid "No buyer is set for this lot." +msgstr "" + +#. module: auction +#: code:addons/auction/wizard/auction_pay_buy.py:0 +#, python-format +msgid "No auction date for "%s": Please set one." +msgstr "" + #. module: auction #: view:auction.dates:0 msgid "Commissions" @@ -659,6 +707,7 @@ msgstr "" #. module: auction #: code:addons/auction/wizard/auction_lots_invoice.py:0 +#: code:addons/auction/wizard/auction_lots_numerotate.py:0 #, python-format msgid "UserError" msgstr "" diff --git a/addons/auction/report/buyer_form_report.py b/addons/auction/report/buyer_form_report.py index 2de994050d0..ceffc87e557 100644 --- a/addons/auction/report/buyer_form_report.py +++ b/addons/auction/report/buyer_form_report.py @@ -44,7 +44,7 @@ class buyer_form_report(report_sxw.rml_parse): taxes.append(lot.author_right) if lot.auction_id: taxes += lot.auction_id.buyer_costs - tax=self.pool.get('account.tax').compute(self.cr, self.uid, taxes, lot.obj_price, 1) + tax=self.pool.get('account.tax').compute_all(self.cr, self.uid, taxes, lot.obj_price, 1) for t in tax: amount+=t['amount'] return amount diff --git a/addons/auction/report/catalog2.xsl b/addons/auction/report/catalog2.xsl index ea27162428d..c44d0e83047 100755 --- a/addons/auction/report/catalog2.xsl +++ b/addons/auction/report/catalog2.xsl @@ -1,5 +1,5 @@ - - + + @@ -30,7 +30,7 @@ - - Vente antiquitée le      + Antiques on sale diff --git a/addons/auction/report/seller_form_report.py b/addons/auction/report/seller_form_report.py index d033720d615..5a67d5be51a 100644 --- a/addons/auction/report/seller_form_report.py +++ b/addons/auction/report/seller_form_report.py @@ -35,7 +35,7 @@ class seller_form_report(report_sxw.rml_parse): 'sum_taxes': self.sum_taxes, 'sellerinfo' : self.seller_info, 'grand_total' : self.grand_seller_total, -}) + }) def sum_taxes(self, lot): @@ -45,7 +45,7 @@ class seller_form_report(report_sxw.rml_parse): taxes.append(lot.bord_vnd_id.tax_id) elif lot.auction_id and lot.auction_id.seller_costs: taxes += lot.auction_id.seller_costs - tax=self.pool.get('account.tax').compute(self.cr, self.uid, taxes, lot.obj_price, 1) + tax=self.pool.get('account.tax').compute_all(self.cr, self.uid, taxes, lot.obj_price, 1) for t in tax: amount+=t['amount'] return amount diff --git a/addons/auction/wizard/auction_catalog_flagey_report.py b/addons/auction/wizard/auction_catalog_flagey_report.py index 97440a6680c..b5bff2d2858 100644 --- a/addons/auction/wizard/auction_catalog_flagey_report.py +++ b/addons/auction/wizard/auction_catalog_flagey_report.py @@ -21,6 +21,7 @@ from osv import osv, fields import netsvc +from tools.translate import _ class auction_catalog_flagey(osv.osv_memory): _name = 'auction.catalog.flagey' @@ -57,7 +58,7 @@ class auction_catalog_flagey(osv.osv_memory): v_ids = lots_obj.browse(cr, uid, v_lots) for ab in v_ids: if not ab.auction_id : - raise osv.except_osv('Error!','No Lots belong to this Auction Date') + raise osv.except_osv(_('Error!'), _('No Lots belong to this Auction Date')) pass def print_report(self, cr, uid, ids, context): diff --git a/addons/auction/wizard/auction_lots_buyer_map.py b/addons/auction/wizard/auction_lots_buyer_map.py index 23279942965..98d26b83b4f 100644 --- a/addons/auction/wizard/auction_lots_buyer_map.py +++ b/addons/auction/wizard/auction_lots_buyer_map.py @@ -67,7 +67,7 @@ class wiz_auc_lots_buyer_map(osv.osv_memory): lots_obj = self.pool.get('auction.lots') for rec in lots_obj.browse(cr, uid, ids, context): if (len(ids)==1) and (not rec.ach_uid and not rec.ach_login): - raise osv.except_osv('Error', 'No buyer is set for this lot.') + raise osv.except_osv(_('Error'), _('No buyer is set for this lot.')) if not rec.ach_uid and rec.ach_login: return {'ach_login': rec.ach_login} return {} diff --git a/addons/auction/wizard/auction_lots_numerotate.py b/addons/auction/wizard/auction_lots_numerotate.py index b464ba49a28..9c41d1d4f70 100644 --- a/addons/auction/wizard/auction_lots_numerotate.py +++ b/addons/auction/wizard/auction_lots_numerotate.py @@ -99,7 +99,7 @@ class auction_lots_numerotate_per_lot(osv.osv_memory): ('lot_num','=',int(datas['lot_num']))]) found = [r for r in res if r in record_ids] if len(found)==0: - raise osv.except_osv('UserError', 'This record does not exist !') + raise osv.except_osv(_('UserError'), _('This record does not exist !')) lots_obj.write(cr, uid, found, {'obj_num':int(datas['obj_num'])} ) view_id = data_obj._get_id(cr, uid, 'auction', 'view_auction_numerotate') if view_id: @@ -125,7 +125,7 @@ class auction_lots_numerotate_per_lot(osv.osv_memory): ('lot_num','=',int(datas['lot_num']))]) found = [r for r in res if r in record_ids] if len(found)==0: - raise osv.except_osv('UserError', 'This record does not exist !') + raise osv.except_osv(_('UserError'), _('This record does not exist !')) lots_datas = lots_obj.read(cr, uid, found, ['obj_num', 'name', 'lot_est1', 'lot_est2', 'obj_desc']) @@ -141,7 +141,7 @@ class auction_lots_numerotate_per_lot(osv.osv_memory): ('lot_num','=',int(datas['lot_num']))]) found = [r for r in res if r in record_ids] if len(found)==0: - raise osv.except_osv('Error', 'This lot does not exist !') + raise osv.except_osv(_('Error'), _('This lot does not exist !')) view_id = data_obj._get_id(cr, uid, 'auction', 'view_auction_lots_numerotate_second') if view_id: res_id = data_obj.browse(cr, uid, view_id, context=context).res_id diff --git a/addons/auction/wizard/auction_pay_buy.py b/addons/auction/wizard/auction_pay_buy.py index 108ed00eddc..bf6a85cf74b 100644 --- a/addons/auction/wizard/auction_pay_buy.py +++ b/addons/auction/wizard/auction_pay_buy.py @@ -76,14 +76,14 @@ class auction_pay_buy(osv.osv_memory): for datas in self.read(cr, uid, ids): if not abs(datas['total'] - (datas['amount'] + datas['amount2'] + datas['amount3'])) <0.01: rest = datas['total'] - (datas['amount'] + datas['amount2'] + datas['amount3']) - raise osv.except_osv('Payment aborted !', 'You should pay all the total: "%.2f" are missing to accomplish the payment.' %(round(rest, 2))) + raise osv.except_osv(_('Payment aborted !'), _('You should pay all the total: "%.2f" are missing to accomplish the payment.') %(round(rest, 2))) lots = lot_obj.browse(cr, uid, context['active_ids'], context) for lot in lots: if datas['buyer_id']: lot_obj.write(cr, uid, [lot.id], {'ach_uid': datas['buyer_id']}) if not lot.auction_id: - raise osv.except_osv('Error !', 'No auction date for "%s": Please set one.'%(lot.name)) + raise osv.except_osv(_('Error!'), _('No auction date for "%s": Please set one.') % (lot.name)) lot_obj.write(cr, uid, [lot.id], {'is_ok':True}) for st, stamount in [('statement_id1', 'amount'), ('statement_id2', 'amount2'), ('statement_id3', 'amount3')]: diff --git a/addons/base_calendar/base_calendar.py b/addons/base_calendar/base_calendar.py index dfbdc745613..9d07d52175f 100644 --- a/addons/base_calendar/base_calendar.py +++ b/addons/base_calendar/base_calendar.py @@ -1089,9 +1089,9 @@ class calendar_event(osv.osv): cr.execute("UPDATE %s set exrule=Null where id=%%s" % self._table,( event,)) elif datas.get('rrule_type') == 'custom': if datas.get('interval', 0) < 0: - raise osv.except_osv('Warning!', 'Interval can not be Negative') + raise osv.except_osv(_('Warning!'), _('Interval can not be Negative')) if datas.get('count', 0) < 0: - raise osv.except_osv('Warning!', 'Count can not be Negative') + raise osv.except_osv(_('Warning!'), _('Count can not be Negative')) rrule_custom = self.compute_rule_string(cr, uid, datas, \ context=context) result[event] = rrule_custom diff --git a/addons/base_calendar/i18n/base_calendar.pot b/addons/base_calendar/i18n/base_calendar.pot index cc3cdac7741..6ae7cb39df1 100644 --- a/addons/base_calendar/i18n/base_calendar.pot +++ b/addons/base_calendar/i18n/base_calendar.pot @@ -146,6 +146,24 @@ msgstr "" msgid "Warning !" msgstr "" +#. module: base_calendar +#: code:addons/base_calendar/base_calendar.py:0 +#, python-format +msgid "Warning!" +msgstr "" + +#. module: base_calendar +#: code:addons/base_calendar/base_calendar.py:0 +#, python-format +msgid "Interval can not be Negative" +msgstr "" + +#. module: base_calendar +#: code:addons/base_calendar/base_calendar.py:0 +#, python-format +msgid "Count can not be Negative" +msgstr "" + #. module: base_calendar #: selection:base.calendar.set.exrule,week_list:0 #: selection:calendar.event,week_list:0 diff --git a/addons/base_calendar/test/base_calendar_test.yml b/addons/base_calendar/test/base_calendar_test.yml index c84f8795f13..e04be20ccc2 100644 --- a/addons/base_calendar/test/base_calendar_test.yml +++ b/addons/base_calendar/test/base_calendar_test.yml @@ -27,8 +27,8 @@ I will search for one of the recurrent event and count the number of events - !python {model: calendar.event}: | - ids = self.search(cr, uid, [('date', '>=', '2010-05-01 00:00:00'), ('date', '<=', '2010-05-31 00:00:00')] ) - assert len(ids) + ids = self.search(cr, uid, [('date', '>=', '2010-04-30 16:00:00'), ('date', '<=', '2010-05-31 00:00:00')] ) + assert len(ids) == 10 - | Now I will make All day event and test it - diff --git a/addons/caldav/calendar.py b/addons/caldav/calendar.py index ccc4bf39fac..6090389d134 100644 --- a/addons/caldav/calendar.py +++ b/addons/caldav/calendar.py @@ -38,8 +38,7 @@ from tools.safe_eval import safe_eval as eval try: import vobject except ImportError: - raise osv.except_osv('vobject Import Error!','Please install python-vobject \ - from http://vobject.skyhouseconsulting.com/') + raise osv.except_osv(_('vobject Import Error!'), _('Please install python-vobject from http://vobject.skyhouseconsulting.com/')) # O-1 Optional and can come only once # O-n Optional and can come more than once diff --git a/addons/caldav/i18n/caldav.pot b/addons/caldav/i18n/caldav.pot index f199107103a..c6b5b3d731d 100644 --- a/addons/caldav/i18n/caldav.pot +++ b/addons/caldav/i18n/caldav.pot @@ -61,6 +61,18 @@ msgstr "" msgid "Warning !" msgstr "" +#. module: caldav +#: code:addons/caldav/calendar.py:0 +#, python-format +msgid "vobject Import Error!" +msgstr "" + +#. module: caldav +#: code:addons/caldav/calendar.py:0 +#, python-format +msgid "Please install python-vobject from http://vobject.skyhouseconsulting.com/" +msgstr "" + #. module: caldav #: field:basic.calendar,has_webcal:0 msgid "WebCal" diff --git a/addons/delivery/__openerp__.py b/addons/delivery/__openerp__.py index ad88d552e6b..baca1113190 100644 --- a/addons/delivery/__openerp__.py +++ b/addons/delivery/__openerp__.py @@ -40,7 +40,7 @@ 'partner_view.xml' ], 'demo_xml': ['delivery_demo.xml'], - 'test':['test/delivery_test.yml','test/delivery_report.yml'], + 'test':['test/delivery_report.yml'], 'installable': True, 'active': False, 'certificate': '0033981912253', diff --git a/addons/document_webdav/i18n/document_webdav.pot b/addons/document_webdav/i18n/document_webdav.pot index 49267f83709..5feb668045a 100644 --- a/addons/document_webdav/i18n/document_webdav.pot +++ b/addons/document_webdav/i18n/document_webdav.pot @@ -123,3 +123,14 @@ msgstr "" msgid "Name" msgstr "" +#. module: document_webdav +#: code:addons/document_webdav/webdav.py:0 +#, python-format +msgid "PyWebDAV Import Error!" +msgstr "" + +#. module: document_webdav +#: code:addons/document_webdav/webdav.py:0 +#, python-format +msgid "Please install PyWebDAV from http://code.google.com/p/pywebdav/downloads/detail?name=PyWebDAV-0.9.4.tar.gz&can=2&q=/" +msgstr "" diff --git a/addons/document_webdav/webdav.py b/addons/document_webdav/webdav.py index bb2b8caf470..302d8c2a8a7 100644 --- a/addons/document_webdav/webdav.py +++ b/addons/document_webdav/webdav.py @@ -27,14 +27,14 @@ from xml.dom.minicompat import StringTypes import urlparse import urllib from osv import osv +from tools.translate import _ try: from DAV import utils from DAV.propfind import PROPFIND from DAV.report import REPORT except ImportError: - raise osv.except_osv('PyWebDAV Import Error!','Please install PyWebDAV \ -from http://code.google.com/p/pywebdav/downloads/detail?name=PyWebDAV-0.9.4.tar.gz&can=2&q=/') + raise osv.except_osv(_('PyWebDAV Import Error!'), _('Please install PyWebDAV from http://code.google.com/p/pywebdav/downloads/detail?name=PyWebDAV-0.9.4.tar.gz&can=2&q=/')) import tools diff --git a/addons/l10n_ch/i18n/l10n_ch.pot b/addons/l10n_ch/i18n/l10n_ch.pot index 15f56be2508..447fbf7296e 100644 --- a/addons/l10n_ch/i18n/l10n_ch.pot +++ b/addons/l10n_ch/i18n/l10n_ch.pot @@ -190,6 +190,17 @@ msgid "Your bank BVR number should be of the form 0X-XXX-X!\n' \\n" " 'information for the invoice:\n%s" msgstr "" +#. module: l10n_ch +#: code:addons/l10n_ch/wizard/create_dta.py:0 +#, python-format +msgid "No address defined \n' \\n" +" 'for the partner: ' + pline.partner_id.name + '\n' \\n" +" 'on line: ' + pline.name))\n" +"\n" +" if pline.order_id.date_scheduled:\n" +" date_value = datetime.strptime(pline.order_id.date_scheduled, '%Y-%m-%d" +msgstr "" + #. module: l10n_ch #: view:bvr.invoices.report:0 #: view:bvr.report:0 diff --git a/addons/l10n_ch/wizard/create_dta.py b/addons/l10n_ch/wizard/create_dta.py index 5de49008ae2..98db2c6f426 100644 --- a/addons/l10n_ch/wizard/create_dta.py +++ b/addons/l10n_ch/wizard/create_dta.py @@ -464,9 +464,9 @@ def _create_dta(obj, cr, uid, data, context=None): v['partner_city']= '' v['partner_zip']= '' v['partner_country']= '' - raise osv.except_osv('Error', 'No address defined \n' \ + raise osv.except_osv(_('Error'), _('No address defined \n' \ 'for the partner: ' + pline.partner_id.name + '\n' \ - 'on line: ' + pline.name) + 'on line: ' + pline.name)) if pline.order_id.date_scheduled: date_value = datetime.strptime(pline.order_id.date_scheduled, '%Y-%m-%d') @@ -613,4 +613,4 @@ class create_dta_wizard(osv.osv_memory): create_dta_wizard() -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: \ No newline at end of file +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/marketing_campaign/i18n/marketing_campaign.pot b/addons/marketing_campaign/i18n/marketing_campaign.pot index 28c4e16b6e0..e2716ef0fd2 100644 --- a/addons/marketing_campaign/i18n/marketing_campaign.pot +++ b/addons/marketing_campaign/i18n/marketing_campaign.pot @@ -31,6 +31,18 @@ msgstr "" msgid "The current step for this item has no email or report to preview." msgstr "" +#. module: marketing_campaign +#: code:addons/marketing_campaign/marketing_campaign.py:0 +#, python-format +msgid "Operation not supported" +msgstr "" + +#. module: marketing_campaign +#: code:addons/marketing_campaign/marketing_campaign.py:0 +#, python-format +msgid "Sorry, campaign duplication is not supported at the moment." +msgstr "" + #. module: marketing_campaign #: code:addons/marketing_campaign/marketing_campaign.py:0 #, python-format diff --git a/addons/marketing_campaign/marketing_campaign.py b/addons/marketing_campaign/marketing_campaign.py index ffed09439a8..8cf6cfac0c4 100644 --- a/addons/marketing_campaign/marketing_campaign.py +++ b/addons/marketing_campaign/marketing_campaign.py @@ -205,7 +205,7 @@ Normal - the campaign runs normally and automatically sends all emails and repor # prevent duplication until the server properly duplicates several levels of nested o2m def copy(self, cr, uid, id, default=None, context=None): - raise osv.except_osv("Operation not supported", "Sorry, campaign duplication is not supported at the moment.") + raise osv.except_osv(_("Operation not supported"), _("Sorry, campaign duplication is not supported at the moment.")) marketing_campaign() diff --git a/addons/mrp/mrp.py b/addons/mrp/mrp.py index 7427b8b2048..d6917ae4820 100644 --- a/addons/mrp/mrp.py +++ b/addons/mrp/mrp.py @@ -19,8 +19,6 @@ # ############################################################################## -from itertools import groupby -from operator import itemgetter from datetime import datetime from osv import osv, fields from tools.translate import _ diff --git a/addons/mrp_repair/security/ir.model.access.csv b/addons/mrp_repair/security/ir.model.access.csv index e8b611bd933..b7f0c156fb9 100644 --- a/addons/mrp_repair/security/ir.model.access.csv +++ b/addons/mrp_repair/security/ir.model.access.csv @@ -21,4 +21,9 @@ "access_account_tax_manager","account.tax manager","account.model_account_tax","mrp.group_mrp_manager",1,0,0,0 "access_mrp_repair_fee_user_mrp","MRP Repair Fee user mrp","model_mrp_repair_fee","mrp.group_mrp_user",1,1,1,1 "access_mrp_repair_fee_mgr","MRP Repair Fee mgr","model_mrp_repair_fee","mrp.group_mrp_manager",1,0,0,0 - +"access_account_invoice_user","account.invoice","account.model_account_invoice","mrp.group_mrp_user",1,1,1,1 +"access_account_invoice_manager","account.invoice manager","account.model_account_invoice","mrp.group_mrp_manager",1,0,0,0 +"access_account_invoice_line_user","account.invoice.line","account.model_account_invoice_line","mrp.group_mrp_user",1,1,1,1 +"access_account_invoice_line_manager","account.invoice.line manager","account.model_account_invoice_line","mrp.group_mrp_manager",1,0,0,0 +"access_account_journal_user","account.journal","account.model_account_journal","mrp.group_mrp_user",1,1,1,1 +"access_account_journal_manager","account.journal manager","account.model_account_journal","mrp.group_mrp_manager",1,0,0,0 diff --git a/addons/mrp_repair/test/test_mrp_repair.yml b/addons/mrp_repair/test/test_mrp_repair.yml index 1cf82635825..3d9e85aa3ac 100644 --- a/addons/mrp_repair/test/test_mrp_repair.yml +++ b/addons/mrp_repair/test/test_mrp_repair.yml @@ -85,7 +85,7 @@ obj_lines = self.pool.get('account.invoice.line') inv_obj = self.pool.get('account.invoice') repair_id = self.browse(cr, uid, [ref('mrp_repair_rma0')], context=context)[0] - invoice_ids = inv_obj.search(cr, uid, [('partner_id', '=', repair_id.partner_invoice_id.id)]) + invoice_ids = inv_obj.search(cr, uid, [('partner_id', '=', repair_id.partner_id.id)]) invoice_id = inv_obj.browse(cr, uid, invoice_ids)[0] - assert repair_id.partner_invoice_id.id == invoice_id.partner_id.id, "No invoice existing for the same partner" + assert repair_id.partner_id.id == invoice_id.partner_id.id, "No invoice existing for the same partner" diff --git a/addons/point_of_sale/i18n/point_of_sale.pot b/addons/point_of_sale/i18n/point_of_sale.pot index e68356fca46..f6dcd701f7c 100644 --- a/addons/point_of_sale/i18n/point_of_sale.pot +++ b/addons/point_of_sale/i18n/point_of_sale.pot @@ -306,6 +306,12 @@ msgstr "" msgid "No valid pricelist line found !" msgstr "" +#. module: point_of_sale +#: code:addons/point_of_sale/wizard/pos_discount.py:0 +#, python-format +msgid "No Order Lines" +msgstr "" + #. module: point_of_sale #: report:pos.details:0 #: report:pos.lines:0 @@ -1754,6 +1760,7 @@ msgstr "" #. module: point_of_sale #: code:addons/point_of_sale/wizard/pos_payment.py:0 +#: code:addons/point_of_sale/wizard/pos_discount.py:0 #, python-format msgid "Error!" msgstr "" diff --git a/addons/point_of_sale/wizard/pos_discount.py b/addons/point_of_sale/wizard/pos_discount.py index d92a545a4ab..27bbd980dd6 100644 --- a/addons/point_of_sale/wizard/pos_discount.py +++ b/addons/point_of_sale/wizard/pos_discount.py @@ -49,7 +49,7 @@ class pos_discount(osv.osv_memory): record_id = context and context.get('active_id', False) or False order = self.pool.get('pos.order').browse(cr, uid, record_id, context=context) if not order.lines: - raise osv.except_osv('Error!','No Order Lines ') + raise osv.except_osv(_('Error!'), _('No Order Lines')) True def apply_discount(self, cr, uid, ids, context=None): """ diff --git a/addons/project/test/test_project.yml b/addons/project/test/test_project.yml index d417debac8c..bca3bcbff41 100644 --- a/addons/project/test/test_project.yml +++ b/addons/project/test/test_project.yml @@ -134,7 +134,7 @@ - Make a work task entry 'Training on OpenERP modules, models and classes' of 10 hours - - !record {model: project.task, id: project_task_technicaltraining0}: + !record {model: project.task, id: project_task_technicaltraining0, context:{'no_analytic_entry':True}}: work_ids: - date: '2010-05-31 15:04:22' hours: 10.0 @@ -149,7 +149,7 @@ - Make a work task entry 'Training on OpenERP xml views' of 10 hours - - !record {model: project.task, id: project_task_technicaltraining0}: + !record {model: project.task, id: project_task_technicaltraining0, context:{'no_analytic_entry':True}}: work_ids: - date: '2010-06-01 15:04:46' hours: 10.0 @@ -164,7 +164,7 @@ - Make a work task entry 'Training on workflows' of 10 hours - - !record {model: project.task, id: project_task_technicaltraining0}: + !record {model: project.task, id: project_task_technicaltraining0, context:{'no_analytic_entry':True}}: work_ids: - date: '2010-06-02 15:05:24' hours: 10.0 @@ -200,7 +200,7 @@ - Make a work task entry 'Training on reports and wizards' of 10 hours - - !record {model: project.task, id: project_task_technicaltraining0}: + !record {model: project.task, id: project_task_technicaltraining0, context:{'no_analytic_entry':True}}: work_ids: - date: '2010-05-31 15:08:40' hours: 10.0 @@ -251,7 +251,7 @@ - Make a work task entry 'Training on yml' of 5 hours - - !record {model: project.task, id: project_task_technicaltraining0}: + !record {model: project.task, id: project_task_technicaltraining0, context:{'no_analytic_entry':True}}: work_ids: - date: '2010-05-31 16:55:27' hours: 5.0 diff --git a/addons/project_caldav/project_caldav.py b/addons/project_caldav/project_caldav.py index ea6c02bc2cb..fb2d62a9684 100644 --- a/addons/project_caldav/project_caldav.py +++ b/addons/project_caldav/project_caldav.py @@ -32,6 +32,7 @@ class project_task(osv.osv): # force inherit from project.project_task so that # calendar.todo.active is masked oute 'active': base_project_task._columns['active'], + 'date_deadline': base_project_task._columns['date_deadline'], 'write_date': fields.datetime('Write Date'), 'create_date': fields.datetime('Create Date', readonly=True), 'attendee_ids': fields.many2many('calendar.attendee', \ diff --git a/addons/project_retro_planning/test/deadline_change.yml b/addons/project_retro_planning/test/deadline_change.yml index 012bc62a4eb..3e778916792 100644 --- a/addons/project_retro_planning/test/deadline_change.yml +++ b/addons/project_retro_planning/test/deadline_change.yml @@ -10,7 +10,7 @@ Create task 'Plan all projects' - !record {model: project.task, id: project_task_planallprojects0}: - date_deadline: '2010-06-07 12:00:00' + date_deadline: '2010-06-07' date_end: '2010-06-04 14:00:00' date_start: '2010-06-01 17:25:32' name: Plan all projects diff --git a/addons/project_timesheet/project_timesheet.py b/addons/project_timesheet/project_timesheet.py index 601fbfa578b..42104fcddc1 100644 --- a/addons/project_timesheet/project_timesheet.py +++ b/addons/project_timesheet/project_timesheet.py @@ -80,42 +80,42 @@ class project_work(osv.osv): vals_line = {} context = kwargs.get('context', {}) + if not context.get('no_analytic_entry',False): + obj_task = task_obj.browse(cr, uid, vals['task_id']) + result = self.get_user_related_details(cr, uid, vals.get('user_id', uid)) + vals_line['name'] = '%s: %s' % (tools.ustr(obj_task.name), tools.ustr(vals['name']) or '/') + vals_line['user_id'] = vals['user_id'] + vals_line['product_id'] = result['product_id'] + vals_line['date'] = vals['date'][:10] + + #calculate quantity based on employee's product's uom + vals_line['unit_amount'] = vals['hours'] - obj_task = task_obj.browse(cr, uid, vals['task_id']) - result = self.get_user_related_details(cr, uid, vals.get('user_id', uid)) - vals_line['name'] = '%s: %s' % (tools.ustr(obj_task.name), tools.ustr(vals['name']) or '/') - vals_line['user_id'] = vals['user_id'] - vals_line['product_id'] = result['product_id'] - vals_line['date'] = vals['date'][:10] - - #calculate quantity based on employee's product's uom - vals_line['unit_amount'] = vals['hours'] + default_uom = self.pool.get('res.users').browse(cr, uid, uid).company_id.project_time_mode_id.id + if result['product_uom_id'] != default_uom: + vals_line['unit_amount'] = uom_obj._compute_qty(cr, uid, default_uom, vals['hours'], result['product_uom_id']) + acc_id = obj_task.project_id and obj_task.project_id.analytic_account_id.id or False + if acc_id: + vals_line['account_id'] = acc_id + res = obj_timesheet.on_change_account_id(cr, uid, False, acc_id) + if res.get('value'): + vals_line.update(res['value']) + vals_line['general_account_id'] = result['general_account_id'] + vals_line['journal_id'] = result['journal_id'] + vals_line['amount'] = 0.0 + vals_line['product_uom_id'] = result['product_uom_id'] + amount = vals_line['unit_amount'] + prod_id = vals_line['product_id'] + unit = False + timeline_id = obj_timesheet.create(cr, uid, vals=vals_line, context=context) - default_uom = self.pool.get('res.users').browse(cr, uid, uid).company_id.project_time_mode_id.id - if result['product_uom_id'] != default_uom: - vals_line['unit_amount'] = uom_obj._compute_qty(cr, uid, default_uom, vals['hours'], result['product_uom_id']) - acc_id = obj_task.project_id and obj_task.project_id.analytic_account_id.id or False - if acc_id: - vals_line['account_id'] = acc_id - res = obj_timesheet.on_change_account_id(cr, uid, False, acc_id) - if res.get('value'): - vals_line.update(res['value']) - vals_line['general_account_id'] = result['general_account_id'] - vals_line['journal_id'] = result['journal_id'] - vals_line['amount'] = 0.0 - vals_line['product_uom_id'] = result['product_uom_id'] - amount = vals_line['unit_amount'] - prod_id = vals_line['product_id'] - unit = False - timeline_id = obj_timesheet.create(cr, uid, vals=vals_line, context=context) - - # Compute based on pricetype - amount_unit = obj_timesheet.on_change_unit_amount(cr, uid, timeline_id, - prod_id, amount, False, unit, context=context) - if amount_unit and 'amount' in amount_unit.get('value',{}): - updv = { 'amount': amount_unit['value']['amount'] } - obj_timesheet.write(cr, uid, [timeline_id], updv, context=context) - vals['hr_analytic_timesheet_id'] = timeline_id + # Compute based on pricetype + amount_unit = obj_timesheet.on_change_unit_amount(cr, uid, timeline_id, + prod_id, amount, False, unit, context=context) + if amount_unit and 'amount' in amount_unit.get('value',{}): + updv = { 'amount': amount_unit['value']['amount'] } + obj_timesheet.write(cr, uid, [timeline_id], updv, context=context) + vals['hr_analytic_timesheet_id'] = timeline_id return super(project_work,self).create(cr, uid, vals, *args, **kwargs) def write(self, cr, uid, ids, vals, context=None): diff --git a/addons/purchase_requisition/i18n/purchase_requisition.pot b/addons/purchase_requisition/i18n/purchase_requisition.pot index 4e1962aca32..7af2d513cfc 100644 --- a/addons/purchase_requisition/i18n/purchase_requisition.pot +++ b/addons/purchase_requisition/i18n/purchase_requisition.pot @@ -378,3 +378,14 @@ msgstr "" msgid "Purchase Orders" msgstr "" +#. module: purchase_requisition +#: code:addons/purchase_requisition/wizard/purchase_requisition_partner.py:0 +#, python-format +msgid "Error!" +msgstr "" + +#. module: purchase_requisition +#: code:addons/purchase_requisition/wizard/purchase_requisition_partner.py:0 +#, python-format +msgid "No Product in Tender" +msgstr "" diff --git a/addons/purchase_requisition/wizard/purchase_requisition_partner.py b/addons/purchase_requisition/wizard/purchase_requisition_partner.py index ad2478cb7a5..a5a291b545d 100644 --- a/addons/purchase_requisition/wizard/purchase_requisition_partner.py +++ b/addons/purchase_requisition/wizard/purchase_requisition_partner.py @@ -24,6 +24,7 @@ from datetime import datetime from dateutil.relativedelta import relativedelta from osv import fields, osv from osv.orm import browse_record, browse_null +from tools.translate import _ class purchase_requisition_partner(osv.osv_memory): _name = "purchase.requisition.partner" @@ -38,7 +39,7 @@ class purchase_requisition_partner(osv.osv_memory): record_id = context and context.get('active_id', False) or False tender = self.pool.get('purchase.requisition').browse(cr, uid, record_id) if not tender.line_ids: - raise osv.except_osv('Error!','No Product in Tender') + raise osv.except_osv(_('Error!'), _('No Product in Tender')) True def onchange_partner_id(self, cr, uid, ids, partner_id): diff --git a/addons/stock/i18n/stock.pot b/addons/stock/i18n/stock.pot index 621528f9013..f38624efd12 100644 --- a/addons/stock/i18n/stock.pot +++ b/addons/stock/i18n/stock.pot @@ -3379,10 +3379,17 @@ msgstr "" #: code:addons/stock/product.py:0 #: code:addons/stock/stock.py:0 #: code:addons/stock/wizard/stock_splitinto.py:0 +#: code:addons/stock/wizard/stock_fill_inventory.py:0 #, python-format msgid "Error!" msgstr "" +#. module: stock +#: code:addons/stock/wizard/stock_fill_inventory.py:0 +#, python-format +msgid "Stock Inventory is done" +msgstr "" + #. module: stock #: code:addons/stock/stock.py:0 #, python-format diff --git a/addons/stock/stock.py b/addons/stock/stock.py index a8d6d567fa6..df5baad3527 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -2008,7 +2008,6 @@ class stock_move(osv.osv): for id in ids: wf_service.trg_trigger(uid, 'stock.move', id, cr) - picking_obj = self.pool.get('stock.picking') wf_service = netsvc.LocalService("workflow") for pick_id in picking_ids: wf_service.trg_write(uid, 'stock.picking', pick_id, cr) diff --git a/addons/stock/wizard/stock_fill_inventory.py b/addons/stock/wizard/stock_fill_inventory.py index 599377fec1e..83bfdaf9a4c 100644 --- a/addons/stock/wizard/stock_fill_inventory.py +++ b/addons/stock/wizard/stock_fill_inventory.py @@ -45,7 +45,7 @@ class stock_fill_inventory(osv.osv_memory): if context.get('active_id', False): stock = self.pool.get('stock.inventory').browse(cr, uid, context.get('active_id', False)) if stock.state=='done': - raise osv.except_osv('Error!','Stock Inventory is done') + raise osv.except_osv(_('Error!'), _('Stock Inventory is done')) True def fill_inventory(self, cr, uid, ids, context=None): diff --git a/addons/stock_invoice_directly/test/stock_invoice_directly.yml b/addons/stock_invoice_directly/test/stock_invoice_directly.yml index 4a0708b84d9..b5ecb83caf2 100644 --- a/addons/stock_invoice_directly/test/stock_invoice_directly.yml +++ b/addons/stock_invoice_directly/test/stock_invoice_directly.yml @@ -60,16 +60,12 @@ } pick_obj.do_partial(cr, uid, [ref('stock_picking_out0')], partial_datas, context=context) - - As the Invoice state of the picking order is To be invoiced. I create a record for create invoice. -- - !record {model: stock.invoice.onshipping, id: stock_invoice_onshipping_0}: - invoice_date: '2010-08-04' - journal_id: account.bank_journal -- - I create a Customer invoice for my outgoing picking order. + As the Invoice state of the picking order is To be invoiced. I create invoice for my outgoing picking order. - !python {model: stock.invoice.onshipping}: | - self.create_invoice(cr, uid, [ref("stock_invoice_onshipping_0")], {"lang": "en_US", + wiz_id = self.create(cr, uid, {'invoice_date': '2010-08-04', 'journal_id': ref('account.bank_journal')}, + {'active_ids': [ref("stock_picking_out0")]}) + self.create_invoice(cr, uid, [wiz_id], {"lang": "en_US", "search_default_available": 1, "tz": False, "active_model": "stock.picking", "contact_display": "partner", "active_ids": [ref("stock_picking_out0")], "active_id": ref("stock_picking_out0")}) - diff --git a/addons/wiki/web/widgets/wikimarkup/__init__.py b/addons/wiki/web/widgets/wikimarkup/__init__.py index ac63feacfbb..5eceea0e86d 100644 --- a/addons/wiki/web/widgets/wikimarkup/__init__.py +++ b/addons/wiki/web/widgets/wikimarkup/__init__.py @@ -1977,9 +1977,9 @@ class Parser(BaseParser): if toclevel < wgMaxTocLevel: toc.append(u"\n") toc.append(u"\n\n" * max(0, toclevel - 1)) - #TODO: use gettext - #toc.insert(0, u'

' + _('Table of Contents') + '

') - toc.insert(0, u'

Table of Contents

') + #TODO: use gettext + #toc.insert(0, u'

' + _('Table of Contents') + '

') + toc.insert(0, u'

Table of Contents

') toc.append(u'\n
') # split up and insert constructed headlines