Account_analytic_plans:Corected behaviour of act_window link of distribution from plan.
bzr revid: jvo@tinyerp.com-20081119135532-kp1u8qz1gjeldl9q
This commit is contained in:
parent
da2e458efa
commit
e08ade4c00
|
@ -1,7 +1,7 @@
|
|||
# -*- encoding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2008 Tiny SPRL (<http://tiny.be>). All Rights Reserved
|
||||
# $Id$
|
||||
#
|
||||
|
@ -20,7 +20,7 @@
|
|||
#
|
||||
##############################################################################
|
||||
{
|
||||
"name" : "Multiple-plans management in analytic accounting",
|
||||
"name" : "Multiple-plans management in Analytic Accounting",
|
||||
"version" : "1.0",
|
||||
"depends" : ["account", "account_analytic_default"],
|
||||
"author" : "Tiny",
|
||||
|
|
|
@ -135,12 +135,14 @@ class account_analytic_plan_instance(osv.osv):
|
|||
def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False):
|
||||
wiz_id = self.pool.get('ir.actions.wizard').search(cr, uid, [("wiz_name","=","create.model")])
|
||||
res = super(account_analytic_plan_instance,self).fields_view_get(cr, uid, view_id, view_type, context, toolbar)
|
||||
|
||||
if (res['type']=='form'):
|
||||
plan_id = False
|
||||
if context.get('journal_id',False):
|
||||
plan_id = self.pool.get('account.journal').browse(cr, uid, int(context['journal_id']), context).plan_id
|
||||
elif context.get('plan_id',False):
|
||||
plan_id = self.pool.get('account.analytic.plan').browse(cr, uid, int(context['plan_id']), context).plan_id
|
||||
plan_id = self.pool.get('account.analytic.plan').browse(cr, uid, int(context['plan_id']), context)
|
||||
|
||||
if plan_id:
|
||||
i=1
|
||||
res['arch'] = """<form string="%s">
|
||||
|
@ -325,8 +327,6 @@ class account_invoice(osv.osv):
|
|||
_name = "account.invoice"
|
||||
_inherit="account.invoice"
|
||||
|
||||
|
||||
|
||||
def line_get_convert(self, cr, uid, x, part, date, context={}):
|
||||
res=super(account_invoice,self).line_get_convert(cr, uid, x, part, date, context)
|
||||
res['analytics_id']=x.get('analytics_id',False)
|
||||
|
|
|
@ -115,7 +115,7 @@
|
|||
<act_window name="Distribution Models"
|
||||
domain="[('plan_id', '=', active_id),('plan_id','<>',False)]"
|
||||
context="{'plan_id': active_id}"
|
||||
res_model="account.analytic.instance"
|
||||
res_model="account.analytic.plan.instance"
|
||||
src_model="account.analytic.plan"
|
||||
id="account_analytic_instance_model_open"/>
|
||||
|
||||
|
|
Loading…
Reference in New Issue