From 432931dda597f72261f2d68c9252b41f3d50791d Mon Sep 17 00:00:00 2001 From: Alexis de Lattre Date: Wed, 24 Aug 2011 23:19:43 +0200 Subject: [PATCH] Add active field on account.fiscal.position. Fixes LP bug #768847 lp bug: https://launchpad.net/bugs/768847 fixed bzr revid: alexis@via.ecp.fr-20110824211943-kcfp6133556zropc --- addons/account/partner.py | 5 +++++ addons/account/partner_view.xml | 1 + 2 files changed, 6 insertions(+) diff --git a/addons/account/partner.py b/addons/account/partner.py index 6ff3879889c..36fd88183f2 100644 --- a/addons/account/partner.py +++ b/addons/account/partner.py @@ -28,12 +28,17 @@ class account_fiscal_position(osv.osv): _description = 'Fiscal Position' _columns = { 'name': fields.char('Fiscal Position', size=64, required=True), + 'active': fields.boolean('Active', help="By unchecking the active field, you may hide a fiscal position without deleting it."), 'company_id': fields.many2one('res.company', 'Company'), 'account_ids': fields.one2many('account.fiscal.position.account', 'position_id', 'Account Mapping'), 'tax_ids': fields.one2many('account.fiscal.position.tax', 'position_id', 'Tax Mapping'), 'note': fields.text('Notes', translate=True), } + _defaults = { + 'active': True, + } + def map_tax(self, cr, uid, fposition_id, taxes, context=None): if not taxes: return [] diff --git a/addons/account/partner_view.xml b/addons/account/partner_view.xml index fbee97875ae..6051e2bc943 100644 --- a/addons/account/partner_view.xml +++ b/addons/account/partner_view.xml @@ -9,6 +9,7 @@
+