[MERGE] trunk

bzr revid: fva@openerp.com-20120521092023-qcis495ngwsudw43
This commit is contained in:
Frédéric van der Essen 2012-05-21 11:20:23 +02:00
commit cf17814781
452 changed files with 8509 additions and 147813 deletions

View File

@ -107,6 +107,7 @@ module named account_voucher.
'partner_view.xml',
'data/account_data.xml',
'data/data_account_type.xml',
'data/configurable_account_chart.xml',
'account_invoice_workflow.xml',
'project/project_view.xml',
'project/project_report.xml',

View File

@ -2911,7 +2911,7 @@ class account_fiscal_position_template(osv.osv):
obj_fiscal_position = self.pool.get('account.fiscal.position')
fp_ids = self.search(cr, uid, [('chart_template_id', '=', chart_temp_id)])
for position in self.browse(cr, uid, fp_ids, context=context):
new_fp = obj_fiscal_position.create(cr, uid, {'company_id': company_id, 'name': position.name})
new_fp = obj_fiscal_position.create(cr, uid, {'company_id': company_id, 'name': position.name, 'note': position.note})
for tax in position.tax_ids:
obj_tax_fp.create(cr, uid, {
'tax_src_id': tax_template_ref[tax.tax_src_id.id],

View File

@ -27,7 +27,7 @@ class account_analytic_line(osv.osv):
_inherit = 'account.analytic.line'
_description = 'Analytic Line'
_columns = {
'product_uom_id': fields.many2one('product.uom', 'UoM'),
'product_uom_id': fields.many2one('product.uom', 'Unit of Measure'),
'product_id': fields.many2one('product.product', 'Product'),
'general_account_id': fields.many2one('account.account', 'General Account', required=True, ondelete='restrict'),
'move_id': fields.many2one('account.move.line', 'Move Line', ondelete='cascade', select=True),

View File

@ -474,7 +474,7 @@ class account_move_line(osv.osv):
_columns = {
'name': fields.char('Name', size=64, required=True),
'quantity': fields.float('Quantity', digits=(16,2), help="The optional quantity expressed by this line, eg: number of product sold. The quantity is not a legal requirement but is very useful for some reports."),
'product_uom_id': fields.many2one('product.uom', 'UoM'),
'product_uom_id': fields.many2one('product.uom', 'Unit of Measure'),
'product_id': fields.many2one('product.product', 'Product'),
'debit': fields.float('Debit', digits_compute=dp.get_precision('Account')),
'credit': fields.float('Credit', digits_compute=dp.get_precision('Account')),

View File

@ -7,21 +7,20 @@ msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2012-02-08 00:35+0000\n"
"PO-Revision-Date: 2012-05-10 18:07+0000\n"
"Last-Translator: NOVOTRADE RENDSZERHÁZ ( novotrade.hu ) "
"<openerp@novotrade.hu>\n"
"PO-Revision-Date: 2012-05-17 13:09+0000\n"
"Last-Translator: Peter <herczegp@gmail.com>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-05-11 04:49+0000\n"
"X-Generator: Launchpad (build 15225)\n"
"X-Launchpad-Export-Date: 2012-05-18 04:40+0000\n"
"X-Generator: Launchpad (build 15259)\n"
#. module: account
#: view:account.invoice.report:0
#: view:analytic.entries.report:0
msgid "last month"
msgstr ""
msgstr "előző hónap"
#. module: account
#: model:process.transition,name:account.process_transition_supplierreconcilepaid0
@ -3962,7 +3961,7 @@ msgstr "Gyűjtőkód karton"
#. module: account
#: model:account.financial.report,name:account.account_financial_report_assets0
msgid "Assets"
msgstr ""
msgstr "Eszközök"
#. module: account
#: view:account.invoice.confirm:0
@ -6825,7 +6824,7 @@ msgstr ""
#: report:account.third_party_ledger:0
#: report:account.third_party_ledger_other:0
msgid "JRNL"
msgstr ""
msgstr "Napló"
#. module: account
#: view:account.partner.balance:0

View File

@ -8,14 +8,14 @@ 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-15 01:20+0000\n"
"PO-Revision-Date: 2012-05-15 06:17+0000\n"
"Last-Translator: Akira Hiyama <Unknown>\n"
"Language-Team: Japanese <ja@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-15 04:51+0000\n"
"X-Generator: Launchpad (build 15238)\n"
"X-Launchpad-Export-Date: 2012-05-16 04:50+0000\n"
"X-Generator: Launchpad (build 15247)\n"
#. module: account
#: view:account.invoice.report:0
@ -457,7 +457,7 @@ msgid ""
"it comes to 'Printed' state. When all transactions are done, it comes in "
"'Done' state."
msgstr ""
"仕訳帳期間が作成される場合、その状態はドラフトです。レポートが印刷された場合は、印刷済状態になります。全ての取引が終了すると終了状態となります。"
"仕訳帳期間が作成される場合、その状態はドラフトです。レポートが印刷された場合は、印刷済状態になります。全ての取引が完了すると完了状態となります。"
#. module: account
#: model:ir.actions.act_window,help:account.action_account_tax_chart
@ -1527,7 +1527,7 @@ msgstr "仕入先返金"
#: selection:account.fiscalyear,state:0
#: selection:account.period,state:0
msgid "Closed"
msgstr "閉"
msgstr "閉じた"
#. module: account
#: model:ir.ui.menu,name:account.menu_finance_recurrent_entries
@ -3387,7 +3387,7 @@ msgstr "ドラフト請求書"
msgid ""
"Selected Invoice(s) cannot be cancelled as they are already in 'Cancelled' "
"or 'Done' state!"
msgstr "選択した請求書は既にキャンセルあるいは了状態であるためキャンセルできません。"
msgstr "選択した請求書は既にキャンセルあるいは了状態であるためキャンセルできません。"
#. module: account
#: view:account.invoice.line:0
@ -4218,7 +4218,7 @@ msgid ""
"* When all the payments are done it will be in 'Valid' state."
msgstr ""
"新しい移動行が作成された時はドラフト状態になります。\n"
"・ 全ての支払いが了した時に、有効状態になります。"
"・ 全ての支払いが了した時に、有効状態になります。"
#. module: account
#: field:account.journal,view_id:0
@ -5961,7 +5961,7 @@ msgstr "(今期を使う場合は空のままとして下さい)"
msgid ""
"As soon as the reconciliation is done, the invoice's state turns to “done” "
"(i.e. paid) in the system."
msgstr "消し込みを終了するや否や、請求書の状態はシステム内で終了(すなわち支払済)となります。"
msgstr "消し込みを完了するや否や、請求書の状態はシステム内で完了(すなわち支払済)となります。"
#. module: account
#: view:account.chart.template:0
@ -6931,7 +6931,7 @@ msgstr "仕訳帳カラム"
#: selection:account.subscription,state:0
#: selection:report.invoice.created,state:0
msgid "Done"
msgstr "了"
msgstr "了"
#. module: account
#: model:ir.actions.act_window,help:account.action_bank_tree
@ -7957,7 +7957,7 @@ msgstr "このアカウントが仕訳帳項目の消し込みを許す場合は
msgid ""
"When monthly periods are created. The state is 'Draft'. At the end of "
"monthly period it is in 'Done' state."
msgstr "月次の期間が作成される時はその状態はドラフトです。月次の期間の終わりには状態は了になります。"
msgstr "月次の期間が作成される時はその状態はドラフトです。月次の期間の終わりには状態は了になります。"
#. module: account
#: report:account.analytic.account.inverted.balance:0
@ -10045,7 +10045,7 @@ msgstr "償却の移動"
#. module: account
#: model:process.node,note:account.process_node_paidinvoice0
msgid "Invoice's state is Done"
msgstr "請求書は了状態です。"
msgstr "請求書は了状態です。"
#. module: account
#: model:ir.model,name:account.model_report_account_sales
@ -10542,12 +10542,12 @@ msgstr "原価元帳(数量のみ)"
#. module: account
#: model:process.node,note:account.process_node_supplierpaidinvoice0
msgid "Invoice's state is Done."
msgstr "請求書は了状態です。"
msgstr "請求書は了状態です。"
#. module: account
#: model:process.transition,note:account.process_transition_reconcilepaid0
msgid "As soon as the reconciliation is done, the invoice can be paid."
msgstr "できるだけ早く消し込みを終えるために請求書の支払が可能です。"
msgstr "できるだけ早く消し込みを完了するために請求書の支払が可能です。"
#. module: account
#: view:account.account.template:0

View File

@ -123,11 +123,6 @@ class account_installer(osv.osv_memory):
context = {}
fy_obj = self.pool.get('account.fiscalyear')
for res in self.read(cr, uid, ids, context=context):
if 'charts' in res and res['charts'] == 'configurable':
#load generic chart of account
fp = tools.file_open(opj('account', 'configurable_account_chart.xml'))
tools.convert_xml_import(cr, 'account', fp, {}, 'init', True, None)
fp.close()
if 'date_start' in res and 'date_stop' in res:
f_ids = fy_obj.search(cr, uid, [('date_start', '<=', res['date_start']), ('date_stop', '>=', res['date_stop']), ('company_id', '=', res['company_id'][0])], context=context)
if not f_ids:

View File

@ -43,7 +43,7 @@ class analytic_entries_report(osv.osv):
'journal_id': fields.many2one('account.analytic.journal', 'Journal', required=True),
'move_id': fields.many2one('account.move.line', 'Move', required=True),
'product_id': fields.many2one('product.product', 'Product', required=True),
'product_uom_id': fields.many2one('product.uom', 'Product UOM', required=True),
'product_uom_id': fields.many2one('product.uom', 'Product Unit of Measure', required=True),
'amount': fields.float('Amount', readonly=True),
'unit_amount': fields.float('Quantity', readonly=True),
'nbr': fields.integer('#Entries', readonly=True),

View File

@ -76,7 +76,7 @@
<filter string="Journal" icon="terp-folder-orange" context="{'group_by':'journal_id'}"/>
<separator orientation="vertical"/>
<filter string="Product" icon="terp-accessories-archiver" context="{'group_by':'product_id'}"/>
<filter string="Product UOM" icon="terp-mrp" context="{'group_by':'product_uom_id'}"/>
<filter string="Product Unit of Measure" icon="terp-mrp" context="{'group_by':'product_uom_id'}"/>
<separator orientation="vertical" groups="base.group_multi_company"/>
<filter string="Company" icon="terp-go-home" context="{'group_by':'company_id'}" groups="base.group_multi_company"/>
<separator orientation="vertical"/>

View File

@ -50,7 +50,7 @@ class account_entries_report(osv.osv):
'journal_id': fields.many2one('account.journal', 'Journal', readonly=True),
'fiscalyear_id': fields.many2one('account.fiscalyear', 'Fiscal Year', readonly=True),
'product_id': fields.many2one('product.product', 'Product', readonly=True),
'product_uom_id': fields.many2one('product.uom', 'Product UOM', readonly=True),
'product_uom_id': fields.many2one('product.uom', 'Product Unit of Measure', readonly=True),
'move_state': fields.selection([('draft','Unposted'), ('posted','Posted')], 'State', readonly=True),
'move_line_state': fields.selection([('draft','Unbalanced'), ('valid','Valid')], 'State of Move Line', readonly=True),
'reconcile_id': fields.many2one('account.move.reconcile', readonly=True),

View File

@ -36,7 +36,7 @@ class account_invoice_report(osv.osv):
('10','October'), ('11','November'), ('12','December')], 'Month', readonly=True),
'product_id': fields.many2one('product.product', 'Product', readonly=True),
'product_qty':fields.float('Qty', readonly=True),
'uom_name': fields.char('Reference UoM', size=128, readonly=True),
'uom_name': fields.char('Reference Unit of Measure', size=128, readonly=True),
'payment_term': fields.many2one('account.payment.term', 'Payment Term', readonly=True),
'period_id': fields.many2one('account.period', 'Force Period', domain=[('state','<>','done')], readonly=True),
'fiscal_position': fields.many2one('account.fiscal.position', 'Fiscal Position', readonly=True),

View File

@ -36,11 +36,11 @@ class account_config_settings(osv.osv_memory):
_columns = {
'company_id': fields.many2one('res.company', 'Company', required=True),
'has_default_company': fields.boolean('Has default company', readonly=True),
'expects_chart_of_accounts': fields.related('company_id', 'expects_chart_of_accounts', type='boolean',
string='Chart of Accounts for this Company'),
string='Chart of Accounts for this Company',
help="""Check this box if this company is a legal entity."""),
'currency_id': fields.related('company_id', 'currency_id', type='many2one', relation='res.currency', required=True,
string='Main currency', help="Main currency of the company."),
string='Default Company Currency', help="Main currency of the company."),
'paypal_account': fields.related('company_id', 'paypal_account', type='char', size=128,
string='Paypal Account', help="Paypal account (email) for receiving online payments (credit card, etc.)"),
'company_footer': fields.related('company_id', 'rml_footer2', type='char', size=250, readonly=True,
@ -65,31 +65,31 @@ class account_config_settings(osv.osv_memory):
'sale_sequence_prefix': fields.related('sale_journal_id', 'sequence_id', 'prefix', type='char', string='Invoice Sequence'),
'sale_sequence_next': fields.related('sale_journal_id', 'sequence_id', 'number_next', type='integer', string='Next Invoice Number'),
'sale_refund_journal_id': fields.many2one('account.journal', 'Sale Refund Journal'),
'sale_refund_sequence_prefix': fields.related('sale_refund_journal_id', 'sequence_id', 'prefix', type='char', string='Refund Sequence'),
'sale_refund_sequence_next': fields.related('sale_refund_journal_id', 'sequence_id', 'number_next', type='integer', string='Next Refund Number'),
'sale_refund_sequence_prefix': fields.related('sale_refund_journal_id', 'sequence_id', 'prefix', type='char', string='Credit Note Sequence'),
'sale_refund_sequence_next': fields.related('sale_refund_journal_id', 'sequence_id', 'number_next', type='integer', string='Next Credit Note Number'),
'purchase_journal_id': fields.many2one('account.journal', 'Purchase Journal'),
'purchase_sequence_prefix': fields.related('purchase_journal_id', 'sequence_id', 'prefix', type='char', string='Supplier Invoice Sequence'),
'purchase_sequence_next': fields.related('purchase_journal_id', 'sequence_id', 'number_next', type='integer', string='Next Supplier Invoice Number'),
'purchase_refund_journal_id': fields.many2one('account.journal', 'Purchase Refund Journal'),
'purchase_refund_sequence_prefix': fields.related('purchase_refund_journal_id', 'sequence_id', 'prefix', type='char', string='Supplier Refund Sequence'),
'purchase_refund_sequence_next': fields.related('purchase_refund_journal_id', 'sequence_id', 'number_next', type='integer', string='Next Supplier Refund Number'),
'purchase_refund_sequence_prefix': fields.related('purchase_refund_journal_id', 'sequence_id', 'prefix', type='char', string='Supplier Credit Note Sequence'),
'purchase_refund_sequence_next': fields.related('purchase_refund_journal_id', 'sequence_id', 'number_next', type='integer', string='Next Supplier Credit Note Number'),
'module_account_check_writing': fields.boolean('Support Check Writings',
'module_account_check_writing': fields.boolean('Check Writing',
help="""This allows you to check writing and printing.
This installs the module account_check_writing."""),
'module_account_accountant': fields.boolean('Accountant Features',
help="""This allows you to access all the accounting features, like the journal items and the chart of accounts.
This installs the module account_accountant."""),
help="""If you do not check this box, you will be able to do Invoicing & Payments, but not accounting (Journal Items, Chart of Accounts, ...)."""),
'module_account_asset': fields.boolean('Assets Management',
help="""This allows you to manage the assets owned by a company or a person.
It keeps track of the depreciation occurred on those assets, and creates account move for those depreciation lines.
This installs the module account_asset."""),
'module_account_budget': fields.boolean('Budgets Management',
This installs the module account_asset. If you do not check this box, you will be able to do invoicing & payments,
but not accounting (Journal Items, Chart of Accounts, ...) """),
'module_account_budget': fields.boolean('Budget Management',
help="""This allows accountants to manage analytic and crossovered budgets.
Once the master budgets and the budgets are defined,
the project managers can set the planned amount on each analytic account.
This installs the module account_budget."""),
'module_account_payment': fields.boolean('Supplier Payment Orders',
'module_account_payment': fields.boolean('Manage Payment Orders',
help="""This allows you to create and manage your payment orders, with purposes to
* serve as base for an easy plug-in of various automated payment mechanisms, and
* provide a more efficient way to manage invoice payments.
@ -97,17 +97,10 @@ class account_config_settings(osv.osv_memory):
'module_account_voucher': fields.boolean('Manage Customer Payments',
help="""This includes all the basic requirements of voucher entries for bank, cash, sales, purchase, expense, contra, etc.
This installs the module account_voucher."""),
'module_account_followup': fields.boolean('Customer Follow-Ups',
'module_account_followup': fields.boolean('Manage Customer Payment Follow-Ups',
help="""This allows to automate letters for unpaid invoices, with multi-level recalls.
This installs the module account_followup."""),
'module_account_analytic_plans': fields.boolean('Support Multiple Analytic Plans',
help="""This allows to use several analytic plans, according to the general journal.
This installs the module account_analytic_plans."""),
'module_account_analytic_default': fields.boolean('Rules for Analytic Assignation',
help="""Set default values for your analytic accounts.
Allows to automatically select analytic accounts based on criteria like product, partner, user, company, date.
This installs the module account_analytic_default."""),
'module_account_invoice_layout': fields.boolean('Allow notes and subtotals',
'module_account_invoice_layout': fields.boolean('Allow Notes and Subtotals',
help="""This provides some features to improve the layout of invoices.
It gives you the possibility to:
* order all the lines of an invoice
@ -118,9 +111,10 @@ class account_config_settings(osv.osv_memory):
'group_proforma_invoices': fields.boolean('Allow Pro-forma Invoices',
implied_group='account.group_proforma_invoices',
help="Allows you to put invoices in pro-forma state."),
'default_sale_tax': fields.many2one('account.tax', 'Default Sale Tax'),
'default_purchase_tax': fields.many2one('account.tax', 'Default Purchase Tax'),
'decimal_precision': fields.integer('Decimal Precision',
help="""Set the decimal precision for rounding results in accounting."""),
}
def _default_company(self, cr, uid, context=None):
@ -279,4 +273,13 @@ class account_config_settings(osv.osv_memory):
elif config.period == '3months':
fiscalyear.create_period3(cr, uid, [fiscalyear_id])
def get_default_dp(self, cr, uid, fields, context=None):
dp = self.pool.get('ir.model.data').get_object(cr, uid, 'product','decimal_account')
return {'decimal_precision': dp.digits}
def set_default_dp(self, cr, uid, ids, context=None):
config = self.browse(cr, uid, ids[0], context)
dp = self.pool.get('ir.model.data').get_object(cr, uid, 'product','decimal_account')
dp.write({'digits': config.decimal_precision})
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -22,16 +22,17 @@
</div>
<sheet layout="auto">
<field name="has_default_company" invisible="1" />
<field name="has_chart_of_accounts" invisible="1"/>
<field name="company_id" widget="selection" on_change="onchange_company_id(company_id)"
attrs="{'invisible': [('has_default_company', '=', True)]}"/>
<field name="expects_chart_of_accounts"/>
<field name="has_chart_of_accounts" invisible="1"/>
<group string="No Chart of Accounts exists for this Company" colspan="4" attrs="{'invisible': ['|', ('expects_chart_of_accounts','=',False), ('has_chart_of_accounts','=',True)]}">
<label string="Please select a chart template to install a chart of accounts." colspan="4"/>
<field name="chart_template_id" widget="selection" on_change="onchange_chart_template_id(chart_template_id)" domain="[('visible','=', True)]"/>
<button string="Install More Chart Templates" icon="gtk-go-forward"
name="%(open_account_charts_modules)d" type="action"/>
<newline/>
<field name ="code_digits" groups="account.group_account_user"/>
<field name ="seq_journal"/>
<newline/>
@ -56,22 +57,31 @@
<field name ="complete_tax_set" invisible="1"/>
<newline/>
<group colspan="2" col="2">
<field name="default_sale_tax" domain="[('type_tax_use','=','sale'), ('company_id','=',company_id)]"/>
<field name="default_sale_tax" domain="[('type_tax_use','=','sale'), ('company_id','=',company_id)]" attrs="{'invisible': [('has_chart_of_accounts','=',False)]}"/>
<field name="module_account_accountant"/>
<field name="module_account_asset"/>
</group>
<group colspan="2" col="2">
<field name="default_purchase_tax" domain="[('type_tax_use','=','purchase'), ('company_id','=',company_id)]"/>
<field name="default_purchase_tax" domain="[('type_tax_use','=','purchase'), ('company_id','=',company_id)]" attrs="{'invisible': [('has_chart_of_accounts','=',False)]}"/>
<field name="currency_id" widget="selection"/>
<field name="module_account_budget"/>
<field name="decimal_precision"/>
</group>
</group>
<group colspan="2" col="2">
<separator string="Customer Invoices" colspan="2"/>
<field name="sale_journal_id" invisible="1"/>
<field name="sale_sequence_next" attrs="{'readonly': [('sale_journal_id','=',False)]}"/>
<label string="Invoice Sequence" for="sale_sequence_prefix"/>
<group colspan="1" col="2">
<field name="sale_sequence_prefix" nolabel="1"/>
<field name="sale_sequence_next" nolabel="1" attrs="{'readonly': [('sale_journal_id','=',False)]}"/>
</group>
<field name="sale_refund_journal_id" invisible="1"/>
<field name="sale_refund_sequence_next" attrs="{'readonly': [('sale_refund_journal_id','=',False)]}"/>
<label string="Credit Note Sequence" for="sale_refund_sequence_prefix"/>
<group colspan="1" col="2">
<field name="sale_refund_sequence_prefix" nolabel="1"/>
<field name="sale_refund_sequence_next" nolabel="1" attrs="{'readonly': [('sale_refund_journal_id','=',False)]}"/>
</group>
<field name="module_account_invoice_layout"/>
<field name="module_account_voucher"/>
<field name="module_account_followup"/>
@ -80,9 +90,17 @@
<group colspan="2" col="2">
<separator string="Supplier Invoices" colspan="2"/>
<field name="purchase_journal_id" invisible="1"/>
<field name="purchase_sequence_next" attrs="{'readonly': [('purchase_journal_id','=',False)]}"/>
<label string="Supplier Invoice Sequence" for="purchase_sequence_prefix"/>
<group colspan="1" col="2">
<field name="purchase_sequence_prefix" nolabel="1"/>
<field name="purchase_sequence_next" nolabel="1" attrs="{'readonly': [('purchase_journal_id','=',False)]}"/>
</group>
<field name="purchase_refund_journal_id" invisible="1"/>
<field name="purchase_refund_sequence_next" attrs="{'readonly': [('purchase_refund_journal_id','=',False)]}"/>
<label string="Supplier Credit Note Sequence" for="purchase_refund_sequence_prefix"/>
<group colspan="1" col="2">
<field name="purchase_refund_sequence_prefix" nolabel="1"/>
<field name="purchase_refund_sequence_next" nolabel="1" attrs="{'readonly': [('purchase_refund_journal_id','=',False)]}"/>
</group>
<field name="module_account_payment"/>
</group>
<group colspan="2" col="2">
@ -96,11 +114,8 @@
<field name="company_footer"/>
<field name="module_account_check_writing"/>
</group>
<group colspan="2" col="2">
<separator string="Analytic Accounting" colspan="2"/>
<group name="analytic_accounting" colspan="2"/>
<field name="module_account_analytic_plans"/>
<field name="module_account_analytic_default"/>
<group name="analytic_accounting" colspan="4" invisible="1">
<separator string="Analytic Accounting" colspan="4"/>
</group>
</sheet>
</form>
@ -116,7 +131,7 @@
</record>
<menuitem id="menu_account_config" name="Accounting" parent="base.menu_config"
sequence="6" action="action_account_config"/>
sequence="14" action="action_account_config"/>
</data>
</openerp>

View File

@ -32,11 +32,11 @@ class account_invoice_refund(osv.osv_memory):
_name = "account.invoice.refund"
_description = "Invoice Refund"
_columns = {
'date': fields.date('Operation date', help='This date will be used as the invoice date for Refund Invoice and Period will be chosen accordingly!'),
'date': fields.date('Operation Date', help='This date will be used as the invoice date for credit note and period will be chosen accordingly!'),
'period': fields.many2one('account.period', 'Force period'),
'journal_id': fields.many2one('account.journal', 'Refund Journal', help='You can select here the journal to use for the refund invoice that will be created. If you leave that field empty, it will use the same journal as the current invoice.'),
'journal_id': fields.many2one('account.journal', 'Refund Journal', help='You can select here the journal to use for the credit note that will be created. If you leave that field empty, it will use the same journal as the current invoice.'),
'description': fields.char('Description', size=128, required=True),
'filter_refund': fields.selection([('refund', 'Create a draft Refund'), ('cancel', 'Cancel: refund invoice and reconcile'),('modify', 'Modify: refund invoice, reconcile and create a new draft invoice')], "Refund Method", required=True, help='Refund invoice base on this type. You can not Modify and Cancel if the invoice is already reconciled'),
'filter_refund': fields.selection([('refund', 'Create a draft refund'), ('cancel', 'Cancel: create credit note and reconcile'),('modify', 'Modify: create credit note, reconcile and create a new draft invoice')], "Refund Method", required=True, help='Credit note base on this type. You can not Modify and Cancel if the invoice is already reconciled'),
}
def _get_journal(self, cr, uid, context=None):

View File

@ -7,8 +7,8 @@
<field name="model">account.invoice.refund</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Refund Invoice">
<separator string="Refund Invoice Options" colspan="4"/>
<form string="Credit Note">
<separator string="Credit Note Options" colspan="4"/>
<group colspan="4" >
<field name="description"/>
<field name="journal_id" widget='selection'/>
@ -19,8 +19,8 @@
<separator colspan="4"/>
<group col="4" colspan="4" fill="1">
<label align="0.0" width="550" colspan="4" string="Modify Invoice: Cancels the current invoice and creates a new copy of it ready for editing."/>
<label align="0.0" width="300" string="Refund Invoice: Creates the refund invoice, ready for editing."/>
<label align="0.0" width="500" colspan="4" string="Cancel Invoice: Creates the refund invoice, validate and reconcile it to cancel the current invoice."/>
<label align="0.0" width="300" string="Credit Note: Creates the credit note, ready for editing."/>
<label align="0.0" width="500" colspan="4" string="Cancel Invoice: Creates the credit note, validate and reconcile it to cancel the current invoice."/>
</group>
<separator colspan="4"/>
<group colspan="4" col="6">

View File

@ -37,7 +37,7 @@ user rights to Demo user.
""",
'website': 'http://www.openerp.com',
'init_xml': [],
"depends" : ["account"],
"depends" : ["account_voucher"],
'update_xml': [
'security/account_security.xml',
'account_accountant_data.xml'

View File

@ -8,14 +8,14 @@ msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2012-02-08 01:37+0100\n"
"PO-Revision-Date: 2012-05-10 18:07+0000\n"
"Last-Translator: Raphael Collet (OpenERP) <Unknown>\n"
"PO-Revision-Date: 2012-05-16 19:05+0000\n"
"Last-Translator: Akira Hiyama <Unknown>\n"
"Language-Team: Japanese <ja@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-11 05:14+0000\n"
"X-Generator: Launchpad (build 15225)\n"
"X-Launchpad-Export-Date: 2012-05-17 04:37+0000\n"
"X-Generator: Launchpad (build 15259)\n"
#. module: account_asset
#: view:account.asset.asset:0
@ -196,7 +196,7 @@ msgstr "会計エントリーにおいて貸方または借方の値が誤って
#. module: account_asset
#: view:asset.asset.report:0 field:asset.asset.report,nbr:0
msgid "# of Depreciation Lines"
msgstr "減価償却行の番号"
msgstr "減価償却行の"
#. module: account_asset
#: view:asset.asset.report:0

View File

@ -0,0 +1,355 @@
# Thai 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-17 04:29+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Thai <th@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-18 04:40+0000\n"
"X-Generator: Launchpad (build 15259)\n"
#. module: account_invoice_layout
#: selection:account.invoice.line,state:0
msgid "Sub Total"
msgstr ""
#. module: account_invoice_layout
#: report:account.invoice.layout:0
#: report:notify_account.invoice:0
msgid "Note:"
msgstr ""
#. module: account_invoice_layout
#: report:account.invoice.layout:0
#: report:notify_account.invoice:0
msgid "Cancelled Invoice"
msgstr ""
#. module: account_invoice_layout
#: selection:account.invoice.line,state:0
#: field:notify.message,name:0
msgid "Title"
msgstr ""
#. module: account_invoice_layout
#: report:account.invoice.layout:0
#: report:notify_account.invoice:0
msgid "Disc. (%)"
msgstr ""
#. module: account_invoice_layout
#: selection:account.invoice.line,state:0
msgid "Note"
msgstr ""
#. module: account_invoice_layout
#: view:account.invoice.special.msg:0
msgid "Print"
msgstr ""
#. module: account_invoice_layout
#: help:notify.message,msg:0
msgid ""
"This notification will appear at the bottom of the Invoices when printed."
msgstr ""
#. module: account_invoice_layout
#: report:account.invoice.layout:0
#: report:notify_account.invoice:0
msgid "Unit Price"
msgstr ""
#. module: account_invoice_layout
#: model:ir.model,name:account_invoice_layout.model_notify_message
msgid "Notify By Messages"
msgstr ""
#. module: account_invoice_layout
#: report:account.invoice.layout:0
#: report:notify_account.invoice:0
msgid "VAT :"
msgstr ""
#. module: account_invoice_layout
#: report:account.invoice.layout:0
#: report:notify_account.invoice:0
msgid "Tel. :"
msgstr ""
#. module: account_invoice_layout
#: report:account.invoice.layout:0
#: report:notify_account.invoice:0
msgid "PRO-FORMA"
msgstr ""
#. module: account_invoice_layout
#: field:account.invoice,abstract_line_ids:0
msgid "Invoice Lines"
msgstr ""
#. module: account_invoice_layout
#: view:account.invoice.line:0
msgid "Seq."
msgstr ""
#. module: account_invoice_layout
#: model:ir.ui.menu,name:account_invoice_layout.menu_finan_config_notify_message
msgid "Notification Message"
msgstr ""
#. module: account_invoice_layout
#: report:account.invoice.layout:0
msgid "Customer Code"
msgstr ""
#. module: account_invoice_layout
#: report:account.invoice.layout:0
#: report:notify_account.invoice:0
msgid "Description"
msgstr ""
#. module: account_invoice_layout
#: help:account.invoice.line,sequence:0
msgid "Gives the sequence order when displaying a list of invoice lines."
msgstr ""
#. module: account_invoice_layout
#: report:account.invoice.layout:0
#: report:notify_account.invoice:0
msgid "Price"
msgstr ""
#. module: account_invoice_layout
#: report:account.invoice.layout:0
#: report:notify_account.invoice:0
msgid "Invoice Date"
msgstr ""
#. module: account_invoice_layout
#: report:account.invoice.layout:0
msgid "Taxes:"
msgstr ""
#. module: account_invoice_layout
#: field:account.invoice.line,functional_field:0
msgid "Source Account"
msgstr ""
#. module: account_invoice_layout
#: model:ir.actions.act_window,name:account_invoice_layout.notify_mesage_tree_form
msgid "Write Messages"
msgstr ""
#. module: account_invoice_layout
#: report:account.invoice.layout:0
#: report:notify_account.invoice:0
msgid "Base"
msgstr ""
#. module: account_invoice_layout
#: selection:account.invoice.line,state:0
msgid "Page Break"
msgstr ""
#. module: account_invoice_layout
#: view:notify.message:0
#: field:notify.message,msg:0
msgid "Special Message"
msgstr ""
#. module: account_invoice_layout
#: help:account.invoice.special.msg,message:0
msgid "Message to Print at the bottom of report"
msgstr ""
#. module: account_invoice_layout
#: report:account.invoice.layout:0
#: report:notify_account.invoice:0
msgid "Quantity"
msgstr ""
#. module: account_invoice_layout
#: report:account.invoice.layout:0
#: report:notify_account.invoice:0
msgid "Refund"
msgstr ""
#. module: account_invoice_layout
#: report:account.invoice.layout:0
#: report:notify_account.invoice:0
msgid "Fax :"
msgstr ""
#. module: account_invoice_layout
#: report:account.invoice.layout:0
msgid "Total:"
msgstr ""
#. module: account_invoice_layout
#: view:account.invoice.special.msg:0
msgid "Select Message"
msgstr ""
#. module: account_invoice_layout
#: view:notify.message:0
msgid "Messages"
msgstr ""
#. module: account_invoice_layout
#: selection:account.invoice.line,state:0
msgid "Product"
msgstr ""
#. module: account_invoice_layout
#: report:account.invoice.layout:0
#: report:notify_account.invoice:0
msgid "Description / Taxes"
msgstr ""
#. module: account_invoice_layout
#: report:account.invoice.layout:0
#: report:notify_account.invoice:0
msgid "Amount"
msgstr ""
#. module: account_invoice_layout
#: model:notify.message,msg:account_invoice_layout.demo_message1
msgid "ERP & CRM Solutions..."
msgstr ""
#. module: account_invoice_layout
#: report:notify_account.invoice:0
msgid "Net Total :"
msgstr ""
#. module: account_invoice_layout
#: report:notify_account.invoice:0
msgid "Total :"
msgstr ""
#. module: account_invoice_layout
#: report:account.invoice.layout:0
#: report:notify_account.invoice:0
msgid "Draft Invoice"
msgstr ""
#. module: account_invoice_layout
#: field:account.invoice.line,sequence:0
msgid "Sequence Number"
msgstr ""
#. module: account_invoice_layout
#: model:ir.model,name:account_invoice_layout.model_account_invoice_special_msg
msgid "Account Invoice Special Message"
msgstr ""
#. module: account_invoice_layout
#: report:account.invoice.layout:0
#: report:notify_account.invoice:0
msgid "Origin"
msgstr ""
#. module: account_invoice_layout
#: sql_constraint:account.invoice:0
msgid "Invoice Number must be unique per Company!"
msgstr ""
#. module: account_invoice_layout
#: selection:account.invoice.line,state:0
msgid "Separator Line"
msgstr ""
#. module: account_invoice_layout
#: report:notify_account.invoice:0
msgid "Your Reference"
msgstr ""
#. module: account_invoice_layout
#: report:account.invoice.layout:0
#: report:notify_account.invoice:0
msgid "Supplier Invoice"
msgstr ""
#. module: account_invoice_layout
#: model:ir.actions.report.xml,name:account_invoice_layout.account_invoices_1
msgid "Invoices"
msgstr ""
#. module: account_invoice_layout
#: constraint:account.invoice:0
msgid "Invalid BBA Structured Communication !"
msgstr ""
#. module: account_invoice_layout
#: report:account.invoice.layout:0
#: report:notify_account.invoice:0
msgid "Tax"
msgstr ""
#. module: account_invoice_layout
#: model:ir.model,name:account_invoice_layout.model_account_invoice_line
msgid "Invoice Line"
msgstr ""
#. module: account_invoice_layout
#: report:account.invoice.layout:0
msgid "Net Total:"
msgstr ""
#. module: account_invoice_layout
#: model:ir.actions.act_window,name:account_invoice_layout.action_account_invoice_special_msg
#: model:ir.actions.report.xml,name:account_invoice_layout.account_invoices_layout_message
msgid "Invoices and Message"
msgstr ""
#. module: account_invoice_layout
#: field:account.invoice.line,state:0
msgid "Type"
msgstr ""
#. module: account_invoice_layout
#: view:notify.message:0
msgid "Write a notification or a wishful message."
msgstr ""
#. module: account_invoice_layout
#: report:account.invoice.layout:0
#: model:ir.model,name:account_invoice_layout.model_account_invoice
#: report:notify_account.invoice:0
msgid "Invoice"
msgstr ""
#. module: account_invoice_layout
#: view:account.invoice.special.msg:0
msgid "Cancel"
msgstr ""
#. module: account_invoice_layout
#: report:account.invoice.layout:0
#: report:notify_account.invoice:0
msgid "Supplier Refund"
msgstr ""
#. module: account_invoice_layout
#: field:account.invoice.special.msg,message:0
msgid "Message"
msgstr ""
#. module: account_invoice_layout
#: report:notify_account.invoice:0
msgid "Taxes :"
msgstr ""
#. module: account_invoice_layout
#: model:ir.ui.menu,name:account_invoice_layout.menu_notify_mesage_tree_form
msgid "All Notification Messages"
msgstr ""

View File

@ -8,14 +8,14 @@ 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-15 04:40+0000\n"
"PO-Revision-Date: 2012-05-15 06:19+0000\n"
"Last-Translator: Akira Hiyama <Unknown>\n"
"Language-Team: Japanese <ja@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-15 04:51+0000\n"
"X-Generator: Launchpad (build 15238)\n"
"X-Launchpad-Export-Date: 2012-05-16 04:50+0000\n"
"X-Generator: Launchpad (build 15247)\n"
#. module: account_payment
#: field:payment.order,date_scheduled:0
@ -64,7 +64,7 @@ msgid ""
msgstr ""
"オーダーがなされた時に状態はドラフトになります。\n"
" 銀行により確認されると状態は確認済となります。\n"
" そしてオーダーの支払がなされると状態は了となります。"
" そしてオーダーの支払がなされると状態は了となります。"
#. module: account_payment
#: help:account.invoice,amount_to_pay:0
@ -556,7 +556,7 @@ msgstr "一般情報"
#: view:payment.order:0
#: selection:payment.order,state:0
msgid "Done"
msgstr "了"
msgstr "了"
#. module: account_payment
#: model:ir.model,name:account_payment.model_account_invoice

View File

@ -8,14 +8,14 @@ msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2012-02-08 01:37+0100\n"
"PO-Revision-Date: 2012-05-15 04:42+0000\n"
"PO-Revision-Date: 2012-05-16 19:07+0000\n"
"Last-Translator: Akira Hiyama <Unknown>\n"
"Language-Team: Japanese <ja@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-15 04:51+0000\n"
"X-Generator: Launchpad (build 15238)\n"
"X-Launchpad-Export-Date: 2012-05-17 04:36+0000\n"
"X-Generator: Launchpad (build 15259)\n"
#. module: account_voucher
#: view:sale.receipt.report:0
@ -364,7 +364,7 @@ msgstr "会社名は固有でなければいけません。"
#. module: account_voucher
#: view:sale.receipt.report:0 field:sale.receipt.report,nbr:0
msgid "# of Voucher Lines"
msgstr "バウチャー行の番号"
msgstr "バウチャー行の"
#. module: account_voucher
#: view:sale.receipt.report:0 field:sale.receipt.report,type:0

284
addons/analytic/i18n/ja.po Normal file
View File

@ -0,0 +1,284 @@
# Japanese 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-15 06:05+0000\n"
"Last-Translator: Akira Hiyama <Unknown>\n"
"Language-Team: Japanese <ja@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-16 04:50+0000\n"
"X-Generator: Launchpad (build 15247)\n"
#. module: analytic
#: field:account.analytic.account,child_ids:0
msgid "Child Accounts"
msgstr "子アカウント"
#. module: analytic
#: field:account.analytic.account,name:0
msgid "Account Name"
msgstr "アカウント名"
#. module: analytic
#: help:account.analytic.line,unit_amount:0
msgid "Specifies the amount of quantity to count."
msgstr "数えた数量の指定"
#. module: analytic
#: field:account.analytic.account,state:0
msgid "State"
msgstr "状態"
#. module: analytic
#: field:account.analytic.account,user_id:0
msgid "Account Manager"
msgstr "会計マネジャ"
#. module: analytic
#: selection:account.analytic.account,state:0
msgid "Closed"
msgstr "閉じた"
#. module: analytic
#: field:account.analytic.account,debit:0
msgid "Debit"
msgstr "借方"
#. module: analytic
#: help:account.analytic.account,state:0
msgid ""
"* When an account is created its in 'Draft' state. "
" \n"
"* If any associated partner is there, it can be in 'Open' state. "
" \n"
"* If any pending balance is there it can be in 'Pending'. "
" \n"
"* And finally when all the transactions are over, it can be in 'Close' "
"state. \n"
"* The project can be in either if the states 'Template' and 'Running'.\n"
" If it is template then we can make projects based on the template projects. "
"If its in 'Running' state it is a normal project. "
" \n"
" If it is to be reviewed then the state is 'Pending'.\n"
" When the project is completed the state is set to 'Done'."
msgstr ""
"・ アカウントが作成されると、それはドラフト状態です。\n"
"・ 関連するパートナがいると、それは開く状態になります。\n"
"・ 保留中残高が存在すると、それは保留中状態になります。\n"
"・ 最終的に全ての取引が終了すると、それは閉じる状態になります。\n"
"・ プロジェクトの状態はテンプレートや実行中にもなります。\n"
" テンプレートであれば、そこでテンプレートプロジェクトを元にしたプロジェクトを作成できます。それが実行中状態であれば、それは通常プロジェクトです。\n"
" それがレビューされると、保留中状態になります。\n"
" プロジェクトが完了した時に、完了状態にセットされます。"
#. module: analytic
#: selection:account.analytic.account,state:0
msgid "New"
msgstr "新規"
#. module: analytic
#: field:account.analytic.account,type:0
msgid "Account Type"
msgstr "アカウントタイプ"
#. module: analytic
#: selection:account.analytic.account,state:0
msgid "Pending"
msgstr "保留中"
#. module: analytic
#: model:ir.model,name:analytic.model_account_analytic_line
msgid "Analytic Line"
msgstr "分析行"
#. module: analytic
#: field:account.analytic.account,description:0
#: field:account.analytic.line,name:0
msgid "Description"
msgstr "詳細"
#. module: analytic
#: selection:account.analytic.account,type:0
msgid "Normal"
msgstr "通常"
#. module: analytic
#: field:account.analytic.account,company_id:0
#: field:account.analytic.line,company_id:0
msgid "Company"
msgstr "会社"
#. module: analytic
#: code:addons/analytic/analytic.py:138
#, python-format
msgid ""
"If you set a company, the currency selected has to be the same as it's "
"currency. \n"
"You can remove the company belonging, and thus change the currency, only on "
"analytic account of type 'view'. This can be really usefull for "
"consolidation purposes of several companies charts with different "
"currencies, for example."
msgstr ""
"会社を設定した場合、選択した通貨は会社の通貨と同じである必要があります。\n"
"タイプがビューである分析アカウント上でのみ、所属会社を削除して通貨を変更することができます。これは例えば、異なる通貨である複数の会社チャートを連結する目的"
"のために非常に役立ちます。"
#. module: analytic
#: field:account.analytic.line,user_id:0
msgid "User"
msgstr "ユーザ"
#. module: analytic
#: field:account.analytic.account,parent_id:0
msgid "Parent Analytic Account"
msgstr "パートナ分析アカウント"
#. module: analytic
#: field:account.analytic.line,date:0
msgid "Date"
msgstr "日付"
#. module: analytic
#: selection:account.analytic.account,state:0
msgid "Template"
msgstr "テンプレート"
#. module: analytic
#: field:account.analytic.account,quantity:0
#: field:account.analytic.line,unit_amount:0
msgid "Quantity"
msgstr "数量"
#. module: analytic
#: help:account.analytic.line,amount:0
msgid ""
"Calculated by multiplying the quantity and the price given in the Product's "
"cost price. Always expressed in the company main currency."
msgstr "数量と製品の原価価格を乗算して計算されます。いつも会社の主な通貨で表現されます。"
#. module: analytic
#: field:account.analytic.account,child_complete_ids:0
msgid "Account Hierarchy"
msgstr "アカウント階層"
#. module: analytic
#: help:account.analytic.account,quantity_max:0
msgid "Sets the higher limit of time to work on the contract."
msgstr "契約上の動作上限時間を設定して下さい。"
#. module: analytic
#: field:account.analytic.account,credit:0
msgid "Credit"
msgstr "貸方"
#. module: analytic
#: field:account.analytic.line,amount:0
msgid "Amount"
msgstr "金額"
#. module: analytic
#: field:account.analytic.account,contact_id:0
msgid "Contact"
msgstr "連絡先"
#. module: analytic
#: field:account.analytic.account,code:0
msgid "Code/Reference"
msgstr "コード / 参照"
#. module: analytic
#: selection:account.analytic.account,state:0
msgid "Cancelled"
msgstr "キャンセル済"
#. module: analytic
#: code:addons/analytic/analytic.py:138
#, python-format
msgid "Error !"
msgstr "エラー"
#. module: analytic
#: field:account.analytic.account,balance:0
msgid "Balance"
msgstr "残高"
#. module: analytic
#: constraint:account.analytic.account:0
msgid "Error! You can not create recursive analytic accounts."
msgstr "エラー。反復した分析アカウントを作ることはできません。"
#. module: analytic
#: help:account.analytic.account,type:0
msgid ""
"If you select the View Type, it means you won't allow to create journal "
"entries using that account."
msgstr "ビュータイプを選択した場合、このアカウントを使って仕訳帳エントリーは作ることができません。"
#. module: analytic
#: field:account.analytic.account,date:0
msgid "Date End"
msgstr "終了日"
#. module: analytic
#: field:account.analytic.account,quantity_max:0
msgid "Maximum Time"
msgstr "上限時間"
#. module: analytic
#: model:res.groups,name:analytic.group_analytic_accounting
msgid "Analytic Accounting"
msgstr "分析会計"
#. module: analytic
#: field:account.analytic.account,complete_name:0
msgid "Full Account Name"
msgstr "フルアカウント名"
#. module: analytic
#: field:account.analytic.line,account_id:0
#: model:ir.model,name:analytic.model_account_analytic_account
msgid "Analytic Account"
msgstr "分析アカウント"
#. module: analytic
#: field:account.analytic.account,currency_id:0
msgid "Currency"
msgstr "通貨"
#. module: analytic
#: constraint:account.analytic.line:0
msgid "You can not create analytic line on view account."
msgstr "ビューアカウントでは分析行を作ることはできません。"
#. module: analytic
#: selection:account.analytic.account,type:0
msgid "View"
msgstr "ビュー"
#. module: analytic
#: field:account.analytic.account,partner_id:0
msgid "Partner"
msgstr "パートナ"
#. module: analytic
#: field:account.analytic.account,date_start:0
msgid "Date Start"
msgstr "開始日"
#. module: analytic
#: selection:account.analytic.account,state:0
msgid "Open"
msgstr "開く"
#. module: analytic
#: field:account.analytic.account,line_ids:0
msgid "Analytic Entries"
msgstr "分析エントリー"

View File

@ -17,6 +17,6 @@
<record id="group_analytic_accounting" model="res.groups">
<field name="name">Analytic Accounting</field>
<field name="category_id" ref="base.module_category_usability"/>
<field name="category_id" ref="base.module_category_hidden"/>
</record>
</data></openerp>

View File

@ -0,0 +1,213 @@
# Japanese 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-16 02:18+0000\n"
"Last-Translator: Akira Hiyama <Unknown>\n"
"Language-Team: Japanese <ja@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-17 04:36+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 ""
#. module: anonymization
#: field:ir.model.fields.anonymization,field_name:0
msgid "Field Name"
msgstr "項目名"
#. module: anonymization
#: field:ir.model.fields.anonymization,field_id:0
msgid "Field"
msgstr "項目"
#. module: anonymization
#: field:ir.model.fields.anonymization.history,state:0
#: field:ir.model.fields.anonymize.wizard,state:0
msgid "State"
msgstr "状態"
#. module: anonymization
#: field:ir.model.fields.anonymize.wizard,file_import:0
msgid "Import"
msgstr "インポート"
#. module: anonymization
#: model:ir.model,name:anonymization.model_ir_model_fields_anonymization
msgid "ir.model.fields.anonymization"
msgstr ""
#. module: anonymization
#: field:ir.model.fields.anonymization.history,direction:0
msgid "Direction"
msgstr "指示"
#. 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 "匿名項目"
#. module: anonymization
#: model:ir.ui.menu,name:anonymization.menu_administration_anonymization
msgid "Database anonymization"
msgstr "データベースの匿名化"
#. module: anonymization
#: selection:ir.model.fields.anonymization.history,direction:0
msgid "clear -> anonymized"
msgstr "クリア -> 匿名"
#. module: anonymization
#: selection:ir.model.fields.anonymization,state:0
#: selection:ir.model.fields.anonymize.wizard,state:0
msgid "Anonymized"
msgstr "匿名化"
#. module: anonymization
#: field:ir.model.fields.anonymization,state:0
msgid "unknown"
msgstr "不明"
#. module: anonymization
#: field:ir.model.fields.anonymization,model_id:0
msgid "Object"
msgstr "オブジェクト"
#. module: anonymization
#: field:ir.model.fields.anonymization.history,filepath:0
msgid "File path"
msgstr "ファイルパス"
#. module: anonymization
#: field:ir.model.fields.anonymization.history,date:0
msgid "Date"
msgstr "日付"
#. module: anonymization
#: field:ir.model.fields.anonymize.wizard,file_export:0
msgid "Export"
msgstr "エクスポート"
#. module: anonymization
#: view:ir.model.fields.anonymize.wizard:0
msgid "Reverse the Database Anonymization"
msgstr "逆データベース匿名化"
#. module: anonymization
#: view:ir.model.fields.anonymize.wizard:0
msgid "Database Anonymization"
msgstr "データベース匿名化"
#. module: anonymization
#: model:ir.ui.menu,name:anonymization.menu_administration_anonymization_wizard
msgid "Anonymize database"
msgstr "匿名化データベース"
#. module: anonymization
#: view:ir.model.fields.anonymization.history:0
#: field:ir.model.fields.anonymization.history,field_ids:0
msgid "Fields"
msgstr "項目"
#. module: anonymization
#: selection:ir.model.fields.anonymization,state:0
#: selection:ir.model.fields.anonymize.wizard,state:0
msgid "Clear"
msgstr "クリア"
#. module: anonymization
#: view:ir.model.fields.anonymize.wizard:0
#: field:ir.model.fields.anonymize.wizard,summary:0
msgid "Summary"
msgstr "要約"
#. module: anonymization
#: view:ir.model.fields.anonymization:0
msgid "Anonymized Field"
msgstr "匿名化項目"
#. module: anonymization
#: selection:ir.model.fields.anonymize.wizard,state:0
msgid "Unstable"
msgstr "不安定"
#. module: anonymization
#: selection:ir.model.fields.anonymization.history,state:0
msgid "Exception occured"
msgstr "例外発生"
#. module: anonymization
#: selection:ir.model.fields.anonymization,state:0
#: selection:ir.model.fields.anonymize.wizard,state:0
msgid "Not Existing"
msgstr "未存在"
#. module: anonymization
#: field:ir.model.fields.anonymization,model_name:0
msgid "Object Name"
msgstr "オブジェクト名"
#. 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 "匿名化履歴"
#. module: anonymization
#: model:ir.model,name:anonymization.model_ir_model_fields_anonymization_history
msgid "ir.model.fields.anonymization.history"
msgstr ""
#. 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 "匿名化データベース"
#. module: anonymization
#: field:ir.model.fields.anonymize.wizard,name:0
msgid "File Name"
msgstr "ファイル名"
#. 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 "開始済"
#. module: anonymization
#: selection:ir.model.fields.anonymization.history,state:0
msgid "Done"
msgstr "完了"
#. 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 "メッセージ"
#. 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 "同じオブジェクトでは同じ名前の項目を複数持てません。"

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

@ -8,14 +8,14 @@ msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2011-01-11 11:14+0000\n"
"PO-Revision-Date: 2012-04-08 06:15+0000\n"
"Last-Translator: Masaki Yamaya <Unknown>\n"
"PO-Revision-Date: 2012-05-16 18:27+0000\n"
"Last-Translator: Akira Hiyama <Unknown>\n"
"Language-Team: Japanese <ja@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-04-09 04:56+0000\n"
"X-Generator: Launchpad (build 15060)\n"
"X-Launchpad-Export-Date: 2012-05-17 04:36+0000\n"
"X-Generator: Launchpad (build 15259)\n"
#. module: association
#: field:profile.association.config.install_modules_wizard,wiki:0
@ -35,7 +35,7 @@ msgstr "物事を完了"
#. module: association
#: model:ir.module.module,description:association.module_meta_information
msgid "This module is to create Profile for Associates"
msgstr ""
msgstr "このモジュールは協会のためのプロファイルを作成します。"
#. module: association
#: field:profile.association.config.install_modules_wizard,progress:0
@ -47,7 +47,7 @@ msgstr "設定を進行中"
msgid ""
"Here are specific applications related to the Association Profile you "
"selected."
msgstr ""
msgstr "ここでは選択した協会のプロファイルに関連する特別なアプリケーションです。"
#. module: association
#: view:profile.association.config.install_modules_wizard:0
@ -57,7 +57,7 @@ msgstr "タイトル"
#. module: association
#: help:profile.association.config.install_modules_wizard,event_project:0
msgid "Helps you to manage and organize your events."
msgstr ""
msgstr "イベントの管理と整理を助けます。"
#. module: association
#: field:profile.association.config.install_modules_wizard,config_logo:0
@ -69,7 +69,7 @@ msgstr "画像"
msgid ""
"Tracks and manages employee expenses, and can automatically re-invoice "
"clients if the expenses are project-related."
msgstr ""
msgstr "従業員の費用を追跡管理します。費用がプロジェクト関連である場合、顧客に自動的に再度の請求書を送ります。"
#. module: association
#: help:profile.association.config.install_modules_wizard,project_gtd:0
@ -77,41 +77,42 @@ msgid ""
"GTD is a methodology to efficiently organise yourself and your tasks. This "
"module fully integrates GTD principle with OpenERP's project management."
msgstr ""
"GTDは自分自身と自分のタスクを効果的に整理する方法です。このモジュールはOpenERPのプロジェクト管理とGDTの原理を完全に統合しています。"
#. module: association
#: view:profile.association.config.install_modules_wizard:0
msgid "Resources Management"
msgstr ""
msgstr "資源管理"
#. module: association
#: model:ir.module.module,shortdesc:association.module_meta_information
msgid "Association profile"
msgstr ""
msgstr "協会プロファイル"
#. module: association
#: field:profile.association.config.install_modules_wizard,hr_expense:0
msgid "Expenses Tracking"
msgstr ""
msgstr "費用追跡"
#. module: association
#: model:ir.actions.act_window,name:association.action_config_install_module
#: view:profile.association.config.install_modules_wizard:0
msgid "Association Application Configuration"
msgstr ""
msgstr "協会アプリケーション設定"
#. module: association
#: help:profile.association.config.install_modules_wizard,wiki:0
msgid ""
"Lets you create wiki pages and page groups in order to keep track of "
"business knowledge and share it with and between your employees."
msgstr ""
msgstr "ビジネス知識を記録し追跡して、それを従業員の間で共有するために、Wikiページとページグループの作成ができます。"
#. module: association
#: help:profile.association.config.install_modules_wizard,project:0
msgid ""
"Helps you manage your projects and tasks by tracking them, generating "
"plannings, etc..."
msgstr ""
msgstr "プロジェクトやタスクを追跡,計画生成などすることにより、あなたのプロジェクトとタスクの管理を補助します。"
#. module: association
#: model:ir.model,name:association.model_profile_association_config_install_modules_wizard
@ -121,15 +122,15 @@ msgstr ""
#. module: association
#: field:profile.association.config.install_modules_wizard,event_project:0
msgid "Events"
msgstr ""
msgstr "イベント"
#. module: association
#: view:profile.association.config.install_modules_wizard:0
#: field:profile.association.config.install_modules_wizard,project:0
msgid "Project Management"
msgstr ""
msgstr "プロジェクト管理"
#. module: association
#: view:profile.association.config.install_modules_wizard:0
msgid "Configure"
msgstr ""
msgstr "設定"

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

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>

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