bzr revid: vir@tinyerp.com-20100805044351-cbdpg1ascb4ztp9k
This commit is contained in:
Vir (Open ERP) 2010-08-05 10:13:51 +05:30
commit 4248468d92
113 changed files with 4226 additions and 4888 deletions

View File

@ -20,7 +20,6 @@
##############################################################################
import time
import decimal_precision as dp
from osv import fields
from osv import osv
@ -94,11 +93,12 @@ class account_analytic_line(osv.osv):
# Compute based on pricetype
pricetype=self.pool.get('product.price.type').browse(cr, uid, company_obj.browse(cr,uid,company_id).property_valuation_price_type.id)
# Take the company currency as the reference one
context['currency_id']=company_obj.browse(cr, uid, company_id).currency_id.id
amount_unit=prod.price_get(pricetype.field, context)[prod.id]
amount_unit = prod.price_get(pricetype.field, context)[prod.id]
amount = amount_unit*unit_amount or 1.0
prec = self.pool.get('decimal.precision').precision_get(cr, uid, 'Account')
amount = amount_unit*unit_amount or 1.0
return {'value': {
'amount': - round(amount, 2),
'amount': - round(amount, prec),
'general_account_id': a,
}}
return {}

View File

@ -48,6 +48,7 @@
<record id="account_type_cash_equity" model="account.account.type">
<field name="name">Equity</field>
<field name="code">equity</field>
<field name="report_type">asset</field>
<field name="close_method">balance</field>
</record>
<record id="account_type_cash_moves" model="account.account.type">
@ -60,7 +61,7 @@
<!--
Chart of Account
-->
<record id="chart0" model="account.account">
<field name="code">X0</field>
<field name="name">Chart For Automated Tests</field>
@ -78,7 +79,7 @@
<field name="type">view</field>
<field name="user_type" ref="account_type_root"/>
</record>
<record model="account.account" id="assets_view">
<field name="name">Assets - (test)</field>
<field name="code">X10</field>
@ -87,7 +88,7 @@
<field name="reconcile" eval="False"/>
<field name="parent_id" ref="bal"/>
</record>
<record model="account.account" id="liabilities_view">
<field name="name">Liabilities - (test)</field>
<field name="code">X11</field>
@ -96,7 +97,7 @@
<field name="reconcile" eval="False"/>
<field name="parent_id" ref="bal"/>
</record>
<record id="fas" model="account.account">
<field name="code">X100</field>
<field name="name">Fixed Assets - (test)</field>
@ -204,7 +205,7 @@
<field name="type">view</field>
<field name="user_type" ref="account_type_root"/>
</record>
<record model="account.account" id="income_view">
<field name="name">Income - (test)</field>
<field name="code">X20</field>
@ -213,7 +214,7 @@
<field name="reconcile" eval="False"/>
<field name="parent_id" ref="gpf"/>
</record>
<record model="account.account" id="income_fx_income">
<field name="name">Foreign Exchange Gain - (test)</field>
<field name="code">X201</field>
@ -222,7 +223,7 @@
<field name="reconcile" eval="False"/>
<field name="parent_id" ref="income_view"/>
</record>
<record model="account.account" id="expense_view">
<field name="name">Expense - (test)</field>
<field name="code">X21</field>
@ -231,9 +232,9 @@
<field name="reconcile" eval="False"/>
<field name="parent_id" ref="gpf"/>
</record>
<record id="rev" model="account.account">
<field name="code">X200</field>
<field name="code">X200</field>
<field name="name">Revenue - (test)</field>
<field ref="income_view" name="parent_id"/>
<field name="type">view</field>
@ -279,7 +280,7 @@
<field name="type">other</field>
<field name="user_type" ref="account_type_expense"/>
</record>
<record model="account.account" id="income_fx_expense">
<field name="name">Foreign Exchange Loss - (test)</field>
<field name="code">X2111</field>
@ -288,7 +289,7 @@
<field name="reconcile" eval="False"/>
<field name="parent_id" ref="ovr"/>
</record>
<!-- Properties -->
<record forcecreate="True" id="property_account_receivable" model="ir.property">
<field name="name">property_account_receivable</field>

View File

@ -8,13 +8,13 @@ msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2010-08-02 20:19+0000\n"
"Last-Translator: Dragan Životić <dragan_zivotic@yahoo.com>\n"
"PO-Revision-Date: 2010-08-04 13:59+0000\n"
"Last-Translator: Данило Шеган <Unknown>\n"
"Language-Team: Serbian <sr@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-08-03 03:41+0000\n"
"X-Launchpad-Export-Date: 2010-08-05 03:35+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account

View File

@ -28,7 +28,7 @@ import account_general_ledger
import account_partner_ledger
import invoice
import overdue
import aged_trial_balance
import account_aged_partner_balance
import tax_report
#import account_tax_code
import account_balance_landscape

View File

@ -18,20 +18,20 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import time
import pooler
import rml_parse
from report import report_sxw
from common_report_header import common_report_header
class aged_trial_report(rml_parse.rml_parse):
class aged_trial_report(rml_parse.rml_parse, common_report_header):
def __init__(self, cr, uid, name, context):
super(aged_trial_report, self).__init__(cr, uid, name, context=context)
self.line_query = ''
self.query_line = ''
self.total_account = []
self.localcontext.update({
'time': time,
'get_lines': self._get_lines,
@ -40,11 +40,20 @@ class aged_trial_report(rml_parse.rml_parse):
'get_for_period': self._get_for_period,
'get_company': self._get_company,
'get_currency': self._get_currency,
'get_partners':self._get_partners,
'get_account': self._get_account,
'get_fiscalyear': self._get_fiscalyear,
})
def set_context(self, objects, data, ids, report_type=None):
self.query = data['form'].get('query_line', '')
self.direction_selection = data['form'].get('direction_selection', 'past')
self.date_from = data['form'].get('date_from', time.strftime('%Y-%m-%d'))
return super(aged_trial_report, self).set_context(objects, data, ids, report_type=report_type)
def _get_lines(self, form):
res = []
account_move_line_obj = pooler.get_pool(self.cr.dbname).get('account.move.line')
if (form['result_selection'] == 'customer' ):
self.ACCOUNT_TYPE = ['receivable']
elif (form['result_selection'] == 'supplier'):
@ -52,74 +61,68 @@ class aged_trial_report(rml_parse.rml_parse):
else:
self.ACCOUNT_TYPE = ['payable','receivable']
res = []
account_move_line_obj = pooler.get_pool(self.cr.dbname).get('account.move.line')
self.line_query = account_move_line_obj._query_get(self.cr, self.uid, obj='line',
context={'fiscalyear': form['fiscalyear']})
self.cr.execute("""SELECT DISTINCT res_partner.id AS id,
res_partner.name AS name
FROM res_partner,account_move_line AS line, account_account
WHERE (line.account_id=account_account.id)
AND ((reconcile_id IS NULL)
OR (reconcile_id IN (SELECT recon.id FROM account_move_reconcile AS recon WHERE recon.create_date > %s )))
AND (line.partner_id=res_partner.id)
AND (account_account.company_id = %s)
ORDER BY res_partner.name""" , (form['date1'],form['company_id']))
self.cr.execute('SELECT DISTINCT res_partner.id AS id,\
res_partner.name AS name \
FROM res_partner,account_move_line AS l, account_account\
WHERE (l.account_id=account_account.id)\
AND ((reconcile_id IS NULL)\
OR (reconcile_id IN (SELECT recon.id FROM account_move_reconcile AS recon WHERE recon.create_date > %s )))\
AND (l.partner_id=res_partner.id)\
AND ' + self.query + ' \
ORDER BY res_partner.name' , (self.date_from,))
partners = self.cr.dictfetchall()
## mise a 0 du total
for i in range(7):
self.total_account.append(0)
#
# Build a string like (1,2,3) for easy use in SQL query
partner_ids = [x['id'] for x in partners]
# This dictionary will store the debit-credit for all partners, using partner_id as key.
totals = {}
self.cr.execute("""SELECT partner_id, SUM(debit-credit)
FROM account_move_line AS line, account_account
WHERE (line.account_id = account_account.id)
AND (account_account.type IN %s)
AND (partner_id IN %s)
AND ((reconcile_id IS NULL)
OR (reconcile_id IN (SELECT recon.id FROM account_move_reconcile AS recon WHERE recon.create_date > %s )))
AND (account_account.company_id = %s)
AND account_account.active
GROUP BY partner_id""" , (tuple(self.ACCOUNT_TYPE), tuple(partner_ids),form['date1'],form['company_id'],))
self.cr.execute('SELECT partner_id, SUM(debit-credit) \
FROM account_move_line AS l, account_account\
WHERE (l.account_id = account_account.id)\
AND (account_account.type IN %s)\
AND (partner_id IN %s)\
AND ((reconcile_id IS NULL)\
OR (reconcile_id IN (SELECT recon.id FROM account_move_reconcile AS recon WHERE recon.create_date > %s )))\
AND ' + self.query + '\
AND account_account.active\
GROUP BY partner_id ' , (tuple(self.ACCOUNT_TYPE), tuple(partner_ids), self.date_from,))
t = self.cr.fetchall()
for i in t:
totals[i[0]] = i[1]
# This dictionary will store the future or past of all partners
future_past = {}
if form['direction_selection'] == 'future':
self.cr.execute("""SELECT partner_id, SUM(debit-credit)
FROM account_move_line AS line, account_account
WHERE (line.account_id=account_account.id)
AND (account_account.type IN %s)
AND (COALESCE(date_maturity,date) < %s)
AND (partner_id IN %s)
AND ((reconcile_id IS NULL)
OR (reconcile_id IN (SELECT recon.id FROM account_move_reconcile AS recon WHERE recon.create_date > %s )))
AND (account_account.company_id = %s)
AND account_account.active
GROUP BY partner_id""", (tuple(self.ACCOUNT_TYPE), form['date1'], tuple(partner_ids),form['date1'], form['company_id'],))
if self.direction_selection == 'future':
self.cr.execute('SELECT partner_id, SUM(debit-credit) \
FROM account_move_line AS l, account_account\
WHERE (l.account_id=account_account.id)\
AND (account_account.type IN %s)\
AND (COALESCE(date_maturity, date) < %s)\
AND (partner_id IN %s)\
AND ((reconcile_id IS NULL)\
OR (reconcile_id IN (SELECT recon.id FROM account_move_reconcile AS recon WHERE recon.create_date > %s )))\
AND '+ self.query + '\
AND account_account.active\
GROUP BY partner_id', (tuple(self.ACCOUNT_TYPE), self.date_from, tuple(partner_ids),self.date_from,))
t = self.cr.fetchall()
for i in t:
future_past[i[0]] = i[1]
elif form['direction_selection'] == 'past': # Using elif so people could extend without this breaking
self.cr.execute("""SELECT partner_id, SUM(debit-credit)
FROM account_move_line AS line, account_account
WHERE (line.account_id=account_account.id)
AND (account_account.type IN %s)
AND (COALESCE(date_maturity,date) > %s)
AND (partner_id IN %s)
AND ((reconcile_id IS NULL)
OR (reconcile_id IN (SELECT recon.id FROM account_move_reconcile AS recon WHERE recon.create_date > %s )))
AND (account_account.company_id = %s)
AND account_account.active
GROUP BY partner_id""" , (tuple(self.ACCOUNT_TYPE), form['date1'], tuple(partner_ids), form['date1'], form['company_id'],))
elif self.direction_selection == 'past': # Using elif so people could extend without this breaking
self.cr.execute('SELECT partner_id, SUM(debit-credit) \
FROM account_move_line AS l, account_account\
WHERE (l.account_id=account_account.id)\
AND (account_account.type IN %s)\
AND (COALESCE(date_maturity,date) > %s)\
AND (partner_id IN %s)\
AND ((reconcile_id IS NULL)\
OR (reconcile_id IN (SELECT recon.id FROM account_move_reconcile AS recon WHERE recon.create_date > %s )))\
AND '+ self.query + '\
AND account_account.active\
GROUP BY partner_id' , (tuple(self.ACCOUNT_TYPE), self.date_from, tuple(partner_ids), self.date_from,))
t = self.cr.fetchall()
for i in t:
future_past[i[0]] = i[1]
@ -128,18 +131,17 @@ class aged_trial_report(rml_parse.rml_parse):
# Each history will contain : history[1] = {'<partner_id>': <partner_debit-credit>}
history = []
for i in range(5):
self.cr.execute("""SELECT partner_id, SUM(debit-credit)
FROM account_move_line AS line, account_account
WHERE (line.account_id=account_account.id)
AND (account_account.type IN %s)
AND (COALESCE(date_maturity,date) BETWEEN %s AND %s)
AND (partner_id IN %s)
AND ((reconcile_id IS NULL)
OR (reconcile_id IN (SELECT recon.id FROM account_move_reconcile AS recon WHERE recon.create_date > %s )))
AND (account_account.company_id = %s)
AND account_account.active
GROUP BY partner_id""" , (tuple(self.ACCOUNT_TYPE), form[str(i)]['start'], form[str(i)]['stop'], tuple(partner_ids) ,form['date1'] ,form['company_id'],))
self.cr.execute('SELECT partner_id, SUM(debit-credit)\
FROM account_move_line AS l, account_account\
WHERE (l.account_id = account_account.id)\
AND (account_account.type IN %s)\
AND (COALESCE(date_maturity,date) BETWEEN %s AND %s)\
AND (partner_id IN %s)\
AND ((reconcile_id IS NULL)\
OR (reconcile_id IN (SELECT recon.id FROM account_move_reconcile AS recon WHERE recon.create_date > %s )))\
AND '+ self.query + '\
AND account_account.active\
GROUP BY partner_id' , (tuple(self.ACCOUNT_TYPE), form[str(i)]['start'], form[str(i)]['stop'], tuple(partner_ids) ,self.date_from,))
t = self.cr.fetchall()
d = {}
for i in t:
@ -149,16 +151,14 @@ class aged_trial_report(rml_parse.rml_parse):
for partner in partners:
values = {}
## If choise selection is in the future
if form['direction_selection'] == 'future':
if self.direction_selection == 'future':
# Query here is replaced by one query which gets the all the partners their 'before' value
before = False
if future_past.has_key(partner['id']):
before = [ future_past[partner['id']] ]
self.total_account[6] = self.total_account[6] + (before and before[0] or 0.0)
values['direction'] = before and before[0] or 0.0
elif form['direction_selection'] == 'past': # Changed this so people could in the future create new direction_selections
elif self.direction_selection == 'past': # Changed this so people could in the future create new direction_selections
# Query here is replaced by one query which gets the all the partners their 'after' value
after = False
if future_past.has_key(partner['id']): # Making sure this partner actually was found by the query
@ -211,15 +211,17 @@ class aged_trial_report(rml_parse.rml_parse):
period = self.total_account[int(pos)]
return period
def _get_company(self, form):
return pooler.get_pool(self.cr.dbname).get('res.company').browse(self.cr, self.uid, form['company_id']).name
def _get_currency(self, form):
return pooler.get_pool(self.cr.dbname).get('res.company').browse(self.cr, self.uid, form['company_id']).currency_id.name
def _get_partners(self,data):
if data['form']['result_selection'] == 'customer':
return 'Receivable Accounts'
elif data['form']['result_selection'] == 'supplier':
return 'Payable Accounts'
elif data['form']['result_selection'] == 'customer_supplier':
return 'Receivable and Payable Accounts'
return ''
report_sxw.report_sxw('report.account.aged_trial_balance', 'res.partner',
'addons/account/report/aged_trial_balance.rml',parser=aged_trial_report,header=False)
'addons/account/report/account_aged_partner_balance.rml',parser=aged_trial_report, header=False)
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -3,33 +3,6 @@
<template pageSize="(1120.0,770.0)" title="Test" author="Martin Simon" allowSplitting="20">
<pageTemplate id="first">
<frame id="first" x1="20.0" y1="35.0" width="1080" height="650"/>
<pageGraphics>
<!--logo-->
<!--<fill color="darkblue"/>-->
<!--<stroke color="darkblue"/>-->
<!--TITLE COMPANY-->
<!-- <drawString x="4.6cm" y="28.7cm">[[ company.partner_id.name ]]</drawString> -->
<setFont name="Helvetica-Bold" size="9"/>
<!--COL 1-->
<drawString x="1.5cm" y="25.00cm">[[ company.name ]]</drawString>
<drawString x="33.90cm" y="25.00cm">Age Partner Balance - [[ get_currency(data['form']) ]]</drawString>
<!--COL 2-->
<setFont name="Helvetica" size="9"/>
<drawString x="1.5cm" y="0.90cm"> [[ formatLang(time.strftime("%Y-%m-%d %H:%M:%S", time.localtime()),date_time = True) ]]</drawString>
<drawString x="36.90cm" y="0.90cm">Page <pageNumber/></drawString>
<!--<drawRightString x="19.8cm" y="28cm">[[ company.rml_header1 ]]</drawRightString>-->
<lineMode width="0.7"/>
<lines>1.5cm 24.70cm 38.00cm 24.70cm</lines>
<setFont name="Helvetica" size="8"/>
</pageGraphics>
</pageTemplate>
</template>
<stylesheet>
@ -47,6 +20,10 @@
<blockBackground colorName="#e6e6e6" start="1,1" stop="1,1"/>
<blockBackground colorName="#e6e6e6" start="2,1" stop="2,1"/>
</blockTableStyle>
<blockTableStyle id="Table_header_Content">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
</blockTableStyle>
<blockTableStyle id="Tableau1">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
@ -60,6 +37,38 @@
<blockValign value="TOP"/>
<blockAlignment value="LEFT" start="2,1" stop="-1,-1"/>
</blockTableStyle>
<blockTableStyle id="Table8">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="0,0" stop="0,-1"/>
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="0,0" stop="0,0"/>
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="1,0" stop="1,-1"/>
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="1,0" stop="1,0"/>
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="2,0" stop="2,-1"/>
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="2,0" stop="2,0"/>
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="3,0" stop="3,-1"/>
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="3,0" stop="3,0"/>
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="4,0" stop="4,-1"/>
<lineStyle kind="LINEAFTER" colorName="#cccccc" start="4,0" stop="4,-1"/>
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="4,0" stop="4,0"/>
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="0,1" stop="0,-1"/>
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="0,1" stop="0,1"/>
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="0,-1" stop="0,-1"/>
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="1,1" stop="1,-1"/>
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="1,1" stop="1,1"/>
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="1,-1" stop="1,-1"/>
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="2,1" stop="2,-1"/>
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="2,1" stop="2,1"/>
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="2,-1" stop="2,-1"/>
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="3,1" stop="3,-1"/>
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="3,1" stop="3,1"/>
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="3,-1" stop="3,-1"/>
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="4,1" stop="4,-1"/>
<lineStyle kind="LINEAFTER" colorName="#cccccc" start="4,1" stop="4,-1"/>
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="4,1" stop="4,1"/>
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="4,-1" stop="4,-1"/>
</blockTableStyle>
<blockTableStyle id="Tableau3">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
@ -95,8 +104,64 @@
<paraStyle name="Table Heading" fontName="Helvetica" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="Caption" fontName="Helvetica" fontSize="8.0" leading="15" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="Index" fontName="Helvetica"/>
<paraStyle name="terp_tblheader_General_Centre" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="terp_default_Centre_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_header" fontName="Helvetica-Bold" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="terp_header_Centre" fontName="Helvetica-Bold" fontSize="15.0" leading="15" alignment="CENTER" spaceBefore="12.0" spaceAfter="6.0"/>
</stylesheet>
<story>
<para style="P9">
<font color="white"> </font>
</para>
<blockTable colWidths="180.0,180.0,180.0" style="Table_header_Content">
<tr>
<td><para style="terp_header"><font color="white"> </font></para>
</td>
<td><para style="terp_header_Centre">Aged Trial balance</para></td>
<td><para style="terp_header"><font color="white"> </font></para></td>
</tr>
</blockTable>
<blockTable colWidths="200.0,200.0,200.0,219.0,200.0" style="Table8">
<tr>
<td>
<para style="terp_tblheader_General_Centre">Chart of Account</para>
</td>
<td>
<para style="terp_tblheader_General_Centre">Fiscal Year</para>
</td>
<td>
<para style="terp_tblheader_General_Centre">Start Date</para>
</td>
<td>
<para style="terp_tblheader_General_Centre">Partner's</para>
</td>
<td>
<para style="terp_tblheader_General_Centre">Printing Date</para>
</td>
</tr>
<tr>
<td>
<para style="terp_default_Centre_8">[[ get_account(data) or '' ]]</para>
</td>
<td>
<para style="terp_default_Centre_8">[[ get_fiscalyear(data) or '' ]]</para>
</td>
<td>
<para style="terp_default_Centre_8">[[ data['form']['date_from'] ]]</para>
</td>
<td>
<para style="terp_default_Centre_8">[[ get_partners(data) ]]</para>
</td>
<td>
<para style="terp_default_Centre_8">[[ formatLang(time.strftime('%Y-%m-%d %H:%M:%S'), date_time = True)]]</para>
</td>
</tr>
</blockTable>
<para style="P9">
<font color="white"> </font>
</para> <para style="P9">
<font color="white"> </font>
</para>
<blockTable colWidths="300.0,100.0,100.0,100.0,100.0,105.0,105.0,125.0" style="Table2" repeatRows="1">
<tr>
<td>

View File

@ -179,7 +179,7 @@
<paraStyle name="terp_default_Right_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Centre_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_header_Right" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="terp_header_Centre" fontName="Helvetica-Bold" fontSize="12.0" leading="15" alignment="CENTER" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="terp_header_Centre" fontName="Helvetica-Bold" fontSize="15.0" leading="15" alignment="CENTER" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="terp_default_address" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Bold_9" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
@ -209,9 +209,9 @@
<para style="P11">
<font color="white"> </font>
</para>
<blockTable colWidths="100.0,60.0,88.0,140.0,90.0" style="Table8">
<blockTable colWidths="130.0,80.0,100.0,140.0,90.0" style="Table8">
<tr>
<td><para style="terp_tblheader_General_Right">Company <font color="white"> [[ data['model']=='account.account' or removeParentNode('para') ]]</font></para>
<td><para style="terp_tblheader_General_Centre">[[ data['model']=='account.account' and 'Company'or removeParentNode('para') ]]</para>
<para style="terp_tblheader_General_Centre"> [[ data['model']=='ir.ui.menu' and 'Chart of Account' or removeParentNode('para') ]]</para></td>
<td>
<para style="terp_tblheader_General_Centre">Fiscal Year</para>

View File

@ -125,7 +125,7 @@
<paraStyle name="terp_default_Right_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Centre_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_header_Right" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="terp_header_Centre" fontName="Helvetica-Bold" fontSize="12.0" leading="15" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="terp_header_Centre" fontName="Helvetica-Bold" fontSize="15.0" leading="15" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="terp_default_address" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Bold_9" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>

View File

@ -80,7 +80,7 @@
<blockTableStyle id="Table2_header">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,0" stop="-1,0"/>
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="0,0" stop="-1,0"/>
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="0,0" stop="0,-1"/>
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="0,0" stop="0,0"/>
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="0,-1" stop="0,-1"/>
@ -168,9 +168,6 @@
</td>
</tr>
</blockTable>
<para style="terp_default_9">
<font color="white"> </font>
</para>
<blockTable colWidths="539.0" style="Table_Company_Name">
<tr>
<td>
@ -182,7 +179,7 @@
<para style="terp_default_9">
<font color="white"> </font>
</para>
<blockTable colWidths="100.0,100.0,140.0,80.0,90.0" style="Table2_header" >
<blockTable colWidths="120.0,100.0,140.0,90.0,90.0" style="Table2_header" >
<tr>
<td><para style="terp_tblheader_General_Centre">Chart of Account </para></td>
<td><para style="terp_tblheader_General_Centre">Fiscal Year</para></td>

View File

@ -96,7 +96,7 @@
<blockTableStyle id="Table2_header">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,0" stop="-1,0"/>
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="0,0" stop="-1,0"/>
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="0,0" stop="0,-1"/>
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="0,0" stop="0,0"/>
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="0,-1" stop="0,-1"/>
@ -154,14 +154,14 @@
<paraStyle name="terp_tblheader_Details" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="terp_default_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Bold_8" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_tblheader_General_Centre" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="terp_tblheader_General_Centre" fontName="Helvetica-Bold" fontSize="9.0" leading="10" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="terp_tblheader_General_Right" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="terp_tblheader_Details_Centre" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="terp_tblheader_Details_Right" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="terp_default_Right_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Centre_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_header_Right" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="terp_header_Centre" fontName="Helvetica-Bold" fontSize="12.0" leading="19" alignment="CENTER" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="terp_header_Centre" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="CENTER" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="terp_default_address" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Bold_9" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
@ -175,10 +175,19 @@
<para style="Standard">
<font color="white"> </font>
</para>
<blockTable colWidths="1049.0" style="Table_Company_Name">
<blockTable colWidths="539.0" style="Table_Heading">
<tr>
<td>
<para style="terp_header_Centre">Balance Sheet </para>
<para style="Standard">
<font color="white"> </font>
</para>
</td>
</tr>
</blockTable>
<blockTable colWidths="539.0" style="Table_Company_Name">
<tr>
<td>
<para style="terp_header_Centre">Balance Sheet</para>
</td>
</tr>
</blockTable>
@ -190,7 +199,7 @@
</para>
<para style="terp_default_8">[[ get_data(data) or removeParentNode('para') ]]</para>
<blockTable colWidths="150.0,110.0,140.0,80.0,90.0" style="Table2_header" >
<blockTable colWidths="210.0,210.0,200.0,200.0,200.0" style="Table2_header" >
<tr>
<td><para style="terp_tblheader_General_Centre">Chart of Account </para></td>
<td><para style="terp_tblheader_General_Centre">Fiscal Year</para></td>
@ -202,7 +211,7 @@
<td><para style="terp_default_Centre_8">[[ get_account(data) or removeParentNode('para') ]]</para></td>
<td><para style="terp_default_Centre_8">[[ get_fiscalyear(data) or '' ]]</para></td>
<td><para style="terp_default_Centre_8">[[ get_filter(data)=='No Filter' and get_filter(data) or removeParentNode('para') ]] </para>
<blockTable colWidths="60.0,60.0" style="Table3">[[ get_filter(data)=='Date' or removeParentNode('blockTable') ]]
<blockTable colWidths="85.0,85.0" style="Table3">[[ get_filter(data)=='Date' or removeParentNode('blockTable') ]]
<tr>
<td><para style="terp_tblheader_Details_Centre">Start Date</para></td>
<td><para style="terp_tblheader_Details_Centre">End Date</para></td>
@ -212,7 +221,7 @@
<td><para style="terp_default_Centre_8">[[get_end_date(data) ]]</para></td>
</tr>
</blockTable>
<blockTable colWidths="65.0,60.0" style="Table3">[[ get_filter(data)=='Periods' or removeParentNode('blockTable') ]]
<blockTable colWidths="85.0,85.0" style="Table3">[[ get_filter(data)=='Periods' or removeParentNode('blockTable') ]]
<tr>
<td><para style="terp_tblheader_Details_Centre">Start Period</para></td>
<td><para style="terp_tblheader_Details_Centre">End Period</para></td>

View File

@ -159,7 +159,7 @@
<blockTableStyle id="Table2">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,0" stop="-1,0"/>
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="0,0" stop="-1,0"/>
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="0,0" stop="0,-1"/>
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="0,0" stop="0,0"/>
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="0,-1" stop="0,-1"/>
@ -216,7 +216,7 @@
<paraStyle name="terp_default_Right_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Centre_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_header_Right" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="terp_header_Centre" fontName="Helvetica-Bold" fontSize="12.0" leading="15" alignment="CENTER" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="terp_header_Centre" fontName="Helvetica-Bold" fontSize="15.0" leading="15" alignment="CENTER" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="terp_default_address" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Bold_9" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
@ -242,10 +242,10 @@
<para style="P9">
<font color="white"> </font>
</para>
<blockTable colWidths="80.0,80.0,100.0,130.0,100.0" style="Table2">
<blockTable colWidths="90.0,80.0,100.0,130.0,100.0" style="Table2">
<tr>
<td><para style="terp_tblheader_General_Right">Company <font color="white"> [[ data['model']=='account.journal.period' or removeParentNode('para') ]]</font></para>
<para style="terp_tblheader_General_Centre">Chart of Account <font color="white"> [[ data['model']=='ir.ui.menu' or removeParentNode('para') ]]</font></para></td>
<td><para style="terp_tblheader_General_Centre">[[ data['model']=='account.journal.period' and 'Company' or removeParentNode('para') ]]</para>
<para style="terp_tblheader_General_Centre"> [[ data['model']=='ir.ui.menu' and 'Chart of Account' or removeParentNode('para') ]]</para></td>
<td><para style="terp_tblheader_General_Centre">Fiscal Year</para></td>
<td><para style="terp_tblheader_General_Centre">Journal</para></td>
<td><para style="terp_tblheader_General_Centre">Filter By [[get_filter(data)!='No Filter' and get_filter(data) ]]</para></td>

View File

@ -86,7 +86,7 @@
<blockTableStyle id="Table2">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,0" stop="-1,0"/>
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="0,0" stop="-1,0"/>
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="0,0" stop="0,-1"/>
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="0,0" stop="0,0"/>
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="0,-1" stop="0,-1"/>
@ -190,7 +190,7 @@
<paraStyle name="terp_default_Right_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Centre_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_header_Right" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="terp_header_Centre" fontName="Helvetica-Bold" fontSize="12.0" leading="15" alignment="CENTER" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="terp_header_Centre" fontName="Helvetica-Bold" fontSize="15.0" leading="15" alignment="CENTER" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="terp_default_address" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Bold_9" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
@ -224,8 +224,8 @@
</blockTable>
<blockTable colWidths="80.0,100,80.0,150.0,100.0" style="Table2">
<tr>
<td><para style="terp_tblheader_General_Right">Company <font color="white"> [[ data['model']=='account.journal.period' or removeParentNode('para') ]]</font></para>
<para style="terp_tblheader_General_Centre">Chart of Account <font color="white"> [[ data['model']=='ir.ui.menu' or removeParentNode('para') ]]</font></para></td>
<td><para style="terp_tblheader_General_Centre">[[ data['model']=='account.journal.period' and 'Company' or removeParentNode('para') ]]</para>
<para style="terp_tblheader_General_Centre"> [[ data['model']=='ir.ui.menu' and 'Chart of Account' or removeParentNode('para') ]]</para></td>
<td><para style="terp_tblheader_General_Centre">Fiscal Year</para></td>
<td><para style="terp_tblheader_General_Centre">Journals</para></td>
<td><para style="terp_tblheader_General_Centre">Filter By [[ get_filter(data)!='No Filter' and get_filter(data) ]]</para></td>
@ -264,7 +264,7 @@
<para style="P9">
<font color="white"> </font>
</para>
<blockTable colWidths="100.0,125.0,83.0,88.0,100.0" style="Table_Journal_Title" repeatRows="1"><para>[[ display_currency(data)==False or removeParentNode('blockTable') ]]</para>
<blockTable colWidths="100.0,125.0,90.0,100.0,100.0" style="Table_Journal_Title" repeatRows="1"><para>[[ display_currency(data)==False or removeParentNode('blockTable') ]]</para>
<tr>
<td><para style="terp_tblheader_Details">Code</para></td>
<td><para style="terp_tblheader_Details">Journal Name</para></td>
@ -325,7 +325,7 @@
</td>
</tr>
</blockTable>
<blockTable colWidths="100.0,125.0,83.0,88.0,100.0" style="Table_Journal_Title">[[ display_currency(data)==False or removeParentNode('blockTable') ]]
<blockTable colWidths="100.0,125.0,90.0,100.0,100.0" style="Table_Journal_Title">[[ display_currency(data)==False or removeParentNode('blockTable') ]]
<tr>
<td>
<para style="terp_default_Bold_9">[[ o.name ]] :</para>
@ -347,7 +347,7 @@
</blockTable>
<section>
<para style="Standard"><font color="white">[[lines(o.id) and removeParentNode('para') or removeParentNode('section') ]]</font></para>
<blockTable colWidths="100.0,125.0,83.0,88.0,100.0" style="Table_Journal_Detail">[[ display_currency(data) == False or removeParentNode('blockTable') ]]
<blockTable colWidths="100.0,125.0,90.0,100.0,100.0" style="Table_Journal_Detail">[[ display_currency(data) == False or removeParentNode('blockTable') ]]
<tr>
<td>
<para style="terp_default_9"><font face="Times-Roman">[[ repeatIn(lines(o.id),'line')]]</font> [[ line['code'] ]]</para>

View File

@ -9,10 +9,8 @@
</pageTemplate>
</template>
<stylesheet>
<blockTableStyle id="tbl_header">
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,0" stop="-1,0"/>
<blockValign value="TOP"/>
</blockTableStyle>
<blockTableStyle id="Table_Company_Name">
@ -20,12 +18,9 @@
<blockValign value="TOP"/>
</blockTableStyle>
<blockTableStyle id="tbl_content">
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,1" stop="-1,-1"/>
<blockValign value="TOP"/>
</blockTableStyle>
<blockTableStyle id="Table_Subheader_Content_detail">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
@ -107,7 +102,7 @@
<blockTableStyle id="Table2">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,0" stop="-1,0"/>
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="0,0" stop="-1,0"/>
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="0,0" stop="0,-1"/>
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="0,0" stop="0,0"/>
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="0,-1" stop="0,-1"/>
@ -194,12 +189,10 @@
<para style="P9">
<font color="white"> </font>
</para>
<para>[[ repeatIn(objects, 'a') ]]</para>
<blockTable colWidths="80.0,70.0,70.0,80.0,110.0,80.0,80.0" style="Table2">
<blockTable colWidths="80.0,70.0,70.0,80.0,100.0,70.0,80.0" style="Table2">
<tr>
<td><para style="terp_tblheader_General_Centre">Chat Account</para></td>
<td><para style="terp_tblheader_General_Centre">Chart of Account</para></td>
<td><para style="terp_tblheader_General_Centre">Fiscal Year</para></td>
<td><para style="terp_tblheader_General_Centre">Journals</para></td>
<td><para style="terp_tblheader_General_Centre">Display Account </para></td>

View File

@ -101,7 +101,7 @@
<blockTableStyle id="Table2">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,0" stop="-1,0"/>
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="0,0" stop="-1,0"/>
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="0,0" stop="0,-1"/>
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="0,0" stop="0,0"/>
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="0,-1" stop="0,-1"/>
@ -200,14 +200,10 @@
<para style="terp_default_8">
<font color="white"> </font>
</para>
<para style="terp_default_8">
<font color="white"> </font>
</para>
<blockTable colWidths="200.0,100.0,100.0,80.0,150.0,100.0,100.0" style="Table2">
<blockTable colWidths="200.0,130.0,200.0,150.0,150.0,100.0,110.0" style="Table2">
<tr>
<td><para style="terp_tblheader_General_Right">Company <font color="white"> [[ data['model']=='account.account' or removeParentNode('para') ]]</font></para>
<para style="terp_tblheader_General_Centre">Chart of Account <font color="white"> [[ data['model']=='ir.ui.menu' or removeParentNode('para') ]]</font></para></td>
<td><para style="terp_tblheader_General_Centre">[[ data['model']=='account.account' and 'Company' or removeParentNode('para') ]]</para>
<para style="terp_tblheader_General_Centre"> [[ data['model']=='ir.ui.menu' and 'Chart of Account' or removeParentNode('para') ]]</para></td>
<td><para style="terp_tblheader_General_Centre">Fiscal Year</para></td>
<td><para style="terp_tblheader_General_Centre">Journals</para></td>
<td><para style="terp_tblheader_General_Centre">Display Account</para></td>

View File

@ -3,9 +3,6 @@
<template pageSize="(595.0,842.0)" title="Print Journal" author="OpenERP" allowSplitting="20">
<pageTemplate id="first">
<frame id="first" x1="57.0" y1="57.0" width="481" height="728"/>
<header>
</header>
</pageTemplate>
</template>
<stylesheet>
@ -29,7 +26,7 @@
<blockTableStyle id="Table2">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,0" stop="-1,0"/>
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="0,0" stop="-1,0"/>
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="0,0" stop="0,-1"/>
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="0,0" stop="0,0"/>
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="0,-1" stop="0,-1"/>
@ -172,7 +169,7 @@
<paraStyle name="terp_tblheader_Details_Right" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="terp_default_Right_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_header_Right" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="terp_header_Centre" fontName="Helvetica-Bold" fontSize="12.0" leading="19" alignment="CENTER" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="terp_header_Centre" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="CENTER" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="terp_default_address" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Centre_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Right_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
@ -203,10 +200,10 @@
<para style="P9">
<font color="white"> </font>
</para>
<blockTable colWidths="80.0,80.0,80.0,120.0,70.0,100.0" style="Table2">
<blockTable colWidths="85.0,80.0,80.0,120.0,70.0,100.0" style="Table2">
<tr>
<td><para style="terp_tblheader_General_Right">Company <font color="white"> [[ data['model']=='account.journal.period' or removeParentNode('para') ]]</font></para>
<para style="terp_tblheader_General_Centre">Chart of Account <font color="white"> [[ data['model']=='ir.ui.menu' or removeParentNode('para') ]]</font></para></td>
<td><para style="terp_tblheader_General_Centre"> [[ data['model']=='account.journal.period'and 'Company' or removeParentNode('para') ]]</para>
<para style="terp_tblheader_General_Centre">[[ data['model']=='ir.ui.menu' and 'Chart of Account' or removeParentNode('para') ]]</para></td>
<td><para style="terp_tblheader_General_Centre">Fiscal Year</para></td>
<td><para style="terp_tblheader_General_Centre">Journal</para></td>
<td><para style="terp_tblheader_General_Centre">Filters By </para></td>

View File

@ -82,7 +82,7 @@
<blockTableStyle id="Table2_header">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,0" stop="-1,0"/>
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="0,0" stop="-1,0"/>
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="0,0" stop="0,-1"/>
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="0,0" stop="0,0"/>
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="0,-1" stop="0,-1"/>
@ -157,7 +157,7 @@
<paraStyle name="P13" fontName="Helvetica" fontSize="8.0" leading="10" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P14" rightIndent="17.0" leftIndent="-0.0" fontName="Times-Bold" fontSize="8.0" leading="10" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="Standard" fontName="Helvetica"/>
<paraStyle name="terp_header_Centre" fontName="Helvetica-Bold" fontSize="12.0" leading="19" alignment="CENTER" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="terp_header_Centre" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="CENTER" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="terp_default_Centre_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="Text body" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="List" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
@ -189,7 +189,7 @@
<para style="terp_default_8">
<font color="white"> </font>
</para>
<blockTable colWidths="80.0,80.0,100.0,140.0,80.0,80.0" style="Table2_header">
<blockTable colWidths="90.0,80.0,80.0,130.0,80.0,80.0" style="Table2_header">
<tr>
<td><para style="terp_tblheader_General_Centre">Chart of Account</para></td>
<td><para style="terp_tblheader_General_Centre">Fiscal Year</para></td>

View File

@ -41,7 +41,7 @@
<blockTableStyle id="Table2_header">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,0" stop="-1,0"/>
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="0,0" stop="-1,0"/>
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="0,0" stop="0,-1"/>
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="0,0" stop="0,0"/>
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="0,-1" stop="0,-1"/>
@ -155,7 +155,7 @@
<paraStyle name="terp_default_Right_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Centre_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_header_Right" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="terp_header_Centre" fontName="Helvetica-Bold" fontSize="12.0" leading="15" alignment="CENTER" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="terp_header_Centre" fontName="Helvetica-Bold" fontSize="15.0" leading="15" alignment="CENTER" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="terp_default_address" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Bold_9" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
@ -176,12 +176,43 @@
<td>
<para style="terp_header_Centre">Third Party Ledger</para>
</td>
</tr>
</blockTable>
<para style="terp_default_2">
<tr>
<td>
<para style="P4">
<font color="white"> </font>
</para>
<para style="terp_default_2">
</td>
</tr>
</tr>
</blockTable>
<para style="P4">
<font color="white"> </font>
</para>
<para style="P4">
<font color="white"> </font>
</para>
<para style="P4">
<font color="white"> </font>
</para>
<para style="P4">
<font color="white"> </font>
</para>
<para style="P4">
<font color="white"> </font>
</para>
<para style="P4">
<font color="white"> </font>
</para>
<para style="P4">
<font color="white"> </font>
</para>
<para style="P4">
<font color="white"> </font>
</para>
<para style="P4">
<font color="white"> </font>
</para>
<para style="P4">
<font color="white"> </font>
</para>
<para style="P3">[[ repeatIn(objects, 'p') ]] [[ setLang(p.lang) ]]</para>
@ -227,7 +258,18 @@
<para style="P4">
<font color="white"> </font>
</para>
<para style="P4">
<font color="white"> </font>
</para>
<para style="P4">
<font color="white"> </font>
</para>
<para style="P4">
<font color="white"> </font>
</para>
<para style="P4">
<font color="white"> </font>
</para>
<blockTable colWidths="65.0,28.0,45.0,175.0,77.0,75.0,74.0" style="Table_header_1">[[ display_currency(data) == False or removeParentNode('blockTable') ]]
<tr>
<td>

View File

@ -153,7 +153,7 @@
<blockTableStyle id="Table8">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,0" stop="-1,0"/>
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="0,0" stop="-1,0"/>
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="0,0" stop="0,-1"/>
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="0,0" stop="0,0"/>
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="0,-1" stop="0,-1"/>
@ -193,6 +193,10 @@
<blockValign value="TOP"/>
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="1,0" stop="1,-1"/>
</blockTableStyle>
<blockTableStyle id="Table_header">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
</blockTableStyle>
<blockTableStyle id="Table_header_1">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
@ -304,7 +308,7 @@
<paraStyle name="terp_default_Right_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Centre_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_header_Right" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="terp_header_Centre" fontName="Helvetica-Bold" fontSize="12.0" leading="15" alignment="CENTER" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="terp_header_Centre" fontName="Helvetica-Bold" fontSize="15.0" leading="15" alignment="CENTER" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="terp_default_address" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Bold_9" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
@ -320,17 +324,33 @@
<images/>
</stylesheet>
<story>
<para style="terp_default_2">
<para style="terp_default_9">
<font color="white"> </font>
</para>
<para style="terp_default_2">
<para style="terp_default_9">
<font color="white"> </font>
</para>
<para style="terp_header_Centre">Third Party Ledger</para>
<para style="terp_default_2">
<blockTable colWidths="539.0" style="Table_header">
<tr>
<td>
<para style="terp_header_Centre">Third Party Ledger</para>
</td>
<tr>
<td>
<para style="P4">
<font color="white"> </font>
</para>
<blockTable colWidths="82.0,79.0,90.0,130.0,65.0,90.0" style="Table8">
</td>
</tr>
</tr>
</blockTable>
<para style="terp_default_9">
<font color="white"> </font>
</para>
<para style="terp_default_9">
<font color="white"> </font>
</para>
<blockTable colWidths="85.0,79.0,90.0,130.0,65.0,90.0" style="Table8">
<tr>
<td>
<para style="P9">Chart of Account</para>

View File

@ -115,7 +115,7 @@
<blockTableStyle id="Table2_header">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,0" stop="-1,0"/>
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="0,0" stop="-1,0"/>
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="0,0" stop="0,-1"/>
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="0,0" stop="0,0"/>
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="0,-1" stop="0,-1"/>
@ -205,11 +205,11 @@
<font color="white"> </font>
</para>
<para style="P2">[[ get_data(data) or removeParentNode('para')]]</para>
<blockTable colWidths="150.0,100.0,140.0,80.0,90.0" style="Table2_header">
<blockTable colWidths="250.0,200.0,200.0,200.0,200.0" style="Table2_header">
<tr>
<td><para style="terp_tblheader_General_Centre">Chart of Account </para></td>
<td><para style="terp_tblheader_General_Centre">Fiscal Year</para></td>
<td><para style="terp_tblheader_General_Centre">Filter By <font>[[ get_filter(data)!='No Filter' and '' or removeParentNode('font') ]]</font></para></td>
<td><para style="terp_tblheader_General_Centre">Filter By [[ get_filter(data)!='No Filter' and get_filter(data) ]]</para></td>
<td><para style="terp_tblheader_General_Centre">Display Account</para></td>
<td><para style="terp_tblheader_General_Centre">Printing Date</para></td>
</tr>
@ -217,7 +217,7 @@
<td><para style="terp_default_Centre_8">[[ get_account(data) or removeParentNode('para') ]]</para></td>
<td><para style="terp_default_Centre_8">[[ get_fiscalyear(data) or '' ]]</para></td>
<td><para style="terp_default_Centre_8">[[ get_filter(data)=='No Filter' and get_filter(data) or removeParentNode('para') ]] </para>
<blockTable colWidths="60.0,60.0" style="Table3">[[ get_filter(data)=='Date' or removeParentNode('blockTable') ]]
<blockTable colWidths="90.0,90.0" style="Table3">[[ get_filter(data)=='Date' or removeParentNode('blockTable') ]]
<tr>
<td><para style="terp_tblheader_General_Centre">Start Date</para></td>
<td><para style="terp_tblheader_General_Centre">End Date</para></td>
@ -227,7 +227,7 @@
<td><para style="terp_default_Centre_8">[[get_end_date(data) ]]</para></td>
</tr>
</blockTable>
<blockTable colWidths="70.0,70.0" style="Table3">[[ get_filter(data)=='Periods' or removeParentNode('blockTable') ]]
<blockTable colWidths="90.0,90.0" style="Table3">[[ get_filter(data)=='Periods' or removeParentNode('blockTable') ]]
<tr>
<td><para style="terp_tblheader_General_Centre">Start Period</para></td>
<td><para style="terp_tblheader_General_Centre">End Period</para></td>

View File

@ -117,7 +117,7 @@
<blockTableStyle id="Table2_header">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,0" stop="-1,0"/>
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="0,0" stop="-1,0"/>
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="0,0" stop="0,-1"/>
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="0,0" stop="0,0"/>
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="0,-1" stop="0,-1"/>
@ -207,7 +207,7 @@
<para style="Standard">
<font color="white"> </font>
</para>
<blockTable colWidths="100.0,100.0,140.0,80.0,90.0" style="Table2_header">
<blockTable colWidths="125.0,100.0,140.0,80.0,90.0" style="Table2_header">
<tr>
<td><para style="terp_tblheader_General_Centre">Chart of Account </para></td>
<td><para style="terp_tblheader_General_Centre">Fiscal Year</para></td>

View File

@ -1,194 +0,0 @@
<?xml version="1.0"?>
<document filename="test.pdf">
<template pageSize="(595.0,842.0)" title="Test" author="Martin Simon" allowSplitting="20">
<pageTemplate id="first">
<frame id="first" x1="57.0" y1="57.0" width="481" height="728"/>
<header>
<pageGraphics>
<!--logo-->
<!--<fill color="darkblue"/>-->
<!--<stroke color="darkblue"/>-->
<!--TITLE COMPANY-->
<!-- <drawString x="4.6cm" y="28.7cm">[[ company.partner_id.name ]]</drawString> -->
<setFont name="Helvetica-Bold" size="9"/>
<!--COL 1-->
<drawString x="1.0cm" y="28.1cm">[[ company.name ]]</drawString>
<drawRightString x="20cm" y="28.1cm">Print Journal - [[ company.currency_id.name ]]</drawRightString>
<!-- Header -->
<setFont name="Helvetica" size="9"/>
<drawString x="1.0cm" y="1cm"> [[ formatLang(time.strftime("%Y-%m-%d %H:%M:%S", time.localtime()),date_time = True) ]]</drawString>
<drawString x="19.0cm" y="1cm">Page <pageNumber/></drawString>
<!--<drawRightString x="19.8cm" y="28cm">[[ company.rml_header1 ]]</drawRightString>-->
<lineMode width="0.7"/>
<lines>1cm 27.7cm 20cm 27.7cm</lines>
<setFont name="Helvetica" size="8"/>
</pageGraphics>
</header>
</pageTemplate>
</template>
<stylesheet>
<blockTableStyle id="Standard_Outline">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
</blockTableStyle>
<blockTableStyle id="Table1">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,0" stop="-1,0"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,1" stop="-1,1"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,2" stop="-1,-1"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,0" stop="-1,0"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,1" stop="-1,1"/>
</blockTableStyle>
<blockTableStyle id="Table2">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="1,-1" stop="1,-1"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="2,-1" stop="2,-1"/>
</blockTableStyle>
<blockTableStyle id="Table3">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
</blockTableStyle>
<initialize>
<paraStyle name="all" alignment="justify"/>
</initialize>
<paraStyle name="P1" fontName="Times-Roman" fontSize="20.0" leading="25" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P2" fontName="Times-Roman" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P3" fontName="Times-Roman" fontSize="10.0" leading="13" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P4" fontName="Times-Roman" fontSize="11.0" leading="14" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P5" fontName="Times-Roman" fontSize="11.0" leading="14" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P6" fontName="Times-Roman" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P7" fontName="Times-Roman" fontSize="11.0" leading="14" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P9" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P10" fontName="Helvetica" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P10a" fontName="Helvetica" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P10b" fontName="Helvetica" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P11" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P11a" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P12" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P13" fontName="Times-Roman" fontSize="11.0" leading="14" alignment="CENTER"/>
<paraStyle name="Standard" fontName="Times-Roman"/>
<paraStyle name="Text body" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="List" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="Table Contents" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="Table Heading" fontName="Times-Roman" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="Caption" fontName="Times-Roman" fontSize="10.0" leading="13" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="Index" fontName="Times-Roman"/>
<paraStyle name="Heading" fontName="Helvetica" fontSize="8.0" leading="10" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="terp_header" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="terp_default_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Bold_8" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Bold_9" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_tblheader_General" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="terp_tblheader_General_Centre" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="terp_default_Centre_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_tblheader_Details" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="Footer" fontName="Times-Roman"/>
<paraStyle name="Horizontal Line" fontName="Times-Roman" fontSize="6.0" leading="8" spaceBefore="0.0" spaceAfter="14.0"/>
<paraStyle name="Heading 9" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="terp_tblheader_General_Right" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="terp_tblheader_Details_Centre" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="terp_tblheader_Details_Right" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="terp_default_Right_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_header_Right" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="terp_header_Centre" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="CENTER" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="terp_default_address" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Centre_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Right_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_1" fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Right_9_Bold" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_8_Italic" fontName="Helvetica-Oblique" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
</stylesheet>
<images/>
<story>
<section>
<para style="Table Contents">[[ repeatIn(objects, 'o') ]]</para>
<blockTable colWidths="65.0,62.0,58.0,62.0,174.0,57.0,61.0" style="Table1" repeatRows="1">
<para style="terp_default_8">[[repeatIn(lines(data['form']['periods'],data['form']['journal_ids'],data['form']['sort_selection']), 'line') ]]</para>
<tr>
<td>
<para style="P10a">Date</para>
</td>
<td>
<para style="P10">Voucher No</para>
</td>
<td>
<para style="P10">A/c No.</para>
</td>
<td>
<para style="P10a">Third party</para>
</td>
<td>
<para style="P10a">Entry label</para>
</td>
<td>
<para style="P10b">Debit</para>
</td>
<td>
<para style="P10b">Credit</para>
</td>
</tr>
<tr>
<td>
<para style="P11">[[ line[0].period_id.name ]]</para>
</td>
<td>
<para style="P11a">[[line[0].journal_id.code ]]</para></td>
<td></td>
<td></td>
<td></td>
<td>
<para style="P12"><u>[[ formatLang(sum_debit(line[0].period_id.id, line[0].journal_id.id)) ]]</u></para>
</td>
<td>
<para style="P12"><u>[[ formatLang(sum_credit(line[0].period_id.id, line[0].journal_id.id)) ]]</u></para>
</td>
</tr >
<tr>
<para style="terp_default_8">[[repeatIn(line,'l')]]</para>
<td>
<para style="terp_default_8">[[ formatLang(l.date,date=True) ]]</para>
</td>
<td>
<para style="terp_default_Centre_8">[[ l.ref ]]</para>
</td>
<td>
<para style="terp_default_Centre_8">[[ l.account_id.code ]]</para>
</td>
<td>
<para style="terp_default_8">[[ l.partner_id and l.partner_id.name ]]</para>
</td>
<td>
<para style="terp_default_8">[[ l.name ]]</para>
</td>
<td>
<para style="P8">[[ formatLang(l.debit) ]]</para>
</td>
<td>
<para style="P8">[[ formatLang(l.credit) ]]</para>
</td>
<para style="Standard">
<font color="white"> </font>
</para>
</tr>
</blockTable>
<pageBreak></pageBreak>
</section>
</story>
</document>

View File

@ -1,277 +0,0 @@
<?xml version="1.0"?>
<document filename="test.pdf">
<template pageSize="(595.0,842.0)" title="Test" author="Martin Simon" allowSplitting="20">
<pageTemplate id="first">
<frame id="first" x1="57.0" y1="57.0" width="481" height="728"/>
<header>
<pageGraphics>
<setFont name="Helvetica-Bold" size="9"/>
<!--COL 1-->
<drawString x="1.0cm" y="28.1cm">[[ company.name ]]</drawString>
<drawRightString x="20cm" y="28.1cm">Central Journal-[[ company.currency_id.name ]]</drawRightString>
<!-- Header -->
<setFont name="Helvetica" size="9"/>
<drawString x="1.0cm" y="1cm"> [[ formatLang(time.strftime("%Y-%m-%d %H:%M:%S", time.localtime()),date_time = True) ]]</drawString>
<drawString x="19.0cm" y="1cm">Page <pageNumber/></drawString>
<!--<drawRightString x="19.8cm" y="28cm">[[ company.rml_header1 ]]</drawRightString>-->
<lineMode width="0.7"/>
<lines>1cm 27.7cm 20cm 27.7cm</lines>
<setFont name="Helvetica" size="8"/>
</pageGraphics>
</header>
</pageTemplate>
</template>
<stylesheet>
<blockTableStyle id="Standard_Outline">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
</blockTableStyle>
<blockTableStyle id="Table_Company_Name">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
</blockTableStyle>
<blockTableStyle id="Table_header_Content">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
</blockTableStyle>
<blockTableStyle id="Table_Sub_Header_Content">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="0,0" stop="0,-1"/>
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="0,0" stop="0,0"/>
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="0,-1" stop="0,-1"/>
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="1,0" stop="1,-1"/>
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="1,0" stop="1,0"/>
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="1,-1" stop="1,-1"/>
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="2,0" stop="2,-1"/>
<lineStyle kind="LINEAFTER" colorName="#cccccc" start="2,0" stop="2,-1"/>
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="2,0" stop="2,0"/>
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="2,-1" stop="2,-1"/>
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="3,0" stop="3,-1"/>
<lineStyle kind="LINEAFTER" colorName="#cccccc" start="3,0" stop="3,-1"/>
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="3,0" stop="3,0"/>
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="3,-1" stop="3,-1"/>
<lineStyle kind="LINEAFTER" colorName="#cccccc" start="4,0" stop="4,-1"/>
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="4,0" stop="4,0"/>
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="4,-1" stop="4,-1"/>
</blockTableStyle>
<blockTableStyle id="Table_Subheader_Content_detail">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="0,0" stop="0,-1"/>
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="0,0" stop="0,0"/>
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="0,-1" stop="0,-1"/>
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="1,0" stop="1,-1"/>
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="1,0" stop="1,0"/>
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="1,-1" stop="1,-1"/>
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="2,0" stop="2,-1"/>
<lineStyle kind="LINEAFTER" colorName="#cccccc" start="2,0" stop="2,-1"/>
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="2,0" stop="2,0"/>
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="2,-1" stop="2,-1"/>
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="3,0" stop="3,-1"/>
<lineStyle kind="LINEAFTER" colorName="#cccccc" start="3,0" stop="3,-1"/>
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="3,0" stop="3,0"/>
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="3,-1" stop="3,-1"/>
<lineStyle kind="LINEAFTER" colorName="#cccccc" start="4,0" stop="4,-1"/>
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="4,0" stop="4,0"/>
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="4,-1" stop="4,-1"/>
</blockTableStyle>
<blockTableStyle id="Table_Account_detail_Title">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,0" stop="-1,0"/>
</blockTableStyle>
<blockTableStyle id="Table_Final_Total">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="1,-1" stop="1,-1"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="2,-1" stop="2,-1"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="3,-1" stop="3,-1"/>
</blockTableStyle>
<blockTableStyle id="Table_Journal_Line_Content">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,-1" stop="0,-1"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="1,-1" stop="1,-1"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="2,-1" stop="2,-1"/>
<lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="3,-1" stop="3,-1"/>
</blockTableStyle>
<initialize>
<paraStyle name="all" alignment="justify"/>
</initialize>
<paraStyle name="Standard" fontName="Times-Roman"/>
<paraStyle name="Text body" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="List" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="Table Contents" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="Table Heading" fontName="Times-Roman" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="Caption" fontName="Times-Roman" fontSize="10.0" leading="13" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="Index" fontName="Times-Roman"/>
<paraStyle name="Heading" fontName="Helvetica" fontSize="12.0" leading="15" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="Footer" fontName="Times-Roman"/>
<paraStyle name="Horizontal Line" fontName="Times-Roman" fontSize="6.0" leading="8" spaceBefore="0.0" spaceAfter="14.0"/>
<paraStyle name="terp_header" fontName="Helvetica-Bold" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="Heading 9" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="terp_tblheader_General" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="terp_tblheader_Details" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="terp_default_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Bold_8" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_tblheader_General_Centre" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="terp_tblheader_General_Right" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="terp_tblheader_Details_Centre" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="terp_tblheader_Details_Right" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="terp_default_Right_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Centre_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_header_Right" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="terp_header_Centre" fontName="Helvetica-Bold" fontSize="12.0" leading="15" alignment="CENTER" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="terp_default_address" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Bold_9" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Centre_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Right_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_2" fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Bold_9_Right" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
</stylesheet>
<images/>
<story>
<para style="terp_default_8">[[ repeatIn(objects, 'o') ]]</para>
<!--blockTable colWidths="180.0,180.0,180.0" style="Table_header_Content">
<tr>
<td>
<para style="terp_header">[[ company.name ]]</para>
</td>
<td>
<para style="terp_header">
<font color="white"> </font>
</para>
</td>
<td>
<para style="terp_header">Central Journal-[[ company.currency_id.name ]]</para>
</td>
</tr>
</blockTable-->
<para style="terp_default_8">
<font color="white"> </font>
</para>
<blockTable colWidths="539.0" style="Table_Company_Name">
<tr>
<td>
<para style="terp_header_Centre">Central Journal</para>
</td>
</tr>
</blockTable>
<para style="terp_default_8">
<font color="white"> </font>
</para>
<blockTable colWidths="108.0,108.0,108.0,108.0,108.0" style="Table_Sub_Header_Content">
<para style="terp_default_8">[[ repeatIn(lines(data['form']['periods'],data['form']['journal_ids']), 'line') ]]</para>
<condPageBreak height="1"/>
<tr>
<td><para style="terp_tblheader_Details_Centre">Start Period</para></td>
<td><para style="terp_tblheader_Details_Centre">End Period</para></td>
<td>
<para style="terp_tblheader_General_Centre">Journal Code</para>
</td>
<td>
<para style="terp_tblheader_General_Centre">Journal Name</para>
</td>
<td>
<para style="terp_tblheader_General_Centre">Printing Date</para>
</td>
</tr>
</blockTable>
<blockTable colWidths="108.0,108.0,108.0,108.0,108.0" style="Table_Subheader_Content_detail">
<tr>
<td><para style="terp_default_Centre_9">[[ get_start_date(data['form']) ]]</para></td>
<td><para style="terp_default_Centre_9">[[ get_end_date(data['form']) ]]</para></td>
<td>
<para style="terp_default_Centre_9">[[ line[0]['journal'].code or '' ]]</para>
</td>
<td>
<para style="terp_default_Centre_9">[[ line[0]['journal'].name ]]</para>
</td>
<td>
<para style="terp_default_Centre_9">[[ formatLang(time.strftime('%Y-%m-%d %H:%M:%S'),date_time = True) ]]</para>
</td>
</tr>
</blockTable>
<para style="terp_default_8">
<font color="white"> </font>
</para>
<para style="terp_default_8">
<font color="white"> </font>
</para>
<blockTable colWidths="83.0,272.0,95.0,89.0" style="Table_Account_detail_Title" repeatRows="1">
<tr>
<td>
<para style="terp_tblheader_Details_Centre">Account Num.</para>
</td>
<td>
<para style="terp_tblheader_Details">Account Name</para>
</td>
<td>
<para style="terp_tblheader_Details_Right">Debit</para>
</td>
<td>
<para style="terp_tblheader_Details_Right">Credit</para>
</td>
</tr>
<tr>
<td>
<blockTable colWidths="80.0,272.0,94.0,87.0" style="Table_Final_Total">
<tr>
<td>
<para style="terp_default_Bold_9">Total:</para>
</td>
<td>
<para style="terp_default_Bold_9">
<font color="white"> </font>
</para>
</td>
<td>
<para style="terp_default_Bold_9_Right">[[ formatLang(sum_debit(line[0]['period'].id, line[0]['journal'].id)) ]]</para>
</td>
<td>
<para style="terp_default_Bold_9_Right">[[ formatLang(sum_credit(line[0]['period'].id, line[0]['journal'].id)) ]]</para>
</td>
</tr>
<tr>
<td>
<blockTable colWidths="80.0,272.0,94.0,87.0" style="Table_Journal_Line_Content">
<tr>
<para style="terp_default_8">[[repeatIn(line,'l')]]</para>
<td>
<para style="terp_default_9">d[[ l['code'] ]]</para>
</td>
<td>
<para style="terp_default_9">[[ l['name'] ]]</para>
</td>
<td>
<para style="terp_default_Right_9">[[ formatLang(l['debit']) ]]</para>
</td>
<td>
<para style="terp_default_Right_9">[[ formatLang(l['credit']) ]]</para>
</td>
</tr>
</blockTable>
</td>
</tr>
</blockTable>
</td>
</tr>
</blockTable>
<para style="terp_default_8">
<font color="white"> </font>
</para>
</story>
</document>

View File

@ -1,298 +0,0 @@
<?xml version="1.0"?>
<document filename="test.pdf">
<template pageSize="(596.0,842.0)" title="Test" author="Martin Simon" allowSplitting="20">
<pageTemplate id="first">
<frame id="first" x1="57.0" y1="57.0" width="481" height="728"/>
<header>
<pageGraphics>
<setFont name="Helvetica-Bold" size="9"/>
<!--COL 1-->
<drawString x="1.0cm" y="28.1cm">[[ company.name ]]</drawString>
<drawRightString x="20cm" y="28.1cm">General Journal - [[ company.currency_id.name ]]</drawRightString>
<!-- Header -->
<setFont name="Helvetica" size="9"/>
<drawString x="1.0cm" y="1cm"> [[ formatLang(time.strftime("%Y-%m-%d %H:%M:%S", time.localtime()),date_time = True) ]]</drawString>
<drawString x="19.0cm" y="1cm">Page <pageNumber/></drawString>
<!--<drawRightString x="19.8cm" y="28cm">[[ company.rml_header1 ]]</drawRightString>-->
<lineMode width="0.7"/>
<lines>1cm 27.7cm 20cm 27.7cm</lines>
<setFont name="Helvetica" size="8"/>
</pageGraphics>
</header>
</pageTemplate>
</template>
<stylesheet>
<blockTableStyle id="Standard_Outline">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
</blockTableStyle>
<blockTableStyle id="Table_Header_Title">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
</blockTableStyle>
<blockTableStyle id="Table_Company_Name">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
</blockTableStyle>
<blockTableStyle id="Table_Print_Current_datetime">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
</blockTableStyle>
<blockTableStyle id="Table_Journal_Title">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,0" stop="-1,0"/>
</blockTableStyle>
<blockTableStyle id="Table_Final_Total">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="0,-1" stop="0,-1"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="1,-1" stop="1,-1"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="2,-1" stop="2,-1"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="3,-1" stop="3,-1"/>
<lineStyle kind="LINEBELOW" colorName="#000000" start="4,-1" stop="4,-1"/>
</blockTableStyle>
<blockTableStyle id="Table_Sub_Total">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
<lineStyle kind="LINEBELOW" colorName="#b3b3b3" start="0,0" stop="2,2"/>
<lineStyle kind="LINEBELOW" colorName="white" start="0,1" stop="-1,1"/>
</blockTableStyle>
<blockTableStyle id="Table_Journal_Detail">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
</blockTableStyle>
<blockTableStyle id="Table_Sub_Header_Content">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="0,0" stop="0,-1"/>
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="0,0" stop="0,0"/>
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="0,-1" stop="0,-1"/>
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="1,0" stop="1,-1"/>
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="1,0" stop="1,0"/>
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="1,-1" stop="1,-1"/>
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="2,0" stop="2,-1"/>
<lineStyle kind="LINEAFTER" colorName="#cccccc" start="2,0" stop="2,-1"/>
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="2,0" stop="2,0"/>
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="2,-1" stop="2,-1"/>
</blockTableStyle>
<blockTableStyle id="Table_Subheader_Content_detail">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="0,0" stop="0,-1"/>
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="0,0" stop="0,0"/>
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="0,-1" stop="0,-1"/>
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="1,0" stop="1,-1"/>
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="1,0" stop="1,0"/>
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="1,-1" stop="1,-1"/>
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="2,0" stop="2,-1"/>
<lineStyle kind="LINEAFTER" colorName="#cccccc" start="2,0" stop="2,-1"/>
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="2,0" stop="2,0"/>
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="2,-1" stop="2,-1"/>
</blockTableStyle>
<initialize>
<paraStyle name="all" alignment="justify"/>
</initialize>
<paraStyle name="Standard" fontName="Times-Roman"/>
<paraStyle name="Text body" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="Table Contents" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="Table Heading" fontName="Times-Roman" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="Heading" fontName="Helvetica" fontSize="12.0" leading="15" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="List" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="Caption" fontName="Helvetica-Oblique" fontSize="9.0" leading="11" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="Index" fontName="Helvetica"/>
<paraStyle name="Footer" fontName="Times-Roman"/>
<paraStyle name="Horizontal Line" fontName="Times-Roman" fontSize="6.0" leading="8" spaceBefore="0.0" spaceAfter="14.0"/>
<paraStyle name="terp_header" fontName="Helvetica-Bold" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="Heading 9" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="terp_tblheader_General" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="terp_tblheader_Details" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="terp_default_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Bold_8" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_tblheader_General_Centre" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="terp_tblheader_General_Right" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="terp_tblheader_Details_Centre" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="terp_tblheader_Details_Right" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="terp_default_Right_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Centre_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_header_Right" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="terp_header_Centre" fontName="Helvetica-Bold" fontSize="12.0" leading="15" alignment="CENTER" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="terp_default_address" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Bold_9" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Centre_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Right_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_2" fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Bold_9_Right" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
</stylesheet>
<images/>
<story>
<para style="terp_default_8">
<font color="white"> </font>
</para>
<!--blockTable colWidths="180.0,180.0,180.0" style="Table_Header_Title">
<tr>
<td>
<para style="terp_header">[[ company.name ]]</para>
</td>
<td>
<para style="terp_header">
<font color="white"> </font>
</para>
</td>
<td>
<para style="terp_header">General Journal - [[ company.currency_id.name ]]</para>
</td>
</tr>
</blockTable-->
<para style="terp_default_8">
<font color="white"> </font>
</para>
<blockTable colWidths="539.0" style="Table_Company_Name">
<tr>
<td>
<para style="terp_header_Centre">General Journal</para>
</td>
</tr>
</blockTable>
<para style="P2">
<font color="white"> </font>
</para>
<para style="P9">
<font color="white"> </font>
</para>
<blockTable colWidths="180.0,180.0,180.0" style="Table_Sub_Header_Content">
<tr>
<td><para style="terp_tblheader_Details_Centre">Start Period</para></td>
<td><para style="terp_tblheader_Details_Centre">End Period</para></td>
<td><para style="terp_tblheader_Details_Centre">Printing Date</para></td>
</tr>
</blockTable>
<blockTable colWidths="180.0,180.0,180.0" style="Table_Subheader_Content_detail">
<tr>
<td><para style="terp_default_Centre_9">[[ get_start_date(data['form']) ]]</para></td>
<td><para style="terp_default_Centre_9">[[ get_end_date(data['form']) ]]</para></td>
<td><para style="terp_default_Centre_9">[[ formatLang(time.strftime('%Y-%m-%d %H:%M:%S'),date_time = True) ]] </para></td>
</tr>
</blockTable>
<para style="P9">
<font color="white"> </font>
</para>
<section>
<para style="P9">
<font color="white"> </font>
</para>
<blockTable colWidths="61.0,228.0,95.0,80.0,73.0" style="Table_Journal_Title" repeatRows="1">
<tr>
<td>
<para style="terp_tblheader_Details">Jrl Code</para>
</td>
<td>
<para style="terp_tblheader_Details">Journal Name</para>
</td>
<td>
<para style="terp_tblheader_Details">Period</para>
</td>
<td>
<para style="terp_tblheader_Details_Right">Debit Trans.</para>
</td>
<td>
<para style="terp_tblheader_Details_Right">Credit Trans.</para>
</td>
</tr>
<tr>
<td>
<blockTable colWidths="64.0,226.0,82.0,82.0,76.0" style="Table_Final_Total">
<tr>
<td>
<para style="terp_default_Bold_9">Total:</para>
</td>
<td>
<para style="terp_default_Bold_9">
<font color="white"> </font>
</para>
</td>
<td>
<para style="terp_default_Bold_9">
<font color="white"> </font>
</para>
</td>
<td>
<para style="terp_default_Bold_9_Right"><u>[[ formatLang(sum_debit(data['form']['periods'],data['form']['journal_ids'])) ]]</u></para>
</td>
<td>
<para style="terp_default_Bold_9_Right"><u>[[ formatLang(sum_credit(data['form']['periods'],data['form']['journal_ids'])) ]]</u></para>
</td>
</tr>
</blockTable>
</td>
</tr>
<tr>
<td>
<para style="terp_default_9"><font>[[ repeatIn( lines( data['form']['periods'], data['form']['journal_ids'] ),'line')]]</font></para>
<blockTable colWidths="175.0,115.0,82.0,82.0,75.0" style="Table_Sub_Total">
<tr>
<td>
<para style="terp_default_Bold_9">[[ line[0]['period_name'] ]] :</para>
</td>
<td>
<para style="terp_default_Bold_9">
<font color="white"> </font>
</para>
</td>
<td>
<para style="terp_default_Bold_9">
<font color="white"> </font>
</para>
</td>
<td>
<para style="terp_default_Bold_9_Right"><u>[[ formatLang(sum_debit_period( line[0]['pid'],data['form']['journal_ids'])) ]]</u></para>
</td>
<td>
<para style="terp_default_Bold_9_Right"><u>[[ formatLang(sum_credit_period(line[0]['pid'],data['form']['journal_ids'])) ]]</u></para>
</td>
</tr>
<tr>
<td>
<blockTable colWidths="60.0,219.0,88.0,80.0,76.0" style="Table_Journal_Detail">
<tr>
<td>
<para style="terp_default_9">[[ repeatIn(line,'l') ]]</para>
<para style="terp_default_9">[[ l['code'] ]]</para>
</td>
<td>
<para style="terp_default_9">[[ l['name'] ]]</para>
</td>
<td>
<para style="terp_default_9">[[ line[0]['period_name'] ]]</para>
</td>
<td>
<para style="terp_default_Right_9">[[ formatLang(l['debit'])]]</para>
</td>
<td>
<para style="terp_default_Right_9">[[ formatLang(l['credit']) ]]</para>
</td>
</tr>
</blockTable>
</td>
</tr>
</blockTable>
</td>
</tr>
</blockTable>
</section>
<para style="terp_default_8">
<font color="white"> </font>
</para>
</story>
</document>

View File

@ -1,102 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="account_general_ledger_report_view" model="ir.ui.view">
<field name="name">General Ledger</field>
<field name="model">account.general.ledger.report</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Select Date-Period">
<field name="company_id" colspan="4" groups="base.group_multi_company"/>
<newline/>
<field name="fiscalyear"/>
<label colspan="2" string="(Keep empty for all open fiscal years)" align="0.0"/>
<newline/>
<field name="display_account" required="True"/>
<field name="sortbydate" required="True"/>
<field name="initial_balance" invisible="1"/>
<field name="landscape"/>
<field name="amount_currency"/>
<newline/>
<separator string="Filters" colspan="4"/>
<field name="state" required="True"/>
<newline/>
<group attrs="{'invisible':[('state','=','none')]}" colspan="4">
<group attrs="{'invisible':[('state','=','byperiod')]}" colspan="4">
<separator string="Date Filter" colspan="4"/>
<field name="date_from"/>
<field name="date_to"/>
</group>
<group attrs="{'invisible':[('state','=','bydate')]}" colspan="4">
<separator string="Filter on Periods" colspan="4"/>
<field name="periods" colspan="4" nolabel="1"/>
</group>
</group>
<newline/>
<group colspan="4" col="6">
<separator colspan="4"/>
<button special="cancel" string="Cancel" icon="gtk-cancel"/>
<button name="check_report" string="Print" type="object" icon="gtk-print"/>
</group>
</form>
</field>
</record>
<record id="action_account_general_ledger_report" model="ir.actions.act_window">
<field name="name">General Ledger</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">account.general.ledger.report</field>
<field name="view_type">form</field>
<field name="view_mode">form</field>
<field name="view_id" ref="account_general_ledger_report_view"/>
<field name="target">new</field>
</record>
<record model="ir.values" id="account_general_ledger_report_values">
<field name="model_id" ref="account.model_account_account" />
<field name="object" eval="1" />
<field name="name">Account General Ledger</field>
<field name="key2">client_print_multi</field>
<field name="value" eval="'ir.actions.act_window,' + str(ref('action_account_general_ledger_report'))" />
<field name="key">action</field>
<field name="model">account.account</field>
</record>
<record id="account_general_ledger_report_view1" model="ir.ui.view">
<field name="name">General Ledger</field>
<field name="model">account.general.ledger.report</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Select Chart">
<field name="Account_list"/>
<separator colspan="4"/>
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
<button name="next_view" string="Next" type="object" icon="gtk-go-forward" default_focus="1"/>
</form>
</field>
</record>
<record id="action_account_general_ledger_menu" model="ir.actions.act_window">
<field name="name">Select Chart</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">account.general.ledger.report</field>
<field name="view_type">form</field>
<field name="view_mode">form</field>
<field name="view_id" ref="account_general_ledger_report_view1"/>
<field name="target">new</field>
</record>
<menuitem
icon="STOCK_PRINT"
name="General Ledger"
parent="account.final_accounting_reports"
action="action_account_general_ledger_menu"
id="menu_general_ledger"
/>
</data>
</openerp>

View File

@ -22,67 +22,60 @@
import time
import datetime
from mx.DateTime import *
from lxml import etree
from osv import osv, fields
from tools.translate import _
class account_aged_trial_balance(osv.osv_memory):
_inherit = 'account.common.partner.report'
_name = 'account.aged.trial.balance'
_description = 'Account Aged Trial balance Report'
_columns = {
'company_id': fields.many2one('res.company', 'Company', required=True),
'period_length':fields.integer('Period length (days)', required=True),
'date1': fields.date('Start of period', required=True),
'result_selection': fields.selection([('customer','Receivable'),
('supplier','Payable'),
('all','Receivable and Payable')],
'Filter on Partners', required=True),
'direction_selection': fields.selection([('past','Past'),
('future','Future')],
'Analysis Direction', required=True),
}
def _get_company(self, cr, uid, context=None):
user_obj = self.pool.get('res.users')
company_obj = self.pool.get('res.company')
if context is None:
context = {}
user = user_obj.browse(cr, uid, uid, context=context)
if user.company_id:
return user.company_id.id
else:
return company_obj.search(cr, uid, [('parent_id', '=', False)])[0]
}
_defaults = {
'company_id': _get_company,
'period_length': 30,
'date1' : time.strftime('%Y-%m-%d'),
'result_selection': 'customer',
'date_from' : time.strftime('%Y-%m-%d'),
'direction_selection': 'past',
}
}
def calc_dates(self, cr, uid, ids, context=None):
fiscalyear_obj = self.pool.get('account.fiscalyear')
data={}
def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False, submenu=False):
mod_obj = self.pool.get('ir.model.data')
res = super(account_aged_trial_balance, self).fields_view_get(cr, uid, view_id=view_id, view_type=view_type, context=context, toolbar=toolbar, submenu=False)
doc = etree.XML(res['arch'])
nodes = doc.xpath("//field[@name='journal_ids']")
for node in nodes:
node.set('invisible', '1')
node.set('required', '0')
res['arch'] = etree.tostring(doc)
return res
def _print_report(self, cr, uid, ids, data, query_line, context=None):
res = {}
if context is None:
context = {}
data['ids'] = context.get('active_ids',[])
data['model'] = 'res.partner'
data['form'] = self.read(cr, uid, ids, [])[0]
data['form']['fiscalyear'] = fiscalyear_obj.find(cr, uid)
data = self.pre_print_report(cr, uid, ids, data, query_line, context=context)
data['form'].update(self.read(cr, uid, ids, ['period_length', 'direction_selection'])[0])
period_length = data['form']['period_length']
if period_length<=0:
raise osv.except_osv(_('UserError'), _('You must enter a period length that cannot be 0 or below !'))
start = datetime.date.fromtimestamp(time.mktime(time.strptime(data['form']['date1'],"%Y-%m-%d")))
start = DateTime(int(start.year),int(start.month),int(start.day))
if not data['form']['date_from']:
raise osv.except_osv(_('UserError'), _('Enter a Start date !'))
start = datetime.date.fromtimestamp(time.mktime(time.strptime(data['form']['date_from'], "%Y-%m-%d")))
start = DateTime(int(start.year), int(start.month), int(start.day))
if data['form']['direction_selection'] == 'past':
for i in range(5)[::-1]:
stop = start - RelativeDateTime(days=period_length)
res[str(i)] = {
'name' : str((5-(i+1))*period_length) + '-' + str((5-i)*period_length),
'name' : str((5-(i+1)) * period_length) + '-' + str((5-i) * period_length),
'stop': start.strftime('%Y-%m-%d'),
'start' : stop.strftime('%Y-%m-%d'),
}
@ -91,18 +84,19 @@ class account_aged_trial_balance(osv.osv_memory):
for i in range(5):
stop = start + RelativeDateTime(days=period_length)
res[str(5-(i+1))] = {
'name' : str((i)*period_length)+'-'+str((i+1)*period_length),
'name' : str((i) * period_length)+'-' + str((i+1) * period_length),
'start': start.strftime('%Y-%m-%d'),
'stop' : stop.strftime('%Y-%m-%d'),
'stop': stop.strftime('%Y-%m-%d'),
}
start = stop + RelativeDateTime(days=1)
data['form'].update(res)
return {
'type': 'ir.actions.report.xml',
'report_name': 'account.aged_trial_balance',
'datas': data,
}
'type': 'ir.actions.report.xml',
'report_name': 'account.aged_trial_balance',
'datas': data
}
account_aged_trial_balance()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -2,31 +2,33 @@
<openerp>
<data>
<record id="account_aged_balance_view" model="ir.ui.view">
<field name="name">Aged Partner Balance</field>
<field name="model">account.aged.trial.balance</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Print Aged Trial Balance">
<field name="company_id" groups="base.group_multi_company"/>
<record id="account_aged_balance_view" model="ir.ui.view">
<field name="name">Aged Partner Balance</field>
<field name="model">account.aged.trial.balance</field>
<field name="type">form</field>
<!--<field name="inherit_id" ref="account_common_report_view" />-->
<field name="arch" type="xml">
<form string="Report Options">
<field name="chart_account_id" widget='selection'/>
<field name="fiscalyear_id"/>
<newline/>
<field name="date1"/>
<field name="date_from"/>
<field name="period_length"/>
<newline/>
<field name="result_selection"/>
<newline/>
<field name="direction_selection"/>
<field name="journal_ids"/>
<newline/>
<group colspan="4" col="6">
<separator colspan="6"/>
<button special="cancel" string="Cancel" icon="gtk-cancel"/>
<button name="calc_dates" string="Print" type="object" icon="gtk-print" default_focus="1"/>
<separator colspan="4"/>
<group col="4" colspan="4">
<button icon="gtk-cancel" special="cancel" string="Cancel" colspan="2"/>
<button icon="gtk-print" name="check_report" string="Print" type="object" colspan="2" default_focus="1"/>
</group>
</form>
</field>
</record>
</field>
</record>
<record id="action_account_aged_balance_view" model="ir.actions.act_window">
<record id="action_account_aged_balance_view" model="ir.actions.act_window">
<field name="name">Aged Partner Balance</field>
<field name="res_model">account.aged.trial.balance</field>
<field name="type">ir.actions.act_window</field>
@ -35,15 +37,14 @@
<field name="view_id" ref="account_aged_balance_view"/>
<field name="context">{'record_id':active_id}</field>
<field name="target">new</field>
<field name="help">Aged Partner Balance is a more detailed report of your receivables by intervals. When opening that report, Open ERP asks for the name of the company, the fiscal period and the size of the interval to be analyzed (in days). Open ERP then calculates a table of credit balance by period. So if you request an interval of 30 days OpenERP generates an analysis of creditors for the past month, past two months, and so on. </field>
<field name="help">Aged Partner Balance is a more detailed report of your receivables by intervals. When opening that report, Open ERP asks for the name of the company, the fiscal period and the size of the interval to be analyzed (in days). Open ERP then calculates a table of credit balance by period. So if you request an interval of 30 days OpenERP generates an analysis of creditors for the past month, past two months, and so on. </field>
</record>
<menuitem
icon="STOCK_PRINT"
<menuitem icon="STOCK_PRINT"
name="Aged Partner Balance"
action="action_account_aged_balance_view"
id="menu_aged_trial_balance"
parent="next_id_22"/>
parent="account.next_id_22"/>
</data>
</openerp>
</openerp>

View File

@ -40,34 +40,31 @@
""",
'author': 'OpenERP SA',
'depends': ['base', 'account', 'hr_attendance'],
'init_xml': ['auction_sequence.xml'],
'init_xml': ['auction_sequence.xml', 'auction_data.xml'],
'update_xml': [
'security/ir.model.access.csv',
# 'wizard/auction_lots_cancel_view.xml',
# 'wizard/auction_transfer_unsold_object_view.xml',
'wizard/auction_lots_able_view.xml',
'wizard/auction_lots_enable_view.xml',
# 'wizard/auction_lots_able_view.xml',
# 'wizard/auction_lots_enable_view.xml',
'wizard/auction_lots_make_invoice_buyer_view.xml',
'wizard/auction_lots_make_invoice_view.xml',
'wizard/auction_taken_view.xml',
'wizard/auction_lots_auction_move_view.xml',
'wizard/auction_pay_buy_view.xml',
'wizard/auction_payer_sel_view.xml',
#'wizard/auction_payer_sel_view.xml',
'wizard/auction_lots_sms_send_view.xml',
'wizard/auction_catalog_flagey_view.xml',
# 'wizard/auction_aie_send_view.xml',
# 'wizard/auction_aie_send_result_view.xml',
'wizard/auction_lots_buyer_map_view.xml',
# 'wizard/auction_lots_numerotate_view.xml',
'auction_view.xml',
'auction_report.xml',
'report/report_auction_view.xml',
'auction_wizard.xml',
'board_auction_view.xml',
'board_auction_manager_view.xml',
],
'demo_xml': ['auction_demo.xml','board_auction_demo.xml'],
'test': ['test/auction.yml', 'test/auction_wizard.yml'],
'installable': True,
'active': False,
'certificate': '0039333102717',

File diff suppressed because it is too large Load Diff

View File

@ -1,98 +1,272 @@
<?xml version="1.0"?>
<openerp>
<data>
<record model="account.account" id="auction_income_view">
<field name="name">Auction Adjudications</field>
<field name="code">0</field>
<field name="type">view</field>
<field name="currency_id" search="[('name','=','EUR')]"/>
<field name="parent_id" type="list">
<value search="[('type','=','view')]" model="account.account"/>
</field>
</record>
<!-- Auction lots category data -->
<record model="aie.category" id="aie_category_anti_view">
<field name="name">Antiques</field>
<field name="code">ANTI</field>
</record>
<record model="aie.category" id="aie_category_paint_view">
<field name="name">Painting</field>
<field name="code">PAINT</field>
<field name="parent_id" ref="aie_category_anti_view"/>
</record>
<record model="aie.category" id="aie_category_furn_view">
<field name="name">Furnitures</field>
<field name="code">FURN</field>
<field name="parent_id" ref="aie_category_anti_view"/>
</record>
<record model="aie.category" id="aie_category_pcg_view">
<field name="name">Porcelain, Ceramics, Glassmaking, ...</field>
<field name="code">PCG</field>
<field name="parent_id" ref="aie_category_anti_view"/>
</record>
<record model="account.account" id="auction_expense_view">
<field name="name">Auction Adjudication Expenses</field>
<field name="code">0</field>
<field name="type">view</field>
<field name="currency_id" search="[('name','=','EUR')]"/>
<field name="parent_id" type="list">
<value search="[('type','=','view')]" model="account.account"/>
</field>
</record>
<record model="aie.category" id="aie_category_sbe_view">
<field name="name">Sculpture, bronze, eso</field>
<field name="code">SBE</field>
<field name="parent_id" ref="aie_category_anti_view"/>
</record>
<record model="aie.category" id="aie_category_clock_view">
<field name="name">Clocks and watches</field>
<field name="code">CLW</field>
<field name="parent_id" ref="aie_category_anti_view"/>
</record>
<record model="aie.category" id="aie_category_caob_view">
<field name="name">Collectible and art objects</field>
<field name="code">COAO</field>
<field name="parent_id" ref="aie_category_anti_view"/>
</record>
<record model="aie.category" id="aie_category_engr_view">
<field name="name">Engravings</field>
<field name="code">ENGR</field>
<field name="parent_id" ref="aie_category_anti_view"/>
</record>
<record model="aie.category" id="aie_category_gart_view">
<field name="name">Graphic Arts</field>
<field name="code">GART</field>
<field name="parent_id" ref="aie_category_anti_view"/>
</record>
<record model="aie.category" id="aie_category_light_view">
<field name="name">Lightings</field>
<field name="code">LGT</field>
<field name="parent_id" ref="aie_category_anti_view"/>
</record>
<record model="aie.category" id="aie_category_metal_view">
<field name="name">Metal Ware</field>
<field name="code">MW</field>
<field name="parent_id" ref="aie_category_anti_view"/>
</record>
<record model="aie.category" id="aie_category_mini_view">
<field name="name">Miniatures</field>
<field name="code">MAT</field>
<field name="parent_id" ref="aie_category_anti_view"/>
</record>
<record model="aie.category" id="aie_category_collect_view">
<field name="name">Collections</field>
<field name="code">CLT</field>
<field name="parent_id" ref="aie_category_mini_view"/>
</record>
<record model="aie.category" id="aie_category_mi_view">
<field name="name">Musical Instruments</field>
<field name="code">MI</field>
<field name="parent_id" ref="aie_category_anti_view"/>
</record>
<record model="aie.category" id="aie_category_owm_view">
<field name="name">Old weapons and militaria</field>
<field name="code">OWM</field>
<field name="parent_id" ref="aie_category_anti_view"/>
</record>
<record model="aie.category" id="aie_category_oart_view">
<field name="name">Oriental Arts</field>
<field name="code">OART</field>
<field name="parent_id" ref="aie_category_anti_view"/>
</record>
<record model="aie.category" id="aie_category_chf_view">
<field name="name">Chineese furnitures</field>
<field name="code">CHF</field>
<field name="parent_id" ref="aie_category_oart_view"/>
</record>
<record model="aie.category" id="aie_category_othr_view">
<field name="name">Others</field>
<field name="code">OTR</field>
<field name="parent_id" ref="aie_category_anti_view"/>
</record>
<record model="aie.category" id="aie_category_pst_view">
<field name="name">Posters</field>
<field name="code">PST</field>
<field name="parent_id" ref="aie_category_anti_view"/>
</record>
<record model="aie.category" id="aie_category_rel_view">
<field name="name">Religiosa</field>
<field name="code">REL</field>
<field name="parent_id" ref="aie_category_anti_view"/>
</record>
<record model="aie.category" id="aie_category_sin_view">
<field name="name">Scientific Instruments</field>
<field name="code">SIN</field>
<field name="parent_id" ref="aie_category_anti_view"/>
</record>
<record model="aie.category" id="aie_category_tin_view">
<field name="name">Tin</field>
<field name="code">TIN</field>
<field name="parent_id" ref="aie_category_anti_view"/>
</record>
<record model="aie.category" id="aie_category_cwa_view">
<field name="name">Copper wares</field>
<field name="code">CWA</field>
<field name="parent_id" ref="aie_category_tin_view"/>
</record>
<record model="aie.category" id="aie_category_ty_view">
<field name="name">Toys</field>
<field name="code">TY</field>
<field name="parent_id" ref="aie_category_anti_view"/>
</record>
<record model="aie.category" id="aie_category_vrs_view">
<field name="name">Verreries</field>
<field name="code">VRS</field>
<field name="parent_id" ref="aie_category_anti_view"/>
</record>
<record model="aie.category" id="aie_category_wne_view">
<field name="name">Wine</field>
<field name="code">WNE</field>
<field name="parent_id" ref="aie_category_anti_view"/>
</record>
<!-- -->
<record model="account.account" id="auction_income">
<field name="name">Auction Adjudications</field>
<field name="code">7x*</field>
<field name="type">income</field>
<field name="currency_id" search="[('name','=','EUR')]"/>
<field name="parent_id" eval="[auction_income_view]"/>
</record>
<record model="account.account" id="auction_expense">
<field name="name">Auction Adjudication Expenses</field>
<field name="code">6x*</field>
<field name="type">expense</field>
<field name="currency_id" search="[('name','=','EUR')]"/>
<field name="parent_id" eval="[auction_expense_view]"/>
</record>
<record model="aie.category" id="aie_category_con_view">
<field name="name">Contemporary Art</field>
<field name="code">CONTEM</field>
</record>
<record model="aie.category" id="aie_category_con_art_view">
<field name="name">Arts</field>
<field name="code">ARTS</field>
<field name="parent_id" ref="aie_category_con_view"/>
</record>
<record model="aie.category" id="aie_category_con_curi_view">
<field name="name">Curiosa</field>
<field name="code">CRS</field>
<field name="parent_id" ref="aie_category_con_view"/>
</record>
<record model="aie.category" id="aie_category_con_ome_view">
<field name="name">Other Media</field>
<field name="code">OME</field>
<field name="parent_id" ref="aie_category_con_view"/>
</record>
<record model="aie.category" id="aie_category_con_pht_view">
<field name="name">Photo</field>
<field name="code">PHT</field>
<field name="parent_id" ref="aie_category_con_view"/>
</record>
<record model="aie.category" id="aie_category_con_paint_view">
<field name="name">Painting</field>
<field name="code">CPAINT</field>
<field name="parent_id" ref="aie_category_con_view"/>
</record>
<record model="aie.category" id="aie_category_con_scul_view">
<field name="name">Sculpture</field>
<field name="code">SCUL</field>
<field name="parent_id" ref="aie_category_con_view"/>
</record>
<record model="account.account" id="auction_income_costs">
<field name="name">Auction Buyer Costs</field>
<field name="code">7x*</field>
<field name="type">tax</field>
<field name="currency_id" search="[('name','=','EUR')]"/>
<field name="parent_id" eval="[auction_income_view]"/>
</record>
<record model="account.account" id="auction_expense_costs">
<field name="name">Auction Seller Costs</field>
<field name="code">6x*</field>
<field name="type">tax</field>
<field name="currency_id" search="[('name','=','EUR')]"/>
<field name="parent_id" eval="[auction_expense_view]"/>
</record>
<record model="aie.category" id="aie_category_con_cshe_view">
<field name="name">Shows</field>
<field name="code">CSHW</field>
<field name="parent_id" ref="aie_category_con_view"/>
</record>
<record model="aie.category" id="aie_category_jew_view">
<field name="name">Jewelry</field>
<field name="code">JWL</field>
<field name="parent_id" ref="aie_category_con_view"/>
</record>
<!-- -->
<record model="account.tax" id="tax_buyer_author">
<field name="name">Author rights (4%)</field>
<field name="type">percent</field>
<field name="applicable_type">code</field>
<field name="amount">0.04</field>
<field name="domain">sabam</field>
<field name="account_collected_id" ref="auction_income_costs"/>
<field name="account_paid_id" ref="auction_income_costs"/>
<field name="python_applicable">result = (price_unit&gt;=1250)</field>
</record>
<record model="account.tax" id="tax_buyer">
<field name="name">Buyer Costs (20%)</field>
<field name="type">percent</field>
<field name="amount">0.20</field>
<field name="domain">auction</field>
<field name="account_collected_id" ref="auction_income_costs"/>
<field name="account_paid_id" ref="auction_income_costs"/>
</record>
<record model="account.tax" id="tax_seller">
<field name="name">Seller Costs (12%)</field>
<field name="type">percent</field>
<field name="amount">-0.12</field>
<field name="domain">auction</field>
<field name="account_collected_id" ref="auction_expense_costs"/>
<field name="account_paid_id" ref="auction_expense_costs"/>
</record>
<record model="aie.category" id="aie_category_uncla_view">
<field name="name">Unclassifieds</field>
<field name="code">UNCLASS</field>
</record>
<record model="aie.category" id="aie_category_afrart_view">
<field name="name">African Arts</field>
<field name="code">AFART</field>
<field name="parent_id" ref="aie_category_anti_view"/>
</record>
<record model="aie.category" id="aie_category_argen_view">
<field name="name">Argenterie</field>
<field name="code">ARGENT</field>
<field name="parent_id" ref="aie_category_anti_view"/>
</record>
<record model="aie.category" id="aie_category_artfrom_view">
<field name="name">Art from the Ivory Coast</field>
<field name="code">ARTFORM</field>
<field name="parent_id" ref="aie_category_anti_view"/>
</record>
<record model="aie.category" id="aie_category_afrec_view">
<field name="name">African Arts</field>
<field name="code">AFRART</field>
<field name="parent_id" ref="aie_category_artfrom_view"/>
</record>
<record model="aie.category" id="aie_category_book_view">
<field name="name">Books, manuscripts, eso.</field>
<field name="code">BME</field>
<field name="parent_id" ref="aie_category_anti_view"/>
</record>
<record model="aie.category" id="aie_category_carpet_view">
<field name="name">Carpet and textilles</field>
<field name="code">CARPTEX</field>
<field name="parent_id" ref="aie_category_anti_view"/>
</record>
<record model="aie.category" id="aie_category_cartoon_view">
<field name="name">Cartoons</field>
<field name="code">CATOON</field>
<field name="parent_id" ref="aie_category_anti_view"/>
</record>
<!-- End Of Auction Lots Category -->
<ir_set>
<field name="keys" eval="[('meta','res.partner'),('name','auction.seller.costs')]"/>
<field name="args" eval="[]"/>
<field name="name">account.seller.costs</field>
<field name="value" eval="tax_seller"/>
<field name="meta" eval="{'type':'many2one', 'string':'Seller Costs', 'relation':'account.tax'}"/>
</ir_set>
<record id="product.product_product_pc2" model="product.product">
<field name="list_price">770.0</field>
<field name="standard_price">700.0</field>
</record>
</data>
</openerp>

View File

@ -2,6 +2,102 @@
<openerp>
<data noupdate="1">
<!-- demo data for Account -->
<record model="account.account.type" id="account.account_type_tax">
<field name="name">Tax</field>
<field name="code">tax</field>
<field name="close_method">unreconciled</field>
</record>
<record model="account.account" id="auction_income_view">
<field name="name">Auction Adjudications</field>
<field name="code">0</field>
<field name="type">view</field>
<field name="currency_id" search="[('name','=','EUR')]"/>
<field name="parent_id" eval="0">
<value search="[('type','=','view')]" model="account.account"/>
</field>
<field name="user_type" ref="account.account_type_root"/>
</record>
<record model="account.account" id="auction_expense_view">
<field name="name">Auction Adjudication Expenses</field>
<field name="code">1</field>
<field name="type">view</field>
<field name="currency_id" search="[('name','=','EUR')]"/>
<field name="parent_id" eval="0">
<value search="[('type','=','view')]" model="account.account"/>
</field>
<field name="user_type" ref="account.account_type_expense"/>
</record>
<record model="account.account" id="auction_income">
<field name="name">Auction Adjudications</field>
<field name="code">7x*</field>
<field name="user_type" ref="account.account_type_income"/>
<field name="type">receivable</field>
<field name="currency_id" search="[('name','=','EUR')]"/>
<field name="parent_id" eval="auction_income_view"/>
</record>
<record model="account.account" id="auction_expense">
<field name="name">Auction Adjudication Expenses</field>
<field name="code">6x*</field>
<field name="user_type" ref="account.account_type_expense"/>
<field name="type">payable</field>
<field name="currency_id" search="[('name','=','EUR')]"/>
<field name="parent_id" eval="auction_expense_view"/>
</record>
<record model="account.account" id="auction_income_costs">
<field name="name">Auction Buyer Costs</field>
<field name="code">8x*</field>
<field name="type">payable</field>
<field name="currency_id" search="[('name','=','EUR')]"/>
<field name="parent_id" eval="auction_income_view"/>
<field name="user_type" ref="account.account_type_tax"/>
</record>
<record model="account.account" id="auction_expense_costs">
<field name="name">Auction Seller Costs</field>
<field name="code">9x*</field>
<field name="type">receivable</field>
<field name="currency_id" search="[('name','=','EUR')]"/>
<field name="parent_id" eval="auction_expense_view"/>
<field name="user_type" ref="account.account_type_tax"/>
</record>
<record model="account.tax" id="tax_buyer_author">
<field name="name">Author rights (4%)</field>
<field name="type">percent</field>
<field name="applicable_type">code</field>
<field name="amount">0.04</field>
<field name="domain">sabam</field>
<field name="account_collected_id" ref="auction_income_costs"/>
<field name="account_paid_id" ref="auction_income_costs"/>
<field name="python_applicable">result = (price_unit&gt;=1250)</field>
</record>
<record model="account.tax" id="tax_buyer">
<field name="name">Buyer Costs (20%)</field>
<field name="type">percent</field>
<field name="amount">0.20</field>
<field name="domain">auction</field>
<field name="account_collected_id" ref="auction_income_costs"/>
<field name="account_paid_id" ref="auction_income_costs"/>
</record>
<record model="account.tax" id="tax_seller">
<field name="name">Seller Costs (12%)</field>
<field name="type">percent</field>
<field name="amount">-0.12</field>
<field name="domain">auction</field>
<field name="account_collected_id" ref="auction_expense_costs"/>
<field name="account_paid_id" ref="auction_expense_costs"/>
</record>
<!--demo data for the product-->
<record id="product.product_product_pc2" model="product.product">
<field name="list_price">770.0</field>
<field name="standard_price">700.0</field>
</record>
<!--demo data for the partner-->
@ -10,52 +106,52 @@
</record>
<record id="res_partner_unknown_address_1" model="res.partner.address">
<field name="city">Bruxelles1</field>
<field name="name">Benoit Mortie1r1</field>
<field name="zip">1030</field>
<field name="country_id" model="res.country" search="[('name','=','Belgium')]"/>
<field name="city">Bruxelles1</field>
<field name="name">Benoit Mortie1r1</field>
<field name="zip">1030</field>
<field name="country_id" model="res.country" search="[('name','=','Belgium')]"/>
<field name="email">info@opensides.be</field>
<field name="phone">(+32)2 211 34 83</field>
<field name="street">Rue des Palais 44, bte 33</field>
<field name="type">default</field>
<field name="partner_id" ref="partner_record1"/>
</record>
<field name="email">info@opensides.be</field>
<field name="phone">(+32)2 211 34 83</field>
<field name="street">Rue des Palais 44, bte 33</field>
<field name="type">default</field>
<field name="partner_id" ref="partner_record1"/>
</record>
<record id="res_partner_unknown_address_2" model="res.partner.address">
<field name="city">Avignon CEDEX 091</field>
<field name="name">Laurent Jacot1</field>
<field name="zip">84911</field>
<field name="country_id" model="res.country" search="[('name','=','France')]"/>
<field name="email">contact@tecsas.fr</field>
<field name="phone">(+33)4.32.74.10.57</field>
<field name="street">85 rue du traite de Rome</field>
<field name="type">default</field>
<field name="partner_id" ref="partner_record1"/>
</record>
<record id="res_partner_unknown_address_3" model="res.partner.address">
<field name="city">Louvain-la-Neuve</field>
<field name="name">Thomas Passot</field>
<field name="zip">1348</field>
<field name="country_id" model="res.country" search="[('name','=','Belgium')]"/>
<field name="email">info@mediapole.net</field>
<field name="phone">(+32).10.45.17.73</field>
<field name="street">Rue de l'Angelique, 1</field>
<field name="partner_id" ref="partner_record1"/>
</record>
<record id="res_partner_unknown_address_2" model="res.partner.address">
<field name="city">Avignon CEDEX 091</field>
<field name="name">Laurent Jacot1</field>
<field name="zip">84911</field>
<field name="country_id" model="res.country" search="[('name','=','France')]"/>
<field name="email">contact@tecsas.fr</field>
<field name="phone">(+33)4.32.74.10.57</field>
<field name="street">85 rue du traite de Rome</field>
<field name="type">default</field>
<field name="partner_id" ref="partner_record1"/>
</record>
<record id="res_partner_unknown_address_3" model="res.partner.address">
<field name="city">Louvain-la-Neuve</field>
<field name="name">Thomas Passot</field>
<field name="zip">1348</field>
<field name="country_id" model="res.country" search="[('name','=','Belgium')]"/>
<field name="email">info@mediapole.net</field>
<field name="phone">(+32).10.45.17.73</field>
<field name="street">Rue de l'Angelique, 1</field>
<field name="partner_id" ref="partner_record1"/>
</record>
<!-- demo data for the auction_artist object-->
<record model="auction.artists" id="auction_art_1">
<field name="name">Philippe Lavilier</field>
<field name="birth_death_dates">1345-1450</field>
</record>
<record model="auction.artists" id="auction_art_2">
<field name="name">POREAU OSWALD</field>
<field name="birth_death_dates">1877-1955</field>
</record>
<!-- demo data for the account tax code-->
<record model="account.tax.code" id="account_tax_code_id1">
@ -98,104 +194,102 @@
<field name="domain">sabam</field>
<field name="base_code_id" ref="account_tax_code_id5"/>
<field name="tax_code_id" ref="account_tax_code_id5"/>
</record>
<record id="auction_tax1" model="account.tax">
<field name="name">TVA</field>
<field name="amount">0.12</field>
<field name="domain">auction</field>
<field name="base_code_id" ref="account_tax_code_id4"/>
<field name="tax_code_id" ref="account_tax_code_id4"/>
<field name="name">TVA</field>
<field name="amount">0.12</field>
<field name="domain">auction</field>
<field name="base_code_id" ref="account_tax_code_id4"/>
<field name="tax_code_id" ref="account_tax_code_id4"/>
</record>
<record id="auction_tax2" model="account.tax">
<field name="name">TVA1</field>
<field name="amount">0.2</field>
<field name="domain">auction</field>
<field name="base_code_id" ref="account_tax_code_id2"/>
<field name="tax_code_id" ref="account_tax_code_id2"/>
<field name="name">TVA1</field>
<field name="amount">0.2</field>
<field name="domain">auction</field>
<field name="base_code_id" ref="account_tax_code_id2"/>
<field name="tax_code_id" ref="account_tax_code_id2"/>
</record>
<record id="auction_tax3" model="account.tax">
<field name="name">Buyer Costs</field>
<field name="amount">0.21</field>
<field name="domain">auction</field>
<field name="base_code_id" ref="account_tax_code_id1"/>
<field name="tax_code_id" ref="account_tax_code_id1"/>
<field name="name">Buyer Costs</field>
<field name="amount">0.21</field>
<field name="domain">auction</field>
<field name="base_code_id" ref="account_tax_code_id1"/>
<field name="tax_code_id" ref="account_tax_code_id1"/>
</record>
<record id="auction_tax4" model="account.tax">
<field name="name">Seller Costs1</field>
<field name="amount">-0.10</field>
<field name="domain">auction</field>
<field name="base_code_id" ref="account_tax_code_id1"/>
<field name="tax_code_id" ref="account_tax_code_id1"/>
<field name="name">Seller Costs1</field>
<field name="amount">-0.10</field>
<field name="domain">auction</field>
<field name="base_code_id" ref="account_tax_code_id1"/>
<field name="tax_code_id" ref="account_tax_code_id1"/>
</record>
<record id="auction_tax5" model="account.tax">
<field name="name">Seller Costs</field>
<field name="amount">-0.10</field>
<field name="domain">auction</field>
<field name="base_code_id" ref="account_tax_code_id3"/>
<field name="tax_code_id" ref="account_tax_code_id3"/>
<field name="name">Seller Costs</field>
<field name="amount">-0.10</field>
<field name="domain">auction</field>
<field name="base_code_id" ref="account_tax_code_id3"/>
<field name="tax_code_id" ref="account_tax_code_id3"/>
</record>
<!-- example for creating a demo data for the tax with basecode and tax code-->
<record id="auction_tax6" model="account.tax">
<field name="name">Frais de vente</field>
<field name="amount">-0.15</field>
<field name="domain">auction</field>
<field name="base_code_id" ref="account_tax_code_id1"/>
<field name="tax_code_id" ref="account_tax_code_id1"/>
<field name="name">Frais de vente</field>
<field name="amount">-0.15</field>
<field name="domain">auction</field>
<field name="base_code_id" ref="account_tax_code_id1"/>
<field name="tax_code_id" ref="account_tax_code_id1"/>
</record>
<record id="auction_tax20" model="account.tax">
<field name="name">Frais de vente</field>
<field name="amount">0</field>
<field name="domain">auction</field>
<field name="base_code_id" ref="account_tax_code_id2"/>
<field name="tax_code_id" ref="account_tax_code_id2"/>
<record id="auction_tax20" model="account.tax">
<field name="name">Frais de vente</field>
<field name="amount">0</field>
<field name="domain">auction</field>
<field name="base_code_id" ref="account_tax_code_id2"/>
<field name="tax_code_id" ref="account_tax_code_id2"/>
</record>
<record id="monproduit" model="product.product">
<field name="name">Oeuvres a 21%</field>
<field name="categ_id" ref="product.product_category_pc"/>
</record>
<!--===========================================================================================-->
<!-- start == demo data for the auction_lot_Category object-->
<record model="auction.lot.category" id="auction_cat_1">
<field name="name">painting</field>
<field name="name">Painting</field>
<field name="priority">1</field>
<field name="aie_categ">8</field>
<field name="aie_categ" ref="aie_category_paint_view"/>
</record>
<record model="auction.lot.category" id="auction_cat_2">
<field name="name">Furniture</field>
<field name="priority">2</field>
<field name="aie_categ">10</field>
<field name="aie_categ" ref="aie_category_furn_view"/>
</record>
<record model="auction.lot.category" id="auction_cat_3">
<field name="name">glass</field>
<field name="name">Glass</field>
<field name="priority">2</field>
<field name="aie_categ">25</field>
<field name="aie_categ" ref="aie_category_pcg_view"/>
</record>
<record model="auction.lot.category" id="auction_cat_4">
<field name="name">sculpture</field>
<field name="name">Sculpture</field>
<field name="priority">10</field>
<field name="aie_categ">18</field>
<field name="aie_categ" ref="aie_category_sbe_view"/>
</record>
<record model="auction.lot.category" id="auction_cat_5">
<field name="name">Jawellery</field>
<field name="priority">6</field>
<field name="aie_categ">15</field>
<field name="aie_categ" ref="aie_category_jew_view"/>
</record>
<!-- end == demo data for the auction_lot_Category-->
@ -203,20 +297,18 @@
<!-- start== demo data for the auction_date-->
<record model="auction.dates" id="auction_date_1">
<field name="name">painting Exhibition</field>
<field name="expo1" eval="time.strftime('%Y-%m-01')" />
<field name="expo2" eval="time.strftime('%Y-%m-15')" />
<field name="auction1" eval="time.strftime('%Y-%m-20')" />
<field name="auction2" eval="time.strftime('%Y-%m-28')" />
<field name="buyer_costs" model="account.tax" search="[('name','=','Buyer Costs')]"></field>
<field name="seller_costs" model="account.tax" search="[('name','=','Seller Costs')]"></field>
<field name="acc_income" ref="account.a_sale"/>
<field name="acc_expense" ref="account.a_expense"/>
<field name="journal_id" ref="account.sales_journal"/>
<field name="journal_seller_id" ref="account.expenses_journal"/>
<field name="account_analytic_id" model="account.analytic.account" search="[('code','=','1')]"></field>
<field name="name">painting Exhibition</field>
<field name="expo1" eval="time.strftime('%Y-%m-01')" />
<field name="expo2" eval="time.strftime('%Y-%m-15')" />
<field name="auction1" eval="time.strftime('%Y-%m-20')" />
<field name="auction2" eval="time.strftime('%Y-%m-28')" />
<field name="buyer_costs" model="account.tax" search="[('name','=','Buyer Costs')]"></field>
<field name="seller_costs" model="account.tax" search="[('name','=','Seller Costs')]"></field>
<field name="acc_income" ref="account.a_sale"/>
<field name="acc_expense" ref="account.a_expense"/>
<field name="journal_id" ref="account.sales_journal"/>
<field name="journal_seller_id" ref="account.expenses_journal"/>
<field name="account_analytic_id" model="account.analytic.account" search="[('code','=','1')]"></field>
</record>
<record model="auction.dates" id="auction_date_2">
@ -225,53 +317,47 @@
<field name="expo2" eval="time.strftime('%Y-%m-10')" />
<field name="buyer_costs" model="account.tax" search="[('name','=','Buyer Costs')]"></field>
<field name="seller_costs" model="account.tax" search="[('name','=','Seller Costs')]"></field>
<field name="auction1" eval="time.strftime('%Y-%m-14')" />
<field name="auction2" eval="time.strftime('%Y-%m-28')" />
<field name="acc_income" ref="account.a_sale"/>
<field name="acc_expense" ref="account.a_expense"/>
<field name="journal_id" ref="account.sales_journal"/>
<field name="journal_seller_id" ref="account.expenses_journal"/>
<field name="account_analytic_id" model="account.analytic.account" search="[('code','=','1')]"></field>
</record>
</record>
<!-- end == demo data for the auction_dates-->
<!-- start == demo data for the auction_deposit-->
<record model="auction.deposit" id="auction_deposit_1">
<field name="date_dep" eval="time.strftime('%Y')+'-04-01'"/>
<field name="partner_id" model="res.partner" search="[('name','=','Unknown')]"></field>
<field name="method">keep</field>
<field name="date_dep" eval="time.strftime('%Y')+'-04-01'"/>
<field name="partner_id" model="res.partner" search="[('name','=','Unknown')]"></field>
<field name="method">keep</field>
</record>
<record model="auction.deposit" id="auction_deposit_2">
<field name="date_dep" eval="time.strftime('%Y')+'-04-05'"/>
<field name="partner_id" model="res.partner" search="[('name','=','China Export')]"></field>
<field name="method">keep</field>
<field name="date_dep" eval="time.strftime('%Y')+'-04-05'"/>
<field name="partner_id" model="res.partner" search="[('name','=','China Export')]"></field>
<field name="method">keep</field>
</record>
<record model="auction.deposit" id="auction_deposit_3">
<field name="date_dep" eval="time.strftime('%Y')+'-04-10'"/>
<field name="partner_id" model="res.partner" search="[('name','=','Agrolait')]"></field>
<field name="method">keep</field>
<field name="date_dep" eval="time.strftime('%Y')+'-04-10'"/>
<field name="partner_id" model="res.partner" search="[('name','=','Agrolait')]"></field>
<field name="method">keep</field>
</record>
<record model="auction.deposit" id="auction_deposit_4">
<field name="date_dep" eval="time.strftime('%Y')+'-04-15'"/>
<field name="partner_id" model="res.partner" search="[('name','=','Bank Wealthy and sons')]"></field>
<field name="method">keep</field>
<field name="date_dep" eval="time.strftime('%Y')+'-04-15'"/>
<field name="partner_id" model="res.partner" search="[('name','=','Bank Wealthy and sons')]"></field>
<field name="method">keep</field>
</record>
<record model="auction.deposit" id="auction_deposit_5">
<field name="date_dep" eval="time.strftime('%Y')+'-04-12'"/>
<field name="partner_id" model="res.partner" search="[('name','=','Unknown')]"></field>
<field name="method">keep</field>
<field name="date_dep" eval="time.strftime('%Y')+'-04-12'"/>
<field name="partner_id" model="res.partner" search="[('name','=','Unknown')]"></field>
<field name="method">keep</field>
</record>
<record model="auction.lots" id="auction_deposit_1_lot_1">
@ -434,7 +520,6 @@
<field name="bord_vnd_id" ref="auction_deposit_5" />
<field name="author_right" ref="auction_tax"/>
<field name="product_id" model="product.product" search="[]"/>
</record>
<record model="auction.lots" id="auction_deposit_6_lot_1">
@ -451,7 +536,6 @@
<field name="bord_vnd_id" ref="auction_deposit_5" />
<field name="author_right" ref="auction_tax"/>
<field name="product_id" model="product.product" search="[]"/>
</record>
<record model="auction.lots" id="auction_deposit_6_lot_2">
@ -468,11 +552,8 @@
<field name="bord_vnd_id" ref="auction_deposit_5" />
<field name="author_right" ref="auction_tax"/>
<field name="product_id" model="product.product" search="[]"/>
</record>
<record model="auction.lots" id="auction_deposit_7_lot_1">
<field name="auction_id" ref="auction_date_1" />
<field name="name">Hardware photos</field>
@ -487,12 +568,10 @@
<field name="bord_vnd_id" ref="auction_deposit_5" />
<field name="author_right" ref="auction_tax"/>
<field name="product_id" model="product.product" search="[]"/>
</record>
<record model="auction.lots" id="auction_deposit_7_lot_2">
<field name="auction_id" ref="auction_date_1" />
<field name="auction_id" ref="auction_date_1" />
<field name="name">Home Appliance photos</field>
<field name="lot_num">12</field>
<!--field name="lot_type">common</field-->
@ -505,10 +584,8 @@
<field name="bord_vnd_id" ref="auction_deposit_5" />
<field name="author_right" ref="auction_tax"/>
<field name="product_id" model="product.product" search="[]"/>
</record>
<record model="auction.lots" id="auction_deposit_8_lot_1">
<field name="auction_id" ref="auction_date_1" />
<field name="name">mobile accesories photos</field>
@ -527,7 +604,7 @@
<record model="auction.lots" id="auction_deposit_8_lot_2">
<field name="auction_id" ref="auction_date_2" />
<field name="name"> piques-cierges</field>
<field name="name">pikes-candles</field>
<field name="lot_num">14</field>
<!--field name="lot_type">common</field-->
<field name="lot_est1">30</field>
@ -539,13 +616,11 @@
<field name="bord_vnd_id" ref="auction_deposit_5" />
<field name="author_right" ref="auction_tax"/>
<field name="product_id" model="product.product" search="[]"/>
</record>
<record model="auction.lots" id="auction_deposit_9_lot_1">
<field name="auction_id" ref="auction_date_1" />
<field name="name">Service à café</field>
<field name="name">Coffee Service</field>
<field name="lot_num">15</field>
<!--field name="lot_type">common</field-->
<field name="lot_est1">10</field>
@ -557,16 +632,11 @@
<field name="bord_vnd_id" ref="auction_deposit_5" />
<field name="author_right" ref="auction_tax"/>
<field name="product_id" model="product.product" search="[]"/>
</record>
<record model="auction.lots" id="auction_deposit_9_lot_2">
<field name="auction_id" ref="auction_date_1" />
<field name="name">Pendule</field>
<field name="auction_id" ref="auction_date_1" />
<field name="name">Pendulum</field>
<field name="lot_num">16</field>
<field name="lot_est1">100</field>
<field name="lot_est2">200</field>
@ -581,23 +651,22 @@
<record model="auction.lots" id="auction_deposit_10_lot_1">
<field name="auction_id" ref="auction_date_1" />
<field name="name">Cassolettes en marbre</field>
<field name="name">Cassolette marble</field>
<field name="lot_num">17</field>
<field name="lot_est1">400</field>
<field name="lot_est2">500</field>
<field name="obj_desc">marbre Saint Rémi</field>
<field name="obj_desc">Marble Saint Remi</field>
<field name="obj_ret">150</field>
<field name="obj_num">17</field>
<field name="obj_price">0</field>
<field name="bord_vnd_id" ref="auction_deposit_5" />
<field name="author_right" ref="auction_tax"/>
<field name="product_id" model="product.product" search="[]"/>
</record>
<record model="auction.lots" id="auction_deposit_10_lot_2">
<field name="auction_id" ref="auction_date_1" />
<field name="name">Tableau</field>
<field name="name">Table</field>
<field name="lot_num">18</field>
<field name="lot_est1">1600</field>
<field name="lot_est2">2200</field>
@ -608,39 +677,26 @@
<field name="bord_vnd_id" ref="auction_deposit_5" />
<field name="author_right" ref="auction_tax"/>
<field name="product_id" model="product.product" search="[]"/>
</record>
<record model="auction.lots" id="auction_deposit_11_lot_1">
<field name="auction_id" ref="auction_date_1" />
<field name="name">Vase</field>
<field name="auction_id" ref="auction_date_1" />
<field name="name">Yourself</field>
<field name="lot_num">19</field>
<field name="lot_est1">180</field>
<field name="lot_est2">220</field>
<field name="obj_desc">Rouge</field>
<field name="obj_desc">Red</field>
<field name="obj_ret">0</field>
<field name="obj_num">19</field>
<field name="obj_price">190.00</field>
<field name="bord_vnd_id" ref="auction_deposit_5" />
<field name="author_right" ref="auction_tax"/>
<field name="product_id" model="product.product" search="[]"/>
</record>
<record model="auction.lots" id="auction_deposit_12_lot_2">
<field name="auction_id" ref="auction_date_1" />
<field name="name">Appareil à photos</field>
<field name="auction_id" ref="auction_date_1" />
<field name="name">Digital photo</field>
<field name="lot_num">20</field>
<field name="lot_est1">160</field>
<field name="lot_est2">340</field>
@ -651,22 +707,8 @@
<field name="bord_vnd_id" ref="auction_deposit_5" />
<field name="author_right" ref="auction_tax"/>
<field name="product_id" model="product.product" search="[]"/>
</record>
<record model="auction.bid" id="auction_date_1_bid_1">
<field name="name">bid1</field>
<field name="partner_id" model="res.partner" search="[('name','=','Unknown')]"/>
@ -701,183 +743,191 @@
</record>
<record model="auction.bid" id="auction_date_1_bid_4">
<field name="name">bid4</field>
<field name="partner_id" model="res.partner" search="[('name','=','Unknown')]"/>
<field name="auction_id" ref="auction_date_1" />
<field name="name">bid4</field>
<field name="partner_id" model="res.partner" search="[('name','=','Unknown')]"/>
<field name="auction_id" ref="auction_date_1" />
</record>
<record model="auction.bid_line" id="auction_date_1_bid_4_bid_1_auction_bid_line1">
<field name="bid_id" ref="auction_date_1_bid_4" />
<field name="lot_id" ref="auction_deposit_2_lot_2" />
<field name="bid_id" ref="auction_date_1_bid_4" />
<field name="lot_id" ref="auction_deposit_2_lot_2" />
</record>
<record model="auction.bid" id="auction_date_1_bid_5">
<field name="name">bid5</field>
<field name="partner_id" model="res.partner" search="[('name','=','Unknown')]"/>
<field name="auction_id" ref="auction_date_1" />
<field name="name">bid5</field>
<field name="partner_id" model="res.partner" search="[('name','=','Unknown')]"/>
<field name="auction_id" ref="auction_date_1" />
</record>
<record model="auction.bid_line" id="auction_date_1_bid_5_auction_bid_line1">
<field name="bid_id" ref="auction_date_1_bid_5" />
<field name="lot_id" ref="auction_deposit_3_lot_1" />
<field name="bid_id" ref="auction_date_1_bid_5" />
<field name="lot_id" ref="auction_deposit_3_lot_1" />
</record>
<record model="auction.bid" id="auction_date_2_bid_1">
<field name="name">bid6</field>
<field name="partner_id" model="res.partner" search="[('name','=','Unknown')]"/>
<field name="auction_id" ref="auction_date_2" />
<field name="name">bid6</field>
<field name="partner_id" model="res.partner" search="[('name','=','Unknown')]"/>
<field name="auction_id" ref="auction_date_2" />
</record>
<record model="auction.bid_line" id="auction_date_2_bid_1_auction_bid_line1">
<field name="bid_id" ref="auction_date_2_bid_1" />
<field name="lot_id" ref="auction_deposit_3_lot_2" />
<field name="bid_id" ref="auction_date_2_bid_1" />
<field name="lot_id" ref="auction_deposit_3_lot_2" />
</record>
<record model="auction.bid" id="auction_date_2_bid_2">
<field name="name">bid7</field>
<field name="partner_id" model="res.partner" search="[('name','=','Unknown')]"/>
<field name="auction_id" ref="auction_date_2" />
<field name="name">bid7</field>
<field name="partner_id" model="res.partner" search="[('name','=','Unknown')]"/>
<field name="auction_id" ref="auction_date_2" />
</record>
<record model="auction.bid_line" id="auction_date_2_bid_2_auction_bid_line1">
<field name="bid_id" ref="auction_date_2_bid_2" />
<field name="lot_id" ref="auction_deposit_4_lot_1" />
<field name="bid_id" ref="auction_date_2_bid_2" />
<field name="lot_id" ref="auction_deposit_4_lot_1" />
</record>
<record model="auction.bid" id="auction_date_2_bid_3">
<field name="name">bid8</field>
<field name="partner_id" model="res.partner" search="[('name','=','Unknown')]"/>
<field name="auction_id" ref="auction_date_2" />
<field name="name">bid8</field>
<field name="partner_id" model="res.partner" search="[('name','=','Unknown')]"/>
<field name="auction_id" ref="auction_date_2" />
</record>
<record model="auction.bid_line" id="auction_date_2_bid_3_auction_bid_line1">
<field name="bid_id" ref="auction_date_2_bid_3" />
<field name="lot_id" ref="auction_deposit_4_lot_2" />
<field name="bid_id" ref="auction_date_2_bid_3" />
<field name="lot_id" ref="auction_deposit_4_lot_2" />
</record>
<record model="auction.bid" id="auction_date_2_bid_4">
<field name="name">bid9</field>
<field name="partner_id" search="[('name','=','Unknown')]"/>
<field name="auction_id" ref="auction_date_2" />
<field name="name">bid9</field>
<field name="partner_id" search="[('name','=','Unknown')]"/>
<field name="auction_id" ref="auction_date_2" />
</record>
<record model="auction.bid_line" id="auction_date_2_bid_4_auction_bid_line1">
<field name="bid_id" ref="auction_date_2_bid_4" />
<field name="lot_id" ref="auction_deposit_5_lot_1" />
<field name="bid_id" ref="auction_date_2_bid_4" />
<field name="lot_id" ref="auction_deposit_5_lot_1" />
</record>
<record model="auction.bid" id="auction_date_2_bid_5">
<field name="name">bid10</field>
<field name="partner_id" model="res.partner" search="[('name','=','Unknown')]"/>
<field name="auction_id" ref="auction_date_2" />
<field name="name">bid10</field>
<field name="partner_id" model="res.partner" search="[('name','=','Unknown')]"/>
<field name="auction_id" ref="auction_date_2" />
</record>
<record model="auction.bid_line" id="auction_date_2_bid_5_auction_bid_line1">
<field name="bid_id" ref="auction_date_2_bid_5" />
<field name="lot_id" ref="auction_deposit_5_lot_2" />
<field name="bid_id" ref="auction_date_2_bid_5" />
<field name="lot_id" ref="auction_deposit_5_lot_2" />
</record>
<!--demo data for the hr_employee-->
<record model="hr.employee" id="employee2">
<field name="name">Demo</field>
<record model="hr.employee" id="employee2">
<field name="name">Demo</field>
<!-- <field name="regime">45</field>-->
<field name="user_id" search="[('login','=','admin')]" model="res.users"/>
<field name="user_id" search="[('login','=','admin')]" model="res.users"/>
<!-- <field name="holiday_max">25</field>
<field name="workgroups" ref="timesheet_group1" />-->
</record>
<field name="workgroups" ref="timesheet_group1" />-->
</record>
<!--demo data for the hr_attendence for employee1 -->
<record model="hr.attendance" id="unknown1_emp1">
<field name="name" eval="time.strftime('%Y-%m-25 08:21')"/>
<field name="action">sign_in</field>
<field name="employee_id" ref="hr.employee1" />
</record>
<record model="hr.attendance" id="unknown1_emp2">
<field name="name" eval="time.strftime('%Y-%m-25 9:21')"/>
<field name="action">sign_out</field>
<field name="employee_id" ref="hr.employee1" />
</record>
<record model="hr.attendance" id="unknown1_emp3">
<field name="name" eval="time.strftime('%Y-%m-25 09:25')"/>
<field name="action">sign_in</field>
<field name="employee_id" ref="hr.employee1" />
</record>
<record model="hr.attendance" id="unknown1_emp4">
<field name="name" eval="time.strftime('%Y-%m-25 11:54')"/>
<field name="action">sign_out</field>
<field name="employee_id" ref="hr.employee1" />
</record>
<record model="hr.attendance" id="unknown1_emp5">
<field name="name" eval="time.strftime('%Y-%m-25 11:59')"/>
<field name="action">sign_in</field>
<field name="employee_id" ref="hr.employee1" />
</record>
<record model="hr.attendance" id="unknown1_emp6">
<field name="name" eval="time.strftime('%Y-%m-25 13:31')"/>
<field name="action">sign_out</field>
<field name="employee_id" ref="hr.employee1"/>
</record>
<record model="hr.attendance" id="unknown1_emp7">
<field name="name" eval="time.strftime('%Y-%m-25 20:10')"/>
<field name="action">sign_in</field>
<field name="employee_id" ref="hr.employee1" />
</record>
<record model="hr.attendance" id="unknown1_emp8">
<field name="name" eval="time.strftime('%Y-%m-25 21:34')"/>
<field name="action">sign_out</field>
<field name="employee_id" ref="hr.employee1" />
</record>
<!--demo data for the hr_attendence for employee1 -->
<!--demo data for the hr_attendence for employee2-->
<record model="hr.attendance" id="unknown2_emp1">
<field name="name" eval="time.strftime('%Y-%m-26 08:21')"/>
<field name="action">sign_in</field>
<field name="employee_id" ref="employee2" />
</record>
<record model="hr.attendance" id="unknown2_emp2">
<field name="name" eval="time.strftime('%Y-%m-26 9:21')"/>
<field name="action">sign_out</field>
<field name="employee_id" ref="employee2" />
</record>
<record model="hr.attendance" id="unknown2_emp3">
<field name="name" eval="time.strftime('%Y-%m-26 10:21')"/>
<field name="action">sign_in</field>
<field name="employee_id" ref="employee2" />
</record>
<record model="hr.attendance" id="unknown2_emp4">
<field name="name" eval="time.strftime('%Y-%m-26 12:54')"/>
<field name="action">sign_out</field>
<field name="employee_id" ref="employee2" />
</record>
<record model="hr.attendance" id="unknown2_emp5">
<field name="name" eval="time.strftime('%Y-%m-26 13:32')"/>
<field name="action">sign_in</field>
<field name="employee_id" ref="employee2" />
</record>
<record model="hr.attendance" id="unknown2_emp6">
<field name="name" eval="time.strftime('%Y-%m-26 16:31')"/>
<field name="action">sign_out</field>
<field name="employee_id" ref="employee2"/>
</record>
<record model="hr.attendance" id="unknown2_emp7">
<field name="name" eval="time.strftime('%Y-%m-26 17:10')"/>
<field name="action">sign_in</field>
<field name="employee_id" ref="employee2" />
</record>
<record model="hr.attendance" id="unknown2_emp8">
<field name="name" eval="time.strftime('%Y-%m-26 22:34')"/>
<field name="action">sign_out</field>
<field name="employee_id" ref="employee2" />
</record>
<record model="hr.attendance" id="unknown1_emp1">
<field name="name" eval="time.strftime('%Y-%m-25 08:21')"/>
<field name="action">sign_in</field>
<field name="employee_id" ref="hr.employee1" />
</record>
<record model="hr.attendance" id="unknown1_emp2">
<field name="name" eval="time.strftime('%Y-%m-25 9:21')"/>
<field name="action">sign_out</field>
<field name="employee_id" ref="hr.employee1" />
</record>
<record model="hr.attendance" id="unknown1_emp3">
<field name="name" eval="time.strftime('%Y-%m-25 09:25')"/>
<field name="action">sign_in</field>
<field name="employee_id" ref="hr.employee1" />
</record>
<record model="hr.attendance" id="unknown1_emp4">
<field name="name" eval="time.strftime('%Y-%m-25 11:54')"/>
<field name="action">sign_out</field>
<field name="employee_id" ref="hr.employee1" />
</record>
<record model="hr.attendance" id="unknown1_emp5">
<field name="name" eval="time.strftime('%Y-%m-25 11:59')"/>
<field name="action">sign_in</field>
<field name="employee_id" ref="hr.employee1" />
</record>
<record model="hr.attendance" id="unknown1_emp6">
<field name="name" eval="time.strftime('%Y-%m-25 13:31')"/>
<field name="action">sign_out</field>
<field name="employee_id" ref="hr.employee1"/>
</record>
<record model="hr.attendance" id="unknown1_emp7">
<field name="name" eval="time.strftime('%Y-%m-25 20:10')"/>
<field name="action">sign_in</field>
<field name="employee_id" ref="hr.employee1" />
</record>
<record model="hr.attendance" id="unknown1_emp8">
<field name="name" eval="time.strftime('%Y-%m-25 21:34')"/>
<field name="action">sign_out</field>
<field name="employee_id" ref="hr.employee1" />
</record>
<!--demo data for the hr_attendence for employee2-->
<record model="hr.attendance" id="unknown2_emp1">
<field name="name" eval="time.strftime('%Y-%m-26 08:21')"/>
<field name="action">sign_in</field>
<field name="employee_id" ref="employee2" />
</record>
<record model="hr.attendance" id="unknown2_emp2">
<field name="name" eval="time.strftime('%Y-%m-26 9:21')"/>
<field name="action">sign_out</field>
<field name="employee_id" ref="employee2" />
</record>
<record model="hr.attendance" id="unknown2_emp3">
<field name="name" eval="time.strftime('%Y-%m-26 10:21')"/>
<field name="action">sign_in</field>
<field name="employee_id" ref="employee2" />
</record>
-<record model="hr.attendance" id="unknown2_emp4">
<field name="name" eval="time.strftime('%Y-%m-26 12:54')"/>
<field name="action">sign_out</field>
<field name="employee_id" ref="employee2" />
</record>
<record model="hr.attendance" id="unknown2_emp5">
<field name="name" eval="time.strftime('%Y-%m-26 13:32')"/>
<field name="action">sign_in</field>
<field name="employee_id" ref="employee2" />
</record>
<record model="hr.attendance" id="unknown2_emp6">
<field name="name" eval="time.strftime('%Y-%m-26 16:31')"/>
<field name="action">sign_out</field>
<field name="employee_id" ref="employee2"/>
</record>
<record model="hr.attendance" id="unknown2_emp7">
<field name="name" eval="time.strftime('%Y-%m-26 17:10')"/>
<field name="action">sign_in</field>
<field name="employee_id" ref="employee2" />
</record>
<record model="hr.attendance" id="unknown2_emp8">
<field name="name" eval="time.strftime('%Y-%m-26 22:34')"/>
<field name="action">sign_out</field>
<field name="employee_id" ref="employee2" />
</record>
</data>
</data>
</openerp>

View File

@ -3,7 +3,7 @@
<data>
<!--<delete model="ir.actions.report.xml" search="[('model','like','auction.')]"/>-->
<report string="Listing Huissiers"
<report string="Listing Huissiers"
model="auction.lots"
name="flagey.huissier"
xsl="auction/report/huissier.xsl"
@ -13,7 +13,7 @@
/>
<report string="Artists Biography"
<report string="Artists Biography"
model="auction.artists"
name="report.auction.artists"
xml="auction/report/artists.xml"
@ -29,14 +29,14 @@
id="art_auction"
multi="1"/>
-->
<report string="Bids phones"
<report string="Bids phones"
model="auction.lots"
name="bids.lots"
rml="auction/report/bids_lots.rml"
id="bid_phone"
multi="1"/>
<report string="Bids"
<report string="Bids"
model="auction.bid"
name="auction.bids"
rml="auction/report/auction_bids.rml"
@ -53,7 +53,7 @@
id="v_report_barcode_lot"/>
<report string="Seller Labels"
<report string="Seller Labels"
model="auction.lots"
name="auction.seller_labels"
auto="False"
@ -89,8 +89,7 @@
multi="1"/>
<report string="Lots List - Landscape"
<report string="Lots List - Landscape"
model="auction.lots"
name="report.auction.lots.list.landscape"
xml="auction/report/lots_list_landscape.xml"
@ -98,16 +97,13 @@
id="lot_list_inv"
multi="1"/>
<report string="Lots List Inventory"
model="auction.lots"
name="lots.list.inventory"
rml="auction/report/lots_list_inventory.rml"
multi="1"/>
model="auction.lots"
name="lots.list.inventory"
rml="auction/report/lots_list_inventory.rml"
multi="1"/>
<report string="Lots List"
<report string="Lots List"
model="auction.lots"
name="report.auction.lots.list"
xml="auction/report/lots_list.xml"
@ -135,16 +131,17 @@
auto="False"
multi="1"/>-->
<report string="Buyer Form"
<report string="Buyer Form"
id="buyer_form_id"
model="auction.lots"
name="report.auction.ach_bordereau"
xml="auction/report/ach_bordereau.xml"
xsl="auction/report/ach_bordereau.xsl"
multi="0"
header= "True"
/>
<report string="Deposits"
<report string="Deposits"
id="id_deposit"
model="auction.deposit"
name="report.auction.deposit"
@ -158,7 +155,7 @@
name="auction.cat_flagy"
xsl="'auction/report/catalog2.xsl"/>-->
<report string="Seller Form"
<report string="Seller Form"
id="seller_lots_3"
model="auction.lots"
name="report.auction.vnd_bordereau"
@ -166,7 +163,7 @@
xsl="auction/report/vnd_bordereau.xsl"
multi="1"/>
<report string="Seller List"
<report string="Seller List"
model="auction.lots"
multi="1"
id="seller_form_id"
@ -175,7 +172,7 @@
xsl="auction/report/seller_list.xsl"/>
<report string="Buyer List"
<report string="Buyer List"
model="auction.lots"
name="buyer.list"
id="buy_id_list"
@ -193,7 +190,7 @@
id="v_seller_list"
multi="1"/>
-->
<report string="Bids per lot (phone)"
<report string="Bids per lot (phone)"
model="auction.lots"
name="bids.phones.details"
rml="auction/report/bids_phones_details.rml"
@ -208,19 +205,20 @@
xsl="auction/report/lots_bids_phone.xsl"
multi="1"/>-->
<report string="Auction's results"
model="auction.lots"
name="auction.result"
rml="auction/report/auction_result.rml"
multi="1"/>
<!-- temp -->
<report string="Results with buyer"
model="auction.lots"
name="report.auction.buyer.result"
rml="auction/report/auction_buyer_result.rml"
multi="1"
id="res_w_buyer"/>
<report string="Auction's results"
model="auction.lots"
name="auction.result"
rml="auction/report/auction_result.rml"
multi="1"/>
<report string="Results with buyer"
model="auction.lots"
name="report.auction.buyer.result"
rml="auction/report/auction_buyer_result.rml"
multi="1"
id="res_w_buyer"/>
<!-- <wizard
id="auction_catalog_flagy"
@ -229,8 +227,6 @@
name="auction.catalog.flagey"
keyword="client_print_multi"/>-->
</data>
</openerp>

View File

@ -1,30 +1,33 @@
<?xml version="1.0"?>
<openerp>
<data noupdate="1">
#
# Sequences for sale.order
#
<!-- Sequences for Auction deposit -->
<record model="ir.sequence.type" id="seq_type_auction_deposit">
<field name="name">Auction deposit</field>
<field name="code">auction.deposit</field>
<field name="name">Auction deposit</field>
<field name="code">auction.deposit</field>
</record>
<record model="ir.sequence" id="seq_sale_order">
<field name="name">Auction deposit</field>
<field name="code">auction.deposit</field>
<field name="prefix">AD/</field>
<field name="padding">3</field>
<field name="name">Auction deposit</field>
<field name="code">auction.deposit</field>
<field name="prefix">AD/</field>
<field name="padding">3</field>
</record>
<!-- Sequences for Auction Bid -->
<record model="ir.sequence.type" id="seq_type_bid">
<field name="name">Auction bid </field>
<field name="code">auction.bid</field>
<field name="name">Auction bid </field>
<field name="code">auction.bid</field>
</record>
<record model="ir.sequence" id="seq_auction_bid">
<field name="name">Auction bid</field>
<field name="code">auction.bid</field>
<field name="prefix">bid/</field>
<field name="padding">3</field>
<field name="name">Auction bid</field>
<field name="code">auction.bid</field>
<field name="prefix">bid/</field>
<field name="padding">3</field>
</record>
</data>

File diff suppressed because it is too large Load Diff

View File

@ -5,6 +5,7 @@
<field name="name">Auction manager</field>
</record>
<record model="ir.ui.view" id="board_auction_manager_form1">
<field name="name">board.auction.manager.form</field>
<field name="model">board.board</field>
@ -13,8 +14,6 @@
<form string="Auction manager ">
<hpaned position="100">
<child1>
<action
string="Latest objects"
name="%(auction.action_report_latest_objects_manager_tree)d"
@ -54,7 +53,6 @@
string="Objects by day"
name="%(auction.action_report_auction_object_date_tree)d"
view_mode="graph,tree" colspan="4" />
</child2>
</hpaned>
</form>

View File

@ -4,7 +4,7 @@
<record model="board.note.type" id="note_auction_type">
<field name="name">Auction</field>
</record>
<record model="ir.ui.view" id="board_auction_manager_form">
<field name="name">board.auction.manager.form</field>
<field name="model">board.board</field>
@ -58,7 +58,7 @@
<field name="usage">menu</field>
<field name="view_id" ref="board_auction_manager_form"/>
</record>
<menuitem name="Dashboard" id="menu_board_auction" parent="auction_report_menu" sequence="0"/>
<menuitem name="Dashboard" id="menu_board_auction" parent="auction.auction_report_menu" sequence="0"/>
<menuitem
name="Auction Member"
action="open_board_auction"

View File

@ -32,7 +32,7 @@ import auction_objects
import buyer_form_report
import seller_form_report
import report_auction
import buyer_list

View File

@ -14,38 +14,20 @@
<street2 type="field" name="address.street2"/>
<zip type="field" name="address.zip"/>
<city type="field" name="address.city"/>
<!--<country type="field" name="address.country.name"/>-->
<phone type="field" name="address.phone"/>
<mobile type="field" name="address.mobile"/>
</client_info>
<objects>
<cost type="call" name="compute_buyer_costs" args="">
<!--<name value="name"/>-->
<amount value="amount"/>
</cost>
<!--<cost type="field" name="auction_id.buyer_costs"/>
<name value="name"/>
<amount value="amount"/>
</cost>-->
<!--<cost type="call" name="compute_buyer_costs" args="">
<name value="name"/>
<amount value="amount"/>
</cost>-->
<object type="fields" name="obj_num,id">
<id type="field" name="id"/>
<barcode type="field" name="id" addchecksum="false" print-text="true"/>
<!--<barcode value="id" addchecksum="false" print-text="true"/>
-->
<cost type="call" name="compute_buyer_costs" args="">
<!--<id value="id"/>-->
<amount value="amount"/>
</cost>
<barcode type="field" name="id"/>

View File

@ -1,8 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
<xsl:import href="../../base/report/corporate_defaults.xsl"/>
<xsl:import href="../../base/report/rml_template.xsl"/>
<!-- TOFIX: Path Problem -->
<xsl:import href="corporate_defaults.xsl"/>
<xsl:import href="rml_template.xsl"/>

View File

@ -1,162 +1,64 @@
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format">
<!-- TOFIX: Path Problem
<xsl:import href="../../base/report/corporate_defaults.xsl" /> -->
<xsl:template match="/">
<xsl:call-template name="rml" />
</xsl:template>
<xsl:import href="../../base/report/corporate_defaults.xsl"/>
<xsl:import href="../../base/report/rml_template.xsl"/>
<xsl:template match="/">
<xsl:call-template name="rml"/>
</xsl:template>
<xsl:template name="rml" match="/">
<document filename="example.pdf">
<template>
<pageTemplate id="first">
<frame id="first" x1="1cm" y1="2.5cm" width="19.0cm" height="23.0cm"/>
<pageGraphics>
<xsl:apply-imports />
</pageGraphics>
</pageTemplate>
</template>
<stylesheet>
<paraStyle name="normal" fontName="Times-Roman" fontSize="12" />
<paraStyle name="title" fontName="Times-Bold" fontSize="15" alignment="center" />
<paraStyle name="table_title" fontName="Times-Bold" fontSize="12" alignment="center" />
<paraStyle name="product1" fontName="Times-Roman" fontSize="8" />
<paraStyle name="categ" fontName="Times-Bold" fontSize="10" textColor="blue"/>
<paraStyle name="price" fontName="Times-Roman" fontSize="8" alignment="right" />
<xsl:template name="stylesheet">
<paraStyle name="login-title" fontName="Helvetica" fontSize="12"/>
<paraStyle name="login" fontName="Helvetica-Bold" fontSize="16"/>
<blockTableStyle id="main_title">
<blockAlignment value="CENTER" />
<lineStyle kind="GRID" colorName="black"/>
<blockBackground colorName="#e6e6e6" />
<blockValign value="TOP"/>
</blockTableStyle>
<blockTableStyle id="objects">
<blockFont name="Helvetica-BoldOblique" size="12" start="0,0" stop="-1,0"/>
<blockValign value="TOP"/>
<blockAlignment value="RIGHT" start="-1,0" stop="-1,-1"/>
<lineStyle kind="LINEBELOW" start="0,0" stop="-1,0"/>
</blockTableStyle>
<blockTableStyle id="object-totals">
<blockValign value="TOP"/>
<blockAlignment value="RIGHT"/>
<lineStyle kind="LINEABOVE" start="-1,0" stop="-1,0"/>
<lineStyle kind="LINEABOVE" start="-1,-1" stop="-1,-1"/>
</blockTableStyle>
</xsl:template>
<xsl:template name="story">
<xsl:apply-templates select="borderform-list"/>
</xsl:template>
<xsl:template match="borderform-list">
<xsl:apply-templates select="borderform">
<xsl:sort order="ascending" select="client_info/name"/>
</xsl:apply-templates>
</xsl:template>
<xsl:template match="client_info">
<para>
<b>
<xsl:value-of select="title" />
<xsl:text> </xsl:text>
<xsl:value-of select="name"/>
</b>
</para>
<para><xsl:value-of select="street"/></para>
<para><xsl:value-of select="street2"/></para>
<para>
<xsl:value-of select="zip"/>
<xsl:text> </xsl:text>
<xsl:value-of select="city"/>
</para>
<!-- <para><xsl:value-of select="country"/></para>-->
</xsl:template>
<xsl:template match="borderform">
<xsl:apply-templates select="client_info"/>
<setNextTemplate name="other_pages"/>
<nextFrame/>
<para style="login-title" t="1">Plate Number:</para>
<para style="login"><xsl:value-of select="login"/></para>
<spacer length="1cm"/>
<para>
<b t="1">Document</b>: <xsl:text t="1">Buyer form</xsl:text>
</para><para>
<b t="1">Auction</b>: <xsl:value-of select="title"/>
</para>
<xsl:if test="client_info">
<para>
<b t="1">Customer Contact</b>:
<xsl:value-of select="client_info/phone"/>
<xsl:if test="number(string-length(client_info/mobile) &gt; 0) + number(string-length(client_info/phone) &gt; 0) = 2">
<xsl:text> - </xsl:text>
</xsl:if>
<xsl:value-of select="client_info/mobile"/>
</para><para>
<b t="1">Customer Reference</b>: <xsl:value-of select="client_info/ref"/>
</para>
</xsl:if>
<spacer length="1cm"/>
<xsl:apply-templates select="objects"/>
<setNextTemplate name="first_page"/>
<pageBreak/>
</xsl:template>
<xsl:template match="objects">
<blockTable colWidths="3.1cm,1.8cm,9.6cm,1.5cm,2.2cm" style="objects">
<tr>
<td/>
<td t="1">Cat. N.</td>
<td t="1">Description</td>
<td t="1">Paid</td>
<td t="1">Adj.(EUR)</td>
</tr>
<xsl:apply-templates select="object"/>
</blockTable>
<condPageBreak height="3.2cm"/>
<blockTable colWidths="3.1cm,1.8cm,9.6cm,1.5cm,2.2cm" style="object-totals">
<tr>
<td/>
<td/>
<td/>
<td t="1">Subtotal:</td>
<td><xsl:value-of select="format-number(sum(object[price != '']/price), '#,##0.00')"/></td>
</tr>
<xsl:apply-templates select="cost"/>
<tr>
<td/>
<td/>
<td/>
<td t="1">Total:</td>
<td><xsl:value-of select="format-number(sum(object[price != '']/price) + sum(cost/amount), '#,##0.00')"/></td>
</tr>
</blockTable>
</xsl:template>
<xsl:template match="cost">
<tr>
<td/>
<td/>
<td/>
<td><xsl:value-of select="name"/>:</td>
<td><xsl:value-of select="format-number(amount, '#,##0.00')"/></td>
</tr>
</xsl:template>
<xsl:template match="object">
<tr>
<td>
<xsl:if test="image">
<image width="2.5cm" height="2.2cm">
<xsl:attribute name="name"><xsl:value-of select="image"/></xsl:attribute>
</image>
</xsl:if>
</td>
<td><xsl:value-of select="ref"/></td>
<td>
<para>
<b><xsl:value-of select="title"/><xsl:text>. </xsl:text></b>
<xsl:value-of select="desc"/>
</para>
</td>
<td><xsl:if test="state='paid'"><xsl:text>X</xsl:text></xsl:if></td>
<td>
<xsl:if test="price!=''">
<xsl:value-of select="format-number(price, '#,##0.00')"/>
</xsl:if>
</td>
</tr>
</xsl:template>
</xsl:stylesheet>
<blockTableStyle id="product">
<blockAlignment value="LEFT" />
<xsl:for-each select="/report/title">
<xsl:variable name="col" select="attribute::number" />
<blockBackground>
<xsl:attribute name="colorName">#e6e6e6</xsl:attribute>
<xsl:attribute name="start">
<xsl:value-of select="$col" />
<xsl:text>,0</xsl:text>
</xsl:attribute>
<xsl:attribute name="stop">
<xsl:value-of select="$col" />
<xsl:text>,0</xsl:text>
</xsl:attribute>
</blockBackground>
</xsl:for-each>
<lineStyle kind="LINEABOVE" colorName="black" start="0,0" stop="-1,-1" />
<lineStyle kind="LINEBEFORE" colorName="black" start="0,0" stop="-1,-1"/>
<lineStyle kind="LINEAFTER" colorName="black" start="-1,0" stop="-1,-1"/>
<lineStyle kind="LINEBELOW" colorName="black" start="0,-1" stop="-1,-1"/>
<blockValign value="TOP"/>
</blockTableStyle>
</stylesheet >
<story>
<xsl:call-template name="story"/>
</story>
</document>
</xsl:template>

View File

@ -35,6 +35,7 @@ import base64
import wizard
import photo_shadow
from tools import config
import addons
def _to_unicode(s):
try:
@ -64,16 +65,13 @@ def _to_decode(s):
class auction_catalog(report_rml):
def create_xml(self, cr, uid, ids, data, context):
xml = self.catalog_xml(cr, uid, ids, data, context)
temp=self.post_process_xml_data(cr, uid, xml, context)
temp = self.post_process_xml_data(cr, uid, xml, context)
return temp
def catalog_xml(self, cr, uid, ids, data, context, cwid="0"):
impl = minidom.getDOMImplementation()
doc = impl.createDocument(None, "report", None)
catalog=doc.createElement('catalog')
doc.documentElement.appendChild(catalog)
@ -82,37 +80,38 @@ class auction_catalog(report_rml):
commdb='comm'
tab_avoid = []
tab_no_photo=[]
for id in ids:
lot_ids=pooler.get_pool(cr.dbname).get('auction.lots').search(cr, uid, [('auction_id', '=', id)])
ab=pooler.get_pool(cr.dbname).get('auction.lots').read(cr, uid, lot_ids, ['auction_id','name','lot_num','lot_est1','lot_est2'], context)
auction_dates_ids = [x["auction_id"][0] for x in ab]
auction_lot_pool = pooler.get_pool(cr.dbname).get('auction.lots')
auction_dates_pool = pooler.get_pool(cr.dbname).get('auction.dates')
for auction in auction_dates_pool.browse(cr, uid, ids, context=context):
auction_lot_ids = auction_lot_pool.search(cr, uid, [('auction_id', '=', auction.id)])
#for lot in auction_lot_pool.browse(cr, uid, auction_lot_ids, context=context):
# ab=pooler.get_pool(cr.dbname).get('auction.lots').read(cr, uid, lot_ids, ['auction_id','name','lot_num','lot_est1','lot_est2'], context)
#auction_dates_ids = [x["auction_id"][0] for x in ab]
res=pooler.get_pool(cr.dbname).get('auction.dates').read(cr, uid, ids, ['name','auction1','auction2'], context)
# name emelment
key = 'name'
categ = doc.createElement(key)
categ.appendChild(doc.createTextNode(_to_decode(res[0]["name"])))
categ.appendChild(doc.createTextNode(_to_decode(auction.name)))
catalog.appendChild(categ)
#Auctuion Date element
categ = doc.createElement("AuctionDate1")
categ.appendChild(doc.createTextNode(_to_decode(res[0]['auction1'])))
categ.appendChild(doc.createTextNode(_to_decode(auction.auction1)))
catalog.appendChild(categ)
# Action Date 2 element
categ = doc.createElement("AuctionDate2")
categ.appendChild(doc.createTextNode(_to_decode(res[0]['auction2'])))
categ.appendChild(doc.createTextNode(_to_decode(auction.auction2)))
catalog.appendChild(categ)
# promotion element
# promotion element
promo = doc.createElement('promotion1')
fp = file(config['addons_path']+'/auction/report/images/flagey_logo.jpg','r')
fp = file(addons.get_module_resource('auction','report', 'images', 'flagey_logo.jpg'),'r')
file_data = fp.read()
promo.appendChild(doc.createTextNode(base64.encodestring(file_data)))
catalog.appendChild(promo)
promo = doc.createElement('promotion2')
fp = file(config['addons_path']+'/auction/report/images/flagey_logo.jpg','r')
fp = file(addons.get_module_resource('auction','report', 'images', 'flagey_logo.jpg'),'r')
file_data = fp.read()
promo.appendChild(doc.createTextNode(base64.encodestring(file_data)))
catalog.appendChild(promo)
@ -122,36 +121,30 @@ class auction_catalog(report_rml):
catalog.appendChild(products)
side = 0
length = 0
auction_ids = []
for test in ab:
if test.has_key('auction_id'):
auction_ids.append(test['auction_id'][0])
cr.execute('select * from auction_lots where auction_id IN %s',(tuple(auction_ids),))
res = cr.dictfetchall()
for cat in res:
product =doc.createElement('product')
for cat in auction_lot_pool.browse(cr, uid, auction_lot_ids, context=context):
product = doc.createElement('product')
products.appendChild(product)
if cat['obj_desc']:
if cat.obj_desc:
infos = doc.createElement('infos')
lines = re.split('<br/>|\n', _to_unicode(cat['obj_desc']))
lines = re.split('<br/>|\n', _to_unicode(cat.obj_desc))
for line in lines:
xline = doc.createElement('info')
xline.appendChild(doc.createTextNode(_to_decode(line)))
infos.appendChild(xline)
product.appendChild(infos)
if cat['lot_num']:
if cat.lot_num:
lnum = doc.createElement('lot_num')
lnum.appendChild(doc.createTextNode(_to_decode(str(cat['lot_num']))))
lnum.appendChild(doc.createTextNode(_to_decode(str(cat.lot_num))))
infos.appendChild(lnum)
if cat['image']:
if cat.image:
import random
import tempfile
limg = doc.createElement('photo_small')
file_name = tempfile.mktemp(prefix='openerp_auction_', suffix='.jpg')
fp = file(file_name, 'w')
content = base64.decodestring(cat['image'])
content = base64.decodestring(cat.image)
fp.write(content)
fp.close()
fp = file(file_name,'r')
@ -164,10 +157,15 @@ class auction_catalog(report_rml):
limg.appendChild(doc.createTextNode(test_data))
infos.appendChild(limg)
for key in ('lot_est1','lot_est2'):
if cat.lot_est1:
ref2 = doc.createElement(key)
ref2.appendChild(doc.createTextNode( _to_decode(str(cat[key] or 0.0))))
ref2.appendChild(doc.createTextNode( _to_decode(str(cat.lot_est1 or 0.0))))
product.appendChild(ref2)
if cat.lot_est2:
ref2 = doc.createElement(key)
ref2.appendChild(doc.createTextNode( _to_decode(str(cat.lot_est2 or 0.0))))
product.appendChild(ref2)
oldlength = length
length += 2.0
if length>23.7:
@ -180,7 +178,7 @@ class auction_catalog(report_rml):
ref4 = doc.createElement('side')
ref4.appendChild(doc.createTextNode( "1" ))
product.appendChild(ref4)
xml1 = doc.toxml()
xml1 = doc.toxml()
return xml1
auction_catalog('report.auction.cat_flagy', 'auction.dates','','addons/auction/report/catalog2.xsl')

View File

@ -12,7 +12,7 @@
<!-- <fill color="(0.6,0.3,0.1)"/>-->
<image x="7cm" y="25cm" file="addons/auction/report/images/aeko_logo.jpg"/>
<image x="7cm" y="25cm" file="addons/auction/report/images/flagey_logo.jpg"/>
<image x="7cm" y="25cm" file="addons/auction/report/images/flagey_logo.jpg"/>
<lines>1cm 3.0cm 20cm 3.0cm</lines>
<setFont name="Helvetica" size="15"/>
<drawCentredString x="105mm" y="2.2cm">Hotel des ventes Flagey</drawCentredString>
@ -20,7 +20,6 @@
<drawCentredString x="105mm" y="1.6cm">Rue du Nid, 4 - B-1050 Bruxelles - Tel: 02/644.97.67</drawCentredString>
<drawCentredString x="105mm" y="1.0cm">Web: Flagey.com - Mail: info@flagey.com - Fax: 02.646.32.35</drawCentredString>
<fill color="(0.2,0.2,0.2)"/>
<stroke color="(0.2,0.2,0.2)"/>
@ -30,8 +29,8 @@
<pageTemplate id="first">
<pageGraphics>
<!-- <image x="1.0cm" y="27.3cm" file="/home/tiny/terp/4.2/server/bin/addons/auction/report/images/flagey_head.png"/>-->
- <image x="1.0cm" y="27.3cm" file="addons/auction/report/images/flagey_logo.jpg"/>
<drawRightString x="19.0cm" y="27.6cm"> Vente antiquitée le <xsl:value-of select="date:day-name(catalog/AuctionDate1)"/> &#160;<xsl:value-of select="date:day-in-month(catalog/AuctionDate1)"/>&#160;<xsl:value-of select="date:month-name(catalog/AuctionDate1)"/> &#160;<xsl:value-of select="date:year(catalog/AuctionDate1)"/></drawRightString>-->
- <image x="1.0cm" y="26.1cm" file="flagey_logo.jpg"/>
<drawRightString x="19.0cm" y="26.6cm"> Vente antiquitée le <xsl:value-of select="date:day-name(catalog/AuctionDate1)"/> &#160;<xsl:value-of select="date:day-in-month(catalog/AuctionDate1)"/>&#160;<xsl:value-of select="date:month-name(catalog/AuctionDate1)"/> &#160;<xsl:value-of select="date:year(catalog/AuctionDate1)"/></drawRightString>
<lineMode width="1mm"/>
<setFont name="Helvetica" size="26"/>
<!-- <drawString x="10mm" y="27.8cm">Flagey.com</drawString>-->
@ -39,7 +38,7 @@
<stroke color="#2b24b6"/>
<lineMode width="0.5mm"/>
<lines>1cm 1.6cm 20cm 1.6cm</lines>
<lines>1.0cm 27.3cm 20cm 27.3cm</lines>
<lines>1.0cm 26.1cm 20cm 26.1cm</lines>
<setFont name="Helvetica" size="12"/>
<drawString x="10mm" y="1.0cm">www.flagey.com</drawString>
@ -47,7 +46,7 @@
<drawRightString x="200mm" y="1.0cm">info@flagey.com</drawRightString>
</pageGraphics>
<frame id="column" x1="1cm" y1="1.5cm" width="9.4cm" height="25.5cm"/>
<frame id="column" x1="10.8cm" y1="1.5cm" width="9.4cm" height="25.5cm"/>
<frame id="column" x1="14.8cm" y1="1.5cm" width="9.4cm" height="25.5cm"/>
</pageTemplate>
</template>
<stylesheet>
@ -62,6 +61,7 @@
<paraStyle name="homehead" fontName="Helvetica" fontSize="12" alignment="center"/>
<paraStyle name="artist" fontName="Helvetica-Bold"/>
<paraStyle name="prodtitle" fontName="Helvetica-BoldOblique" fontSize="8"/>
<paraStyle name="P2" rightIndent="13.0" leftIndent="11.0" fontName="Times-Roman" alignment="RIGHT"/>
<blockTableStyle id="infos">
<blockValign value="TOP"/>
<blockTopPadding value="0"/>
@ -92,11 +92,88 @@
<lineStyle kind="LINEBELOW" start="0,0" stop="-1,0"/>
</blockTableStyle>
</stylesheet>
<images>
<image name="flagey_logo.jpg">/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0a
HBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIy
MjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCABjAO0DASIA
AhEBAxEB/8QAGwAAAwADAQEAAAAAAAAAAAAAAAUGAwQHAgH/xABHEAABAwMBAggKBggFBQAAAAAB
AAIDBAURBhIhBxMVMUFRU9EWNWFxc4GSoaKxFCIyN4KRIzM2QnSys8EkUnLw8TRjwtLh/8QAFQEB
AQAAAAAAAAAAAAAAAAAAAAH/xAAUEQEAAAAAAAAAAAAAAAAAAAAA/9oADAMBAAIRAxEAPwDfptuW
RsLRtOPMt3k+q7P4gta1eM4fxfIqlyOtVSPk+q7P4gjk+q7P4gnmD1FeS4DcSAVEJeT6rs/iCOT6
rs/iCdbbesL0N/MgR8n1XZ/EEcn1XZ/EE7LgDgnevo38wygR8n1XZ/EEcn1XZ/EE4fMyN2y44PP5
uhewQRkIEnJ9V2fxBHJ9V2fxBPEIEfJ9V2fxBHJ9V2fxBPEIEfJ9V2fxBHJ9V2fxBPEIEfJ9V2fx
BHJ9V2fxBPEIEfJ9V2fxBHJ9V2fxBPEIEfJ9V2fxBHJ9V2fxBPEIEfJ9V2fxBHJ9V2fxBPEIEfJ9
V2fxBHJ9V2fxBPEIEfJ9V2fxBHJ9V2fxBPEIEMtHUQxPlfHhjGlzjkbgFO1FbJNJlri1o5gCre4+
LKr0L/kVz9VVLavGcP4vkU9qInva4xv2XbOP99SQ2rxnD+L5FUqiJe0W9131dU2Wa5V8UsLGPJjq
HbO9oPX5Up1Vq+osOo57HRwskjpogRLONt7ztNGST51Q6U++O6egj/kaudcIX3l3L0Q/qMQX9OL7
PTxyh1INtoP6kdy9VEd7MJE7Wys6qeV0L/URu9yb23xbT+jC9y1LYd7/AKrNrY2ienGUEdqa9S2O
0UDKGOeVtSXCaaqcXyRuAzsg9C13XSoq7XaauoqaiJ1bMIswSub0dWcKk1BRR11tqIywOa+LaYcf
vg7vcSpCphNPYtMxOGC2ux7kDHXl6qNLT02n6KSSRk0RmlnmcXPc4NLhvPQMBUum55KmxUssrtp7
mAkqH4Yv24of4N39Mqz0p+zdH6MIHSEIQCEIQCEIQCEIQCEIQCEIQCEIQCEIQCEIQa1x8WVXoX/I
rn66BcfFlV6F/wAiufoKW1eM4fxfIqkU3avGcP4vkVSIEWlPvkunoI/5GqH4S7a+DXdXVte2TjWh
mw3eW/Wacn8lcaU++O6egj/kauecIEjm8JdyOA4tiBZtb9k7bRn3oOo0FRBFaIZZpo4o2xjae9wA
CT6uuVKNK000EuTUVW2zoLm42cjyLzHarrWWyIPrmSMLQdiWIObzcymNbW+4fS6evlIFKGMpxEz7
MTmuG4Dzb/Wg6PRAPoIQ7eCwZ/JTOtY2RGwNY0NH0/mHmCp6D/oIP9A+Smtc/rLB/H/2CCf4Yv24
of4N39Mq00mM6cogOcxhRfDF+3FD/Bu/plWWli5umqMt+0IxhBryaqopp69lMJpo6Ehsr2ENbnOO
c9GV8gu1wq4+NpKBuyeZz3uJ+akdY03Iemm2e15ibVSmWqlkadpx6G7ucBM+Dqrqn004qnuEQIEe
3uJ8qCioqq7TXGOjm4lssoLo2O3E9G48xx5ltxXWNtxlt1Q+NtTE7ZIa7IKVahmNPqzSskbsOdNI
04PR9VRuuauWi4Ubi6JxbgNfu69to/8AIoOs9ZJAAGSTzAJUb9an2youBq3ilieYmFmAZngZOzno
HWtHUtVONB10sBIlfA0ZHPguAPuJUBq+F1to9MW6IkQChkmd1Oe5riT8h6kFxb77W3eIS0FJswk7
nuJPz/8Ai3YLxLyJJcpnwtZFJxTwMuIf5v7eRfdGRiPTlCAMfVCiLnVii4PtR8c4jj7oWQ56SCSc
fmPzQP7xqN9it8NVV1Tqmetn/wALHHsgxx9bsDeT1J5Zb/TXOzG4vkbFCwEyPccBuFz7Ttu8LaeS
nq5XB8Ibh2N4yBkeRMbpaS+7WnRFtLmwOLZqojnO/cD6t/rQWNzvtvoLPHcpqh+zMNqCFv1S5ucb
R58BLo7zcqimNVFSCOna0vJdvy0bz5eZR2uaSVmsJImyiSljfFBFEw54tjd2/wDJdKidDyUYg5uH
QFuB05bhBh5SfTQ0s9TsGmqRmOZhyAeoor66rp4Q6liZIXZILsuB6ubCSycVbeCo0F4nZT3BpMtP
G931x1HHlWvoHUJulGKeR2XNaHNPuI9RBQUtkj1BeI4qniqD6E77UkZdkDp6UnfqqB9ykpaWOpke
xxaASOg4ORhU2jKsWjUdXZZDimqRx9ODzDP2m+o5UZri2v0trptdC3FPVHjBjm2h9oesb/UgpZa6
ojoXVIg3gZ2SM49W5K7tq2329zYpRViQ4wWtDQ8nqBycJ0J2VdJFsOAbMMl3+VuMk+oZU22ihvup
zVyRgxU+5jSNw6h6hhA0guT7jY6uR8D4/wBC/G2OfcVJK+r2tZa6oNAA4l/N5ioFBS2rxnD+L5FU
imrV4zh/F8iqXOECLSn3x3T0Ef8AI1c64QfvLuXoh/UYuk6Yhki4VrtWyN2KYQR5ldub9hvSudcI
cDhrytrQQ6CVrWsc05ydtp/sg6pbfFtP6MJbqG2zV9tdTxtDgZhL68YTG2EG20+D+4FtoMNIx0dL
Ex3O1oCmNc/rLB/H/wBgq1S+sKaarmsTYI3SObXAkNGcbkE1wxftxQ/wbv6ZVParpTWXQ0VxqyeK
hiB2RzuJ5gFN8L0Rl1bS1UZa+KOmcxxac4OwRj81v1NukuvB7RU0W9zXxylv+YDII9+fUg9v1U6K
yQXS92+Bzq+bi6ClLMhrel7id5/5Xiw3G96ijfPTuZR0e0Q0RtA3epPOEHSxuWnLNPR7PGUDWF0Q
Izs9O5aOgZI2abZGXBro3FrgdxB8qDHVwC1ai0/9JDamWeoeBI4bxjZ6fWo/hE+825+jH9RiuL3B
U3LVum200D3wwyOe6QDdvI/9Ug4ULA+LWMlxhmjkFSA3Ya4ZGHAn5ILeGOOayRRyjaY+INLcZzkc
ykNaMgltNDE+mcKija6Jjg9rnBpyObPUUzu90rKGzWuOi2RUGaMS7+ZuObyc625dN3GhPGT2iS5M
k+s0seAGjqxhBg0pc4+RKaEyRRujAaXSPAA8uOf3KV4QXUl0raK22hjp6enc5+wxpxJI45LneTuV
U211ZcS3SE7fNMB/ZMLfQ1ccoHg5LTOP75cHD1ndhAt0Tp6Sy250lTvqZztPK29O0wPDLWSyjeaa
N0ZPVsAf2KaUVxgrNpjHASMOHMyDhYZY/oeoaG7xkNfF+jeTzOYTzeo/NByvU+3Bwi3TAHGcfHsO
cM7OSeb3Lo0FvvBhY4XeUZAO5IuErTvE6ikvtK5slPK1pkDTktcHA7/VlWVunZPboJGOBa5gOfUg
lbpoh93n+kV1Y2aTGNqRgJwsum9IQWSuM8U5P1cBgGBg79wVNPMx7Hjb2Ym/rZBzNHUOsnoCTW+o
luV7lnZltOzcAObqA9QAQbl9ZLDFBdKcf4igfxoxzln74/Lf6lQauttHq7RkVdxjWmJomY/qwMrU
c0OaQQCCMEHpCjdR3ar09wdXe3MLtmOpbHA7/tvBI+WEGlY7uyHTskH0hs0wHFsweZnOfWdw8yrL
DRfRbe0vH6ST6zj51yvQNplqrtHCc8VTjbm8sh3kercPUu0NAa0AcwQa9x8WVXoX/Irn66BcfFlV
6F/yK5+gpbV4zh/F8intTHI5pdGWbWNwe3ISK1eM4fxfIqkQSl5tt8u1vFEXwxQh21iLLM+fCmmc
HlwbKJOOJI58yuOV1BCBHbqW6U8kbZOJbEBghgwniEIPj27TSM4z0pVVsurOMbRGBoe0tL9jDh5j
0JshBzCTg9uMk5ldUEvyTkyuPP8A8qwtFurqaBtNUiMwhuMNT9CCTvml6utJfS187HEYwJCClVqs
eoLQ57YwyfaP2p8Ox7l0FCCcprTc5ZTU1dYWTluzlh6OrzKPu/B/c6q4mo4+Sf62WiSU7LfVz+9d
TQglLPpasjhH0o/S6p2Nlmdlu455+jm51q3vXurKS7T0tvqKZ8bHENaGuOyBu6AqKtra2nrnMpgf
r0UrY8dEg3+9vMprQNM10VZNPh9RxpB2t5Ayg0W6/wBebW98WeoMf3J/ZuEy9x7cd9pg6Bw2eMiY
7Iz5MKk4mPP2G/ksVQ2MN2GxB8j/AKrGAc5Qcms1xqaHWMoO22KWrIaD0tcM/kuvOY2WLZe0Oa4b
wVGXOihr9U26Kma0spGNa57R9rZGCfzVqBgAIJm8aWfWMJpamWI9DQ8haNvob5a4hAKaOdo6Xu3f
kMBWqEEybbdrnstrZmwwjmjjGAPMAn1HRw0UAhhbho962Fhq6qKio56uckRQxukdjnIAzgIMyRan
po6uy1sEjGua1rJW5/zB24e8rWst+uF4tFZeZ6WKioIv1LnEkyeQ968VF1juNrdIwbLpXAbOd4wP
77XuQYtAWnk+ymV4/SzOLnEquWrboBT0EUYGMNC2kGtcfFlV6F/yK5+ugXHxZVehf8iufoKW1eM4
fxfIqkUhDcIbdUxzzbRAz9VoyTuIW/4X2/san2W96CgQp/wvt/Y1Pst70eF9v7Gp9lvegoEKf8L7
f2NT7Le9Hhfb+xqfZb3oKBCn/C+39jU+y3vR4X2/san2W96CgQp/wvt/Y1Pst70eF9v7Gp9lvego
EKf8L7f2NT7Le9Hhfb+xqfZb3oKBCn/C+39jU+y3vR4X2/san2W96BzPC5+y+KQxzM3tdjKknUlx
tF0lq2wlzZDl5iHP5x/s+VNPC+39jU+y3vQdX2888NT7Le9B4Go4tnEgqtrqZCB7z3LE64V1dmKh
o3xNeMOlkOXEeU9XkGFl8KrWTk00+f8AQ3vXoattwG6GpH4G96DdtNobQNMjztzv+05NFP8Ahfb+
xqfZb3o8L7f2NT7Le9BQIU/4X2/san2W96PC+39jU+y3vQUCwVlO2qpJIHAOa9paWu5iCk3hfb+x
qfZb3o8L7f2NT7Le9BK63F/koobTb4xSWqNgbxUbS456Tkc/uX3RtnuU0xkrWPZCHbX1xguPXjo8
3Qqg6ttzueCpPnY3vQNXW5owIakfgb3oKADAwF9U/wCF9v7Gp9lvejwvt/Y1Pst70De4+LKr0L/k
Vz9UdXqqhnpJoWxVAdJG5oJaMZIx1qbBBGRzIMFQ90lRIXHJDiPUsaEKqEIQgEIQgEIQgEIQgEIQ
gEIQgEIQgEIQgEIQgEIQgEIQgEIQgEIQgF7jcQCAUIQf/9k=
</image>
</images>
<story>
<para style="P2">
<font color="white"> </font>
</para>
<!--<setNextTemplate name="others"/>-->
<!-- <pageBreak/>-->
<spacer length="0.8cm"/>
<xsl:apply-templates select="catalog/products"/>
</story>
</document>

View File

@ -0,0 +1,96 @@
<?xml version = '1.0' encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
<xsl:variable name="signature" select="//corporate-header/user/signature"/>
<xsl:variable name="title">Open ERP Report</xsl:variable>
<xsl:variable name="leftMargin">1cm</xsl:variable>
<xsl:variable name="rightMargin">1cm</xsl:variable>
<xsl:variable name="topMargin">1cm</xsl:variable>
<xsl:variable name="bottomMargin">1cm</xsl:variable>
<xsl:variable name="pageSize">21cm,29.7cm</xsl:variable>
<xsl:variable name="page_format">a4_letter</xsl:variable>
<xsl:template name="first_page_graphics_corporation">
<!--logo-->
<setFont name="Helvetica" size="14"/>
<fill color="black"/>
<stroke color="black"/>
<drawString x="1cm" y="27.6cm"><xsl:value-of select="//corporate-header/corporation/name"/></drawString>
<lines>1cm 28.4cm 20cm 28.4cm</lines>
<lines>1cm 25.4cm 7cm 25.4cm</lines>
<setFont name="Helvetica" size="10"/>
<drawRightString x="20cm" y="28.5cm"><xsl:value-of select="//corporate-header/corporation/rml_header1"/></drawRightString>
<drawString x="1cm" y="27cm"><xsl:value-of select="//corporate-header/corporation/address/street"/></drawString>
<drawString x="1cm" y="26.5cm">
<xsl:value-of select="//corporate-header/corporation/address/zip"/>
<xsl:text> </xsl:text>
<xsl:value-of select="//corporate-header/corporation/address/city"/>
<xsl:text> - </xsl:text>
<xsl:value-of select="//corporate-header/corporation/address/country"/>
</drawString>
<drawString x="1cm" y="26cm">Phone:</drawString>
<drawRightString x="7cm" y="26cm"><xsl:value-of select="//corporate-header/corporation/address/phone"/></drawRightString>
<drawString x="1cm" y="25.5cm">Mail:</drawString>
<drawRightString x="7cm" y="25.5cm"><xsl:value-of select="//corporate-header/corporation/address/email"/></drawRightString>
<!--page bottom-->
<lines>1.5cm 2.2cm 19.9cm 2.2cm</lines>
<drawCentredString x="10.5cm" y="1.7cm"><xsl:value-of select="//corporate-header/corporation/rml_footer1"/></drawCentredString>
<drawCentredString x="10.5cm" y="1.25cm"><xsl:value-of select="//corporate-header/corporation/rml_footer2"/></drawCentredString>
<drawCentredString x="10.5cm" y="0.8cm">Your contact : <xsl:value-of select="//corporate-header/user/name"/></drawCentredString>
</xsl:template>
<xsl:template name="other_pages_graphics_corporation">
<!--logo-->
<setFont name="Helvetica" size="14"/>
<fill color="black"/>
<stroke color="black"/>
<drawString x="1cm" y="27.6cm"><xsl:value-of select="//corporate-header/corporation/name"/></drawString>
<lines>1cm 25.4cm 20cm 25.4cm</lines>
<!-- <lines>1cm 25.7cm 7cm 25.7cm</lines>-->
<setFont name="Helvetica" size="10"/>
<drawRightString x="1cm" y="27.5cm"><xsl:value-of select="//corporate-header/corporation/rml_header1"/></drawRightString>
<drawString x="1cm" y="27cm"><xsl:value-of select="//corporate-header/corporation/address/street"/></drawString>
<drawString x="1cm" y="26.5cm">
<xsl:value-of select="//corporate-header/corporation/address/zip"/>
<xsl:text> </xsl:text>
<xsl:value-of select="//corporate-header/corporation/address/city"/>
<xsl:text> - </xsl:text>
<xsl:value-of select="//corporate-header/corporation/address/country"/>
</drawString>
<drawString x="1cm" y="26cm">Phone:</drawString>
<drawRightString x="7cm" y="26cm"><xsl:value-of select="//corporate-header/corporation/address/phone"/></drawRightString>
<drawString x="1cm" y="25.5cm">Mail:</drawString>
<drawRightString x="7cm" y="25.5cm"><xsl:value-of select="//corporate-header/corporation/address/email"/></drawRightString>
<!--page bottom-->
<lines>1.5cm 1.2cm 19.9cm 1.2cm</lines>
<drawCentredString x="10.5cm" y="1.7cm"><xsl:value-of select="//corporate-header/corporation/rml_footer1"/></drawCentredString>
<drawCentredString x="10.5cm" y="1.25cm"><xsl:value-of select="//corporate-header/corporation/rml_footer2"/></drawCentredString>
<!-- <drawCentredString x="10.5cm" y="0.8cm">Your contact : <xsl:value-of select="//corporate-header/user/name"/></drawCentredString>-->
</xsl:template>
<xsl:template name="first_page_frames">
<xsl:if test="$page_format='a4_normal'">
<frame id="main" x1="1cm" y1="2.5cm" width="19.0cm" height="22.0cm"/>
</xsl:if>
<xsl:if test="$page_format='a4_letter'">
<frame id="address" x1="11cm" y1="21.5cm" width="6cm" height="4cm"/>
<frame id="main" x1="1cm" y1="2.5cm" width="19.0cm" height="17.5cm"/>
</xsl:if>
</xsl:template>
<xsl:template name="other_pages_frames">
<frame id="main" x1="1cm" y1="2.5cm" width="19.0cm" height="22cm"/>
</xsl:template>
</xsl:stylesheet>

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
<xsl:import href="../../base/report/corporate_defaults.xsl"/>
<xsl:import href="../../base/report/rml_template.xsl"/>
<xsl:import href="corporate_defaults.xsl"/>
<xsl:import href="rml_template.xsl"/>
<xsl:template match="/">
<xsl:call-template name="rml"/>

View File

@ -0,0 +1,395 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# 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 <http://www.gnu.org/licenses/>.
#
##############################################################################
from mx import DateTime
from osv import fields, osv, orm
from tools import config
from tools.translate import _
import ir
import netsvc
import os
import time
import tools
def _type_get(self, cr, uid, context=None):
if not context:
context = {}
obj = self.pool.get('auction.lot.category')
ids = obj.search(cr, uid, [])
res = obj.read(cr, uid, ids, ['name'], context)
res = [(r['name'], r['name']) for r in res]
return res
class report_auction(osv.osv):
"""Auction Report"""
_name = "report.auction"
_description = "Auction's Summary"
_auto = False
_columns = {
'year': fields.char('Year', size=4, readonly=True),
'month':fields.selection([('01','January'), ('02','February'), ('03','March'), ('04','April'),
('05','May'), ('06','June'), ('07','July'), ('08','August'), ('09','September'),
('10','October'), ('11','November'), ('12','December')], 'Month',readonly=True),
'day': fields.char('Day', size=128, readonly=True),
'buyer_login': fields.char('Buyer Login', size=64, readonly=True, select=1),
'buyer':fields.many2one('res.partner', 'Buyer', readonly=True, select=2),
'seller': fields.many2one('res.partner', 'Seller', readonly=True, select=1),
'object':fields.integer('No of objects', readonly=True, select=1),
'total_price':fields.float('Total Adj.', digits=(16, 2), readonly=True, select=2),
'lot_type': fields.selection(_type_get, 'Object category', size=64),
'avg_price':fields.float('Avg Adj.', digits=(16, 2), readonly=True, select=2),
'date': fields.date('Create Date', select=1),
'auction': fields.many2one('auction.dates', 'Auction date', readonly=True, select=1),
'gross_revenue':fields.float('Gross Revenue', readonly=True),
'net_revenue':fields.float('Net Revenue', readonly=True),
'net_margin':fields.float('Net Margin', readonly=True),
'avg_estimation':fields.float('Avg estimation', readonly=True),
'user_id':fields.many2one('res.users', 'User', select=1),
'state': fields.selection((('draft', 'Draft'), ('unsold', 'Unsold'), ('sold', 'Sold')), 'State', readonly=True, select=1),
}
def init(self, cr):
tools.drop_view_if_exists(cr, 'report_auction')
cr.execute('''
create or replace view report_auction as (
select
min(al.id) as id,
al.ach_login as "buyer_login",
ad.auction1 as date,
al.state,
al.create_uid as user_id,
to_char(ad.auction1, 'YYYY') as year,
to_char(ad.auction1, 'MM') as month,
to_char(ad.auction1, 'YYYY-MM-DD') as day,
al.ach_uid as "buyer",
al.lot_type as lot_type,
ade.partner_id as seller,
ad.id as auction,
count(al.id) as "object",
sum(al.obj_price) as "total_price",
(sum(al.obj_price)/count(al.id)) as "avg_price",
sum(al.gross_revenue) as gross_revenue,
sum(al.net_revenue) as net_revenue,
avg(al.net_margin) as net_margin,
sum(al.lot_est1+al.lot_est2)/2 as avg_estimation
from
auction_lots al,
auction_dates ad,
auction_deposit ade
where
ad.id=al.auction_id and ade.id=al.bord_vnd_id
group by
ad.auction1,
al.ach_uid,
ad.id,
al.ach_login,
ade.partner_id,
al.state,
al.create_uid,
al.lot_type
)
''')
report_auction()
#==========================
#Others Report for Dashboard (Employee & Manager)
#==========================
class report_auction_object_date(osv.osv):
_name = "report.auction.object.date"
_description = "Objects per day"
_auto = False
_columns = {
'obj_num': fields.integer('# of Objects'),
'name': fields.date('Created date', select=2),
'month': fields.date('Month', select=1),
'user_id':fields.many2one('res.users', 'User',select=1),
}
#l.create_uid as user,
def init(self, cr):
cr.execute("""create or replace view report_auction_object_date as
(select
min(l.id) as id,
to_char(l.create_date, 'YYYY-MM-DD') as name,
to_char(l.create_date, 'YYYY-MM-01') as month,
count(l.obj_num) as obj_num,
l.create_uid as user_id
from
auction_lots l
group by
to_char(l.create_date, 'YYYY-MM-DD'),
to_char(l.create_date, 'YYYY-MM-01'),
l.create_uid
)
""")
report_auction_object_date()
class report_auction_estimation_adj_category(osv.osv):
_name = "report.auction.estimation.adj.category"
_description = "comparaison estimate/adjudication "
_auto = False
_rec_name='date'
_columns = {
'lot_est1': fields.float('Minimum Estimation',select=2),
'lot_est2': fields.float('Maximum Estimation',select=2),
# 'obj_price': fields.float('Adjudication price'),
'date': fields.date('Date', readonly=True,select=1),
'lot_type': fields.selection(_type_get, 'Object Type', size=64),
'adj_total': fields.float('Total Adjudication',select=2),
'user_id':fields.many2one('res.users', 'User', select=1)
}
def init(self, cr):
cr.execute("""
create or replace view report_auction_estimation_adj_category as (
select
min(l.id) as id,
to_char(l.create_date, 'YYYY-MM-01') as date,
l.lot_type as lot_type,
sum(l.lot_est1) as lot_est1,
sum(l.lot_est2) as lot_est2,
sum(l.obj_price) as adj_total,
l.create_uid as user_id
from
auction_lots l,auction_dates m
where
l.auction_id=m.id and l.obj_price >0
group by
to_char(l.create_date, 'YYYY-MM-01'),lot_type,l.create_uid
)
""")
report_auction_estimation_adj_category()
class report_auction_adjudication(osv.osv):
_name = "report.auction.adjudication"
_description = "report_auction_adjudication"
_auto = False
_columns = {
'name': fields.many2one('auction.dates','Auction date',readonly=True,select=1),
'state': fields.selection((('draft','Draft'),('close','Closed')),'Status', select=1),
'adj_total': fields.float('Total Adjudication'),
'date': fields.date('Date', readonly=True,select=1),
'user_id':fields.many2one('res.users', 'User',select=1)
}
def init(self, cr):
cr.execute("""
create or replace view report_auction_adjudication as (
select
l.id as id,
l.id as name,
sum(m.obj_price) as adj_total,
to_char(l.create_date, 'YYYY-MM-01') as date,
l.create_uid as user_id,
l.state
from
auction_dates l ,auction_lots m
where
m.auction_id=l.id
group by
l.id,l.state,l.name,l.create_uid,to_char(l.create_date, 'YYYY-MM-01')
)
""")
report_auction_adjudication()
class report_attendance(osv.osv):
_name="report.attendance"
_description = "Report Sign In/Out"
_auto = False
#_rec_name='date'
_columns = {
'name': fields.date('Date', readonly=True,select=1),
'employee_id' : fields.many2one('hr.employee', 'Employee', select=1, readonly=True),
'total_attendance': fields.float('Total', readonly=True),
}
def init(self, cr):
cr.execute("""CREATE OR REPLACE VIEW report_attendance AS
SELECT
id,
name,
employee_id,
CASE WHEN SUM(total_attendance) < 0
THEN (SUM(total_attendance) +
CASE WHEN current_date <> name
THEN 1440
ELSE (EXTRACT(hour FROM current_time) * 60) + EXTRACT(minute FROM current_time)
END
)
ELSE SUM(total_attendance)
END /60 as total_attendance
FROM (
SELECT
max(a.id) as id,
a.name::date as name,
a.employee_id,
SUM(((EXTRACT(hour FROM a.name) * 60) + EXTRACT(minute FROM a.name)) * (CASE WHEN a.action = 'sign_in' THEN -1 ELSE 1 END)) as total_attendance
FROM hr_attendance a
where name > current_date + interval '-1 day'
GROUP BY a.name::date, a.employee_id
) AS fs
GROUP BY name,fs.id,employee_id
""")
report_attendance()
class report_deposit_border(osv.osv):
_name="report.deposit.border"
_description = "Report deposit border"
_auto = False
_rec_name='bord'
_columns = {
'bord': fields.char('Depositer Inventory', size=64, required=True),
'seller': fields.many2one('res.partner','Seller',select=1),
'moy_est' : fields.float('Avg. Est', select=1, readonly=True),
'total_marge': fields.float('Total margin', readonly=True),
'nb_obj':fields.float('# of objects', readonly=True),
}
def init(self, cr):
cr.execute("""CREATE OR REPLACE VIEW report_deposit_border AS
SELECT
min(al.id) as id,
ab.partner_id as seller,
ab.name as bord,
COUNT(al.id) as nb_obj,
SUM((al.lot_est1 + al.lot_est2)/2) as moy_est,
SUM(al.net_revenue)/(count(ad.id)) as total_marge
FROM
auction_lots al,auction_deposit ab,auction_dates ad
WHERE
ad.id=al.auction_id
and al.bord_vnd_id=ab.id
GROUP BY
ab.name,ab.partner_id""")
report_deposit_border()
class report_object_encoded(osv.osv):
_name = "report.object.encoded"
_description = "Object encoded"
_auto = False
_columns = {
'state': fields.selection((('draft','Draft'),('unsold','Unsold'),('paid','Paid'),('invoiced','Invoiced')),'Status', required=True,select=1),
'user_id':fields.many2one('res.users', 'User', select=1),
'estimation': fields.float('Estimation',select=2),
'date': fields.date('Create Date', required=True),
# 'gross_revenue':fields.float('Gross revenue',readonly=True, select=2),
# 'net_revenue':fields.float('Net revenue',readonly=True, select=2),
# 'obj_margin':fields.float('Net margin', readonly=True, select=2),
'obj_ret':fields.integer('# obj ret', readonly=True, select=2),
# 'adj':fields.integer('Adj.', readonly=True, select=2),
'obj_num':fields.integer('# of Encoded obj.', readonly=True, select=2),
}
def init(self, cr):
cr.execute('''create or replace view report_object_encoded as
(select min(al.id) as id,
to_char(al.create_date, 'YYYY-MM-DD') as date,
al.state as state,
al.create_uid as user_id,
(SELECT count(1) FROM auction_lots WHERE obj_ret>0) as obj_ret,
sum((100* al.lot_est1)/al.obj_price) as estimation,
COUNT(al.product_id) as obj_num
from auction_lots al
where al.obj_price>0 and state='draft'
group by to_char(al.create_date, 'YYYY-MM-DD'), al.state, al.create_uid)
''')
report_object_encoded()
class report_object_encoded_manager(osv.osv):
_name = "report.object.encoded.manager"
_description = "Object encoded"
_auto = False
_columns = {
'user_id':fields.many2one('res.users', 'User', select=True),
'estimation': fields.float('Estimation',select=True),
'date': fields.date('Create Date', required=True),
'gross_revenue':fields.float('Gross revenue',readonly=True, select=True),
'net_revenue':fields.float('Net revenue',readonly=True, select=True),
'obj_margin':fields.float('Net margin', readonly=True, select=True),
'obj_ret':fields.integer('# obj ret', readonly=True, select=True),
'adj':fields.integer('Adj.', readonly=True, select=True),
'obj_num':fields.integer('# of Encoded obj.', readonly=True, select=True),
}
def init(self, cr):
cr.execute('''create or replace view report_object_encoded_manager as
(select
min(al.id) as id,
to_char(al.create_date, 'YYYY-MM-DD') as date,
al.create_uid as user_id,
sum((100*lot_est1)/obj_price) as estimation,
(SELECT count(1) FROM auction_lots WHERE obj_ret>0) as obj_ret,
SUM(al.gross_revenue) as "gross_revenue",
SUM(al.net_revenue) as "net_revenue",
SUM(al.net_revenue)/count(al.id) as "obj_margin",
COUNT(al.product_id) as obj_num,
SUM(al.obj_price) as "adj"
from auction_lots al
where al.obj_price>0
group by to_char(al.create_date, 'YYYY-MM-DD'), al.create_uid)
''')
report_object_encoded_manager()
class report_unclassified_objects(osv.osv):
_name = "report.unclassified.objects"
_description = "Unclassified objects "
_auto = False
_columns = {
'name': fields.char('Short Description',size=64, required=True),
'obj_num': fields.integer('Catalog Number'),
'obj_price': fields.float('Adjudication price'),
'lot_num': fields.integer('List Number', required=True, select=1 ),
'state': fields.selection((('draft','Draft'),('unsold','Unsold'),('paid','Paid'),('sold','Sold')),'Status', required=True, readonly=True),
'obj_comm': fields.boolean('Commission'),
'bord_vnd_id': fields.many2one('auction.deposit', 'Depositer Inventory', required=True),
'ach_login': fields.char('Buyer Username',size=64),
'lot_est1': fields.float('Minimum Estimation'),
'lot_est2': fields.float('Maximum Estimation'),
'lot_type': fields.selection(_type_get, 'Object category', size=64),
'auction': fields.many2one('auction.dates', 'Auction date',readonly=True, select=1),
}
def init(self, cr):
cr.execute("""create or replace view report_unclassified_objects as
(select
min(al.id) as id,
al.name as name,
al.obj_price as obj_price,
al.obj_num as obj_num,
al.lot_num as lot_num,
al.state as state,
al.obj_comm as obj_comm,
al.bord_vnd_id as bord_vnd_id,
al.ach_login as ach_login,
al.lot_est1 as lot_est1,
al.lot_est2 as lot_est2,
al.lot_type as lot_type,
al.auction_id as auction
from auction_lots al,auction_lot_category ac
where (al.lot_type=ac.name) AND (ac.aie_categ='41') AND (al.auction_id is null)
group by al.obj_price,al.obj_num, al.lot_num, al.state, al.obj_comm,al.bord_vnd_id,al.ach_login,al.lot_est1,al.lot_est2,al.lot_type,al.auction_id,al.name)
""")
report_unclassified_objects()

View File

@ -0,0 +1,668 @@
<?xml version="1.0"?>
<openerp>
<data>
<record model="ir.ui.view" id="view_report_auction_tree">
<field name="name">Auction's Summary</field>
<field name="model">report.auction</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Auction Summary tree view">
<field name="date" invisible="1"/>
<field name="user_id" invisible="1"/>
<field name="year" invisible="1"/>
<field name="day" invisible="1"/>
<field name="month" invisible="1"/>
<field name="auction" select="1" invisible="1"/>
<field name="buyer_login" select="1" invisible="1"/>
<field name="buyer" select="1" invisible="1"/>
<field name="seller" invisible="1"/>
<field name="object" select="1" invisible="1"/>
<field name="state" select="1" invisible="1"/>
<field name="lot_type" select="1" invisible="1"/>
<field name="avg_price" select="1"/>
<field name="gross_revenue" />
<field name="net_revenue" />
<field name="net_margin" />
<field name="total_price" select="1"/>
</tree>
</field>
</record>
<record id="view_report_auction_search" model="ir.ui.view">
<field name="name">report.auction.search</field>
<field name="model">report.auction</field>
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Auction Summary">
<group>
<filter icon="terp-go-year" string=" 365 Days "
domain="[('date','&lt;=', time.strftime('%%Y-%%m-%%d')),('date','&gt;',(datetime.date.today()-datetime.timedelta(days=365)).strftime('%%Y-%%m-%%d'))]"
help="Auction in last 365 days"/>
<filter icon="terp-go-month" string=" 30 Days "
name="month"
domain="[('date','&lt;=', time.strftime('%%Y-%%m-%%d')), ('date','&gt;',(datetime.date.today()-datetime.timedelta(days=30)).strftime('%%Y-%%m-%%d'))]"
help="Auction in last 30 days"/>
<filter icon="terp-go-week"
string=" 7 Days "
separator="1"
domain="[('date','&lt;=', time.strftime('%%Y-%%m-%%d')), ('date','&gt;',(datetime.date.today()-datetime.timedelta(days=7)).strftime('%%Y-%%m-%%d'))]"
help="Auction during last 7 days"/>
<separator orientation="vertical"/>
<filter icon="terp-document-new"
string="Draft"
domain="[('state','=','draft')]"/>
<filter icon="terp-dolar"
string="Sold"
domain="[('state','=', 'sold')]"/>
<separator orientation="vertical"/>
<field name="auction"/>
<field name="user_id" widget="selection">
<filter icon="terp-personal"
string="My Auction"
help="My Auction"
domain="[('user_id','=',uid)]"/>
</field>
<field name="object"/>
<field name="state"/>
<field name="lot_type"/>
</group>
<newline/>
<group expand="1" string="Group By..." colspan="10" col="12">
<filter string="User" icon="terp-personal" name="User" context="{'group_by':'user_id'}"/>
<filter string="Buyer" icon="terp-personal" name="buyer" context="{'group_by':'buyer'}"/>
<filter string="Seller" icon="terp-personal" name="seller" context="{'group_by':'seller'}"/>
<separator orientation="vertical"/>
<filter string="Auction" icon="terp-project" name="auction" context="{'group_by':'auction'}"/>
<separator orientation="vertical" />
<filter string="State" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
<filter string="Type"
icon="terp-stock_symbol-selection"
help="Object Category" domain="[]"
context="{'group_by':'lot_type'}"/>
<separator orientation="vertical"/>
<filter string="Day" icon="terp-go-today" context="{'group_by':'day'}"/>
<filter string="Month" icon="terp-go-month" context="{'group_by':'month'}"/>
<filter string="Year" icon="terp-go-year" context="{'group_by':'year'}"/>
</group>
</search>
</field>
</record>
<record id="view_report_auction_graph" model="ir.ui.view">
<field name="name">report.auction.graph</field>
<field name="model">report.auction</field>
<field name="type">graph</field>
<field name="arch" type="xml">
<graph string="Auction's Summary" type="bar">
<field name="auction"/>
<field name="total_price" operator="+"/>
<field name="avg_estimation" operator="+"/>
<field name="avg_price" operator="+"/>
<field name="gross_revenue" operator="+"/>
<field name="net_revenue" operator="+"/>
<field name="net_margin" operator="+"/>
</graph>
</field>
</record>
<record model="ir.actions.act_window" id="action_report_auction">
<field name="name">Auction's Summary</field>
<field name="res_model">report.auction</field>
<field name="view_type">form</field>
<field name="view_mode">tree,graph</field>
<!-- <field name="domain">[('date','ilike',time.strftime('%Y-%m'))]</field>-->
<field name="search_view_id" ref="view_report_auction_search"/>
<field name="context">{'search_default_month':1}</field>
</record>
<menuitem name="Auction" id="auction_report_auction_menu" parent="auction.auction_report_menu"/>
<menuitem name="Auction's Summary" action="action_report_auction" id="menu_report_auction" parent="auction_report_auction_menu"/>
<!--end : creating buyer Reporting menu for the buyer by pmo-->
<!-- Employee and Manager Report -->
<record model="ir.ui.view" id="view_report_unplanned_object_tree">
<field name="name">Unplanned objects</field>
<field name="model">report.unplanned.object</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Unplanned Objects">
<field name="depos" select="1"/>
<field name="lot" select="1"/>
<field name="product_l" select="1"/>
<field name="lot_est1_l" select="2"/>
<field name="lot_est2_l" select="1"/>
<field name="artist_id_l" select="1"/>
<field name="name_l" select="1"/>
<field name="obj_desc_l" select="2"/>
</tree>
</field>
</record>
<record model="ir.ui.view" id="view_report_unplanned_object_form">
<field name="name">Unplanned objects</field>
<field name="model">report.unplanned.object</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Unplanned Objects">
<field name="depos" select="1"/>
<field name="lot" select="1"/>
<field name="product_l" select="1"/>
<field name="lot_est1_l" select="1"/>
<field name="lot_est2_l" select="1"/>
<field name="artist_id_l" select="1"/>
<field name="obj_desc_l" select="1"/>
<field name="name_l" select="1"/>
</form>
</field>
</record>
=============================
estimation.adj.category
==============================
<record model="ir.ui.view" id="view_report_auction_estimation_adj_category_form">
<field name="name">report.auction.estimation.adj.category.form</field>
<field name="model">report.auction.estimation.adj.category</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Min est/Adj/Max est">
<!--field name="date" select="1"/-->
<field name="lot_type" select="1"/>
<field name="user_id" select="1"/>
<field name="lot_est1" select="2"/>
<field name="lot_est2" select="2"/>
<field name="adj_total" select="2"/>
<field name="date" select="1"/>
</form>
</field>
</record>
<record model="ir.ui.view" id="view_report_auction_estimation_adj_category_tree">
<field name="name">report.auction.estimation.adj.category.tree</field>
<field name="model">report.auction.estimation.adj.category</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Min est/Adj/Max est">
<!--field name="date" select="1"/-->
<field name="user_id" select="1"/>
<field name="lot_type" select="1"/>
<field name="lot_est1" select="1"/>
<field name="lot_est2" select="1"/>
<field name="adj_total" select="1"/>
<field name="date" select="1"/>
</tree>
</field>
</record>
<record model="ir.ui.view" id="view_report_auction_estimation_adj_category_graph">
<field name="name">report.auction.estimation.adj.category.graph</field>
<field name="model">report.auction.estimation.adj.category</field>
<field name="type">graph</field>
<field name="arch" type="xml">
<graph string="Min est/Adj/Max est" orientation="vertical" type="bar">
<!--field name="date" operator="+"/-->
<field name="lot_type" select="1"/>
<field name="lot_est1" operator="+"/>
<field name="adj_total" operator="+"/>
<field name="lot_est2" operator="+"/>
<field name="user_id" group="True"/>
</graph>
</field>
</record>
<record model="ir.actions.act_window" id="action_report_auction_estimation_adj_category_manager_tree">
<field name="name">Min est/Adj/Max est</field>
<field name="res_model">report.auction.estimation.adj.category</field>
<field name="view_type">form</field>
<field name="view_mode">graph,tree</field>
<field name="domain">[('date','like',time.strftime('%Y-%m'))]</field>
</record>
<record model="ir.actions.act_window" id="action_report_auction_estimation_adj_category_member_tree">
<field name="name">Min est/Adj/Max est</field>
<field name="res_model">report.auction.estimation.adj.category</field>
<field name="view_type">form</field>
<field name="view_mode">graph,tree</field>
<field name="domain">[('date','like',time.strftime('%Y-%m')),('user_id','=',uid)]</field>
</record>
<menuitem name="Employees" id="auction_report_employees_menu" parent="auction_report_menu"/>
<menuitem name="Comparison of estimations" action="action_report_auction_estimation_adj_category_member_tree" id="menu_report_auction_estimation_adj_category_member" parent="auction_report_employees_menu"/>
<menuitem name="Manager" id="auction_report_manager_menu" parent="auction_report_menu"/>
<menuitem name="Comparison of estimations" action="action_report_auction_estimation_adj_category_manager_tree" id="menu_report_auction_estimation_adj_category_manager" parent="auction_report_manager_menu"/>
<!--=============================
sign in sign out report by user
==============================
<record model="ir.ui.view" id="view_report_auction_sign_in_out_tree">
<field name="name">report.auction.user.pointing.tree</field>
<field name="model">report.auction.user.pointing</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Summary pointing by user ">
<field name="user_id" select="1"/>
<field name="total_timesheet" widget="float_time"/>
</tree>
</field>
</record>
<record model="ir.ui.view" id="view_report_auction_sign_in_out_graph">
<field name="name">report.auction.user.pointing.graph</field>
<field name="model">report.auction.user.pointing</field>
<field name="type">graph</field>
<field name="arch" type="xml">
<graph string="Summary pointing by user " orientation="vertical" type="bar">
<field name="user_id" select="1"/>
<field name="total_timesheet" />
</graph>
</field>
</record>
<record model="ir.actions.act_window" id="action_report_auction_sign_in_out_member_tree">
<field name="res_model">report.auction.user.pointing</field>
<field name="view_type">form</field>
<field name="view_mode">tree,graph</field>
</record>
<record model="ir.actions.act_window" id="action_report_auction_sign_in_out_manager_tree">
<field name="res_model">report.auction.user.pointing</field>
<field name="view_type">form</field>
<field name="view_mode">tree,graph</field>
</record>
<menuitem name="Summury of Sign_in Sign_out" action="action_report_auction_sign_in_out_member_tree" id="menu_report_auction_sign_in_out_member_tree" parent="auction_report_manager_menu"/>
<menuitem name="Summury of Sign_in Sign_out" action="action_report_auction_sign_in_out_manager_tree" id="menu_report_auction_sign_in_out_manager_tree" parent="auction_report_manager_menu"/>
-->
<record model="ir.ui.view" id="view_report_auction_sign_in_out_tree1">
<field name="name">report attendance</field>
<field name="model">report.attendance</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="User's pointing">
<field name="employee_id" select="1"/>
<field name="name" select="1"/>
<field name="total_attendance" select="1"/>
</tree>
</field>
</record>
<record model="ir.ui.view" id="view_report_auction_sign_in_out_graph1">
<field name="name">Graph attendance</field>
<field name="model">report.attendance</field>
<field name="type">graph</field>
<field name="arch" type="xml">
<graph string="User's pointing" orientation="vertical" type="bar">
<field name="employee_id" select="1"/>
<field name="total_attendance" operator="+"/>
<field name="name" select="1"/>
</graph>
</field>
</record>
<record model="ir.actions.act_window" id="action_report_auction_sign_in_out_member_tree1">
<field name="res_model">report.attendance</field>
<field name="view_type">form</field>
<field name="view_mode">tree,graph</field>
<field name="domain"> [('name','=',time.strftime('%Y-%m-%d')),('employee_id','=',uid)]</field>
<!--<field name="domain"> [('name','ilike',time.strftime('%Y-%m'))]</field>-->
</record>
<menuitem name="Attendance" action="action_report_auction_sign_in_out_member_tree1" id="menu_report_auction_sign_in_out_member_tree1" parent="auction_report_employees_menu"/>
<record model="ir.actions.act_window" id="action_report_auction_sign_in_out_manager_tree1">
<field name="res_model">report.attendance</field>
<field name="view_type">form</field>
<field name="view_mode">tree,graph</field>
<field name="domain"> [('name','=',time.strftime('%Y-%m-%d'))]</field>
</record>
<menuitem name="Attendance" action="action_report_auction_sign_in_out_manager_tree1" id="menu_report_auction_sign_in_out_manager_tree1" parent="auction_report_manager_menu"/>
==============================
My Latest Objects
==============================
<record model="ir.actions.act_window" id="action_report_latest_objects_tree">
<field name="res_model">auction.lots</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="domain">[('create_uid','=',uid)]</field>
</record>
<record model="ir.actions.act_window" id="action_report_latest_objects_manager_tree">
<field name="res_model">auction.lots</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="limit" eval="80"/>
</record>
=============================
My Latest Deposit
==============================
<record model="ir.actions.act_window" id="action_report_latest_doposit_tree">
<field name="res_model">auction.deposit</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="domain">[('create_uid','=',uid)]</field>
</record>
<menuitem name="My Latest Deposits" action="action_report_latest_doposit_tree" id="menu_report_latest_doposit_tree" parent="auction_report_employees_menu"/>
<record model="ir.actions.act_window" id="action_report_latest_doposit_manager_tree">
<field name="res_model">auction.deposit</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
</record>
<menuitem name="Latest Deposits" action="action_report_latest_doposit_manager_tree" id="menu_report_latest_doposit_tree_manager" parent="auction_report_manager_menu"/>
=============================
Objects per Day
==============================
<record model="ir.ui.view" id="view_report_auction_object_date_tree">
<field name="name">Objects by date</field>
<field name="model">report.auction.object.date</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Objects per Day">
<field name="month" select="1" />
<field name="user_id" select="1"/>
<field name="obj_num"/>
<field name="name" />
</tree>
</field>
</record>
<record model="ir.ui.view" id="view_report_auction_object_date_form">
<field name="name">Object date</field>
<field name="model">report.auction.object.date</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Objects per Day">
<field name="user_id" />
<field name="name" select="1"/>
<field name="obj_num" />
<field name="month" select="1"/>
</form>
</field>
</record>
<record model="ir.ui.view" id="view_report_auction_object_date_graph">
<field name="name">report.auction.object.date.graph</field>
<field name="model">report.auction.object.date</field>
<field name="type">graph</field>
<field name="arch" type="xml">
<graph string="Objects per day" type="bar">
<field name="name" select="1"/>
<field name="obj_num" operator="+"/>
<field name="user_id" group="True"/>
</graph>
</field>
</record>
<record model="ir.actions.act_window" id="action_report_auction_object_date_tree_my">
<field name="res_model">report.auction.object.date</field>
<field name="view_type">form</field>
<field name="view_mode">graph,tree</field>
<field name="domain">[('user_id','=',uid),('month','=',time.strftime('%Y-%m-01'))]</field>
</record>
<record model="ir.actions.act_window" id="action_report_auction_object_date_tree">
<field name="res_model">report.auction.object.date</field>
<field name="view_type">form</field>
<field name="view_mode">graph,tree</field>
<field name="domain">[('month','=',time.strftime('%Y-%m-01'))]</field>
</record>
<menuitem
name="Encoded Objects Per Day"
action="action_report_auction_object_date_tree"
id="menu_report_auction_object_date_tree"
parent="auction_report_manager_menu"/>
<menuitem
name="My Encoded Objects Per Day"
action="action_report_auction_object_date_tree_my"
id="menu_report_auction_object_date_tree1_my"
parent="auction_report_employees_menu"/>
<record model="ir.actions.act_window" id="view_report_object_by_auction">
<field name="name">Detailed lots</field>
<field name="res_model">auction.lots</field>
<field name="view_type">form</field>
<field name="domain">[('auction_id','=', active_id)]</field>
<field name="limit" eval="2000"/>
</record>
<record model="ir.values" id="ir_open_auction_lots">
<field name="key2">tree_but_open</field>
<field name="model">auction.dates</field>
<field name="name">Open auction</field>
<field name="value" eval="'ir.actions.act_window,%d'%view_report_object_by_auction"/>
<field name="object" eval="True"/>
</record>
<record model="ir.actions.act_window" id="auction_lots_open">
<field name="name">Simplified lots for adjudication</field>
<field name="res_model">auction.lots</field>
<field name="view_type">form</field>
<field name="domain">[('auction_id','=',active_id)]</field>
<field name="limit" eval="2000"/>
</record>
<record model="ir.values" id="ir_open_auction_lots_adj">
<field name="key2">tree_but_action</field>
<field name="model">auction.dates</field>
<field name="name">Open lots for adjudication</field>
<field name="value" eval="'ir.actions.act_window,%d'%auction_lots_open"/>
<field name="object" eval="True"/>
</record>
<record model="ir.actions.act_window" id="action_report_object_by_auction">
<field name="name">Auction dates</field>
<field name="res_model">auction.dates</field>
<field name="view_type">tree</field>
<field name="domain">[('state','=', 'draft')]</field>
</record>
<menuitem name="Objects by Auction"
parent="auction_objects_menu"
id="menu_auction_dates_next_by_auction"
action="action_report_object_by_auction" sequence="11"/>
=============================
Auction adjudication
==============================
<record model="ir.ui.view" id="view_report_auction_adjudication_tree">
<field name="name">report.auction.adjudication.tree</field>
<field name="model">report.auction.adjudication</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Total adjudication">
<field name="name" select="1"/>
<field name="adj_total" select="1"/>
<field name="state" select="1"/>
</tree>
</field>
</record>
<record model="ir.ui.view" id="view_report_auction_adjudication_graph">
<field name="name">report.auction.adjudication.graph</field>
<field name="model">report.auction.adjudication</field>
<field name="type">graph</field>
<field name="arch" type="xml">
<graph string="Total adjudication" type="bar">
<field name="name" select="1"/>
<field name="adj_total" select="1" />
<field name="user_id" group="True"/>
</graph>
</field>
</record>
<record model="ir.actions.act_window" id="action_report_auction_adjudication_tree">
<field name="res_model">report.auction.adjudication</field>
<field name="view_type">form</field>
<field name="view_mode">graph,tree</field>
</record>
<menuitem name="Adjudication by Auction" action="action_report_auction_adjudication_tree" id="menu_report_auction_adjudication_tree" parent="auction_report_manager_menu"/>
<record model="ir.ui.view" id="view_auction_deposit_tree">
<field name="name">Depositer's statistics</field>
<field name="model">report.deposit.border</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Depositer's statistics">
<field name="bord" select="1"/>
<field name="seller" select="1"/>
<field name="moy_est" select="1"/>
<field name="total_marge" select="1"/>
<field name="nb_obj" select="1"/>
</tree>
</field>
</record>
<record model="ir.actions.act_window" id="menu_view_auction_deposit_tree">
<field name="res_model">report.deposit.border</field>
<field name="view_type">form</field>
<field name="view_mode">tree</field>
</record>
<menuitem name="Depositer's Statistics" action="menu_view_auction_deposit_tree" id="menu_report_deposit_tree_m" parent="auction_report_manager_menu"/>
<menuitem name="Depositer's Statistics" action="menu_view_auction_deposit_tree" id="menu_report_deposit_tree_member" parent="auction_report_employees_menu"/>
=============================
Object encoded
==============================
<record model="ir.ui.view" id="view_report_object_encoded_form">
<field name="name">report.object.encoded.form</field>
<field name="model">report.object.encoded</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Objects statistics">
<field name="date" select="1"/>
<field name="state" select="1"/>
<field name="user_id" select="1"/>
<field name="estimation" select="2"/>
<field name="obj_ret" select="2"/>
<field name="obj_num" select="2" sum="# objects"/>
</form>
</field>
</record>
<record model="ir.ui.view" id="view_report_object_encoded_tree">
<field name="name">report.object.encoded.tree</field>
<field name="model">report.object.encoded</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Objects statistics">
<field name="date" select="1"/>
<field name="state" select="1"/>
<field name="user_id" select="1"/>
<field name="estimation"/>
<field name="obj_ret"/>
<field name="obj_num"/>
</tree>
</field>
</record>
<!-- <record model="ir.ui.view" id="view_report_object_encoded_tree">
<field name="name">report.object.encoded.tree</field>
<field name="model">report.object.encoded</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Objects statistics" >
<field name="date" select="1"/>
<field name="state" select="1"/>
<field name="user_id" select="1"/>
<field name="estimation" />
<field name="obj_ret" />
<field name="obj_num" />
</tree>
</field>
</record>
-->
<record model="ir.ui.view" id="view_report_object_encoded_graph">
<field name="name">report.object.encoded.graph</field>
<field name="model">report.object.encoded</field>
<field name="type">graph</field>
<field name="arch" type="xml">
<graph string="Objects statistics" type="bar">
<field name="user_id" select="1"/>
<field name="estimation" operator="+" />
<field name="obj_ret" operator="+" />
<field name="obj_num" operator="+" />
</graph>
</field>
</record>
<record model="ir.actions.act_window" id="action_report_object_encoded_member_tree">
<field name="res_model">report.object.encoded</field>
<field name="view_type">form</field>
<field name="view_mode">tree</field>
<field name="domain"> [('user_id','=',uid),('date','ilike',time.strftime('%Y-%m'))]</field>
</record>
<record model="ir.ui.view" id="view_report_object_encoded_manager_tree">
<field name="name">report.object.encoded.tree</field>
<field name="model">report.object.encoded.manager</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Objects statistics">
<field name="user_id" select="1"/>
<field name="estimation" />
<field name="obj_ret" />
<field name="obj_num" sum="# objects" select="1"/>
<field name="adj" sum="Total adj."/>
<field name="obj_margin" />
<field name="net_revenue" sum="Total net rev."/>
<field name="gross_revenue" sum="Total gross rev."/>
<field name="date" select="1"/>
</tree>
</field>
</record>
<record model="ir.ui.view" id="view_report_object_encoded_manager_graph">
<field name="name">report.object.encoded.graph</field>
<field name="model">report.object.encoded.manager</field>
<field name="type">graph</field>
<field name="arch" type="xml">
<graph string="Object statistic" type="bar">
<field name="user_id" select="1"/>
<field name="obj_ret" operator="+" />
<field name="obj_num" operator="+" />
<field name="obj_margin" operator="+" />
<field name="net_revenue" operator="+" />
<field name="gross_revenue" operator="+" />
</graph>
</field>
</record>
<record model="ir.actions.act_window" id="action_report_object_encoded_manager_tree">
<field name="res_model">report.object.encoded.manager</field>
<field name="view_type">form</field>
<field name="view_mode">tree</field>
<field name="domain">[('date','ilike',time.strftime('%Y-%m'))]</field>
</record>
<record model="ir.ui.view" id="view_report_unclassified_objects">
<field name="name">report.unclassified.objects</field>
<field name="model">report.unclassified.objects</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Unclassified objects">
<field name="obj_num" string="Ref" select="1"/>
<field name="name" select="1"/>
<field name="ach_login"/>
<field name="obj_price"/>
<field name="state" select="1"/>
<field name="obj_comm"/>
<field name="bord_vnd_id"/>
<field name="lot_num"/>
<field name="lot_est1"/>
<field name="lot_est2"/>
<field name="lot_type" select="1"/>
<field name="auction"/>
</tree>
</field>
</record>
</data>
</openerp>

View File

@ -0,0 +1,70 @@
<?xml version = '1.0' encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
<xsl:template name="first_page_graphics_report"/>
<xsl:template name="other_pages_graphics_report"/>
<!--
<xsl:template name="first_page_graphics_corporation"/>
<xsl:template name="other_pages_graphics_corporation"/>
<xsl:template name="first_page_frames"/>
<xsl:template name="other_pages_frames"/>
-->
<xsl:template name="rml">
<document>
<template author="Generated by OpenERP, Fabien Pinckaers">
<xsl:attribute name="pageSize">
<xsl:value-of select="$pageSize"/>
</xsl:attribute>
<xsl:attribute name="leftMargin">
<xsl:value-of select="$leftMargin"/>
</xsl:attribute>
<xsl:attribute name="rightMargin">
<xsl:value-of select="$rightMargin"/>
</xsl:attribute>
<xsl:attribute name="topMargin">
<xsl:value-of select="$topMargin"/>
</xsl:attribute>
<xsl:attribute name="bottomMargin">
<xsl:value-of select="$bottomMargin"/>
</xsl:attribute>
<xsl:attribute name="title">
<xsl:value-of select="$title"/>
</xsl:attribute>
<pageTemplate id="first_page">
<pageGraphics>
<xsl:call-template name="first_page_graphics_corporation"/>
<xsl:call-template name="first_page_graphics_report"/>
</pageGraphics>
<xsl:call-template name="first_page_frames"/>
</pageTemplate>
<pageTemplate id="other_pages">
<pageGraphics>
<xsl:call-template name="other_pages_graphics_corporation"/>
<xsl:call-template name="other_pages_graphics_report"/>
</pageGraphics>
<xsl:call-template name="other_pages_frames"/>
</pageTemplate>
</template>
<stylesheet>
<xsl:call-template name="stylesheet"/>
</stylesheet>
<story>
<xsl:call-template name="story"/>
</story>
</document>
</xsl:template>
</xsl:stylesheet>

View File

@ -8,12 +8,7 @@
"access_auction_bid","auction.bid","model_auction_bid","base.group_user",1,1,1,1
"access_auction_bid_line","auction.bid.line","model_auction_bid_line","base.group_user",1,1,1,1
"access_auction_lot_history","auction.lot.history","model_auction_lot_history","base.group_user",1,1,1,1
"access_report_buyer_auction","report.buyer.auction","model_report_buyer_auction","base.group_user",1,0,0,0
"access_report_buyer_auction2","report.buyer.auction2","model_report_buyer_auction2","base.group_user",1,0,0,0
"access_report_seller_auction","report.seller.auction","model_report_seller_auction","base.group_user",1,0,0,0
"access_report_seller_auction2","report.seller.auction2","model_report_seller_auction2","base.group_user",1,0,0,0
"access_report_auction_view","report.auction.view","model_report_auction_view","base.group_user",1,0,0,0
"access_report_auction_view2","report.auction.view2","model_report_auction_view2","base.group_user",1,0,0,0
"access_report_auction","report.auction","model_report_auction","base.group_user",1,0,0,0
"access_report_auction_object_date","report.auction.object.date","model_report_auction_object_date","base.group_user",1,0,0,0
"access_report_auction_estimation_adj_category","report.auction.estimation.adj.category","model_report_auction_estimation_adj_category","base.group_user",1,0,0,0
"access_report_auction_adjudication","report.auction.adjudication","model_report_auction_adjudication","base.group_user",1,0,0,0
@ -22,3 +17,4 @@
"access_report_object_encoded","report.object.encoded","model_report_object_encoded","base.group_user",1,0,0,0
"access_report_object_encoded_manager","report.object.encoded.manager","model_report_object_encoded_manager","base.group_user",1,0,0,0
"access_report_unclassified_objects","report.unclassified.objects","model_report_unclassified_objects","base.group_user",1,0,0,0
"access_aie_category","aie.category","model_aie_category","base.group_user",1,0,0,0

1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
8 access_auction_bid auction.bid model_auction_bid base.group_user 1 1 1 1
9 access_auction_bid_line auction.bid.line model_auction_bid_line base.group_user 1 1 1 1
10 access_auction_lot_history auction.lot.history model_auction_lot_history base.group_user 1 1 1 1
11 access_report_buyer_auction access_report_auction report.buyer.auction report.auction model_report_buyer_auction model_report_auction base.group_user 1 0 0 0
access_report_buyer_auction2 report.buyer.auction2 model_report_buyer_auction2 base.group_user 1 0 0 0
access_report_seller_auction report.seller.auction model_report_seller_auction base.group_user 1 0 0 0
access_report_seller_auction2 report.seller.auction2 model_report_seller_auction2 base.group_user 1 0 0 0
access_report_auction_view report.auction.view model_report_auction_view base.group_user 1 0 0 0
access_report_auction_view2 report.auction.view2 model_report_auction_view2 base.group_user 1 0 0 0
12 access_report_auction_object_date report.auction.object.date model_report_auction_object_date base.group_user 1 0 0 0
13 access_report_auction_estimation_adj_category report.auction.estimation.adj.category model_report_auction_estimation_adj_category base.group_user 1 0 0 0
14 access_report_auction_adjudication report.auction.adjudication model_report_auction_adjudication base.group_user 1 0 0 0
17 access_report_object_encoded report.object.encoded model_report_object_encoded base.group_user 1 0 0 0
18 access_report_object_encoded_manager report.object.encoded.manager model_report_object_encoded_manager base.group_user 1 0 0 0
19 access_report_unclassified_objects report.unclassified.objects model_report_unclassified_objects base.group_user 1 0 0 0
20 access_aie_category aie.category model_aie_category base.group_user 1 0 0 0

View File

@ -18,12 +18,37 @@
warranty: 0.0
weight: 0.0
weight_net: 0.0
-
I create a new artist for an object.
-
!record {model: auction.artists, id: auction_artists_vincentvangogh0}:
birth_death_dates: 1853-1900
name: Vincent van Gogh
-
I modifying a expenses journal record for analytic journal.
-
!record {model: account.journal, id: account.expenses_journal}:
analytic_journal_id: account.exp
-
I modifying a sales journal record for analytic journal.
-
!record {model: account.journal, id: account.sales_journal}:
analytic_journal_id: account.cose_journal_sale
-
I'm creating new partner "Mark Johnson" with him email "info@mycustomer.com".
-
!record {model: res.partner, id: res_partner_markjohnson0}:
address:
- city: Bruxelles
country_id: base.be
street: Rue des Palais 51, bte 33
type: default
zip: '1000'
email: 'info@mycustomer.com'
name: Mark Johnson
-
Now I want to associate an object with the auction so for that I create an auction "Antique furniture exhibition"
-
@ -37,7 +62,8 @@
expo2: '2010-05-19'
journal_id: account.expenses_journal
journal_seller_id: account.sales_journal
name: Antique furniture exhibition
name: Antique furniture exhibition
-
An object is being deposited for an auction,I create a seller's deposit record.
-
@ -45,12 +71,12 @@
date_dep: '2010-05-18'
method: keep
name: AD/006
partner_id: base.res_partner_4
partner_id: base.res_partner_9
-
I create a new object wooden-chair which is to be auctioned.
-
!record {model: auction.lots, id: auction_lots_woodenchair0}:
ach_uid: base.res_partner_2
ach_uid: res_partner_markjohnson0
artist_id: auction_artists_vincentvangogh0
auction_id: auction_dates_antiquefurnitureexhibition0
bord_vnd_id: auction_deposit_ad0
@ -72,7 +98,7 @@
auction_id: auction_dates_antiquefurnitureexhibition0
contact_tel: (+32)2 211 34 83
name: bid/001
partner_id: auction.partner_record1
partner_id: res_partner_markjohnson0
-
I create a bid line.
-
@ -87,7 +113,7 @@
!record {model: auction.bid, id: auction_bid_bid1}:
auction_id: auction_dates_antiquefurnitureexhibition0
name: bid/002
partner_id: base.res_partner_2
partner_id: res_partner_markjohnson0
-
I create a bid line.
-
@ -104,62 +130,16 @@
from tools.translate import _
auc_id=self.browse(cr, uid, ref("auction_lots_woodenchair0"))
assert(auc_id.buyer_price,auc_id.seller_price), _('Buyer price and seller price are not available!')
-
I check that a record gets created in the Seller's Summary.
-
!python {model: auction.lots}: |
from tools.translate import _
auc_id=self.browse(cr, uid, ref("auction_lots_woodenchair0"))
auc_deposit_obj=self.pool.get('auction.deposit')
rep_sell_obj = self.pool.get('report.seller.auction')
ids =rep_sell_obj.search(cr, uid, [('auction', '=', auc_id.auction_id.id),('seller', '=',auc_id.bord_vnd_id.partner_id.id)])
assert ids, _('No record found!')
-
I check that a record gets created in the Seller's Revenues.
-
!python {model: auction.lots}: |
from tools.translate import _
auc_id=self.browse(cr, uid, ref("auction_lots_woodenchair0"))
auc_deposit_obj=self.pool.get('auction.deposit')
rep_sell_obj = self.pool.get('report.seller.auction2')
ids =rep_sell_obj.search(cr, uid, [('auction', '=', auc_id.auction_id.id),('seller', '=',auc_id.bord_vnd_id.partner_id.id)])
assert ids, _('No record found!')
-
I check that a record gets created in the Buyer's Summary.
-
!python {model: auction.lots}: |
from tools.translate import _
auc_id1=self.browse(cr, uid, ref("auction_lots_woodenchair0"))
rep_buy_obj1 = self.pool.get('report.buyer.auction')
ids1=rep_buy_obj1.search(cr, uid, [('auction', '=', auc_id1.auction_id.id),('buyer', '=',auc_id1.ach_uid.id)])
assert ids1, _('No record found!')
-
I check that a record gets created in the Buyer's Revenue.
-
!python {model: auction.lots}: |
from tools.translate import _
auc_id1=self.browse(cr, uid, ref("auction_lots_woodenchair0"))
rep_buy_obj1 = self.pool.get('report.buyer.auction2')
ids1=rep_buy_obj1.search(cr, uid, [('auction', '=', auc_id1.auction_id.id),('buyer', '=',auc_id1.ach_uid.id)])
assert ids1, _('No record found!')
-
I check that a record gets created in the Auction's Summary.
-
!python {model: auction.lots}: |
from tools.translate import _
auc_id2=self.browse(cr, uid, ref("auction_lots_woodenchair0"))
rep_auc_obj1 = self.pool.get('report.auction.view')
ids2=rep_auc_obj1.search(cr, uid, [('auction_id', '=', auc_id2.auction_id.id)])
assert ids2, _('No record found!')
-
I check that a record gets created in the Auction's Revenues.
-
!python {model: auction.lots}: |
from tools.translate import _
auc_id3=self.browse(cr, uid, ref("auction_lots_woodenchair0"))
rep_auc_obj1 = self.pool.get('report.auction.view2')
ids3=rep_auc_obj1.search(cr, uid, [('auction', '=', auc_id3.auction_id.id)])
assert ids3, _('No record found!')
rep_auc_obj1 = self.pool.get('report.auction')
ids2=rep_auc_obj1.search(cr, uid, [('auction', '=', auc_id2.auction_id.id)])
assert ids2, _('No record found!')
-
An object has been sold,so I click on the "Sold" button.
-
@ -174,6 +154,7 @@
from tools.translate import _
auc_id=self.browse(cr, uid, ref("auction_lots_woodenchair0"))
assert(auc_id.state == 'sold'), _('State not changed!')
-
Then I click on the Taken Away button.
-
@ -189,7 +170,7 @@
auc_id=self.browse(cr, uid, ref("auction_lots_woodenchair0"))
assert(auc_id.state == 'taken_away'), _('State not changed!')
-
I click on the "Close + Create all invoices" button
I click on the "Create all invoices" button
-
!python {model: auction.dates}: |
self.close(cr, uid, [ref("auction.auction_dates_antiquefurnitureexhibition0")],
@ -202,3 +183,4 @@
from tools.translate import _
auc_id=self.browse(cr, uid, ref("auction_lots_woodenchair0"))
assert(auc_id.sel_inv_id), _('Seller Invoice has not been created!')

View File

@ -87,62 +87,7 @@
from tools.translate import _
auc_id=self.browse(cr, uid, ref("auction_lots_painting0"))
assert(auc_id.ach_uid), _('Buyer not assigned!')
-
I mark that a seller has been paid by using the "Mark as paid for seller" wizard.
-
!record {model: auction.payer.sel, id: auction_payer_sel_0}:
{}
-
I click on the "Pay" button.
-
!python {model: auction.payer.sel}: |
self.payer_sel(cr, uid, [ref("auction_payer_sel_0")], {"lang": "en_US", "tz":
False, "active_model": "auction.lots", "active_ids": [ref("auction_lots_painting0")], "active_id": ref("auction_lots_painting0")})
-
I check that the Seller paid field is set to True.
-
!python {model: auction.lots}: |
from tools.translate import _
auc_id=self.browse(cr, uid, ref("auction_lots_painting0"))
assert(auc_id.paid_vnd == True), _('Seller paid is not marked!')
-
I use the "Mark as taken away" wizard to indicate that an object is taken away.
-
!record {model: auction.lots.able, id: auction_lots_able_0}:
{}
-
Then I click on the "Able Taken away" wizard.
-
!python {model: auction.lots.able}: |
self.confirm_able(cr, uid, [ref("auction_lots_able_0")], {"lang":"en_US", "tz":
False, "active_model": "auction.lots", "active_ids": [ref("auction_lots_painting0")],
"active_id": ref("auction_lots_painting0")})
-
I check that Taken away field is set to True.
-
!python {model: auction.lots}: |
from tools.translate import _
auc_id=self.browse(cr, uid, ref("auction_lots_painting0"))
assert(auc_id.ach_emp == True), _('Taken away is not marked!')
-
I use the "Unmark as taken away" wizard to unmark the Taken Away field.
-
!record {model: auction.lots.enable, id: auction_lots_enable_0}:
confirm_en: 0.0
-
Then I click on the "Enable Taken away" button.
-
!python {model: auction.lots.enable}: |
self.confirm_enable(cr, uid, [ref("auction_lots_enable_0")], {"lang": "en_US",
"tz": False, "active_model": "auction.lots", "active_ids": [ref("auction_lots_painting0")],
"active_id": ref("auction_lots_painting0"),})
-
I check that Taken away field is set to False.
-
!python {model: auction.lots}: |
from tools.translate import _
auc_id=self.browse(cr, uid, ref("auction_lots_painting0"))
assert(auc_id.ach_emp == False), _('Taken away is marked!')
-
I create statement lines for an object's payment by using the "Pay objects of the buyer" wizard
-

View File

@ -29,12 +29,8 @@ import auction_pay_buy
import auction_payer_sel
import auction_lots_sms_send
import auction_catalog_flagey_report
#import auction_lots_cancel
#import auction_transfer_unsold_object
#import auction_aie_send
#import auction_aie_send_result
import auction_lots_buyer_map
#import auction_lots_numerotate
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -11,11 +11,13 @@
<field name="arch" type="xml">
<form string="Catalog Flagey Report">
<label string="Print Auction Catalog Flagey Report..."/>
<group col="2" colspan="4">
<separator colspan="4" />
<group col="4" colspan="4">
<label string=" " colspan="2"/>
<button icon='gtk-cancel' special="cancel"
string="Cancel" />
<button name="print_report" string="Ok"
colspan="1" type="object" icon="gtk-ok" />
<button name="print_report" string="Print"
colspan="1" type="object" icon="gtk-print" />
</group>
</form>
</field>
@ -26,7 +28,7 @@
src_model="auction.dates"
view_mode="form"
target="new"
key2="client_action_multi"
key2="client_print_multi"
id="action_auction_catalog_flagey_wizard"/>
</data>
</openerp>

View File

@ -28,22 +28,14 @@ import tools
import wizard
class auction_lots_auction_move(osv.osv_memory):
"""Auction Move"""
_name = "auction.lots.auction.move"
_description = "Auction move "
_description = __doc__
_columns= {
'auction_id':fields.many2one('auction.dates', 'Auction Date', required=True),
}
# def _top(self, cr, uid, ids, context={}):
# refs = self.pool.get('auction.lots')
# rec_ids = refs.browse(cr, uid, context['active_ids'])
# for rec in rec_ids:
# if not rec.auction_id:
# raise osv.except_osv('Error !', 'You can not move a lot that has no auction date')
# return {}
def auction_move_set(self, cr, uid, ids, context={}):
def auction_move_set(self, cr, uid, ids, context=None):
"""
This Function update auction date on auction lots to given auction date.
erase the auction lots's object adjudication price and its buyer and change state to draft.
@ -52,13 +44,14 @@ class auction_lots_auction_move(osv.osv_memory):
@param uid: the current users ID for security checks,
@param ids: List of auction lots auction moves IDs.
"""
refs = self.pool.get('auction.lots')
if not context:
context={}
auction_bid_line_obj = self.pool.get('auction.bid_line')
auction_lot_history_obj = self.pool.get('auction.lot.history')
auction_lots_obj = self.pool.get('auction.lots')
rec_ids = refs.browse(cr, uid, context['active_ids'])
for datas in self.read(cr, uid, ids):
if not (datas['auction_id'] and len(context['active_ids'])) :
rec_ids = auction_lots_obj.browse(cr, uid, context.get('active_ids', []))
for current in self.browse(cr, uid, ids, context):
if not (current.auction_id and len(context.get('active_ids', []))):
return {}
# line_ids = auction_bid_line_obj.search(cr, uid, [('lot_id', 'in', context['active_ids'])])
@ -70,7 +63,7 @@ class auction_lots_auction_move(osv.osv_memory):
'price': rec.obj_ret
})
up_auction = auction_lots_obj.write(cr, uid, [rec.id], {
'auction_id':datas['auction_id'],
'auction_id': current.auction_id.id,
'obj_ret': None,
'obj_price': None,
'ach_login': None,

View File

@ -7,14 +7,14 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Change Auction Date">
<group colspan="4" >
<label string="Warning, this will erase the object adjudication price and its buyer !" colspan="2"/>
<newline/>
<field name="auction_id"/>
</group>
<separator string="" colspan="4" />
<group colspan="4" col="6">
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
<label string="Warning, this will erase the object adjudication price and its buyer!" colspan="4"/>
<newline/>
<separator string="" colspan="4"/>
<field name="auction_id"/>
<separator string="" colspan="4" />
<group colspan="4" col="4">
<label string=" " colspan="2"/>
<button icon="gtk-close" special="cancel" string="Close"/>
<button icon="gtk-redo" string="Move to Auction date" name="auction_move_set" type="object"/>
</group>
</form>

View File

@ -26,7 +26,6 @@ from osv import osv,fields
class wiz_auc_lots_buyer_map(osv.osv_memory):
_name = 'auction.lots.buyer_map'
_description = 'Map Buyer'
_columns = {
'ach_login': fields.char('Buyer Username', size=64, required=True),
'ach_uid': fields.many2one('res.partner','Buyer', required=True),
@ -42,19 +41,17 @@ class wiz_auc_lots_buyer_map(osv.osv_memory):
@param context: A standard dictionary
@return: A dictionary which of fields with values.
"""
ids = context and context.get('active_ids',False) or False
assert ids, _('Active IDs not Found')
res = super(wiz_auc_lots_buyer_map,self).default_get(cr, uid, fields, context)
cr.execute('select id from auction_lots where (ach_uid is null and ach_login is not null) ')
v_ids = [x[0] for x in cr.fetchall()]
for rec in self.pool.get('auction.lots').browse(cr, uid, v_ids, context):
auction_lots_obj = self.pool.get('auction.lots')
lots_ids = auction_lots_obj.search(cr, uid, [('ach_uid', '=', ''), ('ach_login', '!=', '')])
for rec in auction_lots_obj.browse(cr, uid, lots_ids, context):
if (not rec.ach_uid or not rec.ach_login):
res.update(self._start(cr, uid, ids, context))
return res
res.update(self._start(cr, uid, ids, context))
res.update(self._start(cr, uid, context.get('active_ids', []), context))
return res
res.update(self._start(cr, uid, context.get('active_ids', []), context))
return res
def _start(self, cr, uid, ids, context):
def _start(self, cr, uid, ids, context=None):
"""
Returns login if already there in the selected record.
@param self: The object pointer.
@ -64,6 +61,8 @@ class wiz_auc_lots_buyer_map(osv.osv_memory):
@param context: A standard dictionary
@return: login field from current record.
"""
if not context:
context={}
lots_obj = self.pool.get('auction.lots')
for rec in lots_obj.browse(cr, uid, ids, context):
if (len(ids)==1) and (not rec.ach_uid and not rec.ach_login):
@ -72,7 +71,7 @@ class wiz_auc_lots_buyer_map(osv.osv_memory):
return {'ach_login': rec.ach_login}
return {}
def buyer_map_set(self, cr, uid, ids, context):
def buyer_map_set(self, cr, uid, ids, context=None):
"""
To map the buyer and login name.
@param self: The object pointer.
@ -80,16 +79,16 @@ class wiz_auc_lots_buyer_map(osv.osv_memory):
@param uid: ID of the user currently logged in
@param ids: List of ids
@param context: A standard dictionary
@return:
"""
rec_ids = context and context.get('active_ids',False) or False
if not context:
context={}
rec_ids = context and context.get('active_ids',[]) or []
assert rec_ids, _('Active IDs not Found')
datas = self.read(cr, uid, ids[0], ['ach_login','ach_uid'])
lots_obj = self.pool.get('auction.lots')
recs = lots_obj.browse(cr, uid, rec_ids, context)
for rec in recs:
if rec.ach_login==datas['ach_login']:
lots_obj.write(cr, uid, [rec.id], {'ach_uid': datas['ach_uid']}, context=context)
for current in self.browse(cr, uid, ids):
for lots in lots_obj.browse(cr, uid, rec_ids, context):
if lots.ach_login == current.ach_login:
lots_obj.write(cr, uid, [lots.id], {'ach_uid': current.ach_uid.id}, context=context)
return {}
def fields_view_get(self, cr, uid, view_id=None, view_type='form',
@ -102,8 +101,12 @@ class wiz_auc_lots_buyer_map(osv.osv_memory):
@param context: A standard dictionary
@return: New arch of view.
"""
record_ids = context and context.get('active_ids', False) or False
if not context:
context={}
record_ids = context and context.get('active_ids', []) or []
res = super(wiz_auc_lots_buyer_map, self).fields_view_get(cr, uid, view_id=view_id, view_type=view_type, context=context, toolbar=toolbar,submenu=False)
if context.get('active_model','') != 'auction.lots':
return res
lots_obj = self.pool.get('auction.lots')
if record_ids:
try:
@ -111,9 +114,10 @@ class wiz_auc_lots_buyer_map(osv.osv_memory):
if lots.ach_uid:
res['arch'] = """
<form title="Mapping Result">
<group col="2" colspan="2">
<group col="2" colspan="4">
<label string="All objects are assigned to buyers !"/>
<newline/>
<separator string="" colspan="4"/>
<button icon='gtk-cancel' special="cancel"
string="Done" />
</group>

View File

@ -10,15 +10,17 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Buyer Map" >
<separator string="Map " colspan="4"/>
<field name="ach_login" colspan="4"/>
<newline/>
<field name="ach_uid" colspan="4"/>
<separator colspan="4"/>
<group col="4" colspan="4">
<button icon='gtk-cancel' special="cancel"
string="Exit" />
<button icon='gtk-close' special="cancel"
string="Close" />
<button name="buyer_map_set" string="Update"
colspan="2" type="object" icon="gtk-go-forward" />
type="object" icon="gtk-go-forward" />
</group>
</form>
</field>

View File

@ -29,7 +29,7 @@ class auction_lots_cancel(osv.osv):
_name = 'auction.lots.cancel'
_description = 'To cancel auction lots.'
def cancel(self, cr, uid, ids, context):
def cancel(self, cr, uid, ids, context=None):
"""
To cancel the auction lot
@ -40,10 +40,11 @@ class auction_lots_cancel(osv.osv):
@param context: A standard dictionary
@return:
"""
if not context:
context={}
lots_obj = self.pool.get('auction.lots')
invoice_obj = self.pool.get('account.invoice')
lot = lots_obj.browse(cr, uid, context['active_id'], context)
lot = lots_obj.browse(cr, uid, context.get('active_id', False), context)
if lot.ach_inv_id:
supplier_refund_inv_id = invoice_obj.refund(cr, uid, [lot.ach_inv_id.id])
if lot.sel_inv_id:

View File

@ -1,27 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="name_form" model="ir.ui.view">
<field name="name">auction.lots.cancel.form</field>
<field name="model">auction.lots.cancel</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Cancel Payment">
<label string="Are you sure you want to refund this invoice ?"/>
<button icon='gtk-cancel' special="cancel"
string="Cancel" />
<button name="cancel" string="Cancel Payment"
colspan="1" type="object" icon="gtk-ok" />
</form>
</field>
</record>
<act_window name="Cancel ittttttt"
res_model="auction.lots.cancel"
src_model="auction.lots"
view_mode="form"
target="new"
key2="client_action_multi"
id="action_auction_lots_cancel"/>
</data>
<data>
<record id="name_form" model="ir.ui.view">
<field name="name">auction.lots.cancel.form</field>
<field name="model">auction.lots.cancel</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Cancel Payment">
<label string="Are you sure you want to refund this invoice ?"/>
<button icon='gtk-close' special="cancel"
string="Close" />
<button name="cancel" string="Cancel Payment" colspan="1" type="object" icon="gtk-ok" />
</form>
</field>
</record>
<act_window name="Cancel"
res_model="auction.lots.cancel"
src_model="auction.lots"
view_mode="form"
target="new"
key2="client_action_multi"
id="action_auction_lots_cancel"/>
</data>
</openerp>

View File

@ -7,11 +7,7 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Confirm">
<group colspan="4" >
<separator string="Confirmation enable taken away" colspan="4"/>
<newline/>
</group>
<separator string="" colspan="4" />
<separator string="Confirmation Enable Taken away" colspan="4"/>
<group colspan="4" col="6">
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
<button icon="gtk-goto-last" string="Enable Taken away" name="confirm_enable" type="object"/>
@ -20,7 +16,6 @@
</field>
</record>
<act_window name="Unmark as taken away"
res_model="auction.lots.enable"
src_model="auction.lots"
@ -28,7 +23,6 @@
target="new"
key2="client_action_multi"
id="action_auction_lots_enable"/>
</data>
</openerp>

View File

@ -34,14 +34,13 @@ class auction_lots_make_invoice(osv.osv_memory):
'amount': fields.float('Invoiced Amount', required =True, readonly=True),
'objects':fields.integer('# of objects', required =True, readonly=True),
'number':fields.char('Invoice Number', size=64),
}
_defaults = {
'number': lambda *a: False,
}
def default_get(self, cr, uid, fields, context):
def default_get(self, cr, uid, fields, context=None):
"""
To get default values for the object.
@param self: The object pointer.
@ -51,16 +50,18 @@ class auction_lots_make_invoice(osv.osv_memory):
@param context: A standard dictionary
@return: A dictionary which of fields with values.
"""
res = super(auction_lots_make_invoice, self).default_get(cr, uid, fields, context=context)
for lot in self.pool.get('auction.lots').browse(cr, uid, context.get('active_ids', [])):
if not context:
context={}
res = super(auction_lots_make_invoice, self).default_get(cr, uid, fields, context=context)
lots_obj = self.pool.get('auction.lots')
for lot in lots_obj.browse(cr, uid, context.get('active_ids', [])):
if 'amount' in fields:
res.update({'amount': lot.buyer_price})
res.update({'amount': lot.seller_price})
if 'objects' in fields:
res.update({'objects': len(context['active_ids'])})
res.update({'objects': len(context.get('active_ids', []))})
return res
def makeInvoices(self, cr, uid, ids, context):
def makeInvoices(self, cr, uid, ids, context=None):
"""
Seller invoice :Create an invoice.
@param cr: the current row, from the database cursor.
@ -68,11 +69,13 @@ class auction_lots_make_invoice(osv.osv_memory):
@param ids: List of Auction lots make invoices IDs
@return: dictionary of account invoice form.
"""
if not context:
context={}
order_obj = self.pool.get('auction.lots')
mod_obj = self.pool.get('ir.model.data')
result = mod_obj._get_id(cr, uid, 'account', 'view_account_invoice_filter')
id = mod_obj.read(cr, uid, result, ['res_id'])
lots_ids = order_obj.seller_trans_create(cr, uid, context['active_ids'], context)
lots_ids = order_obj.seller_trans_create(cr, uid, context.get('active_ids', []), context)
return {
'domain': "[('id','in', ["+','.join(map(str, lots_ids))+"])]",
'name': 'Seller invoices',

View File

@ -21,8 +21,10 @@
from osv import fields, osv
class auction_lots_make_invoice_buyer(osv.osv_memory):
"""Make Invoice for Buyer"""
_name = "auction.lots.make.invoice.buyer"
_description = "Make invoice buyer "
_description = __doc__
_columns= {
'amount': fields.float('Invoiced Amount', required =True, readonly=True),
@ -35,7 +37,7 @@ class auction_lots_make_invoice_buyer(osv.osv_memory):
'number': lambda *a: False,
}
def default_get(self, cr, uid, fields, context):
def default_get(self, cr, uid, fields, context=None):
"""
To get default values for the object.
@param self: The object pointer.
@ -45,14 +47,17 @@ class auction_lots_make_invoice_buyer(osv.osv_memory):
@param context: A standard dictionary
@return: A dictionary which of fields with values.
"""
if not context:
context={}
res = super(auction_lots_make_invoice_buyer, self).default_get(cr, uid, fields, context=context)
for lot in self.pool.get('auction.lots').browse(cr, uid, context.get('active_ids', [])):
lots_obj=self.pool.get('auction.lots')
for lot in lots_obj.browse(cr, uid, context.get('active_ids', [])):
if 'amount' in fields:
res.update({'amount': lot.buyer_price})
if 'buyer_id' in fields:
res.update({'buyer_id': lot.ach_uid and lot.ach_uid.id or False})
if 'objects' in fields:
res.update({'objects': len(context['active_ids'])})
res.update({'objects': len(context.get('active_ids', []))})
return res
def makeInvoices(self, cr, uid, ids, context):
@ -67,12 +72,12 @@ class auction_lots_make_invoice_buyer(osv.osv_memory):
mod_obj = self.pool.get('ir.model.data')
result = mod_obj._get_id(cr, uid, 'account', 'view_account_invoice_filter')
id = mod_obj.read(cr, uid, result, ['res_id'])
lots = order_obj.browse(cr, uid, context['active_ids'])
for data in self.read(cr, uid, ids):
invoice_number = data['number']
lots = order_obj.browse(cr, uid, context.get('active_ids', []))
for current in self.browse(cr, uid, ids, context):
invoice_number = current.number
for lot in lots:
up_auction = order_obj.write(cr, uid, [lot.id], {'ach_uid': data['buyer_id']})
lots_ids = order_obj.lots_invoice(cr, uid, context['active_ids'], context, data['number'])
up_auction = order_obj.write(cr, uid, [lot.id], {'ach_uid': current.buyer_id.id})
lots_ids = order_obj.lots_invoice(cr, uid, context.get('active_ids', []), context, current.number)
return {
'domain': "[('id','in', ["+','.join(map(str, lots_ids))+"])]",
'name': 'Buyer invoices',

View File

@ -16,8 +16,8 @@
</group>
<separator string="" colspan="4" />
<group colspan="4" col="6">
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
<button icon="gtk-ok" string="Create invoices" name="makeInvoices" type="object"/>
<button icon="gtk-close" special="cancel" string="Close"/>
<button icon="gtk-yes" string="Create invoices" name="makeInvoices" type="object"/>
</group>
</form>
</field>
@ -29,8 +29,7 @@
view_mode="form"
target="new"
key2="client_action_multi"
id="action_auction_lots_make_invoice_buyer"/>
id="action_auction_lots_make_invoice_buyer"/>
</data>
</openerp>

View File

@ -14,8 +14,8 @@
</group>
<separator string="" colspan="4" />
<group colspan="4" col="6">
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
<button icon="gtk-ok" string="Create invoices" name="makeInvoices" type="object"/>
<button icon="gtk-close" special="cancel" string="Close"/>
<button icon="gtk-yes" string="Create invoices" name="makeInvoices" type="object"/>
</group>
</form>
</field>

View File

@ -21,11 +21,7 @@
from osv import fields, osv
from tools.translate import _
import netsvc
import pooler
import time
import tools
import wizard
class auction_lots_sms_send(osv.osv_memory):
@ -36,7 +32,7 @@ class auction_lots_sms_send(osv.osv_memory):
'user':fields.char('Login', size=64, required=True),
'password':fields.char('Password', size=64, required=True),
'text':fields.text('SMS Message', required=True)
}
}
def sms_send(self, cr, uid, ids, context):
"""
@ -65,12 +61,6 @@ class auction_lots_sms_send(osv.osv_memory):
tools.smssend(data['user'], data['password'], data['app_id'], unicode(data['text'], 'utf-8').encode('latin1'), to)
nbr += 1
return {'sms_sent': nbr}
if to:
tools.smssend(data['user'], data['password'], data['app_id'], unicode(data['text'], 'utf-8').encode('latin1'), to)
nbr += 1
return {'sms_sent': nbr}
#
auction_lots_sms_send()

View File

@ -9,17 +9,16 @@
<form string="SMS - Gateway: clickatell','Bulk SMS send">
<group colspan="4" >
<separator string="SMS - Gateway: clickatell','Bulk SMS send" colspan="4"/>
<field name="app_id"/>
<newline/>
<field name="app_id" colspan="4"/>
<field name="user"/>
<field name="password"/>
<newline/>
<field name="text" colspan="3"/>
<separator string="SMS Text" colspan="4" />
<field name="text" colspan="4" nolabel="1"/>
</group>
<separator string="" colspan="4" />
<separator string="" colspan="4" />
<group colspan="4" col="6">
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
<button icon="gtk-go-back" string="Send SMS" name="sms_send" type="object"/>
<button icon="gtk-close" special="cancel" string="Close"/>
<button icon="gtk-go-forward" string="Send SMS" name="sms_send" type="object"/>
</group>
</form>
</field>

View File

@ -27,7 +27,6 @@ import tools
class auction_pay_buy(osv.osv_memory):
_name = "auction.pay.buy"
_description = "Pay buy"
_columns= {
'amount': fields.float('Amount paid', digits= (16, 2)),
'buyer_id':fields.many2one('res.partner', 'Buyer'),
@ -39,7 +38,7 @@ class auction_pay_buy(osv.osv_memory):
'total': fields.float('Amount paid', digits = (16, 2), readonly =True),
}
def default_get(self, cr, uid, fields, context):
def default_get(self, cr, uid, fields, context=None):
"""
To get default values for the object.
@param self: The object pointer.
@ -49,8 +48,11 @@ class auction_pay_buy(osv.osv_memory):
@param context: A standard dictionary
@return: A dictionary which of fields with values.
"""
res = super(auction_pay_buy, self).default_get(cr, uid, fields, context=context)
for lot in self.pool.get('auction.lots').browse(cr, uid, context.get('active_ids', [])):
if not context:
context={}
res = super(auction_pay_buy, self).default_get(cr, uid, fields, context=context)
auction_lots_obj= self.pool.get('auction.lots')
for lot in auction_lots_obj.browse(cr, uid, context.get('active_ids', [])):
if 'amount' in fields:
res.update({'amount': lot.buyer_price})
if 'buyer_id' in fields:
@ -73,22 +75,20 @@ class auction_pay_buy(osv.osv_memory):
for datas in self.read(cr, uid, ids):
if not abs(datas['total'] - (datas['amount'] + datas['amount2'] + datas['amount3'])) <0.01:
rest = datas['total']-(datas['amount'] + datas['amount2'] + datas['amount3'])
rest = datas['total'] - (datas['amount'] + datas['amount2'] + datas['amount3'])
raise osv.except_osv('Payment aborted !', 'You should pay all the total: "%.2f" are missing to accomplish the payment.' %(round(rest, 2)))
lots = lot_obj.browse(cr, uid, context['active_ids'], context)
ref_bk_s = bank_statement_line_obj
for lot in lots:
if datas['buyer_id']:
lot_obj.write(cr, uid, [lot.id], {'ach_uid':datas['buyer_id']})
lot_obj.write(cr, uid, [lot.id], {'ach_uid': datas['buyer_id']})
if not lot.auction_id:
raise osv.except_osv('Error !', 'No auction date for "%s": Please set one.'%(lot.name))
lot_obj.write(cr, uid, [lot.id], {'is_ok':True})
for st, stamount in [('statement_id1', 'amount'), ('statement_id2', 'amount2'), ('statement_id3', 'amount3')]:
if datas[st]:
new_id = ref_bk_s.create(cr, uid, {
new_id = bank_statement_line_obj.create(cr, uid, {
'name':'Buyer:'+ str(lot.ach_login or '')+', auction:'+ lots[0].auction_id.name,
'date': time.strftime('%Y-%m-%d'),
'partner_id': datas['buyer_id'] or False,
@ -100,7 +100,6 @@ class auction_pay_buy(osv.osv_memory):
for lot in lots:
lot_obj.write(cr, uid, [lot.id], {'statement_id':[(4, new_id)]})
return {}
auction_pay_buy()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -8,6 +8,7 @@
<field name="arch" type="xml">
<form string="Pay objects">
<group colspan="4" >
<separator string="Pay Objects" colspan="4" />
<field name="amount"/>
<field name="statement_id1" domain="[('state','=','draft')]"/>
<field name="amount2"/>
@ -20,7 +21,7 @@
</group>
<separator string="" colspan="4" />
<group colspan="4" col="6">
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
<button icon="gtk-close" special="cancel" string="Close"/>
<button icon="gtk-yes" string="Pay" name="pay_and_reconcile" type="object"/>
</group>
</form>

View File

@ -26,7 +26,7 @@ class auction_payer(osv.osv_memory):
_description = "Auction payer"
def payer(self, cr, uid, ids, context):
self.pool.get('auction.lots').write(cr, uid, context['active_ids'], {'is_ok':True, 'state':'paid'})
self.pool.get('auction.lots').write(cr, uid, context.get('active_ids', []), {'is_ok':True, 'state':'paid'})
return {}
auction_payer()

View File

@ -38,20 +38,22 @@ class auction_taken(osv.osv_memory):
}
def _to_xml(s):
return s.replace('&','&amp;').replace('<','&lt;').replace('>','&gt;')
return s.replace('&', '&amp;').replace('<', '&lt;').replace('>', '&gt;')
def process(self, cr, uid, ids, context):
def process(self, cr, uid, ids, context=None):
"""
Update Auction lots state to taken_away.
This Function update Auction lots state to taken_away.
@param cr: the current row, from the database cursor.
@param uid: the current users ID for security checks.
@param ids: List of Auction takens IDs
@return: dictionary of lot_ids fields with empty list
"""
if not context:
context={}
lot_obj = self.pool.get('auction.lots')
for data in self.read(cr, uid, ids):
if data['lot_ids']:
lot_obj.write(cr, uid, data['lot_ids'], {'state':'taken_away'})
for current in self.browse(cr, uid, ids, context):
for lot in current.lot_ids:
lot_obj.write(cr, uid, lot.id, {'state':'taken_away'})
return {'lot_ids': []}
auction_taken()

View File

@ -8,11 +8,11 @@
<field name="arch" type="xml">
<form string="Mark Lots">
<group colspan="4" >
<label string="Select lots which are Sold" colspan="4"/>
<separator string="Select lots which are Sold" colspan="4"/>
<field name="lot_ids" nolabel="1" colspan="4" domain="[('state','=','sold')]"/>
</group>
<separator string="" colspan="4" />
<group colspan="4" col="6">
<group colspan="4">
<button icon="gtk-ok" string="OK" name="process" type="object" />
</group>
</form>
@ -27,16 +27,7 @@
<field name="view_id" ref="view_auction_taken"/>
<field name="target">new</field>
</record>
<!-- <menuitem name="Tools Bar Codes"
id="auction_outils_menu"
parent="auction_menu_root" sequence="5"
/>
<menuitem name="Deliveries Management"
action="action_auction_taken"
id="menu_wizard_emporte"
parent="auction_outils_menu"
/> -->
</data>
</openerp>

View File

@ -23,18 +23,18 @@
<attribute name="string">Install Generic Modules</attribute>
</separator>
<group colspan="8">
<field name="crm" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,association,profile_auction,profile_bookstore)"/> <field name="sale" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,association,profile_auction,profile_bookstore)"/>
<field name="project" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,association,profile_auction,profile_bookstore)"/> <field name="knowledge" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,association,profile_auction,profile_bookstore)"/>
<field name="stock" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,association,profile_auction,profile_bookstore)"/> <field name="mrp" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,association,profile_auction,profile_bookstore)"/>
<field name="account" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,association,profile_auction,profile_bookstore)"/> <field name="purchase" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,association,profile_auction,profile_bookstore)"/>
<field name="hr" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,association,profile_auction,profile_bookstore)"/> <field name="point_of_sale" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,association,profile_auction,profile_bookstore)"/>
<field name="marketing" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,association,profile_auction,profile_bookstore)"/> <field name="misc_tools" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,association,profile_auction,profile_bookstore)"/>
<field name="report_designer" groups="base.group_extended" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,association,profile_auction,profile_bookstore)"/>
<field name="crm" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,association,auction,profile_bookstore)"/> <field name="sale" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,association,auction,profile_bookstore)"/>
<field name="project" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,association,auction,profile_bookstore)"/> <field name="knowledge" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,association,auction,profile_bookstore)"/>
<field name="stock" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,association,auction,profile_bookstore)"/> <field name="mrp" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,association,auction,profile_bookstore)"/>
<field name="account" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,association,auction,profile_bookstore)"/> <field name="purchase" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,association,auction,profile_bookstore)"/>
<field name="hr" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,association,auction,profile_bookstore)"/> <field name="point_of_sale" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,association,auction,profile_bookstore)"/>
<field name="marketing" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,association,auction,profile_bookstore)"/> <field name="misc_tools" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,association,auction,profile_bookstore)"/>
<field name="report_designer" groups="base.group_extended" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,association,auction,profile_bookstore)"/>
<separator string="Install Specific Business Modules" colspan="4"/>
<field name="association" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,association,profile_auction,profile_bookstore)"/>
<field name="profile_auction" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,association,profile_auction,profile_bookstore)"/>
<field name="profile_bookstore" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,association,profile_auction,profile_bookstore)"/>
<field name="product_expiry" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,association,profile_auction,profile_bookstore)"/>
<field name="association" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,association,auction,profile_bookstore)"/>
<field name="auction" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,association,auction,profile_bookstore)"/>
<field name="profile_bookstore" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,association,auction,profile_bookstore)"/>
<field name="product_expiry" on_change="onchange_moduleselection(crm,sale,project,knowledge,stock,mrp,account,purchase,hr,point_of_sale,marketing,misc_tools,report_designer,association,auction,profile_bookstore)"/>
</group>
</data>
</field>

View File

@ -82,7 +82,7 @@ class base_setup_installer(osv.osv_memory):
help="Installs a preselected set of OpenERP "
"applications which will help you manage your association "
"more efficiently."),
'profile_auction':fields.boolean('Auction Houses',
'auction':fields.boolean('Auction Houses',
help="Installs a preselected set of OpenERP "
"applications selected to help you manage your auctions "
"as well as the business processes around them."),

View File

@ -22,55 +22,14 @@
import time
from report import report_sxw
from osv import osv
import pooler
class shipping(report_sxw.rml_parse):
def __init__(self, cr, uid, name, context):
super(shipping, self).__init__(cr, uid, name, context=context)
self.localcontext.update({
'time': time,
# 'get_address': self._get_address,
# 'get_address_ship':self._get_address_ship
})
# def _get_address(self,data):
#
# self.cr.execute("select sp.id,sp.origin,sp.address_id,so.partner_id,rp.name as name2,so.partner_invoice_id,rpa.name,rpa.street as Street,rpa.city ,rpa.zip,rc.name as country " \
# "from sale_order as so, stock_picking as sp,res_partner rp,res_partner_address as rpa,res_country as rc " \
# "where sp.origin=so.name " \
# "and so.partner_id=rp.id " \
# "and so.partner_invoice_id=rpa.id " \
# "and rpa.country_id=rc.id " \
# "and sp.id=%s", (data.id,))
#
# add=self.cr.dictfetchall()
# return add
#
# def _get_address_ship(self,data):
#
# self.cr.execute("select sp.id,sp.origin,sp.address_id,so.partner_id,rp.name as name2,so.partner_shipping_id,rpa.name,rpa.street as Street,rpa.city ,rpa.zip,rc.name as country " \
# "from sale_order as so, stock_picking as sp,res_partner rp,res_partner_address as rpa,res_country as rc " \
# "where sp.origin=so.name " \
# "and so.partner_id=rp.id " \
# "and so.partner_shipping_id=rpa.id " \
# "and rpa.country_id=rc.id " \
# "and sp.id=%s", (data.id,))
#
# ship=self.cr.dictfetchall()
# return ship
report_sxw.report_sxw('report.sale.shipping','stock.picking','addons/delivery/report/shipping.rml',parser=shipping)
# def _sum_total(self,data):
# print "======data=======",data
# self.cr.execute("SELECT sum(pt.list_price*sm.product_qty) FROM stock_picking as sp "\
# "LEFT JOIN stock_move sm ON (sp.id = sm.picking_id) "\
# "LEFT JOIN product_product pp ON (sm.product_id = pp.id) "\
# "LEFT JOIN product_template pt ON (pp.product_tmpl_id = pt.id) "\
# "WHERE sm.picking_id = %s", (data['id'],))
# sum_total = self.cr.fetchone()[0] or 0.00
# return True
report_sxw.report_sxw('report.sale.shipping','stock.picking','addons/sale_delivery_report/report/shipping.rml',parser=shipping)
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -47,9 +47,5 @@ class sale_order(osv.osv):
return result
sale_order()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -11,51 +11,61 @@
<record id="user_type_capitaux" model="account.account.type">
<field name="name">Capital</field>
<field name="code">capital</field>
<field name="report_type">asset</field>
<field name="close_method">balance</field>
</record>
<record id="user_type_immo" model="account.account.type">
<field name="name">Immobilisation</field>
<field name="code">immo</field>
<field name="report_type">asset</field>
<field name="close_method">balance</field>
</record>
<record id="user_type_stock" model="account.account.type">
<field name="name">Stock et Encours</field>
<field name="code">stock</field>
<field name="report_type">asset</field>
<field name="close_method">balance</field>
</record>
<record id="user_type_tiers" model="account.account.type">
<field name="name">Tiers</field>
<field name="code">tiers</field>
<!-- <field name="report_type">?</field> -->
<field name="close_method">balance</field>
</record>
<record id="user_type_tiers_receiv" model="account.account.type">
<field name="name">Tiers - Recevable</field>
<field name="code">tiers -rec</field>
<field name="report_type">asset</field>
<field name="close_method">unreconciled</field>
</record>
<record id="user_type_tiers_payable" model="account.account.type">
<field name="name">Tiers - Payable</field>
<field name="code">tiers - pay</field>
<field name="report_type">liability</field>
<field name="close_method">unreconciled</field>
</record>
<record id="user_type_tax" model="account.account.type">
<field name="name">Tax</field>
<field name="code">tax</field>
<!-- <field name="report_type">?</field> -->
<field name="close_method">unreconciled</field>
</record>
<record id="user_type_financiers" model="account.account.type">
<field name="name">Financier</field>
<field name="code">financier</field>
<!-- <field name="report_type">?</field> -->
<field name="close_method">balance</field>
</record>
<record id="user_type_charge" model="account.account.type">
<field name="name">Charge</field>
<field name="code">charge</field>
<field name="report_type">expense</field>
<field name="close_method">none</field>
</record>
<record id="user_type_produit" model="account.account.type">
<field name="name">Produit</field>
<field name="code">produit</field>
<field name="report_type">income</field>
<field name="close_method">none</field>
</record>

View File

@ -8,71 +8,83 @@
<field name="code">view</field>
<field name="close_method">none</field>
</record>
<record id="account_type_cash" model="account.account.type">
<field name="name">Bilan : Liquidites et titres</field>
<field name="code">cash</field>
<field name="report_type">asset</field>
<field name="close_method">balance</field>
</record>
<record model="account.account.type" id="account_type_adjusting_asset">
<field name="name">Bilan : Actif de regularisation</field>
<field name="code">adjusting_asset</field>
<field name="report_type">asset</field>
<field name="close_method">balance</field>
</record>
<record model="account.account.type" id="account_type_equity">
<field name="name">Bilan : Capitaux propres</field>
<field name="code">equity</field>
<field name="report_type">asset</field>
<field name="close_method">balance</field>
</record>
<record model="account.account.type" id="account_type_income">
<field name="name">PP : Chiffre d'affaires</field>
<field name="code">income</field>
<field name="report_type">income</field>
<field name="close_method">none</field>
</record>
<record model="account.account.type" id="account_type_adj_liability">
<field name="name">Bilan : Passifs de regularisation</field>
<field name="code">adj_liability</field>
<field name="report_type">liability</field>
<field name="close_method">balance</field>
</record>
<record model="account.account.type" id="account_type_closing">
<field name="name">Autre : Cloture</field>
<field name="code">closing</field>
<!-- <field name="report_type">?</field> -->
<field name="close_method">none</field>
</record>
<record model="account.account.type" id="account_type_depreciation">
<field name="name">PP : Amortissement</field>
<field name="code">depreciation</field>
<!-- <field name="report_type">?</field> -->
<field name="close_method">none</field>
</record>
<record model="account.account.type" id="account_type_financial_result">
<field name="name">PP : Resultat financier</field>
<field name="code">financial_result</field>
<!-- <field name="report_type">?</field> -->
<field name="close_method">none</field>
</record>
<record model="account.account.type" id="account_type_financial_asset">
<field name="name">Bilan : Immobilisations financieres</field>
<field name="code">financial_asset</field>
<field name="report_type">asset</field>
<field name="close_method">balance</field>
</record>
<record model="account.account.type" id="account_type_building_asset">
<field name="name">Bilan : Immo corporelles immobilieres</field>
<field name="code">building_asset</field>
<field name="report_type">asset</field>
<field name="close_method">balance</field>
</record>
<record model="account.account.type" id="account_type_non_ope_asset">
<field name="name">Bilan : Actifs hors exploitation</field>
<field name="code">non_ope_asset</field>
<field name="report_type">asset</field>
<field name="close_method">balance</field>
</record>
<record model="account.account.type" id="account_type_other_ope_exp">
<field name="name">PP : Autres charges d'exploitation</field>
<field name="code">other_ope_expense</field>
<field name="report_type">expense</field>
<field name="close_method">none</field>
</record>
@ -80,98 +92,113 @@
<record model="account.account.type" id="account_type_non_ope_debts">
<field name="name">Bilan : Dettes hors exploitation</field>
<field name="code">non_ope_debts</field>
<!-- <field name="report_type">?</field> -->
<field name="close_method">balance</field>
</record>
<record model="account.account.type" id="account_type_fixed_asset">
<field name="name">Bilan : Immo corporelles mobilieres</field>
<field name="code">fixed_asset</field>
<field name="report_type">asset</field>
<field name="close_method">balance</field>
</record>
<record model="account.account.type" id="account_type_intangible_asset">
<field name="name">Bilan : Immo incorporelles</field>
<field name="code">intangible_asset</field>
<field name="report_type">asset</field>
<field name="close_method">balance</field>
</record>
<record model="account.account.type" id="account_type_inventory">
<field name="name">Bilan : Stocks</field>
<field name="code">inventory</field>
<field name="report_type">asset</field>
<field name="close_method">balance</field>
</record>
<record model="account.account.type" id="account_type_lt_liability">
<field name="name">Bilan : Dettes à LT</field>
<field name="code">lt_liability</field>
<field name="report_type">liability</field>
<field name="close_method">balance</field>
</record>
<record model="account.account.type" id="account_type_non_ope_result">
<field name="name">PP : Resultat activites annexes</field>
<field name="code">non_oper_result</field>
<!-- <field name="report_type">?</field> -->
<field name="close_method">none</field>
</record>
<record model="account.account.type" id="account_type_other_payable">
<field name="name">Bilan : Autres creanciers à CT</field>
<field name="code">other_payable</field>
<field name="report_type">liability</field>
<field name="close_method">balance</field>
</record>
<record model="account.account.type" id="account_type_other_receivable">
<field name="name">Bilan : Autres créances</field>
<field name="code">other_receivable</field>
<field name="report_type">asset</field>
<field name="close_method">balance</field>
</record>
<record model="account.account.type" id="account_type_personnal_exp">
<field name="name">PP : Charge de personnel</field>
<field name="code">personnal_exp</field>
<field name="report_type">expense</field>
<field name="close_method">none</field>
</record>
<record model="account.account.type" id="account_type_prov_reserve">
<field name="name">Bilan : Provisions et reserves</field>
<field name="code">provision_reserve</field>
<!-- <field name="report_type">?</field>-->
<field name="close_method">balance</field>
</record>
<record model="account.account.type" id="account_type_purchase">
<field name="name">PP : Achat de marchandise</field>
<field name="code">purchase</field>
<!-- <field name="report_type">?</field>-->
<field name="close_method">none</field>
</record>
<record model="account.account.type" id="account_type_report_result">
<field name="name">Bilan : Resultat reporte</field>
<field name="code">report_result</field>
<!-- <field name="report_type">?</field>-->
<field name="close_method">balance</field>
</record>
<record model="account.account.type" id="account_type_receivable">
<field name="name">Bilan : Debiteurs</field>
<field name="code">receivable</field>
<field name="report_type">asset</field>
<field name="close_method">unreconciled</field>
</record>
<record model="account.account.type" id="account_type_payable">
<field name="name">Bilan : Fournisseurs</field>
<field name="code">payable</field>
<field name="report_type">liability</field>
<field name="close_method">unreconciled</field>
</record>
<record model="account.account.type" id="account_type_consolidation">
<field name="name">Autre : Consolidation</field>
<field name="code">consolidation</field>
<!-- <field name="report_type">?</field>-->
<field name="close_method">none</field>
</record>
<record model="account.account.type" id="account_type_other">
<field name="name">Autre : Other</field>
<field name="code">other</field>
<!-- <field name="report_type">?</field>-->
<field name="close_method">none</field>
</record>
<record model="account.account.type" id="account_type_closed">
<field name="name">Autre : Closed</field>
<field name="code">closed</field>
<!-- <field name="report_type">?</field>-->
<field name="close_method">none</field>
</record>
@ -19013,6 +19040,6 @@
<field name="property_account_expense_categ" ref="ch_4200"/>
<field name="property_account_income_categ" ref="ch_1000"/>
</record>
</data>
</openerp>

View File

@ -1,16 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record model="account.account.type" id="account_type_receivable" >
<field name="name">Receivable</field>
<field name="code">receivable</field>
<field name="report_type">asset</field>
<field name="close_method">unreconciled</field>
</record>
<record model="account.account.type" id="account_type_payable" >
<field name="name">Payable</field>
<field name="code">payable</field>
<field name="report_type">liability</field>
<field name="close_method">unreconciled</field>
</record>
@ -19,7 +21,7 @@
<field name="code">view</field>
<field name="close_method">none</field>
</record>
<record model="account.account.type" id="acct_type_income_view">
<field name="name">Income View</field>
<field name="code">view</field>
@ -63,6 +65,7 @@
<record model="account.account.type" id="account_type_cash">
<field name="name">Cash</field>
<field name="code">cash</field>
<field name="report_type">asset</field>
<field name="close_method">balance</field>
</record>
@ -76,6 +79,7 @@
<record model="account.account.type" id="account_type_equity">
<field name="name">Equity</field>
<field name="code">equity</field>
<field name="report_type">asset</field>
<field name="close_method">balance</field>
</record>

View File

@ -9,112 +9,128 @@
Version du fichier : 12-04-2008
-->
<!-- Account Types -->
<record id="account_type_dettes" model="account.account.type">
<record id="account_type_dettes" model="account.account.type">
<field name="name">Dettes long terme</field>
<field name="code">dettes</field>
<!-- <field name="report_type">?</field> -->
<field name="close_method">balance</field>
</record>
<record id="account_type_immobilisations" model="account.account.type">
<field name="name">Immobilisations</field>
<field name="code">immobilization</field>
<field name="report_type">asset</field>
<field name="close_method">balance</field>
</record>
<record id="account_type_stock" model="account.account.type">
<field name="name">Stocks</field>
<field name="code">stocks</field>
<field name="report_type">asset</field>
<field name="close_method">balance</field>
</record>
<record id="account_type_cloture" model="account.account.type">
<field name="name">Cloture</field>
<field name="code">cloture</field>
<!-- <field name="report_type">?</field> -->
<field name="close_method">balance</field>
</record>
<record model="account.account.type" id="account_type_receivable" >
<record model="account.account.type" id="account_type_receivable" >
<field name="name">Receivable</field>
<field name="code">receivable</field>
<field name="report_type">asset</field>
<field name="close_method">unreconciled</field>
</record>
</record>
<record model="account.account.type" id="account_type_payable" >
<field name="name">Payable</field>
<field name="code">payable</field>
<field name="close_method">unreconciled</field>
</record>
<record model="account.account.type" id="account_type_payable" >
<field name="name">Payable</field>
<field name="code">payable</field>
<field name="report_type">liability</field>
<field name="close_method">unreconciled</field>
</record>
<record model="account.account.type" id="account_type_view">
<field name="name">View</field>
<field name="code">view</field>
<field name="close_method">none</field>
</record>
<record model="account.account.type" id="account_type_view">
<field name="name">View</field>
<field name="code">view</field>
<field name="close_method">none</field>
</record>
<record model="account.account.type" id="account_type_income" >
<field name="name">Income</field>
<field name="code">income</field>
<field name="close_method">none</field>
</record>
<record model="account.account.type" id="account_type_income" >
<field name="name">Income</field>
<field name="code">income</field>
<field name="report_type">income</field>
<field name="close_method">none</field>
</record>
<record model="account.account.type" id="account_type_expense">
<field name="name">Expense</field>
<field name="code">expense</field>
<field name="close_method">none</field>
</record>
<record model="account.account.type" id="account_type_expense">
<field name="name">Expense</field>
<field name="code">expense</field>
<field name="report_type">expense</field>
<field name="close_method">none</field>
</record>
<record model="account.account.type" id="account_type_tax">
<field name="name">Tax</field>
<field name="code">tax</field>
<field name="close_method">unreconciled</field>
</record>
<record model="account.account.type" id="account_type_tax">
<field name="name">Tax</field>
<field name="code">tax</field>
<!-- <field name="report_type">?</field> -->
<field name="close_method">unreconciled</field>
</record>
<record model="account.account.type" id="account_type_cash">
<field name="name">Cash</field>
<field name="code">cash</field>
<field name="close_method">balance</field>
</record>
<record model="account.account.type" id="account_type_cash">
<field name="name">Cash</field>
<field name="code">cash</field>
<field name="report_type">asset</field>
<field name="close_method">balance</field>
</record>
<record model="account.account.type" id="account_type_asset">
<field name="name">Asset</field>
<field name="code">asset</field>
<field name="close_method">balance</field>
</record>
<record model="account.account.type" id="account_type_asset">
<field name="name">Asset</field>
<field name="code">asset</field>
<field name="report_type">asset</field>
<field name="close_method">balance</field>
</record>
<record model="account.account.type" id="account_type_equity">
<field name="name">Equity</field>
<field name="code">equity</field>
<field name="close_method">balance</field>
</record>
<record model="account.account.type" id="account_type_equity">
<field name="name">Equity</field>
<field name="code">equity</field>
<field name="report_type">asset</field>
<field name="close_method">balance</field>
</record>
<record model="account.account.type" id="account_type_provision">
<field name="name">Provisions</field>
<field name="code">provision</field>
<field name="close_method">balance</field>
</record>
<record model="account.account.type" id="account_type_provision">
<field name="name">Provisions</field>
<field name="code">provision</field>
<!-- <field name="report_type">?</field> -->
<field name="close_method">balance</field>
</record>
<record model="account.account.type" id="account_type_commitment">
<field name="name">Engagements</field>
<field name="code">commitment</field>
<field name="close_method">balance</field>
</record>
<record model="account.account.type" id="account_type_commitment">
<field name="name">Engagements</field>
<field name="code">commitment</field>
<!-- <field name="report_type">?</field> -->
<field name="close_method">balance</field>
</record>
<record model="account.account.type" id="account_type_stocks">
<field name="name">Actif circulant</field>
<field name="code">current asset</field>
<field name="close_method">balance</field>
</record>
<record model="account.account.type" id="account_type_stocks">
<field name="name">Actif circulant</field>
<field name="code">current asset</field>
<field name="report_type">asset</field>
<field name="close_method">balance</field>
</record>
<record model="account.account.type" id="account_type_special">
<field name="name">Comptes spéciaux</field>
<field name="code">special</field>
<field name="close_method">none</field>
</record>
<!-- Account Templates -->
<record model="account.account.type" id="account_type_special">
<field name="name">Comptes spéciaux</field>
<field name="code">special</field>
<!-- <field name="report_type">?</field> -->
<field name="close_method">none</field>
</record>
<!-- Account Templates -->
<record id="pcg_0" model="account.account.template">
<field name="name">Plan Comptable Général</field>
<field name="code">0</field>
@ -4215,7 +4231,7 @@
<field name="parent_id" ref="pcg_44566"/>
<field name="reconcile" eval="True"/>
</record>
</record>
<record id="pcg_44567" model="account.account.template">
<field name="name">Crédit de TVA à reporter</field>
@ -9239,7 +9255,7 @@
<field name="parent_id" ref="pcg_89"/>
</record>
<!-- <record model="ir.property" id="account.property_account_receivable">
<field name="value" eval="'account.account,'+str(ref('account.a_recv'))"/>
</record>
@ -9254,7 +9270,7 @@
<record model="ir.property" id="account.property_account_income_categ">
<field name="value" eval="'account.account,'+str(ref('account.a_sale'))"/>
</record>
</record>
<record model="account.journal" id="l10n_fr.opening_journal">
<field name="default_debit_account_id" ref="pcg_890"/>
@ -9264,7 +9280,7 @@
<record model="account.journal" id="l10n_fr.closing_journal">
<field name="default_debit_account_id" ref="pcg_891"/>
<field name="default_credit_account_id" ref="pcg_891"/>
</record>
</record>
<record model="ir.values" id="l10n_fr.pl_credit">
<field name="name">pl_credit</field>

View File

@ -12,36 +12,43 @@
<record id="account_type_asset" model="account.account.type">
<field name="name">Asset</field>
<field name="code">asset</field>
<field name="report_type">asset</field>
<field name="close_method">balance</field>
</record>
<record id="account_type_liability" model="account.account.type">
<field name="name">Liability</field>
<field name="name">Liability</field>
<field name="code">liability</field>
<field name="report_type">liability</field>
<field name="close_method">balance</field>
</record>
<record id="account_type_creances" model="account.account.type">
<field name="name">Créances</field>
<field name="name">Créances</field>
<field name="code">creances</field>
<!-- <field name="report_type">?</field> -->
<field name="close_method">balance</field>
</record>
<record id="account_type_cash_equity" model="account.account.type">
<field name="name">Equity</field>
<field name="name">Equity</field>
<field name="code">equity</field>
<field name="report_type">asset</field>
<field name="close_method">balance</field>
</record>
<record id="account_type_income" model="account.account.type">
<field name="name">Income</field>
<field name="name">Income</field>
<field name="code">income</field>
<field name="report_type">income</field>
<field name="close_method">unreconciled</field>
</record>
<record id="account_type_expense" model="account.account.type">
<field name="name">Expense</field>
<field name="name">Expense</field>
<field name="code">expense</field>
<field name="report_type">expense</field>
<field name="close_method">unreconciled</field>
</record>
<record id="account_type_cash_moves" model="account.account.type">
<field name="name">Cash</field>
<field name="name">Cash</field>
<field name="code">cash</field>
<field name="report_type">asset</field>
<field name="close_method">balance</field>
</record>

View File

@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 5.0.0\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2010-08-03 08:26+0000\n"
"Last-Translator: mga (Open ERP) <Unknown>\n"
"PO-Revision-Date: 2010-08-04 08:05+0000\n"
"Last-Translator: vrsb <Unknown>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-08-04 03:36+0000\n"
"X-Launchpad-Export-Date: 2010-08-05 03:35+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: mrp
@ -157,8 +157,8 @@ msgid ""
"Number of operation this workcenter can do in parallel. If this workcenter "
"represent a team of 5 workers, the capacity per cycle is 5."
msgstr ""
"Количество одновременно выполняемых рабочим центром операций. Если рабочиё "
"центр представлен пятью рабочими, этот показатель равен 5"
"Количество одновременно выполняемых участком обработки операций. Если "
"участок обработки представлен пятью рабочими, этот показатель равен 5"
#. module: mrp
#: wizard_button:product.product.procurement,init,create:0
@ -181,7 +181,7 @@ msgstr "Кол-во продукции"
#. module: mrp
#: field:mrp.production,move_lines:0
msgid "Products Consummed"
msgstr ""
msgstr "Израсходовано"
#. module: mrp
#: field:mrp.workcenter,costs_cycle_account_id:0
@ -653,7 +653,7 @@ msgstr ""
#. module: mrp
#: rml:mrp.production.order:0
msgid "WorkCenter"
msgstr ""
msgstr "Участок обработки"
#. module: mrp
#: field:stock.warehouse.orderpoint,product_min_qty:0
@ -813,7 +813,7 @@ msgstr ""
#. module: mrp
#: field:mrp.workcenter,name:0
msgid "Workcenter Name"
msgstr ""
msgstr "Участок обработки"
#. module: mrp
#: view:mrp.production:0
@ -847,7 +847,7 @@ msgstr ""
#: model:ir.ui.menu,name:mrp.menu_mrp_workcenter_action
#: field:mrp.routing,workcenter_lines:0
msgid "Workcenters"
msgstr ""
msgstr "Участки обработки"
#. module: mrp
#: view:mrp.procurement:0

View File

@ -19,46 +19,26 @@
#
##############################################################################
{
"name" : "Accounting and Financial Management",
"version" : "1.1",
"name" : "Outlook Interface",
"version" : "1.0",
"author" : "OpenERP SA",
"category": 'Generic Modules/Accounting',
"description": """Financial and accounting module that covers:
General accountings
Cost / Analytic accounting
Third party accounting
Taxes management
Budgets
Customer and Supplier Invoices
Bank statements
Reconciliation process by partner
Creates a dashboards for accountants that includes:
* List of uninvoiced quotations
* Graph of aged receivables
* Graph of aged incomes
"website" : "http://www.openerp.com/",
"depends" : ["base"],
"category" : "Generic Modules/Outlook interface",
"description": '''
This module provide the Outlook plug-in.
Outlook plug-in allows you to select an object that youd like to add
to your email and its attachments from MS Outlook. You can select a partner, a task,
a project, an analytical account, or any other object and attach selected
mail as .eml file in attachment of selected record.
''',
"init_xml" : [],
"demo_xml" : [],
"update_xml" : [],
"active": False,
"installable": True
The processes like maintaining of general ledger is done through the defined financial Journals (entry move line or
grouping is maintained through journal) for a particular financial year and for preparation of vouchers there is a
module named account_vouchers
""",
'website': 'http://www.openerp.com',
'init_xml': [],
"depends" : ["product", "analytic", "process","board"],
'update_xml': [],
'demo_xml': [],
'test': [
# 'test/account_customer_invoice.yml',
# 'test/account_supplier_invoice.yml',
# 'test/account_change_currency.yml',
# 'test/chart_of_account.yml',
# 'test/account_period_close.yml',
# 'test/account_fiscalyear_close_state.yml',
# #'test/account_invoice_state.yml',
# 'test/account_use_model.yml',
# 'test/account_validate_account_move.yml',
# 'test/account_fiscalyear_close.yml',
],
'installable': True,
'active': False,
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -104,14 +104,6 @@ where prp.id in %s''',(tuple(ids),))
user_uom = obj_tm.id
return user_uom, default_uom
def _compute_duration(self, cr, uid, duration=0.0, to_uom='default'):
uom_obj = self.pool.get('product.uom')
user_uom, default_uom = self._get_user_and_default_uom_ids(cr, uid)
if to_uom == 'default':
return uom_obj._compute_qty(cr, uid, user_uom, duration, default_uom)
else:
return uom_obj._compute_qty(cr, uid, default_uom, duration, user_uom)
def _progress_rate(self, cr, uid, ids, names, arg, context=None):
res = {}.fromkeys(ids, 0.0)
progress = {}
@ -146,12 +138,13 @@ where prp.id in %s''',(tuple(ids),))
p = tocompute.pop()
for i in range(3):
s[i] += progress.get(p, (0.0, 0.0, 0.0))[i]
uom_obj = self.pool.get('product.uom')
user_uom, def_uom = self._get_user_and_default_uom_ids(cr, uid)
if user_uom != def_uom:
s[0] = self._compute_duration(cr, uid, s[0])
s[1] = self._compute_duration(cr, uid, s[1])
s[2] = self._compute_duration(cr, uid, s[2])
s[0] = uom_obj._compute_qty(cr, uid, user_uom, s[0], def_uom)
s[1] = uom_obj._compute_qty(cr, uid, user_uom, s[1], def_uom)
s[2] = uom_obj._compute_qty(cr, uid, user_uom, s[2], def_uom)
if project.state == 'close':
progress_rate = 100.0
@ -345,7 +338,7 @@ class task(osv.osv):
def search(self, cr, user, args, offset=0, limit=None, order=None, context=None, count=False):
for domain in args:
if len(domain) == 3 and domain[0] == 'project_id':
if domain[0] == 'project_id' and (not isinstance(domain[2], str)):
id = isinstance(domain[2], list) and int(domain[2][0]) or int(domain[2])
if id:
if self.pool.get('project.project').read(cr, user, id, ['state'])['state'] == 'template':
@ -364,11 +357,12 @@ class task(osv.osv):
cr.execute("SELECT task_id, COALESCE(SUM(hours),0) FROM project_task_work WHERE task_id IN %s GROUP BY task_id",(tuple(ids),))
hours = dict(cr.fetchall())
uom_obj = self.pool.get('product.uom')
user_uom, default_uom = project_obj._get_user_and_default_uom_ids(cr, uid)
if user_uom != default_uom:
for task in self.browse(cr, uid, ids, context=context):
if hours.get(task.id, False):
dur_in_user_uom = project_obj._compute_duration(cr, uid, duration=hours.get(task.id, 0.0), to_uom='user')
dur_in_user_uom = uom_obj._compute_qty(cr, uid, default_uom, hours.get(task.id, 0.0), user_uom)
hours[task.id] = dur_in_user_uom
for task in self.browse(cr, uid, ids, context=context):
@ -665,11 +659,12 @@ class project_work(osv.osv):
vals['hours'] = 0.00
project_obj = self.pool.get('project.project')
uom_obj = self.pool.get('product.uom')
user_uom, default_uom = project_obj._get_user_and_default_uom_ids(cr, uid)
duration = vals['hours']
if user_uom != default_uom:
duration = project_obj._compute_duration(cr, uid, duration=duration, to_uom='user')
duration = uom_obj._compute_qty(cr, uid, default_uom, duration, user_uom)
cr.execute('update project_task set remaining_hours=remaining_hours - %s where id=%s', (duration, vals['task_id']))
return super(project_work,self).create(cr, uid, vals, *args, **kwargs)
@ -680,6 +675,7 @@ class project_work(osv.osv):
vals['hours'] = 0.00
project_obj = self.pool.get('project.project')
uom_obj = self.pool.get('product.uom')
user_uom, default_uom = project_obj._get_user_and_default_uom_ids(cr, uid)
duration = vals['hours']
@ -688,8 +684,8 @@ class project_work(osv.osv):
cr.execute('update project_task set remaining_hours=remaining_hours - %s + (%s) where id=%s', (duration, work.hours, work.task_id.id))
else:
for work in self.browse(cr, uid, ids, context):
duration = project_obj._compute_duration(cr, uid, duration=duration, to_uom='user')
del_work = project_obj._compute_duration(cr, uid, duration=work.hours, to_uom='user')
duration = uom_obj._compute_qty(cr, uid, default_uom, duration, user_uom)
del_work = uom_obj._compute_qty(cr, uid, default_uom, work.hours, user_uom)
cr.execute('update project_task set remaining_hours=remaining_hours - %s + (%s) where id=%s', (duration, del_work, work.task_id.id))
return super(project_work,self).write(cr, uid, ids, vals, context)
@ -704,7 +700,7 @@ class project_work(osv.osv):
cr.execute('update project_task set remaining_hours=remaining_hours + %s where id=%s', (work.hours, work.task_id.id))
else:
for work in self.browse(cr, uid, ids, context):
duration = project_obj._compute_duration(cr, uid, duration=work.hours, to_uom='user')
duration = uom_obj._compute_qty(cr, uid, default_uom, work.hours, user_uom)
cr.execute('update project_task set remaining_hours=remaining_hours + %s where id=%s', (duration, work.task_id.id))
return super(project_work,self).unlink(cr, uid, ids, *args, **kwargs)
@ -735,7 +731,35 @@ class config_compute_remaining(osv.osv_memory):
_defaults = {
'remaining_hours': _get_remaining
}
def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False, submenu=False):
users_obj = self.pool.get('res.users')
obj_tm = users_obj.browse(cr, uid, uid, context).company_id.project_time_mode_id
tm = obj_tm and obj_tm.name or 'Hours'
res = super(config_compute_remaining, self).fields_view_get(cr, uid, view_id, view_type, context, toolbar, submenu=submenu)
if tm in ['Hours','Hour']:
return res
eview = etree.fromstring(res['arch'])
def _check_rec(eview):
if eview.attrib.get('widget','') == 'float_time':
eview.set('widget','float')
for child in eview:
_check_rec(child)
return True
_check_rec(eview)
res['arch'] = etree.tostring(eview)
for f in res['fields']:
if 'Hours' in res['fields'][f]['string']:
res['fields'][f]['string'] = res['fields'][f]['string'].replace('Hours',tm)
return res
def compute_hours(self, cr, uid, ids, context=None):
if context is None:
context = {}
@ -762,7 +786,7 @@ class config_compute_remaining(osv.osv_memory):
return {
'type': 'ir.actions.act_window_close',
}
config_compute_remaining()
class message(osv.osv):

View File

@ -214,7 +214,7 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Reevaluate Hours">
<separator colspan="4" string="Change Remaining Hours"/>
<separator colspan="4" string="Change Remaining Time"/>
<newline/>
<field name="remaining_hours" widget="float_time"/>
<separator string="" colspan="4"/>

View File

@ -64,10 +64,13 @@ class procurement_order(osv.osv):
# Creating a project for task.Project is created from Procurement.
project_obj = self.pool.get('project.project')
proj_name = tools.ustr(so_ref)
product_project_id =procurement.product_id.project_id and procurement.product_id.project_id.id or False
product_project = procurement.product_id.project_id or False
proj_exist_id = project_obj.search(cr, uid, [('name', '=', proj_name)], context=context)
if not proj_exist_id:
project_id = project_obj.create(cr, uid, {'name': proj_name, 'partner_id': partner_id,'parent_id':product_project_id})
if not proj_exist_id:
parent_project = False
if product_project:
parent_project = product_project.analytic_account_id.id
project_id = project_obj.create(cr, uid, {'name': proj_name, 'partner_id': partner_id, 'parent_id': parent_project})
else:
project_id = proj_exist_id[0]

View File

@ -27,8 +27,10 @@ from osv import fields, osv
class project_project(osv.osv):
_inherit = 'project.project'
def write(self, cr, uid, ids,vals, *args, **kwargs):
if 'date' in vals and vals['date']:
def write(self, cr, uid, ids, vals, *args, **kwargs):
if isinstance(ids, (int, long)):
ids = [ids]
if vals.get('date', False):
data_project = self.browse(cr, uid, ids)
for prj in data_project:
new_end_date = date(*time.strptime(vals['date'],'%Y-%m-%d')[:3])
@ -39,9 +41,9 @@ class project_project(osv.osv):
start_dt = (date(*time.strptime(str(task.date_start),'%Y-%m-%d %H:%M:%S')[:3])+(new_end_date-old_end_date)).strftime('%Y-%m-%d %H:%M:%S')
if task.date_deadline:
deadline_dt = (datetime(*time.strptime(str(task.date_deadline),'%Y-%m-%d')[:3])+(new_end_date-old_end_date)).strftime('%Y-%m-%d')
self.pool.get('project.task').write(cr, uid, task.id, {'date_start':start_dt, 'date_deadline':deadline_dt})
self.pool.get('project.task').write(cr, uid, [task.id], {'date_start':start_dt, 'date_deadline':deadline_dt})
else:
self.pool.get('project.task').write(cr, uid, task.id, {'date_start':start_dt})
self.pool.get('project.task').write(cr, uid, [task.id], {'date_start':start_dt})
return super(project_project,self).write(cr, uid, ids, vals, *args, **kwargs)
project_project()

View File

@ -60,7 +60,10 @@ class project_work(osv.osv):
def create(self, cr, uid, vals, *args, **kwargs):
obj_timesheet = self.pool.get('hr.analytic.timesheet')
project_obj = self.pool.get('project.project')
task_obj = self.pool.get('project.task')
uom_obj = self.pool.get('product.uom')
vals_line = {}
context = kwargs.get('context', {})
obj_task = task_obj.browse(cr, uid, vals['task_id'])
@ -69,7 +72,12 @@ class project_work(osv.osv):
vals_line['user_id'] = vals['user_id']
vals_line['product_id'] = result['product_id']
vals_line['date'] = vals['date'][:10]
#calculate quantity based on employee's product's uom
vals_line['unit_amount'] = vals['hours']
user_uom, default_uom = project_obj._get_user_and_default_uom_ids(cr, uid)
if result['product_uom_id'] != default_uom:
vals_line['unit_amount'] = uom_obj._compute_qty(cr, uid, default_uom, vals['hours'], result['product_uom_id'])
acc_id = obj_task.project_id.analytic_account_id.id
vals_line['account_id'] = acc_id
res = obj_timesheet.on_change_account_id(cr, uid, False, acc_id)
@ -88,7 +96,7 @@ class project_work(osv.osv):
amount_unit = obj_timesheet.on_change_unit_amount(cr, uid, timeline_id,
prod_id, amount, unit, context=context)
if amount_unit and 'amount' in amount_unit.get('value',{}):
updv = { 'amount': amount_unit['value']['amount'] * (-1.0) }
updv = { 'amount': amount_unit['value']['amount'] }
obj_timesheet.write(cr, uid, [timeline_id], updv, context=context)
vals['hr_analytic_timesheet_id'] = timeline_id
return super(project_work,self).create(cr, uid, vals, *args, **kwargs)
@ -98,6 +106,9 @@ class project_work(osv.osv):
context = {}
obj = self.pool.get('hr.analytic.timesheet')
timesheet_obj = self.pool.get('hr.analytic.timesheet')
project_obj = self.pool.get('project.project')
uom_obj = self.pool.get('product.uom')
if isinstance(ids, (long, int)):
ids = [ids,]
@ -120,15 +131,20 @@ class project_work(osv.osv):
if 'date' in vals:
vals_line['date'] = vals['date'][:10]
if 'hours' in vals:
user_uom, default_uom = project_obj._get_user_and_default_uom_ids(cr, uid)
vals_line['unit_amount'] = vals['hours']
prod_id = vals_line.get('product_id', line_id.product_id.id) # False may be set
if result['product_uom_id'] and (not result['product_uom_id'] == default_uom):
vals_line['unit_amount'] = uom_obj._compute_qty(cr, uid, default_uom, vals['hours'], result['product_uom_id'])
# Compute based on pricetype
amount_unit = obj.on_change_unit_amount(cr, uid, line_id.id,
prod_id=prod_id,
unit_amount=vals_line['unit_amount'], unit=False, context=context)
if amount_unit and 'amount' in amount_unit.get('value',{}):
vals_line['amount'] = amount_unit['value']['amount'] * (-1.0)
vals_line['amount'] = amount_unit['value']['amount']
obj.write(cr, uid, [line_id.id], vals_line, context=context)
@ -139,7 +155,7 @@ class project_work(osv.osv):
hat_ids = []
for task in self.browse(cr, uid, ids):
if task.hr_analytic_timesheet_id:
hat_ids.append(task.hr_analytic_timesheet_id)
hat_ids.append(task.hr_analytic_timesheet_id.id)
# delete entry from timesheet too while deleting entry to task.
if hat_ids:
hat_obj.unlink(cr, uid, hat_ids, *args, **kwargs)

View File

@ -91,7 +91,6 @@
work_ids:
- date: '2010-06-03 15:04:47'
hours: 10.0
hr_analytic_timesheet_id: 3L
name: Get work calendar of all employees
user_id: res_users_hrmanager0

View File

@ -57,7 +57,7 @@
'test': [
'test/purchase_from_order.yml',
'test/purchase_from_manual.yml',
# 'test/purchase_from_picking.yml',
'test/purchase_from_picking.yml',
'purchase_unit_test.xml',
'test/procurement_buy.yml',
],

View File

@ -8,14 +8,14 @@ msgstr ""
"Project-Id-Version: pt_BR\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2010-08-03 17:09+0000\n"
"PO-Revision-Date: 2010-08-04 20:16+0000\n"
"Last-Translator: Renato Lima - http://www.akretion.com "
"<renatonlima@gmail.com>\n"
"Language-Team: <pt@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-08-04 03:37+0000\n"
"X-Launchpad-Export-Date: 2010-08-05 03:35+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: purchase
@ -26,7 +26,7 @@ msgstr "Faturamento & Pago"
#. module: purchase
#: model:process.node,note:purchase.process_node_invoiceafterpacking0
msgid "Supplier Invoice pre-generated on receptions for control"
msgstr ""
msgstr "Fatura do fornecedor pré-gerada nos recebimentos para controle"
#. module: purchase
#: field:purchase.order,location_id:0
@ -207,7 +207,7 @@ msgstr ""
#. module: purchase
#: field:purchase.order,origin:0
msgid "Origin"
msgstr ""
msgstr "Origem"
#. module: purchase
#: model:process.node,name:purchase.process_node_packinglist0
@ -265,6 +265,12 @@ msgid ""
"Manual: no invoice will be pre-generated. The accountant will have to encode "
"manually."
msgstr ""
"Da Ordem: Uma fatura provisória será gerada com base na ordem de compra. O "
"contador só precisa validar esta fatura para controle.\n"
"Da Seleção da Recepção: Uma fatura provisória será gerada baseada nas "
"recepções validadas.\n"
"Manual: Nenhuma fatura será gerada. O contador deverá codificá-la "
"manualmente."
#. module: purchase
#: model:process.node,note:purchase.process_node_packinginvoice0
@ -331,6 +337,7 @@ msgstr "Order Lines"
#: model:process.transition,note:purchase.process_transition_confirmingpurchaseorder1
msgid "Confirm Purchase order from Request for quotation without origin"
msgstr ""
"Confirmar Ordem de Compra a partir da Requisição de Cotação sem origem"
#. module: purchase
#: rml:purchase.quotation:0
@ -401,7 +408,7 @@ msgstr "Lista de Preços"
#. module: purchase
#: model:process.node,note:purchase.process_node_purchaseorder0
msgid "When controlling invoice from orders"
msgstr ""
msgstr "Quando controlada notas fiscais pelas ordens"
#. module: purchase
#: constraint:ir.ui.view:0
@ -411,7 +418,7 @@ msgstr "Invalid XML for View Architecture!"
#. module: purchase
#: model:process.node,note:purchase.process_node_invoicecontrol0
msgid "Pre-generated supplier invoice to control based on order"
msgstr ""
msgstr "Notas fiscais de entredas pré-geradas em controle baseado na ordem"
#. module: purchase
#: model:process.transition,name:purchase.process_transition_invoicefrompurchase0
@ -561,7 +568,7 @@ msgstr "Requisição de Cotação é proposta pelo sistema."
#. module: purchase
#: model:process.transition,name:purchase.process_transition_packinginvoice0
msgid "Packing Invoice"
msgstr ""
msgstr "Faturar embalagem"
#. module: purchase
#: model:process.transition,note:purchase.process_transition_invoicefrompackinglist0
@ -765,6 +772,9 @@ msgid ""
"Module for purchase management\n"
" Request for quotation, Create Supplier Invoice, Print Order..."
msgstr ""
"Módulo para gerenciamento de compra\n"
" Pedido de Cotação, Criação de Fatura de Fornecedor, Impressão de "
"Ordem..."
#. module: purchase
#: field:purchase.order.line,product_id:0

View File

@ -56,6 +56,10 @@
'report/sale_journal_report_view.xml',
],
'demo_xml': ['sale_journal_demo.xml'],
'test': [
'test/sale_journal.yml',
'test/picking_journal.yml',
],
'installable': True,
'active': False,
'certificate': '0077661619085',

View File

@ -0,0 +1,87 @@
-
In order to test the sale_journal module in OpenERP,
I create a picking journal
-
!record {model: sale_journal.picking.journal, id: sale_journal_picking_journal_pickjournal0}:
code: PJ
date: '2010-08-04'
date_created: '2010-08-04'
name: Pick_journal
state: draft
user_id: base.user_root
-
I create a picking for product keyboard, quantity 50
-
!record {model: stock.picking, id: stock_picking_out0}:
address_id: base.res_partner_address_6
company_id: base.main_company
invoice_state: none
journal_id: sale_journal_picking_journal_pickjournal0
move_lines:
- company_id: base.main_company
date_expected: '2010-08-04 14:09:38'
date_planned: '2010-08-04 14:09:38'
location_id: stock.stock_location_stock
product_id: product.product_product_24
product_qty: 50.0
product_uom: product.product_uom_unit
location_dest_id: stock.stock_location_customers
name: '[KEYA] Keyboard - AZERTY'
product_uos_qty: 50.0
move_type: direct
name: OUT/00007
type: out
-
I verify that a Journal consist of picking order
-
!python {model: sale_journal.picking.journal}: |
pick_jour = self.browse(cr, uid, ref("sale_journal_picking_journal_pickjournal0"))
assert pick_jour.picking_stats_ids, "Journal does not consist of a picking order"
-
Then I click on the 'Open Journal' button
-
!python {model: sale_journal.picking.journal}: |
self.button_open(cr, uid, [ref("sale_journal_picking_journal_pickjournal0")], {"lang": "en_US", "search_default_user_id":
1, "tz": False, "active_model": "ir.ui.menu", "active_ids": [ref("sale_journal.menu_definition_journal_picking")],
"active_id": ref("sale_journal.menu_definition_journal_picking")})
-
I verify that a state of journal has transit from draft to open state
-
!python {model: sale_journal.picking.journal}: |
pick_jour = self.browse(cr, uid, ref("sale_journal_picking_journal_pickjournal0"))
assert (pick_jour.state == 'open'), "Journal is not in the open state"
-
Then I click on the 'Confirm Picking' button
-
!python {model: sale_journal.picking.journal}: |
self.button_picking_confirm(cr, uid, [ref("sale_journal_picking_journal_pickjournal0")], {"lang": "en_US", "search_default_user_id":
1, "tz": False, "active_model": "ir.ui.menu", "active_ids": [ref("sale_journal.menu_definition_journal_picking")],
"active_id": ref("sale_journal.menu_definition_journal_picking")})
-
I verify that a state of journal has transit from open to confirm state
-
!python {model: sale_journal.picking.journal}: |
pick_jour = self.browse(cr, uid, ref("sale_journal_picking_journal_pickjournal0"))
assert (pick_jour.state == 'confirm'), "Journal is not in the open state"
-
I verify that an picking order is now in the confirm state
-
!python {model: stock.picking}: |
pick_jour_obj = self.pool.get('sale_journal.picking.journal')
jour = pick_jour_obj.browse(cr, uid, ref("sale_journal_picking_journal_pickjournal0"))
stock_pick = self.browse(cr, uid, ref("stock_picking_out0"))
pick_jour = self.search(cr, uid, [('journal_id','=',jour.name) and ('state','=','confirmed')])
assert pick_jour, "Sale order is not in the confirm state"
-
Then I click on the 'Close Journal' button
-
!python {model: sale_journal.picking.journal}: |
self.button_close(cr, uid, [ref("sale_journal_picking_journal_pickjournal0")], {"lang": "en_US", "search_default_user_id":
1, "tz": False, "active_model": "ir.ui.menu", "active_ids": [ref("sale_journal.menu_definition_journal_picking")],
"active_id": ref("sale_journal.menu_definition_journal_picking")})
-
I verify that a state of journal has transit from confirm to close state
-
!python {model: sale_journal.picking.journal}: |
pick_jour = self.browse(cr, uid, ref("sale_journal_picking_journal_pickjournal0"))
assert (pick_jour.state == 'close'), "Journal is not in the open state"

View File

@ -0,0 +1,95 @@
-
In order to test the sale_journal module in OpenERP,
I create a sale journal and place a sale order related to a journal
-
I create a sale journal
-
!record {model: sale_journal.sale.journal, id: sale_journal_sale_journal_journal0}:
code: J1
date: '2010-08-04'
date_created: '2010-08-04'
name: Journal_1
state: draft
user_id: base.user_root
-
I place a sale order for product keyboard, quantity 100
-
!record {model: sale.order, id: sale_order_so0}:
date_order: '2010-08-04'
invoice_quantity: order
invoice_type_id: sale_journal.daily
journal_id: sale_journal_sale_journal_journal0
name: Test_SO012
order_line:
- name: '[KEYA] Keyboard - AZERTY'
price_unit: 7.0
product_uom: product.product_uom_unit
product_uom_qty: 100.0
state: draft
delay: 7.0
product_id: product.product_product_24
product_uos_qty: 100.0
th_weight: 0.0
type: make_to_stock
order_policy: manual
partner_id: base.res_partner_4
partner_invoice_id: base.res_partner_address_7
partner_order_id: base.res_partner_address_7
partner_shipping_id: base.res_partner_address_7
picking_policy: direct
pricelist_id: product.list0
shop_id: sale.shop
-
I verify that a Journal consist of sale order
-
!python {model: sale_journal.sale.journal}: |
sal_jour = self.browse(cr, uid, ref("sale_journal_sale_journal_journal0"))
assert sal_jour.sale_stats_ids, "Journal does not consist of a sale order details"
-
Then I click on the 'Open Journal' button
-
!python {model: sale_journal.sale.journal}: |
self.button_open(cr, uid, [ref("sale_journal_sale_journal_journal0")], {"lang": "en_US", "search_default_user_id":
1, "tz": False, "active_model": "ir.ui.menu", "active_ids": [ref("sale_journal.menu_definition_journal")],
"active_id": ref("sale_journal.menu_definition_journal")})
-
I verify that a state of journal has transit from draft to open state
-
!python {model: sale_journal.sale.journal}: |
sal_jour = self.browse(cr, uid, ref("sale_journal_sale_journal_journal0"))
assert (sal_jour.state == 'open'), "Journal is not in the open state"
-
Then I click on the 'Confirm Sales' button
-
!python {model: sale_journal.sale.journal}: |
self.button_sale_confirm(cr, uid, [ref("sale_journal_sale_journal_journal0")], {"lang": "en_US", "search_default_user_id":
1, "tz": False, "active_model": "ir.ui.menu", "active_ids": [ref("sale_journal.menu_definition_journal")],
"active_id": ref("sale_journal.menu_definition_journal")})
-
I verify that a state of journal has transit from open to confirm state
-
!python {model: sale_journal.sale.journal}: |
sal_jour = self.browse(cr, uid, ref("sale_journal_sale_journal_journal0"))
assert (sal_jour.state == 'confirm'), "Journal is not in the confirm state"
-
I verify that a sale order is now in the confirm state
-
!python {model: sale.order}: |
sale_jour_obj = self.pool.get('sale_journal.sale.journal')
jour = sale_jour_obj.browse(cr, uid, ref("sale_journal_sale_journal_journal0"))
so = self.browse(cr, uid, ref("sale_order_so0"))
so_jour = self.search(cr, uid, [('journal_id','=',jour.name) and ('state','=','manual')])
assert so_jour, "Sale order is not in the confirm state"
-
Then I click on the 'Close Journal' button
-
!python {model: sale_journal.sale.journal}: |
self.button_close(cr, uid, [ref("sale_journal_sale_journal_journal0")], {"lang": "en_US", "search_default_user_id":
1, "tz": False, "active_model": "ir.ui.menu", "active_ids": [ref("sale_journal.menu_definition_journal")],
"active_id": ref("sale_journal.menu_definition_journal")})
-
I verify that a state of journal has transit from confirm to close state
-
!python {model: sale_journal.sale.journal}: |
sal_jour = self.browse(cr, uid, ref("sale_journal_sale_journal_journal0"))
assert (sal_jour.state == 'close'), "Journal is not in the close state"

View File

@ -38,6 +38,7 @@
'sale_mrp_view.xml',
],
'demo_xml': [],
'test':['test/sale_mrp.yml'],
'installable': True,
'active': False,
'certificate': '',

View File

@ -0,0 +1,145 @@
-
In order to test the sale_mrp module in OpenERP,I start by creating a new product 'Slider Mobile'
-
I define product category Mobile Products Sellable.
-
!record {model: product.category, id: product_category_allproductssellable0}:
name: Mobile Products Sellable
-
I define product category Mobile Services.
-
!record {model: product.category, id: product_category_services0}:
name: Mobile Services
-
I define product template for Slider Mobile.
-
!record {model: product.template, id: product_template_slidermobile0}:
categ_id: product_category_allproductssellable0
cost_method: standard
list_price: 200.0
mes_type: fixed
name: Slider Mobile
procure_method: make_to_order
standard_price: 189.0
supply_method: produce
type: product
uom_id: product.product_uom_unit
uom_po_id: product.product_uom_unit
-
I define a product Slider Mobile
-
!record {model: product.product, id: product_product_slidermobile0}:
categ_id: product_category_allproductssellable0
cost_method: standard
list_price: 200.0
mes_type: fixed
name: Slider Mobile
pricelist_purchase: 'Default Purchase Pricelist (0.00) : 189.00\n'
pricelist_sale: 'Public Pricelist (0.00) : 200.00\n'
procure_method: make_to_order
seller_delay: '1'
seller_ids:
- delay: 1
name: base.res_partner_agrolait
min_qty: 2.0
qty: 5.0
standard_price: 189.0
supply_method: produce
type: product
uom_id: product.product_uom_unit
uom_po_id: product.product_uom_unit
-
I create a Bill of Material record for Slider Mobile
-
!record {model: mrp.bom, id: mrp_bom_slidermobile0}:
company_id: base.main_company
name: Slider Mobile
product_efficiency: 1.0
product_id: product_product_slidermobile0
product_qty: 1.0
product_uom: product.product_uom_unit
product_uos_qty: 0.0
sequence: 0.0
type: normal
-
I create a sale order for product Slider mobile
-
!record {model: sale.order, id: sale_order_so0}:
client_order_ref: ref1
date_order: '2010-08-4'
invoice_quantity: order
name: Test_SO001
order_line:
- name: Slider Mobile
price_unit: 200
product_uom: product.product_uom_unit
product_uom_qty: 500.0
state: draft
delay: 7.0
product_id: product_product_slidermobile0
product_uos_qty: 500.0
type: make_to_order
order_policy: manual
partner_id: base.res_partner_4
partner_invoice_id: base.res_partner_address_7
partner_order_id: base.res_partner_address_7
partner_shipping_id: base.res_partner_address_7
picking_policy: direct
pricelist_id: product.list0
shop_id: sale.shop
-
I confirm the sale order
-
!workflow {model: sale.order, action: order_confirm, ref: sale_order_so0}
-
I verify that a procurement has been generated for sale order
-
!python {model: procurement.order}: |
from tools.translate import _
sale_order_obj = self.pool.get('sale.order')
so = sale_order_obj.browse(cr, uid, ref("sale_order_so0"))
proc_ids = self.search(cr, uid, [('origin','=',so.name)])
assert proc_ids, _('No Procurements!')
-
Then I click on the "Run Procurement" button
-
!python {model: procurement.order}: |
sale_order_obj = self.pool.get('sale.order')
so = sale_order_obj.browse(cr, uid, ref("sale_order_so0"))
import netsvc
wf_service = netsvc.LocalService("workflow")
proc_ids = self.search(cr, uid, [('origin','=',so.name)])
for proc in proc_ids:
wf_service.trg_validate(uid, 'procurement.order',proc,'button_check', cr)
-
I verify that a procurement state is "running"
-
!python {model: procurement.order}: |
sale_order_obj = self.pool.get('sale.order')
so = sale_order_obj.browse(cr, uid, ref("sale_order_so0"))
proc_ids = self.search(cr, uid, [('origin','=',so.name) and ('state','=','running')])
assert proc_ids, _('Procurement is not in the running state!')
-
I verify that a manufacturing order has been generated
-
!python {model: sale.order}: |
so = self.browse(cr, uid, ref("sale_order_so0"))
mnf_obj=self.pool.get('mrp.production')
mnf_id=mnf_obj.search(cr, uid, [('origin','=',so.name)])
assert mnf_id, _('Manufacturing order has not been generated')
-
I verify that a 'Sale Name' field of Manufacturing order gets bind with the value
-
!python {model: sale.order}: |
so = self.browse(cr, uid, ref("sale_order_so0"))
mnf_obj=self.pool.get('mrp.production')
mnf_id=mnf_obj.search(cr, uid, [('sale_name','=',so.name)])
assert mnf_id, _('Sale Name is not bind with the value')
-
I verify that a 'Sale Reference' field of Manufacturing order gets bind with the value
-
!python {model: sale.order}: |
so = self.browse(cr, uid, ref("sale_order_so0"))
mnf_obj=self.pool.get('mrp.production')
mnf_id=mnf_obj.search(cr, uid, [('sale_ref','=',so.client_order_ref)])
assert mnf_id, _('Sale Reference is not bind with the value')

View File

@ -13,7 +13,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-08-04 03:35+0000\n"
"X-Launchpad-Export-Date: 2010-08-05 03:35+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: stock

View File

@ -152,11 +152,11 @@
</para>
</td>
<td>
<para style="terp_tblheader_Details">[[ picking.sale_id and picking.sale_id.partner_shipping_id and 'Shipping Address :' or removeParentNode('para') ]] </para>
<para style="terp_default_9">[[ (picking.sale_id and picking.sale_id.partner_shipping_id and picking.sale_id.partner_shipping_id.title) or '' ]] [[ (picking.sale_id and picking.sale_id.partner_shipping_id and picking.sale_id.partner_shipping_id.name) or '' ]] </para>
<para style="terp_default_9">[[ (picking.sale_id and picking.sale_id.partner_shipping_id and picking.sale_id.partner_shipping_id.street) or '' ]] </para>
<para style="terp_default_9">[[ (picking.sale_id and picking.sale_id.partner_shipping_id and picking.sale_id.partner_shipping_id.zip) or '' ]] [[ (picking.sale_id and picking.sale_id.partner_shipping_id and picking.sale_id.partner_shipping_id.city) or '' ]] [[ (picking.address_id and picking.address_id.state_id and picking.address_id.state_id.name) or '' ]] </para>
<para style="terp_default_9">[[ (picking.address_id and picking.address_id.country_id and picking.address_id.country_id.name) or '' ]]</para>
<para style="terp_tblheader_Details">[[ 'sale_id' in picking._columns.keys() and picking.sale_id and picking.sale_id.partner_shipping_id and 'Shipping Address :' or removeParentNode('para') ]] </para>
<para style="terp_default_9">[[ ('sale_id' in picking._columns.keys() and picking.sale_id and picking.sale_id.partner_shipping_id and picking.sale_id.partner_shipping_id.title) or '' ]] [[ ('sale_id' in picking._columns.keys() and picking.sale_id and picking.sale_id.partner_shipping_id and picking.sale_id.partner_shipping_id.name) or '' ]] </para>
<para style="terp_default_9">[[ ('sale_id' in picking._columns.keys() and picking.sale_id and picking.sale_id.partner_shipping_id and picking.sale_id.partner_shipping_id.street) or '' ]] </para>
<para style="terp_default_9">[[ ('sale_id' in picking._columns.keys() and picking.sale_id and picking.sale_id.partner_shipping_id and picking.sale_id.partner_shipping_id.zip) or '' ]] [[ ('sale_id' in picking._columns.keys() and picking.sale_id and picking.sale_id.partner_shipping_id and picking.sale_id.partner_shipping_id.city) or '' ]] [[ (picking.address_id and picking.address_id.state_id and picking.address_id.state_id.name) or '' ]] </para>
<para style="terp_default_9">[[ ('sale_id' in picking._columns.keys() and picking.address_id and picking.address_id.country_id and picking.address_id.country_id.name) or '' ]]</para>
</td>
</tr>
</blockTable>
@ -204,7 +204,7 @@
<para style="terp_default_Centre_8">[[ picking.origin ]]</para>
</td>
<td>
<para style="terp_default_Centre_8">[[ (picking.sale_id and picking.sale_id.partner_shipping_id and picking.sale_id.partner_shipping_id and picking.sale_id.partner_shipping_id.title) or '' ]] [[ (picking.sale_id and picking.sale_id.partner_shipping_id and picking.sale_id.partner_shipping_id.name) or '' ]] </para>
<para style="terp_default_Centre_8">[[ ('sale_id' in picking._columns.keys() and picking.sale_id and picking.sale_id.partner_shipping_id and picking.sale_id.partner_shipping_id and picking.sale_id.partner_shipping_id.title) or '' ]] [[ ('sale_id' in picking._columns.keys() and picking.sale_id and picking.sale_id.partner_shipping_id and picking.sale_id.partner_shipping_id.name) or '' ]] </para>
</td>
<td>
<para style="terp_default_Centre_8">[[ formatLang(picking.min_date,date_time = True) ]]</para>

View File

@ -242,7 +242,7 @@
</para>
<section>
<para style="terp_default_8">[[ repeatIn([line for line in picking.move_lines if (line.state == 'assigned' )],'move_lines') ]]</para>
<blockTable colWidths="257.0,58.0,61.0,46.0,26.0,74.0" style="Move_Line_Contect_Assign_State">
<blockTable colWidths="257.0,58.0,61.0,46.0,26.0,74.0" style="Move_Line_Contect_Assign_State">[[ picking.move_lines or removeParentNode('blockTable')]]
<tr>
<td>
<para style="terp_default_9"><font> [ [[ (move_lines.product_id.default_code) or removeParentNode('font') ]] ] </font> <font> [[ move_lines.product_id.name ]] [[ move_lines.product_id.variants or '']] </font> </para>
@ -274,7 +274,7 @@
</section>
<section>
<para style="terp_default_8">[[ repeatIn([line for line in picking.move_lines if (line.state != 'assigned' )],'move_lines') and removeParentNode('section') ]]</para>
<blockTable colWidths="257.0,57.0,62.0,46.0,26.0,74.0" style="Move_Line_Content_Other_State">
<blockTable colWidths="257.0,57.0,62.0,46.0,26.0,74.0" style="Move_Line_Content_Other_State">[[ picking.move_lines or removeParentNode('blockTable')]]
<tr>
<td>
<para style="terp_default_9"><font> [ [[ (move_lines.product_id.default_code) or removeParentNode('font') ]] ] </font> <font> [[ move_lines.product_id.name ]] [[ move_lines.product_id.variants or '']] </font> </para>

View File

@ -112,7 +112,6 @@ class stock_location(osv.osv):
res[id] = {}.fromkeys(field_names, 0.0)
if ('product_id' not in context) or not ids:
return res
#location_ids = self.search(cr, uid, [('location_id', 'child_of', ids)])
for loc in ids:
context['location'] = [loc]
prod = self.pool.get('product.product').browse(cr, uid, context['product_id'], context)
@ -176,7 +175,6 @@ class stock_location(osv.osv):
'stock_real': fields.function(_product_qty_available, method=True, type='float', string='Real Stock', multi="stock"),
'stock_virtual': fields.function(_product_qty_available, method=True, type='float', string='Virtual Stock', multi="stock"),
#'account_id': fields.many2one('account.account', string='Inventory Account', domain=[('type', '!=', 'view')]),
'location_id': fields.many2one('stock.location', 'Parent Location', select=True, ondelete='cascade'),
'child_ids': fields.one2many('stock.location', 'location_id', 'Contains'),
@ -308,7 +306,6 @@ class stock_location(osv.osv):
# Choose the right filed standard_price to read
amount_unit = product.price_get(pricetype.field, context)[product.id]
price = qty[product_id] * amount_unit
# price = qty[product_id] * product.standard_price
total_price += price
result['product'].append({
@ -360,13 +357,6 @@ class stock_location(osv.osv):
def _product_virtual_get(self, cr, uid, id, product_ids=False, context=None, states=['done']):
return self._product_all_get(cr, uid, id, product_ids, context, ['confirmed', 'waiting', 'assigned', 'done'])
#
# TODO:
# Improve this function
#
# Returns:
# [ (tracking_id, product_qty, location_id) ]
#
def _product_reserve(self, cr, uid, ids, product_id, product_qty, context=None):
"""
@param product_id: Id of product
@ -629,13 +619,6 @@ class stock_picking(osv.osv):
# TODO: Check locations to see if in the same location ?
return True
# def button_confirm(self, cr, uid, ids, *args):
# for id in ids:
# wf_service = netsvc.LocalService("workflow")
# wf_service.trg_validate(uid, 'stock.picking', id, 'button_confirm', cr)
# self.force_assign(cr, uid, ids, *args)
# return True
def action_assign(self, cr, uid, ids, *args):
""" Changes state of picking to available if all moves are confirmed.
@return: True
@ -654,7 +637,6 @@ class stock_picking(osv.osv):
wf_service = netsvc.LocalService("workflow")
for pick in self.browse(cr, uid, ids):
move_ids = [x.id for x in pick.move_lines if x.state in ['confirmed','waiting']]
# move_ids = [x.id for x in pick.move_lines]
self.pool.get('stock.move').force_assign(cr, uid, move_ids)
wf_service.trg_write(uid, 'stock.picking', pick.id, cr)
return True
@ -669,9 +651,6 @@ class stock_picking(osv.osv):
raise osv.except_osv(_('Error !'),_('You can not process picking without stock moves'))
wf_service.trg_validate(uid, 'stock.picking', pick.id,
'button_confirm', cr)
#move_ids = [x.id for x in pick.move_lines]
#self.pool.get('stock.move').force_assign(cr, uid, move_ids)
#wf_service.trg_write(uid, 'stock.picking', pick.id, cr)
return True
def draft_validate(self, cr, uid, ids, *args):
@ -897,7 +876,7 @@ class stock_picking(osv.osv):
'origin': (invoice.origin or '') + ', ' + (picking.name or '') + (picking.origin and (':' + picking.origin) or ''),
'comment': (comment and (invoice.comment and invoice.comment+"\n"+comment or comment)) or (invoice.comment and invoice.comment or ''),
'date_invoice':context.get('date_inv',False),
'user_id':picking.sale_id.user_id and picking.sale_id.user_id.id or False
'user_id':uid
}
invoice_obj.write(cr, uid, [invoice_id], invoice_vals, context=context)
else:
@ -914,7 +893,7 @@ class stock_picking(osv.osv):
'fiscal_position': partner.property_account_position.id,
'date_invoice': context.get('date_inv',False),
'company_id': picking.company_id.id,
'user_id':picking.sale_id.user_id and picking.sale_id.user_id.id or False
'user_id':uid
}
cur_id = self.get_currency_id(cr, uid, picking)
if cur_id:
@ -1377,7 +1356,6 @@ class stock_move(osv.osv):
'prodlot_id': fields.many2one('stock.production.lot', 'Production Lot', help="Production lot is used to put a serial number on the production"),
'tracking_id': fields.many2one('stock.tracking', 'Pack', select=True, help="This is the code that will be put on the logistical unit: pallet, box, pack."),
# 'lot_id': fields.many2one('stock.lot', 'Consumer lot', select=True, readonly=True),
'auto_validate': fields.boolean('Auto Validate'),
@ -1576,7 +1554,6 @@ class stock_move(osv.osv):
""" Confirms stock move.
@return: List of ids.
"""
# ids = map(lambda m: m.id, moves)
moves = self.browse(cr, uid, ids)
self.write(cr, uid, ids, {'state': 'confirmed'})
i = 0
@ -1692,7 +1669,6 @@ class stock_move(osv.osv):
r = res.pop(0)
move_id = self.copy(cr, uid, move.id, {'product_qty': r[0], 'location_id': r[1]})
done.append(move_id)
#cr.execute('insert into stock_move_history_ids values (%s,%s)', (move.id,move_id))
if done:
count += len(done)
self.write(cr, uid, done, {'state': 'assigned'})
@ -1745,7 +1721,6 @@ class stock_move(osv.osv):
wf_service = netsvc.LocalService("workflow")
for id in ids:
wf_service.trg_trigger(uid, 'stock.move', id, cr)
#self.action_cancel(cr,uid, ids2, context)
return True
def _get_accounting_values(self, cr, uid, move, context=None):
@ -1789,7 +1764,6 @@ class stock_move(osv.osv):
pricetype = price_type_obj.browse(cr,uid,move.company_id.property_valuation_price_type.id)
amount_unit = move.product_id.price_get(pricetype.field, context)[move.product_id.id]
amount = amount_unit * q or 1.0
# amount = q * move.product_id.standard_price
return journal_id, acc_src, acc_dest, acc_variation, amount
def action_done(self, cr, uid, ids, context=None):
@ -1816,7 +1790,6 @@ class stock_move(osv.osv):
wf_service.trg_write(uid, 'stock.picking', move.move_dest_id.picking_id.id, cr)
else:
pass
# self.action_done(cr, uid, [move.move_dest_id.id])
if move.move_dest_id.auto_validate:
self.action_done(cr, uid, [move.move_dest_id.id], context=context)
@ -1857,15 +1830,6 @@ class stock_move(osv.osv):
'ref': move.picking_id and move.picking_id.name,
})
# This can be removed
#tracking_lot = False
#if context:
# tracking_lot = context.get('tracking_lot', False)
# if tracking_lot:
# rec_id = context and context.get('active_id', False)
# tracking = self.pool.get('stock.tracking')
# tracking_lot = tracking.get_create_tracking_lot(cr, uid,[rec_id], tracking_lot)
self.write(cr, uid, ids, {'state': 'done', 'date_planned': time.strftime('%Y-%m-%d %H:%M:%S')})
wf_service = netsvc.LocalService("workflow")
for id in ids:
@ -1947,7 +1911,6 @@ class stock_move(osv.osv):
'location_dest_id': location_id
}
new_move = self.copy(cr, uid, move.id, default_val)
#self.write(cr, uid, [new_move], {'move_history_ids':[(4,move.id)]}) #TODO : to track scrap moves
res += [new_move]
product_obj = self.pool.get('product.product')
for (id, name) in product_obj.name_get(cr, uid, [move.product_id.id]):
@ -2170,7 +2133,6 @@ class stock_move(osv.osv):
'state': 'assigned',
'move_dest_id': False,
'price_unit': move.price_unit,
#'tracking_id': tracking_lot,
})
complete.append(self.browse(cr, uid, new_move))
self.write(cr, uid, move.id,
@ -2185,7 +2147,6 @@ class stock_move(osv.osv):
{
'product_qty': move.product_qty,
'product_uos_qty': move.product_qty,
#'tracking_id': tracking_lot
})
complete.append(move)
@ -2249,7 +2210,6 @@ class stock_inventory(osv.osv):
for line in inv.inventory_line_id:
pid = line.product_id.id
# price = line.product_id.standard_price or 0.0
amount = self.pool.get('stock.location')._product_get(cr, uid, line.location_id.id, [pid], {'uom': line.product_uom.id})[pid]
#TOCHECK: Why put restriction like new inventory qty should greater available qty ?
change = line.product_qty - amount
@ -2348,7 +2308,6 @@ class stock_warehouse(osv.osv):
_description = "Warehouse"
_columns = {
'name': fields.char('Name', size=60, required=True),
# 'partner_id': fields.many2one('res.partner', 'Owner'),
'company_id': fields.many2one('res.company','Company',required=True,select=1),
'partner_address_id': fields.many2one('res.partner.address', 'Owner Address'),
'lot_input_id': fields.many2one('stock.location', 'Location Input', required=True, domain=[('usage','<>','view')]),
@ -2385,7 +2344,6 @@ class stock_picking_move_wizard(osv.osv_memory):
_columns = {
'name': fields.char('Name', size=64, invisible=True),
#'move_lines': fields.one2many('stock.move', 'picking_id', 'Move lines',readonly=True),
'move_ids': fields.many2many('stock.move', 'picking_move_wizard_rel', 'picking_move_wizard_id', 'move_id', 'Entry lines', required=True),
'address_id': fields.many2one('res.partner.address', 'Dest. Address', invisible=True),
'picking_id': fields.many2one('stock.picking', 'Picking list', select=True, invisible=True),

View File

@ -3,6 +3,7 @@
<data>
<report auto="False" id="report_product_history" model="product.product" name="stock.product.history" string="Future Stock Forecast"/>
<report id="report_picking_list" model="stock.picking" name="stock.picking.list" string="Picking list" rml="stock/report/picking.rml"/>
<report id="report_packing_list" model="stock.picking" name="stock.picking.list2" string="Packing list" rml="stock/report/packing.rml"/>
<report id="report_move_labels" model="stock.move" name="stock.move.label" string="Item Labels" xml="stock/report/lot_move_label.xml" xsl="stock/report/lot_move_label.xsl"/>
<report auto="False" id="report_location_overview" model="stock.location" name="lot.stock.overview" string="Location Overview" rml="stock/report/lot_overview.rml" groups="base.group_extended"/>
<report auto="False" id="report_lot_location" model="stock.location" name="lot.location" rml="stock/report/lot_location.rml" string="Lots by location"/>

View File

@ -20,14 +20,7 @@
##############################################################################
from osv import fields, osv
from service import web_services
from tools.misc import UpdateableStr, UpdateableDict
from tools.translate import _
import netsvc
import pooler
import time
import wizard
class stock_fill_inventory(osv.osv_memory):
_name = "stock.fill.inventory"

View File

@ -20,13 +20,9 @@
##############################################################################
from osv import fields, osv
from service import web_services
from tools.misc import UpdateableStr, UpdateableDict
from tools.translate import _
import netsvc
import pooler
import time
import wizard
class stock_inventory_line_split(osv.osv_memory):
_inherit = "stock.move.split"
@ -105,7 +101,6 @@ class stock_inventory_line_split(osv.osv_memory):
if quantity_rest > 0:
update_val['product_qty'] = quantity_rest
line_obj.write(cr, uid, [inv_line.id], update_val)
return new_line
stock_inventory_line_split()

Some files were not shown because too many files have changed in this diff Show More