bzr revid: fp@tinyerp.com-20081020112444-48z1m79p45sajzun
This commit is contained in:
Fabien Pinckaers 2008-10-20 13:24:44 +02:00
commit e670e6da1a
7 changed files with 24 additions and 24 deletions

View File

@ -149,7 +149,7 @@
<field name="check_total" required="2"/>
<field name="currency_id" on_change="onchange_currency_id(currency_id)" select="2"/>
<field colspan="4" default_get="{'check_total': check_total, 'invoice_line': invoice_line, 'address_invoice_id': address_invoice_id, 'partner_id': partner_id, 'price_type': 'price_type' in dir() and price_type or False}" name="invoice_line" nolabel="1">
<tree editable="bottom" string="Invoice lines">
<tree string="Invoice lines">
<field name="product_id" on_change="product_id_change(product_id, uos_id, quantity, name, parent.type, parent.partner_id, price_unit, parent.address_invoice_id)"/>
<field domain="[('company_id', '=', parent.company_id), ('journal_id', '=', parent.journal_id), ('type', '&lt;&gt;', 'view')]" name="account_id" on_change="onchange_account_id(parent.partner_id,account_id)"/>
<field name="invoice_line_tax_id" view_mode="2"/>

View File

@ -91,7 +91,7 @@
<menuitem
action="action_account_analytic_account_tree2"
id="account_analytic_def_chart"
parent="account.account_analytic_def_account"/>
parent="account_analytic_def_account"/>
<menuitem action="action_account_analytic_account_tree2" id="account_analytic_chart" parent="account.menu_finance_charts"/>
<record id="analytic_account_form" model="ir.actions.act_window">

View File

@ -32,8 +32,8 @@
<field eval="[(6,0,[ref('group_account_user')])]" name="groups_id"/>
</record>
<record id="menu_finance_chart" model="ir.ui.menu">
<record id="menu_finance_charts" model="ir.ui.menu">
<field eval="[(6,0,[ref('group_account_user'), ref('group_account_manager')])]" name="groups_id"/>
</record>
</record>
</data></openerp>

View File

@ -126,18 +126,19 @@ class accounting_report_indicator(report_sxw.rml_parse):
def lines(self,data):
res={}
result=[]
obj_inds=self.pool.get('account.report.report').browse(self.cr,self.uid,data['indicator_id'])
ind_ids=self.pool.get('account.report.report').search(self.cr,self.uid,[])
obj_inds=self.pool.get('account.report.report').browse(self.cr,self.uid,ind_ids)
def find_child(obj):
self.list.append(obj)
if obj.child_ids:
for child in obj.child_ids:
find_child(child)
return True
# def find_child(obj):
# self.list.append(obj)
# if obj.child_ids:
# for child in obj.child_ids:
# find_child(child)
# return True
#
# find_child(obj_inds)
find_child(obj_inds)
for obj_ind in self.list:
for obj_ind in obj_inds:
res = {
'id':obj_ind.id,
'name':obj_ind.name,
@ -146,10 +147,8 @@ class accounting_report_indicator(report_sxw.rml_parse):
'disp_graph':obj_ind.disp_graph,
'note':obj_ind.note,
'type':obj_ind.type,
'last':False,
}
result.append(res)
result[-1]['last']=True
return result
def getarray(self,data,object):
@ -165,7 +164,7 @@ class accounting_report_indicator(report_sxw.rml_parse):
def test1(self,data,object,intercall=False):
path=tools.config['root_path']+"/Temp_images/Image"
obj_history=self.pool.get('account.report.history')
if data['select_base']=='year':
@ -235,8 +234,11 @@ class accounting_report_indicator(report_sxw.rml_parse):
# renderPM.drawToFile(drawing1, 'example1.jpg','jpg')
import os
dirname ='Temp_images'
if not os.path.isdir('./' + dirname + '/'):
os.mkdir('./' + dirname + '/')
path=os.path.join(tools.config['root_path'],dirname,"Image")
if not os.path.isdir(tools.config['root_path']+ "/"+dirname + '/'):
os.mkdir(tools.config['root_path'] +"/"+ dirname + '/')
os.path.join(tools.config['root_path'],dirname,"/")
can = canvas.init('Image'+str(self.count)+".png")
# can.clip(0,0,600,400)

View File

@ -171,7 +171,6 @@
<para style="P3">
<font color="white"> </font>
</para>
<para>[[ o['last'] and removeParentNode('para')]]<b>[[ '='*92 ]]</b></para>
</section>
</story>
</document>

View File

@ -33,12 +33,12 @@ import pooler
form = '''<?xml version="1.0"?>
<form string="Print Indicators">
<field name="indicator_id"/>
<label string="Select the criteria based on which Indicators will be printed."/>
<newline/>
<field name="select_base"/>
</form>'''
fields = {
'indicator_id': {'string':'Choose Indicator', 'type':'many2one', 'relation': 'account.report.report','required':True,},
'select_base': {'string':'Choose Criteria', 'type':'selection','selection':[('year','Based On Fiscal Years'),('periods','Based on Fiscal Periods')],'required':True,},
}

View File

@ -50,7 +50,7 @@
<field domain="[('type','=','purchase')]" name="pricelist_id"/>
<field name="partner_ref" select="2"/>
<newline/>
<field colspan="4" name="order_line" nolabel="1" widget="one2many_list"/>
<field colspan="4" name="order_line" nolabel="1"/>
<group col="7" colspan="4">
<field name="amount_untaxed" sum="Untaxed amount"/>
<field name="amount_tax"/>
@ -195,7 +195,6 @@
<tree colors="red:date_planned&lt;=current_date" string="Purchase Order Line">
<field name="date_planned"/>
<field name="name"/>
<field name="product_id"/>
<field name="product_qty"/>
<field name="product_uom"/>
<field name="price_unit"/>