[MERGE]: Merge with lp:openobject-addons

bzr revid: mma@tinyerp.com-20120522055605-57264cmquj0ojcwi
This commit is contained in:
Mayur Maheshwari (OpenERP) 2012-05-22 11:26:05 +05:30
commit b2e3ee066c
319 changed files with 2842 additions and 147467 deletions

View File

@ -53,7 +53,7 @@
<field name="view_mode">form</field>
<field name="view_id" ref="accounting_report_view"/>
<field name="target">new</field>
<field name="context"></field>
<field name="context">{}</field>
<field name="context" eval="{'default_account_report_id':ref('account.account_financial_report_profitandloss0')}"/>
</record>
<menuitem icon="STOCK_PRINT" name="Profit And Loss" action="action_account_report_pl" id="menu_account_report_pl" parent="final_accounting_reports"/>

View File

@ -0,0 +1,213 @@
# Portuguese translation for openobject-addons
# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2012.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2012-02-08 00:35+0000\n"
"PO-Revision-Date: 2012-05-18 12:06+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Portuguese <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: 2012-05-19 05:21+0000\n"
"X-Generator: Launchpad (build 15259)\n"
#. module: anonymization
#: model:ir.model,name:anonymization.model_ir_model_fields_anonymize_wizard
msgid "ir.model.fields.anonymize.wizard"
msgstr "ir.model.fields.anonymize.wizard"
#. module: anonymization
#: field:ir.model.fields.anonymization,field_name:0
msgid "Field Name"
msgstr "Nome do Campo"
#. module: anonymization
#: field:ir.model.fields.anonymization,field_id:0
msgid "Field"
msgstr "Campo"
#. module: anonymization
#: field:ir.model.fields.anonymization.history,state:0
#: field:ir.model.fields.anonymize.wizard,state:0
msgid "State"
msgstr "Estado"
#. module: anonymization
#: field:ir.model.fields.anonymize.wizard,file_import:0
msgid "Import"
msgstr "Importar"
#. module: anonymization
#: model:ir.model,name:anonymization.model_ir_model_fields_anonymization
msgid "ir.model.fields.anonymization"
msgstr "ir.model.fields.anonymization"
#. module: anonymization
#: field:ir.model.fields.anonymization.history,direction:0
msgid "Direction"
msgstr "Direção"
#. module: anonymization
#: model:ir.actions.act_window,name:anonymization.action_ir_model_fields_anonymization_tree
#: view:ir.model.fields.anonymization:0
#: model:ir.ui.menu,name:anonymization.menu_administration_anonymization_fields
msgid "Anonymized Fields"
msgstr "Campos Anonimizados"
#. module: anonymization
#: model:ir.ui.menu,name:anonymization.menu_administration_anonymization
msgid "Database anonymization"
msgstr "Anonimização da Base de Dados"
#. module: anonymization
#: selection:ir.model.fields.anonymization.history,direction:0
msgid "clear -> anonymized"
msgstr "retirar -> anonimização"
#. module: anonymization
#: selection:ir.model.fields.anonymization,state:0
#: selection:ir.model.fields.anonymize.wizard,state:0
msgid "Anonymized"
msgstr "Anonimizado"
#. module: anonymization
#: field:ir.model.fields.anonymization,state:0
msgid "unknown"
msgstr "Desconhecido"
#. module: anonymization
#: field:ir.model.fields.anonymization,model_id:0
msgid "Object"
msgstr "Objeto"
#. module: anonymization
#: field:ir.model.fields.anonymization.history,filepath:0
msgid "File path"
msgstr "Localização do ficheiro"
#. module: anonymization
#: field:ir.model.fields.anonymization.history,date:0
msgid "Date"
msgstr "Data"
#. module: anonymization
#: field:ir.model.fields.anonymize.wizard,file_export:0
msgid "Export"
msgstr "Exportar"
#. module: anonymization
#: view:ir.model.fields.anonymize.wizard:0
msgid "Reverse the Database Anonymization"
msgstr "Inverter a Anonimização da Base de Dados"
#. module: anonymization
#: view:ir.model.fields.anonymize.wizard:0
msgid "Database Anonymization"
msgstr "Anonimização da Base de Dados"
#. module: anonymization
#: model:ir.ui.menu,name:anonymization.menu_administration_anonymization_wizard
msgid "Anonymize database"
msgstr "Anonimizar Base de Dados"
#. module: anonymization
#: view:ir.model.fields.anonymization.history:0
#: field:ir.model.fields.anonymization.history,field_ids:0
msgid "Fields"
msgstr "Campos"
#. module: anonymization
#: selection:ir.model.fields.anonymization,state:0
#: selection:ir.model.fields.anonymize.wizard,state:0
msgid "Clear"
msgstr "Limpar"
#. module: anonymization
#: view:ir.model.fields.anonymize.wizard:0
#: field:ir.model.fields.anonymize.wizard,summary:0
msgid "Summary"
msgstr "Sumário"
#. module: anonymization
#: view:ir.model.fields.anonymization:0
msgid "Anonymized Field"
msgstr "Campo Anonimizado"
#. module: anonymization
#: selection:ir.model.fields.anonymize.wizard,state:0
msgid "Unstable"
msgstr "Instável"
#. module: anonymization
#: selection:ir.model.fields.anonymization.history,state:0
msgid "Exception occured"
msgstr "Ocorreu uma Exceção"
#. module: anonymization
#: selection:ir.model.fields.anonymization,state:0
#: selection:ir.model.fields.anonymize.wizard,state:0
msgid "Not Existing"
msgstr "Não existe"
#. module: anonymization
#: field:ir.model.fields.anonymization,model_name:0
msgid "Object Name"
msgstr "Nome do Objeto"
#. module: anonymization
#: model:ir.actions.act_window,name:anonymization.action_ir_model_fields_anonymization_history_tree
#: view:ir.model.fields.anonymization.history:0
#: model:ir.ui.menu,name:anonymization.menu_administration_anonymization_history
msgid "Anonymization History"
msgstr "Histórico de Anonimizações"
#. module: anonymization
#: model:ir.model,name:anonymization.model_ir_model_fields_anonymization_history
msgid "ir.model.fields.anonymization.history"
msgstr "ir.model.fields.anonymization.history"
#. module: anonymization
#: model:ir.actions.act_window,name:anonymization.action_ir_model_fields_anonymize_wizard
#: view:ir.model.fields.anonymize.wizard:0
msgid "Anonymize Database"
msgstr "Anonimizar Base de Dados"
#. module: anonymization
#: field:ir.model.fields.anonymize.wizard,name:0
msgid "File Name"
msgstr "Nome do Ficheiro"
#. module: anonymization
#: selection:ir.model.fields.anonymization.history,direction:0
msgid "anonymized -> clear"
msgstr ""
#. module: anonymization
#: selection:ir.model.fields.anonymization.history,state:0
msgid "Started"
msgstr "Iniciado"
#. module: anonymization
#: selection:ir.model.fields.anonymization.history,state:0
msgid "Done"
msgstr "Concluído"
#. module: anonymization
#: view:ir.model.fields.anonymization.history:0
#: field:ir.model.fields.anonymization.history,msg:0
#: field:ir.model.fields.anonymize.wizard,msg:0
msgid "Message"
msgstr "Mensagem"
#. module: anonymization
#: code:addons/anonymization/anonymization.py:55
#: sql_constraint:ir.model.fields.anonymization:0
#, python-format
msgid "You cannot have two fields with the same name on the same object!"
msgstr "Não pode ter dois campos com o mesmo nome no mesmo objeto!"

View File

@ -1,26 +0,0 @@
# -*- 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/>.
#
##############################################################################
import auction
import wizard
import report
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -1,76 +0,0 @@
# -*- 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/>.
#
##############################################################################
{
'name': 'Auction Houses',
'version': '1.0',
'category': 'Specific Industry Applications',
'complexity': "normal",
'description': """
This module manages the records of artists, auction articles, buyers and sellers.
=================================================================================
It completely manages an auction such as managing bids,
keeping track of the sold articles along with the paid
and unpaid objects including delivery of the articles.
The dashboard for auction includes:
* Latest Objects (list)
* Latest Deposits (list)
* Objects Statistics (list)
* Total Adjudications (graph)
* Min/Adj/Max (graph)
* Objects By Day (graph)
""",
'author': 'OpenERP SA',
'depends': ['base', 'account', 'hr_attendance'],
'init_xml': ['auction_sequence.xml', 'auction_data.xml'],
'update_xml': [
'security/auction_security.xml',
'security/ir.model.access.csv',
'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_lots_sms_send_view.xml',
'wizard/auction_catalog_flagey_view.xml',
'wizard/auction_lots_buyer_map_view.xml',
'auction_view.xml',
'auction_report.xml',
'report/report_auction_view.xml',
'auction_wizard.xml',
'board_auction_view.xml',
],
'demo_xml': ['auction_demo.xml','board_auction_demo.xml'],
'test': ['test/auction.yml',
'test/auction_report.yml',
],
'installable': True,
'auction': True,
'auto_install': False,
'certificate': '0039333102717',
'images': ['images/auction1.jpeg','images/auction2.jpeg','images/auction3.jpeg'],
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

View File

@ -1,804 +0,0 @@
# -*- 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 osv import fields, osv, orm
from tools.translate import _
import netsvc
import time
#----------------------------------------------------------
# Auction Artists
#----------------------------------------------------------
class auction_artists(osv.osv):
_name = "auction.artists"
_columns = {
'name': fields.char('Artist/Author Name', size=64, required=True),
'pseudo': fields.char('Pseudo', size=64),
'birth_death_dates':fields.char('Lifespan', size=64),
'biography': fields.text('Biography'),
}
auction_artists()
#----------------------------------------------------------
# Auction Dates
#----------------------------------------------------------
class auction_dates(osv.osv):
"""Auction Dates"""
_name = "auction.dates"
_description=__doc__
def _adjudication_get(self, cr, uid, ids, prop, unknow_none, unknow_dict):
res={}
total = 0.0
lots_obj = self.pool.get('auction.lots')
for auction in self.browse(cr, uid, ids):
lots_ids = lots_obj.search(cr, uid, [('auction_id', '=', auction.id)])
for lots in lots_obj.browse(cr, uid, lots_ids):
total+=lots.obj_price or 0.0
res[auction.id]=total
return res
def name_get(self, cr, uid, ids, context=None):
if not ids:
return []
reads = self.read(cr, uid, ids, ['name', 'auction1'], context=context)
name = [(r['id'], '['+r['auction1']+'] '+ r['name']) for r in reads]
return name
def _get_invoice(self, cr, uid, ids, name, arg, context=None):
lots_obj = self.pool.get('auction.lots')
result = {}
for data in self.browse(cr, uid, ids, context=context):
buyer_inv_ids = []
seller_inv_ids = []
result[data.id] = {
'seller_invoice_history': buyer_inv_ids,
'buyer_invoice_history': seller_inv_ids,
}
lots_ids = lots_obj.search(cr, uid, [('auction_id','=',data.id)])
for lot in lots_obj.browse(cr, uid, lots_ids, context=context):
if lot.ach_inv_id:
buyer_inv_ids.append(lot.ach_inv_id.id)
if lot.sel_inv_id:
seller_inv_ids.append(lot.sel_inv_id.id)
result[data.id]['seller_invoice_history'] = seller_inv_ids
result[data.id]['buyer_invoice_history'] = buyer_inv_ids
return result
_columns = {
'name': fields.char('Auction Name', size=64, required=True),
'expo1': fields.date('First Exposition Day', required=True, help="Beginning exposition date for auction"),
'expo2': fields.date('Last Exposition Day', required=True, help="Last exposition date for auction"),
'auction1': fields.date('First Auction Day', required=True, help="Start date of auction"),
'auction2': fields.date('Last Auction Day', required=True, help="End date of auction"),
'journal_id': fields.many2one('account.journal', 'Buyer Journal', required=True, help="Account journal for buyer"),
'journal_seller_id': fields.many2one('account.journal', 'Seller Journal', required=True, help="Account journal for seller"),
'buyer_costs': fields.many2many('account.tax', 'auction_buyer_taxes_rel', 'auction_id', 'tax_id', 'Buyer Costs', help="Account tax for buyer"),
'seller_costs': fields.many2many('account.tax', 'auction_seller_taxes_rel', 'auction_id', 'tax_id', 'Seller Costs', help="Account tax for seller"),
'acc_income': fields.many2one('account.account', 'Income Account', required=True),
'acc_expense': fields.many2one('account.account', 'Expense Account', required=True),
'adj_total': fields.function(_adjudication_get, string='Total Adjudication', store=True),
'state': fields.selection((('draft', 'Draft'), ('closed', 'Closed')), 'State', select=1, readonly=True,
help='When auction starts the state is \'Draft\'.\n At the end of auction, the state becomes \'Closed\'.'),
'account_analytic_id': fields.many2one('account.analytic.account', 'Analytic Account', required=False),
'buyer_invoice_history': fields.function(_get_invoice, relation='account.invoice', string="Buyer Invoice", type='many2many', multi=True),
'seller_invoice_history': fields.function(_get_invoice, relation='account.invoice', string="Seller Invoice", type='many2many', multi=True),
}
_defaults = {
'state': lambda *a: 'draft',
}
_order = "auction1 desc"
def close(self, cr, uid, ids, context=None):
"""
Close an auction date.
Create invoices for all buyers and sellers.
STATE ='close'
RETURN: True
"""
lots_obj = self.pool.get('auction.lots')
lots_ids = lots_obj.search(cr, uid, [('auction_id', 'in', ids), ('state', '=', 'draft'), ('obj_price', '>', 0)])
lots_obj.lots_invoice(cr, uid, lots_ids, {}, None)
lots_ids2 = lots_obj.search(cr, uid, [('auction_id', 'in', ids), ('obj_price', '>', 0)])
lots_obj.seller_trans_create(cr, uid, lots_ids2, {})
self.write(cr, uid, ids, {'state': 'closed'}) #close the auction
return True
auction_dates()
#----------------------------------------------------------
# Deposits
#----------------------------------------------------------
class auction_deposit(osv.osv):
"""Auction Deposit Border"""
_name = "auction.deposit"
_description=__doc__
_order = "id desc"
_columns = {
'transfer' : fields.boolean('Transfer'),
'name': fields.char('Depositer Inventory', size=64, required=True),
'partner_id': fields.many2one('res.partner', 'Seller', required=True, change_default=True),
'date_dep': fields.date('Deposit date', required=True),
'method': fields.selection((('keep', 'Keep until sold'), ('decease', 'Decrease limit of 10%'), ('contact', 'Contact the Seller')), 'Withdrawned method', required=True),
'tax_id': fields.many2one('account.tax', 'Expenses'),
'create_uid': fields.many2one('res.users', 'Created by', readonly=True),
'info': fields.char('Description', size=64),
'lot_id': fields.one2many('auction.lots', 'bord_vnd_id', 'Objects'),
'specific_cost_ids': fields.one2many('auction.deposit.cost', 'deposit_id', 'Specific Costs'),
'total_neg': fields.boolean('Allow Negative Amount'),
}
_defaults = {
'method': lambda *a: 'keep',
'total_neg': lambda *a: False,
'name': lambda obj, cr, uid, context: obj.pool.get('ir.sequence').get(cr, uid, 'auction.deposit'),
}
auction_deposit()
#----------------------------------------------------------
# (Specific) Deposit Costs
#----------------------------------------------------------
class auction_deposit_cost(osv.osv):
"""Auction Deposit Cost"""
_name = 'auction.deposit.cost'
_description=__doc__
_columns = {
'name': fields.char('Cost Name', required=True, size=64),
'amount': fields.float('Amount'),
'account': fields.many2one('account.account', 'Destination Account', required=True),
'deposit_id': fields.many2one('auction.deposit', 'Deposit'),
}
auction_deposit_cost()
#----------------------------------------------------------
# Lots Categories
#----------------------------------------------------------
class aie_category(osv.osv):
_name="aie.category"
_order = "name"
_columns={
'name': fields.char('Name', size=64, required=True),
'code':fields.char('Code', size=64),
'parent_id': fields.many2one('aie.category', 'Parent aie Category', ondelete='cascade'),
'child_ids': fields.one2many('aie.category', 'parent_id', help="children aie category")
}
def name_get(self, cr, uid, ids, context=None):
res = []
if not ids:
return res
reads = self.read(cr, uid, ids, ['name', 'parent_id'], context=context)
for record in reads:
name = record['name']
if record['parent_id']:
name = record['parent_id'][1] + ' / ' + name
res.append((record['id'], name))
return res
aie_category()
class auction_lot_category(osv.osv):
"""Auction Lots Category"""
_name = 'auction.lot.category'
_description=__doc__
_columns = {
'name': fields.char('Category Name', required=True, size=64),
'priority': fields.float('Priority'),
'active' : fields.boolean('Active', help="If the active field is set to False, it will allow you to hide the auction lot category without removing it."),
'aie_categ': fields.many2one('aie.category', 'Category', ondelete='cascade'),
}
_defaults = {
'active' : lambda *a: 1,
}
auction_lot_category()
#----------------------------------------------------------
# Lots
#----------------------------------------------------------
def _type_get(self, cr, uid, context=None):
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 auction_lots(osv.osv):
"""Auction Object"""
_name = "auction.lots"
_order = "obj_num,lot_num,id"
_description=__doc__
def button_not_bought(self, cr, uid, ids, context=None):
return self.write(cr, uid, ids, {'state':'unsold'})
def button_taken_away(self, cr, uid, ids, context=None):
return self.write(cr, uid, ids, {'state':'taken_away', 'ach_emp': True})
def button_unpaid(self, cr, uid, ids, context=None):
return self.write(cr, uid, ids, {'state':'draft'})
def button_bought(self, cr, uid, ids, context=None):
return self.write(cr, uid, ids, {'state':'sold'})
def _getprice(self, cr, uid, ids, fields, args, context=None):
"""This Function compute amount total with tax for buyer and seller.
@param ids: List of auction lots's id
@param name: List of function fields.
@param context: A standard dictionary for contextual values
@return: Dictionary of function fields value.
"""
res = {}
account_analytic_line_obj = self.pool.get('account.analytic.line')
lots = self.browse(cr, uid, ids, context=context)
pt_tax = self.pool.get('account.tax')
for lot in lots:
taxes = []
for name in fields:
res[lot.id] = {name: False}
amount = lot.obj_price or 0.0
result = 0.0
if name == "buyer_price":
if lot.author_right:
taxes.append(lot.author_right)
if lot.auction_id:
taxes += lot.auction_id.buyer_costs
tax = pt_tax.compute_all(cr, uid, taxes, amount, 1)['taxes']
for t in tax:
result += t.get('amount', 0.0)
result += amount
elif name == "seller_price":
if lot.bord_vnd_id.tax_id:
taxes.append(lot.bord_vnd_id.tax_id)
elif lot.auction_id and lot.auction_id.seller_costs:
taxes += lot.auction_id.seller_costs
tax = pt_tax.compute_all(cr, uid, taxes, amount, 1)['taxes']
for t in tax:
result += t.get('amount', 0.0)
result += amount
elif name == "gross_revenue":
if lot.auction_id:
result = lot.buyer_price - lot.seller_price
elif name == "net_revenue":
if lot.auction_id:
result = lot.buyer_price - lot.seller_price - lot.costs
elif name == "gross_margin":
if ((lot.obj_price==0) and (lot.state=='draft')):
amount = lot.lot_est1
else:
amount = lot.obj_price
if amount > 0:
result = (lot.gross_revenue * 100) / amount
result = round(result,2)
elif name == "net_margin":
if ((lot.obj_price==0) and (lot.state=='draft')):
amount = lot.lot_est1
else:
amount = lot.obj_price
if amount > 0:
result = (lot.net_revenue * 100) / amount
result = round(result,2)
elif name == "costs":
# costs: Total credit of analytic account
# objects sold during this auction (excluding analytic lines that are in the analytic journal of the auction date)
#TOCHECK: Calculation OF Indirect Cost
som = 0.0
if lot.auction_id:
auct_id = lot.auction_id.id
lot_count = self.search(cr, uid, [('auction_id', '=', auct_id)], count=True)
line_ids = account_analytic_line_obj.search(cr, uid, [
('account_id', '=', lot.auction_id.account_analytic_id.id),
('journal_id', '<>', lot.auction_id.journal_id.id),
('journal_id', '<>', lot.auction_id.journal_seller_id.id)])
for r in lot.bord_vnd_id.specific_cost_ids:
som += r.amount
for line in account_analytic_line_obj.browse(cr, uid, line_ids, context=context):
if line.amount:
som -= line.amount
result = som/lot_count
elif name=="paid_ach":
result = False
if lot.ach_inv_id and lot.ach_inv_id.state == 'paid':
result = True
elif name=="paid_vnd":
result = False
if lot.sel_inv_id and lot.sel_inv_id.state == 'paid':
result = True
res[lot.id][name] = result
return res
def onchange_obj_ret(self, cr, uid, ids, obj_ret, context=None):
if obj_ret:
return {'value': {'obj_price': 0}}
return {}
_columns = {
'bid_lines':fields.one2many('auction.bid_line', 'lot_id', 'Bids'),
'auction_id': fields.many2one('auction.dates', 'Auction', select=1, help="Auction for object"),
'bord_vnd_id': fields.many2one('auction.deposit', 'Depositer Inventory', required=True, help="Provide deposit information: seller, Withdrawned Method, Object, Deposit Costs"),
'name': fields.char('Title', size=64, required=True, help='Auction object name'),
'name2': fields.char('Short Description (2)', size=64),
'lot_type': fields.selection(_type_get, 'Object category', size=64),
'author_right': fields.many2one('account.tax', 'Author rights', help="Account tax for author commission"),
'lot_est1': fields.float('Minimum Estimation', help="Minimum Estimate Price"),
'lot_est2': fields.float('Maximum Estimation', help="Maximum Estimate Price"),
'lot_num': fields.integer('List Number', required=True, select=1, help="List number in depositer inventory"),
'create_uid': fields.many2one('res.users', 'Created by', readonly=True),
'history_ids':fields.one2many('auction.lot.history', 'lot_id', 'Auction history'),
'lot_local':fields.char('Location', size=64, help="Auction Location"),
'artist_id':fields.many2one('auction.artists', 'Artist/Author'),
'artist2_id':fields.many2one('auction.artists', 'Artist/Author2'),
'important':fields.boolean('To be Emphatized'),
'product_id':fields.many2one('product.product', 'Product', required=True),
'obj_desc': fields.text('Object Description'),
'obj_num': fields.integer('Catalog Number', select=True),
'obj_ret': fields.float('Price retired', help="Object Ret"),
'obj_comm': fields.boolean('Commission'),
'obj_price': fields.float('Adjudication price', help="Object Price"),
'ach_avance': fields.float('Buyer Advance'),
'ach_login': fields.char('Buyer Username', size=64),
'ach_uid': fields.many2one('res.partner', 'Buyer'),
'seller_id': fields.related('bord_vnd_id','partner_id', type='many2one', relation='res.partner', string='Seller', readonly=True),
'ach_emp': fields.boolean('Taken Away', readonly=True, help="When state is Taken Away, this field is marked as True"),
'is_ok': fields.boolean('Buyer\'s payment', help="When buyer pay for bank statement', this field is marked"),
'ach_inv_id': fields.many2one('account.invoice', 'Buyer Invoice', readonly=True, states={'draft':[('readonly', False)]}),
'sel_inv_id': fields.many2one('account.invoice', 'Seller Invoice', readonly=True, states={'draft':[('readonly', False)]}),
'vnd_lim': fields.float('Seller limit'),
'vnd_lim_net': fields.boolean('Net limit ?', readonly=True),
'image': fields.binary('Image', help="Object Image"),
'paid_vnd':fields.function(_getprice, string='Seller Paid', type='boolean', store=True, multi="paid_vnd", help="When state of Seller Invoice is 'Paid', this field is selected as True."),
'paid_ach':fields.function(_getprice, string='Buyer Invoice Reconciled', type='boolean', store=True, multi="paid_ach", help="When state of Buyer Invoice is 'Paid', this field is selected as True."),
'state': fields.selection((
('draft', 'Draft'),
('unsold', 'Unsold'),
('paid', 'Paid'),
('sold', 'Sold'),
('taken_away', 'Taken away')), 'State', required=True, readonly=True,
help=' * The \'Draft\' state is used when a object is encoding as a new object. \
\n* The \'Unsold\' state is used when object does not sold for long time, user can also set it as draft state after unsold. \
\n* The \'Paid\' state is used when user pay for the object \
\n* The \'Sold\' state is used when user buy the object.'),
'buyer_price': fields.function(_getprice, string='Buyer price', store=True, multi="buyer_price", help="Buyer Price"),
'seller_price': fields.function(_getprice, string='Seller price', store=True, multi="seller_price", help="Seller Price"),
'gross_revenue':fields.function(_getprice, string='Gross revenue', store=True, multi="gross_revenue", help="Buyer Price - Seller Price"),
'gross_margin':fields.function(_getprice, string='Gross Margin (%)', store=True, multi="gross_margin", help="(Gross Revenue*100.0)/ Object Price"),
'costs':fields.function(_getprice, string='Indirect costs', store=True, multi="costs", help="Deposit cost"),
'statement_id': fields.many2many('account.bank.statement.line', 'auction_statement_line_rel', 'auction_id', 'statement', 'Payment', help="Bank statement line for given buyer"),
'net_revenue':fields.function(_getprice, string='Net revenue', store=True, multi="net_revenue", help="Buyer Price - Seller Price - Indirect Cost"),
'net_margin':fields.function(_getprice, string='Net Margin (%)', store=True, multi="net_margin", help="(Net Revenue * 100)/ Object Price"),
}
_defaults = {
'state':lambda *a: 'draft',
'lot_num':lambda *a:1,
'is_ok': lambda *a: False,
}
def name_get(self, cr, user, ids, context=None):
if not ids:
return []
result = [ (r['id'], str(r['obj_num'])+' - '+r['name']) for r in self.read(cr, user, ids, ['name', 'obj_num'])]
return result
def name_search(self, cr, user, name, args=None, operator='ilike', context=None, limit=100):
if not args:
args = []
ids = []
if name:
ids = self.search(cr, user, [('obj_num', '=', int(name))] + args)
if not ids:
ids = self.search(cr, user, [('name', operator, name)] + args)
return self.name_get(cr, user, ids)
def _sum_taxes_by_type_and_id(self, taxes):
"""
PARAMS: taxes: a list of dictionaries of the form {'id':id, 'amount':amount, ...}
RETURNS : a list of dictionaries of the form {'id':id, 'amount':amount, ...}; one dictionary per unique id.
The others fields in the dictionaries (other than id and amount) are those of the first tax with a particular id.
"""
taxes_summed = {}
for tax in taxes:
key = (tax['type'], tax['id'])
if key in taxes_summed:
taxes_summed[key]['amount'] += tax['amount']
else:
taxes_summed[key] = tax
return taxes_summed.values()
def compute_buyer_costs(self, cr, uid, ids):
amount_total = {}
lots = self.browse(cr, uid, ids)
##CHECKME: Is that AC would be worthwhile to make groups of lots that have the same costs to spend a lot of lists compute?
taxes = []
amount=0.0
pt_tax = self.pool.get('account.tax')
for lot in lots:
taxes = lot.product_id.taxes_id
if lot.author_right:
taxes.append(lot.author_right)
elif lot.auction_id:
taxes += lot.auction_id.buyer_costs
tax=pt_tax.compute_all(cr, uid, taxes, lot.obj_price, 1)['taxes']
for t in tax:
amount+=t['amount']
amount_total['value']= amount
amount_total['amount']= amount
return amount_total
def _compute_lot_seller_costs(self, cr, uid, lot, manual_only=False):
costs = []
tax_cost_ids=[]
border_id = lot.bord_vnd_id
if border_id:
if border_id.tax_id:
tax_cost_ids.append(border_id.tax_id)
elif lot.auction_id and lot.auction_id.seller_costs:
tax_cost_ids += lot.auction_id.seller_costs
tax_costs = self.pool.get('account.tax').compute_all(cr, uid, tax_cost_ids, lot.obj_price, 1)['taxes']
# delete useless keys from the costs computed by the tax object... this is useless but cleaner...
for cost in tax_costs:
del cost['account_paid_id']
del cost['account_collected_id']
if not manual_only:
costs.extend(tax_costs)
for c in costs:
c.update({'type': 0})
######
if lot.vnd_lim_net<0 and lot.obj_price>0:
#FIXME:the string passes have lot 'should go through the system translations.
obj_price_wh_costs = reduce(lambda x, y: x + y['amount'], tax_costs, lot.obj_price)
if obj_price_wh_costs < lot.vnd_lim:
costs.append({ 'type': 1,
'id': lot.obj_num,
'name': 'Remise lot '+ str(lot.obj_num),
'amount': lot.vnd_lim - obj_price_wh_costs}
)
return costs
def compute_seller_costs(self, cr, uid, ids, manual_only=False):
lots = self.browse(cr, uid, ids)
costs = []
# group objects (lots) by deposit id
# ie create a dictionary containing lists of objects
bord_lots = {}
for lot in lots:
key = lot.bord_vnd_id.id
if not key in bord_lots:
bord_lots[key] = []
bord_lots[key].append(lot)
# use each list of object in turn
for lots in bord_lots.values():
total_adj = 0
total_cost = 0
for lot in lots:
total_adj += lot.obj_price or 0.0
lot_costs = self._compute_lot_seller_costs(cr, uid, lot, manual_only)
for c in lot_costs:
total_cost += c['amount']
costs.extend(lot_costs)
bord = lots[0].bord_vnd_id
if bord:
if bord.specific_cost_ids:
bord_costs = [{'type':2, 'id':c.id, 'name':c.name, 'amount':c.amount, 'account_id':c.account} for c in bord.specific_cost_ids]
for c in bord_costs:
total_cost += c['amount']
costs.extend(bord_costs)
if (total_adj+total_cost)<0:
#FIXME: translate tax name
new_id = bord and bord.id or 0
c = {'type':3, 'id':new_id, 'amount':-total_cost-total_adj, 'name':'Ristourne'}
costs.append(c)
return self._sum_taxes_by_type_and_id(costs)
# sum remise limite net and ristourne
def compute_seller_costs_summed(self, cr, uid, ids): #ach_pay_id
"""This Fuction sum Net remittance limit and refund"""
taxes = self.compute_seller_costs(cr, uid, ids)
taxes_summed = {}
for tax in taxes:
if tax['type'] == 1:
tax['id'] = 0
#FIXME: translate tax names
tax['name'] = 'Discount sharp boundary'
elif tax['type'] == 2:
tax['id'] = 0
tax['name'] = 'Miscellaneous expenditure'
elif tax['type'] == 3:
tax['id'] = 0
tax['name'] = 'Cross.'
key = (tax['type'], tax['id'])
if key in taxes_summed:
taxes_summed[key]['amount'] += tax['amount']
else:
taxes_summed[key] = tax
return taxes_summed.values()
def buyer_proforma(self, cr, uid, ids, context=None):
invoices = {}
inv_ref = self.pool.get('account.invoice')
res_obj = self.pool.get('res.partner')
inv_line_obj = self.pool.get('account.invoice.line')
wf_service = netsvc.LocalService('workflow')
for lot in self.browse(cr, uid, ids, context=context):
if not lot.obj_price>0:
continue
if not lot.ach_uid.id:
raise orm.except_orm(_('Missed buyer !'), _('The object "%s" has no buyer assigned.') % (lot.name,))
else:
partner_ref =lot.ach_uid.id
res = res_obj.address_get(cr, uid, [partner_ref], ['contact', 'invoice'])
contact_addr_id = res['contact']
invoice_addr_id = res['invoice']
if not invoice_addr_id:
raise orm.except_orm(_('No Invoice Address'), _('The Buyer "%s" has no Invoice Address.') % (contact_addr_id,))
inv = {
'name': 'Auction proforma:' +lot.name,
'journal_id': lot.auction_id.journal_id.id,
'partner_id': partner_ref,
'type': 'out_invoice',
}
inv.update(inv_ref.onchange_partner_id(cr, uid, [], 'out_invoice', partner_ref)['value'])
inv['account_id'] = inv['account_id'] and inv['account_id'][0]
inv_id = inv_ref.create(cr, uid, inv, context)
invoices[partner_ref] = inv_id
self.write(cr, uid, [lot.id], {'ach_inv_id':inv_id, 'state':'sold'})
#calcul des taxes
taxes = map(lambda x: x.id, lot.product_id.taxes_id)
taxes+=map(lambda x:x.id, lot.auction_id.buyer_costs)
if lot.author_right:
taxes.append(lot.author_right.id)
inv_line= {
'invoice_id': inv_id,
'quantity': 1,
'product_id': lot.product_id.id,
'name': 'proforma'+'['+str(lot.obj_num)+'] '+ lot.name,
'invoice_line_tax_id': [(6, 0, taxes)],
'account_analytic_id': lot.auction_id.account_analytic_id.id,
'account_id': lot.auction_id.acc_income.id,
'price_unit': lot.obj_price,
}
inv_line_obj.create(cr, uid, inv_line, context)
inv_ref.button_compute(cr, uid, invoices.values())
wf_service.trg_validate(uid, 'account.invoice', inv_id, 'invoice_proforma2', cr)
return invoices.values()
# creates the transactions between the auction company and the seller
# this is done by creating a new in_invoice for each
def seller_trans_create(self, cr, uid, ids, context=None):
"""
Create a seller invoice for each bord_vnd_id, for selected ids.
"""
# use each list of object in turn
invoices = {}
inv_ref=self.pool.get('account.invoice')
inv_line_obj = self.pool.get('account.invoice.line')
wf_service = netsvc.LocalService('workflow')
for lot in self.browse(cr, uid, ids, context=context):
if not lot.auction_id.id:
continue
if lot.bord_vnd_id.id in invoices:
inv_id = invoices[lot.bord_vnd_id.id]
else:
inv = {
'name': 'Auction:' +lot.name,
'journal_id': lot.auction_id.journal_seller_id.id,
'partner_id': lot.bord_vnd_id.partner_id.id,
'type': 'in_invoice',
}
inv.update(inv_ref.onchange_partner_id(cr, uid, [], 'in_invoice', lot.bord_vnd_id.partner_id.id)['value'])
inv_id = inv_ref.create(cr, uid, inv, context)
invoices[lot.bord_vnd_id.id] = inv_id
self.write(cr, uid, [lot.id], {'sel_inv_id':inv_id, 'state':'sold'})
taxes = map(lambda x: x.id, lot.product_id.taxes_id)
if lot.bord_vnd_id.tax_id:
taxes.append(lot.bord_vnd_id.tax_id.id)
else:
taxes += map(lambda x: x.id, lot.auction_id.seller_costs)
inv_line= {
'invoice_id': inv_id,
'quantity': 1,
'product_id': lot.product_id.id,
'name': '['+str(lot.obj_num)+'] '+lot.auction_id.name,
'invoice_line_tax_id': [(6, 0, taxes)],
'account_analytic_id': lot.auction_id.account_analytic_id.id,
'account_id': lot.auction_id.acc_expense.id,
'price_unit': lot.obj_price,
}
inv_line_obj.create(cr, uid, inv_line, context)
inv_ref.button_compute(cr, uid, invoices.values())
for inv in inv_ref.browse(cr, uid, invoices.values(), context=context):
inv_ref.write(cr, uid, [inv.id], {
'check_total': inv.amount_total
})
wf_service.trg_validate(uid, 'account.invoice', inv.id, 'invoice_open', cr)
return invoices.values()
def lots_invoice(self, cr, uid, ids, context, invoice_number=False):
"""(buyer invoice
Create an invoice for selected lots (IDS) to BUYER_ID.
Set created invoice to the ACTION state.
PRE:
ACTION:
False: no action
xxxxx: set the invoice state to ACTION
RETURN: id of generated invoice
"""
inv_ref = self.pool.get('account.invoice')
res_obj = self.pool.get('res.partner')
inv_line_obj = self.pool.get('account.invoice.line')
wf_service = netsvc.LocalService('workflow')
invoices={}
for lot in self.browse(cr, uid, ids, context):
if not lot.auction_id.id:
continue
if not lot.ach_uid.id:
raise orm.except_orm(_('Missed buyer !'), _('The object "%s" has no buyer assigned.') % (lot.name,))
if (lot.auction_id.id, lot.ach_uid.id) in invoices:
inv_id = invoices[(lot.auction_id.id, lot.ach_uid.id)]
else:
add = res_obj.address_get(cr, uid, [lot.ach_uid.id], ['default'])['default']
if not add:
raise orm.except_orm(_('Missed Address !'), _('The Buyer has no Address.'))
inv = {
'name':lot.auction_id.name or '',
'reference': lot.ach_login,
'journal_id': lot.auction_id.journal_id.id,
'partner_id': lot.ach_uid.id,
'type': 'out_invoice',
}
if invoice_number:
inv['number'] = invoice_number
inv.update(inv_ref.onchange_partner_id(cr, uid, [], 'out_invoice', lot.ach_uid.id)['value'])
inv_id = inv_ref.create(cr, uid, inv, context)
invoices[(lot.auction_id.id, lot.ach_uid.id)] = inv_id
self.write(cr, uid, [lot.id], {'ach_inv_id':inv_id, 'state':'sold'})
#calcul des taxes
taxes = map(lambda x: x.id, lot.product_id.taxes_id)
taxes+=map(lambda x:x.id, lot.auction_id.buyer_costs)
if lot.author_right:
taxes.append(lot.author_right.id)
inv_line= {
'invoice_id': inv_id,
'quantity': 1,
'product_id': lot.product_id.id,
'name': '['+str(lot.obj_num)+'] '+ lot.name,
'invoice_line_tax_id': [(6, 0, taxes)],
'account_analytic_id': lot.auction_id.account_analytic_id.id,
'account_id': lot.auction_id.acc_income.id,
'price_unit': lot.obj_price,
}
inv_line_obj.create(cr, uid, inv_line, context)
inv_ref.button_compute(cr, uid, [inv_id])
for l in inv_ref.browse(cr, uid, invoices.values(), context):
wf_service.trg_validate(uid, 'account.invoice', l.id, 'invoice_open', cr)
return invoices.values()
auction_lots()
#----------------------------------------------------------
# Auction Bids
#----------------------------------------------------------
class auction_bid(osv.osv):
"""Bid Auctions"""
_name = "auction.bid"
_description=__doc__
_order = 'id desc'
_columns = {
'partner_id': fields.many2one('res.partner', 'Buyer Name', required=True),
'contact_tel':fields.char('Contact Number', size=64),
'name': fields.char('Bid ID', size=64, required=True),
'auction_id': fields.many2one('auction.dates', 'Auction Date', required=True),
'bid_lines': fields.one2many('auction.bid_line', 'bid_id', 'Bid'),
}
_defaults = {
'name': lambda obj, cr, uid, context: obj.pool.get('ir.sequence').get(cr, uid, 'auction.bid'),
}
def onchange_contact(self, cr, uid, ids, partner_id):
if not partner_id:
return {'value': {'contact_tel':False}}
contact = self.pool.get('res.partner').browse(cr, uid, partner_id)
if contact:
v_contact=contact.phone
else:
v_contact = False
return {'value': {'contact_tel': v_contact}}
auction_bid()
class auction_lot_history(osv.osv):
"""Lot History"""
_name = "auction.lot.history"
_description=__doc__
_columns = {
'name': fields.date('Date', size=64),
'lot_id': fields.many2one('auction.lots', 'Object', required=True, ondelete='cascade'),
'auction_id': fields.many2one('auction.dates', 'Auction date', required=True, ondelete='cascade'),
'price': fields.float('Withdrawn price', digits=(16, 2))
}
_defaults = {
'name': lambda *args: time.strftime('%Y-%m-%d')
}
auction_lot_history()
class auction_bid_lines(osv.osv):
_name = "auction.bid_line"
_description="Bid"
_columns = {
'name': fields.char('Bid date', size=64),
'bid_id': fields.many2one('auction.bid', 'Bid ID', required=True, ondelete='cascade'),
'lot_id': fields.many2one('auction.lots', 'Object', required=True, ondelete='cascade'),
'call': fields.boolean('To be Called'),
'price': fields.float('Maximum Price'),
'auction': fields.char(string='Auction Name', size=64)
}
_defaults = {
'name': lambda *args: time.strftime('%Y-%m-%d')
}
def onchange_name(self, cr, uid, ids, lot_id):
if not lot_id:
return {'value': {'auction':False}}
auctions = self.pool.get('auction.lots').browse(cr, uid, lot_id)
v_auction=auctions.auction_id.name or False
return {'value': {'auction': v_auction}}
auction_bid_lines()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -1,272 +0,0 @@
<?xml version="1.0"?>
<openerp>
<data>
<!-- 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="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="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="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="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 -->
</data>
</openerp>

View File

@ -1,924 +0,0 @@
<?xml version="1.0"?>
<openerp>
<data noupdate="1">
<record id="base.user_demo" model="res.users">
<field eval="[(4, ref('group_auction_user'))]" name="groups_id"/>
</record>
<!-- 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">A0</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.data_account_type_view"/>
</record>
<record model="account.account" id="auction_expense_view">
<field name="name">Auction Adjudication Expenses</field>
<field name="code">A1</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.data_account_type_expense"/>
</record>
<record model="account.account" id="auction_income">
<field name="name">Auction Adjudications</field>
<field name="code">A7x*</field>
<field name="user_type" ref="account.data_account_type_income"/>
<field name="type">other</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">A6x*</field>
<field name="user_type" ref="account.data_account_type_expense"/>
<field name="type">other</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">A8x*</field>
<field name="type">other</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">A9x*</field>
<field name="type">other</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-->
<record id="partner_record1" model="res.partner">
<field name="name">Unknown</field>
<field name="is_company">1</field>
</record>
<record id="res_partner_unknown_address_1" model="res.partner">
<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="use_parent_address" eval="0"/>
<field name="parent_id" ref="partner_record1"/>
</record>
<record id="res_partner_unknown_address_2" model="res.partner">
<field name="city">Avignon CEDEX 091</field>
<field name="name">Lara</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="use_parent_address" eval="0"/>
<field name="parent_id" ref="partner_record1"/>
</record>
<record id="res_partner_unknown_address_3" model="res.partner">
<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="use_parent_address" eval="0"/>
<field name="parent_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">
<field name="name">VAT 1%</field>
<field name="code">VAT01</field>
<field name="company_id" model="res.company" search="[]"/>
</record>
<record model="account.tax.code" id="account_tax_code_id2">
<field name="name">VAT 20%</field>
<field name="code">VAT20</field>
<field name="company_id" model="res.company" search="[]"/>
</record>
<record model="account.tax.code" id="account_tax_code_id3">
<field name="name">VAT 10%</field>
<field name="code">VAT10</field>
<field name="company_id" model="res.company" search="[]"/>
</record>
<record model="account.tax.code" id="account_tax_code_id4">
<field name="name">VAT 12%</field>
<field name="code">VAT12</field>
<field name="company_id" model="res.company" search="[]"/>
</record>
<record model="account.tax.code" id="account_tax_code_id5">
<field name="name">VAT 5%</field>
<field name="code">VAT5</field>
<field name="company_id" model="res.company" search="[]"/>
</record>
<!-- demo data for the auction taxes-->
<record id="auction_tax" model="account.tax">
<field name="name">Droit d'auteur</field>
<field name="amount">0.05</field>
<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"/>
</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"/>
</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"/>
</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"/>
</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"/>
</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"/>
</record>
<record id="auction_tax20" model="account.tax">
<field name="name">Frais de vente0</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="priority">1</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" ref="aie_category_furn_view"/>
</record>
<record model="auction.lot.category" id="auction_cat_3">
<field name="name">Glass</field>
<field name="priority">2</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="priority">10</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" ref="aie_category_jew_view"/>
</record>
<!-- end == demo data for the auction_lot_Category-->
<!-- 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>
</record>
<record model="auction.dates" id="auction_date_2">
<field name="name">Antique Items Exhibition</field>
<field name="expo1" eval="time.strftime('%Y-%m-01')" />
<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>
<!-- 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>
</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>
</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>
</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>
</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>
</record>
<record model="auction.lots" id="auction_deposit_1_lot_1">
<field name="auction_id" ref="auction_date_1" />
<field name="name">Aera Glasses</field>
<field name="lot_num">1</field>
<field name="lot_est1">500</field>
<field name="lot_est2">700</field>
<field name="obj_desc">show pices</field>
<field name="obj_ret">465.00</field>
<field name="obj_num">1</field>
<field name="obj_price">0.00</field>
<field name="bord_vnd_id" ref="auction_deposit_1" />
<field name="product_id" ref="monproduit"/>
<field name="author_right" ref="auction_tax"/>
</record>
<record model="auction.lots" id="auction_deposit_1_lot_2">
<field name="auction_id" ref="auction_date_1" />
<field name="name">lake Photos</field>
<field name="lot_num">2</field>
<field name="lot_est1">1000</field>
<field name="lot_est2">1700</field>
<field name="obj_desc">show pices</field>
<field name="obj_ret">0.00</field>
<field name="obj_num">2</field>
<field name="obj_price">1500.00</field>
<field name="bord_vnd_id" ref="auction_deposit_1" />
<!--field name="product_id" ref="monproduit"/-->
<field name="author_right" ref="auction_tax"/>
<field name="product_id" model="product.product" search="[]"/>
</record>
<record model="auction.lots" id="auction_deposit_2_lot_1">
<field name="auction_id" ref="auction_date_1" />
<field name="name">fancy mask</field>
<field name="lot_num">3</field>
<field name="lot_est1">500</field>
<field name="lot_est2">700</field>
<field name="obj_desc">show pices</field>
<field name="obj_ret">650</field>
<field name="obj_num">4</field>
<field name="obj_price">0.00</field>
<field name="bord_vnd_id" ref="auction_deposit_2" />
<field name="author_right" ref="auction_tax"/>
<field name="product_id" model="product.product" search="[]"/>
</record>
<record model="auction.lots" id="auction_deposit_2_lot_2">
<field name="auction_id" ref="auction_date_1" />
<field name="name">Dining Table</field>
<field name="lot_num">4</field>
<field name="lot_est1">200</field>
<field name="lot_est2">400</field>
<field name="obj_desc">show pices</field>
<field name="obj_ret">0.00</field>
<field name="obj_num">4</field>
<field name="obj_price">375</field>
<field name="bord_vnd_id" ref="auction_deposit_2" />
<field name="author_right" ref="auction_tax"/>
<field name="product_id" model="product.product" search="[]"/>
</record>
<record model="auction.lots" id="auction_deposit_3_lot_1">
<field name="auction_id" ref="auction_date_1" />
<field name="name">Plastic glass</field>
<field name="lot_num">5</field>
<field name="lot_est1">300</field>
<field name="lot_est2">500</field>
<field name="obj_desc">show pices</field>
<field name="obj_ret">0.00</field>
<field name="obj_num">5</field>
<field name="obj_price">460</field>
<field name="bord_vnd_id" ref="auction_deposit_3" />
<field name="author_right" ref="auction_tax"/>
<field name="product_id" model="product.product" search="[]"/>
</record>
<record model="auction.lots" id="auction_deposit_3_lot_2">
<field name="auction_id" ref="auction_date_1" />
<field name="name">Mountain photos</field>
<field name="lot_num">6</field>
<!--field name="lot_type">painting</field-->
<field name="lot_est1">50</field>
<field name="lot_est2">100</field>
<field name="obj_desc">show pices</field>
<field name="obj_ret">0.00</field>
<field name="obj_num">6</field>
<field name="obj_price">85</field>
<field name="bord_vnd_id" ref="auction_deposit_3" />
<field name="author_right" ref="auction_tax"/>
<field name="product_id" model="product.product" search="[]"/>
</record>
<record model="auction.lots" id="auction_deposit_4_lot_1">
<field name="auction_id" ref="auction_date_1" />
<field name="name">bresslet</field>
<field name="lot_num">7</field>
<field name="lot_est1">150</field>
<field name="lot_est2">400</field>
<field name="obj_desc">show pices</field>
<field name="obj_ret">100</field>
<field name="obj_num">1</field>
<field name="obj_price">0</field>
<field name="bord_vnd_id" ref="auction_deposit_4" />
<field name="author_right" ref="auction_tax"/>
<field name="product_id" model="product.product" search="[]"/>
</record>
<record model="auction.lots" id="auction_deposit_4_lot_2">
<field name="auction_id" ref="auction_date_1" />
<field name="name">gold chain</field>
<field name="lot_num">11</field>
<field name="lot_est1">400</field>
<field name="lot_est2">700</field>
<field name="obj_desc">show pices</field>
<field name="obj_ret">0.00</field>
<field name="obj_num">11</field>
<field name="obj_price">550</field>
<field name="bord_vnd_id" ref="auction_deposit_4" />
<field name="author_right" ref="auction_tax"/>
<field name="product_id" model="product.product" search="[]"/>
</record>
<record model="auction.lots" id="auction_deposit_5_lot_1">
<field name="auction_id" ref="auction_date_1" />
<field name="name">fiber glass</field>
<field name="lot_num">8</field>
<field name="lot_est1">300</field>
<field name="lot_est2">500</field>
<field name="obj_desc">show pices</field>
<field name="obj_ret">0.00</field>
<field name="obj_num">8</field>
<field name="obj_price">450</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_5_lot_2">
<field name="auction_id" ref="auction_date_1" />
<field name="name">lake photos</field>
<field name="lot_num">9</field>
<field name="lot_est1">100</field>
<field name="lot_est2">200</field>
<field name="obj_desc">show pices</field>
<field name="obj_ret">150</field>
<field name="obj_num">9</field>
<field name="obj_price">0.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_6_lot_1">
<field name="auction_id" ref="auction_date_1" />
<field name="name">mobile photos</field>
<field name="lot_num">10</field>
<field name="lot_est1">4500</field>
<field name="lot_est2">4700</field>
<field name="obj_desc">show models</field>
<field name="obj_ret">4650</field>
<field name="obj_num">10</field>
<field name="obj_price">4800.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_6_lot_2">
<field name="auction_id" ref="auction_date_1" />
<field name="name">Antique photos</field>
<field name="lot_num">11</field>
<field name="lot_est1">1600</field>
<field name="lot_est2">2200</field>
<field name="obj_desc">show map Items</field>
<field name="obj_ret">2150</field>
<field name="obj_num">11</field>
<field name="obj_price">2050.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_7_lot_1">
<field name="auction_id" ref="auction_date_1" />
<field name="name">Hardware photos</field>
<field name="lot_num">12</field>
<field name="lot_est1">2600</field>
<field name="lot_est2">2800</field>
<field name="obj_desc">show map Items</field>
<field name="obj_ret">2550</field>
<field name="obj_num">12</field>
<field name="obj_price">2050.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_7_lot_2">
<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-->
<field name="lot_est1">1600</field>
<field name="lot_est2">2200</field>
<field name="obj_desc">show map Items</field>
<field name="obj_ret">2150</field>
<field name="obj_num">12</field>
<field name="obj_price">2050.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_8_lot_1">
<field name="auction_id" ref="auction_date_1" />
<field name="name">mobile accesories photos</field>
<field name="lot_num">13</field>
<field name="lot_est1">1600</field>
<field name="lot_est2">2200</field>
<field name="obj_desc">show map Items</field>
<field name="obj_ret">2150</field>
<field name="obj_num">13</field>
<field name="obj_price">2050.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_8_lot_2">
<field name="auction_id" ref="auction_date_2" />
<field name="name">pikes-candles</field>
<field name="lot_num">14</field>
<field name="lot_est1">30</field>
<field name="lot_est2">50</field>
<field name="obj_desc">show map Items</field>
<field name="obj_ret">20</field>
<field name="obj_num">14</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_9_lot_1">
<field name="auction_id" ref="auction_date_1" />
<field name="name">Coffee Service</field>
<field name="lot_num">15</field>
<field name="lot_est1">10</field>
<field name="lot_est2">20</field>
<field name="obj_desc">show map Items</field>
<field name="obj_ret">0</field>
<field name="obj_num">15</field>
<field name="obj_price">25</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_9_lot_2">
<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>
<field name="obj_desc">show map Items</field>
<field name="obj_ret">0</field>
<field name="obj_num">16</field>
<field name="obj_price">150</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_1">
<field name="auction_id" ref="auction_date_1" />
<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">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">Table</field>
<field name="lot_num">18</field>
<field name="lot_est1">1600</field>
<field name="lot_est2">2200</field>
<field name="obj_desc">show map Items</field>
<field name="obj_ret">2150</field>
<field name="obj_num">18</field>
<field name="obj_price">2050.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_11_lot_1">
<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">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">Digital photo</field>
<field name="lot_num">20</field>
<field name="lot_est1">160</field>
<field name="lot_est2">340</field>
<field name="obj_desc">map Items</field>
<field name="obj_ret">0</field>
<field name="obj_num">20</field>
<field name="obj_price">150.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.bid" id="auction_date_1_bid_1">
<field name="name">bid1</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_1_auction_bid_line1">
<field name="bid_id" ref="auction_date_1_bid_1" />
<field name="lot_id" ref="auction_deposit_1_lot_1" />
</record>
<record model="auction.bid" id="auction_date_1_bid_2">
<field name="name">bid2</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_2_auction_bid_line1">
<field name="bid_id" ref="auction_date_1_bid_2" />
<field name="lot_id" ref="auction_deposit_1_lot_2" />
</record>
<record model="auction.bid" id="auction_date_1_bid_3">
<field name="name">bid3</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_3_bid_1_auction_bid_line1">
<field name="bid_id" ref="auction_date_1_bid_3" />
<field name="lot_id" ref="auction_deposit_2_lot_1" />
</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" />
</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" />
</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" />
</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" />
</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" />
</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" />
</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" />
</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" />
</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" />
</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" />
</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" />
</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" />
</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" />
</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" />
</record>
<!--demo data for the hr_employee-->
<record model="hr.employee" id="employee2">
<field name="name">Demo</field>
<field name="user_id" search="[('login','=','admin')]" model="res.users"/>
</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.employee_fp" />
</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.employee_fp" />
</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.employee_fp" />
</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.employee_fp" />
</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.employee_fp" />
</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.employee_fp"/>
</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.employee_fp" />
</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.employee_fp" />
</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>
<record id="base.user_demo" model="res.users">
<field name="groups_id" eval="[(4,ref('auction.group_auction_manager'))]"/>
</record>
</data>
</openerp>

View File

@ -1,171 +0,0 @@
<?xml version="1.0"?>
<openerp>
<data>
<report string="Bailiffs Listing"
model="auction.lots"
name="flagey.huissier"
xsl="auction/report/huissier.xsl"
auto="False"
id="v_huissier"
multi="1"
/>
<report string="Artists Biography"
model="auction.artists"
name="report.auction.artists"
xml="auction/report/artists.xml"
xsl="auction/report/artists.xsl"
id="art2"
multi="1"/>
<report string="Bids phones"
model="auction.lots"
name="bids.lots"
rml="auction/report/bids_lots.rml"
id="bid_phone"
multi="1"/>
<report string="Bids"
model="auction.bid"
name="auction.bids"
rml="auction/report/auction_bids.rml"
id="bid_auction"
multi="1"/>
<report
string="Barcode batch"
model="auction.lots"
name="auction.code_bar_lot"
rml="auction/report/report_lot_bar_code.rml"
multi="1"
id="v_report_barcode_lot"/>
<report string="Seller Labels"
model="auction.lots"
name="auction.seller_labels"
auto="False"
multi="1"/>
<report string="Catalog"
model="auction.lots"
name="auction.catelog"
rml="auction/report/auction_catelog.rml"
auto="False"
multi="1"/>
<report string="Lots List"
model="auction.lots"
name="lots.list"
rml="auction/report/lots_list.rml"
auto="False"
multi="1"/>
<report string="Lots List - Landscape"
model="auction.lots"
name="report.auction.lots.list.landscape"
xml="auction/report/lots_list_landscape.xml"
xsl="auction/report/lots_list_landscape.xsl"
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"/>
<report string="Lots List"
model="auction.lots"
name="report.auction.lots.list"
xml="auction/report/lots_list.xml"
xsl="auction/report/lots_list.xsl"
multi="1"/>
<report string="Auction Totals with lists"
model="auction.lots"
name="auction.total.rml"
rml="auction/report/auction_total.rml"
auto="False"
id="total_result1"
multi="1"/>
<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"
id="id_deposit"
model="auction.deposit"
name="report.auction.deposit"
xml="auction/report/deposit.xml"
xsl="auction/report/deposit.xsl"/>
<report string="Seller Form"
id="seller_lots_3"
model="auction.lots"
name="report.auction.vnd_bordereau"
xml="auction/report/vnd_bordereau.xml"
xsl="auction/report/vnd_bordereau.xsl"
multi="1"/>
<report string="Seller List"
model="auction.lots"
multi="1"
id="seller_form_id"
name="report.auction.seller.list"
xml="auction/report/seller_list.xml"
xsl="auction/report/seller_list.xsl"/>
<report string="Buyer List"
model="auction.lots"
name="buyer.list"
id="buy_id_list"
rml="auction/report/buyer_list.rml"
auto = "False"
multi="1"/>
<report string="Bids per lot (phone)"
model="auction.lots"
name="bids.phones.details"
rml="auction/report/bids_phones_details.rml"
id="details_bids_phones"
multi="1"/>
<!--<report string="Bids per lot (phone)xsl"
model="auction.lots"
name="report.auction.lots.bids.phone"
xml="auction/report/lots_bids_phone.xml"
xsl="auction/report/lots_bids_phone.xsl"
multi="1"/>-->
<!-- temp -->
<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"/>
</data>
</openerp>

View File

@ -1,34 +0,0 @@
<?xml version="1.0"?>
<openerp>
<data noupdate="1">
<!-- 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>
</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>
</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>
</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>
</record>
</data>
</openerp>

View File

@ -1,783 +0,0 @@
<?xml version="1.0"?>
<openerp>
<data>
<menuitem name="Auction" id="auction_menu_root" icon="terp-purchase" sequence="26"
groups="group_auction_manager,group_auction_user"/>
<menuitem name="Configuration" parent="auction_menu_root" id="auction_config_menu" sequence="7" groups="group_auction_manager"/>
<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"/>
<!-- Auction Management/Configuration/artist -->
<record model="ir.ui.view" id="view_auction_artist_tree">
<field name="name">auction.artists.tree</field>
<field name="model">auction.artists</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Artists">
<field name="name"/>
<field name="birth_death_dates"/>
</tree>
</field>
</record>
<record model="ir.ui.view" id="view_auction_artist_form">
<field name="name">auction.artists.form</field>
<field name="model">auction.artists</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Artists">
<separator string="Author/Artist" colspan="4"/>
<group colspan="4" col="6">
<field name="name" colspan="4" string="Name" select="1"/>
<newline/>
<field name="pseudo"/>
<field name="birth_death_dates"/>
</group>
<separator string="Biography" colspan="4"/>
<field name="biography" nolabel="1" colspan="4"/>
</form>
</field>
</record>
<record model="ir.actions.act_window" id="action_auction_artist">
<field name="name">Auction Artists</field>
<field name="res_model">auction.artists</field>
<field name="view_type">form</field>
<field name="view_id" ref="view_auction_artist_tree"/>
</record>
<menuitem name="Artists" parent="auction_config_menu" action="action_auction_artist" id="menu_auction_artist"/>
<!-- Auction Management/Configuration/objectcategories -->
<record model="ir.ui.view" id="view_auction_object_categories_tree">
<field name="name">auction.lot.category.tree</field>
<field name="model">auction.lot.category</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Object Categories">
<field name="name"/>
</tree>
</field>
</record>
<record model="ir.ui.view" id="view_auction_object_categories_form">
<field name="name">auction.lot.category.form</field>
<field name="model">auction.lot.category</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Object Categories">
<field name="name" colspan="4" select="1"/>
<newline/>
<field name="aie_categ" colspan="4"/>
<field name="priority"/>
<newline/>
<field name="active"/>
</form>
</field>
</record>
<record model="ir.actions.act_window" id="action_auction_object_categories">
<field name="name">Auction object Categories</field>
<field name="res_model">auction.lot.category</field>
<field name="view_type">form</field>
<field name="view_id" ref="view_auction_object_categories_tree"/>
</record>
<menuitem name="Object Categories" parent="auction_config_menu" action="action_auction_object_categories"
id="menu_auction_object_cat" groups="group_auction_manager"/>
<!-- Auction Management/Auction Dates/New Auction Dates -->
<record model="ir.ui.view" id="view_auction_dates_tree">
<field name="name">Auction dates</field>
<field name="model">auction.dates</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Auction Dates">
<field name="auction1" string="Beginning of the auction"/>
<field name="auction2" string="End of auction"/>
<field name="name" string="Names"/>
<field name="state"/>
</tree>
</field>
</record>
<record model="ir.ui.view" id="view_auction_dates_form">
<field name="name">Auction dates</field>
<field name="model">auction.dates</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Auctions">
<field name="name" colspan="2" select="1"/>
<notebook colspan="4">
<page string="Auction Dates">
<group colspan="4" col="4">
<group colspan="2" col="2">
<separator string="Exposition Dates" colspan="4"/>
<field name="expo1"/>
<field name="expo2"/>
</group>
<group colspan="2" col="2">
<separator string="Auction Dates" colspan="4"/>
<field name="auction1" select="1"/>
<field name="auction2" select="1"/>
</group>
</group>
<separator string="" colspan="4"/>
<field name="state"/>
<button name="close" states="draft" string="Create Invoices" type="object" colspan="2" icon="terp-gtk-go-back-rtl"/>
</page>
<page string="Accounting" >
<group colspan="4" col="4">
<group colspan="2" col="2">
<separator string="Accounting" colspan="4"/>
<field name="acc_expense" domain="[('type','&lt;&gt;','view'),('type','&lt;&gt;','consolidation')]"/>
<field name="acc_income" domain="[('type','&lt;&gt;','view'),('type','&lt;&gt;','consolidation')]"/>
</group>
<group colspan="2" col="2">
<separator string="Analytic" colspan="4"/>
<field name="journal_id"/>
<field name="journal_seller_id"/>
<field name="account_analytic_id" groups="analytic.group_analytic_accounting"/>
</group>
</group>
</page>
<page string="Commissions">
<group col="4" colspan="4" expand="1">
<group col="2" colspan="4">
<separator string="Buyer Commissions" colspan="4"/>
<field name="buyer_costs" domain="[('parent_id','=',False),('domain','=','auction'),('type_tax_use','&lt;&gt;','sale')]" nolabel="1" colspan="4"/>
</group>
<group col="2" colspan="4">
<separator string="Seller Commissions" colspan="4"/>
<field name="seller_costs" domain="[('parent_id','=',False),('domain','=','auction'),('type_tax_use','&lt;&gt;','purchase')]" nolabel="1" colspan="4"/>
</group>
</group>
</page>
<page string="History">
<group colspan="4" col="4">
<group colspan="2" col="2">
<separator string="Buyer Invoices" colspan="2"/>
<field name="buyer_invoice_history" nolabel="1" widget="one2many_list"
height="400">
<tree colors="blue:state == 'draft';black:state in ('proforma','proforma2','open');gray:state == 'cancel'" string="Invoice">
<field name="date_invoice"/>
<field name="number"/>
<field name="partner_id" groups="base.group_user"/>
<field name="name"/>
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
<field name="user_id"/>
<field name="date_due"/>
<field name="origin"/>
<field name="state"/>
</tree>
</field>
</group>
<group colspan="2" col="2">
<separator string="Seller Invoices" colspan="2"/>
<field name="seller_invoice_history" nolabel="1" widget="one2many_list"
height="400">
<tree colors="blue:state == 'draft';black:state in ('proforma','proforma2','open');gray:state == 'cancel'" string="Invoice">
<field name="date_invoice"/>
<field name="number"/>
<field name="partner_id" groups="base.group_user"/>
<field name="name"/>
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
<field name="user_id"/>
<field name="date_due"/>
<field name="origin"/>
<field name="state"/>
</tree>
</field>
</group>
</group>
</page>
</notebook>
</form>
</field>
</record>
<!-- Auction Dates Search view -->
<record id="view_auction_dates_filter" model="ir.ui.view">
<field name="name">Auction Dates search</field>
<field name="model">auction.dates</field>
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Search Next Auction Dates">
<filter icon="terp-document-new"
string="Draft" help="Draft Auction"
name="draft"
domain="[('state','=', 'draft')]"/>
<filter icon="terp-check"
string="Invoiced" help="Invoiced Auction"
domain="[('state','=','closed')]"/>
<separator orientation="vertical"/>
<field name="name" string="Auction"/>
<field name="state"/>
<field name="auction1" string="First Auction Date"/>
<field name="auction2" string="Last Auction Date"/>
<newline/>
<group expand="0" string="Group By...">
<filter string="State" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
<separator orientation="vertical" />
<filter string="Auction Date"
icon="terp-go-month"
help="Auction Date" domain="[]"
context="{'group_by':'auction1'}" />
</group>
</search>
</field>
</record>
<!-- Auction Dates Calendar View -->
<record model="ir.ui.view" id="auction_dates_calendar_view">
<field name="name">Auction Dates Calendar</field>
<field name="model">auction.dates</field>
<field name="type">calendar</field>
<field name="priority" eval="2"/>
<field name="arch" type="xml">
<calendar string="Next Auction"
date_start="auction1" color="">
<field name="name" />
<field name="auction1"/>
</calendar>
</field>
</record>
<record model="ir.actions.act_window" id="action_auction_dates_next">
<field name="name">Auctions</field>
<field name="res_model">auction.dates</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form,calendar</field>
<field name="search_view_id" ref="view_auction_dates_filter"/>
<field name="context">{"search_default_draft": "1"}</field>
</record>
<act_window name="Open lots"
context="{'search_default_auction_id': [active_id], 'default_auction_id': active_id}"
res_model="auction.lots"
src_model="auction.dates"
id="act_auction_lot_line_open"/>
<menuitem name="Auctions" parent="auction_menu_root" id="auction_date_menu" sequence="1"/>
<menuitem name="Auctions" parent="auction_date_menu" id="menu_auction_dates_next1" action="action_auction_dates_next"/>
<record model="ir.ui.view" id="view_auction_lot_tree">
<field name="name">Auction lots</field>
<field name="model">auction.lots</field>
<field name="type">tree</field>
<field name="priority" eval="1"/>
<field name="arch" type="xml">
<tree colors="blue:state in ('unsold','draft');black:state in ('sold','taken_away');gray:state == 'paid' " string="Objects">
<field name="obj_num" string="Ref" select="1"/>
<field name="name" select="1"/>
<field name="ach_uid"/>
<field name="obj_price" sum="Total Adj."/>
<field name="bord_vnd_id"/>
<field name="lot_num"/>
<field name="auction_id"/>
<field name="lot_type"/>
<field name="state" select="1"/>
<button name="button_bought" string="Sold" states="draft" type="object" icon="gtk-jump-to"/>
<button name="button_not_bought" string="Not sold" states="draft" type="object" icon="gtk-undo"/>
<button name="button_taken_away" string="Taken away" states="sold" type="object" icon="gtk-goto-last"/>
<button name="button_unpaid" string="Set to draft" states="sold,unsold,paid" type="object" icon="gtk-convert"/>
</tree>
</field>
</record>
<record model="ir.ui.view" id="auction_lot_detailed">
<field name="name">Auction lots</field>
<field name="model">auction.lots</field>
<field name="type">form</field>
<field name="priority" eval="8"/>
<field name="arch" type="xml">
<form string="Objects">
<group colspan="4" col="8">
<field name="name" colspan="4"/>
<field name="obj_num"/>
<newline/>
<field name="auction_id"/>
<field name="lot_type"/>
<field name="lot_local"/>
</group>
<notebook colspan="4">
<page string="Catalog">
<separator string="Inventory" colspan="2"/>
<group colspan="4" col="6">
<group colspan="2" col="4">
<field name="product_id" colspan="4"/>
<field name="lot_num" select="1" />
<field name="bord_vnd_id"/>
</group>
<group colspan="2" col="1">
<field name="image" widget='image' nolabel="1"/>
</group>
</group>
<group colspan="4" col="6">
<group colspan="2" col="2">
<separator string="Authors" colspan="4"/>
<field name="artist_id"/>
<field name="artist2_id"/>
<field name="author_right" domain="[('domain','=','sabam'),('parent_id','=',False),('type_tax_use','&lt;&gt;','sale')]"/>
</group>
<group colspan="2" col="2">
<separator string="Price" colspan="4"/>
<field name="lot_est1"/>
<field name="lot_est2"/>
<field name="obj_price"/>
<field name="seller_price"/>
<field name="buyer_price"/>
<field name="obj_comm"/>
</group>
<group colspan="2" col="2">
<separator string="Statistical" colspan="4"/>
<field name="gross_revenue"/>
<field name="net_revenue"/>
<field name="gross_margin"/>
<field name="net_margin"/>
<field name="costs"/>
</group>
</group>
<group colspan="4" col="4">
<group colspan="2" col="4">
<separator string="Buyer Information" colspan="4"/>
<field name="ach_uid"/>
<field name="is_ok"/>
<field name="ach_login" />
<field name="paid_ach"/>
<field name="ach_inv_id"/>
<field name="ach_emp"/>
</group>
<group colspan="2" col="4">
<separator string="Seller Information" colspan="4"/>
<field name="seller_id"/>
<newline/>
<field name="vnd_lim"/>
<field name="vnd_lim_net"/>
<field name="sel_inv_id"/>
<field name="paid_vnd"/>
</group>
</group>
<group colspan="4" col="4">
<separator string="" colspan="4"/>
<field name="state" colspan="1"/>
<group col="8" colspan="2">
<button name="button_bought" string="Sold" states="draft" type="object" icon="gtk-jump-to"/>
<button name="button_not_bought" string="Not sold" states="draft" type="object" icon="gtk-undo"/>
<button name="button_taken_away" string="Taken away" states="sold" type="object" icon="gtk-goto-last"/>
<button name="button_unpaid" string="Set to draft" states="sold,unsold,paid" type="object" icon="gtk-convert"/>
</group>
</group>
</page>
<page string="Bids">
<field name="bid_lines" colspan="4" nolabel="1">
<tree string="Bids Details" editable="top">
<field name="bid_id"/>
<field name="price"/>
<field name="call"/>
</tree>
<form string="Bids Details" >
<field name="bid_id"/>
<field name="lot_id" domain="[('auction_id','=',parent['auction_id'])]" on_change="onchange_name(lot_id)"/>
<field name="price"/>
<field name="call"/>
</form>
</field>
</page>
<page string="History">
<group colspan="2" col="2">
<field name="statement_id" domain="[('state','=','draft')]" colspan="4" nolabel="1"
height="575" width="285" widget="one2many_list">
<tree string="Buyer's Payment History">
<field name="statement_id"/>
<field name="amount"/>
<field name="date"/>
</tree>
<form string="Buyer's Payment History">
<field name="name"/>
<field name="sequence"/>
<field name="date"/>
<field name="partner_id"/>
<field name="account_id"/>
<field name="type"/>
<field name="statement_id"/>
<field name="amount"/>
</form>
</field>
</group>
<group colspan="2" col="2">
<field name="history_ids" colspan="4" readonly="1" nolabel="1" height="575">
<tree string="History">
<field name="name"/>
<field name="lot_id"/>
<field name="auction_id"/>
<field name="price"/>
</tree>
</field>
</group>
</page>
<page string="Notes">
<field name="obj_desc" colspan="4" nolabel="1"/>
</page>
</notebook>
</form>
</field>
</record>
<record id="view_auction_lots_filter" model="ir.ui.view">
<field name="name">Auction Lots search</field>
<field name="model">auction.lots</field>
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Search Auction Lots">
<filter icon="terp-document-new"
string="Draft" help="New Object"
name="draft"
domain="[('state','=', 'draft')]"/>
<filter icon="terp-dolar"
string="Sold" help="Buy object"
domain="[('state','=','sold')]"/>
<separator orientation="vertical"/>
<field name="name"/>
<field name="ach_uid"/>
<field name="bord_vnd_id"/>
<field name="state"/>
<newline/>
<group expand="0" string="Group By...">
<filter string="Buyer"
icon="terp-personal"
help="Buyer" domain="[]"
context="{'group_by':'ach_uid'}"/>
<separator orientation="vertical" />
<filter string="Auction"
icon="terp-purchase"
help="Auction" domain="[]"
context="{'group_by':'auction_id'}"/>
<filter string="Inventory"
icon="terp-purchase"
help="Depositer Inventory" domain="[]"
context="{'group_by':'bord_vnd_id'}"/>
<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'}"/>
</group>
</search>
</field>
</record>
<!-- Graph view for Auction Lots -->
<record model="ir.ui.view" id="auction_lot_graph">
<field name="name">Auction lots</field>
<field name="model">auction.lots</field>
<field name="type">graph</field>
<field name="arch" type="xml">
<graph string="Lots" type="bar">
<field name="lot_type"/>
<field name="lot_est1" operator="+"/>
<field name="lot_est2" operator="+"/>
<field name="obj_price" operator="+"/>
</graph>
</field>
</record>
<record model="ir.actions.act_window" id="action_all_objects">
<field name="name">Objects</field>
<field name="res_model">auction.lots</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form,graph</field>
<field name="search_view_id" ref="view_auction_lots_filter"/>
<field name="context">{"search_default_draft": "1"}</field>
</record>
<!-- Action for Bids -->
<act_window name="Open Bids"
context="{'search_default_lot_id': [active_id], 'default_lot_id': active_id}"
res_model="auction.bid_line"
src_model="auction.lots"
id="act_auction_lot_open_bid"/>
<menuitem name="Objects" action="action_all_objects" parent="auction_date_menu" id="auction_all_objects_menu"/>
<record model="ir.ui.view" id="view_deposit_border_form">
<field name="name">auction.deposit.form</field>
<field name="model">auction.deposit</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Deposit Border Form">
<group colspan="4" col="6">
<field name="name" string="Reference"/>
<field name="date_dep"/>
<field name="partner_id"/>
<newline/>
<field name="method"/>
<field name="tax_id" domain="[('domain','=','auction'),('parent_id','=',False),('type_tax_use','&lt;&gt;','purchase')]"/>
<field name="transfer"/>
</group>
<notebook colspan="4">
<page string="General Information">
<field name="lot_id" colspan="4" mode="tree,graph" nolabel="1">
<tree string="Objects">
<field name="lot_num"/>
<field name="obj_num"/>
<field name="auction_id"/>
<field name="name"/>
<field name="obj_price"/>
<field name="vnd_lim"/>
<field name="lot_est1"/>
<field name="lot_est2"/>
</tree>
<form string="Objects">
<notebook colspan="4">
<page string="Description">
<field name="auction_id" colspan="4"/>
<field name="lot_num"/>
<field name="obj_num"/>
<newline/>
<field name="name"/>
<field name="lot_type" select="1"/>
<field name="name2"/>
<newline/>
<field name="artist_id"/>
<field name="artist2_id"/>
<separator string="Objects Description" colspan="4"/>
<field name="obj_desc" colspan="4" nolabel="1"/>
<field name="vnd_lim"/>
<field name="vnd_lim_net"/>
<field name="lot_est1"/>
<field name="lot_est2"/>
<field name="author_right" domain="[('domain','=','sabam'),('parent_id','=',False),('type_tax_use','&lt;&gt;','sale')]"/>
<field name="product_id" domain="[('sale_ok','=',True)]"/>
<field name="state" readonly="1" colspan="4"/>
</page>
<page string="Photos">
<separator string="Image" colspan="4"/>
<field name="image" colspan="4" widget="image" nolabel="1"/>
</page>
</notebook>
</form>
</field>
</page>
<page string="Extra Costs">
<field name="specific_cost_ids" widget="one2many_list" nolabel="1" colspan="4">
<tree string="Deposit Costs" editable="top">
<field name="name"/>
<field name="amount"/>
<field name="account" domain="[('type','=','income')]"/>
</tree>
<form string="Deposit Costs">
<field name="name"/>
<field name="amount"/>
<field name="account"/>
</form>
</field>
</page>
</notebook>
</form>
</field>
</record>
<record model="ir.ui.view" id="view_deposit_border_tree2">
<field name="name">Deposit border</field>
<field name="model">auction.deposit</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="">
<field name="name"/>
<field name="partner_id"/>
<field name="date_dep"/>
<field name="method"/>
<field name="tax_id"/>
<field name="info"/>
</tree>
</field>
</record>
<record id="view_deposit_border_filter" model="ir.ui.view">
<field name="name">Deposit border</field>
<field name="model">auction.deposit</field>
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Search Auction deposit">
<field name="name"/>
<field name="partner_id"/>
<field name="method"/>
<field name="date_dep"/>
<newline/>
<group expand="0" string="Group By...">
<filter string="Seller"
icon="terp-personal"
help="Seller" domain="[]"
context="{'group_by':'partner_id'}"/>
<separator orientation="vertical" />
<filter string="Withdrawned method"
icon="terp-purchase"
help="Withdrawned method" domain="[]"
context="{'group_by':'method'}"/>
<separator orientation="vertical" />
<filter string="Deposit Date"
icon="terp-go-month"
help="Deposit Date" domain="[]"
context="{'group_by':'date_dep'}"/>
</group>
</search>
</field>
</record>
<!-- Auction Deposit Calendar View -->
<record model="ir.ui.view" id="auction_deposit_calendar_view">
<field name="name">Deposit Border Calendar</field>
<field name="model">auction.deposit</field>
<field name="type">calendar</field>
<field name="arch" type="xml">
<calendar string="Deposit Border"
date_start="date_dep" color="create_uid">
<field name="partner_id" />
<field name="date_dep"/>
</calendar>
</field>
</record>
<record model="ir.actions.act_window" id="action_deposit_border">
<field name="name">Deposit border</field>
<field name="res_model">auction.deposit</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form,calendar</field>
<field name="view_id" ref="view_deposit_border_tree2"/>
<field name="search_view_id" ref="view_deposit_border_filter"/>
</record>
<menuitem name="Sellers" id="auction_seller_menu" parent="auction_menu_root" sequence="3"/>
<menuitem name="Deposit border" parent="auction_seller_menu" action="action_deposit_border" id="menu_auction_deposit_border"/>
<!-- Bids Lines View -->
<record model="ir.ui.view" id="view_bids_tree">
<field name="name">auction.bid_line.tree1</field>
<field name="model">auction.bid_line</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Bids">
<field name="bid_id"/>
<field name="price"/>
<field name="call"/>
<field name="auction"/>
</tree>
</field>
</record>
<record model="ir.ui.view" id="view_bids_form">
<field name="name">auction.bid_line.form1</field>
<field name="model">auction.bid_line</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Bids">
<field name="bid_id" select="1"/>
<field name="lot_id" domain="[('auction_id','=',parent['auction_id'])]" on_change="onchange_name(lot_id)" colspan="4"/>
<field name="call" colspan="4" select="1"/>
<field name="price"/>
</form>
</field>
</record>
<!-- BidS View -->
<record model="ir.ui.view" id="v19">
<field name="name">auction.bid.form</field>
<field name="model">auction.bid</field>
<field name="arch" type="xml">
<form string="Bids">
<group colspan="4" col="6">
<field name="name"/>
<field name="auction_id"/>
<field name="contact_tel"/>
<newline/>
<field name="partner_id" on_change="onchange_contact(partner_id)" colspan="4"/>
</group>
<field name="bid_lines" colspan="4" nolabel="1">
<tree string="Bids Lines" editable="bottom">
<field name="lot_id" domain="[('auction_id','=',parent.auction_id)]"/>
<field name="price"/>
<field name="call"/>
</tree>
<form string="Bids Lines">
<field name="lot_id" domain="[('auction_id','=',parent.auction_id)]"/>
<field name="price"/>
<field name="call"/>
</form>
</field>
</form>
</field>
</record>
<record model="ir.ui.view" id="view_auction_bid_tree">
<field name="name">auction.bid.tree</field>
<field name="model">auction.bid</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Bids">
<field name="name"/>
<field name="auction_id"/>
<field name="partner_id"/>
<field name="contact_tel"/>
</tree>
</field>
</record>
<record id="view_auction_bid_filter" model="ir.ui.view">
<field name="name">Auction Bid</field>
<field name="model">auction.bid</field>
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Search Auction Bid">
<field name="name"/>
<field name="auction_id"/>
<field name="partner_id"/>
<field name="contact_tel"/>
<newline/>
<group expand="0" string="Group By...">
<filter string="Buyer"
icon="terp-personal"
help="Buyer" domain="[]"
context="{'group_by':'partner_id'}"/>
<separator orientation="vertical" />
<filter string="Auction"
icon="terp-purchase"
help="Auction" domain="[]"
context="{'group_by':'auction_id'}"/>
</group>
</search>
</field>
</record>
<record model="ir.actions.act_window" id="action_bid_open">
<field name="name">Open Bids</field>
<field name="res_model">auction.bid</field>
<field name="view_mode">tree,form</field>
</record>
<menuitem name="Buyers" id="auction_buyers_menu" parent="auction_menu_root" sequence="4"/>
<menuitem name="Bids" parent="auction_buyers_menu" action="action_bid_open" id="menu_action_bid_open"/>
<menuitem name="Auction" id="auction_report_menu" parent="base.menu_reporting" sequence="70" groups="group_auction_manager"/>
<act_window name="Deposit slip"
context="{'search_default_partner_id': [active_id], 'default_partner_id': active_id}"
res_model="auction.deposit"
src_model="res.partner"
id="act_auction_lot_open_deposit"/>
</data>
</openerp>

View File

@ -1,7 +0,0 @@
<?xml version="1.0"?>
<openerp>
<data>
</data>
</openerp>

View File

@ -1,35 +0,0 @@
# -*- coding: utf-8 -*-
#
# Copyright (c) 1996-2000 Tyler C. Sarna <tsarna@sarna.org>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# 3. All advertising materials mentioning features or use of this software
# must display the following acknowledgement:
# This product includes software developed by Tyler C. Sarna.
# 4. Neither the name of the author nor the names of contributors
# may be used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS
# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#
__version__ = '0.9'
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -1,322 +0,0 @@
# -*- coding: utf-8 -*-
#
# Copyright (c) 2000 Tyler C. Sarna <tsarna@sarna.org>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# 3. All advertising materials mentioning features or use of this software
# must display the following acknowledgement:
# This product includes software developed by Tyler C. Sarna.
# 4. Neither the name of the author nor the names of contributors
# may be used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS
# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#
from reportlab.lib.units import inch
from common import MultiWidthBarcode
from string import digits
_patterns = {
0 : 'BaBbBb', 1 : 'BbBaBb', 2 : 'BbBbBa',
3 : 'AbAbBc', 4 : 'AbAcBb', 5 : 'AcAbBb',
6 : 'AbBbAc', 7 : 'AbBcAb', 8 : 'AcBbAb',
9 : 'BbAbAc', 10 : 'BbAcAb', 11 : 'BcAbAb',
12 : 'AaBbCb', 13 : 'AbBaCb', 14 : 'AbBbCa',
15 : 'AaCbBb', 16 : 'AbCaBb', 17 : 'AbCbBa',
18 : 'BbCbAa', 19 : 'BbAaCb', 20 : 'BbAbCa',
21 : 'BaCbAb', 22 : 'BbCaAb', 23 : 'CaBaCa',
24 : 'CaAbBb', 25 : 'CbAaBb', 26 : 'CbAbBa',
27 : 'CaBbAb', 28 : 'CbBaAb', 29 : 'CbBbAa',
30 : 'BaBaBc', 31 : 'BaBcBa', 32 : 'BcBaBa',
33 : 'AaAcBc', 34 : 'AcAaBc', 35 : 'AcAcBa',
36 : 'AaBcAc', 37 : 'AcBaAc', 38 : 'AcBcAa',
39 : 'BaAcAc', 40 : 'BcAaAc', 41 : 'BcAcAa',
42 : 'AaBaCc', 43 : 'AaBcCa', 44 : 'AcBaCa',
45 : 'AaCaBc', 46 : 'AaCcBa', 47 : 'AcCaBa',
48 : 'CaCaBa', 49 : 'BaAcCa', 50 : 'BcAaCa',
51 : 'BaCaAc', 52 : 'BaCcAa', 53 : 'BaCaCa',
54 : 'CaAaBc', 55 : 'CaAcBa', 56 : 'CcAaBa',
57 : 'CaBaAc', 58 : 'CaBcAa', 59 : 'CcBaAa',
60 : 'CaDaAa', 61 : 'BbAdAa', 62 : 'DcAaAa',
63 : 'AaAbBd', 64 : 'AaAdBb', 65 : 'AbAaBd',
66 : 'AbAdBa', 67 : 'AdAaBb', 68 : 'AdAbBa',
69 : 'AaBbAd', 70 : 'AaBdAb', 71 : 'AbBaAd',
72 : 'AbBdAa', 73 : 'AdBaAb', 74 : 'AdBbAa',
75 : 'BdAbAa', 76 : 'BbAaAd', 77 : 'DaCaAa',
78 : 'BdAaAb', 79 : 'AcDaAa', 80 : 'AaAbDb',
81 : 'AbAaDb', 82 : 'AbAbDa', 83 : 'AaDbAb',
84 : 'AbDaAb', 85 : 'AbDbAa', 86 : 'DaAbAb',
87 : 'DbAaAb', 88 : 'DbAbAa', 89 : 'BaBaDa',
90 : 'BaDaBa', 91 : 'DaBaBa', 92 : 'AaAaDc',
93 : 'AaAcDa', 94 : 'AcAaDa', 95 : 'AaDaAc',
96 : 'AaDcAa', 97 : 'DaAaAc', 98 : 'DaAcAa',
99 : 'AaCaDa', 100 : 'AaDaCa', 101 : 'CaAaDa',
102 : 'DaAaCa', 103 : 'BaAdAb', 104 : 'BaAbAd',
105 : 'BaAbCb', 106 : 'BcCaAaB'
}
starta, startb, startc, stop = 103, 104, 105, 106
seta = {
' ' : 0, '!' : 1, '"' : 2, '#' : 3,
'$' : 4, '%' : 5, '&' : 6, '\'' : 7,
'(' : 8, ')' : 9, '*' : 10, '+' : 11,
',' : 12, '-' : 13, '.' : 14, '/' : 15,
'0' : 16, '1' : 17, '2' : 18, '3' : 19,
'4' : 20, '5' : 21, '6' : 22, '7' : 23,
'8' : 24, '9' : 25, ':' : 26, ';' : 27,
'<' : 28, '=' : 29, '>' : 30, '?' : 31,
'@' : 32, 'A' : 33, 'B' : 34, 'C' : 35,
'D' : 36, 'E' : 37, 'F' : 38, 'G' : 39,
'H' : 40, 'I' : 41, 'J' : 42, 'K' : 43,
'L' : 44, 'M' : 45, 'N' : 46, 'O' : 47,
'P' : 48, 'Q' : 49, 'R' : 50, 'S' : 51,
'T' : 52, 'U' : 53, 'V' : 54, 'W' : 55,
'X' : 56, 'Y' : 57, 'Z' : 58, '[' : 59,
'\\' : 60, ']' : 61, '^' : 62, '_' : 63,
'\x00' : 64, '\x01' : 65, '\x02' : 66, '\x03' : 67,
'\x04' : 68, '\x05' : 69, '\x06' : 70, '\x07' : 71,
'\x08' : 72, '\x09' : 73, '\x0a' : 74, '\x0b' : 75,
'\x0c' : 76, '\x0d' : 77, '\x0e' : 78, '\x0f' : 79,
'\x10' : 80, '\x11' : 81, '\x12' : 82, '\x13' : 83,
'\x14' : 84, '\x15' : 85, '\x16' : 86, '\x17' : 87,
'\x18' : 88, '\x19' : 89, '\x1a' : 90, '\x1b' : 91,
'\x1c' : 92, '\x1d' : 93, '\x1e' : 94, '\x1f' : 95,
'\xf3' : 96, '\xf2' : 97, 'SHIFT' : 98, 'TO_C' : 99,
'TO_B' : 100, '\xf4' : 101, '\xf1' : 102
}
setb = {
' ' : 0, '!' : 1, '"' : 2, '#' : 3,
'$' : 4, '%' : 5, '&' : 6, '\'' : 7,
'(' : 8, ')' : 9, '*' : 10, '+' : 11,
',' : 12, '-' : 13, '.' : 14, '/' : 15,
'0' : 16, '1' : 17, '2' : 18, '3' : 19,
'4' : 20, '5' : 21, '6' : 22, '7' : 23,
'8' : 24, '9' : 25, ':' : 26, ';' : 27,
'<' : 28, '=' : 29, '>' : 30, '?' : 31,
'@' : 32, 'A' : 33, 'B' : 34, 'C' : 35,
'D' : 36, 'E' : 37, 'F' : 38, 'G' : 39,
'H' : 40, 'I' : 41, 'J' : 42, 'K' : 43,
'L' : 44, 'M' : 45, 'N' : 46, 'O' : 47,
'P' : 48, 'Q' : 49, 'R' : 50, 'S' : 51,
'T' : 52, 'U' : 53, 'V' : 54, 'W' : 55,
'X' : 56, 'Y' : 57, 'Z' : 58, '[' : 59,
'\\' : 60, ']' : 61, '^' : 62, '_' : 63,
'`' : 64, 'a' : 65, 'b' : 66, 'c' : 67,
'd' : 68, 'e' : 69, 'f' : 70, 'g' : 71,
'h' : 72, 'i' : 73, 'j' : 74, 'k' : 75,
'l' : 76, 'm' : 77, 'n' : 78, 'o' : 79,
'p' : 80, 'q' : 81, 'r' : 82, 's' : 83,
't' : 84, 'u' : 85, 'v' : 86, 'w' : 87,
'x' : 88, 'y' : 89, 'z' : 90, '{' : 91,
'|' : 92, '}' : 93, '~' : 94, '\x7f' : 95,
'\xf3' : 96, '\xf2' : 97, 'SHIFT' : 98, 'TO_C' : 99,
'\xf4' : 100, 'TO_A' : 101, '\xf1' : 102
}
setc = {
'00': 0, '01': 1, '02': 2, '03': 3, '04': 4,
'05': 5, '06': 6, '07': 7, '08': 8, '09': 9,
'10':10, '11':11, '12':12, '13':13, '14':14,
'15':15, '16':16, '17':17, '18':18, '19':19,
'20':20, '21':21, '22':22, '23':23, '24':24,
'25':25, '26':26, '27':27, '28':28, '29':29,
'30':30, '31':31, '32':32, '33':33, '34':34,
'35':35, '36':36, '37':37, '38':38, '39':39,
'40':40, '41':41, '42':42, '43':43, '44':44,
'45':45, '46':46, '47':47, '48':48, '49':49,
'50':50, '51':51, '52':52, '53':53, '54':54,
'55':55, '56':56, '57':57, '58':58, '59':59,
'60':60, '61':61, '62':62, '63':63, '64':64,
'65':65, '66':66, '67':67, '68':68, '69':69,
'70':70, '71':71, '72':72, '73':73, '74':74,
'75':75, '76':76, '77':77, '78':78, '79':79,
'80':80, '81':81, '82':82, '83':83, '84':84,
'85':85, '86':86, '87':87, '88':88, '89':89,
'90':90, '91':91, '92':92, '93':93, '94':94,
'95':95, '96':96, '97':97, '98':98, '99':99,
'TO_B' : 100, 'TO_A' : 101, '\xf1' : 102
}
setmap = {
'TO_A' : (seta, setb),
'TO_B' : (setb, seta),
'TO_C' : (setc, None),
'START_A' : (starta, seta, setb),
'START_B' : (startb, setb, seta),
'START_C' : (startc, setc, None),
}
tos = setmap.keys()
class Code128(MultiWidthBarcode):
"""
Code 128 is a very compact symbology that can encode the entire
128 character ASCII set, plus 4 special control codes,
(FNC1-FNC4, expressed in the input string as \xf1 to \xf4).
Code 128 can also encode digits at double density (2 per byte)
and has a mandatory checksum. Code 128 is well supported and
commonly used -- for example, by UPS for tracking labels.
Because of these qualities, Code 128 is probably the best choice
for a linear symbology today (assuming you have a choice).
Options that may be passed to constructor:
value (int, or numeric string. required.):
The value to encode.
xdim (float, default .0075):
X-Dimension, or width of the smallest element
Minumum is .0075 inch (7.5 mils).
height (float, see default below):
Height of the symbol. Default is the height of the two
bearer bars (if they exist) plus the greater of .25 inch
or .15 times the symbol's length.
quiet (bool, default 1):
Wether to include quiet zones in the symbol.
lquiet (float, see default below):
Quiet zone size to left of code, if quiet is true.
Default is the greater of .25 inch, or 10 xdim
rquiet (float, defaults as above):
Quiet zone size to right left of code, if quiet is true.
Sources of Information on Code 128:
http://www.semiconductor.agilent.com/barcode/sg/Misc/code_128.html
http://www.adams1.com/pub/russadam/128code.html
http://www.barcodeman.com/c128.html
Official Spec, "ANSI/AIM BC4-1999, ISS" is available for US$45 from
http://www.aimglobal.org/aimstore/
"""
def __init__(self, value='', **args):
self.xdim = inch * 0.0075
self.lquiet = None
self.rquiet = None
self.quiet = 1
self.height = None
if type(value) is type(1):
value = str(value)
for (k, v) in args.items():
setattr(self, k, v)
if self.quiet:
if self.lquiet is None:
self.lquiet = max(inch * 0.25, self.xdim * 10.0)
self.rquiet = max(inch * 0.25, self.xdim * 10.0)
else:
self.lquiet = self.rquiet = 0.0
MultiWidthBarcode.__init__(self, value)
def validate(self):
vval = ""
self.valid = 1
for c in self.value:
if ord(c) > 127 and c not in '\xf1\xf2\xf3\xf4':
self.valid = 0
continue
vval = vval + c
self.validated = vval
return vval
def _trailingDigitsToC(self, l):
# Optimization: trailing digits -> set C double-digits
c = 1
savings = -1 # the TO_C costs one character
rl = ['STOP']
while c < len(l):
i = (-c - 1)
if l[i] == '\xf1':
c = c + 1
rl.insert(0, '\xf1')
continue
elif len(l[i]) == 1 and l[i] in digits \
and len(l[i-1]) == 1 and l[i-1] in digits:
c = c + 2
savings = savings + 1
rl.insert(0, l[i-1] + l[i])
continue
else:
break
if savings > 0:
return l[:-c] + ['TO_C'] + rl
else:
return l
def encode(self):
# First, encode using only B
s = self.validated
l = ['START_B']
for c in s:
if not setb.has_key(c):
l = l + ['TO_A', c, 'TO_B']
else:
l.append(c)
l.append('STOP')
l = self._trailingDigitsToC(l)
# Finally, replace START_X,TO_Y with START_Y
if l[1] in tos:
l[:2] = ['START_' + l[1][-1]]
# encode into numbers
start, set, shset = setmap[l[0]]
e = [start]
l = l[1:-1]
while l:
c = l[0]
if c == 'SHIFT':
e = e + [set[c], shset[l[1]]]
l = l[2:]
elif c in tos:
e.append(set[c])
set, shset = setmap[c]
l = l[1:]
else:
e.append(set[c])
l = l[1:]
c = e[0]
for i in range(1, len(e)):
c = c + i * e[i]
self.encoded = e + [c % 103, stop]
return self.encoded
def decompose(self):
dval = ''
for c in self.encoded:
dval = dval + _patterns[c]
self.decomposed = dval
return self.decomposed
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -1,257 +0,0 @@
# -*- coding: utf-8 -*-
#
# Copyright (c) 1996-2000 Tyler C. Sarna <tsarna@sarna.org>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# 3. All advertising materials mentioning features or use of this software
# must display the following acknowledgement:
# This product includes software developed by Tyler C. Sarna.
# 4. Neither the name of the author nor the names of contributors
# may be used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS
# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#
from reportlab.lib.units import inch
from common import Barcode
import string
_patterns = {
'0': ("bsbSBsBsb", 0), '1': ("BsbSbsbsB", 1),
'2': ("bsBSbsbsB", 2), '3': ("BsBSbsbsb", 3),
'4': ("bsbSBsbsB", 4), '5': ("BsbSBsbsb", 5),
'6': ("bsBSBsbsb", 6), '7': ("bsbSbsBsB", 7),
'8': ("BsbSbsBsb", 8), '9': ("bsBSbsBsb", 9),
'A': ("BsbsbSbsB", 10), 'B': ("bsBsbSbsB", 11),
'C': ("BsBsbSbsb", 12), 'D': ("bsbsBSbsB", 13),
'E': ("BsbsBSbsb", 14), 'F': ("bsBsBSbsb", 15),
'G': ("bsbsbSBsB", 16), 'H': ("BsbsbSBsb", 17),
'I': ("bsBsbSBsb", 18), 'J': ("bsbsBSBsb", 19),
'K': ("BsbsbsbSB", 20), 'L': ("bsBsbsbSB", 21),
'M': ("BsBsbsbSb", 22), 'N': ("bsbsBsbSB", 23),
'O': ("BsbsBsbSb", 24), 'P': ("bsBsBsbSb", 25),
'Q': ("bsbsbsBSB", 26), 'R': ("BsbsbsBSb", 27),
'S': ("bsBsbsBSb", 28), 'T': ("bsbsBsBSb", 29),
'U': ("BSbsbsbsB", 30), 'V': ("bSBsbsbsB", 31),
'W': ("BSBsbsbsb", 32), 'X': ("bSbsBsbsB", 33),
'Y': ("BSbsBsbsb", 34), 'Z': ("bSBsBsbsb", 35),
'-': ("bSbsbsBsB", 36), '.': ("BSbsbsBsb", 37),
' ': ("bSBsbsBsb", 38), '*': ("bSbsBsBsb", 39),
'$': ("bSbSbSbsb", 40), '/': ("bSbSbsbSb", 41),
'+': ("bSbsbSbSb", 42), '%': ("bsbSbSbSb", 43)
}
_valchars = [
'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A',
'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L',
'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W',
'X', 'Y', 'Z', '-', '.', ' ', '*', '$', '/', '+', '%'
]
_extended = {
'\0': "%U", '\01': "$A", '\02': "$B", '\03': "$C",
'\04': "$D", '\05': "$E", '\06': "$F", '\07': "$G",
'\010': "$H", '\011': "$I", '\012': "$J", '\013': "$K",
'\014': "$L", '\015': "$M", '\016': "$N", '\017': "$O",
'\020': "$P", '\021': "$Q", '\022': "$R", '\023': "$S",
'\024': "$T", '\025': "$U", '\026': "$V", '\027': "$W",
'\030': "$X", '\031': "$Y", '\032': "$Z", '\033': "%A",
'\034': "%B", '\035': "%C", '\036': "%D", '\037': "%E",
'!': "/A", '"': "/B", '#': "/C", '$': "/D",
'%': "/E", '&': "/F", '\'': "/G", '(': "/H",
')': "/I", '*': "/J", '+': "/K", ',': "/L",
'/': "/O", ':': "/Z", ';': "%F", '<': "%G",
'=': "%H", '>': "%I", '?': "%J", '@': "%V",
'[': "%K", '\\': "%L", ']': "%M", '^': "%N",
'_': "%O", '`': "%W", 'a': "+A", 'b': "+B",
'c': "+C", 'd': "+D", 'e': "+E", 'f': "+F",
'g': "+G", 'h': "+H", 'i': "+I", 'j': "+J",
'k': "+K", 'l': "+L", 'm': "+M", 'n': "+N",
'o': "+O", 'p': "+P", 'q': "+Q", 'r': "+R",
's': "+S", 't': "+T", 'u': "+U", 'v': "+V",
'w': "+W", 'x': "+X", 'y': "+Y", 'z': "+Z",
'{': "%P", '|': "%Q", '}': "%R", '~': "%S",
'\177': "%T"
}
_stdchrs = string.digits + string.uppercase + "-. *$/+%"
_extchrs = _stdchrs + string.lowercase + \
"\000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017" + \
"\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" + \
"!'#&\"(),:;<=>?@[\\]^_`{|}~\177"
def _encode39(str, cksum):
newval = "*"
v = 0
for c in str:
v = v + _patterns[c][1]
newval = newval + c
v = v % 43
if cksum:
newval = newval + _valchars[v]
return newval + '*'
class _Code39Base(Barcode):
def __init__(self, value = "", **args):
self.xdim = inch * 0.0075
self.lquiet = None
self.rquiet = None
self.quiet = 1
self.gap = None
self.height = None
self.ratio = 2.2
self.checksum = 0
self.bearers = 0.0
for (k, v) in args.items():
setattr(self, k, v)
if self.quiet:
if self.lquiet is None:
self.lquiet = max(inch * 0.25, self.xdim * 10.0)
self.rquiet = max(inch * 0.25, self.xdim * 10.0)
else:
self.lquiet = self.rquiet = 0.0
Barcode.__init__(self, value)
def decompose(self):
dval = ""
for c in self.encoded:
dval = dval + _patterns[c][0] + 'i'
self.decomposed = dval[:-1]
return self.decomposed
class Standard39(_Code39Base):
"""
Interleaved 2 of 5 is a numeric-only barcode. It encodes an even
number of digits; if an odd number is given, a 0 is prepended.
Options that may be passed to constructor:
value (int, or numeric string. required.):
The value to encode.
xdim (float, default .0075):
X-Dimension, or width of the smallest element
Minumum is .0075 inch (7.5 mils).
ratio (float, default 2.2):
The ratio of wide elements to narrow elements.
Must be between 2.0 and 3.0 (or 2.2 and 3.0 if the
xdim is greater than 20 mils (.02 inch))
gap (float or None, default None):
width of intercharacter gap. None means "use xdim".
height (float, see default below):
Height of the symbol. Default is the height of the two
bearer bars (if they exist) plus the greater of .25 inch
or .15 times the symbol's length.
checksum (bool, default 0):
Wether to compute and include the check digit
bearers (float, in units of xdim. default 0):
Height of bearer bars (horizontal bars along the top and
bottom of the barcode). Default is 0 (no bearers).
quiet (bool, default 1):
Wether to include quiet zones in the symbol.
lquiet (float, see default below):
Quiet zone size to left of code, if quiet is true.
Default is the greater of .25 inch, or .15 times the symbol's
length.
rquiet (float, defaults as above):
Quiet zone size to right left of code, if quiet is true.
Sources of Information on Code 39:
http://www.semiconductor.agilent.com/barcode/sg/Misc/code_39.html
http://www.adams1.com/pub/russadam/39code.html
http://www.barcodeman.com/c39_1.html
Official Spec, "ANSI/AIM BC1-1995, USS" is available for US$45 from
http://www.aimglobal.org/aimstore/
"""
def validate(self):
vval = ""
self.valid = 1
for c in self.value:
if c in string.lowercase:
c = string.upper(c)
if c not in _stdchrs:
self.valid = 0
continue
vval = vval + c
self.validated = vval
return vval
def encode(self):
self.encoded = _encode39(self.validated, self.checksum)
return self.encoded
class Extended39(_Code39Base):
"""
Extended Code 39 is a convention for encoding additional characters
not present in stanmdard Code 39 by using pairs of characters to
represent the characters missing in Standard Code 39.
See Standard39 for arguments.
Sources of Information on Extended Code 39:
http://www.semiconductor.agilent.com/barcode/sg/Misc/xcode_39.html
http://www.barcodeman.com/c39_ext.html
"""
def validate(self):
vval = ""
self.valid = 1
for c in self.value:
if c not in _extchrs:
self.valid = 0
continue
vval = vval + c
self.validated = vval
return vval
def encode(self):
self.encoded = ""
for c in self.validated:
if _extended.has_key(c):
self.encoded = self.encoded + _extended[c]
elif c in _stdchrs:
self.encoded = self.encoded + c
else:
raise ValueError
self.encoded = _encode39(self.encoded, self.checksum)
return self.encoded
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -1,234 +0,0 @@
# -*- coding: utf-8 -*-
#
# Copyright (c) 2000 Tyler C. Sarna <tsarna@sarna.org>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# 3. All advertising materials mentioning features or use of this software
# must display the following acknowledgement:
# This product includes software developed by Tyler C. Sarna.
# 4. Neither the name of the author nor the names of contributors
# may be used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS
# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#
from reportlab.lib.units import inch
from common import MultiWidthBarcode
import string
_patterns = {
'0' : ('AcAaAb', 0), '1' : ('AaAbAc', 1), '2' : ('AaAcAb', 2),
'3' : ('AaAdAa', 3), '4' : ('AbAaAc', 4), '5' : ('AbAbAb', 5),
'6' : ('AbAcAa', 6), '7' : ('AaAaAd', 7), '8' : ('AcAbAa', 8),
'9' : ('AdAaAa', 9), 'A' : ('BaAaAc', 10), 'B' : ('BaAbAb', 11),
'C' : ('BaAcAa', 12), 'D' : ('BbAaAb', 13), 'E' : ('BbAbAa', 14),
'F' : ('BcAaAa', 15), 'G' : ('AaBaAc', 16), 'H' : ('AaBbAb', 17),
'I' : ('AaBcAa', 18), 'J' : ('AbBaAb', 19), 'K' : ('AcBaAa', 20),
'L' : ('AaAaBc', 21), 'M' : ('AaAbBb', 22), 'N' : ('AaAcBa', 23),
'O' : ('AbAaBb', 24), 'P' : ('AcAaBa', 25), 'Q' : ('BaBaAb', 26),
'R' : ('BaBbAa', 27), 'S' : ('BaAaBb', 28), 'T' : ('BaAbBa', 29),
'U' : ('BbAaBa', 30), 'V' : ('BbBaAa', 31), 'W' : ('AaBaBb', 32),
'X' : ('AaBbBa', 33), 'Y' : ('AbBaBa', 34), 'Z' : ('AbCaAa', 35),
'-' : ('AbAaCa', 36), '.' : ('CaAaAb', 37), ' ' : ('CaAbAa', 38),
'$' : ('CbAaAa', 39), '/' : ('AaBaCa', 40), '+' : ('AaCaBa', 41),
'%' : ('BaAaCa', 42), '#' : ('AbAbBa', 43), '!' : ('CaBaAa', 44),
'=' : ('CaAaBa', 45), '&' : ('AbBbAa', 46),
'start' : ('AaAaDa', -1), 'stop' : ('AaAaDaA', -2)
}
_charsbyval = {}
for k, v in _patterns.items():
_charsbyval[v[1]] = k
_extended = {
'\x00' : '!U', '\x01' : '#A', '\x02' : '#B', '\x03' : '#C',
'\x04' : '#D', '\x05' : '#E', '\x06' : '#F', '\x07' : '#G',
'\x08' : '#H', '\x09' : '#I', '\x0a' : '#J', '\x0b' : '#K',
'\x0c' : '#L', '\x0d' : '#M', '\x0e' : '#N', '\x0f' : '#O',
'\x10' : '#P', '\x11' : '#Q', '\x12' : '#R', '\x13' : '#S',
'\x14' : '#T', '\x15' : '#U', '\x16' : '#V', '\x17' : '#W',
'\x18' : '#X', '\x19' : '#Y', '\x1a' : '#Z', '\x1b' : '!A',
'\x1c' : '!B', '\x1d' : '!C', '\x1e' : '!D', '\x1f' : '!E',
'!' : '=A', '"' : '=B', '#' : '=C', '$' : '=D',
'%' : '=E', '&' : '=F', '\'' : '=G', '(' : '=H',
')' : '=I', '*' : '=J', '+' : '=K', ',' : '=L',
'/' : '=O', ':' : '=Z', ';' : '!F', '<' : '!G',
'=' : '!H', '>' : '!I', '?' : '!J', '@' : '!V',
'[' : '!K', '\\' : '!L', ']' : '!M', '^' : '!N',
'_' : '!O', '`' : '!W', 'a' : '&A', 'b' : '&B',
'c' : '&C', 'd' : '&D', 'e' : '&E', 'f' : '&F',
'g' : '&G', 'h' : '&H', 'i' : '&I', 'j' : '&J',
'k' : '&K', 'l' : '&L', 'm' : '&M', 'n' : '&N',
'o' : '&O', 'p' : '&P', 'q' : '&Q', 'r' : '&R',
's' : '&S', 't' : '&T', 'u' : '&U', 'v' : '&V',
'w' : '&W', 'x' : '&X', 'y' : '&Y', 'z' : '&Z',
'{' : '!P', '|' : '!Q', '}' : '!R', '~' : '!S',
'\x7f' : '!T'
}
def _encode93(str):
s = map(None, str)
s.reverse()
# compute 'C' checksum
i = 0; v = 1; c = 0
while i < len(s):
c = c + v * _patterns[s[i]][1]
i = i + 1; v = v + 1
if v > 20:
v = 1
s.insert(0, _charsbyval[c % 47])
# compute 'K' checksum
i = 0; v = 1; c = 0
while i < len(s):
c = c + v * _patterns[s[i]][1]
i = i + 1; v = v + 1
if v > 15:
v = 1
s.insert(0, _charsbyval[c % 47])
s.reverse()
return string.join(s, '')
class _Code93Base(MultiWidthBarcode):
def __init__(self, value='', **args):
self.xdim = inch * 0.0075
self.lquiet = None
self.rquiet = None
self.quiet = 1
self.height = None
if type(value) is type(1):
value = str(value)
for (k, v) in args.items():
setattr(self, k, v)
if self.quiet:
if self.lquiet is None:
self.lquiet = max(inch * 0.25, self.xdim * 10.0)
self.rquiet = max(inch * 0.25, self.xdim * 10.0)
else:
self.lquiet = self.rquiet = 0.0
MultiWidthBarcode.__init__(self, value)
def decompose(self):
dval = _patterns['start'][0]
for c in self.encoded:
dval = dval + _patterns[c][0]
self.decomposed = dval + _patterns['stop'][0]
return self.decomposed
class Standard93(_Code93Base):
"""
Code 93 is a Uppercase alphanumeric symbology with some punctuation.
See Extended Code 93 for a variant that can represent the entire
128 characrter ASCII set.
Options that may be passed to constructor:
value (int, or numeric string. required.):
The value to encode.
xdim (float, default .0075):
X-Dimension, or width of the smallest element
Minumum is .0075 inch (7.5 mils).
height (float, see default below):
Height of the symbol. Default is the height of the two
bearer bars (if they exist) plus the greater of .25 inch
or .15 times the symbol's length.
quiet (bool, default 1):
Wether to include quiet zones in the symbol.
lquiet (float, see default below):
Quiet zone size to left of code, if quiet is true.
Default is the greater of .25 inch, or 10 xdim
rquiet (float, defaults as above):
Quiet zone size to right left of code, if quiet is true.
Sources of Information on Code 93:
http://www.semiconductor.agilent.com/barcode/sg/Misc/code_93.html
Official Spec, "NSI/AIM BC5-1995, USS" is available for US$45 from
http://www.aimglobal.org/aimstore/
"""
def validate(self):
vval = ""
self.valid = 1
for c in self.value:
if c in string.lowercase:
c = string.upper(c)
if not _patterns.has_key(c):
self.valid = 0
continue
vval = vval + c
self.validated = vval
return vval
def encode(self):
self.encoded = _encode93(self.validated)
return self.encoded
class Extended93(_Code93Base):
"""
Extended Code 93 is a convention for encoding the entire 128 character
set using pairs of characters to represent the characters missing in
Standard Code 93. It is very much like Extended Code 39 in that way.
See Standard93 for arguments.
"""
def validate(self):
vval = ""
self.valid = 1
for c in self.value:
if not _patterns.has_key(c) and not _extended.has_key(c):
self.valid = 0
continue
vval = vval + c
self.validated = vval
return vval
def encode(self):
self.encoded = ""
for c in self.validated:
if _patterns.has_key(c):
self.encoded = self.encoded + c
elif _extended.has_key(c):
self.encoded = self.encoded + _extended[c]
else:
raise ValueError
self.encoded = _encode93(self.encoded)
return self.encoded
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -1,707 +0,0 @@
# -*- coding: utf-8 -*-
#
# Copyright (c) 1996-2000 Tyler C. Sarna <tsarna@sarna.org>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# 3. All advertising materials mentioning features or use of this software
# must display the following acknowledgement:
# This product includes software developed by Tyler C. Sarna.
# 4. Neither the name of the author nor the names of contributors
# may be used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS
# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#
from reportlab.platypus.flowables import Flowable
from reportlab.lib.units import inch
import string
class Barcode(Flowable):
"""Abstract Base for barcodes. Includes implementations of
some methods suitable for the more primitive barcode types"""
def __init__(self, value = ''):
self.value = value
if not hasattr(self, 'gap'):
self.gap = None
self.validate()
self.encode()
#print self.encoded
self.decompose()
#print self.decomposed
self.computeSize()
def validate(self):
self.valid = 1
self.validated = self.value
def encode(self):
self.encoded = self.validated
def decompose(self):
self.decomposed = self.encoded
def computeSize(self, *args):
xdim = self.xdim
wx = xdim * self.ratio
if self.gap == None:
self.gap = xdim
w = 0.0
for c in self.decomposed:
if c in 'sb':
w = w + xdim
elif c in 'SB':
w = w + wx
else: # 'i'
w = w + self.gap
if self.height is None:
self.height = w * 0.15
self.height = max(0.25 * inch, self.height)
if self.bearers:
self.height = self.height + self.bearers * 2.0 * xdim
if self.quiet:
w = w + self.lquiet + self.rquiet
self.xo = self.lquiet
else:
self.xo = 0.0
self.width = w
def draw(self):
xdim = self.xdim
wx = xdim * self.ratio
left = self.xo
b = self.bearers * xdim
bb = b * 0.5
tb = self.height - (b * 1.5)
for c in self.decomposed:
if c == 'i':
left = left + self.gap
elif c == 's':
left = left + xdim
elif c == 'S':
left = left + wx
elif c == 'b':
self.rect(left, bb, xdim, tb)
left = left + xdim
elif c == 'B':
self.rect(left, bb, wx, tb)
left = left + wx
if self.bearers:
self.rect(self.lquiet, 0.0, \
self.width - (self.lquiet + self.rquiet), b)
self.rect(self.lquiet, self.height - b, \
self.width - (self.lquiet + self.rquiet), b)
def rect(self, x, y, w, h):
self.canv.rect(x, y, w, h, stroke=0, fill=1)
class MultiWidthBarcode(Barcode):
"""Base for variable-bar-width codes like Code93 and Code128"""
def computeSize(self, *args):
xdim = self.xdim
oa, oA = ord('a') - 1, ord('A') - 1
w = 0.0
for c in self.decomposed:
oc = ord(c)
if c in string.lowercase:
w = w + xdim * (oc - oa)
elif c in string.uppercase:
w = w + xdim * (oc - oA)
if self.height is None:
self.height = w * 0.15
self.height = max(0.25 * inch, self.height)
if self.quiet:
w = w + self.lquiet + self.rquiet
self.xo = self.lquiet
else:
self.xo = 0.0
self.width = w
def draw(self):
oa, oA = ord('a') - 1, ord('A') - 1
xdim = self.xdim
left = self.xo
for c in self.decomposed:
oc = ord(c)
if c in string.lowercase:
left = left + (oc - oa) * xdim
elif c in string.uppercase:
w = (oc - oA) * xdim
self.rect(left, 0.0, w, self.height)
left = left + w
class I2of5(Barcode):
"""
Interleaved 2 of 5 is a numeric-only barcode. It encodes an even
number of digits; if an odd number is given, a 0 is prepended.
Options that may be passed to constructor:
value (int, or numeric string. required.):
The value to encode.
xdim (float, default .0075):
X-Dimension, or width of the smallest element
Minumum is .0075 inch (7.5 mils).
ratio (float, default 2.2):
The ratio of wide elements to narrow elements.
Must be between 2.0 and 3.0 (or 2.2 and 3.0 if the
xdim is greater than 20 mils (.02 inch))
gap (float or None, default None):
width of intercharacter gap. None means "use xdim".
height (float, see default below):
Height of the symbol. Default is the height of the two
bearer bars (if they exist) plus the greater of .25 inch
or .15 times the symbol's length.
checksum (bool, default 1):
Wether to compute and include the check digit
bearers (float, in units of xdim. default 3.0):
Height of bearer bars (horizontal bars along the top and
bottom of the barcode). Default is 3 x-dimensions.
Set to zero for no bearer bars. (Bearer bars help detect
misscans, so it is suggested to leave them on).
quiet (bool, default 1):
Wether to include quiet zones in the symbol.
lquiet (float, see default below):
Quiet zone size to left of code, if quiet is true.
Default is the greater of .25 inch, or .15 times the symbol's
length.
rquiet (float, defaults as above):
Quiet zone size to right left of code, if quiet is true.
Sources of Information on Interleaved 2 of 5:
http://www.semiconductor.agilent.com/barcode/sg/Misc/i_25.html
http://www.adams1.com/pub/russadam/i25code.html
Official Spec, "ANSI/AIM BC2-1995, USS" is available for US$45 from
http://www.aimglobal.org/aimstore/
"""
patterns = {
'start' : 'bsbs',
'stop' : 'Bsb',
'B0' : 'bbBBb', 'S0' : 'ssSSs',
'B1' : 'BbbbB', 'S1' : 'SsssS',
'B2' : 'bBbbB', 'S2' : 'sSssS',
'B3' : 'BBbbb', 'S3' : 'SSsss',
'B4' : 'bbBbB', 'S4' : 'ssSsS',
'B5' : 'BbBbb', 'S5' : 'SsSss',
'B6' : 'bBBbb', 'S6' : 'sSSss',
'B7' : 'bbbBB', 'S7' : 'sssSS',
'B8' : 'BbbBb', 'S8' : 'SssSs',
'B9' : 'bBbBb', 'S9' : 'sSsSs'
}
def __init__(self, value='', **args):
self.height = None
self.xdim = inch * 0.0075
self.ratio = 2.2
self.checksum = 1
self.bearers = 3.0
self.quiet = 1
self.lquiet = self.rquiet = None
if type(value) == type(1):
value = str(value)
for (k, v) in args.items():
setattr(self, k, v)
if self.quiet:
if self.lquiet is None:
self.lquiet = min(inch * 0.25, self.xdim * 10.0)
self.rquiet = min(inch * 0.25, self.xdim * 10.0)
else:
self.lquiet = self.rquiet = 0.0
Barcode.__init__(self, value)
def validate(self):
vval = ""
self.valid = 1
for c in string.strip(self.value):
if c not in string.digits:
self.valid = 0
continue
vval = vval + c
self.validated = vval
return vval
def encode(self):
s = self.validated
# make sure result will be a multiple of 2 digits long,
# checksum included
if ((len(self.validated) % 2 == 0) and self.checksum) \
or ((len(self.validated) % 2 == 1) and not self.checksum):
s = '0' + s
if self.checksum:
c = 0
cm = 3
for d in s:
c = c + cm * int(d)
if cm == 3:
cm = 1
else:
cm = 3
d = 10 - (int(d) % 10)
s = s + `d`
self.encoded = s
def decompose(self):
dval = self.patterns['start']
for i in range(0, len(self.encoded), 2):
b = self.patterns['B' + self.encoded[i]]
s = self.patterns['S' + self.encoded[i+1]]
for i in range(0, len(b)):
dval = dval + b[i] + s[i]
self.decomposed = dval + self.patterns['stop']
return self.decomposed
class MSI(Barcode):
"""
MSI is a numeric-only barcode.
Options that may be passed to constructor:
value (int, or numeric string. required.):
The value to encode.
xdim (float, default .0075):
X-Dimension, or width of the smallest element
ratio (float, default 2.2):
The ratio of wide elements to narrow elements.
gap (float or None, default None):
width of intercharacter gap. None means "use xdim".
height (float, see default below):
Height of the symbol. Default is the height of the two
bearer bars (if they exist) plus the greater of .25 inch
or .15 times the symbol's length.
checksum (bool, default 1):
Wether to compute and include the check digit
bearers (float, in units of xdim. default 0):
Height of bearer bars (horizontal bars along the top and
bottom of the barcode). Default is 0 (no bearers).
lquiet (float, see default below):
Quiet zone size to left of code, if quiet is true.
Default is the greater of .25 inch, or 10 xdims.
rquiet (float, defaults as above):
Quiet zone size to right left of code, if quiet is true.
Sources of Information on MSI Bar Code:
http://www.semiconductor.agilent.com/barcode/sg/Misc/msi_code.html
http://www.adams1.com/pub/russadam/plessy.html
"""
patterns = {
'start' : 'Bs', 'stop' : 'bSb',
'0' : 'bSbSbSbS', '1' : 'bSbSbSBs',
'2' : 'bSbSBsbS', '3' : 'bSbSBsBs',
'4' : 'bSBsbSbS', '5' : 'bSBsbSBs',
'6' : 'bSBsBsbS', '7' : 'bSBsBsBs',
'8' : 'BsbSbSbS', '9' : 'BsbSbSBs'
}
def __init__(self, value="", **args):
self.height = None
self.xdim = inch * 0.0075
self.ratio = 2.2
self.checksum = 1
self.bearers = 0.0
self.quiet = 1
self.lquiet = self.rquiet = None
if type(value) == type(1):
value = str(value)
for (k, v) in args.items():
setattr(self, k, v)
if self.quiet:
if self.lquiet is None:
self.lquiet = max(inch * 0.25, self.xdim * 10.0)
self.rquiet = max(inch * 0.25, self.xdim * 10.0)
else:
self.lquiet = self.rquiet = 0.0
Barcode.__init__(self, value)
def validate(self):
vval = ""
self.valid = 1
for c in string.strip(self.value):
if c not in string.digits:
self.valid = 0
continue
vval = vval + c
self.validated = vval
return vval
def encode(self):
s = self.validated
if self.checksum:
c = ''
for i in range(1, len(s), 2):
c = c + s[i]
d = str(int(c) * 2)
t = 0
for c in d:
t = t + int(c)
for i in range(0, len(s), 2):
t = t + int(s[i])
c = 10 - (t % 10)
s = s + str(c)
self.encoded = s
def decompose(self):
dval = self.patterns['start']
for c in self.encoded:
dval = dval + self.patterns[c]
self.decomposed = dval + self.patterns['stop']
return self.decomposed
class Codabar(Barcode):
"""
Codabar is a numeric plus some puntuation ("-$:/.+") barcode
with four start/stop characters (A, B, C, and D).
Options that may be passed to constructor:
value (string. required.):
The value to encode.
xdim (float, default .0065):
X-Dimension, or width of the smallest element
minimum is 6.5 mils (.0065 inch)
ratio (float, default 2.0):
The ratio of wide elements to narrow elements.
gap (float or None, default None):
width of intercharacter gap. None means "use xdim".
height (float, see default below):
Height of the symbol. Default is the height of the two
bearer bars (if they exist) plus the greater of .25 inch
or .15 times the symbol's length.
checksum (bool, default 0):
Wether to compute and include the check digit
bearers (float, in units of xdim. default 0):
Height of bearer bars (horizontal bars along the top and
bottom of the barcode). Default is 0 (no bearers).
quiet (bool, default 1):
Wether to include quiet zones in the symbol.
lquiet (float, see default below):
Quiet zone size to left of code, if quiet is true.
Default is the greater of .25 inch, or 10 xdim
rquiet (float, defaults as above):
Quiet zone size to right left of code, if quiet is true.
Sources of Information on Codabar
http://www.semiconductor.agilent.com/barcode/sg/Misc/codabar.html
http://www.barcodeman.com/codabar.html
Official Spec, "ANSI/AIM BC3-1995, USS" is available for US$45 from
http://www.aimglobal.org/aimstore/
"""
patterns = {
'0': 'bsbsbSB', '1': 'bsbsBSb', '2': 'bsbSbsB',
'3': 'BSbsbsb', '4': 'bsBsbSb', '5': 'BsbsbSb',
'6': 'bSbsbsB', '7': 'bSbsBsb', '8': 'bSBsbsb',
'9': 'BsbSbsb', '-': 'bsbSBsb', '$': 'bsBSbsb',
':': 'BsbsBsB', '/': 'BsBsbsB', '.': 'BsBsBsb',
'+': 'bsBsBsB', 'A': 'bsBSbSb', 'B': 'bSbSbsB',
'C': 'bsbSbSB', 'D': 'bsbSBSb'
}
values = {
'0' : 0, '1' : 1, '2' : 2, '3' : 3, '4' : 4,
'5' : 5, '6' : 6, '7' : 7, '8' : 8, '9' : 9,
'-' : 10, '$' : 11, ':' : 12, '/' : 13, '.' : 14,
'+' : 15, 'A' : 16, 'B' : 17, 'C' : 18, 'D' : 19
}
chars = string.digits + "-$:/.+"
def __init__(self, value='', **args):
self.height = None
self.xdim = inch * 0.0065
self.ratio = 2.0 # XXX ?
self.checksum = 0
self.bearers = 0.0
self.quiet = 1
self.lquiet = self.rquiet = None
if type(value) == type(1):
value = str(value)
for (k, v) in args.items():
setattr(self, k, v)
if self.quiet:
if self.lquiet is None:
self.lquiet = min(inch * 0.25, self.xdim * 10.0)
self.rquiet = min(inch * 0.25, self.xdim * 10.0)
else:
self.lquiet = self.rquiet = 0.0
Barcode.__init__(self, value)
def validate(self):
vval = ""
self.valid = 1
s = string.strip(self.value)
for i in range(0, len(s)):
c = s[i]
if c not in self.chars:
if ((i != 0) and (i != len(s) - 1)) or (c not in 'ABCD'):
self.Valid = 0
continue
vval = vval + c
if vval[0] not in 'ABCD':
vval = 'A' + vval
if vval[-1] not in 'ABCD':
vval = vval + vval[0]
self.validated = vval
return vval
def encode(self):
s = self.validated
if self.checksum:
v = 0
for c in s:
v = v + self.values[v]
v = 16 - (v % 16)
s = s + self.chars[v]
self.encoded = s
def decompose(self):
dval = ""
for c in self.encoded:
dval = dval + self.patterns[c] + 'i'
self.decomposed = dval[:-1]
return self.decomposed
class Code11(Barcode):
"""
Code 11 is an almost-numeric barcode. It encodes the digits 0-9 plus
dash ("-"). 11 characters total, hence the name.
value (int or string. required.):
The value to encode.
xdim (float, default .0075):
X-Dimension, or width of the smallest element
ratio (float, default 2.2):
The ratio of wide elements to narrow elements.
gap (float or None, default None):
width of intercharacter gap. None means "use xdim".
height (float, see default below):
Height of the symbol. Default is the height of the two
bearer bars (if they exist) plus the greater of .25 inch
or .15 times the symbol's length.
checksum (0 none, 1 1-digit, 2 2-digit, -1 auto, default -1):
How many checksum digits to include. -1 ("auto") means
1 if the number of digits is 10 or less, else 2.
bearers (float, in units of xdim. default 0):
Height of bearer bars (horizontal bars along the top and
bottom of the barcode). Default is 0 (no bearers).
quiet (bool, default 1):
Wether to include quiet zones in the symbol.
lquiet (float, see default below):
Quiet zone size to left of code, if quiet is true.
Default is the greater of .25 inch, or 10 xdim
rquiet (float, defaults as above):
Quiet zone size to right left of code, if quiet is true.
Sources of Information on Code 11:
http://www.cwi.nl/people/dik/english/codes/barcodes.html
"""
chars = string.digits + '-'
patterns = {
'0' : 'bsbsB', '1' : 'BsbsB', '2' : 'bSbsB',
'3' : 'BSbsb', '4' : 'bsBsB', '5' : 'BsBsb',
'6' : 'bSBsb', '7' : 'bsbSB', '8' : 'BsbSb',
'9' : 'Bsbsb', '-' : 'bsBsb', 'S' : 'bsBSb' # Start/Stop
}
values = {
'0' : 0, '1' : 1, '2' : 2, '3' : 3, '4' : 4,
'5' : 5, '6' : 6, '7' : 7, '8' : 8, '9' : 9,
'-' : 10,
}
def __init__(self, value='', **args):
self.height = None
self.xdim = inch * 0.0075
self.ratio = 2.2 # XXX ?
self.checksum = -1 # Auto
self.bearers = 0.0
self.quiet = 1
self.lquiet = self.rquiet = None
if type(value) == type(1):
value = str(value)
for (k, v) in args.items():
setattr(self, k, v)
if self.quiet:
if self.lquiet is None:
self.lquiet = min(inch * 0.25, self.xdim * 10.0)
self.rquiet = min(inch * 0.25, self.xdim * 10.0)
else:
self.lquiet = self.rquiet = 0.0
Barcode.__init__(self, value)
def validate(self):
vval = ""
self.valid = 1
s = string.strip(self.value)
for i in range(0, len(s)):
c = s[i]
if c not in self.chars:
self.Valid = 0
continue
vval = vval + c
self.validated = vval
return vval
def encode(self):
s = self.validated
if self.checksum == -1:
if len(s) <= 10:
self.checksum = 1
else:
self.checksum = 2
if self.checksum > 0:
# compute first checksum
i = 0; v = 1; c = 0
while i < len(s):
c = c + v * string.index(self.chars, s[-(i+1)])
i = i + 1; v = v + 1
if v > 10:
v = 1
s = s + self.chars[c % 11]
if self.checksum > 1:
# compute second checksum
i = 0; v = 1; c = 0
while i < len(s):
c = c + v * string.index(self.chars, s[-(i+1)])
i = i + 1; v = v + 1
if v > 9:
v = 1
s = s + self.chars[c % 10]
self.encoded = 'S' + s + 'S'
def decompose(self):
dval = ""
for c in self.encoded:
dval = dval + self.patterns[c] + 'i'
self.decomposed = dval[:-1]
return self.decomposed
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -1,83 +0,0 @@
# -*- coding: utf-8 -*-
#
# Copyright (c) 2000 Tyler C. Sarna <tsarna@sarna.org>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# 3. All advertising materials mentioning features or use of this software
# must display the following acknowledgement:
# This product includes software developed by Tyler C. Sarna.
# 4. Neither the name of the author nor the names of contributors
# may be used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS
# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#
from reportlab.lib.units import inch
from common import Barcode
import string
# . 3 T Tracker
# , 2 D Descender
# ' 1 A Ascender
# | 0 H Ascender/Descender
_rm_patterns = {
"0" : "--||", "1" : "-',|", "2" : "-'|,", "3" : "'-,|",
"4" : "'-|,", "5" : "'',,", "6" : "-,'|", "7" : "-|-|",
"8" : "-|',", "9" : "',-|", "A" : "',',", "B" : "'|-,",
"C" : "-,|'", "D" : "-|,'", "E" : "-||-", "F" : "',,'",
"G" : "',|-", "H" : "'|,-", "I" : ",-'|", "J" : ",'-|",
"K" : ",'',", "L" : "|--|", "M" : "|-',", "N" : "|'-,",
"O" : ",-|'", "P" : ",','", "Q" : ",'|-", "R" : "|-,'",
"S" : "|-|-", "T" : "|',-", "U" : ",,''", "V" : ",|-'",
"W" : ",|'-", "X" : "|,-'", "Y" : "|,'-", "Z" : "||--",
# start, stop
"(" : "'-,'", ")" : "'|,|"
}
_ozN_patterns = {
"0" : "||", "1" : "|'", "2" : "|,", "3" : "'|", "4" : "''",
"5" : "',", "6" : ",|", "7" : ",'", "8" : ",,", "9" : ".|"
}
_ozC_patterns = {
"A" : "|||", "B" : "||'", "C" : "||,", "D" : "|'|",
"E" : "|''", "F" : "|',", "G" : "|,|", "H" : "|,'",
"I" : "|,,", "J" : "'||", "K" : "'|'", "L" : "'|,",
"M" : "''|", "N" : "'''", "O" : "'',", "P" : "',|",
"Q" : "','", "R" : "',,", "S" : ",||", "T" : ",|'",
"U" : ",|,", "V" : ",'|", "W" : ",''", "X" : ",',",
"Y" : ",,|", "Z" : ",,'", "a" : "|,.", "b" : "|.|",
"c" : "|.'", "d" : "|.,", "e" : "|..", "f" : "'|.",
"g" : "''.", "h" : "',.", "i" : "'.|", "j" : "'.'",
"k" : "'.,", "l" : "'..", "m" : ",|.", "n" : ",'.",
"o" : ",,.", "p" : ",.|", "q" : ",.'", "r" : ",.,",
"s" : ",..", "t" : ".|.", "u" : ".'.", "v" : ".,.",
"w" : "..|", "x" : "..'", "y" : "..,", "z" : "...",
"0" : ",,,", "1" : ".||", "2" : ".|'", "3" : ".|,",
"4" : ".'|", "5" : ".''", "6" : ".',", "7" : ".,|",
"8" : ".,'", "9" : ".,,", " " : "||.", "#" : "|'.",
}
#http://www.auspost.com.au/futurepost/
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

Binary file not shown.

View File

@ -1,55 +0,0 @@
# -*- coding: utf-8 -*-
#!/usr/bin/python
from common import *
from code39 import *
from code93 import *
from code128 import *
from usps import *
from reportlab.pdfgen.canvas import Canvas
from reportlab.lib.styles import getSampleStyleSheet
from reportlab.platypus import Paragraph, Frame
from reportlab.platypus.flowables import XBox
def run():
styles = getSampleStyleSheet()
styleN = styles['Normal']
styleH = styles['Heading1']
story = []
story.append(Paragraph('I2of5', styleN))
story.append(I2of5(1234, xdim = inch*0.02, checksum=0))
story.append(Paragraph('MSI', styleN))
story.append(MSI(1234, xdim = inch*0.02))
story.append(Paragraph('Codabar', styleN))
story.append(Codabar("A012345B", xdim = inch*0.02))
story.append(Paragraph('Code 11', styleN))
story.append(Code11("01234545634563"))
story.append(Paragraph('Code 39', styleN))
story.append(Standard39("A012345B%R"))
story.append(Paragraph('Extended Code 39', styleN))
story.append(Extended39("A012345B}"))
story.append(Paragraph('Code93', styleN))
story.append(Standard93("CODE 93"))
story.append(Paragraph('Extended Code93', styleN))
story.append(Extended93("L@@K! Code 93 :-)")) #, xdim=0.005 * inch))
story.append(Paragraph('Code 128', styleN))
c=Code128("AB-12345678") #, xdim=0.005 * inch)
story.append(c)
story.append(Paragraph('USPS FIM', styleN))
story.append(FIM("A"))
story.append(Paragraph('USPS POSTNET', styleN))
story.append(POSTNET('78247-1043'))
story.append(Paragraph('Label Size', styleN))
story.append(XBox((2.0 + 5.0/8.0)*inch, 1 * inch, '1x2-5/8"'))
story.append(Paragraph('Label Size', styleN))
story.append(XBox((1.75)*inch, .5 * inch, '1/2x1-3/4"'))
c = Canvas('out.pdf')
f = Frame(inch, inch, 6*inch, 9*inch, showBoundary=1)
f.addFromList(story, c)
c.save()
if __name__=='__main__':
run()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -1,233 +0,0 @@
# -*- coding: utf-8 -*-
#
# Copyright (c) 1996-2000 Tyler C. Sarna <tsarna@sarna.org>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# 3. All advertising materials mentioning features or use of this software
# must display the following acknowledgement:
# This product includes software developed by Tyler C. Sarna.
# 4. Neither the name of the author nor the names of contributors
# may be used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS
# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#
from reportlab.lib.units import inch
from common import Barcode
import string
_fim_patterns = {
'A' : "|| | ||",
'B' : "| || || |",
'C' : "|| | | ||",
'D' : "||| | |||",
# XXX There is an E.
# The below has been seen, but dunno if it is E or not:
# 'E' : '|||| ||||'
}
_postnet_patterns = {
'1' : "...||", '2' : "..|.|", '3' : "..||.", '4' : ".|..|",
'5' : ".|.|.", '6' : ".||..", '7' : "|...|", '8' : "|..|.",
'9' : "|.|..", '0' : "||...", 'S' : "|",
}
class FIM(Barcode):
""""
FIM (Facing ID Marks) encode only one letter.
There are currently four defined:
A Courtesy reply mail with pre-printed POSTNET
B Business reply mail without pre-printed POSTNET
C Business reply mail with pre-printed POSTNET
D OCR Readable mail without pre-printed POSTNET
Interleaved 2 of 5 is a numeric-only barcode. It encodes an even
number of digits; if an odd number is given, a 0 is prepended.
Options that may be passed to constructor:
value (single character string from the set A - D. required.):
The value to encode.
quiet (bool, default 1):
Wether to include quiet zones in the symbol.
The following may also be passed, but doing so will generate nonstandard
symbols which should not be used. This is mainly documented here to
show the defaults:
height (float, default 5/8 inch):
Height of the code. This might legitimately be overriden to make
a taller symbol that will 'bleed' off the edge of the paper,
leaving 5/8 inch remaining.
lquiet (float, default 1/4 inch):
Quiet zone size to left of code, if quiet is true.
Default is the greater of .25 inch, or .15 times the symbol's
length.
rquiet (float, default 15/32 inch):
Quiet zone size to right left of code, if quiet is true.
Sources of information on FIM:
USPS Publication 25, A Guide to Business Mail Preparation
http://new.usps.com/cpim/ftp/pubs/pub25.pdf
"""
def __init__(self, value='', **args):
self.barwidth = inch * (1.0/32.0)
self.barspace = inch * (1.0/16.0)
self.height = inch * (5.0/8.0)
self.rquiet = inch * (0.25)
self.lquiet = inch * (15.0/32.0)
self.quiet = 0
for (k, v) in args.items():
setattr(self, k, v)
Barcode.__init__(self, value)
def validate(self):
self.valid = 1
self.validated = ''
for c in self.value:
if c in string.whitespace:
continue
elif c in "abcdABCD":
self.validated = self.validated + string.upper(c)
else:
self.valid = 0
if len(self.validated) != 1:
raise ValueError, "Input must be exactly one character"
return self.validated
def decompose(self):
self.decomposed = ''
for c in self.encoded:
self.decomposed = self.decomposed + _fim_patterns[c]
return self.decomposed
def computeSize(self):
self.width = (len(self.decomposed) - 1) * self.barspace + self.barwidth
if self.quiet:
self.xo = self.lquiet
self.width = self.lquiet + self.width + self.rquiet
else:
self.xo = 0.0
def draw(self):
left = self.xo
for c in self.decomposed:
if c == '|':
self.rect(left, 0.0, self.barwidth, self.height)
left = left + self.barspace
class POSTNET(Barcode):
""""
POSTNET is used in the US to encode "zip codes" (postal codes) on
mail. It can encode 5, 9, or 11 digit codes. I've read that it's
pointless to do 5 digits, since USPS will just have to re-print
them with 9 or 11 digits.
Sources of information on POSTNET:
USPS Publication 25, A Guide to Business Mail Preparation
http://new.usps.com/cpim/ftp/pubs/pub25.pdf
"""
def __init__(self, value='', **args):
self.sbarheight = inch * 0.050
self.fbarheight = inch * 0.125
self.barwide = inch * 0.018
self.spacewide = inch * 0.0275
for (k, v) in args.items():
setattr(self, k, v)
Barcode.__init__(self, value)
def validate(self):
self.validated = ''
self.valid = 1
count = 0
for c in self.value:
if c in (string.whitespace + '-'):
pass
elif c in string.digits:
count = count + 1
if count == 6:
self.validated = self.validated + '-'
self.validated = self.validated + c
else:
self.valid = 0
if len(self.validated) not in [5, 10, 12]:
self.valid = 0
return self.validated
def encode(self):
self.encoded = "S"
check = 0
for c in self.validated:
if c in string.digits:
self.encoded = self.encoded + c
check = check + string.atoi(c)
elif c == '-':
pass
else:
raise ValueError, "Invalid character in input"
check = (10 - (check % 10)) % 10
self.encoded = self.encoded + `check` + 'S'
return self.encoded
def decompose(self):
self.decomposed = ''
for c in self.encoded:
self.decomposed = self.decomposed + _postnet_patterns[c]
return self.decomposed
def computeSize(self):
self.width = len(self.decomposed) * self.barwide
self.width = self.width + (len(self.decomposed) - 1) * self.spacewide
self.height = self.fbarheight
self.xo = 0.0
def draw(self):
sdown = self.fbarheight - self.sbarheight
left = self.xo
for c in self.decomposed:
if c == '.':
h = self.sbarheight
else:
h = self.fbarheight
self.rect(left, 0.0, self.barwide, h)
left = left + self.barwide + self.spacewide
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -1,7 +0,0 @@
<?xml version="1.0"?>
<openerp>
<data noupdate="1">
</data>
</openerp>

View File

@ -1,62 +0,0 @@
<?xml version="1.0"?>
<openerp>
<data>
<record model="ir.ui.view" id="board_auction_manager_form1">
<field name="name">board.auction.manager.form</field>
<field name="model">board.board</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Auction manager ">
<board style="2-1">
<column>
<action string="Latest objects"
name="%(auction.action_report_latest_objects_manager_tree)d"/>
<action string="Latest deposits"
name="%(auction.action_report_latest_doposit_manager_tree)d"/>
<action string="Summary pointing by user"
name="%(auction.action_report_auction_sign_in_out_manager_tree1)d"
view_mode="tree,graph"/>
<action string="Objects statistics"
name="%(auction.action_report_object_encoded_manager_tree)d"/>
</column>
<column>
<button
string="My board"
name="%(open_board_auction)d"
icon="terp-partner"
type="action"
colspan="4"
/>
<action string="Total Adjudications"
name="%(auction.action_report_auction_adjudication_tree)d"
view_mode="graph,tree"/>
<action string="Min/Adj/Max"
name="%(auction.action_report_auction_estimation_adj_category_manager_tree)d"
view_mode="graph,tree"/>
<action string="Objects by day"
name="%(auction.action_report_auction_object_date_tree)d"
view_mode="graph,tree"/>
</column>
</board>
</form>
</field>
</record>
<record model="ir.actions.act_window" id="open_board_auction_manager">
<field name="name">Auction manager board</field>
<field name="res_model">board.board</field>
<field name="view_type">form</field>
<field name="view_mode">form</field>
<field name="usage">menu</field>
<field name="view_id" ref="board_auction_manager_form1"/>
</record>
<menuitem
name="Auction Manager"
action="open_board_auction_manager"
sequence="1"
id="menu_board_auction_manager" icon="terp-graph" parent="menu_board_auction"/>
</data>
</openerp>

View File

@ -1,107 +0,0 @@
<?xml version="1.0"?>
<openerp>
<data>
<record model="ir.actions.act_window" id="action_report_latest_objects_tree">
<field name="name">Latest objects</field>
<field name="res_model">auction.lots</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
</record>
<record model="ir.actions.act_window" id="action_report_latest_doposit_tree">
<field name="name">Latest Deposits</field>
<field name="res_model">auction.deposit</field>
<field name="view_type">form</field>
<field name="view_mode">tree,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">auction.lots</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Min est/Adj/Max est">
<field name="create_uid" select="1"/>
<field name="lot_type" select="1"/>
<field name="lot_est1" select="1"/>
<field name="lot_est2" select="1"/>
<field name="obj_price" select="1"/>
</tree>
</field>
</record>
<record model="ir.ui.view" id="view_report_auction_lots_estimation_adj_category_graph">
<field name="name">report.auction.lots.estimation.adj.category.graph</field>
<field name="model">auction.lots</field>
<field name="type">graph</field>
<field name="arch" type="xml">
<graph string="Min est/Adj/Max est" orientation="vertical" type="bar">
<field name="lot_type"/>
<field name="lot_est1" operator="+"/>
<field name="obj_price" operator="+"/>
<field name="lot_est2" operator="+"/>
<field name="create_uid" group="True"/>
</graph>
</field>
</record>
<record model="ir.actions.act_window" id="action_report_auction_lots_estimation_adj_category_tree">
<field name="name">Min est/Adj/Max est</field>
<field name="res_model">auction.lots</field>
<field name="view_type">form</field>
<field name="view_mode">graph,tree</field>
</record>
<record model="ir.ui.view" id="board_auction_form1">
<field name="name">board.auction.form</field>
<field name="model">board.board</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Auction manager ">
<board style="2-1">
<column>
<action string="Latest objects"
name="%(auction.action_report_latest_objects_tree)d"/>
<action string="Latest deposits"
name="%(auction.action_report_latest_doposit_tree)d"/>
<action string="Objects statistics"
name="%(auction.action_report_object_encoded_tree)d"/>
</column>
<column>
<action string="Total Adjudications"
name="%(auction.action_report_auction_adjudication_tree)d"
view_mode="graph,tree"/>
<action string="Min/Adj/Max"
name="%(auction.action_report_auction_lots_estimation_adj_category_tree)d"
view_mode="graph,tree"/>
<action string="Objects by day"
name="%(auction.action_report_auction_object_date_tree)d"
view_mode="graph,tree"/>
</column>
</board>
</form>
</field>
</record>
<record model="ir.actions.act_window" id="open_board_auction">
<field name="name">Auction board</field>
<field name="res_model">board.board</field>
<field name="view_type">form</field>
<field name="view_mode">form</field>
<field name="usage">menu</field>
<field name="view_id" ref="board_auction_form1"/>
</record>
<menuitem name="Auction" id="menu_board_auction" parent="base.menu_reporting_dashboard" sequence="40"/>
<menuitem
name="Auction DashBoard"
action="open_board_auction"
sequence="1"
id="menu_board_auction_open" icon="terp-graph" parent="menu_board_auction"/>
<menuitem name="Auction" id="auction.auction_menu_root" icon="terp-purchase" sequence="26" action="open_board_auction"/>
</data>
</openerp>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,50 +0,0 @@
# -*- 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/>.
#
##############################################################################
import total
import auction_invoice
import seller_address
import artists_lots
import lots_list
import lots_list_inventory
import auction_result
import catelogwithpictures
import auction_objects
import buyer_form_report
import seller_form_report
import report_auction
import buyer_list
import auction_catelog
import auction_buyer_result
import auction_total_rml
import deposit_seller
import auction_artists
import bids_lots
import bids_phones_details
import auction_bids
import catalog2
import report_lot_bar_code
import huissier
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -1,43 +0,0 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<borderform-list>
<city type="data" name="city"/>
<date type="function" name="today"/>
<borderform type="fields" name="ach_login,auction_id,ach_uid">
<title type="field" name="auction_id.name"/>
<login type="field" name="ach_login"/>
<client_info type="zoom" name="ach_uid">
<name type="field" name="name"/>
<ref type="field" name="ref"/>
<title type="field" name="title"/>
<street type="field" name="address.street"/>
<street2 type="field" name="address.street2"/>
<zip type="field" name="address.zip"/>
<city type="field" name="address.city"/>
<phone type="field" name="address.phone"/>
<mobile type="field" name="address.mobile"/>
</client_info>
<objects>
<cost type="call" name="compute_buyer_costs" args="">
<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"/>
<cost type="call" name="compute_buyer_costs" args="">
<amount value="amount"/>
</cost>
<barcode type="field" name="id"/>
<ref type="field" name="obj_num"/>
<title type="field" name="name"/>
<desc type="field" name="obj_desc"/>
<price type="field" name="obj_price"/>
<avance type="field" name="ach_avance"/>
<state type="field" name="state"/>
</object>
</objects>
</borderform>
</borderform-list>

View File

@ -1,177 +0,0 @@
<?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">
<!-- TOFIX: Path Problem -->
<xsl:import href="corporate_defaults.xsl"/>
<xsl:import href="rml_template.xsl"/>
<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="1cm"/>
<frame id="main" x1="1cm" y1="2.5cm" width="19.0cm" height="21.0cm"/>
</xsl:if>
</xsl:template>
<xsl:template match="/">
<xsl:call-template name="rml"/>
</xsl:template>
<xsl:template name="stylesheet">
<paraStyle name="login-title" fontName="Helvetica" fontSize="12"/>
<paraStyle name="login" fontName="Helvetica-Bold" fontSize="16"/>
<paraStyle name="style1" leftIndent="10cm" fontName="Helvetica-Bold" />
<paraStyle name="cost-name" fontName="Helvetica-BoldOblique" fontSize="10" alignment="RIGHT"/>
<blockTableStyle id="objects">
<blockFont name="Helvetica-BoldOblique" size="12" start="0,0" stop="-1,0"/>
<blockValign value="TOP"/>
<blockAlignment value="RIGHT" start="2,1" stop="-1,-1"/>
<lineStyle kind="LINEBELOW" start="0,0" stop="-1,0"/>
</blockTableStyle>
<blockTableStyle id="object-totals">
<blockValign value="TOP"/>
<blockAlignment value="RIGHT" start="2,0" stop="-1,-1"/>
<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 style="style1">
<xsl:value-of select="title"/>
<xsl:text> </xsl:text>
<xsl:value-of select="name"/>
</para>
<para style="style1"><xsl:value-of select="street"/></para>
<para style="style1"><xsl:value-of select="street2" /></para>
<para style="style1">
<xsl:value-of select="zip"/>
<xsl:text> </xsl:text>
<xsl:value-of select="city"/>
</para>
<para style="style1"><xsl:value-of select="country"/></para>
<spacer length="0.4cm" width="1mm"/>
<spacer length="0.8cm"/>
</xsl:template>
<xsl:template match="borderform">
<setNextTemplate name="other_pages"/>
<nextFrame/>
<xsl:apply-templates select="client_info"/>
<spacer length="0.8cm"/>
<!-- <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="0.2cm,1.4cm,9.0cm,1.5cm,2.3cm,2.0cm" style="objects">
<tr>
<td t="1"></td>
<td t="1">Cat</td>
<td t="1">Description</td>
<td t="1">Paid</td>
<td t="1">Adj.(EUR)</td>
<td t="1">Total</td>
</tr>
<xsl:apply-templates select="object"/>
</blockTable>
<condPageBreak height="1.2cm"/>
<blockTable colWidths="0.2cm,1.4cm,9.0cm,1.5cm,2.3cm,2.0cm" style="object-totals">
<tr>
<td/>
<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/>
<td t="1">Buyer Cost:</td>
<td><xsl:value-of select="format-number(sum(object/cost/amount), '#,##0.00')"/></td>
</tr>
<tr>
<td/>
<td/>
<td/>
<td/>
<td t="1">Total:</td>
<td><xsl:value-of select="format-number(sum(object[price != '']/price) + sum(object/cost/amount), '#,##0.00')"/></td>
</tr>
</blockTable>
</xsl:template>
<xsl:template match="object">
<tr>
<td></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>
<td>
<xsl:if test="price!=''">
<xsl:value-of select="format-number(price + sum(cost/amount), '#,##0.00')"/>
</xsl:if>
</td>
</tr>
</xsl:template>
</xsl:stylesheet>

View File

@ -1,35 +0,0 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<borderform-list>
<city type="data" name="city"/>
<date type="function" name="today"/>
<borderform type="fields" name="ach_login,auction_id,ach_uid">
<title type="field" name="auction_id.name"/>
<login type="field" name="ach_login"/>
<client_info type="zoom" name="ach_uid">
<name type="field" name="name"/>
<ref type="field" name="ref"/>
<title type="field" name="title"/>
<street type="field" name="address.street"/>
<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>
<name value="name"/>
<amount value="amount"/>
<object type="fields" name="obj_num,id">
<ref type="field" name="obj_num"/>
<title type="field" name="name"/>
<desc type="field" name="obj_desc"/>
<price type="field" name="obj_price"/>
<avance type="field" name="ach_avance"/>
<state type="field" name="state"/>
<image type="attachment" name="id"/>
</object>
</objects>
</borderform>
</borderform-list>

View File

@ -1,64 +0,0 @@
<?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="corporate_defaults.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" />
<blockTableStyle id="main_title">
<blockAlignment value="CENTER" />
<lineStyle kind="GRID" colorName="black"/>
<blockBackground colorName="#e6e6e6" />
<blockValign value="TOP"/>
</blockTableStyle>
<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>
</xsl:stylesheet>

View File

@ -1,9 +0,0 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE artists>
<artists>
<artist type="fields" name="name,id">
<name type="field" name="name"></name>
<birth_death_dates type="field" name="birth_death_dates"></birth_death_dates>
<biography type="field" name="biography"></biography>
</artist>
</artists>

View File

@ -1,74 +0,0 @@
<?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 match="/">
<xsl:apply-templates select="artists"/>
</xsl:template>
<xsl:template match="artists">
<document>
<template leftMargin="2.0cm" rightMargin="2.0cm" topMargin="2.0cm" bottomMargin="2.0cm" title="Bids report" author="Generated by Open ERP, Fabien Pinckaers">
<pageTemplate id="all">
<pageGraphics/>
<frame id="principal" x1="1.0cm" y1="2.0cm" width="19.0cm" height="26.0cm" alignment="center"/>
</pageTemplate>
</template>
<stylesheet>
<paraStyle name="spacebefore" alignment="center" fontName="Courier" fontSize="12" spaceBefore="0" spaceAfter="0"/>
<paraStyle name="spaceafter" fontName="Courier" fontSize="12" spaceBefore="0" spaceAfter="0"/>
<blockTableStyle id="artist">
<blockLeftPadding start="0,0" stop="-1,-1" length="5mm"/>
<blockRightPadding start="0,0" stop="-1,-1" length="5mm"/>
<blockTopPadding start="0,0" stop="-1,0" length="5mm"/>
<blockBottomPadding start="0,0" stop="-1,0" length="2mm"/>
<blockBottomPadding start="0,-1" stop="-1,-1" length="5mm"/>
<blockValign value="TOP"/>
<blockAlignment value="LEFT"/>
<lineStyle kind="LINEABOVE" colorName="black" start="0,0" stop="-1,0"/>
<lineStyle kind="LINEBELOW" colorName="black" start="0,-1" stop="-1,-1"/>
<lineStyle kind="LINEBEFORE" colorName="black" start="0,0" stop="-1,-1"/>
<lineStyle kind="LINEBEFORE" colorName="black" start="0,0" stop="0,-1"/>
<lineStyle kind="LINEAFTER" colorName="black" start="-1,0" stop="-1,-1"/>
</blockTableStyle>
</stylesheet>
<story>
<xsl:apply-templates select="artist"/>
</story>
</document>
</xsl:template>
<xsl:template match="artist">
<blockTable repeatRows="1" style="artist" colWidths="18.0cm">
<tr>
<td>
<para style="spacebefore"><b><xsl:value-of select="name"/><xsl:text> (</xsl:text><xsl:value-of select="birth_death_dates"/><xsl:text>)</xsl:text></b></para>
</td>
</tr>
<tr>
<td>
<para style="spaceafter"><xsl:value-of select="biography"/></para>
</td>
</tr>
</blockTable>
<blockTable rowHeights="2cm" colWidths="18.0cm">
<tr>
<td>
</td>
</tr>
</blockTable>
</xsl:template>
</xsl:stylesheet>

View File

@ -1,51 +0,0 @@
# -*- 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 report.interface import report_int
import netsvc
import openerp.pooler
class report_artistlot(report_int):
def __init__(self, name):
report_int.__init__(self, name)
def create(self, cr, uid, ids, datas, context):
pool = pooler.get_pool(cr.dbname)
lots = pool.get('auction.lots').read(cr, uid, ids, ['artist_id'])
artists = []
for lot in lots:
if lot['artist_id'] and lot['artist_id'] not in artists:
artists.append(lot['artist_id'][0])
if not len(artists):
raise 'UserError', 'Objects '
datas['ids'] = artists
self._obj_report = netsvc.LocalService('report.report.auction.artists')
return self._obj_report.create(cr, uid, artists, datas, context)
def result(self):
return self._obj_report.result()
report_artistlot('report.auction.artists_lots')
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -1,37 +0,0 @@
# -*- 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/>.
#
##############################################################################
import time
from report import report_sxw
class auction_artists(report_sxw.rml_parse):
def __init__(self, cr, uid, name, context):
super(auction_artists, self).__init__(cr, uid, name, context=context)
self.localcontext.update({
'time': time,
})
report_sxw.report_sxw('report.auction.artists', 'auction.lots', 'addons/auction/report/auction_artists.rml',parser=auction_artists)
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -1,75 +0,0 @@
<?xml version="1.0"?>
<document filename="test.pdf">
<template title="Artists" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20">
<pageTemplate id="first">
<frame id="first" x1="57.0" y1="57.0" width="481" height="728"/>
</pageTemplate>
</template>
<stylesheet>
<blockTableStyle id="Standard_Outline">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
</blockTableStyle>
<blockTableStyle id="Tableau1">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
<lineStyle kind="GRID" colorName="black"/>
</blockTableStyle>
<initialize>
<paraStyle name="all" alignment="justify"/>
</initialize>
<paraStyle name="P1" fontName="Times-Roman" fontSize="7.0" leading="9" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P2" fontName="Times-Roman" fontSize="11.0" leading="14" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P3" fontName="Times-Roman" fontSize="7.0" leading="9" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P4" rightIndent="0.0" leftIndent="0.0" fontName="Courier-Bold" fontSize="7.0" leading="9" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P5" fontName="Courier" fontSize="11.0" leading="14" alignment="JUSTIFY" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P6" fontName="Courier" fontSize="11.0" leading="14" alignment="JUSTIFY" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P7" fontName="Courier" spaceBefore="0.0" spaceAfter="3.0"/>
<paraStyle name="P8" fontName="Times-Roman" fontSize="11.0" leading="14" alignment="JUSTIFY" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P9" fontName="Times-Roman" fontSize="11.0" leading="14" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="Standard" fontName="Times-Roman"/>
<paraStyle name="Text body" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="Heading" fontName="Helvetica" fontSize="14.0" leading="17" spaceBefore="12.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="12.0" leading="15" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="Addressee" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="3.0"/>
<paraStyle name="Index" fontName="Times-Roman"/>
</stylesheet>
<story>
<para style="P1">
<font color="white"> </font>
</para>
<para style="P2">
<font face="Times-Roman" size="7.0">[[ repeatIn(objects,'o') ]]</font>
</para>
<para style="P3">
<font color="white"> .........</font>
</para>
<para style="P4"><font face="Times-Roman" size="12.0">Article</font>: <font face="Times-Roman" size="11.0">[[o.product_id and o.product_id.name or False]]</font></para>
<para style="P3">
<font color="white"> </font>
</para>
<blockTable colWidths="474.0" style="Tableau1">
<tr>
<td>
<para style="P5"/>
<para style="P6">[[o.artist_id and 'Artist1: '+o.artist_id.name or False]]</para>
<para style="P7">[[o.artist_id and 'Biography: '+o.artist_id.biography or False]]</para>
<para style="P5">
<font color="white"> </font>
</para>
<para style="P6">[[o.artist2_id and 'Artist2: '+o.artist2_id.name or False]]</para>
<para style="P8">
<font face="Courier">[[o.artist2_id and 'Biography: '+o.artist2_id.biography or False]]</font>
</para>
</td>
</tr>
</blockTable>
<para style="P9">
<font color="white"> </font>
</para>
</story>
</document>

View File

@ -1,36 +0,0 @@
# -*- 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/>.
#
##############################################################################
import time
from report import report_sxw
class auction_bids(report_sxw.rml_parse):
def __init__(self, cr, uid, name, context):
super(auction_bids, self).__init__(cr, uid, name, context=context)
self.localcontext.update({
'time': time,
})
report_sxw.report_sxw('report.auction.bids', 'auction.bid', 'addons/auction/report/auction_bids.rml',parser=auction_bids)
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -1,91 +0,0 @@
<?xml version="1.0"?>
<document filename="test.pdf">
<template title="Bids" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20">
<pageTemplate id="first">
<frame id="first" x1="57.0" y1="57.0" width="481" height="728"/>
</pageTemplate>
</template>
<stylesheet>
<blockTableStyle id="Standard_Outline">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
</blockTableStyle>
<blockTableStyle id="Table2">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
<lineStyle kind="GRID" colorName="black"/>
<blockBackground colorName="#cccccc" start="0,0" stop="0,0"/>
<blockBackground colorName="#cccccc" start="1,0" stop="1,0"/>
<blockBackground colorName="#cccccc" start="2,0" stop="2,0"/>
<blockBackground colorName="#cccccc" start="3,0" stop="3,0"/>
</blockTableStyle>
<blockTableStyle id="Tableau1">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
<lineStyle kind="GRID" colorName="black"/>
</blockTableStyle>
<initialize>
<paraStyle name="all" alignment="justify"/>
</initialize>
<paraStyle name="P1" fontName="Times-Roman" fontSize="7.0" leading="9" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P2" fontName="Times-Roman" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P3" fontName="Times-Roman" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P4" fontName="Courier" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P5" fontName="Courier" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P6" fontName="Courier" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="Standard" fontName="Times-Roman"/>
<paraStyle name="Text body" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="Heading" fontName="Helvetica" fontSize="14.0" leading="17" spaceBefore="12.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="Caption" fontName="Times-Roman" fontSize="12.0" leading="15" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="Index" fontName="Times-Roman"/>
</stylesheet>
<story>
<para style="Standard">
<font color="white"> </font>
</para>
<para style="P1">
<font color="white"> </font>
</para>
<para style="P1">
<font color="white"> </font>
</para>
<blockTable colWidths="43.0,167.0,90.0,138.0" style="Table2">
<tr>
<td>
<para style="P2">Bid </para>
</td>
<td>
<para style="P3">Buyer</para>
</td>
<td>
<para style="P2">Tel</para>
</td>
<td>
<para style="P2">Auction</para>
</td>
</tr>
</blockTable>
<blockTable colWidths="43.0,167.0,90.0,138.0" style="Tableau1">
<tr>
<td>
<para style="P4"><font face="Times-Roman" size="7.0">[[ repeatIn(objects,'o') ]]</font>[[o.name]]</para>
</td>
<td>
<para style="P4">[[ o.partner_id and o.partner_id.name or False]]</para>
</td>
<td>
<para style="P5">[[o.contact_tel]]</para>
</td>
<td>
<para style="P6">[[o.auction_id and o.auction_id.name or False]]</para>
</td>
</tr>
</blockTable>
<para style="P5">
<font color="white"> </font>
</para>
</story>
</document>

View File

@ -1,37 +0,0 @@
# -*- 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/>.
#
##############################################################################
import time
from report import report_sxw
class auction_buyer_result(report_sxw.rml_parse):
def __init__(self, cr, uid, name, context):
super(auction_buyer_result, self).__init__(cr, uid, name, context=context)
self.localcontext.update({
'time': time,
})
report_sxw.report_sxw('report.auction.buyer.result', 'auction.lots', 'addons/auction/report/auction_buyer_result.rml',parser=auction_buyer_result)
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -1,85 +0,0 @@
<?xml version="1.0"?>
<document filename="test.pdf">
<template title="Buyer" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20">
<pageTemplate id="first">
<frame id="first" x1="35.0" y1="35.0" width="525" height="772"/>
</pageTemplate>
</template>
<stylesheet>
<blockTableStyle id="Standard_Outline">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
</blockTableStyle>
<blockTableStyle id="Table6">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
<lineStyle kind="GRID" colorName="black"/>
<blockBackground colorName="#e6e6e6" start="0,0" stop="0,0"/>
<blockBackground colorName="#e6e6e6" start="1,0" stop="1,0"/>
<blockBackground colorName="#e6e6e6" start="2,0" stop="2,0"/>
</blockTableStyle>
<blockTableStyle id="Table2">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
<lineStyle kind="GRID" colorName="black"/>
</blockTableStyle>
<initialize>
<paraStyle name="all" alignment="justify"/>
</initialize>
<paraStyle name="P1" rightIndent="17.0" leftIndent="0.0" fontName="Courier" fontSize="10.0" leading="13" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P2" rightIndent="13.0" leftIndent="11.0" fontName="Courier-BoldOblique" fontSize="10.0" leading="13" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P3" rightIndent="17.0" leftIndent="0.0" fontName="Courier" fontSize="10.0" leading="13" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P4" fontName="Times-Bold" fontSize="12.0" leading="15" spaceBefore="0.0" spaceAfter="6.0"/>
<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"/>
</stylesheet>
<story>
<para style="P1">
<font color="white"> </font>
</para>
<para style="P2">
<font color="white"> </font>
</para>
<blockTable colWidths="112.0,74.0,356.0" style="Table6">
<tr>
<td>
<para style="P2">Num</para>
</td>
<td>
<para style="P2">Adj</para>
</td>
<td>
<para style="P2">Buyer</para>
</td>
</tr>
</blockTable>
<blockTable colWidths="112.0,74.0,356.0" style="Table2">
<tr>
<td>
<para style="P1">[[repeatIn(objects,'o') ]]<font face="Times-Roman" size="12.0">[[o. obj_num ]]</font></para>
</td>
<td>
<para style="P1">[[ o.obj_price]]</para>
</td>
<td>
<para style="P3">[[o.ach_uid and o.ach_uid.name or False ]]</para>
</td>
</tr>
</blockTable>
<para style="P4">
<font color="white"> </font>
</para>
<para style="P4">
<font color="white"> </font>
</para>
<para style="P3">
<font color="white"> </font>
</para>
</story>
</document>

View File

@ -1,36 +0,0 @@
# -*- 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/>.
#
##############################################################################
import time
from report import report_sxw
class auction_catelog(report_sxw.rml_parse):
def __init__(self, cr, uid, name, context):
super(auction_catelog, self).__init__(cr, uid, name, context=context)
self.localcontext.update({
'time': time,
})
report_sxw.report_sxw('report.auction.catelog', 'auction.lots', 'addons/auction/report/auction_catelog.rml', parser=auction_catelog)
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -1,82 +0,0 @@
<?xml version="1.0"?>
<document filename="test.pdf">
<template title="Catelog" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20">
<pageTemplate id="first">
<frame id="first" x1="35.0" y1="35.0" width="525" height="772"/>
</pageTemplate>
</template>
<stylesheet>
<blockTableStyle id="Standard_Outline">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
</blockTableStyle>
<blockTableStyle id="Table3">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
<blockBackground colorName="#ffffff" start="0,0" stop="0,-1"/>
<blockBackground colorName="#ffffff" start="1,0" stop="1,-1"/>
<blockBackground colorName="#ffffff" start="2,0" stop="2,-1"/>
</blockTableStyle>
<initialize>
<paraStyle name="all" alignment="justify"/>
</initialize>
<paraStyle name="P1" fontName="Helvetica" alignment="RIGHT"/>
<paraStyle name="P2" fontName="Helvetica" fontSize="16.0" leading="20" alignment="CENTER"/>
<paraStyle name="P3" rightIndent="17.0" leftIndent="0.0" fontName="Helvetica" fontSize="6.0" leading="8" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P4" rightIndent="17.0" leftIndent="0.0" fontName="Helvetica" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P5" rightIndent="17.0" leftIndent="0.0" fontName="Helvetica" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P6" fontName="Helvetica-Bold" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P7" fontName="Helvetica-Bold" fontSize="12.0" leading="15" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="Standard" fontName="Helvetica"/>
<paraStyle name="Text body" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="List" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="Table Contents" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="Table Heading" fontName="Helvetica" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="Caption" fontName="Helvetica" fontSize="10.0" leading="13" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="Index" fontName="Helvetica"/>
<images/>
</stylesheet>
<story>
<para style="Standard">
<font color="white"> </font>
</para>
<para style="P2">Catelog</para>
<para style="P1">
<font color="white"> </font>
</para>
<para style="P1">
<font color="white"> </font>
</para>
<para style="P1"><font face="Helvetica">Date</font>: [[ formatLang(time.strftime('%Y-%m-%d'),date=True) ]] </para>
<para style="P1">
<font color="white"> </font>
</para>
<blockTable colWidths="65.0,398.0,94.0" style="Table3">
<tr>
<td>
<para style="P6">Cat.N</para>
</td>
<td>
<para style="P6">Description</para>
</td>
<td>
<para style="P7">Estimate</para>
</td>
</tr>
<tr>
<td>
<para style="P3">[[ repeatIn(objects,'o') ]] <font face="Helvetica" size="9.0">[[o. obj_num ]]</font></para>
</td>
<td>
<para style="P4">[[o. name]]</para>
</td>
<td>
<para style="P5">[[formatLang(o. lot_est1) ]][[ company.currency_id.symbol ]]-[[formatLang(o.lot_est2)]][[ company.currency_id.symbol ]]</para>
</td>
</tr>
</blockTable>
<para style="Standard">
<font color="white"> </font>
</para>
</story>
</document>

View File

@ -1,50 +0,0 @@
# -*- 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 report.interface import report_int
import netsvc
class auction_invoice(report_int):
def __init__(self, name):
report_int.__init__(self, name)
def create(self,cr, uid, ids, datas, context):
lots = self.pool.get('auction.lots').read(cr, uid, ids, ['ach_inv_id'], context=context)
invoices = {}
for l in lots:
if l['ach_inv_id']:
invoices[l['ach_inv_id'][0]]=True
new_ids = invoices.keys()
if not len(new_ids):
raise 'UserError', 'Objects not Invoiced !'
datas['ids'] = new_ids
self._obj_invoice = netsvc.LocalService('report.account.invoice')
return self._obj_invoice.create(cr, uid, new_ids, datas, context)
def result(self):
return self._obj_invoice.result()
auction_invoice('report.auction.invoice')
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -1,36 +0,0 @@
# -*- 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/>.
#
##############################################################################
import time
from report import report_sxw
class auction_objects(report_sxw.rml_parse):
def __init__(self, cr, uid, name, context):
super(auction_objects, self).__init__(cr, uid, name, context=context)
self.localcontext.update({
'time': time,
})
report_sxw.report_sxw('report.auction.objects', 'auction.lots', 'addons/auction/report/auction_objects.rml', parser=auction_objects)
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -1,217 +0,0 @@
<?xml version="1.0"?>
<document filename="test.pdf">
<template title="Objects" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20">
<pageTemplate id="first">
<frame id="first" x1="35.0" y1="35.0" width="525" height="772"/>
</pageTemplate>
</template>
<stylesheet>
<blockTableStyle id="Standard_Outline">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
</blockTableStyle>
<blockTableStyle id="Tableau1">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
<blockBackground colorName="#ffffff" start="0,0" stop="0,0"/>
<blockBackground colorName="#ffffff" start="1,0" stop="1,0"/>
<blockBackground colorName="#ffffff" start="2,0" stop="2,0"/>
<blockBackground colorName="#e6e6e6" start="0,1" stop="0,1"/>
<blockBackground colorName="#e6e6e6" start="1,1" stop="1,1"/>
<blockBackground colorName="#e6e6e6" start="2,1" stop="2,1"/>
</blockTableStyle>
<blockTableStyle id="Tableau2">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
<lineStyle kind="GRID" colorName="black"/>
<blockBackground colorName="#cccccc" start="0,0" stop="0,0"/>
<blockBackground colorName="#cccccc" start="1,0" stop="1,0"/>
<blockBackground colorName="#cccccc" start="2,0" stop="2,0"/>
<blockBackground colorName="#cccccc" start="3,0" stop="3,0"/>
</blockTableStyle>
<blockTableStyle id="Tableau3">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
</blockTableStyle>
<blockTableStyle id="Table4">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
</blockTableStyle>
<initialize>
<paraStyle name="all" alignment="justify"/>
</initialize>
<paraStyle name="P1" rightIndent="17.0" leftIndent="0.0" fontName="Times-Roman" fontSize="6.0" leading="8" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P2" fontName="Times-Roman" fontSize="20.0" leading="25" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P3" fontName="Times-Roman" fontSize="10.0" leading="13" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P4" fontName="Times-Roman" alignment="CENTER" 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" rightIndent="17.0" leftIndent="0.0" fontName="Times-Roman" fontSize="6.0" leading="8" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P7" fontName="Times-Roman" alignment="CENTER"/>
<paraStyle name="P8" fontName="Times-Roman" alignment="LEFT"/>
<paraStyle name="P9" fontName="Times-Roman" fontSize="9.0" leading="11"/>
<paraStyle name="P10" rightIndent="0.0" leftIndent="0.0" fontName="Times-Roman" fontSize="7.0" leading="9" alignment="LEFT"/>
<paraStyle name="P11" fontName="Times-Roman" fontSize="9.0" leading="11" alignment="CENTER"/>
<paraStyle name="P12" fontName="Times-Roman" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P13" fontName="Times-Roman" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P14" fontName="Times-Roman" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P15" fontName="Times-Roman" fontSize="17.0" leading="21" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P16" fontName="Times-Roman" fontSize="11.0" leading="14" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P17" fontName="Times-Roman" fontSize="11.0" leading="14" alignment="CENTER" backColor="#ffffff" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P18" fontName="Times-Roman" fontSize="11.0" leading="14" alignment="LEFT"/>
<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"/>
</stylesheet>
<story>
<para style="P1">
<font color="white"> </font>
</para>
<blockTable colWidths="142.0,226.0,157.0" repeatRows="1" style="Tableau1">
<tr>
<td>
<para style="Table Contents">
<font color="white"> </font>
</para>
</td>
<td>
<para style="P2">
<font color="white"> </font>
</para>
<para style="P2">Buyer form with picture</para>
</td>
<td>
<para style="P3">
<font color="white"> </font>
</para>
</td>
</tr>
<tr>
<td>
<para style="Table Contents">[[ company.name ]]</para>
</td>
<td>
<para style="P4">
<font color="white"> </font>
</para>
</td>
<td>
<para style="P5">Currency: [[ company.currency_id.name ]]</para>
</td>
</tr>
</blockTable>
<para style="P6">
<font color="white"> </font>
</para>
<para style="P1">
<font color="white"> </font>
</para>
<para style="P1">[[ repeatIn(objects,'o') ]]</para>
<para style="P7">
<font color="white"> </font>
</para>
<para style="P7">
<font color="white"> </font>
</para>
<para style="P8">Printed on: [[ time.strftime('%Y-%m-%d') ]]</para>
<para style="P8">
<font color="white"> </font>
</para>
<para style="P9">[[ setTag('para','image',{'width':'100.0','height':'80.0','name':str(o.id)}) ]][[ o.image or setTag('image','para') ]]</para>
<para style="P10">
<font color="white"> </font>
</para>
<para style="P8"><font face="Times-Roman">Auction</font>: [[ o.auction_id.name ]]</para>
<para style="P11">
<font color="white"> </font>
</para>
<para style="P12">
<font color="white"> </font>
</para>
<blockTable colWidths="95.0,165.0,73.0,192.0" style="Tableau2">
<tr>
<td>
<para style="P4">Catalog No</para>
</td>
<td>
<para style="P4">Description</para>
</td>
<td>
<para style="P4">Paid</para>
</td>
<td>
<para style="P4">Adj(EUR)</para>
</td>
</tr>
</blockTable>
<blockTable colWidths="147.0,113.0,73.0,192.0" style="Tableau3">
<tr>
<td>
<para style="P4">[[ o.obj_num ]]</para>
</td>
<td>
<para style="P13">[[ o.name ]]</para>
<para style="P4">
<font color="white"> </font>
</para>
<para style="P4">
<font color="white"> </font>
</para>
</td>
<td>
<para style="P14">Price </para>
<para style="P4"><font face="Times-Roman" size="9.0">Buyer Costs</font>:</para>
<para style="P4">
<font color="white"> </font>
</para>
<para style="P15">Total:</para>
</td>
<td>
<blockTable colWidths="94.0,94.0" style="Table4">
<tr>
<td>
<para style="P16"/>
</td>
<td>
<para style="P16">[[ o.obj_price ]] </para>
</td>
</tr>
<tr>
<td>
<para style="P16">
<font color="white"> </font>
</para>
</td>
<td>
<para style="P16">[[ sum_taxes(o.auction_id.id,o.obj_price) ]]</para>
<para style="P16">
<font color="white"> </font>
</para>
</td>
</tr>
<tr>
<td>
<para style="P16">
<font color="white"> </font>
</para>
</td>
<td>
<para style="P17">[[ o.obj_price + sum_taxes(o.auction_id.id,o.obj_price) ]]</para>
</td>
</tr>
</blockTable>
<para style="P13">
<font color="white"> </font>
</para>
</td>
</tr>
</blockTable>
<para style="P18">
<font color="white"> </font>
</para>
</story>
</document>

View File

@ -1,37 +0,0 @@
# -*- 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/>.
#
##############################################################################
import time
from report import report_sxw
class auction_result(report_sxw.rml_parse):
def __init__(self, cr, uid, name, context):
super(auction_result, self).__init__(cr, uid, name, context=context)
self.localcontext.update({
'time': time,
})
report_sxw.report_sxw('report.auction.result', 'auction.lots', 'addons/auction/report/auction_result.rml',parser=auction_result)
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -1,87 +0,0 @@
<?xml version="1.0"?>
<document filename="test.pdf">
<template title="Result" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20">
<pageTemplate id="first">
<frame id="first" x1="35.0" y1="35.0" width="525" height="772"/>
</pageTemplate>
</template>
<stylesheet>
<blockTableStyle id="Standard_Outline">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
</blockTableStyle>
<blockTableStyle id="Table6">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
<lineStyle kind="GRID" colorName="black"/>
<blockBackground colorName="#e6e6e6" start="0,0" stop="0,0"/>
<blockBackground colorName="#e6e6e6" start="1,0" stop="1,0"/>
</blockTableStyle>
<blockTableStyle id="Table2">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
<lineStyle kind="GRID" colorName="black"/>
</blockTableStyle>
<initialize>
<paraStyle name="all" alignment="justify"/>
</initialize>
<paraStyle name="P1" rightIndent="13.0" leftIndent="11.0" fontName="Courier-BoldOblique" fontSize="10.0" leading="13" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P2" rightIndent="17.0" leftIndent="0.0" fontName="Courier" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P3" fontName="Courier" fontSize="10.0" leading="13" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P4" fontName="Courier" fontSize="10.0" leading="13" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P5" rightIndent="17.0" leftIndent="0.0" fontName="Courier" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P6" rightIndent="17.0" leftIndent="0.0" fontName="Courier" fontSize="10.0" leading="13" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P7" rightIndent="17.0" leftIndent="0.0" fontName="Courier-Bold" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P8" rightIndent="17.0" leftIndent="0.0" fontName="Times-Roman" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P9" rightIndent="17.0" leftIndent="0.0" fontName="Times-Roman" fontSize="12.0" leading="15" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P10" fontName="Times-Bold" fontSize="12.0" leading="15" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P11" fontName="Times-Roman" fontSize="12.0" leading="15" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P12" rightIndent="13.0" leftIndent="11.0" fontName="Courier-BoldOblique" fontSize="10.0" leading="13" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
<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"/>
</stylesheet>
<story>
<para style="P8">
<font face="Courier" size="10.0"/>
</para>
<para style="P1">
<font color="white"> </font>
</para>
<blockTable colWidths="95.0,98.0" style="Table6">
<tr>
<td>
<para style="P1">Num</para>
</td>
<td>
<para style="P1">Adj</para>
</td>
</tr>
</blockTable>
<blockTable colWidths="95.0,98.0" style="Table2">
<tr>
<td>
<para style="P6">[[repeatIn(objects,'o') ]]<font face="Times-Roman" size="12.0">[[o. obj_num ]]</font></para>
</td>
<td>
<para style="P6">[[ o.obj_price]]</para>
</td>
</tr>
</blockTable>
<para style="P10">
<font color="white"> </font>
</para>
<para style="P10">
<font color="white"> </font>
</para>
<para style="P10">
<font color="white"> </font>
</para>
</story>
</document>

View File

@ -1,229 +0,0 @@
<?xml version="1.0"?>
<document filename="test.pdf">
<template title="Auction Total" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20">
<pageTemplate id="first">
<frame id="first" x1="57.0" y1="57.0" width="481" height="728"/>
</pageTemplate>
</template>
<stylesheet>
<blockTableStyle id="Standard_Outline">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
</blockTableStyle>
<blockTableStyle id="Table4">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
</blockTableStyle>
<blockTableStyle id="Table6">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
</blockTableStyle>
<blockTableStyle id="Table1">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
</blockTableStyle>
<blockTableStyle id="Table2">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
</blockTableStyle>
<initialize>
<paraStyle name="all" alignment="justify"/>
</initialize>
<paraStyle name="P1" fontName="Courier" alignment="LEFT"/>
<paraStyle name="P2" fontName="Times-Roman"/>
<paraStyle name="P3" fontName="Times-Roman" fontSize="15.0" leading="19"/>
<paraStyle name="P4" rightIndent="0.0" leftIndent="0.0" fontName="Courier-Bold" fontSize="12.0" leading="15" alignment="LEFT"/>
<paraStyle name="P5" rightIndent="0.0" leftIndent="0.0" fontName="Times-Roman" alignment="LEFT"/>
<paraStyle name="P6" rightIndent="0.0" leftIndent="0.0" fontName="Courier-Bold" fontSize="12.0" leading="15" alignment="LEFT"/>
<paraStyle name="P7" rightIndent="17.0" leftIndent="0.0" fontName="Times-Roman" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P8" fontName="Courier" fontSize="12.0" leading="15" alignment="LEFT"/>
<paraStyle name="P9" fontName="Times-Roman" fontSize="13.0" leading="16" alignment="LEFT"/>
<paraStyle name="Standard" fontName="Times-Roman"/>
<paraStyle name="Text body" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="Heading" fontName="Helvetica" fontSize="14.0" leading="17" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="List" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="Table Contents" fontName="Times-Roman"/>
<paraStyle name="Table Heading" fontName="Times-Roman" alignment="CENTER"/>
<paraStyle name="Caption" fontName="Times-Italic" fontSize="12.0" leading="15" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="Index" fontName="Times-Roman"/>
</stylesheet>
<story>
<section>
<para style="P2">
<font color="white"> </font>
</para>
<blockTable colWidths="482.0" style="Table4">
<tr>
<td>
<para style="P3">Auction</para>
<para style="Standard">[[ repeatIn(get_auc_detail(objects),'ab') ]]
</para>
<para style="Standard">
<font face="Times-Roman"/>
</para>
<para style="P4">Auction name:[[ ab['name'] ]]</para>
<para style="P4">Auction Date:[[ ab['auction1'] ]]</para>
<para style="P4">
<font color="white"> </font>
</para>
<para style="P3">Items</para>
<para style="P4">
<font color="white"> </font>
</para>
<blockTable colWidths="238.0,238.0" style="Table6">
<tr>
<td>
<para style="Standard"># of items:</para>
</td>
<td>
<para style="Standard">
<font face="Times-Roman" size="10.0">[[ sum_taxes(ab['id']) ]]</font>
</para>
</td>
</tr>
<tr>
<td>
<para style="Standard">Min Estimate:</para>
</td>
<td>
<para style="Standard">[[sum_minadj(ab['id']) ]]</para>
</td>
</tr>
<tr>
<td>
<para style="Standard">Max Estimate:</para>
</td>
<td>
<para style="Standard">[[sum_maxadj(ab['id']) ]]</para>
</td>
</tr>
<tr>
<td>
<para style="Standard"># of unsold items:</para>
</td>
<td>
<para style="Standard">[[sold_item(ab['id']) ]]</para>
</td>
</tr>
<tr>
<td>
<para style="Standard">Adjudication:</para>
</td>
<td>
<para style="Standard">[[sum_adj(ab['id']) ]]</para>
</td>
</tr>
</blockTable>
<para style="P4">
<font color="white"> </font>
</para>
<para style="P4">
<font color="white"> </font>
</para>
<para style="P3">Buyers</para>
<para style="P4">
<font color="white"> </font>
</para>
<blockTable colWidths="238.0,238.0" style="Table1">
<tr>
<td>
<para style="Standard"># of buyers:</para>
</td>
<td>
<para style="Standard">[[sum_buyer(ab['id']) ]]</para>
</td>
</tr>
<tr>
<td>
<para style="Standard"># of paid items (based on invoices):</para>
</td>
<td>
<para style="Standard">[[sum_buyer_paid (ab['id']) ]]</para>
</td>
</tr>
<tr>
<td>
<para style="Standard"># of commissions:</para>
</td>
<td>
<para style="Standard">[[count_comm (ab['id']) ]]</para>
</td>
</tr>
<tr>
<td>
<para style="Standard"># of items taken away:</para>
</td>
<td>
<para style="Standard">[[ count_take (ab['id']) ]]</para>
</td>
</tr>
<tr>
<td>
<para style="Standard">Debit:</para>
</td>
<td>
<para style="Standard">[[ sum_credit(ab['id']) ]]</para>
</td>
</tr>
<tr>
<td>
<para style="Standard">Paid:</para>
</td>
<td>
<para style="Standard">[[ chek_paid (ab['id']) ]]</para>
</td>
</tr>
</blockTable>
<para style="P7">
<font color="white"> </font>
</para>
<blockTable colWidths="238.0,238.0" style="Table2">
<tr>
<td>
<para style="P3">Sellers</para>
</td>
<td>
<para style="P9">
<font color="white"> </font>
</para>
</td>
</tr>
<tr>
<td>
<para style="Standard"># of sellers:</para>
</td>
<td>
<para style="Standard">[[ sum_seller(ab['id']) ]]</para>
</td>
</tr>
<tr>
<td>
<para style="Standard">Debit:</para>
</td>
<td>
<para style="Standard">[[sum_credit_seller(ab['id']) ]]</para>
</td>
</tr>
<tr>
<td>
<para style="Standard">Paid:</para>
</td>
<td>
<para style="Standard">[[check_paid_seller(ab['id']) ]]</para>
</td>
</tr>
</blockTable>
<para style="P4">
<font color="white"> </font>
</para>
</td>
</tr>
</blockTable>
</section>
</story>
</document>

View File

@ -1,155 +0,0 @@
# -*- 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/>.
#
##############################################################################
import time
from report import report_sxw
class auction_total_rml(report_sxw.rml_parse):
total_obj=[]
def __init__(self, cr, uid, name, context):
super(auction_total_rml, self).__init__(cr, uid, name, context=context)
self.localcontext.update({
'time': time,
'sum_taxes':self.sum_taxes,
'sold_item':self.sold_item,
'sum_buyer':self.sum_buyer,
'sum_seller':self.sum_seller,
'sum_buyer_paid':self.sum_buyer_paid,
'sum_adj':self.sum_adj,
'count_comm':self.count_comm,
'sum_minadj':self.sum_minadj,
'sum_maxadj':self.sum_maxadj,
'sum_credit':self.sum_credit,
'sum_debit': self.sum_debit,
'chek_paid': self.chek_paid,
'check_paid_seller': self.check_paid_seller,
'count_take': self.count_take,
'sum_credit_seller':self.sum_credit_seller,
'sum_debit_buyer': self.sum_debit_buyer,
'get_auc_detail': self.get_auc_detail
})
def get_auc_detail(self,objects):
auc_lot_ids = []
for lot_id in objects:
auc_lot_ids.append(lot_id.id)
self.total_obj=auc_lot_ids
self.cr.execute('SELECT auction_id FROM auction_lots '
'WHERE id IN %s '
'GROUP BY auction_id',
(tuple(auc_lot_ids),))
auc_date_ids = self.cr.fetchall()
auct_dat=[]
for ad_id in auc_date_ids:
auc_dates_fields = self.pool.get('auction.dates').read(self.cr, self.uid, ad_id[0], ['name','auction1','id'])
auct_dat.append(auc_dates_fields)
return auct_dat
def sum_taxes(self,auction_id):
self.cr.execute("select count(1) from auction_lots where id IN %s and auction_id=%s group by auction_id ", (tuple(self.total_obj),auction_id,))
res = self.cr.fetchone()
return res[0]
def sold_item(self, object_id):
self.cr.execute("select count(1) from auction_lots where id IN %s and auction_id=%s and state IN ('unsold') ", (tuple(self.total_obj),object_id,))
res = self.cr.fetchone()
return str(res[0])
def sum_buyer(self, auction_id):
self.cr.execute("select count(*) from auction_lots where id IN %s and auction_id=%s and (ach_uid is not null or ach_login is not null) ", (tuple(self.total_obj),auction_id,))
res = self.cr.fetchone()
return str(res[0])
def sum_seller(self, auction_id):
self.cr.execute("select count(distinct bord_vnd_id) from auction_lots where id IN %s and auction_id=%s AND bord_vnd_id is not null ", (tuple(self.total_obj),auction_id,))
res = self.cr.fetchone()
return res[0]
def sum_adj(self, auction_id):
self.cr.execute("select sum(obj_price) from auction_lots where id IN %s and auction_id=%s ", (tuple(self.total_obj),auction_id,))
res = self.cr.fetchone()
return str(res[0])
def count_take(self, auction_id):
self.cr.execute("select count(*) from auction_lots where id IN %s and auction_id=%s and ach_emp='True' ", (tuple(self.total_obj),auction_id,))
res = self.cr.fetchone()
return str(res[0])
def chek_paid(self, auction_id):
self.cr.execute("select count(1) from auction_lots where id IN %s and auction_id=%s and ((paid_ach='T') or (is_ok='T')) ", (tuple(self.total_obj),auction_id,))
res = self.cr.fetchone()
return str(res[0])
def check_paid_seller(self,auction_id):
self.cr.execute("select sum(seller_price) from auction_lots where id IN %s and auction_id=%s and paid_vnd != 'T' ", (tuple(self.total_obj),auction_id,))
res = self.cr.fetchone()
return str(res[0]) or 0.0
def sum_credit(self,auction_id):
self.cr.execute("select sum(buyer_price) from auction_lots where id IN %s and auction_id=%s", (tuple(self.total_obj),auction_id,))
res = self.cr.fetchone()
return str(res[0])
def sum_debit_buyer(self,auction_id):
self.cr.execute("select sum(buyer_price) from auction_lots where id IN %s and auction_id=%s", (tuple(self.total_obj),auction_id,))
res = self.cr.fetchone()
return str(res[0] or 0)
def sum_debit(self,object_id):
self.cr.execute("select sum(seller_price) from auction_lots where auction_id=%s", (object_id,))
res = self.cr.fetchone()
return str(res[0] or 0)
def sum_credit_seller(self, object_id):
self.cr.execute("select sum(seller_price) from auction_lots where id IN %s and auction_id=%s", (tuple(self.total_obj),object_id,))
res = self.cr.fetchone()
return str(res[0] or 0)
def sum_minadj(self, auction_id):
self.cr.execute('select sum(lot_est1) from auction_lots where id IN %s and auction_id=%s', (tuple(self.total_obj),auction_id,))
res = self.cr.fetchone()
return str(res[0]) or 0
def sum_maxadj(self, auction_id):
self.cr.execute('select sum(lot_est2) from auction_lots where id IN %s and auction_id=%s', (tuple(self.total_obj),auction_id,))
res = self.cr.fetchone()
return str(res[0]) or 0
def sum_buyer_paid(self, auction_id):
self.cr.execute("select count(*) from auction_lots where id IN %s and auction_id=%s and state = 'paid' ", (tuple(self.total_obj),auction_id,))
res = self.cr.fetchone()
return str(res[0])
def count_comm(self, auction_id):
self.cr.execute("select count(*) from auction_lots where id IN %s and auction_id=%s and obj_comm is not null ", (tuple(self.total_obj),auction_id,))
res = self.cr.fetchone()
return str(res[0])
report_sxw.report_sxw('report.auction.total.rml', 'auction.lots', 'addons/auction/report/auction_total.rml',parser=auction_total_rml)
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -1,326 +0,0 @@
<?xml version="1.0"?>
<document filename="test.pdf">
<template title="Auction Total" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20">
<pageTemplate id="first">
<frame id="first" x1="35.0" y1="35.0" width="525" height="772"/>
</pageTemplate>
</template>
<stylesheet>
<blockTableStyle id="Standard_Outline">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
</blockTableStyle>
<blockTableStyle id="Table2">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
</blockTableStyle>
<blockTableStyle id="Table1">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
</blockTableStyle>
<blockTableStyle id="Table3">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
</blockTableStyle>
<blockTableStyle id="Table4">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
</blockTableStyle>
<initialize>
<paraStyle name="all" alignment="justify"/>
</initialize>
<paraStyle name="P1" rightIndent="17.0" leftIndent="0.0" fontName="Times-Roman" fontSize="6.0" leading="8" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P2" fontName="Times-Roman" fontSize="6.0" leading="8" alignment="LEFT"/>
<paraStyle name="P3" rightIndent="0.0" leftIndent="0.0" fontName="Times-BoldItalic" fontSize="12.0" leading="15" alignment="LEFT"/>
<paraStyle name="P4" rightIndent="0.0" leftIndent="0.0" fontName="Times-Bold" fontSize="12.0" leading="15" alignment="LEFT"/>
<paraStyle name="P5" fontName="Times-Roman" alignment="CENTER"/>
<paraStyle name="P6" rightIndent="0.0" leftIndent="0.0" fontName="Times-Roman" fontSize="12.0" leading="15" alignment="LEFT"/>
<paraStyle name="P7" rightIndent="0.0" leftIndent="0.0" fontName="Times-Roman" fontSize="20.0" leading="25" alignment="LEFT"/>
<paraStyle name="P8" rightIndent="0.0" leftIndent="0.0" fontName="Times-Bold" fontSize="20.0" leading="25" alignment="LEFT"/>
<paraStyle name="P9" rightIndent="17.0" leftIndent="0.0" fontName="Times-BoldItalic" fontSize="6.0" leading="8" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P10" fontName="Times-Roman" fontSize="20.0" leading="25" alignment="LEFT"/>
<paraStyle name="P11" fontName="Times-Roman" fontSize="20.0" leading="25" alignment="LEFT"/>
<paraStyle name="P12" fontName="Times-Roman" fontSize="20.0" leading="25" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P13" fontName="Times-Roman" fontSize="13.0" leading="16" alignment="LEFT"/>
<paraStyle name="P14" fontName="Times-Roman" fontSize="13.0" leading="16" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P15" fontName="Times-Roman" fontSize="20.0" leading="25" alignment="LEFT"/>
<paraStyle name="P16" fontName="Times-Roman" alignment="LEFT"/>
<paraStyle name="P17" fontName="Times-Roman" fontSize="13.0" leading="16" alignment="LEFT"/>
<paraStyle name="P18" fontName="Times-Roman" fontSize="20.0" leading="25"/>
<paraStyle name="P19" fontName="Times-Roman" fontSize="20.0" leading="25"/>
<paraStyle name="P20" fontName="Times-Roman"/>
<paraStyle name="P21" fontName="Times-Roman" alignment="LEFT"/>
<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"/>
</stylesheet>
<story>
<para style="P1">[[ repeatIn(objects,'o') ]]</para>
<para style="P2">
<font color="white"> </font>
</para>
<para style="P3">
<font color="white"> </font>
</para>
<blockTable colWidths="140.0,385.0" style="Table2">
<tr>
<td>
<para style="P4">
<font face="Times-Roman">Date printing:</font>
</para>
<para style="P5">
<font color="white"> </font>
</para>
</td>
<td>
<para style="P6">[[ time.strftime('%Y-%m-%d') ]] </para>
</td>
</tr>
</blockTable>
<para style="P7">
<font color="white"> </font>
</para>
<blockTable colWidths="142.0,383.0" style="Table1">
<tr>
<td>
<para style="P8">Auction</para>
</td>
<td>
<para style="P6">
<font color="white"> </font>
</para>
</td>
</tr>
<tr>
<td>
<para style="P9">[[ repeatIn(objects,'o') ]]</para>
</td>
<td>
<para style="P6">
<font color="white"> </font>
</para>
</td>
</tr>
<tr>
<td>
<para style="P6">Auction: </para>
</td>
<td>
<para style="P6">[[ o.auction_id and o.auction_id.name or False]]</para>
</td>
</tr>
<tr>
<td>
<para style="P6">Date:</para>
</td>
<td>
<para style="P6">[[ o.auction_id and o.auction_id.auction1 ]]</para>
</td>
</tr>
</blockTable>
<para style="P10">
<font color="white"> </font>
</para>
<para style="P11">
<font color="white"> </font>
</para>
<blockTable colWidths="262.0,262.0" style="Table3">
<tr>
<td>
<para style="P11">Items</para>
</td>
<td>
<para style="P12">
<font color="white"> </font>
</para>
</td>
</tr>
<tr>
<td>
<para style="P9">[[ repeatIn(objects,'o') ]]</para>
</td>
<td>
<para style="P12">
<font color="white"> </font>
</para>
</td>
</tr>
<tr>
<td>
<para style="P13"># of items:</para>
</td>
<td>
<para style="Standard">[[ sum_taxes(o.auction_id.id ) ]]</para>
</td>
</tr>
<tr>
<td>
<para style="P13">Min Estimate:</para>
</td>
<td>
<para style="P14">[[ o.lot_est1 ]]</para>
</td>
</tr>
<tr>
<td>
<para style="P13">Max Estimate:</para>
</td>
<td>
<para style="Standard">[[o.lot_est2]]</para>
</td>
</tr>
<tr>
<td>
<para style="P13"># of unsold items:</para>
</td>
<td>
<para style="Standard">[[ unsold_item(o.auction_id.id ) ]]</para>
</td>
</tr>
<tr>
<td>
<para style="P13">Adjudication:</para>
</td>
<td>
<para style="Standard">[[o.obj_price]]</para>
</td>
</tr>
</blockTable>
<para style="P11">
<font color="white"> </font>
</para>
<para style="P13">
<font color="white"> </font>
</para>
<blockTable colWidths="262.0,262.0" style="Table4">
<tr>
<td>
<para style="P11">Buyers</para>
</td>
<td>
<para style="P12">
<font color="white"> </font>
</para>
</td>
</tr>
<tr>
<td>
<para style="P15">[[ sum_taxes(o.auction_id.id ) ]]</para>
</td>
<td>
<para style="P12">
<font color="white"> </font>
</para>
</td>
</tr>
<tr>
<td>
<para style="P16"># of buyers:</para>
</td>
<td>
<para style="Standard">[[ sum_buyer(o.auction_id.id ) ]]</para>
</td>
</tr>
<tr>
<td>
<para style="P13"># of paid items:</para>
</td>
<td>
<para style="P12">
<font color="white"> </font>
</para>
</td>
</tr>
<tr>
<td>
<para style="P13"># of commissions:</para>
</td>
<td>
<para style="P12">
<font color="white"> </font>
</para>
</td>
</tr>
<tr>
<td>
<para style="P17"># of items taken away:</para>
</td>
<td>
<para style="P12">
<font color="white"> </font>
</para>
</td>
</tr>
<tr>
<td>
<para style="P13">Credit:</para>
</td>
<td>
<para style="P12">
<font color="white"> </font>
</para>
</td>
</tr>
<tr>
<td>
<para style="P13">Paid:</para>
</td>
<td>
<para style="P12">
<font color="white"> </font>
</para>
</td>
</tr>
<tr>
<td>
<para style="P12">
<font color="white"> </font>
</para>
</td>
<td>
<para style="P12">
<font color="white"> </font>
</para>
</td>
</tr>
<tr>
<td>
<para style="P12">
<font color="white"> </font>
</para>
</td>
<td>
<para style="P12">
<font color="white"> </font>
</para>
</td>
</tr>
</blockTable>
<para style="P13">
<font color="white"> </font>
</para>
<para style="P13">
<font color="white"> </font>
</para>
<para style="P13">
<font color="white"> </font>
</para>
<para style="P18">
<font color="white"> </font>
</para>
<para style="P19">Sellers</para>
<para style="P20">
<font color="white"> </font>
</para>
<para style="P21">
<font color="white"> </font>
</para>
<para style="P13"># of sellers:</para>
<para style="P13">Debit:</para>
</story>
</document>

View File

@ -1,24 +0,0 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE adresses SYSTEM "/home/pinky/code/terp/xml/dtd/fiches.dtd">
<bids>
<bid type="fields" name="id">
<auction type="field" name="auction_id.name"></auction>
<bids_name type="field" name="name"></bids_name>
<client_info>
<partner_name type="field" name="partner_id.name"/>
<street type="field" name="partner_id.address.street"/>
<street2 type="field" name="partner_id.address.street2"/>
<zipcode type="field" name="partner_id.address.zip"/>
<city type="field" name="partner_id.address.city"/>
<contact type="field" name="contact_tel"/>
</client_info>
<bid_lines>
<bid_line type="zoom" name="bid_lines">
<lot_id type="field" name="lot_id.obj_num"></lot_id>
<lot_desc type="field" name="lot_id.obj_desc"></lot_desc>
<lot_price type="field" name="price"></lot_price>
<call type="field" name="call"></call>
</bid_line>
</bid_lines>
</bid>
</bids>

View File

@ -1,118 +0,0 @@
<?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:template match="/">
<xsl:call-template name="rml"/>
</xsl:template>
<xsl:template name="stylesheet">
<paraStyle name="nospace" fontName="Courier" fontSize="9" spaceBefore="0" spaceAfter="0"/>
<paraStyle name="nospace2" fontName="Courier" fontSize="10" spaceBefore="0" spaceAfter="0"/>
<paraStyle name="bigspace" fontName="Courier" fontSize="10" spaceBefore="0" spaceAfter="20"/>
<blockTableStyle id="bid">
<blockValign value="TOP"/>
<blockAlignment value="LEFT"/>
<lineStyle kind="LINEABOVE" colorName="black" start="0,0" stop="-1,0"/>
<lineStyle kind="LINEBELOW" colorName="black" start="0,0" stop="-1,0"/>
<lineStyle kind="LINEBELOW" colorName="black" start="0,-1" stop="-1,-1"/>
<lineStyle kind="LINEBEFORE" colorName="black" start="0,0" stop="-1,-1"/>
<lineStyle kind="LINEBEFORE" colorName="black" start="0,0" stop="0,-1"/>
<lineStyle kind="LINEAFTER" colorName="black" start="-1,0" stop="-1,-1"/>
<blockBackground colorName="(0.85,0.85,0.85)" start="0,0" stop="-1,0"/>
</blockTableStyle>
</xsl:template>
<xsl:template name="story">
<xsl:apply-templates select="bids"/>
</xsl:template>
<xsl:template match="bids">
<xsl:apply-templates select="bid"/>
<pageBreak/>
</xsl:template>
<!--- <xsl:template match="bid"> make a chaange a data of all the bidders-->
<xsl:template match="/">
<para style="nospace2"><xsl:value-of select="client_info/partner_name"/></para>
<para style="nospace2"><xsl:value-of select="client_info/street"/></para>
<para style="nospace2"><xsl:value-of select="client_info/street2"/></para>
<para style="nospace2">
<xsl:value-of select="client_info/zipcode"/><xsl:text> </xsl:text>
<xsl:value-of select="client_info/city"/>
</para>
<nextFrame/>
<setNextTemplate name="other_pages"/>
<para style="nospace">
<b><xsl:text t="1">Title: </xsl:text></b>
<xsl:value-of select="bids_name"/>
</para>
<para style="nospace">
<b><xsl:text t="1">Contact: </xsl:text></b>
<xsl:value-of select="client_info/contact"/>
</para>
<para style="bigspace">
<b><xsl:text t="1">Item: </xsl:text></b>
<xsl:text t="1">BID, </xsl:text>
<xsl:value-of select="auction"/>
</para>
<xsl:apply-templates select="bid_lines"/>
<nextFrame/>
<setNextTemplate name="first_page"/>
</xsl:template>
<xsl:template match="bid_lines">
<blockTable repeatRows="1" style="bid" colWidths="2.0cm,12.5cm,2.0cm,1.5cm">
<tr>
<td>
<para style="nospace"><b><xsl:text t="1">Cat. N.</xsl:text></b></para>
</td>
<td>
<para style="nospace"><b><xsl:text t="1">Description</xsl:text></b></para>
</td>
<td>
<para style="nospace"><b><xsl:text t="1">Price</xsl:text></b></para>
</td>
<td>
<para style="nospace"><b><xsl:text t="1">Tel?</xsl:text></b></para>
</td>
</tr>
<xsl:apply-templates select="bid_line"/>
</blockTable>
</xsl:template>
<xsl:template match="bid_line">
<tr>
<td>
<para style="nospace"><xsl:value-of select="lot_id"/></para>
</td>
<td>
<para style="nospace"><xsl:value-of select="lot_desc"/></para>
</td>
<td>
<para style="nospace"><xsl:value-of select="lot_price"/></para>
</td>
<td>
<para style="nospace">
<xsl:choose>
<xsl:when test="call=1">
<xsl:text t="1">yes</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:text t="1">no</xsl:text>
</xsl:otherwise>
</xsl:choose>
</para>
</td>
</tr>
</xsl:template>
</xsl:stylesheet>

View File

@ -1,36 +0,0 @@
# -*- 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/>.
#
##############################################################################
import time
from report import report_sxw
class bids_lots(report_sxw.rml_parse):
def __init__(self, cr, uid, name, context):
super(bids_lots, self).__init__(cr, uid, name, context=context)
self.localcontext.update({
'time': time,
})
report_sxw.report_sxw('report.bids.lots', 'auction.lots', 'addons/auction/report/bids_lots.rml',parser=bids_lots)
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -1,89 +0,0 @@
<?xml version="1.0"?>
<document filename="test.pdf">
<template title="Bids Lots" author="OpenERP S.A. (sales@openerp.com)" allowSplitting="20">
<pageTemplate id="first">
<frame id="first" x1="57.0" y1="57.0" width="481" height="728"/>
</pageTemplate>
</template>
<stylesheet>
<blockTableStyle id="Standard_Outline">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
</blockTableStyle>
<blockTableStyle id="Tableau1">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
<lineStyle kind="GRID" colorName="black"/>
<blockBackground colorName="#cccccc" start="0,0" stop="0,0"/>
<blockBackground colorName="#cccccc" start="1,0" stop="1,0"/>
<blockBackground colorName="#cccccc" start="2,0" stop="2,0"/>
<blockBackground colorName="#cccccc" start="3,0" stop="3,0"/>
</blockTableStyle>
<initialize>
<paraStyle name="all" alignment="justify"/>
</initialize>
<paraStyle name="P1" fontName="Times-Roman" fontSize="7.0" leading="9" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P2" fontName="Times-Roman" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P3" fontName="Courier" fontSize="7.0" leading="9" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P4" fontName="Courier" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P5" fontName="Courier" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P6" fontName="Courier" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="Standard" fontName="Times-Roman"/>
<paraStyle name="Text body" fontName="Times-Roman" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="Heading" fontName="Helvetica" fontSize="14.0" leading="17" spaceBefore="12.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="12.0" leading="15" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="Index" fontName="Times-Roman"/>
</stylesheet>
<story>
<para style="Standard">
<font color="white"> </font>
</para>
<para style="Standard">
<font color="white"> </font>
</para>
<para style="P1">
<font color="white"> </font>
</para>
<para style="P1">
<font color="white"> </font>
</para>
<blockTable colWidths="70.0,140.0,90.0,139.0" style="Tableau1">
<tr>
<td>
<para style="P2">Cat.N </para>
</td>
<td>
<para style="P2">Name</para>
</td>
<td>
<para style="P2">Bid</para>
</td>
<td>
<para style="P2">Phone</para>
</td>
</tr>
<tr>
<td>
<para style="P3">[[ repeatIn(objects,'o') ]]</para>
<para style="P4">[[o.obj_num]]</para>
</td>
<td>
<para style="P4">[[ o.ach_uid and o.ach_uid.name or False]]</para>
</td>
<td>
<para style="P5"><font>[[ o.bid_lines and o.bid_lines[0] and o.bid_lines[0].bid_id.name or removeParentNode('font')]]</font></para>
</td>
<td>
<para style="P6"><font>[[o.bid_lines and o.bid_lines[0] and o.bid_lines[0].bid_id.contact_tel or removeParentNode('font')]]</font></para>
</td>
</tr>
</blockTable>
<para style="P5">
<font color="white"> </font>
</para>
</story>
</document>

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