From aee4f37587717debe8a8cf315c0a0ba65c4f7e24 Mon Sep 17 00:00:00 2001 From: Mustufa Rangwala Date: Wed, 10 Nov 2010 11:37:22 +0530 Subject: [PATCH 01/14] [FIX] Account_sequnce: if internal seq is not given on journal bzr revid: mra@mra-laptop-20101110060722-076e9l38d5134sgk --- addons/account_sequence/__openerp__.py | 3 ++- addons/account_sequence/account_sequence.py | 17 +++++++++-------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/addons/account_sequence/__openerp__.py b/addons/account_sequence/__openerp__.py index 5781e6db79e..e6580c4088c 100644 --- a/addons/account_sequence/__openerp__.py +++ b/addons/account_sequence/__openerp__.py @@ -20,7 +20,7 @@ ############################################################################## { - 'name': 'Sequence Numbering', + 'name': 'Entries Sequence Numbering', 'version': '1.1', 'category': 'Generic Modules/Accounting', 'description': """ @@ -36,4 +36,5 @@ 'active': False, 'certificate': '', } + # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/account_sequence/account_sequence.py b/addons/account_sequence/account_sequence.py index f9a881decbc..496fb08bc05 100644 --- a/addons/account_sequence/account_sequence.py +++ b/addons/account_sequence/account_sequence.py @@ -24,29 +24,30 @@ from osv import osv, fields class account_move(osv.osv): _inherit = 'account.move' - + _columns = { 'internal_sequence_number': fields.char('Internal Sequence Number', size=64, readonly=True), } - + def post(self, cr, uid, ids, context=None): obj_sequence = self.pool.get('ir.sequence') - res = super(account_move, self).post(cr, uid, ids, context) + res = super(account_move, self).post(cr, uid, ids, context=context) + seq_no = False for line in self.browse(cr, uid, ids): if line.journal_id.internal_sequence: - c = {'fiscalyear_id': line.period_id.fiscalyear_id.id} - seq_no = obj_sequence.get_id(cr, uid, line.journal_id.internal_sequence.id, context=c) + seq_no = obj_sequence.get_id(cr, uid, line.journal_id.internal_sequence.id, context=context) if seq_no: - self.write(cr, uid, [line.id], {'internal_sequence_number':seq_no}) + self.write(cr, uid, [line.id], {'internal_sequence_number': seq_no}) return res - + account_move() class account_journal(osv.osv): _inherit = "account.journal" - + _columns = { 'internal_sequence': fields.many2one('ir.sequence', 'Internal Sequence'), } account_journal() + # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: \ No newline at end of file From 8999b298a76cf63b49e2637e21097e1d937159ed Mon Sep 17 00:00:00 2001 From: Mustufa Rangwala Date: Wed, 10 Nov 2010 13:42:44 +0530 Subject: [PATCH 02/14] [REF] base_vat: remove unused import partial bzr revid: mra@mra-laptop-20101110081244-v7j4hlssp1vpqf0z --- addons/base_vat/base_vat.py | 1 - 1 file changed, 1 deletion(-) diff --git a/addons/base_vat/base_vat.py b/addons/base_vat/base_vat.py index 84624c6bba6..a6b396fd506 100644 --- a/addons/base_vat/base_vat.py +++ b/addons/base_vat/base_vat.py @@ -22,7 +22,6 @@ import string from osv import osv, fields -from tools.func import partial from tools.translate import _ _ref_vat = { From ba66baf2be69ad5d91d7a85514b9bb17256c7c3a Mon Sep 17 00:00:00 2001 From: Mustufa Rangwala Date: Wed, 10 Nov 2010 13:50:11 +0530 Subject: [PATCH 03/14] [REF] account: Removed wanrings from buildbot bzr revid: mra@mra-laptop-20101110082011-k7iwkgopgv5lbbix --- addons/account/account.py | 2 +- addons/account/account_bank_statement.py | 2 -- addons/account/wizard/account_report_aged_partner_balance.py | 1 - addons/account_followup/wizard/account_followup_print.py | 4 +--- addons/account_payment/wizard/account_payment_order.py | 2 +- 5 files changed, 3 insertions(+), 8 deletions(-) diff --git a/addons/account/account.py b/addons/account/account.py index 1033f02f841..eb5b227979b 100644 --- a/addons/account/account.py +++ b/addons/account/account.py @@ -20,7 +20,7 @@ ############################################################################## import time -from datetime import datetime, timedelta +from datetime import datetime from dateutil.relativedelta import relativedelta from operator import itemgetter diff --git a/addons/account/account_bank_statement.py b/addons/account/account_bank_statement.py index aa4f45bad58..1859d055e78 100644 --- a/addons/account/account_bank_statement.py +++ b/addons/account/account_bank_statement.py @@ -423,8 +423,6 @@ account_bank_statement() class account_bank_statement_line(osv.osv): def onchange_type(self, cr, uid, line_id, partner_id, type, context=None): - res_users_obj = self.pool.get('res.users') - res_currency_obj = self.pool.get('res.currency') res = {'value': {}} obj_partner = self.pool.get('res.partner') if context is None: diff --git a/addons/account/wizard/account_report_aged_partner_balance.py b/addons/account/wizard/account_report_aged_partner_balance.py index 8c7e6988b5a..5eb1f0f5a2e 100644 --- a/addons/account/wizard/account_report_aged_partner_balance.py +++ b/addons/account/wizard/account_report_aged_partner_balance.py @@ -45,7 +45,6 @@ class account_aged_trial_balance(osv.osv_memory): } def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False, submenu=False): - mod_obj = self.pool.get('ir.model.data') res = super(account_aged_trial_balance, self).fields_view_get(cr, uid, view_id=view_id, view_type=view_type, context=context, toolbar=toolbar, submenu=False) doc = etree.XML(res['arch']) nodes = doc.xpath("//field[@name='journal_ids']") diff --git a/addons/account_followup/wizard/account_followup_print.py b/addons/account_followup/wizard/account_followup_print.py index 6b58cebdae1..18c455ac07a 100644 --- a/addons/account_followup/wizard/account_followup_print.py +++ b/addons/account_followup/wizard/account_followup_print.py @@ -107,7 +107,7 @@ class account_followup_stat_by_partner(osv.osv): l.reconcile_id is NULL AND l.partner_id IS NOT NULL GROUP BY - l.partner_id, l.company_id + l.partner_id, l.company_id )""") account_followup_stat_by_partner() @@ -212,10 +212,8 @@ class account_followup_print_all(osv.osv_memory): model_data_ids = mod_obj.search(cr, uid, [('model','=','ir.ui.view'),('name','=','view_account_followup_print_all_msg')], context=context) resource_id = mod_obj.read(cr, uid, model_data_ids, fields=['res_id'], context=context)[0]['res_id'] if data['email_conf']: - mail_notsent = '' msg_sent = '' msg_unsent = '' - count = 0 data_user = user_obj.browse(cr, uid, uid) move_lines = line_obj.browse(cr, uid, data['partner_ids']) partners = [] diff --git a/addons/account_payment/wizard/account_payment_order.py b/addons/account_payment/wizard/account_payment_order.py index aedef85de5e..aaec72e37f7 100644 --- a/addons/account_payment/wizard/account_payment_order.py +++ b/addons/account_payment/wizard/account_payment_order.py @@ -100,7 +100,7 @@ class payment_order_create(osv.osv_memory): context = {} data = self.read(cr, uid, ids, [], context=context)[0] search_due_date = data['duedate'] - payment = order_obj.browse(cr, uid, context['active_id'], context=context) +# payment = order_obj.browse(cr, uid, context['active_id'], context=context) # Search for move line to pay: domain = [('reconcile_id', '=', False), ('account_id.type', '=', 'payable'), ('amount_to_pay', '>', 0)] From 5af938368710a7d617b6b187776cf532770ca48c Mon Sep 17 00:00:00 2001 From: Mustufa Rangwala Date: Wed, 10 Nov 2010 13:58:46 +0530 Subject: [PATCH 04/14] [REF] HR payroll and holidays: Removed wanrings from buildbot bzr revid: mra@mra-laptop-20101110082846-z59nb73g5gttkelw --- addons/hr_holidays/wizard/hr_holidays_summary_employees.py | 1 - addons/hr_payroll/wizard/hr_payroll_employees_detail.py | 1 - addons/hr_payroll/wizard/hr_payroll_year_salary.py | 1 - 3 files changed, 3 deletions(-) diff --git a/addons/hr_holidays/wizard/hr_holidays_summary_employees.py b/addons/hr_holidays/wizard/hr_holidays_summary_employees.py index 1dc96afedb9..984a1f51e4b 100644 --- a/addons/hr_holidays/wizard/hr_holidays_summary_employees.py +++ b/addons/hr_holidays/wizard/hr_holidays_summary_employees.py @@ -21,7 +21,6 @@ import time from osv import osv, fields -from tools.translate import _ class hr_holidays_summary_employee(osv.osv_memory): _name = 'hr.holidays.summary.employee' diff --git a/addons/hr_payroll/wizard/hr_payroll_employees_detail.py b/addons/hr_payroll/wizard/hr_payroll_employees_detail.py index edac1dde3f4..2bb36b6f282 100755 --- a/addons/hr_payroll/wizard/hr_payroll_employees_detail.py +++ b/addons/hr_payroll/wizard/hr_payroll_employees_detail.py @@ -22,7 +22,6 @@ import time from osv import fields, osv -from tools.translate import _ class hr_payroll_employees_detail(osv.osv_memory): diff --git a/addons/hr_payroll/wizard/hr_payroll_year_salary.py b/addons/hr_payroll/wizard/hr_payroll_year_salary.py index 240f21c3582..41caf5f4109 100755 --- a/addons/hr_payroll/wizard/hr_payroll_year_salary.py +++ b/addons/hr_payroll/wizard/hr_payroll_year_salary.py @@ -22,7 +22,6 @@ import time from osv import fields, osv -from tools.translate import _ class hr_payroll_year_salary(osv.osv_memory): _name = "hr.payroll.year.salary" From bc2db516c82318e853ed20df8fdb4c3b4dcde24c Mon Sep 17 00:00:00 2001 From: Mustufa Rangwala Date: Wed, 10 Nov 2010 14:31:10 +0530 Subject: [PATCH 05/14] [FIX] Account: move line => tab analytic line with proper group set bzr revid: mra@mra-laptop-20101110090110-tl59lqhfz6kvco6o --- addons/account/account_view.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account/account_view.xml b/addons/account/account_view.xml index acbe5071088..5ef08efc5bb 100644 --- a/addons/account/account_view.xml +++ b/addons/account/account_view.xml @@ -1358,7 +1358,7 @@ - + From 7aa80843f94d2bc2b40eda7a140c7f725ea3a403 Mon Sep 17 00:00:00 2001 From: Mustufa Rangwala Date: Wed, 10 Nov 2010 14:33:41 +0530 Subject: [PATCH 06/14] [FIX] Account: move line => tab analytic line with proper group set bzr revid: mra@mra-laptop-20101110090341-f6xnqk61xmr5g6mu --- addons/account/account_view.xml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/addons/account/account_view.xml b/addons/account/account_view.xml index 5ef08efc5bb..aaabc86d865 100644 --- a/addons/account/account_view.xml +++ b/addons/account/account_view.xml @@ -1065,8 +1065,8 @@ - - + + @@ -1112,8 +1112,8 @@ - - + + @@ -1359,7 +1359,7 @@ - + From 099cb32b51f626cfc07a8ec3224a28fc227f2180 Mon Sep 17 00:00:00 2001 From: Mustufa Rangwala Date: Wed, 10 Nov 2010 14:49:28 +0530 Subject: [PATCH 07/14] [REM] Account: Bank statement: button_import_invoice unused function removed bzr revid: mra@mra-laptop-20101110091928-md56a5yxxb85l4l0 --- addons/account/account_bank_statement.py | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/addons/account/account_bank_statement.py b/addons/account/account_bank_statement.py index 1859d055e78..0b03f52a1e9 100644 --- a/addons/account/account_bank_statement.py +++ b/addons/account/account_bank_statement.py @@ -46,26 +46,6 @@ class account_bank_statement(osv.osv): account_bank_statement_line_obj.write(cr, uid, [line.id], {'sequence': seq}, context=context) return res - def button_import_invoice(self, cr, uid, ids, context=None): - mod_obj = self.pool.get('ir.model.data') - if context is None: - context = {} - model_data_ids = mod_obj.search(cr, uid, [('model','=','ir.ui.view'),('name','=','view_account_statement_from_invoice')], context=context) - resource_id = mod_obj.read(cr, uid, model_data_ids, fields=['res_id'], context=context)[0]['res_id'] - context.update({'statement_id': ids[0]}) - - return { - 'name': _('Import Invoice'), - 'context': context, - 'view_type': 'form', - 'view_mode': 'tree,form', - 'res_model': 'account.statement.from.invoice', - 'views': [(resource_id,'form')], - 'type': 'ir.actions.act_window', - 'target': 'new', - 'nodestroy': True - } - def _default_journal_id(self, cr, uid, context={}): journal_pool = self.pool.get('account.journal') journal_type = context.get('journal_type', False) From cdc4d03bbac53c256425bfeaab8af93579d3feb1 Mon Sep 17 00:00:00 2001 From: mtr Date: Wed, 10 Nov 2010 15:38:41 +0530 Subject: [PATCH 08/14] [IMP] account: Corrected the spelling 'Trail Balance' to 'Trial Balance' bzr revid: mtr@mtr-20101110100841-ilv301r7srj3dwut --- addons/account/i18n/account.pot | 2 +- addons/account/i18n/ar.po | 2 +- addons/account/i18n/bg.po | 2 +- addons/account/i18n/bs.po | 2 +- addons/account/i18n/ca.po | 2 +- addons/account/i18n/cs.po | 2 +- addons/account/i18n/da.po | 2 +- addons/account/i18n/de.po | 2 +- addons/account/i18n/el.po | 2 +- addons/account/i18n/es.po | 2 +- addons/account/i18n/es_AR.po | 2 +- addons/account/i18n/es_EC.po | 2 +- addons/account/i18n/et.po | 2 +- addons/account/i18n/eu.po | 2 +- addons/account/i18n/fa.po | 2 +- addons/account/i18n/fi.po | 2 +- addons/account/i18n/fr.po | 2 +- addons/account/i18n/gl.po | 2 +- addons/account/i18n/gu.po | 2 +- addons/account/i18n/hr.po | 2 +- addons/account/i18n/hu.po | 2 +- addons/account/i18n/id.po | 2 +- addons/account/i18n/it.po | 2 +- addons/account/i18n/kab.po | 2 +- addons/account/i18n/ko.po | 2 +- addons/account/i18n/lt.po | 2 +- addons/account/i18n/lv.po | 2 +- addons/account/i18n/mn.po | 2 +- addons/account/i18n/nb.po | 2 +- addons/account/i18n/nl.po | 2 +- addons/account/i18n/nl_BE.po | 2 +- addons/account/i18n/oc.po | 2 +- addons/account/i18n/pl.po | 2 +- addons/account/i18n/pt.po | 2 +- addons/account/i18n/pt_BR.po | 2 +- addons/account/i18n/ro.po | 2 +- addons/account/i18n/ru.po | 2 +- addons/account/i18n/si.po | 2 +- addons/account/i18n/sk.po | 2 +- addons/account/i18n/sl.po | 2 +- addons/account/i18n/sq.po | 2 +- addons/account/i18n/sr.po | 2 +- addons/account/i18n/sv.po | 2 +- addons/account/i18n/ta.po | 2 +- addons/account/i18n/te.po | 2 +- addons/account/i18n/th.po | 2 +- addons/account/i18n/tlh.po | 2 +- addons/account/i18n/tr.po | 2 +- addons/account/i18n/ug.po | 2 +- addons/account/i18n/uk.po | 2 +- addons/account/i18n/vi.po | 2 +- addons/account/i18n/zh_CN.po | 2 +- addons/account/i18n/zh_HK.po | 2 +- addons/account/i18n/zh_TW.po | 2 +- 54 files changed, 54 insertions(+), 54 deletions(-) diff --git a/addons/account/i18n/account.pot b/addons/account/i18n/account.pot index 2a868a59fd7..942c156da33 100644 --- a/addons/account/i18n/account.pot +++ b/addons/account/i18n/account.pot @@ -8778,5 +8778,5 @@ msgstr "" #: model:ir.actions.act_window,name:action_account_balance_menu #: model:ir.actions.report.xml,name:account.account_account_balance #: model:ir.ui.menu,name:account.menu_general_Balance_report -msgid "Trail Balance" +msgid "Trial Balance" msgstr "" diff --git a/addons/account/i18n/ar.po b/addons/account/i18n/ar.po index cd554b87df6..d3233f9272a 100644 --- a/addons/account/i18n/ar.po +++ b/addons/account/i18n/ar.po @@ -40,7 +40,7 @@ msgstr "" #. module: account #: model:ir.ui.menu,name:account.menu_general_Balance_report -msgid "Trail Balance" +msgid "Trial Balance" msgstr "" #. module: account diff --git a/addons/account/i18n/bg.po b/addons/account/i18n/bg.po index d5f04a8b831..84251db60fa 100644 --- a/addons/account/i18n/bg.po +++ b/addons/account/i18n/bg.po @@ -40,7 +40,7 @@ msgstr "" #. module: account #: model:ir.ui.menu,name:account.menu_general_Balance_report -msgid "Trail Balance" +msgid "Trial Balance" msgstr "" #. module: account diff --git a/addons/account/i18n/bs.po b/addons/account/i18n/bs.po index a9de7eb12a9..0008b7bf0c6 100644 --- a/addons/account/i18n/bs.po +++ b/addons/account/i18n/bs.po @@ -45,7 +45,7 @@ msgstr "" #. module: account #: model:ir.ui.menu,name:account.menu_general_Balance_report -msgid "Trail Balance" +msgid "Trial Balance" msgstr "" #. module: account diff --git a/addons/account/i18n/ca.po b/addons/account/i18n/ca.po index 81998dbe1cf..212a7d320b4 100644 --- a/addons/account/i18n/ca.po +++ b/addons/account/i18n/ca.po @@ -46,7 +46,7 @@ msgstr "" #. module: account #: model:ir.ui.menu,name:account.menu_general_Balance_report -msgid "Trail Balance" +msgid "Trial Balance" msgstr "" #. module: account diff --git a/addons/account/i18n/cs.po b/addons/account/i18n/cs.po index caac27ebbd0..3f878c3817c 100644 --- a/addons/account/i18n/cs.po +++ b/addons/account/i18n/cs.po @@ -45,7 +45,7 @@ msgstr "" #. module: account #: model:ir.ui.menu,name:account.menu_general_Balance_report -msgid "Trail Balance" +msgid "Trial Balance" msgstr "" #. module: account diff --git a/addons/account/i18n/da.po b/addons/account/i18n/da.po index 93ef9b842b2..1481083d175 100644 --- a/addons/account/i18n/da.po +++ b/addons/account/i18n/da.po @@ -46,7 +46,7 @@ msgstr "" #. module: account #: model:ir.ui.menu,name:account.menu_general_Balance_report -msgid "Trail Balance" +msgid "Trial Balance" msgstr "" #. module: account diff --git a/addons/account/i18n/de.po b/addons/account/i18n/de.po index 2b3b2d898f4..c7a6a950cd6 100644 --- a/addons/account/i18n/de.po +++ b/addons/account/i18n/de.po @@ -45,7 +45,7 @@ msgstr "" #. module: account #: model:ir.ui.menu,name:account.menu_general_Balance_report -msgid "Trail Balance" +msgid "Trial Balance" msgstr "" #. module: account diff --git a/addons/account/i18n/el.po b/addons/account/i18n/el.po index 90753154d4f..e25913ae286 100644 --- a/addons/account/i18n/el.po +++ b/addons/account/i18n/el.po @@ -46,7 +46,7 @@ msgstr "" #. module: account #: model:ir.ui.menu,name:account.menu_general_Balance_report -msgid "Trail Balance" +msgid "Trial Balance" msgstr "" #. module: account diff --git a/addons/account/i18n/es.po b/addons/account/i18n/es.po index 24d6522d8a8..4f671cbd174 100644 --- a/addons/account/i18n/es.po +++ b/addons/account/i18n/es.po @@ -46,7 +46,7 @@ msgstr "" #. module: account #: model:ir.ui.menu,name:account.menu_general_Balance_report -msgid "Trail Balance" +msgid "Trial Balance" msgstr "" #. module: account diff --git a/addons/account/i18n/es_AR.po b/addons/account/i18n/es_AR.po index fe1ac0bc1b5..c763da1d8da 100644 --- a/addons/account/i18n/es_AR.po +++ b/addons/account/i18n/es_AR.po @@ -45,7 +45,7 @@ msgstr "" #. module: account #: model:ir.ui.menu,name:account.menu_general_Balance_report -msgid "Trail Balance" +msgid "Trial Balance" msgstr "" #. module: account diff --git a/addons/account/i18n/es_EC.po b/addons/account/i18n/es_EC.po index 42272da001a..f0c26add3c6 100644 --- a/addons/account/i18n/es_EC.po +++ b/addons/account/i18n/es_EC.po @@ -46,7 +46,7 @@ msgstr "" #. module: account #: model:ir.ui.menu,name:account.menu_general_Balance_report -msgid "Trail Balance" +msgid "Trial Balance" msgstr "" #. module: account diff --git a/addons/account/i18n/et.po b/addons/account/i18n/et.po index afc05e574c1..3cb2df44bbf 100644 --- a/addons/account/i18n/et.po +++ b/addons/account/i18n/et.po @@ -45,7 +45,7 @@ msgstr "" #. module: account #: model:ir.ui.menu,name:account.menu_general_Balance_report -msgid "Trail Balance" +msgid "Trial Balance" msgstr "" #. module: account diff --git a/addons/account/i18n/eu.po b/addons/account/i18n/eu.po index cb3abba9e2f..7a0910887f1 100644 --- a/addons/account/i18n/eu.po +++ b/addons/account/i18n/eu.po @@ -46,7 +46,7 @@ msgstr "" #. module: account #: model:ir.ui.menu,name:account.menu_general_Balance_report -msgid "Trail Balance" +msgid "Trial Balance" msgstr "" #. module: account diff --git a/addons/account/i18n/fa.po b/addons/account/i18n/fa.po index 5785f8d5e79..c9da4d5dcdf 100644 --- a/addons/account/i18n/fa.po +++ b/addons/account/i18n/fa.po @@ -46,7 +46,7 @@ msgstr "" #. module: account #: model:ir.ui.menu,name:account.menu_general_Balance_report -msgid "Trail Balance" +msgid "Trial Balance" msgstr "" #. module: account diff --git a/addons/account/i18n/fi.po b/addons/account/i18n/fi.po index 4146d473b18..552103f981a 100644 --- a/addons/account/i18n/fi.po +++ b/addons/account/i18n/fi.po @@ -46,7 +46,7 @@ msgstr "" #. module: account #: model:ir.ui.menu,name:account.menu_general_Balance_report -msgid "Trail Balance" +msgid "Trial Balance" msgstr "" #. module: account diff --git a/addons/account/i18n/fr.po b/addons/account/i18n/fr.po index c2eba12ea58..4ba8c0546c3 100644 --- a/addons/account/i18n/fr.po +++ b/addons/account/i18n/fr.po @@ -40,7 +40,7 @@ msgstr "" #. module: account #: model:ir.ui.menu,name:account.menu_general_Balance_report -msgid "Trail Balance" +msgid "Trial Balance" msgstr "" #. module: account diff --git a/addons/account/i18n/gl.po b/addons/account/i18n/gl.po index 8ef85f6e140..3aeb3b99785 100644 --- a/addons/account/i18n/gl.po +++ b/addons/account/i18n/gl.po @@ -42,7 +42,7 @@ msgstr "" #. module: account #: model:ir.ui.menu,name:account.menu_general_Balance_report -msgid "Trail Balance" +msgid "Trial Balance" msgstr "" #. module: account diff --git a/addons/account/i18n/gu.po b/addons/account/i18n/gu.po index f98c642792d..3578c4a999c 100644 --- a/addons/account/i18n/gu.po +++ b/addons/account/i18n/gu.po @@ -41,7 +41,7 @@ msgstr "" #. module: account #: model:ir.ui.menu,name:account.menu_general_Balance_report -msgid "Trail Balance" +msgid "Trial Balance" msgstr "" #. module: account diff --git a/addons/account/i18n/hr.po b/addons/account/i18n/hr.po index b18116dc799..b45f340c066 100644 --- a/addons/account/i18n/hr.po +++ b/addons/account/i18n/hr.po @@ -45,7 +45,7 @@ msgstr "" #. module: account #: model:ir.ui.menu,name:account.menu_general_Balance_report -msgid "Trail Balance" +msgid "Trial Balance" msgstr "" #. module: account diff --git a/addons/account/i18n/hu.po b/addons/account/i18n/hu.po index 61052f87d59..5414080872e 100644 --- a/addons/account/i18n/hu.po +++ b/addons/account/i18n/hu.po @@ -45,7 +45,7 @@ msgstr "" #. module: account #: model:ir.ui.menu,name:account.menu_general_Balance_report -msgid "Trail Balance" +msgid "Trial Balance" msgstr "" #. module: account diff --git a/addons/account/i18n/id.po b/addons/account/i18n/id.po index 8e51392bbf6..6086832bf1e 100644 --- a/addons/account/i18n/id.po +++ b/addons/account/i18n/id.po @@ -46,7 +46,7 @@ msgstr "" #. module: account #: model:ir.ui.menu,name:account.menu_general_Balance_report -msgid "Trail Balance" +msgid "Trial Balance" msgstr "" #. module: account diff --git a/addons/account/i18n/it.po b/addons/account/i18n/it.po index c1202e820a5..4397ca398fc 100644 --- a/addons/account/i18n/it.po +++ b/addons/account/i18n/it.po @@ -45,7 +45,7 @@ msgstr "" #. module: account #: model:ir.ui.menu,name:account.menu_general_Balance_report -msgid "Trail Balance" +msgid "Trial Balance" msgstr "" #. module: account diff --git a/addons/account/i18n/kab.po b/addons/account/i18n/kab.po index 8e9684195c1..e70fa3d4c1b 100644 --- a/addons/account/i18n/kab.po +++ b/addons/account/i18n/kab.po @@ -46,7 +46,7 @@ msgstr "" #. module: account #: model:ir.ui.menu,name:account.menu_general_Balance_report -msgid "Trail Balance" +msgid "Trial Balance" msgstr "" #. module: account diff --git a/addons/account/i18n/ko.po b/addons/account/i18n/ko.po index fe6c7aab51e..c3f94cd30e4 100644 --- a/addons/account/i18n/ko.po +++ b/addons/account/i18n/ko.po @@ -46,7 +46,7 @@ msgstr "" #. module: account #: model:ir.ui.menu,name:account.menu_general_Balance_report -msgid "Trail Balance" +msgid "Trial Balance" msgstr "" #. module: account diff --git a/addons/account/i18n/lt.po b/addons/account/i18n/lt.po index 04f2b239971..ea847173c29 100644 --- a/addons/account/i18n/lt.po +++ b/addons/account/i18n/lt.po @@ -45,7 +45,7 @@ msgstr "" #. module: account #: model:ir.ui.menu,name:account.menu_general_Balance_report -msgid "Trail Balance" +msgid "Trial Balance" msgstr "" #. module: account diff --git a/addons/account/i18n/lv.po b/addons/account/i18n/lv.po index e00bbe4db44..1e2c4a4fa3d 100644 --- a/addons/account/i18n/lv.po +++ b/addons/account/i18n/lv.po @@ -46,7 +46,7 @@ msgstr "" #. module: account #: model:ir.ui.menu,name:account.menu_general_Balance_report -msgid "Trail Balance" +msgid "Trial Balance" msgstr "" #. module: account diff --git a/addons/account/i18n/mn.po b/addons/account/i18n/mn.po index dbe66854b5c..941a2063e26 100644 --- a/addons/account/i18n/mn.po +++ b/addons/account/i18n/mn.po @@ -46,7 +46,7 @@ msgstr "" #. module: account #: model:ir.ui.menu,name:account.menu_general_Balance_report -msgid "Trail Balance" +msgid "Trial Balance" msgstr "" #. module: account diff --git a/addons/account/i18n/nb.po b/addons/account/i18n/nb.po index f772c04ab6a..bf935ebbcb8 100644 --- a/addons/account/i18n/nb.po +++ b/addons/account/i18n/nb.po @@ -57,7 +57,7 @@ msgstr "" #. module: account #: model:ir.ui.menu,name:account.menu_general_Balance_report -msgid "Trail Balance" +msgid "Trial Balance" msgstr "" #. module: account diff --git a/addons/account/i18n/nl.po b/addons/account/i18n/nl.po index c9e074ae24a..c73f18269d2 100644 --- a/addons/account/i18n/nl.po +++ b/addons/account/i18n/nl.po @@ -50,7 +50,7 @@ msgstr "" #. module: account #: model:ir.ui.menu,name:account.menu_general_Balance_report -msgid "Trail Balance" +msgid "Trial Balance" msgstr "" #. module: account diff --git a/addons/account/i18n/nl_BE.po b/addons/account/i18n/nl_BE.po index 9bf3b2bcea6..fb7ac3d362e 100644 --- a/addons/account/i18n/nl_BE.po +++ b/addons/account/i18n/nl_BE.po @@ -50,7 +50,7 @@ msgstr "" #. module: account #: model:ir.ui.menu,name:account.menu_general_Balance_report -msgid "Trail Balance" +msgid "Trial Balance" msgstr "" #. module: account diff --git a/addons/account/i18n/oc.po b/addons/account/i18n/oc.po index 57b7aa91d41..5bea3f0baaf 100644 --- a/addons/account/i18n/oc.po +++ b/addons/account/i18n/oc.po @@ -51,7 +51,7 @@ msgstr "" #. module: account #: model:ir.ui.menu,name:account.menu_general_Balance_report -msgid "Trail Balance" +msgid "Trial Balance" msgstr "" #. module: account diff --git a/addons/account/i18n/pl.po b/addons/account/i18n/pl.po index 9f81e34af2b..1f3536a83b1 100644 --- a/addons/account/i18n/pl.po +++ b/addons/account/i18n/pl.po @@ -50,7 +50,7 @@ msgstr "" #. module: account #: model:ir.ui.menu,name:account.menu_general_Balance_report -msgid "Trail Balance" +msgid "Trial Balance" msgstr "" #. module: account diff --git a/addons/account/i18n/pt.po b/addons/account/i18n/pt.po index 974952818ac..c67f65b8f73 100644 --- a/addons/account/i18n/pt.po +++ b/addons/account/i18n/pt.po @@ -50,7 +50,7 @@ msgstr "" #. module: account #: model:ir.ui.menu,name:account.menu_general_Balance_report -msgid "Trail Balance" +msgid "Trial Balance" msgstr "" #. module: account diff --git a/addons/account/i18n/pt_BR.po b/addons/account/i18n/pt_BR.po index b7e87a1e7a8..ea614c1c07b 100644 --- a/addons/account/i18n/pt_BR.po +++ b/addons/account/i18n/pt_BR.po @@ -50,7 +50,7 @@ msgstr "" #. module: account #: model:ir.ui.menu,name:account.menu_general_Balance_report -msgid "Trail Balance" +msgid "Trial Balance" msgstr "" #. module: account diff --git a/addons/account/i18n/ro.po b/addons/account/i18n/ro.po index f5c1827dff1..c49a5112883 100644 --- a/addons/account/i18n/ro.po +++ b/addons/account/i18n/ro.po @@ -50,7 +50,7 @@ msgstr "" #. module: account #: model:ir.ui.menu,name:account.menu_general_Balance_report -msgid "Trail Balance" +msgid "Trial Balance" msgstr "" #. module: account diff --git a/addons/account/i18n/ru.po b/addons/account/i18n/ru.po index 755437bdc10..80e788e053b 100644 --- a/addons/account/i18n/ru.po +++ b/addons/account/i18n/ru.po @@ -51,7 +51,7 @@ msgstr "" #. module: account #: model:ir.ui.menu,name:account.menu_general_Balance_report -msgid "Trail Balance" +msgid "Trial Balance" msgstr "" #. module: account diff --git a/addons/account/i18n/si.po b/addons/account/i18n/si.po index 6720420bcb8..3724668ac57 100644 --- a/addons/account/i18n/si.po +++ b/addons/account/i18n/si.po @@ -51,7 +51,7 @@ msgstr "" #. module: account #: model:ir.ui.menu,name:account.menu_general_Balance_report -msgid "Trail Balance" +msgid "Trial Balance" msgstr "" #. module: account diff --git a/addons/account/i18n/sk.po b/addons/account/i18n/sk.po index 28f86c1c770..b55bdc77af5 100644 --- a/addons/account/i18n/sk.po +++ b/addons/account/i18n/sk.po @@ -46,7 +46,7 @@ msgstr "" #. module: account #: model:ir.ui.menu,name:account.menu_general_Balance_report -msgid "Trail Balance" +msgid "Trial Balance" msgstr "" #. module: account diff --git a/addons/account/i18n/sl.po b/addons/account/i18n/sl.po index a578abc17d6..d2291ea07a0 100644 --- a/addons/account/i18n/sl.po +++ b/addons/account/i18n/sl.po @@ -40,7 +40,7 @@ msgstr "" #. module: account #: model:ir.ui.menu,name:account.menu_general_Balance_report -msgid "Trail Balance" +msgid "Trial Balance" msgstr "" #. module: account diff --git a/addons/account/i18n/sq.po b/addons/account/i18n/sq.po index c69cb32edf8..1d91580af96 100644 --- a/addons/account/i18n/sq.po +++ b/addons/account/i18n/sq.po @@ -46,7 +46,7 @@ msgstr "" #. module: account #: model:ir.ui.menu,name:account.menu_general_Balance_report -msgid "Trail Balance" +msgid "Trial Balance" msgstr "" #. module: account diff --git a/addons/account/i18n/sr.po b/addons/account/i18n/sr.po index 62d2882f2c5..7f38c4e9a42 100644 --- a/addons/account/i18n/sr.po +++ b/addons/account/i18n/sr.po @@ -46,7 +46,7 @@ msgstr "" #. module: account #: model:ir.ui.menu,name:account.menu_general_Balance_report -msgid "Trail Balance" +msgid "Trial Balance" msgstr "" #. module: account diff --git a/addons/account/i18n/sv.po b/addons/account/i18n/sv.po index ef3709cc7c0..0d54fbd6838 100644 --- a/addons/account/i18n/sv.po +++ b/addons/account/i18n/sv.po @@ -50,7 +50,7 @@ msgstr "" #. module: account #: model:ir.ui.menu,name:account.menu_general_Balance_report -msgid "Trail Balance" +msgid "Trial Balance" msgstr "" #. module: account diff --git a/addons/account/i18n/ta.po b/addons/account/i18n/ta.po index ba196f41427..3bcbb806af1 100644 --- a/addons/account/i18n/ta.po +++ b/addons/account/i18n/ta.po @@ -41,7 +41,7 @@ msgstr "" #. module: account #: model:ir.ui.menu,name:account.menu_general_Balance_report -msgid "Trail Balance" +msgid "Trial Balance" msgstr "" #. module: account diff --git a/addons/account/i18n/te.po b/addons/account/i18n/te.po index 31b4e9da4ce..718011859cd 100644 --- a/addons/account/i18n/te.po +++ b/addons/account/i18n/te.po @@ -39,7 +39,7 @@ msgstr "" #. module: account #: model:ir.ui.menu,name:account.menu_general_Balance_report -msgid "Trail Balance" +msgid "Trial Balance" msgstr "" #. module: account diff --git a/addons/account/i18n/th.po b/addons/account/i18n/th.po index e0ccb289c27..35feb251b63 100644 --- a/addons/account/i18n/th.po +++ b/addons/account/i18n/th.po @@ -51,7 +51,7 @@ msgstr "" #. module: account #: model:ir.ui.menu,name:account.menu_general_Balance_report -msgid "Trail Balance" +msgid "Trial Balance" msgstr "" #. module: account diff --git a/addons/account/i18n/tlh.po b/addons/account/i18n/tlh.po index 1b95bff2cc1..8691c6e0e10 100644 --- a/addons/account/i18n/tlh.po +++ b/addons/account/i18n/tlh.po @@ -50,7 +50,7 @@ msgstr "" #. module: account #: model:ir.ui.menu,name:account.menu_general_Balance_report -msgid "Trail Balance" +msgid "Trial Balance" msgstr "" #. module: account diff --git a/addons/account/i18n/tr.po b/addons/account/i18n/tr.po index 52f754dbf1a..3c1543bc929 100644 --- a/addons/account/i18n/tr.po +++ b/addons/account/i18n/tr.po @@ -45,7 +45,7 @@ msgstr "" #. module: account #: model:ir.ui.menu,name:account.menu_general_Balance_report -msgid "Trail Balance" +msgid "Trial Balance" msgstr "" #. module: account diff --git a/addons/account/i18n/ug.po b/addons/account/i18n/ug.po index 2b2dfcd538c..c1a0ee44fdb 100644 --- a/addons/account/i18n/ug.po +++ b/addons/account/i18n/ug.po @@ -46,7 +46,7 @@ msgstr "" #. module: account #: model:ir.ui.menu,name:account.menu_general_Balance_report -msgid "Trail Balance" +msgid "Trial Balance" msgstr "" #. module: account diff --git a/addons/account/i18n/uk.po b/addons/account/i18n/uk.po index b1d19c45390..001ce91b0f2 100644 --- a/addons/account/i18n/uk.po +++ b/addons/account/i18n/uk.po @@ -45,7 +45,7 @@ msgstr "" #. module: account #: model:ir.ui.menu,name:account.menu_general_Balance_report -msgid "Trail Balance" +msgid "Trial Balance" msgstr "" #. module: account diff --git a/addons/account/i18n/vi.po b/addons/account/i18n/vi.po index 39a433ae4f3..3377490f3da 100644 --- a/addons/account/i18n/vi.po +++ b/addons/account/i18n/vi.po @@ -46,7 +46,7 @@ msgstr "" #. module: account #: model:ir.ui.menu,name:account.menu_general_Balance_report -msgid "Trail Balance" +msgid "Trial Balance" msgstr "" #. module: account diff --git a/addons/account/i18n/zh_CN.po b/addons/account/i18n/zh_CN.po index 3b44049008b..2d73f7b4503 100644 --- a/addons/account/i18n/zh_CN.po +++ b/addons/account/i18n/zh_CN.po @@ -45,7 +45,7 @@ msgstr "" #. module: account #: model:ir.ui.menu,name:account.menu_general_Balance_report -msgid "Trail Balance" +msgid "Trial Balance" msgstr "" #. module: account diff --git a/addons/account/i18n/zh_HK.po b/addons/account/i18n/zh_HK.po index 3a93e603d60..6c864a26e64 100644 --- a/addons/account/i18n/zh_HK.po +++ b/addons/account/i18n/zh_HK.po @@ -50,7 +50,7 @@ msgstr "" #. module: account #: model:ir.ui.menu,name:account.menu_general_Balance_report -msgid "Trail Balance" +msgid "Trial Balance" msgstr "" #. module: account diff --git a/addons/account/i18n/zh_TW.po b/addons/account/i18n/zh_TW.po index d4c237b8fc3..694d041e926 100644 --- a/addons/account/i18n/zh_TW.po +++ b/addons/account/i18n/zh_TW.po @@ -44,7 +44,7 @@ msgstr "" #. module: account #: model:ir.ui.menu,name:account.menu_general_Balance_report -msgid "Trail Balance" +msgid "Trial Balance" msgstr "" #. module: account From 0e467180a999d8e6c2874305f3d9ad89a240245a Mon Sep 17 00:00:00 2001 From: Mustufa Rangwala Date: Wed, 10 Nov 2010 16:36:33 +0530 Subject: [PATCH 09/14] [REF] Account_voucher bzr revid: mra@mra-laptop-20101110110633-sk7qe4lehj24oa0b --- addons/account_voucher/report/rml_parse.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account_voucher/report/rml_parse.py b/addons/account_voucher/report/rml_parse.py index 52c724ab7bf..84b4fabc401 100644 --- a/addons/account_voucher/report/rml_parse.py +++ b/addons/account_voucher/report/rml_parse.py @@ -101,7 +101,7 @@ class rml_parse(report_sxw.rml_parse): return Stringer def explode_this(self, chaine, length): - chaine = chaine.rstrip(chaine) + chaine = chaine.rstrip() ast = list(chaine) i = length while i <= len(ast): From 87fc6094291f0ba67dc40ccb92ff2bc8c7ce56c5 Mon Sep 17 00:00:00 2001 From: Mustufa Rangwala Date: Wed, 10 Nov 2010 17:13:46 +0530 Subject: [PATCH 10/14] [REF] account_followup bzr revid: mra@mra-laptop-20101110114346-iuf18mlpxmk69ldu --- addons/account_followup/report/account_followup_print.py | 2 -- addons/account_followup/report/account_followup_report.py | 3 +-- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/addons/account_followup/report/account_followup_print.py b/addons/account_followup/report/account_followup_print.py index c601aaac13c..8bfb3fff1a9 100644 --- a/addons/account_followup/report/account_followup_print.py +++ b/addons/account_followup/report/account_followup_print.py @@ -20,10 +20,8 @@ ############################################################################## import time -import ir import pooler -from osv import osv from report import report_sxw class report_rappel(report_sxw.rml_parse): diff --git a/addons/account_followup/report/account_followup_report.py b/addons/account_followup/report/account_followup_report.py index 0cfc5cd4671..ba0756f5c49 100644 --- a/addons/account_followup/report/account_followup_report.py +++ b/addons/account_followup/report/account_followup_report.py @@ -56,7 +56,6 @@ class account_followup_stat(osv.osv): context=context, count=count) def read_group(self, cr, uid, domain, fields, groupby, offset=0, limit=None, context=None): - todel=[] for arg in domain: if arg[0] == 'period_id' and arg[2] == 'current_year': current_year = self.pool.get('account.fiscalyear').find(cr, uid) @@ -91,7 +90,7 @@ class account_followup_stat(osv.osv): l.reconcile_id is NULL AND l.partner_id IS NOT NULL GROUP BY - l.id, l.partner_id, l.company_id, l.blocked, l.period_id + l.id, l.partner_id, l.company_id, l.blocked, l.period_id )""") account_followup_stat() From 658197907c453675e1e177e1a706a1451f5f9ab1 Mon Sep 17 00:00:00 2001 From: "qdp-launchpad@tinyerp.com" <> Date: Wed, 10 Nov 2010 09:42:09 +0100 Subject: [PATCH 11/14] [IMP] account: demo minimal account chart improved bzr revid: qdp-launchpad@tinyerp.com-20101110084209-ywu5f95ls2qyn8cq --- addons/account/demo/account_minimal.xml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/addons/account/demo/account_minimal.xml b/addons/account/demo/account_minimal.xml index d17fe1d760c..01a14fbc4d0 100644 --- a/addons/account/demo/account_minimal.xml +++ b/addons/account/demo/account_minimal.xml @@ -353,7 +353,7 @@ Sales Credit Note Journal - (test) - SCNJ- (test) + SCNJ - (test) sale_refund @@ -366,7 +366,7 @@ Expenses Journal - (test) - EXJ- (test) + EXJ - (test) purchase @@ -377,7 +377,7 @@ Expenses Credit Notes Journal - (test) - ECNJ- (test) + ECNJ - (test) purchase_refund @@ -390,7 +390,7 @@ Bank Journal - (test) - BNK- (test) + BNK - (test) bank @@ -401,7 +401,7 @@ Checks Journal - (test) - CHK- (test) + CHK - (test) bank @@ -412,7 +412,7 @@ Cash Journal - (test) - CSH- (test) + CSH - (test) cash From cb1a4a4b8384a5812da14d47ae1ce8e75b4b5239 Mon Sep 17 00:00:00 2001 From: "qdp-launchpad@tinyerp.com" <> Date: Wed, 10 Nov 2010 12:04:05 +0100 Subject: [PATCH 12/14] [FIX] event, make invoice wizard: fixed translability bzr revid: qdp-launchpad@tinyerp.com-20101110110405-78t46ewvp9qpuenr --- addons/event/wizard/event_make_invoice.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/event/wizard/event_make_invoice.py b/addons/event/wizard/event_make_invoice.py index 4e4cec242d2..7d9dee61cdd 100644 --- a/addons/event/wizard/event_make_invoice.py +++ b/addons/event/wizard/event_make_invoice.py @@ -81,7 +81,7 @@ class event_make_invoice(osv.osv_memory): tree_res = tree_id and tree_id[1] or False return { 'domain': "[('id', 'in', %s)]" % res, - 'name': 'Customer Invoices', + 'name': _('Customer Invoices'), 'view_type': 'form', 'view_mode': 'tree,form', 'res_model': 'account.invoice', @@ -93,4 +93,4 @@ class event_make_invoice(osv.osv_memory): event_make_invoice() -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: \ No newline at end of file +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: From a4a0a99f0c154188c5c795e3f9147cc46bb9a84d Mon Sep 17 00:00:00 2001 From: "qdp-launchpad@tinyerp.com" <> Date: Wed, 10 Nov 2010 12:20:09 +0100 Subject: [PATCH 13/14] [FIX] hr_holidays: typo fixed bzr revid: qdp-launchpad@tinyerp.com-20101110112009-lxa40bj0y1x1d32d --- addons/hr_holidays/hr_holidays.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/hr_holidays/hr_holidays.py b/addons/hr_holidays/hr_holidays.py index b2b4c52865e..0cba8c7223f 100644 --- a/addons/hr_holidays/hr_holidays.py +++ b/addons/hr_holidays/hr_holidays.py @@ -147,7 +147,7 @@ class hr_holidays(osv.osv): 'date_from': fields.datetime('Start Date', readonly=True, states={'draft':[('readonly',False)]}), 'user_id':fields.many2one('res.users', 'User', states={'draft':[('readonly',False)]}, select=True, readonly=True), 'date_to': fields.datetime('End Date', readonly=True, states={'draft':[('readonly',False)]}), - 'holiday_status_id': fields.many2one("hr.holidays.status", " Leave Type", required=True,readonly=True, states={'draft':[('readonly',False)]}), + 'holiday_status_id': fields.many2one("hr.holidays.status", "Leave Type", required=True,readonly=True, states={'draft':[('readonly',False)]}), 'employee_id': fields.many2one('hr.employee', "Employee", select=True, invisible=False, readonly=True, states={'draft':[('readonly',False)]}, help='Leave Manager can let this field empty if this leave request/allocation is for every employee'), #'manager_id': fields.many2one('hr.employee', 'Leave Manager', invisible=False, readonly=True, help='This area is automaticly filled by the user who validate the leave'), #'notes': fields.text('Notes',readonly=True, states={'draft':[('readonly',False)]}), @@ -472,4 +472,4 @@ class resource_calendar_leaves(osv.osv): resource_calendar_leaves() -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: \ No newline at end of file +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: From 82448c4293908490c9b50fdc77536848ac40a3ce Mon Sep 17 00:00:00 2001 From: "qdp-launchpad@tinyerp.com" <> Date: Wed, 10 Nov 2010 12:46:09 +0100 Subject: [PATCH 14/14] [REF] account, account_analytic_line.py: refactoring and code cleaning bzr revid: qdp-launchpad@tinyerp.com-20101110114609-3t53lct11o7ecetl --- addons/account/account_analytic_line.py | 59 +++++++++++-------------- 1 file changed, 25 insertions(+), 34 deletions(-) diff --git a/addons/account/account_analytic_line.py b/addons/account/account_analytic_line.py index 5730245b83c..329eb59ab05 100644 --- a/addons/account/account_analytic_line.py +++ b/addons/account/account_analytic_line.py @@ -78,12 +78,9 @@ class account_analytic_line(osv.osv): return {} product_obj = self.pool.get('product.product') analytic_journal_obj =self.pool.get('account.analytic.journal') -# company_obj = self.pool.get('res.company') product_price_type_obj = self.pool.get('product.price.type') j_id = analytic_journal_obj.browse(cr, uid, journal_id, context=context) prod = product_obj.browse(cr, uid, prod_id) -# if not company_id: -# company_id = j_id.company_id.id result = 0.0 if j_id.type <> 'sale': @@ -95,7 +92,6 @@ class account_analytic_line(osv.osv): _('There is no expense account defined ' \ 'for this product: "%s" (id:%d)') % \ (prod.name, prod.id,)) -# amount_unit = prod.price_get('standard_price', context)[prod.id] else: a = prod.product_tmpl_id.property_account_income.id if not a: @@ -105,36 +101,31 @@ class account_analytic_line(osv.osv): _('There is no income account defined ' \ 'for this product: "%s" (id:%d)') % \ (prod.name, prod_id,)) -# amount_unit = prod.price_get('list_price', context)[prod_id] -# if not company_id: -# company_id = company_obj._company_default_get(cr, uid, 'account.analytic.line', context=context) -# # so what? do we need company_id? - if True: - flag = False - # Compute based on pricetype - product_price_type_ids = product_price_type_obj.search(cr, uid, [('field','=','standard_price')], context=context) - pricetype = product_price_type_obj.browse(cr, uid, product_price_type_ids, context)[0] - if journal_id: - journal = analytic_journal_obj.browse(cr, uid, journal_id) - if journal.type == 'sale': - product_price_type_ids = product_price_type_obj.search(cr, uid, [('field','=','list_price')], context) - if product_price_type_ids: - pricetype = product_price_type_obj.browse(cr, uid, product_price_type_ids, context)[0] - # Take the company currency as the reference one - if pricetype.field == 'list_price': - flag = True - ctx = context.copy() - if unit: - # price_get() will respect a 'uom' in its context, in order - # to return a default price for those units - ctx['uom'] = unit - amount_unit = prod.price_get(pricetype.field, context=ctx)[prod.id] - prec = self.pool.get('decimal.precision').precision_get(cr, uid, 'Account') - amount = amount_unit * quantity or 1.0 - result = round(amount, prec) - if not flag: - result *= -1 + flag = False + # Compute based on pricetype + product_price_type_ids = product_price_type_obj.search(cr, uid, [('field','=','standard_price')], context=context) + pricetype = product_price_type_obj.browse(cr, uid, product_price_type_ids, context)[0] + if journal_id: + journal = analytic_journal_obj.browse(cr, uid, journal_id) + if journal.type == 'sale': + product_price_type_ids = product_price_type_obj.search(cr, uid, [('field','=','list_price')], context) + if product_price_type_ids: + pricetype = product_price_type_obj.browse(cr, uid, product_price_type_ids, context)[0] + # Take the company currency as the reference one + if pricetype.field == 'list_price': + flag = True + ctx = context.copy() + if unit: + # price_get() will respect a 'uom' in its context, in order + # to return a default price for those units + ctx['uom'] = unit + amount_unit = prod.price_get(pricetype.field, context=ctx)[prod.id] + prec = self.pool.get('decimal.precision').precision_get(cr, uid, 'Account') + amount = amount_unit * quantity or 1.0 + result = round(amount, prec) + if not flag: + result *= -1 return {'value': { 'amount': result, @@ -165,4 +156,4 @@ class res_partner(osv.osv): res_partner() -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: \ No newline at end of file +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: