diff --git a/addons/account/account_report.xml b/addons/account/account_report.xml index 2a22324d015..32d10ba0153 100644 --- a/addons/account/account_report.xml +++ b/addons/account/account_report.xml @@ -23,8 +23,6 @@ - - ). -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -############################################################################## - -import time -from report import report_sxw - -def _get_country(record): - if record.partner_id \ - and record.partner_id.address \ - and record.partner_id.address[0].country_id: - return record.partner_id.address[0].country_id.code - else: - return '' - -def _record_to_report_line(record): - return {'date': record.date, - 'ref': record.ref, - 'acode': record.account_id.code, - 'name': record.name, - 'debit': record.debit, - 'credit': record.credit, - 'pname': record.partner_id and record.partner_id.name or '', - 'country': _get_country(record) - } - -class account_tax_code_report(report_sxw.rml_parse): - def __init__(self, cr, uid, name, context): - super(account_tax_code_report, self).__init__(cr, uid, name, context=context) - self.localcontext.update({ - 'time': time, - 'get_line':self.get_line, - }) - - def get_line(self, obj): - line_ids = self.pool.get('account.move.line').search(self.cr, self.uid, [('tax_code_id','=',obj.id)]) - if not line_ids: return [] - - return map(_record_to_report_line, - self.pool.get('account.move.line')\ - .browse(self.cr, self.uid, line_ids)) - -report_sxw.report_sxw('report.account.tax.code.entries', 'account.tax.code', - 'addons/account/report/account_tax_code.rml', parser=account_tax_code_report, header="internal") - -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/account/report/account_tax_code.rml b/addons/account/report/account_tax_code.rml deleted file mode 100644 index 10a7c76a821..00000000000 --- a/addons/account/report/account_tax_code.rml +++ /dev/null @@ -1,144 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - [[ repeatIn(objects, 'o') ]] - - - - Accounting Entries-[[ company.currency_id.name ]] - - - - - - - - - - Date - - - Voucher No - - - A/c Code - - - Third Party (Country) - - - Entry Label - - - Debit - - - Credit - - - -
- [[ repeatIn(get_line(o),'line') ]] - - - - [[ not line and removeParentNode('blockTable') ]] [[ formatLang(line['date'],date=True) ]] - - - [[ line['ref'] ]] - - - [[ line['acode'] ]] - - - [[ line['pname'] ]] ([[ line['country'] ]] ) - - - [[ line['name'] ]] - - - [[ formatLang(line['debit'], currency_obj=company.currency_id) ]] - - - [[ formatLang(line['credit'], currency_obj=company.currency_id) ]] - - - - - - -
-
-
diff --git a/addons/account/wizard/account_vat_view.xml b/addons/account/wizard/account_vat_view.xml index 359add59a83..5cb68563352 100644 --- a/addons/account/wizard/account_vat_view.xml +++ b/addons/account/wizard/account_vat_view.xml @@ -13,7 +13,7 @@ - + @@ -43,4 +43,4 @@ icon="STOCK_PRINT"/> - \ No newline at end of file + diff --git a/addons/account_analytic_default/account_analytic_default.py b/addons/account_analytic_default/account_analytic_default.py index b41c9b9e5d2..2c4fdd4e421 100644 --- a/addons/account_analytic_default/account_analytic_default.py +++ b/addons/account_analytic_default/account_analytic_default.py @@ -73,8 +73,8 @@ class account_invoice_line(osv.osv): _inherit = "account.invoice.line" _description = "Invoice Line" - def product_id_change(self, cr, uid, ids, product, uom, qty=0, name='', type='out_invoice', partner_id=False, fposition_id=False, price_unit=False, address_invoice_id=False, currency_id=False, context=None): - res_prod = super(account_invoice_line, self).product_id_change(cr, uid, ids, product, uom, qty, name, type, partner_id, fposition_id, price_unit, address_invoice_id, currency_id=currency_id, context=context) + def product_id_change(self, cr, uid, ids, product, uom, qty=0, name='', type='out_invoice', partner_id=False, fposition_id=False, price_unit=False, address_invoice_id=False, currency_id=False, context=None, company_id=None): + res_prod = super(account_invoice_line, self).product_id_change(cr, uid, ids, product, uom, qty, name, type, partner_id, fposition_id, price_unit, address_invoice_id, currency_id=currency_id, context=context, company_id=company_id) rec = self.pool.get('account.analytic.default').account_get(cr, uid, product, partner_id, uid, time.strftime('%Y-%m-%d'), context=context) if rec: res_prod['value'].update({'account_analytic_id': rec.analytic_id.id}) diff --git a/addons/account_analytic_plans/account_analytic_plans.py b/addons/account_analytic_plans/account_analytic_plans.py index c62e6ea98d0..881a7ebc7d4 100644 --- a/addons/account_analytic_plans/account_analytic_plans.py +++ b/addons/account_analytic_plans/account_analytic_plans.py @@ -307,8 +307,8 @@ class account_invoice_line(osv.osv): res ['analytics_id'] = line.analytics_id and line.analytics_id.id or False return res - def product_id_change(self, cr, uid, ids, product, uom, qty=0, name='', type='out_invoice', partner_id=False, fposition_id=False, price_unit=False, address_invoice_id=False, currency_id=False, context=None): - res_prod = super(account_invoice_line, self).product_id_change(cr, uid, ids, product, uom, qty, name, type, partner_id, fposition_id, price_unit, address_invoice_id, currency_id, context=context) + def product_id_change(self, cr, uid, ids, product, uom, qty=0, name='', type='out_invoice', partner_id=False, fposition_id=False, price_unit=False, address_invoice_id=False, currency_id=False, context=None, company_id=None): + res_prod = super(account_invoice_line, self).product_id_change(cr, uid, ids, product, uom, qty, name, type, partner_id, fposition_id, price_unit, address_invoice_id, currency_id, context=context, company_id=company_id) rec = self.pool.get('account.analytic.default').account_get(cr, uid, product, partner_id, uid, time.strftime('%Y-%m-%d'), context=context) if rec and rec.analytics_id: res_prod['value'].update({'analytics_id': rec.analytics_id.id}) @@ -462,7 +462,7 @@ sale_order_line() class account_bank_statement(osv.osv): _inherit = "account.bank.statement" _name = "account.bank.statement" - + def create_move_from_st_line(self, cr, uid, st_line_id, company_currency_id, st_line_number, context=None): account_move_line_pool = self.pool.get('account.move.line') account_bank_statement_line_pool = self.pool.get('account.bank.statement.line') @@ -484,7 +484,7 @@ class account_bank_statement(osv.osv): if not st_line.amount: continue return True - + account_bank_statement() diff --git a/addons/account_payment/wizard/account_payment_create_order_view.xml b/addons/account_payment/wizard/account_payment_create_order_view.xml index 905baf7e118..c454a84bffd 100644 --- a/addons/account_payment/wizard/account_payment_create_order_view.xml +++ b/addons/account_payment/wizard/account_payment_create_order_view.xml @@ -8,15 +8,15 @@ form
- - - - - -