Bugfixes and improvement
bzr revid: fp@tinyerp.com-55519a2f81bdd9229604b2bdbf9585ea972f2ff9
This commit is contained in:
parent
075e447ed7
commit
d80a097fe7
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"name" : "Account Chart",
|
"name" : "Charts of Accounts",
|
||||||
"version" : "1.1",
|
"version" : "1.1",
|
||||||
"depends" : ["account"],
|
"depends" : ["account"],
|
||||||
"author" : "Tiny",
|
"author" : "Tiny",
|
||||||
|
|
|
@ -305,6 +305,10 @@ class crm_case(osv.osv):
|
||||||
else:
|
else:
|
||||||
res[case.id] = False
|
res[case.id] = False
|
||||||
return res
|
return res
|
||||||
|
def copy(self, cr, uid, id, default=None, context={}):
|
||||||
|
if not default: default = {}
|
||||||
|
default.update( {'state':'draft', 'id':False, 'history_line':[],'log_ids':[]})
|
||||||
|
return super(crm_case, self).copy(cr, uid, id, default, context)
|
||||||
|
|
||||||
_columns = {
|
_columns = {
|
||||||
'id': fields.integer('ID', readonly=True),
|
'id': fields.integer('ID', readonly=True),
|
||||||
|
|
|
@ -70,32 +70,52 @@ class account_analytic_profit(report_sxw.rml_parse):
|
||||||
])
|
])
|
||||||
res={}
|
res={}
|
||||||
for line in line_obj.browse(self.cr, self.uid, ids):
|
for line in line_obj.browse(self.cr, self.uid, ids):
|
||||||
if line.to_invoice:
|
if line.account_id.pricelist_id:
|
||||||
id=line.to_invoice.id
|
if line.account_id.to_invoice:
|
||||||
name=line.to_invoice.name
|
if line.to_invoice:
|
||||||
discount=line.to_invoice.factor
|
id=line.to_invoice.id
|
||||||
else:
|
name=line.to_invoice.name
|
||||||
if line.account_id.pricelist_id:
|
discount=line.to_invoice.factor
|
||||||
name="Fixed Price"
|
else:
|
||||||
|
name="/"
|
||||||
|
discount=1.0
|
||||||
|
id = -1
|
||||||
|
else:
|
||||||
|
name="Fixed"
|
||||||
discount=0.0
|
discount=0.0
|
||||||
id=0
|
id=0
|
||||||
else:
|
|
||||||
name="/"
|
|
||||||
discount=1.0
|
|
||||||
id = -1
|
|
||||||
if line.account_id.pricelist_id:
|
|
||||||
pl=line.account_id.pricelist_id.id
|
pl=line.account_id.pricelist_id.id
|
||||||
price=price_obj.price_get(self.cr, self.uid, [pl], line.product_id.id, line.unit_amount or 1.0, line.account_id.partner_id.id)[pl]
|
price=price_obj.price_get(self.cr, self.uid, [pl], line.product_id.id, line.unit_amount or 1.0, line.account_id.partner_id.id)[pl]
|
||||||
else:
|
else:
|
||||||
|
name="/"
|
||||||
|
discount=1.0
|
||||||
|
id = -1
|
||||||
price=0.0
|
price=0.0
|
||||||
if id not in res:
|
if id not in res:
|
||||||
res[id]={'name': name, 'amount': 0, 'cost':0, 'unit_amount':0,}
|
res[id]={'name': name, 'amount': 0, 'cost':0, 'unit_amount':0,'amount_th':0}
|
||||||
res[id]['amount']+=round(price * line.unit_amount * (1-(discount or 0.0)/100.0), 2)
|
xxx = round(price * line.unit_amount * (1-(discount or 0.0)), 2)
|
||||||
|
res[id]['amount_th']+=xxx
|
||||||
|
if line.invoice_id:
|
||||||
|
self.cr.execute('select id from account_analytic_line where invoice_id=%d', (line.invoice_id.id,))
|
||||||
|
tot = 0
|
||||||
|
for lid in self.cr.fetchall():
|
||||||
|
lid2 = line_obj.browse(self.cr, self.uid, lid[0])
|
||||||
|
pl=lid2.account_id.pricelist_id.id
|
||||||
|
price=price_obj.price_get(self.cr, self.uid, [pl], lid2.product_id.id, lid2.unit_amount or 1.0, lid2.account_id.partner_id.id)[pl]
|
||||||
|
tot += price * lid2.unit_amount * (1-(discount or 0.0))
|
||||||
|
if tot:
|
||||||
|
procent = line.invoice_id.amount_untaxed / tot
|
||||||
|
res[id]['amount'] += xxx * procent
|
||||||
|
else:
|
||||||
|
res[id]['amount'] += xxx
|
||||||
|
else:
|
||||||
|
res[id]['amount'] += xxx
|
||||||
|
|
||||||
res[id]['cost']+=line.amount
|
res[id]['cost']+=line.amount
|
||||||
res[id]['unit_amount']+=line.unit_amount
|
res[id]['unit_amount']+=line.unit_amount
|
||||||
for id in res:
|
for id in res:
|
||||||
res[id]['profit']=res[id]['amount']+res[id]['cost']
|
res[id]['profit']=res[id]['amount']+res[id]['cost']
|
||||||
res[id]['eff']=abs(round(res[id]['amount'] / res[id]['cost'] * 100, 2))
|
res[id]['eff']='%d' % (-res[id]['amount'] / res[id]['cost'] * 100,)
|
||||||
return res.values()
|
return res.values()
|
||||||
|
|
||||||
def _lines(self, form):
|
def _lines(self, form):
|
||||||
|
|
|
@ -1,226 +1,236 @@
|
||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
<document filename="test.pdf">
|
<document filename="test.pdf">
|
||||||
<template pageSize="(595.0,842.0)" title="Test" author="Martin Simon" allowSplitting="20">
|
<template pageSize="(595.0,842.0)" title="Test" author="Martin Simon" allowSplitting="20">
|
||||||
<pageTemplate id="first">
|
<pageTemplate id="first">
|
||||||
<frame id="first" x1="35.0" y1="57.0" width="525" height="728"/>
|
<frame id="first" x1="35.0" y1="57.0" width="525" height="728"/>
|
||||||
</pageTemplate>
|
</pageTemplate>
|
||||||
</template>
|
</template>
|
||||||
<stylesheet>
|
<stylesheet>
|
||||||
<blockTableStyle id="Standard_Outline">
|
<blockTableStyle id="Standard_Outline">
|
||||||
<blockAlignment value="LEFT"/>
|
<blockAlignment value="LEFT"/>
|
||||||
<blockValign value="TOP"/>
|
<blockValign value="TOP"/>
|
||||||
</blockTableStyle>
|
</blockTableStyle>
|
||||||
<blockTableStyle id="Table5">
|
<blockTableStyle id="Table5">
|
||||||
<blockAlignment value="LEFT"/>
|
<blockAlignment value="LEFT"/>
|
||||||
<blockValign value="TOP"/>
|
<blockValign value="TOP"/>
|
||||||
<blockBackground colorName="#e6e6e6" start="0,0" stop="0,0"/>
|
<blockBackground colorName="#e6e6e6" start="0,0" stop="0,0"/>
|
||||||
<blockBackground colorName="#e6e6e6" start="1,0" stop="1,0"/>
|
<blockBackground colorName="#e6e6e6" start="1,0" stop="1,0"/>
|
||||||
<blockBackground colorName="#e6e6e6" start="2,0" stop="2,0"/>
|
<blockBackground colorName="#e6e6e6" start="2,0" stop="2,0"/>
|
||||||
</blockTableStyle>
|
</blockTableStyle>
|
||||||
<blockTableStyle id="Table8">
|
<blockTableStyle id="Table8">
|
||||||
<blockAlignment value="LEFT"/>
|
<blockAlignment value="LEFT"/>
|
||||||
<blockValign value="TOP"/>
|
<blockValign value="TOP"/>
|
||||||
<lineStyle kind="GRID" colorName="black"/>
|
<lineStyle kind="GRID" colorName="black"/>
|
||||||
<blockBackground colorName="#e6e6e6" start="0,0" stop="0,0"/>
|
<blockBackground colorName="#e6e6e6" start="0,0" stop="0,0"/>
|
||||||
<blockBackground colorName="#e6e6e6" start="1,0" stop="1,0"/>
|
<blockBackground colorName="#e6e6e6" start="1,0" stop="1,0"/>
|
||||||
<blockBackground colorName="#e6e6e6" start="2,0" stop="2,0"/>
|
<blockBackground colorName="#e6e6e6" start="2,0" stop="2,0"/>
|
||||||
<blockBackground colorName="#e6e6e6" start="3,0" stop="3,0"/>
|
<blockBackground colorName="#e6e6e6" start="3,0" stop="3,0"/>
|
||||||
<blockBackground colorName="#e6e6e6" start="4,0" stop="4,0"/>
|
<blockBackground colorName="#e6e6e6" start="4,0" stop="4,0"/>
|
||||||
<blockBackground colorName="#e6e6e6" start="5,0" stop="5,0"/>
|
<blockBackground colorName="#e6e6e6" start="5,0" stop="5,0"/>
|
||||||
<blockBackground colorName="#e6e6e6" start="6,0" stop="6,0"/>
|
<blockBackground colorName="#e6e6e6" start="6,0" stop="6,0"/>
|
||||||
</blockTableStyle>
|
<blockBackground colorName="#e6e6e6" start="7,0" stop="7,0"/>
|
||||||
<blockTableStyle id="Table4">
|
</blockTableStyle>
|
||||||
<blockAlignment value="LEFT"/>
|
<blockTableStyle id="Table4">
|
||||||
<blockValign value="TOP"/>
|
<blockAlignment value="LEFT"/>
|
||||||
</blockTableStyle>
|
<blockValign value="TOP"/>
|
||||||
<blockTableStyle id="Table1">
|
</blockTableStyle>
|
||||||
<blockAlignment value="LEFT"/>
|
<blockTableStyle id="Table1">
|
||||||
<blockValign value="TOP"/>
|
<blockAlignment value="LEFT"/>
|
||||||
</blockTableStyle>
|
<blockValign value="TOP"/>
|
||||||
<blockTableStyle id="Table6">
|
</blockTableStyle>
|
||||||
<blockAlignment value="LEFT"/>
|
<blockTableStyle id="Table6">
|
||||||
<blockValign value="TOP"/>
|
<blockAlignment value="LEFT"/>
|
||||||
</blockTableStyle>
|
<blockValign value="TOP"/>
|
||||||
<blockTableStyle id="Table7">
|
</blockTableStyle>
|
||||||
<blockAlignment value="LEFT"/>
|
<blockTableStyle id="Table7">
|
||||||
<blockValign value="TOP"/>
|
<blockAlignment value="LEFT"/>
|
||||||
</blockTableStyle>
|
<blockValign value="TOP"/>
|
||||||
<initialize>
|
</blockTableStyle>
|
||||||
<paraStyle name="all" alignment="justify"/>
|
<initialize>
|
||||||
</initialize>
|
<paraStyle name="all" alignment="justify"/>
|
||||||
<paraStyle name="P1" fontName="Times-Roman" alignment="LEFT"/>
|
</initialize>
|
||||||
<paraStyle name="P2" fontName="Times-Bold" fontSize="20.0" leading="25" alignment="CENTER"/>
|
<paraStyle name="P1" fontName="Times-Roman" alignment="LEFT"/>
|
||||||
<paraStyle name="P3" fontName="Times-Bold" fontSize="10.0" leading="13" alignment="RIGHT"/>
|
<paraStyle name="P2" fontName="Times-Bold" fontSize="20.0" leading="25" alignment="CENTER"/>
|
||||||
<paraStyle name="P4" fontName="Times-Roman" fontSize="10.0" leading="13" alignment="RIGHT"/>
|
<paraStyle name="P3" fontName="Times-Bold" fontSize="10.0" leading="13" alignment="RIGHT"/>
|
||||||
<paraStyle name="P5" fontName="Times-Roman" alignment="LEFT"/>
|
<paraStyle name="P4" fontName="Times-Roman" fontSize="10.0" leading="13" alignment="RIGHT"/>
|
||||||
<paraStyle name="P6" fontName="Times-Roman" alignment="LEFT"/>
|
<paraStyle name="P5" fontName="Times-Roman" fontSize="6.0" leading="8"/>
|
||||||
<paraStyle name="P7" fontName="Times-Roman" alignment="RIGHT"/>
|
<paraStyle name="P6" fontName="Times-Roman" alignment="LEFT"/>
|
||||||
<paraStyle name="P8" fontName="Times-Roman" fontSize="6.0" leading="8"/>
|
<paraStyle name="P7" fontName="Helvetica-Bold" fontSize="14.0" leading="20"/>
|
||||||
<paraStyle name="P9" fontName="Helvetica-Bold" fontSize="16.0" leading="20"/>
|
<paraStyle name="P8" fontName="Times-Roman" alignment="RIGHT"/>
|
||||||
<paraStyle name="P10" fontName="Times-Roman" alignment="RIGHT"/>
|
<paraStyle name="P9" fontName="Times-Roman" fontSize="11.0" leading="14" alignment="LEFT"/>
|
||||||
<paraStyle name="Standard" fontName="Times-Roman"/>
|
<paraStyle name="P10" fontName="Times-Roman" fontSize="11.0" leading="14" alignment="RIGHT"/>
|
||||||
<paraStyle name="Text body" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
|
<paraStyle name="P11" fontName="Times-Roman" fontSize="10.0" leading="13"/>
|
||||||
<paraStyle name="Heading" fontName="Helvetica" fontSize="14.0" leading="17" spaceBefore="12.0" spaceAfter="6.0"/>
|
<paraStyle name="P12" fontName="Times-Roman" fontSize="10.0" leading="13" alignment="RIGHT"/>
|
||||||
<paraStyle name="List" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
|
<paraStyle name="P13" fontName="Times-Roman" fontSize="10.0" leading="13"/>
|
||||||
<paraStyle name="Table Contents" fontName="Times-Roman"/>
|
<paraStyle name="P14" fontName="Times-Roman" fontSize="10.0" leading="13" alignment="RIGHT"/>
|
||||||
<paraStyle name="Table Heading" fontName="Times-Roman" alignment="CENTER"/>
|
<paraStyle name="Standard" fontName="Times-Roman"/>
|
||||||
<paraStyle name="Caption" fontName="Times-Roman" fontSize="12.0" leading="15" spaceBefore="6.0" spaceAfter="6.0"/>
|
<paraStyle name="Text body" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||||
<paraStyle name="Index" fontName="Times-Roman"/>
|
<paraStyle name="Heading" fontName="Helvetica" fontSize="14.0" leading="17" spaceBefore="12.0" spaceAfter="6.0"/>
|
||||||
<paraStyle name="Preformatted Text" fontName="Courier" fontSize="10.0" leading="13" spaceBefore="0.0" spaceAfter="0.0"/>
|
<paraStyle name="List" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
|
||||||
<paraStyle name="Untitled1" fontName="Times-Roman"/>
|
<paraStyle name="Table Contents" fontName="Times-Roman"/>
|
||||||
</stylesheet>
|
<paraStyle name="Table Heading" fontName="Times-Roman" alignment="CENTER"/>
|
||||||
<story>
|
<paraStyle name="Caption" fontName="Times-Roman" fontSize="12.0" leading="15" spaceBefore="6.0" spaceAfter="6.0"/>
|
||||||
<blockTable colWidths="175.0,175.0,175.0" repeatRows="1" style="Table5">
|
<paraStyle name="Index" fontName="Times-Roman"/>
|
||||||
<tr>
|
<paraStyle name="Preformatted Text" fontName="Courier" fontSize="10.0" leading="13" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||||
<td>
|
<paraStyle name="Untitled1" fontName="Times-Roman"/>
|
||||||
<para style="P1">[[ company.name ]]</para>
|
</stylesheet>
|
||||||
</td>
|
<images/>
|
||||||
<td>
|
<story>
|
||||||
<para style="P2">Invoice rate</para>
|
<blockTable colWidths="145.0,235.0,145.0" repeatRows="1" style="Table5">
|
||||||
<para style="P2">by user</para>
|
<tr>
|
||||||
</td>
|
<td>
|
||||||
<td>
|
<para style="P1">[[ company.name ]]</para>
|
||||||
<para style="P3">Period from [[ data['form']['date_from'] ]]</para>
|
</td>
|
||||||
<para style="P3">to [[ data['form']['date_to'] ]]</para>
|
<td>
|
||||||
<para style="P4">Currency: [[ company.currency_id.name ]]</para>
|
<para style="P2">Invoice rate by user</para>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
<td>
|
||||||
</blockTable>
|
<para style="P3">Period from [[ data['form']['date_from'] ]]</para>
|
||||||
<para style="P5">
|
<para style="P3">to [[ data['form']['date_to'] ]]</para>
|
||||||
<font color="white"> </font>
|
<para style="P4">Currency: [[ company.currency_id.name ]]</para>
|
||||||
</para>
|
</td>
|
||||||
<blockTable colWidths="118.0,59.0,77.0,70.0,65.0,59.0,68.0" style="Table8">
|
</tr>
|
||||||
<tr>
|
</blockTable>
|
||||||
<td>
|
<para style="P6">
|
||||||
<para style="P6">Employee</para>
|
<font color="white"> </font>
|
||||||
</td>
|
</para>
|
||||||
<td>
|
<blockTable colWidths="118.0,44.0,55.0,67.0,68.0,66.0,55.0,50.0" style="Table8">
|
||||||
<para style="P6">
|
<tr>
|
||||||
<font color="white"> </font>
|
<td>
|
||||||
</para>
|
<para style="P9">Employee</para>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<para style="P7">Units</para>
|
<para style="P9">
|
||||||
</td>
|
<font color="white"> </font>
|
||||||
<td>
|
</para>
|
||||||
<para style="P7">Income</para>
|
</td>
|
||||||
</td>
|
<td>
|
||||||
<td>
|
<para style="P10">Units</para>
|
||||||
<para style="P7">Cost</para>
|
</td>
|
||||||
</td>
|
<td>
|
||||||
<td>
|
<para style="P10">Theorical</para>
|
||||||
<para style="P7">Profit</para>
|
</td>
|
||||||
</td>
|
<td>
|
||||||
<td>
|
<para style="P10">Income</para>
|
||||||
<para style="P7">Eff.</para>
|
</td>
|
||||||
</td>
|
<td>
|
||||||
</tr>
|
<para style="P10">Cost</para>
|
||||||
</blockTable>
|
</td>
|
||||||
<para style="P5">
|
<td>
|
||||||
<font color="white"> </font>
|
<para style="P10">Profit</para>
|
||||||
</para>
|
</td>
|
||||||
<section>
|
<td>
|
||||||
<para style="P8">[[ repeatIn(user_ids(lines(data['form'])), 'e') ]]</para>
|
<para style="P10">Eff.</para>
|
||||||
<blockTable colWidths="104.0,421.0" style="Table4">
|
</td>
|
||||||
<tr>
|
</tr>
|
||||||
<td>
|
</blockTable>
|
||||||
<para style="P9">[[ e.name ]]</para>
|
<para style="P6">
|
||||||
</td>
|
<font color="white"> </font>
|
||||||
</tr>
|
</para>
|
||||||
<tr>
|
<section>
|
||||||
<td>
|
<para style="P5">[[ repeatIn(user_ids(lines(data['form'])), 'e') ]]</para>
|
||||||
<para style="Table Contents">[[ repeatIn(journal_ids(data['form'], e.id), 'j') ]]</para>
|
<para style="P7">[[ e.name ]]</para>
|
||||||
<para style="Untitled1">[[ j.name ]]</para>
|
<blockTable colWidths="92.0,433.0" style="Table4">
|
||||||
</td>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<blockTable colWidths="71.0,77.0,71.0,64.0,64.0,64.0" style="Table1">
|
<para style="P11">[[ repeatIn(journal_ids(data['form'], e.id), 'j') ]]</para>
|
||||||
<tr>
|
<para style="P13">[[ j.name ]]</para>
|
||||||
<td>
|
</td>
|
||||||
<para style="P10">
|
<td>
|
||||||
<font color="white"> </font>
|
<blockTable colWidths="70.0,55.0,68.0,68.0,66.0,55.0,50.0" style="Table1">
|
||||||
</para>
|
<tr>
|
||||||
</td>
|
<td>
|
||||||
<td>
|
<para style="P14">
|
||||||
<para style="P7">[[ reduce(lambda x, y: x+y['unit_amount'], line(data['form'], [j.id], [e.id]), 0)]]</para>
|
<font color="white"> </font>
|
||||||
</td>
|
</para>
|
||||||
<td>
|
</td>
|
||||||
<para style="P7">[[ reduce(lambda x, y: x+y['amount'], line(data['form'], [j.id], [e.id]), 0) ]]</para>
|
<td>
|
||||||
</td>
|
<para style="P12">[[ reduce(lambda x, y: x+y['unit_amount'], line(data['form'], [j.id], [e.id]), 0)]]</para>
|
||||||
<td>
|
</td>
|
||||||
<para style="P7">[[ reduce(lambda x, y: x+y['cost'], line(data['form'], [j.id], [e.id]), 0) ]]</para>
|
<td>
|
||||||
</td>
|
<para style="P12">[[ reduce(lambda x, y: x+y['amount_th'], line(data['form'], [j.id], [e.id]), 0) ]]</para>
|
||||||
<td>
|
</td>
|
||||||
<para style="P7">[[ reduce(lambda x, y: x+y['profit'], line(data['form'], [j.id], [e.id]), 0)]]</para>
|
<td>
|
||||||
</td>
|
<para style="P12">[[ reduce(lambda x, y: x+y['amount'], line(data['form'], [j.id], [e.id]), 0) ]]</para>
|
||||||
<td>
|
</td>
|
||||||
<para style="P7">[[ round( reduce(lambda x, y: x+y['eff'], line(data['form'], [j.id], [e.id]), 0)/len(line(data['form'], [j.id], [e.id])) , 2)]] %</para>
|
<td>
|
||||||
</td>
|
<para style="P12">[[ reduce(lambda x, y: x+y['cost'], line(data['form'], [j.id], [e.id]), 0) ]]</para>
|
||||||
</tr>
|
</td>
|
||||||
<tr>
|
<td>
|
||||||
<td>
|
<para style="P12">[[ reduce(lambda x, y: x+y['profit'], line(data['form'], [j.id], [e.id]), 0)]]</para>
|
||||||
<para style="P7">[[ repeatIn(line(data['form'], [j.id], [e.id]), 'l') ]]</para>
|
</td>
|
||||||
<para style="P7">[[ l['name'] ]]</para>
|
<td>
|
||||||
</td>
|
<para style="P12">[[ '%d' % (-reduce(lambda x, y: x+y['amount'], line(data['form'], [j.id], [e.id]), 0) / reduce(lambda x, y: x+y['cost'], line(data['form'], [j.id], [e.id]), 0) * 100.0,)]] %
|
||||||
<td>
|
</para>
|
||||||
<para style="P7">[[ l['unit_amount'] ]]</para>
|
</td>
|
||||||
</td>
|
</tr>
|
||||||
<td>
|
<tr>
|
||||||
<para style="P7">[[ l['amount'] ]]</para>
|
<td>
|
||||||
</td>
|
<para style="P12">[[ repeatIn(line(data['form'], [j.id], [e.id]), 'l') ]]</para>
|
||||||
<td>
|
<para style="P12">[[ l['name'] ]]</para>
|
||||||
<para style="P7">[[ l['cost'] ]]</para>
|
</td>
|
||||||
</td>
|
<td>
|
||||||
<td>
|
<para style="P12">[[ l['unit_amount'] ]]</para>
|
||||||
<para style="P7">[[ l['profit'] ]]</para>
|
</td>
|
||||||
</td>
|
<td>
|
||||||
<td>
|
<para style="P12">[[ l['amount_th'] ]]</para>
|
||||||
<para style="P7">[[ l['eff'] ]] %</para>
|
</td>
|
||||||
</td>
|
<td>
|
||||||
</tr>
|
<para style="P12">[[ l['amount'] ]]</para>
|
||||||
</blockTable>
|
</td>
|
||||||
</td>
|
<td>
|
||||||
</tr>
|
<para style="P12">[[ l['cost'] ]]</para>
|
||||||
</blockTable>
|
</td>
|
||||||
</section>
|
<td>
|
||||||
<blockTable colWidths="103.0,422.0" style="Table6">
|
<para style="P12">[[ l['profit'] ]]</para>
|
||||||
<tr>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<para style="P9">Totals</para>
|
<para style="P12">[[ l['eff'] ]] %</para>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
</tr>
|
||||||
<blockTable colWidths="74.0,73.0,72.0,65.0,63.0,64.0" style="Table7">
|
</blockTable>
|
||||||
<tr>
|
</td>
|
||||||
<td>
|
</tr>
|
||||||
<para style="P7">
|
</blockTable>
|
||||||
<font color="white"> </font>
|
</section>
|
||||||
</para>
|
<blockTable colWidths="103.0,422.0" style="Table6">
|
||||||
</td>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<para style="P7">[[ reduce(lambda x, y: x+y['unit_amount'], line(data['form'], data['form']['journal_ids'][0][2], data['form']['employee_ids'][0][2]), 0) ]]</para>
|
<para style="P7">Totals</para>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<para style="P7">[[ reduce(lambda x, y: x+y['amount'], line(data['form'],data['form']['journal_ids'][0][2], data['form']['employee_ids'][0][2]), 0) ]]</para>
|
<blockTable colWidths="59.0,55.0,67.0,68.0,66.0,55.0,51.0" style="Table7">
|
||||||
</td>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<para style="P7">[[ reduce(lambda x, y: x+y['cost'], line(data['form'],data['form']['journal_ids'][0][2], data['form']['employee_ids'][0][2]), 0) ]]</para>
|
<para style="P12">
|
||||||
</td>
|
<font color="white"> </font>
|
||||||
<td>
|
</para>
|
||||||
<para style="P7">[[ reduce(lambda x, y: x+y['profit'], line(data['form'],data['form']['journal_ids'][0][2], data['form']['employee_ids'][0][2]), 0) ]]</para>
|
</td>
|
||||||
</td>
|
<td>
|
||||||
<td>
|
<para style="P12">[[ reduce(lambda x, y: x+y['unit_amount'], line(data['form'], data['form']['journal_ids'][0][2], data['form']['employee_ids'][0][2]), 0) ]]</para>
|
||||||
<para style="P7">[[ round(reduce(lambda x, y: x+y['amount'], line(data['form'],data['form']['journal_ids'][0][2], data['form']['employee_ids'][0][2]), 0)/reduce(lambda x, y: x+y['cost'], line(data['form'],data['form']['journal_ids'][0][2], data['form']['employee_ids'][0][2]), 0)* -100, 2)]] %</para>
|
</td>
|
||||||
</td>
|
<td>
|
||||||
</tr>
|
<para style="P12">
|
||||||
</blockTable>
|
<font color="white"> </font>
|
||||||
<para style="Table Contents">
|
</para>
|
||||||
<font color="white"> </font>
|
</td>
|
||||||
</para>
|
<td>
|
||||||
</td>
|
<para style="P12">[[ reduce(lambda x, y: x+y['amount'], line(data['form'],data['form']['journal_ids'][0][2], data['form']['employee_ids'][0][2]), 0) ]]</para>
|
||||||
</tr>
|
</td>
|
||||||
</blockTable>
|
<td>
|
||||||
<para style="Standard">
|
<para style="P12">[[ reduce(lambda x, y: x+y['cost'], line(data['form'],data['form']['journal_ids'][0][2], data['form']['employee_ids'][0][2]), 0) ]]</para>
|
||||||
<font color="white"> </font>
|
</td>
|
||||||
</para>
|
<td>
|
||||||
</story>
|
<para style="P12">[[ reduce(lambda x, y: x+y['profit'], line(data['form'],data['form']['journal_ids'][0][2], data['form']['employee_ids'][0][2]), 0) ]]</para>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<para style="P12">[[ '%d' % (-reduce(lambda x, y: x+y['amount'], line(data['form'],data['form']['journal_ids'][0][2], data['form']['employee_ids'][0][2]), 0)/reduce(lambda x, y: x+y['cost'], line(data['form'],data['form']['journal_ids'][0][2], data['form']['employee_ids'][0][2]), 0)* 100, )]] %</para>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</blockTable>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</blockTable>
|
||||||
|
</story>
|
||||||
</document>
|
</document>
|
||||||
|
|
||||||
|
|
|
@ -34,8 +34,8 @@ form='''<?xml version="1.0"?>
|
||||||
<form string="Choose">
|
<form string="Choose">
|
||||||
<field name="date_from"/>
|
<field name="date_from"/>
|
||||||
<field name="date_to"/>
|
<field name="date_to"/>
|
||||||
<field name="journal_ids" colspan="3"/>
|
<field name="journal_ids" colspan="4"/>
|
||||||
<field name="employee_ids" colspan="3"/>
|
<field name="employee_ids" colspan="4"/>
|
||||||
</form>'''
|
</form>'''
|
||||||
|
|
||||||
class wizard_report(wizard.interface):
|
class wizard_report(wizard.interface):
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
"version" : "1.1",
|
"version" : "1.1",
|
||||||
"author" : "Tiny",
|
"author" : "Tiny",
|
||||||
"category" : "Localisation/Account charts",
|
"category" : "Localisation/Account charts",
|
||||||
"depends" : ["base", "account", "account_report", "base_vat", "base_iban",
|
"depends" : ["account", "account_report", "base_vat", "base_iban",
|
||||||
"account_chart"],
|
"account_chart"],
|
||||||
"init_xml" : [],
|
"init_xml" : [],
|
||||||
"demo_xml" : ["account_demo.xml","account.report.report.csv"],
|
"demo_xml" : ["account_demo.xml","account.report.report.csv"],
|
||||||
|
|
|
@ -385,8 +385,10 @@
|
||||||
<field name="product_id" on_change="product_id_change(product_id)" select="1"/>
|
<field name="product_id" on_change="product_id_change(product_id)" select="1"/>
|
||||||
<field name="product_qty"/>
|
<field name="product_qty"/>
|
||||||
<field name="product_uom"/>
|
<field name="product_uom"/>
|
||||||
|
<!--
|
||||||
<field name="product_uos_qty"/>
|
<field name="product_uos_qty"/>
|
||||||
<field name="product_uos"/>
|
<field name="product_uos"/>
|
||||||
|
-->
|
||||||
<field name="bom_id" select="2"/>
|
<field name="bom_id" select="2"/>
|
||||||
|
|
||||||
<newline/>
|
<newline/>
|
||||||
|
@ -664,6 +666,7 @@
|
||||||
<field name="type">tree</field>
|
<field name="type">tree</field>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<tree string="Minimum Stock Rules">
|
<tree string="Minimum Stock Rules">
|
||||||
|
<field name="name"/>
|
||||||
<field name="warehouse_id"/>
|
<field name="warehouse_id"/>
|
||||||
<field name="product_id"/>
|
<field name="product_id"/>
|
||||||
<field name="product_uom"/>
|
<field name="product_uom"/>
|
||||||
|
|
|
@ -41,7 +41,7 @@ class price_type(osv.osv):
|
||||||
sale and purchase prices based on some fields of the product.
|
sale and purchase prices based on some fields of the product.
|
||||||
"""
|
"""
|
||||||
def _price_field_get(self, cr, uid, context={}):
|
def _price_field_get(self, cr, uid, context={}):
|
||||||
cr.execute('select name, field_description from ir_model_fields where model in (%s,%s) and ttype=%s', ('product.product', 'product.template', 'float'))
|
cr.execute('select name, field_description from ir_model_fields where model in (%s,%s) and ttype=%s order by name', ('product.product', 'product.template', 'float'))
|
||||||
return cr.fetchall()
|
return cr.fetchall()
|
||||||
def _get_currency(self, cr, uid, ctx):
|
def _get_currency(self, cr, uid, ctx):
|
||||||
comp = self.pool.get('res.users').browse(cr,uid,uid).company_id
|
comp = self.pool.get('res.users').browse(cr,uid,uid).company_id
|
||||||
|
|
|
@ -44,12 +44,14 @@ class report_account_analytic_planning(osv.osv):
|
||||||
'stat_ids': fields.one2many('report_account_analytic.planning.stat', 'planning_id', 'Planning analysis', readonly=True),
|
'stat_ids': fields.one2many('report_account_analytic.planning.stat', 'planning_id', 'Planning analysis', readonly=True),
|
||||||
'stat_user_ids': fields.one2many('report_account_analytic.planning.stat.user', 'planning_id', 'Planning by user', readonly=True),
|
'stat_user_ids': fields.one2many('report_account_analytic.planning.stat.user', 'planning_id', 'Planning by user', readonly=True),
|
||||||
'stat_account_ids': fields.one2many('report_account_analytic.planning.stat.account', 'planning_id', 'Planning by account', readonly=True),
|
'stat_account_ids': fields.one2many('report_account_analytic.planning.stat.account', 'planning_id', 'Planning by account', readonly=True),
|
||||||
|
'state': fields.selection([('open','Open'),('done','Done')], 'State', required=True)
|
||||||
}
|
}
|
||||||
_defaults = {
|
_defaults = {
|
||||||
'name': lambda *a: time.strftime('%Y-%m-%d'),
|
'name': lambda *a: time.strftime('%Y-%m-%d'),
|
||||||
'date_from': lambda *a: time.strftime('%Y-%m-01'),
|
'date_from': lambda *a: time.strftime('%Y-%m-01'),
|
||||||
'date_to': lambda *a: (mx.DateTime.now()+mx.DateTime.RelativeDateTime(months=1,day=1,days=-1)).strftime('%Y-%m-%d'),
|
'date_to': lambda *a: (mx.DateTime.now()+mx.DateTime.RelativeDateTime(months=1,day=1,days=-1)).strftime('%Y-%m-%d'),
|
||||||
'user_id': lambda self,cr,uid,c: uid
|
'user_id': lambda self,cr,uid,c: uid,
|
||||||
|
'state': lambda *args: 'open'
|
||||||
}
|
}
|
||||||
_order = 'date_from desc'
|
_order = 'date_from desc'
|
||||||
report_account_analytic_planning()
|
report_account_analytic_planning()
|
||||||
|
@ -164,7 +166,7 @@ class report_account_analytic_planning_stat(osv.osv):
|
||||||
from
|
from
|
||||||
report_account_analytic_planning_line l
|
report_account_analytic_planning_line l
|
||||||
left join
|
left join
|
||||||
account_analytic_account a on (a.id = l.account_id)
|
report_account_analytic_planning a on (a.id = l.planning_id)
|
||||||
left join
|
left join
|
||||||
product_uom u on (l.amount_unit = u.id)
|
product_uom u on (l.amount_unit = u.id)
|
||||||
group by
|
group by
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
<field name="user_id"/>
|
<field name="user_id"/>
|
||||||
<field name="date_from"/>
|
<field name="date_from"/>
|
||||||
<field name="date_to"/>
|
<field name="date_to"/>
|
||||||
|
<field name="state"/>
|
||||||
</tree>
|
</tree>
|
||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
@ -36,6 +37,7 @@
|
||||||
<field name="note"/>
|
<field name="note"/>
|
||||||
</tree>
|
</tree>
|
||||||
</field>
|
</field>
|
||||||
|
<field name="state" select="1"/>
|
||||||
</page><page string="Analysis">
|
</page><page string="Analysis">
|
||||||
<field name="stat_ids" colspan="4" nolabel="1" readonly="1">
|
<field name="stat_ids" colspan="4" nolabel="1" readonly="1">
|
||||||
<tree string="Planning Line" editable="bottom">
|
<tree string="Planning Line" editable="bottom">
|
||||||
|
@ -138,6 +140,7 @@
|
||||||
<tree string="Planning statistics">
|
<tree string="Planning statistics">
|
||||||
<field name="planning_id"/>
|
<field name="planning_id"/>
|
||||||
<field name="user_id"/>
|
<field name="user_id"/>
|
||||||
|
<field name="manager_id"/>
|
||||||
<field name="account_id"/>
|
<field name="account_id"/>
|
||||||
<field name="sum_amount"/>
|
<field name="sum_amount"/>
|
||||||
<field name="sum_amount_real"/>
|
<field name="sum_amount_real"/>
|
||||||
|
@ -175,7 +178,7 @@
|
||||||
<record model="ir.actions.act_window" id="action_account_analytic_planning_stat_my_form">
|
<record model="ir.actions.act_window" id="action_account_analytic_planning_stat_my_form">
|
||||||
<field name="res_model">report_account_analytic.planning.stat</field>
|
<field name="res_model">report_account_analytic.planning.stat</field>
|
||||||
<field name="view_type">form</field>
|
<field name="view_type">form</field>
|
||||||
<field name="domain">[('user_id','=',uid)]</field>
|
<field name="domain">[('user_id','=',uid),('planning_id.state','=','open')]</field>
|
||||||
<field name="view_mode">graph,tree</field>
|
<field name="view_mode">graph,tree</field>
|
||||||
</record>
|
</record>
|
||||||
<menuitem
|
<menuitem
|
||||||
|
@ -186,7 +189,7 @@
|
||||||
<record model="ir.actions.act_window" id="action_account_analytic_planning_stat_my_manager_form">
|
<record model="ir.actions.act_window" id="action_account_analytic_planning_stat_my_manager_form">
|
||||||
<field name="res_model">report_account_analytic.planning.stat</field>
|
<field name="res_model">report_account_analytic.planning.stat</field>
|
||||||
<field name="view_type">form</field>
|
<field name="view_type">form</field>
|
||||||
<field name="domain">[('manager_id','=',uid)]</field>
|
<field name="domain">[('manager_id','=',uid),('planning_id.state','=','open')]</field>
|
||||||
<field name="view_mode">graph,tree</field>
|
<field name="view_mode">graph,tree</field>
|
||||||
</record>
|
</record>
|
||||||
<menuitem
|
<menuitem
|
||||||
|
|
|
@ -39,6 +39,7 @@ class report_task_user_pipeline_open (osv.osv):
|
||||||
'task_hrs': fields.float('Task Hours', readonly=True),
|
'task_hrs': fields.float('Task Hours', readonly=True),
|
||||||
'task_progress': fields.float('Task Progress', readonly=True),
|
'task_progress': fields.float('Task Progress', readonly=True),
|
||||||
'company_id' : fields.many2one('res.company', 'Company'),
|
'company_id' : fields.many2one('res.company', 'Company'),
|
||||||
|
'task_state': fields.selection([('draft', 'Draft'),('open', 'Open'),('pending', 'Pending'), ('cancelled', 'Cancelled'), ('done', 'Done'),('no','No Task')], 'State', readonly=True),
|
||||||
}
|
}
|
||||||
|
|
||||||
def init(self, cr):
|
def init(self, cr):
|
||||||
|
@ -50,12 +51,16 @@ class report_task_user_pipeline_open (osv.osv):
|
||||||
u.company_id as company_id,
|
u.company_id as company_id,
|
||||||
count(t.*) as task_nbr,
|
count(t.*) as task_nbr,
|
||||||
sum(t.planned_hours) as task_hrs,
|
sum(t.planned_hours) as task_hrs,
|
||||||
sum(t.planned_hours * (100 - t.progress) / 100) as task_progress
|
sum(t.planned_hours * (100 - t.progress) / 100) as task_progress,
|
||||||
|
case when t.state is null then 'no' else t.state end as task_state
|
||||||
from
|
from
|
||||||
res_users u
|
res_users u
|
||||||
left join project_task t on (u.id = t.user_id)
|
left join
|
||||||
|
project_task t on (u.id = t.user_id)
|
||||||
|
where
|
||||||
|
u.active
|
||||||
group by
|
group by
|
||||||
u.id, u.company_id
|
u.id, u.company_id, t.state
|
||||||
)
|
)
|
||||||
''')
|
''')
|
||||||
report_task_user_pipeline_open()
|
report_task_user_pipeline_open()
|
||||||
|
|
|
@ -218,17 +218,17 @@
|
||||||
|
|
||||||
|
|
||||||
<record model="ir.actions.act_window" id="action_order_tree2">
|
<record model="ir.actions.act_window" id="action_order_tree2">
|
||||||
<field name="name">Sales in shipping exception</field>
|
<field name="name">Sales in Exception</field>
|
||||||
<field name="type">ir.actions.act_window</field>
|
<field name="type">ir.actions.act_window</field>
|
||||||
<field name="res_model">sale.order</field>
|
<field name="res_model">sale.order</field>
|
||||||
<field name="view_type">form</field>
|
<field name="view_type">form</field>
|
||||||
<field name="view_mode">tree,form</field>
|
<field name="view_mode">tree,form</field>
|
||||||
<field name="domain">[('state','=','shipping_except')]</field>
|
<field name="domain">[('state','in',('shipping_except','invoice_except')]</field>
|
||||||
</record>
|
</record>
|
||||||
<menuitem name="Sales Management/Sales Order/All Sales Order/" id="menu_action_order_tree2" action="action_order_tree2"/>
|
<menuitem name="Sales Management/Sales Order/All Sales Order/" id="menu_action_order_tree2" action="action_order_tree2"/>
|
||||||
|
|
||||||
<record model="ir.actions.act_window" id="action_order_tree3">
|
<record model="ir.actions.act_window" id="action_order_tree3">
|
||||||
<field name="name">Sales order to be invoiced</field>
|
<field name="name">Sales Order To Be Invoiced</field>
|
||||||
<field name="type">ir.actions.act_window</field>
|
<field name="type">ir.actions.act_window</field>
|
||||||
<field name="res_model">sale.order</field>
|
<field name="res_model">sale.order</field>
|
||||||
<field name="view_type">form</field>
|
<field name="view_type">form</field>
|
||||||
|
@ -238,12 +238,12 @@
|
||||||
<menuitem name="Sales Management/Sales Order/All Sales Order/" id="menu_action_order_tree3" action="action_order_tree3"/>
|
<menuitem name="Sales Management/Sales Order/All Sales Order/" id="menu_action_order_tree3" action="action_order_tree3"/>
|
||||||
|
|
||||||
<record model="ir.actions.act_window" id="action_order_tree4">
|
<record model="ir.actions.act_window" id="action_order_tree4">
|
||||||
<field name="name">Sales order in progress</field>
|
<field name="name">Sales Order in Progress</field>
|
||||||
<field name="type">ir.actions.act_window</field>
|
<field name="type">ir.actions.act_window</field>
|
||||||
<field name="res_model">sale.order</field>
|
<field name="res_model">sale.order</field>
|
||||||
<field name="view_type">form</field>
|
<field name="view_type">form</field>
|
||||||
<field name="view_mode">tree,form</field>
|
<field name="view_mode">tree,form</field>
|
||||||
<field name="domain">[('state','=','progress')]</field>
|
<field name="domain">[('state','in',('progress','waiting_date','manual'))]</field>
|
||||||
</record>
|
</record>
|
||||||
<menuitem
|
<menuitem
|
||||||
name="Sales Management/Sales Order/All Sales Order/Sales in Progress"
|
name="Sales Management/Sales Order/All Sales Order/Sales in Progress"
|
||||||
|
@ -253,7 +253,7 @@
|
||||||
|
|
||||||
|
|
||||||
<record model="ir.actions.act_window" id="action_order_tree5">
|
<record model="ir.actions.act_window" id="action_order_tree5">
|
||||||
<field name="name">All quotations</field>
|
<field name="name">All Quotations</field>
|
||||||
<field name="type">ir.actions.act_window</field>
|
<field name="type">ir.actions.act_window</field>
|
||||||
<field name="res_model">sale.order</field>
|
<field name="res_model">sale.order</field>
|
||||||
<field name="view_type">form</field>
|
<field name="view_type">form</field>
|
||||||
|
@ -266,27 +266,15 @@
|
||||||
sequence="1"
|
sequence="1"
|
||||||
action="action_order_tree5"/>
|
action="action_order_tree5"/>
|
||||||
|
|
||||||
<record model="ir.actions.act_window" id="action_order_tree6">
|
|
||||||
<field name="name">Sales order in invoice exception</field>
|
|
||||||
<field name="type">ir.actions.act_window</field>
|
|
||||||
<field name="res_model">sale.order</field>
|
|
||||||
<field name="view_type">form</field>
|
|
||||||
<field name="view_mode">tree,form</field>
|
|
||||||
<field name="domain">[('state','=','invoice_except')]</field>
|
|
||||||
</record>
|
|
||||||
<menuitem name="Sales Management/Sales Order/All Sales Order/" id="menu_action_order_tree6" action="action_order_tree6"/>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<record model="ir.actions.act_window" id="action_order_tree7">
|
<record model="ir.actions.act_window" id="action_order_tree7">
|
||||||
<field name="name">My sales in shipping exception</field>
|
<field name="name">My sales in shipping exception</field>
|
||||||
<field name="type">ir.actions.act_window</field>
|
<field name="type">ir.actions.act_window</field>
|
||||||
<field name="res_model">sale.order</field>
|
<field name="res_model">sale.order</field>
|
||||||
<field name="view_type">form</field>
|
<field name="view_type">form</field>
|
||||||
<field name="view_mode">tree,form</field>
|
<field name="view_mode">tree,form</field>
|
||||||
<field name="domain">[('state','=','shipping_except'),('user_id','=',uid)]</field>
|
<field name="domain">[('state','in',('shipping_except','invoice_except')),('user_id','=',uid)]</field>
|
||||||
</record>
|
</record>
|
||||||
<menuitem name="Sales Management/Sales Order/My Sales Order/My Sales in Shipping Exception" id="menu_action_order_tree7" action="action_order_tree7"/>
|
<menuitem name="Sales Management/Sales Order/My Sales Order/My Sales in Exception" id="menu_action_order_tree7" action="action_order_tree7"/>
|
||||||
|
|
||||||
<record model="ir.actions.act_window" id="action_order_tree8">
|
<record model="ir.actions.act_window" id="action_order_tree8">
|
||||||
<field name="name">My sales order waiting Invoice</field>
|
<field name="name">My sales order waiting Invoice</field>
|
||||||
|
@ -304,7 +292,7 @@
|
||||||
<field name="res_model">sale.order</field>
|
<field name="res_model">sale.order</field>
|
||||||
<field name="view_type">form</field>
|
<field name="view_type">form</field>
|
||||||
<field name="view_mode">tree,form</field>
|
<field name="view_mode">tree,form</field>
|
||||||
<field name="domain">[('state','=','progress'),('user_id','=',uid)]</field>
|
<field name="domain">[('state','in',('progress','waiting_date','manual')),('user_id','=',uid)]</field>
|
||||||
</record>
|
</record>
|
||||||
<menuitem
|
<menuitem
|
||||||
name="Sales Management/Sales Order/My Sales Order/My Sales in Progress"
|
name="Sales Management/Sales Order/My Sales Order/My Sales in Progress"
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"name" : "Double-entry Inventory Management",
|
"name" : "Stock Management",
|
||||||
"version" : "1.0",
|
"version" : "1.0",
|
||||||
"author" : "Tiny",
|
"author" : "Tiny",
|
||||||
"website" : "http://tinyerp.com/module_stock.html",
|
"website" : "http://tinyerp.com/module_stock.html",
|
||||||
|
|
|
@ -134,7 +134,7 @@ class stock_location(osv.osv):
|
||||||
continue
|
continue
|
||||||
product = products_by_id[product_id]
|
product = products_by_id[product_id]
|
||||||
result.append({
|
result.append({
|
||||||
'price': product.list_price,
|
'price': product.standard_price,
|
||||||
'name': product.name,
|
'name': product.name,
|
||||||
'code': product.default_code, # used by lot_overview_all report!
|
'code': product.default_code, # used by lot_overview_all report!
|
||||||
'variants': product.variants or '',
|
'variants': product.variants or '',
|
||||||
|
|
|
@ -79,7 +79,7 @@ def _get_moves(self, cr, uid, data, context):
|
||||||
if hasattr(pick, 'purchase_id') and pick.purchase_id:
|
if hasattr(pick, 'purchase_id') and pick.purchase_id:
|
||||||
currency=pick.purchase_id.pricelist_id.currency_id.id
|
currency=pick.purchase_id.pricelist_id.currency_id.id
|
||||||
|
|
||||||
_moves_arch_lst.append('<group col="6"><field name="uom%s"/>\
|
_moves_arch_lst.append('<group col="6"><field name="uom%s" nolabel="1"/>\
|
||||||
<field name="price%s"/>' % (m.id,m.id,))
|
<field name="price%s"/>' % (m.id,m.id,))
|
||||||
|
|
||||||
_moves_fields['price%s' % m.id] = {'string': 'Unit Price',
|
_moves_fields['price%s' % m.id] = {'string': 'Unit Price',
|
||||||
|
@ -89,7 +89,7 @@ def _get_moves(self, cr, uid, data, context):
|
||||||
'relation': 'product.uom', 'required': True,
|
'relation': 'product.uom', 'required': True,
|
||||||
'default': make_default(m.product_uom.id)}
|
'default': make_default(m.product_uom.id)}
|
||||||
|
|
||||||
_moves_arch_lst.append('<field name="currency%d"/></group>' % (m.id,))
|
_moves_arch_lst.append('<field name="currency%d" nolabel="1"/></group>' % (m.id,))
|
||||||
_moves_fields['currency%s' % m.id] = {'string': 'Currency',
|
_moves_fields['currency%s' % m.id] = {'string': 'Currency',
|
||||||
'type': 'many2one', 'relation': 'res.currency',
|
'type': 'many2one', 'relation': 'res.currency',
|
||||||
'required': True, 'default': make_default(currency)}
|
'required': True, 'default': make_default(currency)}
|
||||||
|
|
Loading…
Reference in New Issue