[MERGE]: merge with lp:~openerp-dev/openobject-addons/trunk-dev-addons3

bzr revid: atp@tinyerp.co.in-20100526055806-uue6l3uxwlwygk2u
This commit is contained in:
atp (Open ERP) 2010-05-26 11:28:06 +05:30
commit 0f259586eb
370 changed files with 17003 additions and 6039 deletions

View File

@ -32,5 +32,6 @@ import report
import product
import sequence
import company
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -107,8 +107,11 @@ module named account_voucherss
'company_view.xml',
'account_installer.xml',
'report/account_invoice_report_view.xml',
'report/account_entries_report_view.xml',
'report/account_report_view.xml',
'report/account_analytic_report_view.xml',
'report/account_account_report_view.xml',
'report/account_analytic_entries_report_view.xml'
],
'demo_xml': [
#'demo/price_accuracy00.yml',

View File

@ -171,6 +171,19 @@ class account_account(osv.osv):
_description = "Account"
_parent_store = True
def _get_children_and_consol(self, cr, uid, ids, context={}):
ids2=[]
temp=[]
read_data= self.read(cr, uid, ids,['id','child_id'], context)
for data in read_data:
ids2.append(data['id'])
if data['child_id']:
temp=[]
for x in data['child_id']:
temp.append(x)
ids2 += self._get_children_and_consol(cr, uid, temp, context)
return ids2
def search(self, cr, uid, args, offset=0, limit=None, order=None,
context=None, count=False):
if context is None:
@ -297,6 +310,17 @@ class account_account(osv.osv):
return result
def _get_level(self, cr, uid, ids, field_name, arg, context={}):
res={}
accounts = self.browse(cr, uid, ids)
for account in accounts:
level = 0
if account.parent_id :
obj = self.browse(cr, uid, account.parent_id.id)
level = obj.level + 1
res[account.id] = level
return res
_columns = {
'name': fields.char('Name', size=128, required=True, select=True),
'currency_id': fields.many2one('res.currency', 'Secondary Currency', help="Forces all moves for this account to have this secondary currency."),
@ -343,6 +367,7 @@ class account_account(osv.osv):
'check_history': fields.boolean('Display History',
help="Check this box if you want to print all entries when printing the General Ledger, "\
"otherwise it will only print its balance."),
'level': fields.function(_get_level, string='Level', method=True, store=True, type='integer'),
}
def _default_company(self, cr, uid, context={}):
@ -892,7 +917,7 @@ class account_move(osv.osv):
'to_check': fields.boolean('To Be Verified'),
'partner_id': fields.related('line_id', 'partner_id', type="many2one", relation="res.partner", string="Partner"),
'amount': fields.function(_amount_compute, method=True, string='Amount', digits_compute=dp.get_precision('Account'), type='float', fnct_search=_search_amount),
'date': fields.date('Date', required=True),
'date': fields.date('Date', required=True, states={'posted':[('readonly',True)]}),
'type': fields.selection([
('pay_voucher','Cash Payment'),
('bank_pay_voucher','Bank Payment'),

View File

@ -42,8 +42,8 @@ class account_analytic_line(osv.osv):
}
_defaults = {
'date': lambda *a: time.strftime('%Y-%m-%d'),
'company_id': lambda self,cr,uid,context: self.pool.get('res.company')._company_default_get(cr, uid, 'account.analytic.line', context=context),
}
'company_id': lambda self,cr,uid,c: self.pool.get('res.company')._company_default_get(cr, uid, 'account.analytic.line', context=c),
}
_order = 'date'
def search(self, cr, uid, args, offset=0, limit=None, order=None, context=None, count=False):
@ -167,7 +167,7 @@ class res_partner(osv.osv):
_columns = {
'contract_ids': fields.one2many('account.analytic.account', \
'partner_id', 'Contracts'),
'partner_id', 'Contracts', readonly=True),
}
res_partner()

View File

@ -630,7 +630,7 @@ class account_bank_statement_line(osv.osv):
'statement_id': fields.many2one('account.bank.statement', 'Statement',
select=True, required=True, ondelete='cascade'),
'reconcile_id': fields.many2one('account.bank.statement.reconcile',
'Reconcile', states={'confirm':[('readonly',True)]}),
'Reconcile'),
'move_ids': fields.many2many('account.move',
'account_bank_statement_line_move_rel', 'move_id','statement_id',
'Moves'),

View File

@ -141,23 +141,23 @@
<field name="priority">2</field>
<field name="arch" type="xml">
<form string="Supplier invoice">
<group col="8" colspan="4">
<field domain="[('type', '=', 'purchase')]" name="journal_id"/>
<field name="number" readonly="1"/>
<field name="type" invisible="1"/>
<field name="currency_id" domain="[('company_id','=', company_id)]" on_change="onchange_currency_id(currency_id, company_id)" width="50"/>
<button name="%(action_account_change_currency)d" type="action" icon="gtk-apply" string="Change Currency"/>
<newline/>
<field name="partner_id" domain="[('supplier','=', 1)]" on_change="onchange_partner_id(type,partner_id,date_invoice,payment_term, partner_bank,company_id)" context="{'default_customer': 0}"/>
<field domain="[('partner_id','=',partner_id)]" name="address_invoice_id"/>
<field name="fiscal_position" groups="base.group_extended" widget="selection"/>
<newline/>
<field name="date_invoice"/>
<field name="period_id" groups="base.group_user"/>
<group colspan="2" col="1" groups="base.group_user">
<label align="0.0" string="(keep empty to use the current period)"/>
</group>
</group>
<group col="8" colspan="4">
<field domain="[('type', '=', 'purchase')]" name="journal_id"/>
<field name="number" readonly="1"/>
<field name="type" invisible="1"/>
<field name="currency_id" domain="[('company_id','=', company_id)]" on_change="onchange_currency_id(currency_id, company_id)" width="50"/>
<button name="%(action_account_change_currency)d" type="action" icon="gtk-apply" string="Change Currency"/>
<newline/>
<field name="partner_id" domain="[('supplier','=', 1)]" on_change="onchange_partner_id(type,partner_id,date_invoice,payment_term, partner_bank,company_id)" context="{'default_customer': 0}"/>
<field domain="[('partner_id','=',partner_id)]" name="address_invoice_id"/>
<field name="fiscal_position" groups="base.group_extended" widget="selection"/>
<newline/>
<field name="date_invoice"/>
<field name="period_id" groups="base.group_user"/>
<group colspan="2" col="1" groups="base.group_user">
<label align="0.0" string="(keep empty to use the current period)"/>
</group>
</group>
<notebook colspan="4">
<page string="Invoice">
<field domain="[('type','&lt;&gt;','view'), ('company_id', '=', company_id),('journal_id','=',journal_id)]" name="account_id" groups="base.group_user"/>
@ -201,12 +201,12 @@
<field name="state"/>
<field name="residual"/>
<group col="3" colspan="4">
<button name="invoice_open" states="draft,proforma2" string="Validate" icon="gtk-apply"/>
<button name="%(action_account_invoice_pay)d" type='action' string='Pay Invoice' states='open' icon="gtk-ok"/>
<button name="invoice_cancel" states="draft,proforma2,sale,open" string="Cancel" icon="gtk-cancel"/>
<button name="action_cancel_draft" states="cancel" string="Set to Draft" type="object" icon="gtk-convert"/>
<button name="%(action_account_state_open)d" type='action' string='Re-Open' states='paid' icon="gtk-convert"/>
<button name="%(action_account_invoice_refund)d" type='action' string='Credit Note' states='paid' icon="gtk-execute"/>
<button name="invoice_open" states="draft,proforma2" string="Validate" icon="gtk-apply"/>
<button name="%(action_account_invoice_pay)d" type='action' string='Pay Invoice' states='open' icon="gtk-ok"/>
<button name="invoice_cancel" states="draft,proforma2,sale,open" string="Cancel" icon="gtk-cancel"/>
<button name="action_cancel_draft" states="cancel" string="Set to Draft" type="object" icon="gtk-convert"/>
<button name="%(action_account_state_open)d" type='action' string='Re-Open' states='paid' icon="gtk-convert"/>
<button name="%(action_account_invoice_refund)d" type='action' string='Credit Note' states='paid' icon="gtk-execute"/>
</group>
</group>
</page>
@ -250,23 +250,23 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Invoice">
<group colspan="4" col="8">
<field name="journal_id" groups="base.group_user"/>
<field name="number"/>
<field name="type" invisible="1"/>
<field name="currency_id" domain="[('company_id','=', company_id)]" on_change="onchange_currency_id(currency_id, company_id)" width="50"/>
<button name="%(action_account_change_currency)d" type="action" icon="gtk-apply" string="Change Currency"/>
<newline/>
<field name="partner_id" on_change="onchange_partner_id(type,partner_id,date_invoice,payment_term, partner_bank,company_id)" groups="base.group_user"/>
<field domain="[('partner_id','=',partner_id)]" name="address_invoice_id"/>
<field name="fiscal_position" groups="base.group_extended" widget="selection"/>
<newline/>
<field name="date_invoice"/>
<field name="period_id" groups="base.group_user"/>
<group colspan="2" col="1" groups="base.group_user">
<label align="0.0" string="(keep empty to use the current period)"/>
</group>
</group>
<group colspan="4" col="8">
<field name="journal_id" groups="base.group_user"/>
<field name="number"/>
<field name="type" invisible="1"/>
<field name="currency_id" domain="[('company_id','=', company_id)]" on_change="onchange_currency_id(currency_id, company_id)" width="50"/>
<button name="%(action_account_change_currency)d" type="action" icon="gtk-apply" string="Change Currency"/>
<newline/>
<field name="partner_id" on_change="onchange_partner_id(type,partner_id,date_invoice,payment_term, partner_bank,company_id)" groups="base.group_user"/>
<field domain="[('partner_id','=',partner_id)]" name="address_invoice_id"/>
<field name="fiscal_position" groups="base.group_extended" widget="selection"/>
<newline/>
<field name="date_invoice"/>
<field name="period_id" groups="base.group_user"/>
<group colspan="2" col="1" groups="base.group_user">
<label align="0.0" string="(keep empty to use the current period)"/>
</group>
</group>
<notebook colspan="4">
<page string="Invoice">
<field domain="[('type','&lt;&gt;','view'), ('company_id', '=', company_id),('journal_id','=',journal_id)]" name="account_id" groups="base.group_user"/>
@ -294,13 +294,13 @@
<field name="state"/>
<field name="residual"/>
<group col="4" colspan="4" groups="base.group_user">
<button name="invoice_proforma2" states="draft" string="PRO-FORMA" icon="gtk-print"/>
<button name="invoice_open" states="draft,proforma2" string="Create" icon="gtk-execute"/>
<button name="%(action_account_invoice_pay)d" type='action' string='Pay Invoice' states='open' icon="gtk-ok"/>
<button name="invoice_cancel" states="draft,proforma2,sale,open" string="Cancel" icon="gtk-cancel"/>
<button name="action_cancel_draft" states="cancel" string="Set to Draft" type="object" icon="gtk-convert"/>
<button name='%(action_account_state_open)d' type='action' string='Re-Open' states='paid' icon="gtk-convert"/>
<button name="%(action_account_invoice_refund)d" type='action' string='Credit Note' states='paid' icon="gtk-execute"/>
<button name="invoice_proforma2" states="draft" string="PRO-FORMA" icon="gtk-print"/>
<button name="invoice_open" states="draft,proforma2" string="Create" icon="gtk-execute"/>
<button name="%(action_account_invoice_pay)d" type='action' string='Pay Invoice' states='open' icon="gtk-ok"/>
<button name="invoice_cancel" states="draft,proforma2,sale,open" string="Cancel" icon="gtk-cancel"/>
<button name="action_cancel_draft" states="cancel" string="Set to Draft" type="object" icon="gtk-convert"/>
<button name='%(action_account_state_open)d' type='action' string='Re-Open' states='paid' icon="gtk-convert"/>
<button name="%(action_account_invoice_refund)d" type='action' string='Credit Note' states='paid' icon="gtk-execute"/>
</group>
</group>
</page>
@ -356,7 +356,7 @@
<field name="amount_total"/>
</group>
<newline/>
<group expand="1" string="Group By..." colspan="12" col="10">
<group expand="1" string="Group By...">
<filter string="Journal" icon="terp-account" domain="[]" context="{'group_by':'journal_id'}"/>
<filter string="Period" icon="terp-account" domain="[]" context="{'group_by':'period_id'}"/>
<separator orientation="vertical"/>
@ -484,9 +484,9 @@
<act_window domain="[('account_analytic_id', '=', active_id)]" id="act_account_analytic_account_2_account_invoice_line" name="Invoice lines" res_model="account.invoice.line" src_model="account.analytic.account"/>
<act_window domain="[('partner_id', '=', partner_id), ('account_id.type', 'in', ['receivable', 'payable']), ('reconcile_id','=',False)]" id="act_account_invoice_account_move_unreconciled" name="Unreconciled Receivables &amp; Payables" res_model="account.move.line" src_model="account.invoice"/>
<act_window domain="[('partner_id', '=', partner_id), ('account_id.type', 'in', ['receivable', 'payable']), ('reconcile_id','=',False)]" id="act_account_invoice_account_move_unreconciled" name="Unreconciled Receivables &amp; Payables" res_model="account.move.line" src_model="account.invoice"/>
<!-- Partners inherited form -->
<!-- Partners inherited form -->
<record id="view_invoice_partner_info_form" model="ir.ui.view">
<field name="name">res.partner.invoice.info.inherit</field>

View File

@ -22,6 +22,7 @@
groups="group_account_user"/>
<menuitem id="menu_account_end_year_treatments" name="End of Year Treatments" parent="account.menu_finance_periodical_processing" sequence="20"/>
<menuitem id="menu_finance_statastic_report_statement" name="Satistic Reports" parent="account.menu_finance_reporting" sequence="3"/>
</data>
</openerp>

View File

@ -23,21 +23,30 @@
<report auto="False" id="account_intracom" menu="False" model="account.move.line" name="account.intracom" string="IntraCom"/>
<report id="account_move_line_list" model="account.tax.code" name="account.tax.code.entries" rml="account/report/account_tax_code.rml" string="All Entries"/>
<report
auto="False"
id="account_vat_declaration"
menu="False"
model="account.tax.code"
name="account.vat.declaration"
rml="account/report/tax_report.rml"
string="Taxes Report"/>
auto="False"
id="account_vat_declaration"
menu="False"
model="account.tax.code"
name="account.vat.declaration"
rml="account/report/tax_report.rml"
string="Taxes Report"/>
<report id="report_account_voucher_new"
string="Print Voucher"
model="account.move"
name="account.move.voucher"
rml="account/report/voucher_print.rml"
auto="False"
header = "False"
menu="True"/>
<menuitem
id="menu_tax_report"
name="Taxes"
parent="account.menu_finance_generic_reporting" sequence="3"/>
<!-- <wizard
id="wizard_vat_declaration"
menu="False"
@ -68,20 +77,20 @@
<report id="account_account_balance_compare"
string="Account balance"
model="account.account"
name="account.balance.account.balance"
rml="account/report/compare_account_balance.rml"
auto="False"
menu="False"/>
string="Account balance"
model="account.account"
name="account.balance.account.balance"
rml="account/report/compare_account_balance.rml"
auto="False"
menu="False"/>
<report id="account_account_balance_landscape"
string="Account balance"
model="account.account"
name="account.account.balance.landscape"
rml="account/report/account_balance_landscape.rml"
auto="False"
menu="False"/>
<report id="account_account_balance_landscape"
string="Account balance"
model="account.account"
name="account.account.balance.landscape"
rml="account/report/account_balance_landscape.rml"
auto="False"
menu="False"/>
<!--

View File

@ -351,7 +351,7 @@
<page string="Entry encoding">
<field colspan="4" name="line_ids" nolabel="1">
<tree editable="bottom" string="Statement lines">
<field name="sequence"/>
<field name="sequence" invisible="1"/>
<field name="date"/>
<field name="ref"/>
<field name="name"/>
@ -804,7 +804,7 @@
</field>
</record>
<record id="view_account_move_line_filter" model="ir.ui.view">
<record id="view_account_move_line_filter" model="ir.ui.view">
<field name="name">Entry Lines</field>
<field name="model">account.move.line</field>
<field name="type">search</field>
@ -858,6 +858,7 @@
<field name="ref"/>
<field name="journal_id"/>
<field name="period_id"/>
<field name="type" invisible=" not context.get('set_visible',True)"/>
<field name="partner_id"/>
<field name="line_id"/>
<field name="to_check" groups="base.group_extended"/>
@ -872,72 +873,76 @@
<field name="model">account.move</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Account Entry">
<form string="Journal Entries">
<group colspan="4" col="6">
<field name="name" select="1" readonly="True"/>
<field name="period_id"/>
<field name="journal_id" select="1"/>
<field name="company_id" required="1" groups="base.group_multi_company"/>
<field name="date" select="1"/>
<field name="ref" select="1"/>
<field name="to_check"/>
<field name="type" groups="base.group_extended"/>
<field name="name" select="1" colspan="4" readonly="True"/>
<field name="journal_id" select="1"/>
<field name="period_id"/>
<field name="type"/>
<field name="ref" select="1"/>
</group>
<field name="partner_id" invisible="1" select="1"/>
<field name="amount" invisible="1" select="1"/>
<notebook colspan="4">
<page string="Journal Entries Lines">
<field colspan="4" height="200" name="line_id" nolabel="1" widget="one2many_list" default_get="{'lines':line_id ,'journal':journal_id }">
<form string="Account Entry Line">
<separator colspan="4" string="General Information"/>
<field name="name" select="1"/>
<field name="account_id" domain="[('journal_id','=',parent.journal_id)]"/>
<field name="partner_id" on_change="onchange_partner_id(False,partner_id,account_id,debit,credit,parent.date,parent.journal_id)"/>
<field colspan="4" height="250" name="line_id" nolabel="1" widget="one2many_list" default_get="{'lines':line_id ,'journal':journal_id }">
<form string="Account Entry Line">
<separator colspan="4" string="General Information"/>
<field name="name" select="1"/>
<field name="account_id" domain="[('journal_id','=',parent.journal_id)]"/>
<field name="partner_id" on_change="onchange_partner_id(False,partner_id,account_id,debit,credit,parent.date,parent.journal_id)"/>
<field name="debit" select="1"/>
<field name="credit" select="1"/>
<field name="date" select="1"/>
<field name="debit" select="1"/>
<field name="credit" select="1"/>
<field name="date" select="1"/>
<separator colspan="4" string="Optional Information"/>
<field name="currency_id"/>
<field name="amount_currency"/>
<field name="quantity" select="1"/>
<newline/>
<field name="date_maturity"/>
<field name="date_created"/>
<separator colspan="4" string="Optional Information"/>
<field name="currency_id"/>
<field name="amount_currency"/>
<field name="quantity" select="1"/>
<newline/>
<field name="date_maturity"/>
<field name="date_created"/>
<separator colspan="4" string="State"/>
<field name="reconcile_id"/>
<field name="reconcile_partial_id"/>
<field name="statement_id"/>
<field name="state"/>
</form>
<tree editable="top" string="Account Entry Line">
<field name="ref"/>
<field name="invoice"/>
<field name="name"/>
<field name="partner_id" on_change="onchange_partner_id(False,partner_id,account_id,debit,credit,parent.date,parent.journal_id)"/>
<field name="account_id" domain="[('journal_id','=',parent.journal_id)]"/>
<field name="date_maturity"/>
<field name="debit" sum="Total Debit"/>
<field name="credit" sum="Total Credit"/>
<field name="analytic_account_id"/>
<field name="amount_currency" groups="base.group_extended"/>
<field name="currency_id" groups="base.group_extended"/>
<field name="tax_code_id"/>
<field name="tax_amount"/>
<field name="state"/>
<field name="reconcile_id"/>
<field name="reconcile_partial_id" groups="base.group_extended"/>
</tree>
</field>
<separator colspan="4" string="Narration"/>
<field name="narration" colspan="4" nolabel="1"/>
<separator colspan="4" string="State"/>
<field name="state" select="1"/>
<group col="2" colspan="2">
<button name="button_validate" states="draft" string="Validate" type="object" icon="gtk-execute"/>
<button name="button_cancel" states="posted" string="Cancel" type="object" icon="gtk-cancel"/>
</group>
<separator colspan="4" string="State"/>
<field name="reconcile_id"/>
<field name="reconcile_partial_id"/>
<field name="statement_id"/>
<field name="state"/>
</form>
<tree editable="top" string="Account Entry Line">
<field name="ref"/>
<field name="invoice"/>
<field name="name"/>
<field name="partner_id" on_change="onchange_partner_id(False,partner_id,account_id,debit,credit,parent.date,parent.journal_id)"/>
<field name="account_id" domain="[('journal_id','=',parent.journal_id)]"/>
<field name="date_maturity"/>
<field name="debit" sum="Total Debit"/>
<field name="credit" sum="Total Credit"/>
<field name="analytic_account_id"/>
<field name="amount_currency" groups="base.group_extended"/>
<field name="currency_id" groups="base.group_extended"/>
<field name="tax_code_id"/>
<field name="tax_amount"/>
<field name="state"/>
<field name="reconcile_id"/>
<field name="reconcile_partial_id" groups="base.group_extended"/>
</tree>
</field>
<separator colspan="4" string="Narration"/>
<field name="narration" colspan="4" nolabel="1"/>
<field name="state" select="1"/>
<group col="2" colspan="2">
<button name="button_validate" states="draft" string="Validate" type="object" icon="gtk-execute"/>
<button name="button_cancel" states="posted" string="Cancel" type="object" icon="gtk-cancel"/>
</group>
</page>
<page string="Other Information">
<field name="company_id" required="1" groups="base.group_multi_company"/>
<field name="date" select="1" groups="base.group_extended"/>
<field name="to_check" groups="base.group_extended"/>
<field name="partner_id" invisible="1" select="1"/>
<field name="amount" invisible="1" select="1"/>
</page>
</notebook>
</form>
</field>
</record>
@ -957,6 +962,13 @@
<field name="journal_id" select='1'/>
<field name="partner_id" select='1'/>
</group>
<newline/>
<group expand="1" string="Group By..." colspan="12" col="10">
<filter string="Journal" icon="terp-account" domain="[]" context="{'group_by':'journal_id'}"/>
<filter string="Period" icon="terp-account" domain="[]" context="{'group_by':'period_id'}"/>
<filter string="Type" icon="terp-account" domain="[]" context="{'group_by':'type', 'set_visible':True}"/>
<filter string="States" icon="terp-account" domain="[]" context="{'group_by':'state'}"/>
</group>
</search>
</field>
</record>
@ -973,7 +985,7 @@
<menuitem action="action_move_line_form" id="menu_action_move_line_form" parent="next_id_29"/>
<record id="action_move_line_form_encode_by_move" model="ir.actions.act_window">
<field name="name">Entries by Move</field>
<field name="name">Journal Entries</field>
<field name="res_model">account.move</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>

View File

@ -8,13 +8,13 @@ msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2010-05-17 13:10+0000\n"
"Last-Translator: Jon A. Ortuondo (Euskotec) <Unknown>\n"
"PO-Revision-Date: 2010-05-23 09:59+0000\n"
"Last-Translator: ninaiz <inigo.rekalde@gmail.com>\n"
"Language-Team: Basque <eu@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-05-19 05:12+0000\n"
"X-Launchpad-Export-Date: 2010-05-24 03:46+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account
@ -236,7 +236,7 @@ msgstr ""
#: field:account.tax.template,amount:0
#: xsl:account.transfer:0
msgid "Amount"
msgstr ""
msgstr "Kopurua"
#. module: account
#: model:ir.actions.report.xml,name:account.account_3rdparty_ledger
@ -338,7 +338,7 @@ msgstr ""
#: field:account.invoice,amount_tax:0
#: field:account.move.line,account_tax_id:0
msgid "Tax"
msgstr ""
msgstr "Zerga"
#. module: account
#: rml:account.general.journal:0
@ -465,7 +465,7 @@ msgstr ""
#. module: account
#: rml:account.invoice:0
msgid "Disc.(%)"
msgstr ""
msgstr "Desk. (%)"
#. module: account
#: rml:account.general.ledger:0

View File

@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 5.0.1\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2010-02-18 09:24+0000\n"
"Last-Translator: Olivier Dony (OpenERP) <Unknown>\n"
"PO-Revision-Date: 2010-05-21 17:48+0000\n"
"Last-Translator: Christophe Chauvet - http://www.syleam.fr/ <Unknown>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-04-17 04:06+0000\n"
"X-Launchpad-Export-Date: 2010-05-22 04:00+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account
@ -2495,7 +2495,8 @@ msgid "Analytic Entry"
msgstr "Ecriture analytique"
#. module: account
#: view:res.company:0 field:res.company,overdue_msg:0
#: view:res.company:0
#: field:res.company,overdue_msg:0
msgid "Overdue Payments Message"
msgstr "Message pour les paiements en retard"
@ -2784,7 +2785,7 @@ msgstr "Ouvrir journal"
#. module: account
#: rml:account.analytic.account.journal:0
msgid "KI"
msgstr ""
msgstr "KI"
#. module: account
#: model:ir.actions.wizard,name:account.action_account_analytic_line
@ -3034,7 +3035,7 @@ msgstr "-"
#. module: account
#: rml:account.analytic.account.journal:0
msgid "asgfas"
msgstr ""
msgstr "asgfas"
#. module: account
#: model:ir.actions.act_window,name:account.action_account_analytic_account_tree2
@ -6082,3 +6083,6 @@ msgid ""
msgstr ""
"Cochez cette case si l'utilisateur peut réconcilier les entrées dans ce "
"compte."
#~ msgid "account.config.wizard"
#~ msgstr "account.config.wizard"

View File

@ -8,13 +8,13 @@ msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2010-05-18 08:45+0000\n"
"PO-Revision-Date: 2010-05-24 12:19+0000\n"
"Last-Translator: Cédric VALMARY (Tot en òc) <cvalmary@yahoo.fr>\n"
"Language-Team: Occitan (post 1500) <oc@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-05-19 05:12+0000\n"
"X-Launchpad-Export-Date: 2010-05-25 03:42+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account
@ -118,7 +118,7 @@ msgstr "Parent"
#. module: account
#: selection:account.move,type:0
msgid "Journal Voucher"
msgstr ""
msgstr "Jornal dels chèques"
#. module: account
#: field:account.invoice,residual:0
@ -225,7 +225,7 @@ msgstr ""
#. module: account
#: model:ir.ui.menu,name:account.menu_finance_recurrent_entries
msgid "Recurrent Entries"
msgstr ""
msgstr "Escrituras recurentas"
#. module: account
#: field:account.analytic.line,amount:0
@ -423,7 +423,7 @@ msgstr "Negatiu"
#. module: account
#: rml:account.partner.balance:0
msgid "(Account/Partner) Name"
msgstr ""
msgstr "Nom (Compte/Partenari)"
#. module: account
#: selection:account.move,type:0
@ -493,7 +493,7 @@ msgstr ""
#. module: account
#: model:ir.ui.menu,name:account.menu_finance_periodical_processing
msgid "Periodical Processing"
msgstr ""
msgstr "Tractaments periodics"
#. module: account
#: view:report.hr.timesheet.invoice.journal:0
@ -504,12 +504,12 @@ msgstr ""
#: model:ir.actions.act_window,name:account.action_account_tax_code_template_form
#: model:ir.ui.menu,name:account.menu_action_account_tax_code_template_form
msgid "Tax Code Templates"
msgstr ""
msgstr "Modèl de còde de taxa"
#. module: account
#: view:account.invoice:0
msgid "Supplier invoice"
msgstr ""
msgstr "Factura del provesidor"
#. module: account
#: model:process.transition,name:account.process_transition_reconcilepaid0

View File

@ -8,13 +8,13 @@ msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2010-03-15 03:12+0000\n"
"PO-Revision-Date: 2010-05-20 07:09+0000\n"
"Last-Translator: Songpon Phusing <p.songpon@gmail.com>\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: 2010-04-17 04:08+0000\n"
"X-Launchpad-Export-Date: 2010-05-21 03:38+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account
@ -51,7 +51,7 @@ msgstr ""
#. module: account
#: model:account.account.type,name:account.account_type_asset
msgid "Asset"
msgstr ""
msgstr "สินทรัพย์"
#. module: account
#: constraint:ir.actions.act_window:0
@ -106,7 +106,7 @@ msgstr ""
#: model:ir.actions.wizard,name:account.wizard_vat_declaration
#: model:ir.ui.menu,name:account.menu_wizard_vat_declaration
msgid "Print Taxes Report"
msgstr ""
msgstr "พิมพ์รายงานภาษี"
#. module: account
#: field:account.account,parent_id:0
@ -2133,7 +2133,8 @@ msgid "Analytic Entry"
msgstr ""
#. module: account
#: view:res.company:0 field:res.company,overdue_msg:0
#: view:res.company:0
#: field:res.company,overdue_msg:0
msgid "Overdue Payments Message"
msgstr ""

View File

@ -1525,7 +1525,7 @@ class res_partner(osv.osv):
_inherit = 'res.partner'
_columns = {
'invoice_ids': fields.one2many('account.invoice.line', 'partner_id', 'Invoices'),
'invoice_ids': fields.one2many('account.invoice.line', 'partner_id', 'Invoices', readonly=True),
}
res_partner()

View File

@ -74,7 +74,7 @@
<page string="Accounting" position="inside">
<group col="2" colspan="2">
<separator string="Customer Accounting Properties" colspan="2"/>
<field name="property_account_receivable"/>
<field name="property_account_receivable" />
<field name="property_account_position" widget="selection"/>
<field name="property_payment_term" widget="selection"/>
</group>
@ -118,10 +118,27 @@
<field name="acc_number"/>
</tree>
</field>
<field name="invoice_ids" colspan="4" nolabel="1" context="{'group_by':'product_id'}"/>
</page>
</notebook>
</field>
</record>
<!-- Partners info tab view-->
<record id="view_account_partner_info_form" model="ir.ui.view">
<field name="name">res.partner.account.info.inherit</field>
<field name="model">res.partner</field>
<field name="type">form</field>
<field name="inherit_id" ref="base.view_partner_form"/>
<field name="arch" type="xml">
<notebook position="inside">
<page string="Project">
<field name="contract_ids" colspan="4" nolabel="1" />
</page>
</notebook>
</field>
</record>
</data>
</openerp>

View File

@ -67,7 +67,7 @@
<field name="name" select="1" colspan="4"/>
<field name="code" select="1"/>
<field name="parent_id" on_change="on_change_parent(parent_id)"/>
<field name="company_id" select="2" widget="selection"/>
<field name="company_id" select="2" widget="selection" groups="base.group_multi_company"/>
<field name="type" select="2"/>
<field name="company_currency_id" select="2"/>
</group>
@ -153,7 +153,7 @@
<field name="ref" select="2"/>
<field name="currency_id" select="2"/>
<field name="amount_currency" select="2"/>
<field name="company_id" select="2"/>
<field name="company_id" select="2" groups="base.group_multi_company"/>
<newline/>
<field name="product_id" select="2"/>
<field name="product_uom_id" select="2"/>
@ -178,7 +178,7 @@
<field name="ref"/>
<field name="currency_id" />
<field name="amount_currency" />
<field name="company_id" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id)"/>
<field name="company_id" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id)" groups="base.group_multi_company"/>
</tree>
</field>
</record>
@ -288,7 +288,7 @@
<field name="code" select="1"/>
<field name="type" select="2"/>
<field name="active" select="2"/>
<field name="company_id" widget="selection"/>
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
</form>
</field>
</record>
@ -443,21 +443,6 @@
</graph>
</field>
</record>
<!-- Partners inherited form -->
<record id="view_contract_partner_info_form" model="ir.ui.view">
<field name="name">res.partner.contract.info.inherit</field>
<field name="model">res.partner</field>
<field name="type">form</field>
<field name="inherit_id" ref="base.view_partner_form"/>
<field name="arch" type="xml">
<field name="invoice_ids" position="after">
<field name="contract_ids" colspan="4" nolabel="1" />
</field>
</field>
</record>
</data>
</openerp>

View File

@ -37,6 +37,9 @@ import compare_account_balance
import account_invoice_report
import account_report
import account_analytic_report
import account_account_report
import account_entries_report
import account_analytic_entries_report
import voucher_print
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -0,0 +1,86 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import tools
from osv import fields,osv
class account_account_report(osv.osv):
_name = "account.account.report"
_description = "Account Report"
_auto = False
_columns = {
'name': fields.char('Name', size=128, readonly=True),
'code': fields.char('Code', size=64, readonly=True),
'type': fields.selection([
('receivable', 'Receivable'),
('payable', 'Payable'),
('view', 'View'),
('consolidation', 'Consolidation'),
('other', 'Others'),
('closed', 'Closed'),
], 'Internal Type', readonly=True),
'company_id': fields.many2one('res.company', 'Company', required=True),
'currency_mode': fields.selection([('current', 'At Date'), ('average', 'Average Rate')], 'Outgoing Currencies Rate',readonly=True),
'user_type': fields.many2one('account.account.type', 'Account Type',readonly=True),
'quantity': fields.float('Quantity', readonly=True),
'amount_total': fields.float('Total Amount', readonly=True),
'credit': fields.float('Credit', readonly=True),
'debit': fields.float('Debit', readonly=True),
'balance': fields.float('Balance', readonly=True),
'nbr': fields.integer('#Accounts', readonly=True),
'parent_account_id': fields.many2one('account.account', 'Parent Account', required=True),
}
def init(self, cr):
tools.drop_view_if_exists(cr, 'account_account_report')
cr.execute("""
create or replace view account_account_report as (
select
min(a.id) as id,
count(distinct a.id) as nbr,
a.name,
a.code,
a.type as type,
a.company_id as company_id,
a.currency_mode as currency_mode,
a.user_type as user_type,
a.parent_id as parent_account_id,
sum(ail.quantity) as quantity,
sum(ail.price_subtotal) as amount_total,
sum(m.credit) as credit,
sum(m.debit) as debit,
(sum(m.credit)-sum(m.debit)) as balance
from
account_account as a
left join account_move_line as m on m.account_id=a.id
left join account_invoice_line as ail on ail.account_id=a.id
left join account_invoice as ai on ai.account_id=a.id
group by
a.name,
a.code,
a.type,
a.company_id,
a.currency_mode,
a.user_type,
m.account_id,
a.parent_id
)
""")
account_account_report()

View File

@ -0,0 +1,93 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="view_account_account_report_tree" model="ir.ui.view">
<field name="name">account.account.report.tree</field>
<field name="model">account.account.report</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Account Report">
<field name="name" invisible="1" string="Account"/>
<field name="code" invisible="1"/>
<field name="type" invisible="1"/>
<field name="company_id" invisible="1" group="base.multi_company"/>
<field name="currency_mode" invisible="1"/>
<field name="nbr" sum="#Accounts"/>
<field name="user_type" invisible="1"/>
<field name="parent_account_id" invisible="1"/>
<field name="quantity" sum="Quantity"/>
<field name="amount_total" sum="Total Amount"/>
<field name="credit" sum="Credit"/>
<field name="debit" sum="Debit"/>
<field name="balance" sum="Balance"/>
</tree>
</field>
</record>
<record id="view_account_account_report_graph" model="ir.ui.view">
<field name="name">account.account.report.graph</field>
<field name="model">account.account.report</field>
<field name="type">graph</field>
<field name="arch" type="xml">
<graph string="Accounts" type="bar">
<field name="name"/>
<field name="credit" operator="+"/>
<field name="debit" operator="+"/>
<field name="balance" operator="+"/>
</graph>
</field>
</record>
<record id="view_account_account_report_search" model="ir.ui.view">
<field name="name">account.account.report.search</field>
<field name="model">account.account.report</field>
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Accounts">
<group>
<filter icon="terp-account"
string="At Date"
domain="[('currency_mode','=', 'current')]"/>
<filter icon="terp-account"
string="Average Rate"
domain="[('currency_mode','=','average')]"/>
<separator orientation="vertical"/>
<field name="name" string="Account"/>
<field name="code"/>
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
</group>
<newline/>
<group expand="1" string="Group By...">
<filter string="Account" name="Account" icon="terp-account" context="{'group_by':'name'}"/>
<filter string="Code" icon="terp-account" context="{'group_by':'code'}"/>
<filter string="Company" icon="terp-account" context="{'group_by':'company_id'}" groups="base.group_multi_company"/>
<separator orientation="vertical"/>
<filter string="Currencies Rate" icon="terp-account" context="{'group_by':'currency_mode'}"/>
<filter string="Internal Type" icon="terp-account" context="{'group_by':'type'}"/>
<filter string="Account Type" icon="terp-account" context="{'group_by':'user_type'}"/>
<filter string="Parent Account" icon="terp-account" context="{'group_by':'parent_account_id'}"/>
</group>
<newline/>
<group expand="0" string="Extended options..." groups="base.group_extended">
<field name="type" />
<field name="user_type" widget="selection"/>
<field name="parent_account_id" />
</group>
</search>
</field>
</record>
<record id="action_account_account_report" model="ir.actions.act_window">
<field name="name">Accounts</field>
<field name="res_model">account.account.report</field>
<field name="view_type">form</field>
<field name="view_mode">tree,graph</field>
<field name="context">{"search_default_Account":1,"search_default_At Date":1,'group_by_no_leaf':1,'group_by':[]}</field>
<field name="search_view_id" ref="view_account_account_report_search"/>
</record>
<menuitem action="action_account_account_report" id="menu_action_account_account_report" parent="account.menu_finance_statastic_report_statement" sequence="6"/>
</data>
</openerp>

View File

@ -0,0 +1,83 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import tools
from osv import fields,osv
class analytic_entries_report(osv.osv):
_name = "analytic.entries.report"
_description = "Analytic Entries Statistics"
_auto = False
_columns = {
'date': fields.date('Date', readonly=True),
'year': fields.char('Year', size=4, readonly=True),
'day': fields.char('Day', size=128, readonly=True),
'month':fields.selection([('01','January'), ('02','February'), ('03','March'), ('04','April'),
('05','May'), ('06','June'), ('07','July'), ('08','August'), ('09','September'),
('10','October'), ('11','November'), ('12','December')], 'Month',readonly=True),
'user_id' : fields.many2one('res.users', 'User',readonly=True),
'name': fields.char('Description', size=64, readonly=True),
'company_id': fields.many2one('res.company', 'Company', required=True),
'currency_id': fields.many2one('res.currency', 'Currency', required=True),
'account_id': fields.many2one('account.analytic.account', 'Account', required=True),
'general_account_id': fields.many2one('account.account', 'General Account', required=True),
'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),
'amount': fields.float('Amount', readonly=True),
'unit_amount': fields.float('Unit Amount', readonly=True),
'amount_currency': fields.float('Amount Currency', readonly=True),
'nbr': fields.integer('#Entries', readonly=True),
}
def init(self, cr):
tools.drop_view_if_exists(cr, 'analytic_entries_report')
cr.execute("""
create or replace view analytic_entries_report as (
select
min(a.id) as id,
count(distinct a.id) as nbr,
a.create_date as date,
to_char(a.create_date, 'YYYY') as year,
to_char(a.create_date, 'MM') as month,
to_char(a.create_date, 'YYYY-MM-DD') as day,
a.user_id as user_id,
a.name as name,
a.company_id as company_id,
a.currency_id as currency_id,
a.account_id as account_id,
a.general_account_id as general_account_id,
a.journal_id as journal_id,
a.move_id as move_id,
a.product_id as product_id,
a.product_uom_id as product_uom_id,
sum(a.amount) as amount,
sum(a.unit_amount) as unit_amount,
sum(a.amount_currency) as amount_currency
from
account_analytic_line a
group by
a.create_date, a.user_id,a.name,company_id,a.currency_id,
a.account_id,a.general_account_id,a.journal_id,
a.move_id,a.product_id,a.product_uom_id
)
""")
analytic_entries_report()

View File

@ -0,0 +1,113 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="view_analytic_entries_report_tree" model="ir.ui.view">
<field name="name">analytic.entries.report.tree</field>
<field name="model">analytic.entries.report</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Analytic Entries Statistics">
<field name="date" invisible="1"/>
<field name="year" invisible="1"/>
<field name="day" invisible="1"/>
<field name="month" invisible="1"/>
<field name="user_id" invisible="1"/>
<field name="name" invisible="1"/>
<field name="company_id" invisible="1" groups="base.multi_company"/>
<field name="currency_id" invisible="1"/>
<field name="account_id" invisible="1"/>
<field name="general_account_id" invisible="1"/>
<field name="journal_id" invisible="1"/>
<field name="product_id" invisible="1"/>
<field name="product_uom_id" invisible="1"/>
<field name="nbr" sum="Entries"/>
<field name="amount" sum="Amount"/>
<field name="unit_amount" sum="Unit Amount"/>
<field name="amount_currency" sum="Amount Currency"/>
</tree>
</field>
</record>
<record id="view_analytic_entries_report_search" model="ir.ui.view">
<field name="name">analytic.entries.report.search</field>
<field name="model">analytic.entries.report</field>
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Analytic Entries">
<group col="10" colspan="12">
<filter icon="terp-account" string="Last 365 DAys"
domain="[('day','&lt;=', time.strftime('%%Y-%%m-%%d')),('day','&gt;',(datetime.date.today()-datetime.timedelta(days=365)).strftime('%%Y-%%m-%%d'))]"
help="Analytic Entries of the year"/>
<filter icon="terp-account" string="Last 30 Days"
name="month"
domain="[('day','&lt;=', time.strftime('%%Y-%%m-%%d')), ('day','&gt;',(datetime.date.today()-datetime.timedelta(days=30)).strftime('%%Y-%%m-%%d'))]"
help="Analytic Entries of this month"/>
<filter icon="gtk-media-rewind"
string=" 7 Days "
separator="1"
domain="[('day','&lt;=', time.strftime('%%Y-%%m-%%d')), ('day','&gt;',(datetime.date.today()-datetime.timedelta(days=7)).strftime('%%Y-%%m-%%d'))]"
help="Analytic Entries during last 7 days"/>
<separator orientation="vertical"/>
<field name="name"/>
<field name="user_id" widget="selection">
<filter icon="terp-partner" domain="[('user_id','=',uid)]" help="My Case"/>
</field>
<field name="currency_id"/>
</group>
<newline/>
<group expand="1" string="Group By...">
<filter string="User" name="User" icon="terp-account" context="{'group_by':'user_id'}"/>
<filter string="Currency" icon="terp-account" context="{'group_by':'currency_id'}"/>
<filter string="Company" icon="terp-account" context="{'group_by':'company_id'}" groups="base.multi_company"/>
<separator orientation="vertical"/>
<filter string="Account" icon="terp-account" context="{'group_by':'account_id'}"/>
<filter string="General Account" icon="terp-account" context="{'group_by':'general_account_id'}"/>
<filter string="Journal" icon="terp-account" context="{'group_by':'journal_id'}"/>
<separator orientation="vertical"/>
<filter string="Product" icon="terp-account" context="{'group_by':'product_id'}"/>
<filter string="Product UOM" icon="terp-account" context="{'group_by':'product_uom_id'}"/>
<separator orientation="vertical"/>
<filter string="Day" icon="terp-account" context="{'group_by':'day'}"/>
<filter string="Month" icon="terp-account" context="{'group_by':'month'}"/>
<filter string="Year" icon="terp-account" context="{'group_by':'year'}"/>
</group>
<newline/>
<group expand="0" string="Extended options..." groups="base.group_extended">
<field name="account_id" />
<field name="general_account_id" widget="selection"/>
<field name="journal_id" widget="selection"/>
<separator orientation="vertical"/>
<field name="product_id" />
<field name="product_uom_id" widget="selection"/>
<field name="company_id" widget="selection" groups="base.multi_company"/>
</group>
</search>
</field>
</record>
<record id="view_account_analytic_entries_search" model="ir.ui.view">
<field name="name">account.analytic.entries.graph</field>
<field name="model">analytic.entries.report</field>
<field name="type">graph</field>
<field name="arch" type="xml">
<graph string="Analytic Entries" type="bar">
<field name="user_id"/>
<field name="amount" operator="+"/>
<field name="unit_amount" operator="+"/>
<field name="amount_currency" operator="+"/>
</graph>
</field>
</record>
<record id="action_analytic_entries_report" model="ir.actions.act_window">
<field name="name">Analytic Entries</field>
<field name="res_model">analytic.entries.report</field>
<field name="view_type">form</field>
<field name="view_mode">tree,graph</field>
<field name="context">{'search_default_month':1,'search_default_User':1,'group_by_no_leaf':1,'group_by':[]}</field>
<field name="search_view_id" ref="view_analytic_entries_report_search"/>
</record>
<menuitem action="action_analytic_entries_report" id="menu_action_analytic_entries_report" parent="account.menu_finance_statastic_report_statement" sequence="4"/>
</data>
</openerp>

View File

@ -35,7 +35,7 @@ class analytic_report(osv.osv):
'parent_id': fields.many2one('account.analytic.account', 'Parent Analytic Account', readonly=True),
'user_id' : fields.many2one('res.users', 'Account Manager',readonly=True),
'product_id' : fields.many2one('product.product', 'Product',readonly=True),
'quantity': fields.float('Quantity',readonly=True),
'total_quantity': fields.float('# Total Quantity',readonly=True),
'debit' : fields.float('Debit',readonly=True),
'credit' : fields.float('Credit',readonly=True),
'balance' : fields.float('Balance',readonly=True),
@ -43,6 +43,11 @@ class analytic_report(osv.osv):
'month':fields.selection([('01','January'), ('02','February'), ('03','March'), ('04','April'),
('05','May'), ('06','June'), ('07','July'), ('08','August'), ('09','September'),
('10','October'), ('11','November'), ('12','December')], 'Month',readonly=True),
'day': fields.char('Day', size=128, readonly=True),
'nbr':fields.integer('# of Lines', readonly=True),
'company_id': fields.many2one('res.company', 'Company', readonly=True),
'type': fields.selection([('view','View'), ('normal','Normal')], 'Account Type'),
'state': fields.selection([('draft','Draft'),
('open','Open'),
('pending','Pending'),
@ -50,6 +55,7 @@ class analytic_report(osv.osv):
('close','Close'),
('template', 'Template')],
'State', readonly=True),
}
_order = 'date_start desc'
def init(self, cr):
@ -60,15 +66,18 @@ class analytic_report(osv.osv):
min(s.id) as id,
to_char(s.create_date, 'YYYY') as year,
to_char(s.create_date, 'MM') as month,
to_char(s.create_date, 'YYYY-MM-DD') as day,
l.journal_id,
l.product_id,
s.parent_id,
s.date_start,
s.date as date_end,
s.user_id,
s.company_id,
s.type,
s.name,
s.partner_id,
s.quantity,
sum(s.quantity) as total_quantity,
s.debit,
s.credit,
s.balance,
@ -77,7 +86,8 @@ class analytic_report(osv.osv):
from account_analytic_account s
left join account_analytic_line l on (s.id=l.account_id)
GROUP BY s.create_date,s.state,l.journal_id,s.name,
s.partner_id,s.date_start,s.date,s.user_id,s.quantity,
s.partner_id,s.date_start,s.date,s.user_id,
s.company_id,s.type,
s.debit,s.credit,s.balance,s.parent_id,l.product_id
)
""")

View File

@ -9,23 +9,26 @@
<tree string="Analytic Accounts Statistics">
<field name="parent_id" invisible="1" string="Analytic Account"/>
<field name="product_id" invisible="1"/>
<field name="name"/>
<field name="partner_id"/>
<field name="journal_id" string="Analytic Journal"/>
<field name="user_id"/>
<field name="date_start"/>
<field name="date_end"/>
<field name="quantity"/>
<field name="name" invisible="1"/>
<field name="partner_id" invisible="1"/>
<field name="journal_id" string="Analytic Journal" invisible="1"/>
<field name="user_id" invisible="1"/>
<field name="date_start" invisible="1"/>
<field name="date_end" invisible="1"/>
<field name="total_quantity" sum=" # Total Quantity"/>
<field name="nbr" sum ="# of Lines"/>
<field name="company_id" invisible="1" groups="base.group_multi_company"/>
<field name="type" invisible="1"/>
<field name="debit"/>
<field name="credit"/>
<field name="balance"/>
<field name="state"/>
<field name="state" invisible="1"/>
<field name="day" invisible="1"/>
<field name="month" invisible="1"/>
<field name="year" invisible="1"/>
</tree>
</field>
</record>
<record id="view_analytic_report_search" model="ir.ui.view">
<field name="name">analytic.report.search</field>
<field name="model">analytic.report</field>
@ -38,17 +41,53 @@
domain="[('year','=',time.strftime('%%Y'))]"/>
<filter icon="terp-account"
string="This Month"
name="This Month"
domain="[('month','=',time.strftime('%%m'))]"/>
<filter icon="gtk-media-rewind"
string=" 7 Days "
separator="1"
domain="[('day','&lt;=', time.strftime('%%Y-%%m-%%d')), ('day','&gt;',(datetime.date.today()-datetime.timedelta(days=7)).strftime('%%Y-%%m-%%d'))]"
help="Entries during last 7 days"/>
<separator orientation="vertical"/>
<filter string="Start" icon="terp-account" domain="[('date_start','=',time.strftime('%%Y/%%m/%%d'))]"/>
<filter string="End" icon="terp-account" domain="[('date_end','=',time.strftime('%%Y/%%m/%%d'))]"/>
<separator orientation="vertical"/>
<filter icon="terp-account"
string="Draft"
domain="[('state','=','draft')]"/>
<filter icon="terp-account"
string="Open"
domain="[('state','=','open')]"/>
<filter icon="terp-account"
string="Pending"
domain="[('state','=','pending')]"/>
<separator orientation="vertical"/>
<field name="name"/>
<field name="user_id" widget="selection"/>
<field name="user_id" widget="selection">
<filter icon="terp-account"
string="My Accounts"
help="My Account"
domain="[('user_id','=',uid)]"/>
</field>
<field name="partner_id"/>
</group>
<newline/>
<group expand="1" string="Extended options..." colspan="10" col="12">
<group expand="1" string="Group By..." colspan="10" col="12">
<filter string="User" name="User" icon="terp-account" context="{'group_by':'user_id'}"/>
<filter string="Associated Partner" icon="terp-account" context="{'group_by':'partner_id'}"/>
<separator orientation="vertical"/>
<filter string="Company" icon="terp-account" context="{'group_by':'company_id'}" groups="base.group_multi_company"/>
<filter string="Analytic Account" icon="terp-account" context="{'group_by':'parent_id'}"/>
<filter string="Analytic Journal" icon="terp-account" context="{'group_by':'journal_id'}"/>
<separator orientation="vertical"/>
<filter string="Product" icon="terp-account" context="{'group_by':'product_id'}"/>
<filter string="Account Type" icon="terp-account" context="{'group_by':'type'}"/>
<filter string="State" icon="terp-account" context="{'group_by':'state'}"/>
<separator orientation="vertical"/>
<filter string="Day" icon="terp-account" context="{'group_by':'day'}"/>
<filter string="Month" icon="terp-account" context="{'group_by':'month'}"/>
<filter string="Year" icon="terp-account" context="{'group_by':'year'}"/>
</group>
<newline/>
<group expand="0" string="Extended options..." colspan="10" col="12" groups="base.group_extended">
<filter icon="terp-account"
string="Draft"
domain="[('state','=','draft')]"/>
@ -65,40 +104,42 @@
string="Template"
domain="[('state','=','template')]"/>
<separator orientation="vertical"/>
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
<field name="parent_id"/>
<field name="journal_id"/>
<field name="product_id"/>
<field name="journal_id" widget="selection"/>
<newline/>
<field name="product_id" />
<field name="type"/>
<separator orientation="vertical"/>
<field name="date_start"/>
<field name="date_end"/>
</group>
<newline/>
<group expand="1" string="Group By..." colspan="10" col="12">
<filter string="Partner" icon="terp-account" context="{'group_by':'partner_id'}"/>
<filter string="User" name='User' icon="terp-account" context="{'group_by':'user_id'}"/>
<separator orientation="vertical"/>
<filter string="Product" icon="terp-account" context="{'group_by':'product_id'}"/>
<filter string="Analytic Journal" icon="terp-account" context="{'group_by':'journal_id'}"/>
<filter string="Analytic Account" icon="terp-account" context="{'group_by':'parent_id'}"/>
<filter string="State" icon="terp-account" context="{'group_by':'state'}"/>
<separator orientation="vertical"/>
<filter string="Month" icon="terp-account" context="{'group_by':'month'}"/>
<filter string="Year" icon="terp-account" context="{'group_by':'year'}"/>
</group>
</search>
</search>
</field>
</record>
<record id="view_account_analytic_report_search" model="ir.ui.view">
<field name="name">account.analytic.report.graph</field>
<field name="model">analytic.report</field>
<field name="type">graph</field>
<field name="arch" type="xml">
<graph string="Analytic Accounts" type="bar">
<field name="user_id"/>
<field name="credit" operator="+"/>
<field name="debit" operator="+"/>
<field name="balance" operator="+"/>
<field name="nbr" operator="+"/>
</graph>
</field>
</record>
<record id="action_analytic_report_all" model="ir.actions.act_window">
<field name="name">Analytic Accounts</field>
<field name="res_model">analytic.report</field>
<field name="view_type">form</field>
<field name="view_mode">tree</field>
<field name="context">{'search_default_User':1,'search_default_user_id':uid}</field>
<field name="view_mode">tree,graph</field>
<field name="context">{'search_default_This Month':1,'search_default_User':1,'group_by_no_leaf':1,'group_by':[]}</field>
<field name="search_view_id" ref="view_analytic_report_search"/>
</record>
<menuitem action="action_analytic_report_all" id="menu_action_analytic_report_all" parent="account.menu_finance_reporting" sequence="0"/>
<menuitem action="action_analytic_report_all" id="menu_action_analytic_report_all" parent="account.menu_finance_statastic_report_statement" sequence="8"/>
</data>
</openerp>

View File

@ -0,0 +1,123 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import tools
from osv import fields,osv
class account_entries_report(osv.osv):
_name = "account.entries.report"
_description = "Entries"
_auto = False
_rec_name = 'date'
_columns = {
'date': fields.date('Effective Date', readonly=True),
'date_created': fields.date('Date Created', readonly=True),
'date_maturity': fields.date('Date Maturity', readonly=True),
'nbr':fields.integer('# of Entries', readonly=True),
'nbl':fields.integer('# of Lines', readonly=True),
'amount': fields.float('Amount',readonly=True),
'year': fields.char('Year', size=4, readonly=True),
'day': fields.char('Day', size=128, readonly=True),
'month':fields.selection([('01','January'), ('02','February'), ('03','March'), ('04','April'),
('05','May'), ('06','June'), ('07','July'), ('08','August'), ('09','September'),
('10','October'), ('11','November'), ('12','December')], 'Month',readonly=True),
'ref': fields.char('Reference', size=64,readonly=True),
'period_id': fields.many2one('account.period', 'Period', readonly=True),
'account_id': fields.many2one('account.account', 'Account', readonly=True),
'journal_id': fields.many2one('account.journal', 'Journal', readonly=True),
'product_id': fields.many2one('product.product', 'Product', readonly=True),
'state': fields.selection([('draft','Draft'), ('posted','Posted')], 'State',readonly=True,
help='When new account move is created the state will be \'Draft\'. When all the payments are done it will be in \'Posted\' state.'),
'state_2': fields.selection([('draft','Draft'), ('valid','Valid')], 'State of Move Line', readonly=True,
help='When new move line is created the state will be \'Draft\'.\n* When all the payments are done it will be in \'Valid\' state.'),
'partner_id': fields.many2one('res.partner','Partner', readonly=True),
'period_id2': fields.many2one('account.period', 'Move Line Period', readonly=True),
'analytic_account_id' : fields.many2one('account.analytic.account', 'Analytic Account', readonly=True),
'journal_id2': fields.many2one('account.journal', 'Move Line Journal', readonly=True),
'type': fields.selection([
('pay_voucher','Cash Payment'),
('bank_pay_voucher','Bank Payment'),
('rec_voucher','Cash Receipt'),
('bank_rec_voucher','Bank Receipt'),
('cont_voucher','Contra'),
('journal_sale_vou','Journal Sale'),
('journal_pur_voucher','Journal Purchase'),
('journal_voucher','Journal Voucher'),
],'Type',readonly=True),
'quantity': fields.float('Products Quantity', digits=(16,2), readonly=True),
'company_id': fields.many2one('res.company', 'Company', readonly=True),
}
_order = 'date desc'
def init(self, cr):
tools.drop_view_if_exists(cr, 'account_entries_report')
cr.execute("""
create or replace view account_entries_report as (
select
min(l.id) as id,
am.ref as ref,
sum(l.quantity) as quantity,
am.state as state,
l.state as state_2,
am.date as date,
count(l.id) as nbr,
count(distinct am.id) as nbl,
l.debit as amount,
to_char(am.date, 'YYYY') as year,
to_char(am.date, 'MM') as month,
to_char(am.date, 'YYYY-MM-DD') as day,
am.company_id as company_id,
l.account_id as account_id,
l.analytic_account_id as analytic_account_id,
l.date_created as date_created,
l.date_maturity as date_maturity,
am.journal_id as journal_id,
l.journal_id as journal_id2,
l.period_id as period_id2,
am.period_id as period_id,
l.partner_id as partner_id,
l.product_id as product_id,
am.type as type
from
account_move_line l
left join
account_move am on (am.id=l.move_id)
group by am.ref,
am.state,
am.date,
am.company_id,
am.journal_id,
l.journal_id,
am.period_id,
l.period_id,
am.type,
l.partner_id,
l.analytic_account_id,
l.product_id,
l.date_created,
l.date_maturity,
l.account_id,
l.state,
l.debit
)
""")
account_entries_report()

View File

@ -0,0 +1,127 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="view_account_entries_report_tree" model="ir.ui.view">
<field name="name">account.entries.report.tree</field>
<field name="model">account.entries.report</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Invoices Statistics">
<field name="date" invisible="1"/>
<field name="date_created" invisible="1"/>
<field name="date_maturity" invisible="1"/>
<field name="ref" invisible="1"/>
<field name="state" invisible="1"/>
<field name="state_2" invisible="1"/>
<field name="year" invisible="1"/>
<field name="day" invisible="1"/>
<field name="month" invisible="1"/>
<field name="partner_id" invisible="1"/>
<field name="product_id" invisible="1"/>
<field name="company_id" invisible="1" groups="base.group_multi_company"/>
<field name="journal_id" invisible="1"/>
<field name="account_id" invisible="1"/>
<field name="analytic_account_id" invisible="1"/>
<field name="period_id" invisible="1"/>
<field name="period_id2" invisible="1"/>
<field name="type" invisible="1"/>
<field name="nbr" sum="# of Entries "/>
<field name="nbl" sum="# of Lines "/>
<field name="amount" sum="# of Amount "/>
<field name="quantity" sum="# of Products Qty "/>
</tree>
</field>
</record>
<record id="view_account_entries_report_graph" model="ir.ui.view">
<field name="name">account.entries.report.graph</field>
<field name="model">account.entries.report</field>
<field name="type">graph</field>
<field name="arch" type="xml">
<graph string="Entries" type="bar">
<field name="partner_id"/>
<field name="amount"/>
</graph>
</field>
</record>
<record id="view_account_entries_report_search" model="ir.ui.view">
<field name="name">account.entries.report.search</field>
<field name="model">account.entries.report</field>
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Entries">
<group colspan="10" col="12">
<filter icon="terp-account" string="This Year"
domain="[('date','&lt;=', time.strftime('%%Y-%%m-%%d')),('date','&gt;',(datetime.date.today()-datetime.timedelta(days=365)).strftime('%%Y-%%m-%%d'))]"
help="Entries of the year"/>
<filter icon="terp-account" string="This Month"
name="This Month"
domain="[('date','&lt;=', time.strftime('%%Y-%%m-%%d')), ('date','&gt;',(datetime.date.today()-datetime.timedelta(days=30)).strftime('%%Y-%%m-%%d'))]"
help="Entries of this month"/>
<filter icon="gtk-media-rewind"
string=" 7 Days "
separator="1"
domain="[('date','&lt;=', time.strftime('%%Y-%%m-%%d')), ('date','&gt;',(datetime.date.today()-datetime.timedelta(days=7)).strftime('%%Y-%%m-%%d'))]"
help="Entries during last 7 days"/>
<separator orientation="vertical"/>
<filter string="Draft"
icon="terp-account"
domain="[('state','=','draft')]"
help = "Draft tasks"/>
<separator orientation="vertical"/>
<field name="journal_id" widget="selection"/>
<field name="account_id"/>
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
<field name="partner_id" />
</group>
<newline/>
<group expand="1" string="Group By..." colspan="10" col="12">
<filter string="Journal" name="Journal" icon="terp-account" context="{'group_by':'journal_id'}"/>
<filter string="Account" name="Account" icon="terp-account" context="{'group_by':'account_id'}"/>
<filter string="Analytic Account" name="Analytic Account" icon="terp-account" context="{'group_by':'analytic_account_id'}"/>
<filter string="Company" icon="terp-account" context="{'group_by':'company_id'}" groups="base.group_multi_company"/>
<filter string="Partner" icon="terp-account" context="{'group_by':'partner_id'}"/>
<filter string="Product" icon="terp-account" context="{'group_by':'product_id'}"/>
<separator orientation="vertical"/>
<filter string="State" icon="terp-account" context="{'group_by':'state'}"/>
<filter string="State of Move Line" icon="terp-account" context="{'group_by':'state_2'}"/>
<filter string="Period" icon="terp-account" context="{'group_by':'period_id'}"/>
<filter string="Period of Move Line" icon="terp-account" context="{'group_by':'period_id2'}"/>
<filter string="Type" icon="terp-account" context="{'group_by':'type'}"/>
<separator orientation="vertical"/>
<filter string="Day" icon="terp-account" context="{'group_by':'day'}"/>
<filter string="Month" icon="terp-account" context="{'group_by':'month'}"/>
<filter string="Year" icon="terp-account" context="{'group_by':'year'}"/>
</group>
<group expand="0" string="Extended options..." colspan="10" col="12">
<filter string="Posted"
icon="terp-account"
domain="[('state','=','posted')]"
help = "Posted tasks"/>
<field name="state_2"/>
<separator orientation="vertical"/>
<field name="period_id" widget="selection"/>
<field name="period_id2" widget="selection"/>
<field name="type"/>
<field name="product_id" />
<field name="analytic_account_id"/>
<newline/>
<separator orientation="vertical"/>
<field name="date_created"/>
<field name="date"/>
<field name="date_maturity"/>
</group>
</search>
</field>
</record>
<record id="action_account_entries_report_all" model="ir.actions.act_window">
<field name="name">Entries</field>
<field name="res_model">account.entries.report</field>
<field name="view_type">form</field>
<field name="view_mode">tree,graph</field>
<field name="context">{'search_default_This Month':1,'search_default_Journal':1,'group_by_no_leaf':1,'group_by':[]}</field>
<field name="search_view_id" ref="view_account_entries_report_search"/>
</record>
<menuitem action="action_account_entries_report_all" id="menu_action_account_entries_report_all" parent="account.menu_finance_statastic_report_statement" sequence="2"/>
</data>
</openerp>

View File

@ -61,6 +61,13 @@ class account_invoice_report(osv.osv):
('paid','Done'),
('cancel','Cancelled')
], 'Order State', readonly=True),
'date_due': fields.date('Due Date', readonly=True),
'address_contact_id': fields.many2one('res.partner.address', 'Contact Address Name', readonly=True),
'address_invoice_id': fields.many2one('res.partner.address', 'Invoice Address Name', readonly=True),
'account_id': fields.many2one('account.account', 'Account',readonly=True),
'partner_bank': fields.many2one('res.partner.bank', 'Bank Account',readonly=True),
'residual':fields.float('Total Residual', readonly=True),
'delay_to_pay':fields.float('Avg. Delay To Pay', readonly=True, group_operator="avg"),
}
_order = 'date desc'
def init(self, cr):
@ -87,12 +94,24 @@ class account_invoice_report(osv.osv):
(sum(l.quantity*l.price_unit)/sum(l.quantity * u.factor))::decimal(16,2) as price_average,
count(*) as nbr,
s.type as type,
s.state
from
s.state,
s.date_due as date_due,
s.address_contact_id as address_contact_id,
s.address_invoice_id as address_invoice_id,
s.account_id as account_id,
s.partner_bank as partner_bank,
s.residual as residual,
case when s.state != 'paid' then null else
extract(epoch from avg(am.date_created-l.create_date))/(24*60*60)::decimal(16,2)
end as delay_to_pay
from
account_invoice_line l
left join
account_invoice s on (s.id=l.invoice_id)
left join product_uom u on (u.id=l.uos_id)
left join product_uom u on (u.id=l.uos_id),
account_move_line am left join account_invoice i on (i.move_id=am.move_id)
where
am.account_id=i.account_id
group by
s.type,
s.date_invoice,
@ -101,12 +120,18 @@ class account_invoice_report(osv.osv):
l.uos_id,
s.user_id,
s.state,
s.residual,
s.company_id,
s.payment_term,
s.period_id,
s.fiscal_position,
s.currency_id,
s.journal_id
s.journal_id,
s.date_due,
s.address_contact_id,
s.address_invoice_id,
s.account_id,
s.partner_bank
)
""")
account_invoice_report()

View File

@ -17,7 +17,6 @@
<field name="partner_id" invisible="1"/>
<field name="product_id" invisible="1"/>
<field name="product_qty" invisible="1"/>
<!--field name="delay" avg="Days to Close"/-->
<field name="nbr" sum="# of Lines"/>
<field name="price_average" avg="Average Price"/>
<field name="price_total" sum="Total Price"/>
@ -27,6 +26,13 @@
<field name="fiscal_position" invisible="1"/>
<field name="currency_id" invisible="1"/>
<field name="journal_id" invisible="1"/>
<field name="date_due" invisible="1"/>
<field name="address_contact_id" invisible="1"/>
<field name="address_invoice_id" invisible="1"/>
<field name="account_id" invisible="1"/>
<field name="partner_bank" invisible="1"/>
<field name="residual" sum="Total Residual"/>
<field name="delay_to_pay" avg="Avg. Delay To Pay"/>
</tree>
</field>
</record>
@ -49,14 +55,14 @@
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Invoices">
<group>
<filter icon="terp-account" string="This Year"
<group col="10" colspan="12">
<filter icon="gtk-media-rewind" string="Last 365 Days"
domain="[('date','&lt;=', time.strftime('%%Y-%%m-%%d')),('date','&gt;',(datetime.date.today()-datetime.timedelta(days=365)).strftime('%%Y-%%m-%%d'))]"
help="Invoices of the year"/>
<filter icon="terp-account" string="This Month"
help="Invoices of last 365 days"/>
<filter icon="gtk-media-rewind" string="Last 30 Days"
name="month"
domain="[('date','&lt;=', time.strftime('%%Y-%%m-%%d')), ('date','&gt;',(datetime.date.today()-datetime.timedelta(days=30)).strftime('%%Y-%%m-%%d'))]"
help="Invoices of this month"/>
help="Invoices of last 30 days"/>
<filter icon="gtk-media-rewind"
string=" 7 Days "
separator="1"
@ -75,59 +81,63 @@
icon="terp-account"
domain="[('state', '=' ,'open')]"
help = "In progress tasks"/>
<filter string="Done"
icon="terp-account"
domain="[('state','=','paid')]"
help = "Done tasks"/>
<separator orientation="vertical"/>
<field name="product_id"/>
<field name="user_id" widget="selection">
<field name="partner_id"/>
<field name="user_id" widget="selection">
<filter icon="terp-account"
string="Invoices Non Users"
help="Invoices Non Users"
domain="[('user_id','=',False)]"/>
</field>
<field name="partner_id"/>
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
</field>
</group>
<newline/>
<group expand="0" string="Extended options..." colspan="10" col="12">
<filter string="Done"
icon="terp-account"
domain="[('state','=','paid')]"
help = "Done tasks"/>
<filter string="Cancelled"
icon="terp-account"
domain="[('state', '=' ,'cancel')]"
help = "Cancelled tasks"/>
<separator orientation="vertical"/>
<field name="payment_term" widget="selection"/>
<field name="currency_id" widget="selection"/>
<field name="journal_id" widget="selection"/>
<newline/>
<field name="type"/>
<field name="period_id" widget="selection"/>
<field name="fiscal_position" widget="selection"/>
<field name="date"/>
</group>
<newline/>
<group expand="1" string="Group By..." colspan="10" col="12">
<filter string="Company" icon="terp-account" context="{'group_by':'company_id'}" groups="base.group_multi_company"/>
<newline/>
<group expand="1" string="Group By...">
<filter string="Salesman" name='User' icon="terp-account" context="{'group_by':'user_id'}"/>
<filter string="Payment Term" icon="terp-account" context="{'group_by':'payment_term'}"/>
<separator orientation="vertical"/>
<filter string="Currency" icon="terp-account" context="{'group_by':'currency_id'}"/>
<filter string="Journal" icon="terp-account" context="{'group_by':'journal_id'}"/>
<filter string="Partner" icon="terp-account" context="{'group_by':'partner_id'}"/>
<filter string="Product" icon="terp-account" context="{'group_by':'product_id'}"/>
<separator orientation="vertical"/>
<filter string="Partner" icon="terp-account" context="{'group_by':'partner_id'}"/>
<filter string="Type" icon="terp-account" context="{'group_by':'type'}"/>
<filter string="Company" icon="terp-account" context="{'group_by':'company_id'}" groups="base.group_multi_company"/>
<filter string="State" icon="terp-account" context="{'group_by':'state'}"/>
<filter string="Type" icon="terp-account" context="{'group_by':'type'}"/>
<separator orientation="vertical"/>
<filter string="Journal" icon="terp-account" context="{'group_by':'journal_id'}"/>
<filter string="Account" icon="terp-account" context="{'group_by':'account_id'}"/>
<filter string="Bank Account" icon="terp-account" context="{'group_by':'partner_bank'}"/>
<separator orientation="vertical"/>
<filter string="Currency" icon="terp-account" context="{'group_by':'currency_id'}"/>
<filter string="Payment Term" icon="terp-account" context="{'group_by':'payment_term'}"/>
<filter string="Force Period" icon="terp-account" context="{'group_by':'period_id'}"/>
<filter string="Fiscal Position" icon="terp-account" context="{'group_by':'fiscal_position'}"/>
<separator orientation="vertical"/>
<newline/>
<filter string="Day" icon="terp-account" context="{'group_by':'day'}"/>
<filter string="Month" icon="terp-account" context="{'group_by':'date'}"/>
<filter string="Month" icon="terp-account" context="{'group_by':'month'}"/>
<filter string="Year" icon="terp-account" context="{'group_by':'year'}"/>
</group>
<newline/>
<group expand="0" string="Extended options..." groups="base.group_extended">
<field name="type"/>
<field name="currency_id" widget="selection"/>
<field name="partner_bank" widget="selection"/>
<field name="fiscal_position" widget="selection"/>
<separator orientation="vertical"/>
<field name="address_contact_id"/>
<field name="account_id"/>
<newline/>
<field name="payment_term" widget="selection"/>
<field name="journal_id" widget="selection"/>
<field name="period_id" widget="selection"/>
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
<separator orientation="vertical"/>
<field name="address_invoice_id"/>
<field name="product_id"/>
<newline/>
<field name="date" string="Date Invoiced"/>
<field name="date_due"/>
</group>
</search>
</field>
</record>
@ -141,7 +151,7 @@
<field name="search_view_id" ref="view_account_invoice_report_search"/>
</record>
<menuitem action="action_account_invoice_report_all" id="menu_action_account_invoice_report_all" parent="account.menu_finance_reporting" sequence="0"/>
<menuitem action="action_account_invoice_report_all" id="menu_action_account_invoice_report_all" parent="account.menu_finance_statastic_report_statement" sequence="0"/>
</data>
</openerp>

View File

@ -47,7 +47,7 @@
<field name="view_type">form</field>
<field name="view_mode">tree,graph</field>
</record>
<menuitem action="action_account_receivable_graph" id="menu_account_receivable_graph" parent="account.menu_finance_reporting"/>
<!-- <menuitem action="action_account_receivable_graph" id="menu_account_receivable_graph" parent="account.menu_finance_reporting"/> -->
<!-- Report for Aged Receivable -->
@ -116,7 +116,7 @@
</record>
<!-- <menuitem id="menu_report_this_month" name="This Month" parent="account.menu_finance_reporting"/>-->
<menuitem id="menu_report_all_months" name="Sales by Account" parent="account.menu_finance_reporting"/>
<!-- <menuitem id="menu_report_all_months" name="Sales by Account" parent="account.menu_finance_reporting"/> -->
<!-- Report of the sales by product and account -->
<record id="view_report_account_sales_tree" model="ir.ui.view">
<field name="name">report.account.sales.tree</field>
@ -169,7 +169,7 @@
<field name="view_mode">graph,tree</field>
<field name="search_view_id" ref="view_report_account_sales_search"/>
</record>
<menuitem action="action_report_account_sales_tree_all" id="menu_report_account_sales_all" parent="menu_report_all_months"/>
<!-- <menuitem action="action_report_account_sales_tree_all" id="menu_report_account_sales_all" parent="menu_report_all_months"/> -->
<!-- Report of the sales by product and account type -->
<record id="view_report_account_type_sales_tree" model="ir.ui.view">
@ -237,7 +237,7 @@
<field name="view_mode">graph,tree</field>
<field name="search_view_id" ref="view_report_account_type_sales_search"/>
</record>
<menuitem action="action_report_account_type_sales_tree_all" id="menu_report_account_type_sales_all" parent="menu_report_all_months"/>
<!-- <menuitem action="action_report_account_type_sales_tree_all" id="menu_report_account_type_sales_all" parent="menu_report_all_months"/> -->
</data>
</openerp>

View File

@ -0,0 +1,62 @@
# -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2008 Tiny SPRL (<http://tiny.be>). All Rights Reserved
# $Id$
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU 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 General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import time
from report import report_sxw
from tools import amount_to_text_en
class report_voucher_move(report_sxw.rml_parse):
def __init__(self, cr, uid, name, context):
super(report_voucher_move, self).__init__(cr, uid, name, context)
self.localcontext.update({
'time': time,
'convert':self.convert,
'debit':self.debit,
'credit':self.credit,
#'get_ref' : self._get_ref
})
self.user=uid
def convert(self,amount):
user_id = self.pool.get('res.users').browse(self.cr, self.user,[self.user])[0]
cur = user_id.company_id.currency_id.name
amt_en = amount_to_text_en.amount_to_text(amount,'en',cur);
return amt_en
def debit(self, move_ids):
debit = 0.0
for move in move_ids:
debit +=move.debit
return debit
def credit(self, move_ids):
credit = 0.0
for move in move_ids:
credit +=move.credit
return credit
report_sxw.report_sxw(
'report.account.move.voucher',
'account.move',
'addons/account/report/voucher_print.rml',
parser=report_voucher_move,header=False
)

View File

@ -0,0 +1,436 @@
<?xml version="1.0"?>
<document filename="test.pdf">
<template pageSize="(595.0,842.0)" title="Test" author="Martin Simon" allowSplitting="20">
<pageTemplate id="first">
<frame id="first" x1="57.0" y1="57.0" width="481" height="728"/>
</pageTemplate>
</template>
<stylesheet>
<blockTableStyle id="Standard_Outline">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
</blockTableStyle>
<blockTableStyle id="Table1">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
</blockTableStyle>
<blockTableStyle id="Heading1">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="0,0" stop="0,0"/>
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="0,-1" stop="0,-1"/>
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="1,0" stop="1,-1"/>
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="1,0" stop="1,0"/>
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="1,-1" stop="1,-1"/>
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="2,0" stop="2,-1"/>
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="2,0" stop="2,0"/>
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="2,-1" stop="2,-1"/>
</blockTableStyle>
<blockTableStyle id="Table2">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
</blockTableStyle>
<blockTableStyle id="last_info">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="0,6" stop="0,6"/>
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="0,-1" stop="0,-1"/>
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="1,6" stop="1,-1"/>
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="1,6" stop="1,6"/>
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="1,-1" stop="1,-1"/>
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="2,6" stop="2,-1"/>
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="2,6" stop="2,6"/>
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="2,-1" stop="2,-1"/>
</blockTableStyle>
<blockTableStyle id="Table3">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
</blockTableStyle>
<initialize>
<paraStyle name="all" alignment="justify"/>
</initialize>
<paraStyle name="P1" fontName="Helvetica"/>
<paraStyle name="P2" fontName="Helvetica-Bold" fontSize="13.0" leading="16" alignment="CENTER"/>
<paraStyle name="P3" fontName="Helvetica" fontSize="10.0" leading="13" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P4" fontName="Helvetica" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P5" fontName="Helvetica-Bold" fontSize="10.0" leading="13" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P6" fontName="Helvetica-Bold" fontSize="22.0" leading="27" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P7" fontName="Helvetica" fontSize="11.0" leading="14" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P8" fontName="Helvetica" fontSize="11.0" leading="14" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P9" fontName="Helvetica-Bold" fontSize="11.0" leading="14" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P10" fontName="Helvetica-Bold" fontSize="11.0" leading="14" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P11" fontName="Helvetica-Bold" fontSize="11.0" leading="14" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P12" fontName="Helvetica-Bold" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P13" fontName="Helvetica" fontSize="10.0" leading="13" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P14" fontName="Helvetica-Bold" spaceBefore="0.0" spaceAfter="0.0" textColor="#000000"/>
<paraStyle name="P15" fontName="Helvetica" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P16" fontName="Helvetica-Bold" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P17" fontName="Helvetica-Bold" fontSize="10.0" leading="13" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P18" fontName="Helvetica" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P19" fontName="Helvetica" fontSize="10.0" leading="13" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0" textColor="#000000"/>
<paraStyle name="P20" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P21" fontName="Helvetica-Bold" fontSize="13.0" leading="16" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P22" rightIndent="0.0" leftIndent="35.0" fontName="Helvetica" fontSize="10.0" leading="13" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P23" rightIndent="0.0" leftIndent="35.0" fontName="Helvetica" fontSize="10.0" leading="13" spaceBefore="0.0" spaceAfter="0.0" textColor="#000000"/>
<paraStyle name="P24" rightIndent="0.0" leftIndent="35.0" fontName="Helvetica" fontSize="10.0" leading="13" spaceBefore="0.0" spaceAfter="0.0" textColor="#000000"/>
<paraStyle name="P25" rightIndent="0.0" leftIndent="35.0" fontName="Helvetica" fontSize="10.0" leading="13" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P26" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="10.0" leading="13" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P27" fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0" textColor="#000000"/>
<paraStyle name="P28" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="Standard" fontName="Helvetica"/>
<paraStyle name="Heading" fontName="Helvetica" fontSize="14.0" leading="17" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="Text body" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="List" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="Caption" fontName="Helvetica" fontSize="12.0" leading="15" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="Index" fontName="Helvetica"/>
<paraStyle name="Table Contents" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="Table Heading" fontName="Helvetica" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="terp_header" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="terp_default_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Bold_8" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Bold_9" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_tblheader_General" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="terp_tblheader_General_Centre" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="terp_default_Centre_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_tblheader_Details" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="Footer" fontName="Helvetica"/>
<paraStyle name="Horizontal Line" fontName="Helvetica" fontSize="6.0" leading="8" spaceBefore="0.0" spaceAfter="14.0"/>
<paraStyle name="Heading 9" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="terp_tblheader_General_Right" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="terp_tblheader_Details_Centre" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_tblheader_Details_Right" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Right_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_header_Right" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="terp_header_Centre" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="CENTER" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="terp_default_address" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Centre_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Right_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_1" fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Right_9_Bold" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_8_Italic" fontName="Helvetica-Oblique" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="Drawing" fontName="Helvetica" fontSize="12.0" leading="15" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="Header" fontName="Helvetica"/>
<paraStyle name="Endnote" rightIndent="0.0" leftIndent="14.0" fontName="Helvetica" fontSize="10.0" leading="13"/>
<paraStyle name="Addressee" fontName="Helvetica" spaceBefore="0.0" spaceAfter="3.0"/>
<paraStyle name="Signature" fontName="Helvetica"/>
<paraStyle name="Heading 8" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="Heading 7" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="Heading 6" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="Heading 5" fontName="Helvetica-Bold" fontSize="85%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="Heading 4" fontName="Helvetica-BoldOblique" fontSize="85%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="Heading 1" fontName="Helvetica-Bold" fontSize="115%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="Heading 10" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="Heading 2" fontName="Helvetica-BoldOblique" fontSize="14.0" leading="17" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="First line indent" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="Hanging indent" rightIndent="0.0" leftIndent="28.0" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="Salutation" fontName="Helvetica"/>
<paraStyle name="Text body indent" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="Heading 3" fontName="Helvetica-Bold" fontSize="14.0" leading="17" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="List Indent" rightIndent="0.0" leftIndent="142.0" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="Marginalia" rightIndent="0.0" leftIndent="113.0" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="terp_default_9_30" rightIndent="0.0" leftIndent="9.0" fontName="Helvetica" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<images/>
</stylesheet>
<story>
<para style="P5">[[ repeatIn(objects,'voucher') ]]</para>
<para style="P6">[[ company.name ]]</para>
<para style="P8">[[ company.partner_id.address and company.partner_id.address[0].street ]]</para>
<para style="P8">[[ company.partner_id.address and company.partner_id.address[0].zip ]] [[ company.partner_id.address and company.partner_id.address[0].city ]] - [[ company.partner_id.address and company.partner_id.address[0].country_id and company.partner_id.address[0].country_id.name ]]</para>
<para style="P8">[[ company.partner_id.address and company.partner_id.address[0].phone ]]</para>
<para style="P8">[[ company.partner_id.address and company.partner_id.address[0].email ]]</para>
<para style="P7">
<font color="white"> </font>
</para>
<para style="P21">Cash Receipt Voucher [[ (voucher.type == 'rec_voucher' or removeParentNode('para')) and '' ]]</para>
<para style="P2">Cash Payment Voucher [[ (voucher.type == 'pay_voucher' or removeParentNode('para')) and '' ]]</para>
<para style="P21">Bank Receipt Voucher [[ (voucher.type == 'bank_rec_voucher' or removeParentNode('para')) and '' ]]</para>
<para style="P2">Bank Payment Voucher [[ (voucher.type == 'bank_pay_voucher' or removeParentNode('para')) and '' ]]</para>
<para style="P2">Contra Voucher [[ (voucher.type == 'cont_voucher' or removeParentNode('para')) and '' ]]</para>
<para style="P2">Journal Sale Voucher [[ (voucher.type == 'journal_sale_vou' or removeParentNode('para')) and '' ]]</para>
<para style="P2">Journal Purchase Voucher [[ (voucher.type == 'journal_pur_voucher' or removeParentNode('para')) and '' ]]</para>
<para style="P2">Journal Voucher [[ (voucher.type == 'journal_voucher' or removeParentNode('para')) and '' ]]</para>
<para style="P20">
<font color="white"> </font>
</para>
<blockTable colWidths="49.0,143.0,116.0,69.0,106.0" style="Table1">
<tr>
<td>
<para style="P12">Name:</para>
</td>
<td>
<para style="P13">[[ voucher.name ]]</para>
</td>
<td>
<para style="P4">
<font color="white"> </font>
</para>
</td>
<td>
<para style="P12">Dated :</para>
</td>
<td>
<para style="P13">[[ time.strftime('%d %B,%Y', time.strptime(voucher.date , '%Y-%m-%d')) or '' ]]</para>
</td>
</tr>
<tr>
<td>
<para style="P12">State :</para>
</td>
<td>
<para style="P3">PRO-FORMA [[ ((voucher.state == 'proforma') or removeParentNode('para')) and '' ]]</para>
<para style="P3">Draft[[ ((voucher.state == 'draft') or removeParentNode('para')) and '' ]]</para>
<para style="P3">Canceled [[ ((voucher.state == 'cancel') or removeParentNode('para')) and '' ]]</para>
<para style="P3">Posted [[ ((voucher.state == 'posted') or removeParentNode('para')) and '' ]]</para>
</td>
<td>
<para style="P4">
<font color="white"> </font>
</para>
</td>
<td>
<para style="P12">Ref. :</para>
</td>
<td>
<para style="P13">[[ voucher.ref]]</para>
</td>
</tr>
</blockTable>
<para style="P15">
<font color="white"> </font>
</para>
<para style="P15">
<font color="white"> </font>
</para>
<blockTable colWidths="275.0,106.0,102.0" style="Heading1">
<tr>
<td>
<para style="terp_tblheader_Details">Particulars</para>
</td>
<td>
<para style="terp_tblheader_Details_Right">Debit</para>
</td>
<td>
<para style="terp_tblheader_Details_Right">Credit</para>
</td>
</tr>
</blockTable>
<para style="terp_default_1">
<font color="white"> </font>
</para>
<section>
<para style="terp_default_8">[[ repeatIn(voucher.line_id,'line_id') ]]</para>
<blockTable colWidths="274.0,106.0,102.0" style="Table2">
<tr>
<td>
<para style="terp_default_Bold_9">[[ (line_id.partner_id and line_id.partner_id.name) or 'Account']]</para>
</td>
<td>
<para style="terp_default_Right_9_Bold">[[ formatLang(line_id.debit) ]]</para>
</td>
<td>
<para style="terp_default_Right_9_Bold">[[ formatLang(line_id.credit) ]]</para>
</td>
</tr>
<tr>
<td>
<para style="terp_default_9_30">[[ line_id.account_id.name ]] </para>
</td>
<td>
<para style="terp_default_9">
<font color="white"> </font>
</para>
</td>
<td>
<para style="terp_default_9">
<font color="white"> </font>
</para>
</td>
</tr>
<tr>
<td>
<para style="terp_default_9_30">[[ line_id.name ]]-[[voucher.ref]]</para>
</td>
<td>
<para style="terp_default_9">
<font color="white"> </font>
</para>
</td>
<td>
<para style="terp_default_9">
<font color="white"> </font>
</para>
</td>
</tr>
</blockTable>
<para style="terp_default_1">
<font color="white"> </font>
</para>
</section>
<para style="terp_default_9">
<font color="white"> </font>
</para>
<blockTable colWidths="275.0,106.0,102.0" style="last_info">
<tr>
<td>
<para style="P16">Through : </para>
</td>
<td>
<para style="P4">
<font color="white"> </font>
</para>
</td>
<td>
<para style="P4">
<font color="white"> </font>
</para>
</td>
</tr>
<tr>
<td>
<para style="P22">[[ voucher.narration or '']]</para>
</td>
<td>
<para style="P4">
<font color="white"> </font>
</para>
</td>
<td>
<para style="P4">
<font color="white"> </font>
</para>
</td>
</tr>
<tr>
<td>
<para style="P16">On Account of : </para>
</td>
<td>
<para style="P4">
<font color="white"> </font>
</para>
</td>
<td>
<para style="P4">
<font color="white"> </font>
</para>
</td>
</tr>
<tr>
<td>
<para style="P25">[[ voucher.line_id and voucher.line_id.name and voucher.line_id.name[1] or removeParentNode('para') ]]</para>
</td>
<td>
<para style="P4">
<font color="white"> </font>
</para>
</td>
<td>
<para style="P4">
<font color="white"> </font>
</para>
</td>
</tr>
<tr>
<td>
<para style="P16">Amount (in words) : </para>
</td>
<td>
<para style="P16">
<font color="white"> </font>
</para>
</td>
<td>
<para style="P16">
<font color="white"> </font>
</para>
</td>
</tr>
<tr>
<td>
<para style="P26">[[ convert(voucher.amount) ]]</para>
</td>
<td>
<para style="P15">
<font color="white"> </font>
</para>
</td>
<td>
<para style="P15">
<font color="white"> </font>
</para>
</td>
</tr>
<tr>
<td>
<para style="P17">
<font color="white"> </font>
</para>
</td>
<td>
<para style="terp_tblheader_Details_Right">[[ formatLang(debit(voucher.line_id))]]</para>
</td>
<td>
<para style="terp_tblheader_Details_Right">[[ formatLang(credit(voucher.line_id)) ]]</para>
</td>
</tr>
</blockTable>
<para style="P18">
<font color="white"> </font>
</para>
<blockTable colWidths="142.0,99.0,105.0,136.0" style="Table3">
<tr>
<td>
<para style="P9">
<font color="white"> </font>
</para>
<para style="P9">
<font color="white"> </font>
</para>
<para style="P9">
<font color="white"> </font>
</para>
<para style="P9">
<font color="white"> </font>
</para>
</td>
<td>
<para style="P9">
<font color="white"> </font>
</para>
</td>
<td>
<para style="P10">
<font color="white"> </font>
</para>
</td>
<td>
<para style="P11">
<font color="white"> </font>
</para>
</td>
</tr>
<tr>
<td>
<para style="P20">Receiver's Signature</para>
</td>
<td>
<para style="P20">
<font color="white"> </font>
</para>
</td>
<td>
<para style="P20">
<font color="white"> </font>
</para>
</td>
<td>
<para style="P20">Authorised Signatory</para>
</td>
</tr>
</blockTable>
<para style="P1">
<font color="white"> </font>
</para>
</story>
</document>

166
addons/account/rml_parse.py Executable file
View File

@ -0,0 +1,166 @@
# -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2008 Tiny SPRL (<http://tiny.be>). All Rights Reserved
# $Id$
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU 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 General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
from report import report_sxw
import xml.dom.minidom
import os, time
import osv
import re
import tools
import pooler
import re
import sys
class rml_parse(report_sxw.rml_parse):
def __init__(self, cr, uid, name, context):
super(rml_parse, self).__init__(cr, uid, name, context=None)
self.localcontext.update({
'comma_me': self.comma_me,
'format_date': self._get_and_change_date_format_for_swiss,
'strip_name' : self._strip_name,
'explode_name' : self._explode_name,
})
def comma_me(self,amount):
#print "#" + str(amount) + "#"
if not amount:
amount = 0.0
if type(amount) is float :
amount = str('%.2f'%amount)
else :
amount = str(amount)
if (amount == '0'):
return ' '
orig = amount
new = re.sub("^(-?\d+)(\d{3})", "\g<1>'\g<2>", amount)
if orig == new:
return new
else:
return self.comma_me(new)
def _ellipsis(self, string, maxlen=100, ellipsis = '...'):
ellipsis = ellipsis or ''
try:
return string[:maxlen - len(ellipsis) ] + (ellipsis, '')[len(string) < maxlen]
except Exception, e:
return False
def _strip_name(self, name, maxlen=50):
return self._ellipsis(name, maxlen, '...')
def _get_and_change_date_format_for_swiss (self,date_to_format):
date_formatted=''
if date_to_format:
date_formatted = strptime (date_to_format,'%Y-%m-%d').strftime('%d.%m.%Y')
return date_formatted
def _explode_name(self,chaine,length):
# We will test if the size is less then account
full_string = ''
if (len(str(chaine)) <= length):
return chaine
#
else:
chaine = unicode(chaine,'utf8').encode('iso-8859-1')
rup = 0
for carac in chaine:
rup = rup + 1
if rup == length:
full_string = full_string + '\n'
full_string = full_string + carac
rup = 0
else:
full_string = full_string + carac
return full_string
def makeAscii(self,str):
try:
Stringer = str.encode("utf-8")
except UnicodeDecodeError:
try:
Stringer = str.encode("utf-16")
except UnicodeDecodeError:
print "UTF_16 Error"
Stringer = str
else:
return Stringer
else:
return Stringer
return Stringer
def explode_this(self,chaine,length):
#chaine = self.repair_string(chaine)
chaine = rstrip(chaine)
ast = list(chaine)
i = length
while i <= len(ast):
ast.insert(i,'\n')
i = i + length
chaine = str("".join(ast))
return chaine
def repair_string(self,chaine):
ast = list(chaine)
UnicodeAst = []
_previouslyfound = False
i = 0
#print str(ast)
while i < len(ast):
elem = ast[i]
try:
Stringer = elem.encode("utf-8")
except UnicodeDecodeError:
to_reencode = elem + ast[i+1]
print str(to_reencode)
Good_char = to_reencode.decode('utf-8')
UnicodeAst.append(Good_char)
i += i +2
else:
UnicodeAst.append(elem)
i += i + 1
return "".join(UnicodeAst)
def ReencodeAscii(self,str):
print sys.stdin.encoding
try:
Stringer = str.decode("ascii")
except UnicodeEncodeError:
print "REENCODING ERROR"
return str.encode("ascii")
except UnicodeDecodeError:
print "DECODING ERROR"
return str.encode("ascii")
else:
print Stringer
return Stringer
def _add_header(self, node, header=1):
if header==2:
rml_head = self.rml_header2
else:
rml_head = self.rml_header
rml_head = rml_head.replace('<pageGraphics>','''<pageGraphics> <image x="10" y="26cm" height="770.0" width="1120.0" >[[company.logo]] </image> ''')
return True

View File

@ -8,7 +8,7 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Print Aged Trial Balance">
<field name="company_id"/>
<field name="company_id" groups="base.group_multi_company"/>
<newline/>
<field name="date1"/>
<field name="period_length"/>

View File

@ -8,7 +8,7 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Select period">
<field name="company_id"/>
<field name="company_id" groups="base.group_multi_company"/>
<field name="display_account" required = "True"/>
<newline/>
<field name="fiscalyear"/>

View File

@ -24,7 +24,7 @@ from tools.translate import _
class account_chart(osv.osv_memory):
"""
For Chart of Accounrs
"""
"""
_name = "account.chart"
_description = "chart"
_columns = {

View File

@ -8,7 +8,7 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Select Date-Period">
<field name="company_id" colspan="4"/>
<field name="company_id" colspan="4" groups="base.group_multi_company"/>
<newline/>
<field name="fiscalyear"/>
<label colspan="2" string="(Keep empty for all open fiscal years)" align="0.0"/>

View File

@ -8,7 +8,7 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Select Date-Period">
<field name="company_id"/>
<field name="company_id" groups="base.group_multi_company"/>
<field name="result_selection" required = "True"/>
<newline/>
<field name="fiscalyear"/>

View File

@ -8,7 +8,7 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Select Date-Period">
<field name="company_id"/>
<field name="company_id" groups="base.group_multi_company"/>
<field name="result_selection"/>
<newline/>
<field name="fiscalyear"/>

View File

@ -29,7 +29,7 @@ class account_unreconcile(osv.osv_memory):
obj_move_reconcile = self.pool.get('account.move.reconcile')
if context is None:
context = {}
recs = pool.get('account.move.line').read(cr, uid, data['ids'], ['reconcile_id','reconcile_partial_id'])
recs = obj_move_line.read(cr, uid, context['active_ids'], ['reconcile_id','reconcile_partial_id'])
unlink_ids = []
full_recs = filter(lambda x: x['reconcile_id'], recs)
rec_ids = [rec['reconcile_id'][0] for rec in full_recs]
@ -37,9 +37,9 @@ class account_unreconcile(osv.osv_memory):
part_rec_ids = [rec['reconcile_partial_id'][0] for rec in part_recs]
unlink_ids += rec_ids
unlink_ids += part_rec_ids
if len(unlink_ids):
pooler.get_pool(cr.dbname).get('account.move.reconcile').unlink(cr, uid, unlink_ids)
self.pool.get('account.move.reconcile').unlink(cr, uid, unlink_ids)
return {}
account_unreconcile()

View File

@ -8,7 +8,7 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Select Period">
<field name="company_id"/>
<field name="company_id" groups="base.group_multi_company"/>
<newline/>
<field name="based_on"/>
<newline/>

View File

@ -8,13 +8,13 @@ msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2010-03-12 13:35+0000\n"
"Last-Translator: Cédric VALMARY (Per Tot en òc) <cvalmary@yahoo.fr>\n"
"PO-Revision-Date: 2010-05-24 12:18+0000\n"
"Last-Translator: Cédric VALMARY (Tot en òc) <cvalmary@yahoo.fr>\n"
"Language-Team: Occitan (post 1500) <oc@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-04-17 04:11+0000\n"
"X-Launchpad-Export-Date: 2010-05-25 03:42+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_analytic_analysis
@ -27,12 +27,12 @@ msgstr ""
#. module: account_analytic_analysis
#: model:ir.model,name:account_analytic_analysis.model_account_analytic_analysis_summary_user
msgid "Hours summary by user"
msgstr ""
msgstr "Resumit de las oras per utilizaire"
#. module: account_analytic_analysis
#: field:account.analytic.account,last_invoice_date:0
msgid "Last Invoice Date"
msgstr ""
msgstr "Data de la darrièra factura"
#. module: account_analytic_analysis
#: help:account.analytic.account,remaining_ca:0
@ -47,13 +47,13 @@ msgstr ""
#. module: account_analytic_analysis
#: model:ir.ui.menu,name:account_analytic_analysis.menu_action_account_analytic_all
msgid "All Analytic Accounts"
msgstr ""
msgstr "Totes los comptes analitics"
#. module: account_analytic_analysis
#: model:ir.actions.act_window,name:account_analytic_analysis.action_account_analytic_managed_open
#: model:ir.ui.menu,name:account_analytic_analysis.menu_analytic_account_to_valid_open
msgid "My Current Accounts"
msgstr ""
msgstr "Mos comptes gerits"
#. module: account_analytic_analysis
#: constraint:ir.ui.view:0
@ -68,12 +68,12 @@ msgstr ""
#. module: account_analytic_analysis
#: field:account.analytic.account,ca_theorical:0
msgid "Theorical Revenue"
msgstr ""
msgstr "Revengut teoric"
#. module: account_analytic_analysis
#: constraint:ir.actions.act_window:0
msgid "Invalid model name in the action definition."
msgstr ""
msgstr "Nom del Modèl invalid per la definicion de l'accion."
#. module: account_analytic_analysis
#: help:account.analytic.account,theorical_margin:0
@ -85,6 +85,8 @@ msgstr ""
msgid ""
"The Object name must start with x_ and not contain any special character !"
msgstr ""
"Lo nom de l'objècte deu començar amb x_ e conténer pas de caractèrs "
"especials !"
#. module: account_analytic_analysis
#: model:ir.actions.act_window,name:account_analytic_analysis.action_account_analytic_new
@ -95,7 +97,7 @@ msgstr ""
#. module: account_analytic_analysis
#: field:account.analytic.account,theorical_margin:0
msgid "Theorical Margin"
msgstr ""
msgstr "Marge teoric"
#. module: account_analytic_analysis
#: field:account.analytic.account,real_margin_rate:0
@ -123,7 +125,7 @@ msgstr ""
#. module: account_analytic_analysis
#: model:ir.ui.menu,name:account_analytic_analysis.menu_invoicing
msgid "Invoicing"
msgstr ""
msgstr "Facturacion"
#. module: account_analytic_analysis
#: field:account.analytic.account,last_worked_date:0
@ -145,7 +147,7 @@ msgstr ""
#. module: account_analytic_analysis
#: field:account.analytic.account,remaining_hours:0
msgid "Remaining Hours"
msgstr ""
msgstr "Oras que demòran"
#. module: account_analytic_analysis
#: help:account.analytic.account,ca_theorical:0
@ -165,7 +167,7 @@ msgstr "Utilizaire"
#: model:ir.actions.act_window,name:account_analytic_analysis.action_account_analytic_managed_pending
#: model:ir.ui.menu,name:account_analytic_analysis.menu_analytic_account_to_valid_pending
msgid "My Pending Accounts"
msgstr ""
msgstr "Mos comptes en espèra"
#. module: account_analytic_analysis
#: model:ir.actions.act_window,name:account_analytic_analysis.action_hr_tree_invoiced_my
@ -200,7 +202,7 @@ msgstr ""
#. module: account_analytic_analysis
#: field:account.analytic.account,hours_quantity:0
msgid "Hours Tot"
msgstr ""
msgstr "Total de las oras"
#. module: account_analytic_analysis
#: model:ir.ui.menu,name:account_analytic_analysis.menu_account

View File

@ -47,7 +47,7 @@ class account_analytic_default(osv.osv):
domain += ['|',('partner_id','=',partner_id)]
domain += [('partner_id','=',False)]
if user_id:
domain += ['|',('user_id','=',uid)]
domain += ['|',('user_id','=',user_id)]
domain += [('user_id','=',False)]
if date:
domain += ['|',('date_start','<=',date),('date_start','=',False)]

View File

@ -0,0 +1,23 @@
# Thai translation for openobject-addons
# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2010-05-20 04:33+0000\n"
"Last-Translator: Songpon Phusing <p.songpon@gmail.com>\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: 2010-05-21 03:38+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_chart
#: model:ir.module.module,description:account_chart.module_meta_information
msgid "Remove minimal account chart"
msgstr "ทำการลบตัวอย่างผังบัญชีแบบง่าย"

View File

@ -0,0 +1,25 @@
# -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import coda
import wizard
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -0,0 +1,39 @@
# -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 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":"Account CODA - import bank statements from coda file",
"version":"1.0",
"author":"Tiny",
"category":"Account CODA",
"description":"""Module provides functionality to import
bank statements from coda files.
""",
"depends":["base", "account"],
"demo_xml":["coda_demo.xml"],
"init_xml":[],
"update_xml" : ["security/ir.model.access.csv","coda_wizard.xml","coda_view.xml"],
"active":False,
"installable":True,
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -0,0 +1,50 @@
# -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import time
from osv import osv,fields
class account_coda(osv.osv):
_name = "account.coda"
_description = "coda for an Account"
_columns = {
'name': fields.binary('Coda file', readonly=True),
'statement_ids': fields.one2many('account.bank.statement','coda_id','Generated Bank Statement', readonly=True),
'note': fields.text('Import log', readonly=True),
'journal_id': fields.many2one('account.journal','Bank Journal', readonly=True,select=True),
'date': fields.date('Import Date', readonly=True,select=True),
'user_id': fields.many2one('res.users','User', readonly=True, select=True),
}
_defaults = {
'date': lambda *a: time.strftime('%Y-%m-%d'),
'user_id': lambda self,cr,uid,context: uid,
}
account_coda()
class account_bank_statement(osv.osv):
_inherit = "account.bank.statement"
_columns = {
'coda_id':fields.many2one('account.coda','Coda'),
}
account_bank_statement()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

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

View File

@ -0,0 +1,63 @@
<?xml version="1.0" ?>
<openerp>
<data>
<record model="ir.ui.view" id="view_account_coda_form">
<field name="name">account.coda.form</field>
<field name="model">account.coda</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Coda import">
<field name="name" />
<field name="journal_id" />
<field name="date" />
<field name="user_id" />
<notebook colspan="4">
<page string="Log">
<field name="note" colspan="4"/>
</page>
<page string="Statements">
<field name="statement_ids" colspan="4"/>
</page>
</notebook>
</form>
</field>
</record>
<record model="ir.ui.view" id="view_account_coda_tree">
<field name="name">account.coda.tree</field>
<field name="model">account.coda</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Coda import">
<field name="journal_id" />
<field name="date" />
<field name="user_id" />
</tree>
</field>
</record>
<record model="ir.actions.act_window" id="action_account_coda">
<field name="name">Coda import</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">account.coda</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
</record>
<menuitem name="Coda Statements" parent="account.menu_finance_reporting" id="menu_account_coda" action="action_account_coda" sequence="12"/>
<menuitem name="Import Coda Statements" action="wizard_account_coda_import" parent="account.menu_finance_periodical_processing"
type="wizard" id="menu_account_coda_wizard" sequence="15"/>
<act_window name="Coda File"
domain="[('statement_ids', 'in', [active_id])]"
res_model="account.coda"
src_model="account.bank.statement"
view_type="form"
view_mode="tree,form"
id="act_account_payment_account_bank_statement"/>
</data>
</openerp>

View File

@ -0,0 +1,13 @@
<?xml version="1.0" ?>
<openerp>
<data>
<wizard
string="Import Coda File"
model="account.bank.statement"
name="account.coda_import"
id="wizard_account_coda_import"
menu="False"
/>
</data>
</openerp>

View File

@ -0,0 +1,163 @@
# Translation of OpenERP Server.
# This file contains the translation of the following modules:
# * account_coda
#
msgid ""
msgstr ""
"Project-Id-Version: OpenERP Server 5.0.6\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-11-24 13:11:29+0000\n"
"PO-Revision-Date: 2009-11-24 13:11:29+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: account_coda
#: field:account.coda,journal_id:0
#: wizard_field:account.coda_import,init,journal_id:0
msgid "Bank Journal"
msgstr ""
#. module: account_coda
#: constraint:ir.model:0
msgid "The Object name must start with x_ and not contain any special character !"
msgstr ""
#. module: account_coda
#: wizard_field:account.coda_import,extraction,note:0
msgid "Log"
msgstr ""
#. module: account_coda
#: wizard_button:account.coda_import,extraction,open:0
msgid "_Open Statement"
msgstr ""
#. module: account_coda
#: model:ir.module.module,shortdesc:account_coda.module_meta_information
msgid "Account CODA"
msgstr ""
#. module: account_coda
#: field:account.coda,name:0
msgid "Coda file"
msgstr ""
#. module: account_coda
#: wizard_view:account.coda_import,init:0
msgid "Clic on 'New' to select your file :"
msgstr ""
#. module: account_coda
#: model:ir.actions.wizard,name:account_coda.wizard_account_coda_import
msgid "Import Coda File"
msgstr ""
#. module: account_coda
#: constraint:ir.actions.act_window:0
msgid "Invalid model name in the action definition."
msgstr ""
#. module: account_coda
#: field:account.coda,note:0
msgid "Import log"
msgstr ""
#. module: account_coda
#: wizard_field:account.coda_import,init,def_receivable:0
msgid "Default receivable Account"
msgstr ""
#. module: account_coda
#: model:ir.module.module,description:account_coda.module_meta_information
msgid "Module provides functionality to import\n"
" bank statements from .csv file.\n"
" Import coda file wizard is used to import bank statements."
msgstr ""
#. module: account_coda
#: wizard_button:account.coda_import,extraction,end:0
msgid "_Close"
msgstr ""
#. module: account_coda
#: field:account.coda,statement_id:0
msgid "Generated Bank Statement"
msgstr ""
#. module: account_coda
#: view:account.coda:0
#: model:ir.actions.act_window,name:account_coda.act_account_payment_account_bank_statement
#: model:ir.actions.act_window,name:account_coda.action_account_coda
msgid "Coda import"
msgstr ""
#. module: account_coda
#: field:account.coda,user_id:0
msgid "User"
msgstr ""
#. module: account_coda
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
msgstr ""
#. module: account_coda
#: model:ir.model,name:account_coda.model_account_coda
msgid "coda for an Account"
msgstr ""
#. module: account_coda
#: wizard_field:account.coda_import,init,def_payable:0
msgid "Default Payable Account"
msgstr ""
#. module: account_coda
#: model:ir.ui.menu,name:account_coda.menu_account_coda
msgid "Coda Statements"
msgstr ""
#. module: account_coda
#: model:ir.ui.menu,name:account_coda.menu_account_coda_wizard
msgid "Import Coda Statements"
msgstr ""
#. module: account_coda
#: wizard_button:account.coda_import,init,extraction:0
msgid "_Ok"
msgstr ""
#. module: account_coda
#: wizard_view:account.coda_import,extraction:0
#: wizard_view:account.coda_import,init:0
msgid "Import Coda Statement"
msgstr ""
#. module: account_coda
#: field:account.bank.statement,coda_id:0
msgid "Coda"
msgstr ""
#. module: account_coda
#: wizard_view:account.coda_import,extraction:0
msgid "Results :"
msgstr ""
#. module: account_coda
#: wizard_field:account.coda_import,init,coda:0
msgid "Coda File"
msgstr ""
#. module: account_coda
#: field:account.coda,date:0
msgid "Import Date"
msgstr ""
#. module: account_coda
#: wizard_view:account.coda_import,init:0
msgid "Select your bank journal :"
msgstr ""

View File

@ -0,0 +1,163 @@
# Translation of OpenERP Server.
# This file contains the translation of the following modules:
# * account_coda
#
msgid ""
msgstr ""
"Project-Id-Version: OpenERP Server 5.0.6\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-11-24 13:11:29+0000\n"
"PO-Revision-Date: 2009-11-24 13:11:29+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: account_coda
#: field:account.coda,journal_id:0
#: wizard_field:account.coda_import,init,journal_id:0
msgid "Bank Journal"
msgstr ""
#. module: account_coda
#: constraint:ir.model:0
msgid "The Object name must start with x_ and not contain any special character !"
msgstr ""
#. module: account_coda
#: wizard_field:account.coda_import,extraction,note:0
msgid "Log"
msgstr ""
#. module: account_coda
#: wizard_button:account.coda_import,extraction,open:0
msgid "_Open Statement"
msgstr ""
#. module: account_coda
#: model:ir.module.module,shortdesc:account_coda.module_meta_information
msgid "Account CODA"
msgstr ""
#. module: account_coda
#: field:account.coda,name:0
msgid "Coda file"
msgstr ""
#. module: account_coda
#: wizard_view:account.coda_import,init:0
msgid "Clic on 'New' to select your file :"
msgstr ""
#. module: account_coda
#: model:ir.actions.wizard,name:account_coda.wizard_account_coda_import
msgid "Import Coda File"
msgstr ""
#. module: account_coda
#: constraint:ir.actions.act_window:0
msgid "Invalid model name in the action definition."
msgstr ""
#. module: account_coda
#: field:account.coda,note:0
msgid "Import log"
msgstr ""
#. module: account_coda
#: wizard_field:account.coda_import,init,def_receivable:0
msgid "Default receivable Account"
msgstr ""
#. module: account_coda
#: model:ir.module.module,description:account_coda.module_meta_information
msgid "Module provides functionality to import\n"
" bank statements from .csv file.\n"
" Import coda file wizard is used to import bank statements."
msgstr ""
#. module: account_coda
#: wizard_button:account.coda_import,extraction,end:0
msgid "_Close"
msgstr ""
#. module: account_coda
#: field:account.coda,statement_id:0
msgid "Generated Bank Statement"
msgstr ""
#. module: account_coda
#: view:account.coda:0
#: model:ir.actions.act_window,name:account_coda.act_account_payment_account_bank_statement
#: model:ir.actions.act_window,name:account_coda.action_account_coda
msgid "Coda import"
msgstr ""
#. module: account_coda
#: field:account.coda,user_id:0
msgid "User"
msgstr ""
#. module: account_coda
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
msgstr ""
#. module: account_coda
#: model:ir.model,name:account_coda.model_account_coda
msgid "coda for an Account"
msgstr ""
#. module: account_coda
#: wizard_field:account.coda_import,init,def_payable:0
msgid "Default Payable Account"
msgstr ""
#. module: account_coda
#: model:ir.ui.menu,name:account_coda.menu_account_coda
msgid "Coda Statements"
msgstr ""
#. module: account_coda
#: model:ir.ui.menu,name:account_coda.menu_account_coda_wizard
msgid "Import Coda Statements"
msgstr ""
#. module: account_coda
#: wizard_button:account.coda_import,init,extraction:0
msgid "_Ok"
msgstr ""
#. module: account_coda
#: wizard_view:account.coda_import,extraction:0
#: wizard_view:account.coda_import,init:0
msgid "Import Coda Statement"
msgstr ""
#. module: account_coda
#: field:account.bank.statement,coda_id:0
msgid "Coda"
msgstr ""
#. module: account_coda
#: wizard_view:account.coda_import,extraction:0
msgid "Results :"
msgstr ""
#. module: account_coda
#: wizard_field:account.coda_import,init,coda:0
msgid "Coda File"
msgstr ""
#. module: account_coda
#: field:account.coda,date:0
msgid "Import Date"
msgstr ""
#. module: account_coda
#: wizard_view:account.coda_import,init:0
msgid "Select your bank journal :"
msgstr ""

View File

@ -0,0 +1,3 @@
"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
"access_account_coda","account.coda","model_account_coda","account.group_account_user",1,0,0,0
"access_account_coda_manager","account.coda","model_account_coda","account.group_account_manager",1,1,1,1
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
2 access_account_coda account.coda model_account_coda account.group_account_user 1 0 0 0
3 access_account_coda_manager account.coda model_account_coda account.group_account_manager 1 1 1 1

View File

@ -0,0 +1,10 @@
0000006060712505 00000CPH CODA TINY 0047747270100477472701 00000 1
1 049126201326907 EUR0BE 0000000015632900050607TINY COMPTE COURANT ORDINAIRE 049
2100010000 0000000001150000060607001500000INVOICE OF 2006-12-19 0606070020100
2200010000 EUR000000001150000 100
2300010000301915554082 PROLIBRE SARL CAROUGE GE 000
2100020000 0000000000500000060607001500000CONTRACT PARTNER ERREUR ECART YEA 0606070030100
2200020000RTY CONTRACT PARTNER EUR000000000500000 100
2300020000050000000017 SEDNACOM 43 ALLEE DES FOUGERES 9522 0 HERBLAY 000
8049126201326907 0000000017282900060607
9 000008000000000000000000000001650000 2

View File

@ -0,0 +1,25 @@
# -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import coda_import
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -0,0 +1,339 @@
# -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import pooler
import time
import datetime
import wizard
import netsvc
import base64
from osv import osv
from tools.translate import _
codawiz_form = """<?xml version="1.0"?>
<form string="Import Coda Statement">
<separator colspan="4" string="Select your bank journal :" />
<field name="journal_id" colspan="1" domain="[('type','=','cash')]" />
<newline />
<field name="def_payable" /> <field name="def_receivable" />
<newline />
<field name="awaiting_account" />
<separator string="Clic on 'New' to select your file :" colspan="4"/>
<field name="coda"/>
</form>
"""
codawiz_fields = {
'journal_id' : {
'string':'Bank Journal',
'type':'many2one',
'relation':'account.journal',
'required':True,
},
'coda' : {
'string':'Coda File',
'type':'binary',
'required':True,
},
'def_payable' : {
'string' : 'Default Payable Account',
'type' : 'many2one',
'relation': 'account.account',
'required':True,
'domain':[('type','=','payable')],
'help': 'Set here the payable account that will be used, by default, if the partner is not found',
},
'def_receivable' : {
'string' : 'Default receivable Account',
'type' : 'many2one',
'relation': 'account.account',
'required':True,
'domain':[('type','=','receivable')],
'help': 'Set here the receivable account that will be used, by default, if the partner is not found',
},
'awaiting_account' : {
'string' : 'Default Account for Unrecognized Movement',
'type' : 'many2one',
'relation': 'account.account',
'required':True,
'help': 'Set here the default account that will be used, if the partner is found but does not have the bank account , or if he is domiciled',
}
}
result_form = """<?xml version="1.0"?>
<form string="Import Coda Statement">
<separator colspan="4" string="Results :" />
<field name="note" colspan="4" nolabel="1" width="500"/>
</form>
"""
result_fields = {
'note' : {'string':'Log','type':'text'}
}
def _coda_parsing(self, cr, uid, data, context):
pool = pooler.get_pool(cr.dbname)
codafile = data['form']['coda']
journal_code = pool.get('account.journal').browse(cr, uid, data['form']['journal_id'], context).code
def_pay_acc = data['form']['def_payable']
def_rec_acc = data['form']['def_receivable']
str_log = ""
err_log = "Errors:\n------\n"
nb_err=0
std_log=''
str_log1 = "Coda File is Imported : "
str_not=''
str_not1=''
bank_statements=[]
recordlist = base64.decodestring(codafile).split('\n')
recordlist.pop()
for line in recordlist:
if line[0] == '0':
# header data
bank_statement = {}
bank_statement["bank_statement_line"]={}
bank_statement_lines = {}
bank_statement['date'] = str2date(line[5:11])
bank_statement['journal_id']=data['form']['journal_id']
period_id = pool.get('account.period').search(cr,uid,[('date_start','<=',time.strftime('%Y-%m-%d',time.strptime(bank_statement['date'],"%y/%m/%d"))),('date_stop','>=',time.strftime('%Y-%m-%d',time.strptime(bank_statement['date'],"%y/%m/%d")))])
bank_statement['period_id'] = period_id[0]
bank_statement['state']='draft'
elif line[0] == '1':
# old balance data
bal_start = list2float(line[43:58])
if line[42] == '1':
bal_start = - bal_start
bank_statement["balance_start"]= bal_start
bank_statement["acc_number"]=line[5:17]
bank_statement["acc_holder"]=line[64:90]
bank_statement['name'] = journal_code + ' ' + str(line[2:5])
elif line[0]=='2':
# movement data record 2
if line[1]=='1':
# movement data record 2.1
if bank_statement_lines.has_key(line[2:6]):
continue
st_line = {}
st_line['extra_note'] = ''
st_line['statement_id']=0
st_line['ref'] = line[2:10]
st_line['date'] = time.strftime('%Y-%m-%d',time.strptime(str2date(line[115:121]),"%y/%m/%d")),
st_line_amt = list2float(line[32:47])
if line[61]=='1':
st_line['toreconcile'] = True
st_line['name']=line[65:77]
else:
st_line['toreconcile'] = False
st_line['name']=line[62:115]
st_line['free_comm'] = st_line['name']
st_line['val_date']=time.strftime('%Y-%m-%d',time.strptime(str2date(line[47:53]),"%y/%m/%d")),
st_line['entry_date']=time.strftime('%Y-%m-%d',time.strptime(str2date(line[115:121]),"%y/%m/%d")),
st_line['partner_id']=0
if line[31] == '1':
st_line_amt = - st_line_amt
st_line['account_id'] = def_pay_acc
else:
st_line['account_id'] = def_rec_acc
st_line['amount'] = st_line_amt
bank_statement_lines[line[2:6]]=st_line
bank_statement["bank_statement_line"]=bank_statement_lines
elif line[1] == '2':
st_line_name = line[2:6]
bank_statement_lines[st_line_name].update({'account_id': data['form']['awaiting_account']})
elif line[1] == '3':
# movement data record 3.1
st_line_name = line[2:6]
st_line_partner_acc = str(line[10:47]).strip()
cntry_number=line[10:47].strip()
contry_name=line[47:125].strip()
bank_ids = pool.get('res.partner.bank').search(cr,uid,[('acc_number','=',st_line_partner_acc)])
bank_statement_lines[st_line_name].update({'cntry_number': cntry_number, 'contry_name': contry_name})
if bank_ids:
bank = pool.get('res.partner.bank').browse(cr,uid,bank_ids[0],context)
if line and bank.partner_id:
bank_statement_lines[st_line_name].update({'partner_id': bank.partner_id.id})
if bank_statement_lines[st_line_name]['amount'] < 0 :
bank_statement_lines[st_line_name].update({'account_id': bank.partner_id.property_account_payable.id})
else :
bank_statement_lines[st_line_name].update({'account_id': bank.partner_id.property_account_receivable.id})
else:
nb_err += 1
err_log += _('The bank account %s is not defined for the partner %s.\n')%(cntry_number,contry_name)
bank_statement_lines[st_line_name].update({'account_id': data['form']['awaiting_account']})
bank_statement["bank_statement_line"]=bank_statement_lines
elif line[0]=='3':
if line[1] == '1':
st_line_name = line[2:6]
bank_statement_lines[st_line_name]['extra_note'] += '\n' + line[40:113]
elif line[1] == '2':
st_line_name = line[2:6]
bank_statement_lines[st_line_name]['extra_note'] += '\n' + line[10:115]
elif line[1] == '3':
st_line_name = line[2:6]
bank_statement_lines[st_line_name]['extra_note'] += '\n' + line[10:100]
elif line[0]=='8':
# new balance record
bal_end = list2float(line[42:57])
if line[41] == '1':
bal_end = - bal_end
bank_statement["balance_end_real"]= bal_end
elif line[0]=='9':
# footer record
bank_statements.append(bank_statement)
#end for
bkst_list=[]
for statement in bank_statements:
try:
bk_st_id = pool.get('account.bank.statement').create(cr,uid,{
'journal_id': statement['journal_id'],
'date':time.strftime('%Y-%m-%d',time.strptime(statement['date'],"%y/%m/%d")),
'period_id':statement['period_id'],
'balance_start': statement["balance_start"],
'balance_end_real': statement["balance_end_real"],
'state': 'draft',
'name': statement['name'],
})
lines=statement["bank_statement_line"]
for value in lines:
line=lines[value]
reconcile_id = False
if line['toreconcile']:
rec_id = pool.get('account.move.line').search(cr, uid, [('name','=',line['name']),('reconcile_id','=',False),('account_id.reconcile','=',True)])
if rec_id:
reconcile_id = pool.get('account.bank.statement.reconcile').create(cr, uid, {
'line_ids': [(6, 0, rec_id)]
}, context=context)
str_not1 = ''
if line.has_key('contry_name') and line.has_key('cntry_number'):
str_not1="Partner name:%s \n Partner Account Number:%s \n Communication:%s \n Value Date:%s \n Entry Date:%s \n"%(line["contry_name"],line["cntry_number"],line["free_comm"]+line['extra_note'],line["val_date"][0],line["entry_date"][0])
id=pool.get('account.bank.statement.line').create(cr,uid,{
'name':line['name'],
'date': line['date'],
'amount': line['amount'],
'partner_id':line['partner_id'] or 0,
'account_id':line['account_id'],
'statement_id': bk_st_id,
'reconcile_id': reconcile_id,
'note':str_not1,
'ref':line['ref'],
})
str_not= "\n \n Account Number: %s \n Account Holder Name: %s " %(statement["acc_number"],statement["acc_holder"])
std_log += "\nStatement : %s , Date : %s, Starting Balance : %.2f , Ending Balance : %.2f \n"\
%(statement['name'], statement['date'], float(statement["balance_start"]), float(statement["balance_end_real"]))
bkst_list.append(bk_st_id)
except osv.except_osv, e:
cr.rollback()
nb_err+=1
err_log += '\n Application Error : ' + str(e)
raise # REMOVEME
except Exception, e:
cr.rollback()
nb_err+=1
err_log += '\n System Error : '+str(e)
raise # REMOVEME
except :
cr.rollback()
nb_err+=1
err_log += '\n Unknown Error'
raise
err_log += '\n\nNumber of statements : '+ str(len(bkst_list))
err_log += '\nNumber of error :'+ str(nb_err) +'\n'
pool.get('account.coda').create(cr, uid,{
'name':codafile,
'statement_ids': [(6, 0, bkst_list,)],
'note':str_log1+str_not+std_log+err_log,
'journal_id':data['form']['journal_id'],
'date':time.strftime("%Y-%m-%d"),
'user_id':uid,
})
return {'note':str_log1 + std_log + err_log ,'journal_id': data['form']['journal_id'], 'coda': data['form']['coda'],'statment_ids':bkst_list}
def str2date(date_str):
return time.strftime("%y/%m/%d",time.strptime(date_str,"%d%m%y"))
def str2float(str):
try:
return float(str)
except:
return 0.0
def list2float(lst):
try:
return str2float((lambda s : s[:-3] + '.' + s[-3:])(lst))
except:
return 0.0
class coda_import(wizard.interface):
def _action_open_window(self, cr, uid, data, context):
form=data['form']
return {
'domain':"[('id','in',%s)]"%(form['statment_ids']),
'name': 'Statement',
'view_type': 'form',
'view_mode': 'tree,form',
'res_model': 'account.bank.statement',
'view_id': False,
'type': 'ir.actions.act_window',
}
states = {
'init' : {
'actions' : [],
'result' : {'type' : 'form',
'arch' : codawiz_form,
'fields' : codawiz_fields,
'state' : [('end', '_Close'),('extraction', '_Ok') ]}
},
'extraction' : {
'actions' : [_coda_parsing],
'result' : {'type' : 'form',
'arch' : result_form,
'fields' : result_fields,
'state' : [('end', '_Close'),('open', '_Open Statement')]}
},
'open': {
'actions': [],
'result': {'type': 'action', 'action': _action_open_window, 'state': 'end'}
},
}
coda_import("account.coda_import")
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -23,8 +23,7 @@
"name" : "Accounting Reports",
"version" : "1.0",
"depends" : [
"account",
"account_voucher"
"account"
],
"author" : "Tiny ERP",
"description": """Accounting Reports

View File

@ -104,22 +104,22 @@ class report_balancesheet_horizontal(rml_parse.rml_parse):
else:
self.res_pl['type'] = 'Net Loss'
pl_dict = {
'code' : False,
'name' : self.res_pl['type'],
'level': False,
'balance':self.res_pl['balance'],
}
'code' : False,
'name' : self.res_pl['type'],
'level': False,
'balance':self.res_pl['balance'],
}
for typ in types:
accounts_temp = []
for account in accounts:
if (account.user_type.report_type) and (account.user_type.report_type == typ):
account_dict = {
'id' : account.id,
'code' : account.code,
'name' : account.name,
'level': account.level,
'balance':account.balance,
}
'id' : account.id,
'code' : account.code,
'name' : account.name,
'level': account.level,
'balance':account.balance,
}
if typ == 'liability' and account.type <> 'view' and (account.debit <> account.credit):
self.result_sum_dr += abs(account.debit - account.credit)
if typ == 'asset' and account.type <> 'view' and (account.debit <> account.credit):
@ -138,6 +138,7 @@ class report_balancesheet_horizontal(rml_parse.rml_parse):
self.result[typ] = accounts_temp
cal_list[typ]=self.result[typ]
if cal_list:
temp={}
for i in range(0,max(len(cal_list['liability']),len(cal_list['asset']))):
@ -164,7 +165,7 @@ class report_balancesheet_horizontal(rml_parse.rml_parse):
'name1' : cal_list['asset'][i]['name'],
'level1': cal_list['asset'][i]['level'],
'balance1':cal_list['asset'][i]['balance'],
}
}
self.result_temp.append(temp)
if i < len(cal_list['liability']):
temp={
@ -176,7 +177,7 @@ class report_balancesheet_horizontal(rml_parse.rml_parse):
'name1' : '',
'level1': False,
'balance1':False,
}
}
self.result_temp.append(temp)
return None

View File

@ -20,6 +20,5 @@
##############################################################################
import voucher
import account
import report
import wizard

View File

@ -46,10 +46,9 @@
"update_xml" : [
"security/ir.model.access.csv",
"voucher_sequence.xml",
"account_report.xml",
"voucher_report.xml",
"voucher_view.xml",
"voucher_wizard.xml",
"account_view.xml",
"wizard/account_voucher_open_view.xml",
],
'certificate': '0037580727101',

View File

@ -1,219 +0,0 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import time
import netsvc
from osv import fields, osv
import ir
import pooler
import mx.DateTime
from mx.DateTime import RelativeDateTime
from tools import config
class account_account(osv.osv):
_inherit = "account.account"
def _get_level(self, cr, uid, ids, field_name, arg, context={}):
res={}
acc_obj=self.browse(cr,uid,ids)
for aobj in acc_obj:
level = 0
if aobj.parent_id :
obj=self.browse(cr,uid,aobj.parent_id.id)
level= obj.level + 1
res[aobj.id] = level
return res
def _get_children_and_consol(self, cr, uid, ids, context={}):
ids2=[]
temp=[]
read_data= self.read(cr, uid, ids,['id','child_id'], context)
for data in read_data:
ids2.append(data['id'])
if data['child_id']:
temp=[]
for x in data['child_id']:
temp.append(x)
ids2 += self._get_children_and_consol(cr, uid, temp, context)
return ids2
_columns = {
'journal_id':fields.many2one('account.journal', 'Journal',domain=[('type','=','situation')]),
'open_bal' : fields.float('Opening Balance',digits=(16,2)),
'level': fields.function(_get_level, string='Level', method=True, store=True, type='integer'),
'type1':fields.selection([('dr','Debit'),('cr','Credit'),('none','None')], 'Dr/Cr',store=True),
}
def compute_total(self, cr, uid, ids, yr_st_date, yr_end_date, st_date, end_date, field_names, context={}):
if not (st_date >= yr_st_date and end_date <= yr_end_date):
return {}
query = "l.date >= '%s' AND l.date <= '%s'" % (st_date, end_date)
return self.__compute(cr, uid, ids, field_names, context=context, query=query)
def create(self, cr, uid, vals, context={}):
name=self.search(cr,uid,[('name','ilike',vals['name']),('company_id','=',vals['name'])])
if name:
raise osv.except_osv('Error', 'Account is Already Created !')
obj=self.pool.get('account.account.type').browse(cr,uid,vals['user_type'])
if obj.code in ('cash','asset','expense'):
vals['type1'] = 'dr'
elif obj.code in ('equity','income','liability') :
vals['type1'] = 'cr'
else:
vals['type1'] = 'none'
journal_ids=self.pool.get('account.journal').search(cr,uid,[('name','=','Opening Journal')])
vals['journal_id'] = journal_ids and journal_ids[0] or False
account_id = super(account_account, self).create(cr, uid, vals, context)
if vals.get('type1', False) != False:
journal_id = vals.get('journal_id',False)
if journal_id and vals.has_key('open_bal'):
if vals['open_bal'] != 0.0:
journal = self.pool.get('account.journal').browse(cr, uid, [journal_id])
if journal and journal[0].sequence_id:
name = self.pool.get('ir.sequence').get_id(cr, uid, journal[0].sequence_id.id)
move=self.pool.get('account.move').search(cr,uid,[('journal_id','=',journal_id)])
if not move:
move = False
move_data = {'name': name, 'journal_id': journal_id}
move_id=self.pool.get('account.move').create(cr,uid,move_data)
move_obj=self.pool.get('account.move').browse(cr,uid,move_id)
else:
move_obj=self.pool.get('account.move').browse(cr,uid,move[0])
self_obj=self.browse(cr,uid,account_id)
move_line = {
'name':journal[0].name,
'debit':self_obj.debit or False,
'credit':self_obj.credit or False,
'account_id':account_id or False,
'move_id':move and move[0] or move_id,
'journal_id':journal_id ,
'period_id':move_obj.period_id.id,
}
if vals['type1'] == 'dr':
move_line['debit'] = vals['open_bal'] or False
elif vals['type1'] == 'cr':
move_line['credit'] = vals['open_bal'] or False
self.pool.get('account.move.line').create(cr,uid,move_line)
return account_id
def write(self, cr, uid, ids, vals, context=None, check=True, update_check=True):
res_temp={}
if vals.has_key('name'):
if not vals.has_key('company_id'):
vals['company_id']=self.browse(cr,uid,ids)[0].company_id.id
name=self.search(cr,uid,[('name','ilike',vals['name']),('company_id','=',vals['company_id'])])
if name:
raise osv.except_osv('Error', 'Same Account Name is Already present !')
if vals.has_key('user_type'):
obj=self.pool.get('account.account.type').browse(cr,uid,vals['user_type'])
if obj.code in ('asset','expense'):
vals['type1'] = 'dr'
elif obj.code in ('income','liability') :
vals['type1'] = 'cr'
else:
vals['type1'] = 'none'
super(account_account, self).write(cr, uid,ids, vals, context)
if vals.has_key('open_bal'):
self_obj= self.browse(cr,uid,ids)
move_pool=self.pool.get('account.move')
if vals:
for obj in self_obj:
flg=0
if obj.journal_id and obj.journal_id.type == 'situation':
move=move_pool.search(cr,uid,[('journal_id','=',obj.journal_id.id)])
if move:
move_obj=move_pool.browse(cr,uid,move[0])
move=move[0]
else:
name = self.pool.get('ir.sequence').get_id(cr, uid, obj.journal_id.sequence_id.id)
move_data = {'name': name, 'journal_id': obj.journal_id.id}
move=self.pool.get('account.move').create(cr,uid,move_data)
move_obj=move_pool.browse(cr,uid,move)
move_line_data={'name':obj.journal_id.name,
'debit':obj.debit or 0.0,
'credit':obj.credit or 0.0,
'account_id':obj.id,
'move_id':move,
'journal_id':obj.journal_id.id,
'period_id':move_obj.period_id.id,
}
if obj.type1:
if obj.type1 == 'dr':
move_line_data['debit'] = obj.open_bal
elif obj.type1 == 'cr':
move_line_data['credit'] = obj.open_bal
if move_obj and move:
for move_line in move_obj.line_id:
if move_line.account_id.id == obj.id:
if move_line_data['debit'] == 0.0 and move_line_data['credit']== 0.0:
self.pool.get('account.move.line').unlink(cr,uid,[move_line.id])
else:
self.pool.get('account.move.line').write(cr,uid,[move_line.id],move_line_data)
flg=1
if not flg:
self.pool.get('account.move.line').create(cr,uid,move_line_data)
return True
def onchange_type(self, cr, uid, ids,user_type,type1):
if not user_type:
return {'value' : {}}
type_obj=self.pool.get('account.account.type').browse(cr,uid,user_type)
if type_obj.code in ('asset','expense'):
type1 = 'dr'
elif type_obj.code in ('income','liability') :
type1 = 'cr'
else:
type1 = 'none'
return {
'value' : {'type1' : type1}
}
account_account()
class account_move(osv.osv):
_inherit = "account.move"
_columns = {
'name':fields.char('Name', size=256, required=True, readonly=True, states={'draft':[('readonly',False)]}),
}
account_move()
class res_currency(osv.osv):
_inherit = "res.currency"
_columns = {
'sub_name': fields.char('Sub Currency', size=32, required=True)
}
_defaults = {
'sub_name': lambda *a: 'cents',
}
res_currency()
class account_account_template(osv.osv):
_inherit = "account.account.template"
_columns = {
'type1':fields.selection([('dr','Debit'),('cr','Credit'),('none','None')], 'Dr/Cr',store=True),
}
account_account_template()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -1,22 +0,0 @@
<?xml version="1.0"?>
<openerp>
<data>
<report id="report_account_voucher"
string="Voucher Report (Cr/Dr)"
model="account.voucher"
name="voucher.cash_receipt.drcr"
rml="account_voucher/report/report_voucher.rml"
auto="False"
header = "False"
menu="True"/>
<report id="report_account_voucher_amt"
string="Voucher Report"
model="account.voucher"
name="voucher.cash_amount"
rml="account_voucher/report/report_voucher_amount.rml"
auto="False"
header = "False"
menu="True"/>
</data>
</openerp>

View File

@ -1,76 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record model="ir.ui.view" id="account_form1">
<field name="name">account.form1</field>
<field name="inherit_id" ref="account.view_account_form"/>
<field name="model">account.account</field>
<field name="type">form</field>
<field name="arch" type="xml">
<field name="user_type" position="after">
<field name="balance" string="Closing Balance"/>
<field name="type1" />
<field name="open_bal"/>
<field name="journal_id"/>
</field>
</field>
</record>
<record model="ir.ui.view" id="account_form2">
<field name="name">account.form2</field>
<field name="inherit_id" ref="account.view_account_form"/>
<field name="model">account.account</field>
<field name="type">form</field>
<field name="arch" type="xml">
<field name="user_type" position="replace">
<field name="user_type" select="1" on_change="onchange_type(user_type,type1)"/>
</field>
</field>
</record>
<record model="ir.ui.view" id="account_tree1">
<field name="name">account.tree1</field>
<field name="inherit_id" ref="account.view_account_tree"/>
<field name="model">account.account</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<field name="name" position="after">
<field name="open_bal" select="1"/>
</field>
</field>
</record>
<record model="ir.ui.view" id="account_tree2">
<field name="name">account.tree2</field>
<field name="inherit_id" ref="account.view_account_tree"/>
<field name="model">account.account</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<field name="company_currency_id" position="before">
<field name="type1"/>
</field>
</field>
</record>
<!-- sub_currency -->
<record model="ir.ui.view" id="sub_currency_form">
<field name="name">sub.currency.form</field>
<field name="inherit_id" ref="base.view_currency_form" />
<field name="model">res.currency</field>
<field name="type">form</field>
<field name="arch" type="xml">
<field name="name" position="after">
<field name="sub_name" />
</field>
</field>
</record>
<act_window name="Opening Balance Entry"
domain="[('journal_id', '=', journal_id)]"
res_model="account.move.line"
src_model="account.account"
id="act_account_acount_move_line_open1"/>
</data>
</openerp>

View File

@ -23,7 +23,6 @@ import time
from report import report_sxw
from tools import amount_to_text_en
class report_voucher(report_sxw.rml_parse):
def __init__(self, cr, uid, name, context):
super(report_voucher, self).__init__(cr, uid, name, context)

View File

@ -26,24 +26,20 @@
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="2,0" stop="2,0"/>
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="2,-1" stop="2,-1"/>
</blockTableStyle>
<blockTableStyle id="voucher_lines">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
</blockTableStyle>
<blockTableStyle id="Table4">
<blockTableStyle id="Table2">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
</blockTableStyle>
<blockTableStyle id="last_info">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="0,7" stop="0,7"/>
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="0,6" stop="0,6"/>
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="0,-1" stop="0,-1"/>
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="1,7" stop="1,-1"/>
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="1,7" stop="1,7"/>
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="1,6" stop="1,-1"/>
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="1,6" stop="1,6"/>
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="1,-1" stop="1,-1"/>
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="2,7" stop="2,-1"/>
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="2,7" stop="2,7"/>
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="2,6" stop="2,-1"/>
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="2,6" stop="2,6"/>
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="2,-1" stop="2,-1"/>
</blockTableStyle>
<blockTableStyle id="Table3">
@ -53,48 +49,42 @@
<initialize>
<paraStyle name="all" alignment="justify"/>
</initialize>
<paraStyle name="P1" fontName="Helvetica" fontSize="12.0" leading="15" alignment="LEFT"/>
<paraStyle name="P2" fontName="Helvetica-Bold" fontSize="13.0" leading="16" alignment="CENTER"/>
<paraStyle name="P3" fontName="Helvetica" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P4" fontName="Helvetica-Bold" fontSize="22.0" leading="27" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P5" fontName="Helvetica" fontSize="11.0" leading="14" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P6" fontName="Helvetica" fontSize="11.0" leading="14" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P7" fontName="Helvetica-Bold" fontSize="11.0" leading="14" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P8" fontName="Helvetica-Bold" fontSize="11.0" leading="14" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P9" fontName="Helvetica-Bold" fontSize="11.0" leading="14" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P10" fontName="Helvetica-Bold" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P11" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P12" fontName="Helvetica-Bold" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0" textColor="#000000"/>
<paraStyle name="P13" fontName="Helvetica" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P14" fontName="Helvetica-Bold" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P15" fontName="Helvetica-Bold" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P16" fontName="Helvetica-Bold" fontSize="12.0" leading="15" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P17" fontName="Helvetica-Bold" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P18" fontName="Helvetica-Bold" fontSize="10.0" leading="13" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P19" fontName="Helvetica" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P20" fontName="Helvetica" fontSize="10.0" leading="13" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0" textColor="#000000"/>
<paraStyle name="P21" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P22" fontName="Helvetica" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P23" fontName="Helvetica-Bold" fontSize="13.0" leading="16" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P24" rightIndent="0.0" leftIndent="35.0" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0" textColor="#000000"/>
<paraStyle name="P25" rightIndent="0.0" leftIndent="35.0" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P26" rightIndent="0.0" leftIndent="35.0" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P27" rightIndent="0.0" leftIndent="71.0" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0" textColor="#000000"/>
<paraStyle name="P28" fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0" textColor="#000000"/>
<paraStyle name="P29" fontName="Helvetica-Bold" fontSize="10.0" leading="13" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P30" fontName="Helvetica-Bold" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0" textColor="#000000"/>
<paraStyle name="P31" fontName="Helvetica" fontSize="10.0" leading="13" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0" textColor="#000000"/>
<paraStyle name="P32" rightIndent="0.0" leftIndent="35.0" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0" textColor="#000000"/>
<paraStyle name="P33" rightIndent="0.0" leftIndent="71.0" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0" textColor="#000000"/>
<paraStyle name="Standard" fontName="Times-Roman" fontSize="12.0" leading="15" alignment="LEFT"/>
<paraStyle name="P1" fontName="Helvetica-Bold" fontSize="13.0" leading="16" alignment="CENTER"/>
<paraStyle name="P2" fontName="Helvetica" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P3" fontName="Helvetica-Bold" fontSize="22.0" leading="27" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P4" fontName="Helvetica" fontSize="11.0" leading="14" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P5" fontName="Helvetica" fontSize="11.0" leading="14" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P6" fontName="Helvetica-Bold" fontSize="11.0" leading="14" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P7" fontName="Helvetica-Bold" fontSize="11.0" leading="14" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P8" fontName="Helvetica-Bold" fontSize="11.0" leading="14" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P9" fontName="Helvetica-Bold" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P10" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P11" fontName="Helvetica" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P12" fontName="Helvetica-Bold" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P13" fontName="Helvetica-Bold" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P14" fontName="Helvetica" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P15" fontName="Helvetica" fontSize="10.0" leading="13" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0" textColor="#000000"/>
<paraStyle name="P16" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P17" fontName="Helvetica" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P18" fontName="Helvetica-Bold" fontSize="13.0" leading="16" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P19" rightIndent="0.0" leftIndent="35.0" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P20" rightIndent="0.0" leftIndent="35.0" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P21" fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0" textColor="#000000"/>
<paraStyle name="P22" fontName="Helvetica-Bold" fontSize="10.0" leading="13" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P23" fontName="Helvetica" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0" textColor="#000000"/>
<paraStyle name="P24" fontName="Helvetica" fontSize="10.0" leading="13" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0" textColor="#000000"/>
<paraStyle name="P25" fontName="Helvetica-Bold" fontSize="10.0" leading="13" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P26" rightIndent="0.0" leftIndent="71.0" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0" textColor="#000000"/>
<paraStyle name="P27" rightIndent="0.0" leftIndent="35.0" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0" textColor="#000000"/>
<paraStyle name="Standard" fontName="Helvetica" fontSize="12.0" leading="15" alignment="LEFT"/>
<paraStyle name="Heading" fontName="Helvetica" fontSize="14.0" leading="17" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="Text body" fontName="Times-Roman" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="List" fontName="Times-Roman" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="Caption" fontName="Times-Italic" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="Index" fontName="Times-Roman" fontSize="12.0" leading="15" alignment="LEFT"/>
<paraStyle name="Table Contents" fontName="Times-Roman" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="Table Heading" fontName="Times-Bold" fontSize="12.0" leading="15" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="terp_header" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="Text body" fontName="Helvetica" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="List" fontName="Helvetica" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="Caption" fontName="Helvetica-Oblique" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="Index" fontName="Helvetica" fontSize="12.0" leading="15" alignment="LEFT"/>
<paraStyle name="Table Contents" fontName="Helvetica" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="Table Heading" fontName="Helvetica-Bold" fontSize="12.0" leading="15" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="terp_header" fontName="Helvetica-Bold" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Bold_8" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Bold_9" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
@ -103,26 +93,26 @@
<paraStyle name="terp_tblheader_General_Centre" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="terp_default_Centre_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_tblheader_Details" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="Footer" fontName="Times-Roman" fontSize="12.0" leading="15" alignment="LEFT"/>
<paraStyle name="Horizontal Line" fontName="Times-Roman" fontSize="6.0" leading="8" alignment="LEFT" spaceBefore="0.0" spaceAfter="14.0"/>
<paraStyle name="Footer" fontName="Helvetica" fontSize="12.0" leading="15" alignment="LEFT"/>
<paraStyle name="Horizontal Line" fontName="Helvetica" fontSize="6.0" leading="8" alignment="LEFT" spaceBefore="0.0" spaceAfter="14.0"/>
<paraStyle name="Heading 9" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="terp_tblheader_General_Right" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="terp_tblheader_Details_Centre" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="terp_tblheader_Details_Right" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="terp_default_Right_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_header_Right" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="terp_header_Centre" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="CENTER" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="terp_header_Right" fontName="Helvetica-Bold" fontSize="12.0" leading="15" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_header_Centre" fontName="Helvetica-Bold" fontSize="12.0" leading="15" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_address" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Centre_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Right_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_1" fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Right_9_Bold" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_8_Italic" fontName="Helvetica-Oblique" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="Drawing" fontName="Times-Italic" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="Header" fontName="Times-Roman" fontSize="12.0" leading="15" alignment="LEFT"/>
<paraStyle name="Endnote" rightIndent="0.0" leftIndent="14.0" fontName="Times-Roman" fontSize="10.0" leading="13" alignment="LEFT"/>
<paraStyle name="Addressee" fontName="Times-Roman" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="0.0" spaceAfter="3.0"/>
<paraStyle name="Signature" fontName="Times-Roman" fontSize="12.0" leading="15" alignment="LEFT"/>
<paraStyle name="terp_default_8_Italic" rightIndent="0.0" leftIndent="9.0" fontName="Helvetica-Oblique" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="Drawing" fontName="Helvetica-Oblique" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="Header" fontName="Helvetica" fontSize="12.0" leading="15" alignment="LEFT"/>
<paraStyle name="Endnote" rightIndent="0.0" leftIndent="14.0" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT"/>
<paraStyle name="Addressee" fontName="Helvetica" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="0.0" spaceAfter="3.0"/>
<paraStyle name="Signature" fontName="Helvetica" fontSize="12.0" leading="15" alignment="LEFT"/>
<paraStyle name="Heading 8" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="Heading 7" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="Heading 6" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
@ -131,266 +121,281 @@
<paraStyle name="Heading 1" fontName="Helvetica-Bold" fontSize="115%" leading="NaN" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="Heading 10" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="Heading 2" fontName="Helvetica-BoldOblique" fontSize="14.0" leading="17" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="First line indent" rightIndent="0.0" leftIndent="0.0" fontName="Times-Roman" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="Hanging indent" rightIndent="0.0" leftIndent="28.0" fontName="Times-Roman" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="Salutation" fontName="Times-Roman" fontSize="12.0" leading="15" alignment="LEFT"/>
<paraStyle name="Text body indent" rightIndent="0.0" leftIndent="0.0" fontName="Times-Roman" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="First line indent" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="Hanging indent" rightIndent="0.0" leftIndent="28.0" fontName="Helvetica" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="Salutation" fontName="Helvetica" fontSize="12.0" leading="15" alignment="LEFT"/>
<paraStyle name="Text body indent" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="Heading 3" fontName="Helvetica-Bold" fontSize="14.0" leading="17" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="List Indent" rightIndent="0.0" leftIndent="142.0" fontName="Times-Roman" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="Marginalia" rightIndent="0.0" leftIndent="113.0" fontName="Times-Roman" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="List Indent" rightIndent="0.0" leftIndent="142.0" fontName="Helvetica" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="Marginalia" rightIndent="0.0" leftIndent="113.0" fontName="Helvetica" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="terp_default_9_with_indent_10" rightIndent="0.0" leftIndent="9.0" fontName="Helvetica" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_9_50" rightIndent="0.0" leftIndent="9.0" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<images/>
</stylesheet>
<images/>
<story>
<para style="P29">[[ repeatIn(objects,'voucher') ]]</para>
<para style="P4">[[ company.name ]]</para>
<para style="P6">[[ company.partner_id.address and company.partner_id.address[0].street ]]</para>
<para style="P6">[[ company.partner_id.address and company.partner_id.address[0].zip ]] [[ company.partner_id.address and company.partner_id.address[0].city ]] - [[ company.partner_id.address and company.partner_id.address[0].country_id and company.partner_id.address[0].country_id.name ]]</para>
<para style="P6">[[ company.partner_id.address and company.partner_id.address[0].phone ]]</para>
<para style="P6">[[ company.partner_id.address and company.partner_id.address[0].email ]]</para>
<para style="P5">
<para style="P22">[[ repeatIn(objects,'voucher') ]]</para>
<para style="P3">[[ company.name ]]</para>
<para style="P5">[[ company.partner_id.address and company.partner_id.address[0].street ]]</para>
<para style="P5">[[ company.partner_id.address and company.partner_id.address[0].zip ]] [[ company.partner_id.address and company.partner_id.address[0].city ]] - [[ company.partner_id.address and company.partner_id.address[0].country_id and company.partner_id.address[0].country_id.name ]]</para>
<para style="P5">[[ company.partner_id.address and company.partner_id.address[0].phone ]]</para>
<para style="P5">[[ company.partner_id.address and company.partner_id.address[0].email ]]</para>
<para style="P4">
<font color="white"> </font>
</para>
<para style="P23">Cash Receipt Voucher [[ (voucher.type == 'rec_voucher' or removeParentNode('para')) and '' ]]</para>
<para style="P2">Cash Payment Voucher [[ (voucher.type == 'pay_voucher' or removeParentNode('para')) and '' ]]</para>
<para style="P23">Bank Receipt Voucher [[ (voucher.type == 'bank_rec_voucher' or removeParentNode('para')) and '' ]]</para>
<para style="P2">Bank Payment Voucher [[ (voucher.type == 'bank_pay_voucher' or removeParentNode('para')) and '' ]]</para>
<para style="P22">
<para style="P18">Cash Receipt Voucher [[ (voucher.type == 'rec_voucher' or removeParentNode('para')) and '' ]]</para>
<para style="P1">Cash Payment Voucher [[ (voucher.type == 'pay_voucher' or removeParentNode('para')) and '' ]]</para>
<para style="P18">Bank Receipt Voucher [[ (voucher.type == 'bank_rec_voucher' or removeParentNode('para')) and '' ]]</para>
<para style="P1">Bank Payment Voucher [[ (voucher.type == 'bank_pay_voucher' or removeParentNode('para')) and '' ]]</para>
<para style="P17">
<font color="white"> </font>
</para>
<blockTable colWidths="49.0,143.0,116.0,69.0,106.0" style="Table1">
<tr>
<td>
<para style="P10">No.</para>
<para style="P9">No.</para>
</td>
<td>
<para style="P11">[[ voucher.number ]]</para>
<para style="P10">[[ voucher.number ]]</para>
</td>
<td>
<para style="P3">
<para style="P2">
<font color="white"> </font>
</para>
</td>
<td>
<para style="P10">Dated :</para>
<para style="P9">Dated :</para>
</td>
<td>
<para style="P11">[[ time.strftime('%d %B,%Y', time.strptime(voucher.date , '%Y-%m-%d')) or '' ]]</para>
<para style="P10">[[ time.strftime('%d %B,%Y', time.strptime(voucher.date , '%Y-%m-%d')) or '' ]]</para>
</td>
</tr>
<tr>
<td>
<para style="P10">State :</para>
<para style="P9">State :</para>
</td>
<td>
<para style="P21">PRO-FORMA [[ ((voucher.state == 'proforma') or removeParentNode('para')) and '' ]]</para>
<para style="P21">Draft[[ ((voucher.state == 'draft') or removeParentNode('para')) and '' ]]</para>
<para style="P21">Canceled [[ ((voucher.state == 'cancel') or removeParentNode('para')) and '' ]]</para>
<para style="P21">Posted [[ ((voucher.state == 'posted') or removeParentNode('para')) and '' ]]</para>
<para style="P16">PRO-FORMA [[ ((voucher.state == 'proforma') or removeParentNode('para')) and '' ]]</para>
<para style="P16">Draft[[ ((voucher.state == 'draft') or removeParentNode('para')) and '' ]]</para>
<para style="P16">Canceled [[ ((voucher.state == 'cancel') or removeParentNode('para')) and '' ]]</para>
<para style="P16">Posted [[ ((voucher.state == 'posted') or removeParentNode('para')) and '' ]]</para>
</td>
<td>
<para style="P3">
<para style="P2">
<font color="white"> </font>
</para>
</td>
<td>
<para style="P10">Ref. :</para>
<para style="P9">Ref. :</para>
</td>
<td>
<para style="P11">[[ voucher.reference ]]</para>
<para style="P10">[[ voucher.reference ]]</para>
</td>
</tr>
</blockTable>
<para style="P13">
<para style="P11">
<font color="white"> </font>
</para>
<para style="P13">
<para style="P11">
<font color="white"> </font>
</para>
<blockTable colWidths="255.0,114.0,114.0" style="Heading1">
<blockTable colWidths="255.0,114.0,113.0" style="Heading1">
<tr>
<td>
<para style="P15">Particulars</para>
<para style="terp_header">Particulars</para>
</td>
<td>
<para style="P16">Debit</para>
<para style="terp_header_Right">Debit</para>
</td>
<td>
<para style="P16">Credit</para>
<para style="terp_header_Right">Credit</para>
</td>
</tr>
</blockTable>
<para style="terp_default_1"/>
<blockTable colWidths="482.0" style="voucher_lines">
<tr>
<td>
<para style="terp_default_1">
<font color="white"> </font>
</para>
<section>
<para style="terp_default_8">[[ repeatIn(voucher.move_ids,'move_ids') ]] </para>
<blockTable colWidths="251.0,114.0,111.0" style="Table4">
<tr>
<td>
<para style="P12">[[ (move_ids.partner_id and move_ids.partner_id.name) or '']] :</para>
<para style="P24">[[ move_ids.account_id.name ]] </para>
<para style="P27">[[ get_ref(voucher.id,move_ids) ]]</para>
</td>
<td>
<para style="P20">[[ move_ids.debit ]]</para>
</td>
<td>
<para style="P20">[[ move_ids.credit ]]</para>
</td>
</tr>
</blockTable>
<para style="terp_default_1">
<para style="terp_default_1">
<font color="white"> </font>
</para>
<section>
<para style="terp_default_8">[[ repeatIn(voucher.move_ids,'move_ids') ]] </para>
<blockTable colWidths="254.0,115.0,113.0" style="Table2">
<tr>
<td>
<para style="terp_default_Bold_9">
<font face="Helvetica" size="10.0">[[ (move_ids.partner_id and move_ids.partner_id.name) or 'Account']] </font>
</para>
</td>
<td>
<para style="terp_default_Right_9">[[ formatLang(move_ids.debit) ]]</para>
</td>
<td>
<para style="terp_default_Right_9">[[ formatLang(move_ids.credit) ]]</para>
</td>
</tr>
<tr>
<td>
<para style="terp_default_9_with_indent_10">
<font face="Helvetica">[[ move_ids.account_id.name ]] </font>
</para>
</td>
<td>
<para style="terp_default_Right_9">
<font color="white"> </font>
</para>
</section>
<para style="P28">
<font color="white"> </font>
</para>
</td>
</tr>
</blockTable>
</td>
<td>
<para style="terp_default_Right_9">
<font color="white"> </font>
</para>
</td>
</tr>
<tr>
<td>
<para style="terp_default_8_Italic">[[ move_ids.name ]] - [[ get_ref(voucher.id,move_ids) ]]</para>
</td>
<td>
<para style="terp_default_9_50">
<font color="white"> </font>
</para>
</td>
<td>
<para style="terp_default_9_50">
<font color="white"> </font>
</para>
</td>
</tr>
</blockTable>
<para style="terp_default_1">
<font color="white"> </font>
</para>
</section>
<para style="terp_default_9">
<font color="white"> </font>
</para>
<blockTable colWidths="253.0,114.0,114.0" style="last_info">
<tr>
<td>
<para style="P14">
<para style="P12">Through : </para>
</td>
<td>
<para style="P2">
<font color="white"> </font>
</para>
</td>
<td>
<para style="P3">
<font color="white"> </font>
</para>
</td>
<td>
<para style="P3">
<para style="P2">
<font color="white"> </font>
</para>
</td>
</tr>
<tr>
<td>
<para style="P14">Through : </para>
<para style="P19">[[ voucher.narration or '']]</para>
</td>
<td>
<para style="P3">
<para style="P2">
<font color="white"> </font>
</para>
</td>
<td>
<para style="P3">
<para style="P2">
<font color="white"> </font>
</para>
</td>
</tr>
<tr>
<td>
<para style="P25">[[ voucher.narration or '']]</para>
<para style="P12">On Account of : </para>
</td>
<td>
<para style="P3">
<para style="P2">
<font color="white"> </font>
</para>
</td>
<td>
<para style="P3">
<para style="P2">
<font color="white"> </font>
</para>
</td>
</tr>
<tr>
<td>
<para style="P14">On Account of : </para>
<para style="P20">[[ voucher.name ]]</para>
</td>
<td>
<para style="P3">
<para style="P2">
<font color="white"> </font>
</para>
</td>
<td>
<para style="P3">
<para style="P2">
<font color="white"> </font>
</para>
</td>
</tr>
<tr>
<td>
<para style="P26">[[ voucher.name ]]</para>
<para style="P12">Amount (in words) : </para>
</td>
<td>
<para style="P3">
<para style="P12">
<font color="white"> </font>
</para>
</td>
<td>
<para style="P3">
<para style="P12">
<font color="white"> </font>
</para>
</td>
</tr>
<tr>
<td>
<para style="P14">Amount (in words) : </para>
<para style="P20">[[ convert(voucher.amount,voucher.currency_id.name) ]]</para>
</td>
<td>
<para style="P14">
<para style="P11">
<font color="white"> </font>
</para>
</td>
<td>
<para style="P14">
<para style="P11">
<font color="white"> </font>
</para>
</td>
</tr>
<tr>
<td>
<para style="P26">[[ convert(voucher.amount,voucher.currency_id.name) ]]</para>
</td>
<td>
<para style="P13">
<font color="white"> </font>
</para>
</td>
<td>
<para style="P13">
<font color="white"> </font>
</para>
</td>
</tr>
<tr>
<td>
<para style="P17">
<font color="white"> </font>
</para>
<para style="P25">[[ debit(voucher.move_ids)]]</para>
</td>
<td>
<para style="P18">[[ debit(voucher.move_ids)]]</para>
</td>
<td>
<para style="P18">[[ credit(voucher.move_ids) ]]</para>
<para style="P25">[[ credit(voucher.move_ids) ]]</para>
</td>
</tr>
</blockTable>
<para style="P19">
<para style="P14">
<font color="white"> </font>
</para>
<blockTable colWidths="142.0,99.0,105.0,136.0" style="Table3">
<tr>
<td>
<para style="P7">
<para style="P6">
<font color="white"> </font>
</para>
<para style="P7">
<para style="P6">
<font color="white"> </font>
</para>
<para style="P7">
<para style="P6">
<font color="white"> </font>
</para>
<para style="P7">
<para style="P6">
<font color="white"> </font>
</para>
</td>
<td>
<para style="P6">
<font color="white"> </font>
</para>
</td>
@ -404,32 +409,27 @@
<font color="white"> </font>
</para>
</td>
<td>
<para style="P9">
<font color="white"> </font>
</para>
</td>
</tr>
<tr>
<td>
<para style="P22">Receiver's Signature</para>
<para style="P17">Receiver's Signature</para>
</td>
<td>
<para style="P22">
<para style="P17">
<font color="white"> </font>
</para>
</td>
<td>
<para style="P22">
<para style="P17">
<font color="white"> </font>
</para>
</td>
<td>
<para style="P22">Authorised Signatory</para>
<para style="P17">Authorised Signatory</para>
</td>
</tr>
</blockTable>
<para style="P1">
<para style="terp_default_8">
<font color="white"> </font>
</para>
</story>

View File

@ -23,7 +23,6 @@ import time
from report import report_sxw
from tools import amount_to_text_en
class report_voucher_amount(report_sxw.rml_parse):
def __init__(self, cr, uid, name, context):
super(report_voucher_amount, self).__init__(cr, uid, name, context)
@ -42,4 +41,4 @@ report_sxw.report_sxw(
'account.voucher',
'addons/account_voucher/report/report_voucher_amount.rml',
parser=report_voucher_amount,header=False
)
)

View File

@ -34,10 +34,10 @@
<blockTableStyle id="last_info">
<blockAlignment value="LEFT"/>
<blockValign value="TOP"/>
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="0,7" stop="0,7"/>
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="0,6" stop="0,6"/>
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="0,-1" stop="0,-1"/>
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="1,7" stop="1,-1"/>
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="1,7" stop="1,7"/>
<lineStyle kind="LINEBEFORE" colorName="#cccccc" start="1,6" stop="1,-1"/>
<lineStyle kind="LINEABOVE" colorName="#cccccc" start="1,6" stop="1,6"/>
<lineStyle kind="LINEBELOW" colorName="#cccccc" start="1,-1" stop="1,-1"/>
</blockTableStyle>
<blockTableStyle id="Table5">
@ -60,31 +60,27 @@
<paraStyle name="P11" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P12" fontName="Helvetica" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P13" fontName="Helvetica-Bold" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P14" fontName="Helvetica-Bold" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P15" fontName="Helvetica-Bold" fontSize="12.0" leading="15" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P16" fontName="Helvetica" fontSize="12.0" leading="15" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P17" fontName="Helvetica" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P18" fontName="Helvetica" fontSize="5.0" leading="7" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0" textColor="#000000"/>
<paraStyle name="P19" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P20" fontName="Helvetica" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P21" fontName="Helvetica-Bold" fontSize="13.0" leading="16" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P22" rightIndent="0.0" leftIndent="35.0" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P23" rightIndent="0.0" leftIndent="35.0" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P24" fontName="Helvetica-Bold" fontSize="10.0" leading="13" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P25" fontName="Helvetica-Bold" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0" textColor="#000000"/>
<paraStyle name="P26" fontName="Helvetica" fontSize="12.0" leading="15" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0" textColor="#000000"/>
<paraStyle name="P27" rightIndent="0.0" leftIndent="35.0" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0" textColor="#000000"/>
<paraStyle name="P28" rightIndent="0.0" leftIndent="71.0" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0" textColor="#000000"/>
<paraStyle name="P29" fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0" textColor="#000000"/>
<paraStyle name="Standard" fontName="Times-Roman" fontSize="12.0" leading="15" alignment="LEFT"/>
<paraStyle name="P14" fontName="Helvetica" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P15" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P16" fontName="Helvetica" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P17" fontName="Helvetica-Bold" fontSize="13.0" leading="16" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="P18" rightIndent="0.0" leftIndent="35.0" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P19" rightIndent="0.0" leftIndent="35.0" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P20" fontName="Helvetica-Bold" fontSize="10.0" leading="13" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="P21" fontName="Helvetica" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0" textColor="#000000"/>
<paraStyle name="P22" fontName="Helvetica" fontSize="12.0" leading="15" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0" textColor="#000000"/>
<paraStyle name="P23" rightIndent="0.0" leftIndent="35.0" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0" textColor="#000000"/>
<paraStyle name="P24" rightIndent="0.0" leftIndent="71.0" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0" textColor="#000000"/>
<paraStyle name="P25" fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0" textColor="#000000"/>
<paraStyle name="Standard" fontName="Helvetica" fontSize="12.0" leading="15" alignment="LEFT"/>
<paraStyle name="Heading" fontName="Helvetica" fontSize="14.0" leading="17" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="Text body" fontName="Times-Roman" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="List" fontName="Times-Roman" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="Caption" fontName="Times-Italic" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="Index" fontName="Times-Roman" fontSize="12.0" leading="15" alignment="LEFT"/>
<paraStyle name="Table Contents" fontName="Times-Roman" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="Table Heading" fontName="Times-Bold" fontSize="12.0" leading="15" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="terp_header" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="Text body" fontName="Helvetica" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="List" fontName="Helvetica" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="Caption" fontName="Helvetica-Oblique" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="Index" fontName="Helvetica" fontSize="12.0" leading="15" alignment="LEFT"/>
<paraStyle name="Table Contents" fontName="Helvetica" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="Table Heading" fontName="Helvetica-Bold" fontSize="12.0" leading="15" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="terp_header" fontName="Helvetica-Bold" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Bold_8" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Bold_9" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
@ -93,26 +89,26 @@
<paraStyle name="terp_tblheader_General_Centre" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="terp_default_Centre_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_tblheader_Details" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="Footer" fontName="Times-Roman" fontSize="12.0" leading="15" alignment="LEFT"/>
<paraStyle name="Horizontal Line" fontName="Times-Roman" fontSize="6.0" leading="8" alignment="LEFT" spaceBefore="0.0" spaceAfter="14.0"/>
<paraStyle name="Footer" fontName="Helvetica" fontSize="12.0" leading="15" alignment="LEFT"/>
<paraStyle name="Horizontal Line" fontName="Helvetica" fontSize="6.0" leading="8" alignment="LEFT" spaceBefore="0.0" spaceAfter="14.0"/>
<paraStyle name="Heading 9" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="terp_tblheader_General_Right" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="terp_tblheader_Details_Centre" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="terp_tblheader_Details_Right" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="terp_default_Right_8" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_header_Right" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="terp_header_Centre" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="CENTER" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="terp_header_Right" fontName="Helvetica-Bold" fontSize="12.0" leading="15" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_header_Centre" fontName="Helvetica-Bold" fontSize="12.0" leading="15" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_address" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Centre_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Right_9" fontName="Helvetica" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_1" fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Right_9_Bold" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_8_Italic" fontName="Helvetica-Oblique" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="Drawing" fontName="Times-Italic" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="Header" fontName="Times-Roman" fontSize="12.0" leading="15" alignment="LEFT"/>
<paraStyle name="Endnote" rightIndent="0.0" leftIndent="14.0" fontName="Times-Roman" fontSize="10.0" leading="13" alignment="LEFT"/>
<paraStyle name="Addressee" fontName="Times-Roman" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="0.0" spaceAfter="3.0"/>
<paraStyle name="Signature" fontName="Times-Roman" fontSize="12.0" leading="15" alignment="LEFT"/>
<paraStyle name="Drawing" fontName="Helvetica-Oblique" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="Header" fontName="Helvetica" fontSize="12.0" leading="15" alignment="LEFT"/>
<paraStyle name="Endnote" rightIndent="0.0" leftIndent="14.0" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT"/>
<paraStyle name="Addressee" fontName="Helvetica" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="0.0" spaceAfter="3.0"/>
<paraStyle name="Signature" fontName="Helvetica" fontSize="12.0" leading="15" alignment="LEFT"/>
<paraStyle name="Heading 8" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="Heading 7" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="Heading 6" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
@ -121,17 +117,19 @@
<paraStyle name="Heading 1" fontName="Helvetica-Bold" fontSize="115%" leading="NaN" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="Heading 10" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="Heading 2" fontName="Helvetica-BoldOblique" fontSize="14.0" leading="17" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="First line indent" rightIndent="0.0" leftIndent="0.0" fontName="Times-Roman" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="Hanging indent" rightIndent="0.0" leftIndent="28.0" fontName="Times-Roman" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="Salutation" fontName="Times-Roman" fontSize="12.0" leading="15" alignment="LEFT"/>
<paraStyle name="Text body indent" rightIndent="0.0" leftIndent="0.0" fontName="Times-Roman" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="First line indent" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="Hanging indent" rightIndent="0.0" leftIndent="28.0" fontName="Helvetica" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="Salutation" fontName="Helvetica" fontSize="12.0" leading="15" alignment="LEFT"/>
<paraStyle name="Text body indent" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="Heading 3" fontName="Helvetica-Bold" fontSize="14.0" leading="17" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="List Indent" rightIndent="0.0" leftIndent="142.0" fontName="Times-Roman" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="Marginalia" rightIndent="0.0" leftIndent="113.0" fontName="Times-Roman" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="List Indent" rightIndent="0.0" leftIndent="142.0" fontName="Helvetica" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="Marginalia" rightIndent="0.0" leftIndent="113.0" fontName="Helvetica" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="terp_default_9_30" rightIndent="0.0" leftIndent="9.0" fontName="Helvetica" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_9_50" rightIndent="0.0" leftIndent="14.0" fontName="Helvetica" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<images/>
</stylesheet>
<images/>
<story>
<para style="P24">[[ repeatIn(objects,'voucher') ]]</para>
<para style="P20">[[ repeatIn(objects,'voucher') ]]</para>
<para style="P4">[[ company.name ]]</para>
<para style="P6">[[ company.partner_id.address and company.partner_id.address[0].street ]]</para>
<para style="P6">[[ company.partner_id.address and company.partner_id.address[0].zip ]] [[ company.partner_id.address and company.partner_id.address[0].city ]] - [[ company.partner_id.address and company.partner_id.address[0].country_id and company.partner_id.address[0].country_id.name ]]</para>
@ -140,11 +138,11 @@
<para style="P5">
<font color="white"> </font>
</para>
<para style="P21">Cash Receipt Voucher [[ (voucher.type == 'rec_voucher' or removeParentNode('para')) and '' ]]</para>
<para style="P17">Cash Receipt Voucher [[ (voucher.type == 'rec_voucher' or removeParentNode('para')) and '' ]]</para>
<para style="P2">Cash Payment Voucher [[ (voucher.type == 'pay_voucher' or removeParentNode('para')) and '' ]]</para>
<para style="P21">Bank Receipt Voucher [[ (voucher.type == 'bank_rec_voucher' or removeParentNode('para')) and '' ]]</para>
<para style="P17">Bank Receipt Voucher [[ (voucher.type == 'bank_rec_voucher' or removeParentNode('para')) and '' ]]</para>
<para style="P2">Bank Payment Voucher [[ (voucher.type == 'bank_pay_voucher' or removeParentNode('para')) and '' ]]</para>
<para style="P20">
<para style="P16">
<font color="white"> </font>
</para>
<blockTable colWidths="68.0,124.0,122.0,62.0,106.0" style="Table1">
@ -172,10 +170,10 @@
<para style="P10">State :</para>
</td>
<td>
<para style="P19">PRO-FORMA [[ ((voucher.state == 'proforma') or removeParentNode('para')) and '' ]]</para>
<para style="P19">Draft[[ ((voucher.state == 'draft') or removeParentNode('para')) and '' ]]</para>
<para style="P19">Canceled [[ ((voucher.state == 'cancel') or removeParentNode('para')) and '' ]]</para>
<para style="P19">Posted [[ ((voucher.state == 'posted') or removeParentNode('para')) and '' ]]</para>
<para style="P15">PRO-FORMA [[ ((voucher.state == 'proforma') or removeParentNode('para')) and '' ]]</para>
<para style="P15">Draft[[ ((voucher.state == 'draft') or removeParentNode('para')) and '' ]]</para>
<para style="P15">Canceled [[ ((voucher.state == 'cancel') or removeParentNode('para')) and '' ]]</para>
<para style="P15">Posted [[ ((voucher.state == 'posted') or removeParentNode('para')) and '' ]]</para>
</td>
<td>
<para style="P3">
@ -194,7 +192,7 @@
<para style="P10">Account :</para>
</td>
<td>
<para style="P19">[[ voucher.account_id.name ]]</para>
<para style="P15">[[ voucher.account_id.name ]]</para>
</td>
<td>
<para style="P3">
@ -222,10 +220,10 @@
<blockTable colWidths="344.0,138.0" style="Heading1">
<tr>
<td>
<para style="P14">Particulars</para>
<para style="terp_header">Particulars</para>
</td>
<td>
<para style="P15">Amount</para>
<para style="terp_header_Right">Amount</para>
</td>
</tr>
</blockTable>
@ -237,41 +235,60 @@
</para>
<section>
<para style="terp_default_8">[[ repeatIn(voucher.payment_ids,'payment_ids') ]] </para>
<blockTable colWidths="340.0,136.0" style="Table3">
<blockTable colWidths="342.0,135.0" style="Table3">
<tr>
<td>
<para style="P25">[[ payment_ids.partner_id.name ]] :</para>
<para style="P27">[[ payment_ids.account_id.name ]] </para>
<para style="P28">[[ payment_ids.ref ]] [[ payment_ids.amount ]] [[ payment_ids.type ]]</para>
<para style="terp_header">[[ payment_ids.partner_id and payment_ids.partner_id.name or '' ]] </para>
</td>
<td>
<para style="P26">[[ payment_ids.amount ]]</para>
<para style="terp_header_Right">[[ payment_ids.amount ]]</para>
</td>
</tr>
<tr>
<td>
<para style="terp_default_9_30">[[ payment_ids.account_id.name ]] </para>
</td>
<td>
<para style="P22">
<font color="white"> </font>
</para>
</td>
</tr>
<tr>
<td>
<para style="terp_default_9_50">[[ payment_ids.ref ]] [[ payment_ids.amount ]] </para>
</td>
<td>
<para style="terp_default_9_50">
<font color="white"> </font>
</para>
</td>
</tr>
<tr>
<td>
<para style="terp_default_9_50">[[ payment_ids.type ]]</para>
</td>
<td>
<para style="terp_default_9_50">
<font color="white"> </font>
</para>
</td>
</tr>
</blockTable>
<para style="terp_default_1">
<para style="terp_default_9">
<font color="white"> </font>
</para>
</section>
<para style="P29">
<para style="terp_default_9">
<font color="white"> </font>
</para>
<para style="P25">
<font color="white"> </font>
</para>
</td>
</tr>
</blockTable>
<blockTable colWidths="344.0,138.0" style="last_info">
<tr>
<td>
<para style="P13">
<font color="white"> </font>
</para>
</td>
<td>
<para style="P3">
<font color="white"> </font>
</para>
</td>
</tr>
<tr>
<td>
<para style="P13">Through : </para>
@ -284,7 +301,7 @@
</tr>
<tr>
<td>
<para style="P22">[[ voucher.narration or '' ]] </para>
<para style="P18">[[ voucher.narration or '' ]] </para>
</td>
<td>
<para style="P11">
@ -304,7 +321,7 @@
</tr>
<tr>
<td>
<para style="P23">[[ voucher.name ]]</para>
<para style="P19">[[ voucher.name ]]</para>
</td>
<td>
<para style="P11">
@ -324,7 +341,7 @@
</tr>
<tr>
<td>
<para style="P23">[[ convert(voucher.amount,voucher.currency_id.name) ]]</para>
<para style="P19">[[ convert(voucher.amount,voucher.currency_id.name) ]]</para>
</td>
<td>
<para style="P12">
@ -339,11 +356,11 @@
</para>
</td>
<td>
<para style="P16">[[ voucher.amount ]]</para>
<para style="terp_header_Right">[[ voucher.amount ]]</para>
</td>
</tr>
</blockTable>
<para style="P17">
<para style="P14">
<font color="white"> </font>
</para>
<blockTable colWidths="142.0,99.0,105.0,136.0" style="Table5">
@ -380,20 +397,20 @@
</tr>
<tr>
<td>
<para style="P20">Receiver's Signature</para>
<para style="P16">Receiver's Signature</para>
</td>
<td>
<para style="P20">
<para style="P16">
<font color="white"> </font>
</para>
</td>
<td>
<para style="P20">
<para style="P16">
<font color="white"> </font>
</para>
</td>
<td>
<para style="P20">Authorised Signatory</para>
<para style="P16">Authorised Signatory</para>
</td>
</tr>
</blockTable>

View File

@ -0,0 +1,22 @@
<?xml version="1.0"?>
<openerp>
<data>
<report id="report_account_voucher"
string="Print Voucher"
model="account.voucher"
name="voucher.cash_receipt.drcr"
rml="account_voucher/report/report_voucher.rml"
auto="False"
header = "False"
menu="True"/>
<report id="report_account_voucher_amt"
string="Print Receipt"
model="account.voucher"
name="voucher.cash_amount"
rml="account_voucher/report/report_voucher_amount.rml"
auto="False"
header = "False"
menu="True"/>
</data>
</openerp>

View File

@ -7,12 +7,15 @@
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Vouchers">
<field name="date"/>
<field name="number"/>
<field name="name"/>
<field name="journal_id"/>
<field name="type" invisible=" not context.get('set_visible',True)"/>
<field name="account_id" />
<field name="amount"/>
<field name="date"/>
<field name="amount" sum="Total Amount"/>
<field name="period_id"/>
<field name="state"/>
</tree>
</field>
</record>
@ -24,7 +27,7 @@
<field name="arch" type="xml">
<form string="Voucher">
<group col="6" colspan="4">
<field name="name" select="1" colspan="4"/>
<field name="name" colspan="4"/>
<field name="journal_id" select="1" on_change="onchange_journal(journal_id,type)"/>
<field name="account_id" on_change="onchange_account(account_id)"/>
<field name="type" on_change="onchange_journal(journal_id,type)"/>
@ -69,7 +72,37 @@
</form>
</field>
</record>
<record id="view_account_move_filter" model="ir.ui.view">
<field name="name">account.voucher.select</field>
<field name="model">account.voucher</field>
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Search Vouchers">
<group col='8' colspan='4'>
<filter icon="terp-account" string="Draft" domain="[('state','=','draft')]" help="Draft Vouchers"/>
<filter icon="terp-account" string="Proforma" domain="[('state','=','proforma')]" help="Proforma Vouchers"/>
<filter icon="terp-account" string="Posted" domain="[('state','=','posted')]" help="Posted Vouchers"/>
<filter icon="terp-account" string="Cancel" domain="[('state','=','cancel')]" help="Cancel Vouchers"/>
<separator orientation="vertical"/>
<field name="date" select='1'/>
<field name="name" select='1'/>
<field name="number" select='1'/>
<field name="journal_id" select='1'/>
<field name="partner_id" select='1'/>
<field name="period_id" select='1'/>
</group>
<newline/>
<group expand="1" string="Group By..." colspan="12" col="10">
<filter string="Journal" icon="terp-account" domain="[]" context="{'group_by':'journal_id'}"/>
<filter string="Period" icon="terp-account" domain="[]" context="{'group_by':'period_id'}"/>
<filter string="Type" icon="terp-account" domain="[]" context="{'group_by':'type', 'set_visible':True}"/>
<filter string="States" icon="terp-account" domain="[]" context="{'group_by':'state'}"/>
</group>
</search>
</field>
</record>
<record model="ir.actions.act_window" id="action_voucher_list">
<field name="name">Vouchers</field>
<field name="res_model">account.voucher</field>

View File

@ -1,24 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<openerp>
<data>
<data>
<record id="account_open_vouchers_view" model="ir.ui.view">
<field name="name">Open Vouchers</field>
<field name="model">account.open.voucher</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Open Vouchers">
<field name="type"/>
<field name="state"/>
<field name="period_ids" colspan="4"/>
<group colspan="4" col="6">
<separator colspan="6"/>
<button special="cancel" string="Cancel" icon="gtk-cancel"/>
<button name="action_open_window" string="Open Voucher Entries" type="object" icon="gtk-ok"/>
</group>
</form>
<form string="Open Vouchers">
<field name="type"/>
<field name="state"/>
<field name="period_ids" colspan="4"/>
<group colspan="4" col="6">
<separator colspan="6"/>
<button special="cancel" string="Cancel" icon="gtk-cancel"/>
<button name="action_open_window" string="Open Voucher Entries" type="object" icon="gtk-ok"/>
</group>
</form>
</field>
</record>
</record>
<record id="action_account_open_vouchers" model="ir.actions.act_window">
<field name="name">Open Vouchers</field>
@ -28,15 +28,15 @@
<field name="view_mode">tree,form</field>
<field name="view_id" ref="account_open_vouchers_view"/>
<field name="context">{'record_id':active_id}</field>
<field name="target">new</field>
<field name="target">new</field>
</record>
<menuitem
icon="STOCK_EXECUTE"
name="Open Vouchers"
action="action_account_open_vouchers"
id="menu_account_voucher_open"
parent="menu_action_voucher_list"/>
<menuitem
icon="STOCK_EXECUTE"
name="Open Vouchers"
action="action_account_open_vouchers"
id="menu_account_voucher_open"
parent="menu_action_voucher_list"/>
</data>
</openerp>
</data>
</openerp>

View File

@ -50,8 +50,10 @@
'wizard/auction_payer_sel_view.xml',
'wizard/auction_lots_sms_send_view.xml',
'wizard/auction_catalog_flagey_view.xml',
# 'wizard/auction_aie_send_view.xml',
# 'wizard/auction_aie_send_result_view.xml',
'wizard/auction_lots_buyer_map_view.xml',
# 'wizard/auction_lots_numerotate_view.xml',
'auction_view.xml',
'auction_report.xml',

View File

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

View File

@ -0,0 +1,223 @@
# -*- 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/>.
#
##############################################################################
#
# Does not properly work concurrently !!!
#
import base64
import mimetypes
import httplib
import threading
from tools.translate import _
from osv import fields,osv
class auction_lots_send_aie(osv.osv_memory):
_name = 'auction.lots.send.aie'
_descritption = 'Send to website'
def _date_get(self, cr, uid, context={}):
selection = context and context.get('selection')
if selection:
return [('','')] + selection
return [('','')]
_columns = {
'uname': fields.char('Login', size=64),
'password': fields.char('Password', size=64),
'objects': fields.integer('# of objects', readonly=True),
'lang': fields.selection([('fr','fr'),('ned','ned'),('eng','eng'),('de','de')],'Language'),
'numerotation': fields.selection([('prov','Provisoire'),('definite','Definitive (ordre catalogue)')],'Numerotation'),
'dates': fields.selection(_date_get,'Auction Date'),
'img_send': fields.boolean('Send Image also ?'),
}
def default_get(self, cr, uid, fields, context):
"""
To get default values for the object.
@param self: The object pointer.
@param cr: A database cursor
@param uid: ID of the user currently logged in
@param fields: List of fields for which we want default values
@param context: A standard dictionary
@return: A dictionary which of fields with values.
"""
res = super(auction_lots_send_aie, self).default_get(cr, uid, fields, context=context)
if 'uname' in fields and context.get('uname',False):
res['uname'] = context.get('uname')
if 'password' in fields and context.get('password',False):
res['password'] = context.get('password')
return res
def _catalog_send(uname, passwd, lang, did, catalog):
def post_multipart(host, selector, fields, files):
def encode_multipart_formdata(fields, files):
BOUNDARY = '----------ThIs_Is_tHe_bouNdaRY_$'
CRLF = '\r\n'
L = []
for (key, value) in fields:
L.append('--' + BOUNDARY)
L.append('Content-Disposition: form-data; name="%s"' % key)
L.append('')
L.append(value)
for (key,value) in files:
L.append('--' + BOUNDARY)
L.append('Content-Disposition: form-data; name="%s"; filename="%s"' % (key, key+'.pickle'))
L.append('Content-Type: application/octet-stream')
L.append('')
L.append(value)
L.append('--' + BOUNDARY + '--')
L.append('')
body = CRLF.join(L)
content_type = 'multipart/form-data; boundary=%s' % BOUNDARY
return content_type, body
content_type, body = encode_multipart_formdata(fields, files)
import httplib
headers = {"Content-type": content_type, "Accept": "*/*"}
conn = httplib.HTTPConnection(host)
conn.request("POST", '/bin/catalog.cgi', body, headers = headers)
response = conn.getresponse()
val = response.status
conn.close()
return val
return post_multipart('auction-in-europe.com', "/bin/catalog.cgi", (('uname',uname),('password',passwd),('did',did),('lang',lang)),(('file',catalog),))
def _photo_bin_send(uname, passwd, ref, did, photo_name, photo_data):
def get_content_type(filename):
return mimetypes.guess_type(filename)[0] or 'application/octet-stream'
def post_multipart(host, selector, fields, files):
def encode_multipart_formdata(fields, files):
BOUNDARY = '----------ThIs_Is_tHe_bouNdaRY_$'
CRLF = '\r\n'
L = []
for (key, value) in fields:
L.append('--' + BOUNDARY)
L.append('Content-Disposition: form-data; name="%s"' % key)
L.append('')
L.append(value)
for (key, filename, data) in files:
L.append('--' + BOUNDARY)
L.append('Content-Disposition: form-data; name="%s"; filename="%s"' % (key, filename))
L.append('Content-Type: %s' % get_content_type(filename))
L.append('')
L.append(data)
L.append('--' + BOUNDARY + '--')
L.append('')
body = CRLF.join(L)
content_type = 'multipart/form-data; boundary=%s' % BOUNDARY
return content_type, body
content_type, body = encode_multipart_formdata(fields, files)
headers = {"Content-type": content_type, "Accept": "*/*"}
conn = httplib.HTTPConnection(host)
conn.request("POST", '/bin/photo.cgi', body, headers = headers)
response = conn.getresponse()
val = response.status
conn.close()
return val
return post_multipart('auction-in-europe.com', "/bin/photo.cgi", (('uname',uname),('ref',ref),('passwd',passwd),('did',did)),(('file',photo_name,photo_data),))
def _photos_send(cr, uid, uname, passwd, did, ids):
service = netsvc.LocalService("object_proxy")
for (ref,id) in ids:
# ids_attach = service.execute(db_name,uid, 'ir.attachment', 'search', [('res_model','=','auction.lots'), ('res_id', '=',id)])
datas = service.execute(cr.db_name,uid, 'auction.lots', 'read',[id], ['name','image'])
if len(datas):
bin = base64.decodestring(datas[0]['image'])
fname = datas[0]['name']
_photo_bin_send(uname, passwd, ref, did, fname, bin)
def get_dates(self, cr, uid, ids, context={}):
import httplib
data_obj = self.pool.get('ir.model.data')
conn = httplib.HTTPConnection('www.auction-in-europe.com')
datas = self.read(cr, uid, ids[0],['uname','password'])
conn.request("GET", "/aie_upload/dates_get.php?uname=%s&passwd=%s" % (datas['uname'], datas['password']))
response = conn.getresponse()
if response.status == 200:
def _date_decode(x):
return (x.split(' - ')[0], (' - '.join(x.split(' - ')[1:]).decode('latin1','replace').encode('utf-8','replace')))
context['selection'] = map(_date_decode, response.read().split('\n'))
self._date_get(cr, uid, context=context)
else:
raise osv.except_osv(_('Error'), _("Connection to WWW.Auction-in-Europe.com failed !"))
id1 = data_obj._get_id(cr, uid, 'auction', 'view_auction_lots_send')
res_id = data_obj.browse(cr, uid, id1, context=context).res_id
context.update(datas)
return {
'view_type': 'form',
'view_mode': 'form',
'res_model': 'auction.lots.send.aie',
'views': [(res_id,'form')],
'type': 'ir.actions.act_window',
'target':'new',
'context': context
}
def _send(self, cr, uid, ids, context={}):
import pickle, thread, sql_db
cr.execute('select name,aie_categ from auction_lot_category')
vals = dict(cr.fetchall())
cr.close()
service = netsvc.LocalService("object_proxy")
lots = service.execute(cr.dbname, uid, 'auction.lots', 'read', context['active_ids'], ['obj_num','lot_num','obj_desc','bord_vnd_id','lot_est1','lot_est2','artist_id','lot_type','aie_categ'])
lots_ids = []
datas = self.read(cr, uid, ids[0],['uname','login','lang','numerotation','dates'])
for l in lots:
if datas['numerotation']=='prov':
l['ref']='%s%03d' % (l['bord_vnd_id'][1],l['lot_num'])
l['ref2']='%s%03d' % (l['bord_vnd_id'][1],l['lot_num'])
else:
l['ref']='%04d' % (l['obj_num'],)
l['ref2']='%s%03d' % (l['bord_vnd_id'][1],l['lot_num'])
if l['artist_id']:
l['artist_id'] = l['artist_id'][1]
else:
l['artist_id'] = ''
for n in ('obj_desc','artist_id','lot_type'):
try:
l[n]=l[n].decode('utf-8','replace').encode('latin1','replace')
except:
l[n]=''
del l['lot_num']
del l['obj_num']
del l['bord_vnd_id']
l['aie_categ'] = vals.get(l['lot_type'], False)
lots_ids.append((l['ref'], l['id']))
args = pickle.dumps(lots)
thread.start_new_thread(_catalog_send, (datas['uname'],datas['password'],datas['lang'],datas['dates'], args))
if(datas['form']['img_send']==True):
thread.start_new_thread(_photos_send, (cr.dbname, uid, datas['uname'], datas['password'],datas['dates'], lots_ids))
return {}
def send_pdf(self, cr, uid, ids, context):
threaded_calculation = threading.Thread(target=self._send, args=(cr, uid, ids, context))
threaded_calculation.start()
return {}
auction_lots_send_aie()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -0,0 +1,139 @@
# -*- 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/>.
#
##############################################################################
#
# Does not properly work concurrently !!!
#
import netsvc
from tools.translate import _
from osv import fields, osv
class auction_lots_pay(osv.osv_memory):
_name = 'auction.lots.send.aie.results'
_description = 'Send results to Auction-in-europe.com'
def _date_get(self, cr, uid, context={}):
selection = context and context.get('selection')
if selection:
return [('','')] + selection
return [('','')]
_columns = {
'uname': fields.char('Login', size=64),
'password': fields.char('Password', size=64),
'objects': fields.integer('# of objects'),
'dates': fields.selection(_date_get,'Auction Date'),
}
def default_get(self, cr, uid, fields, context):
"""
To get default values for the object.
@param self: The object pointer.
@param cr: A database cursor
@param uid: ID of the user currently logged in
@param fields: List of fields for which we want default values
@param context: A standard dictionary
@return: A dictionary which of fields with values.
"""
res = super(auction_lots_pay, self).default_get(cr, uid, fields, context=context)
if 'uname' in fields and context.get('uname',False):
res['uname'] = context.get('uname')
if 'password' in fields and context.get('password',False):
res['password'] = context.get('password')
return res
def _catalog_send(self, uname, passwd, did, catalog):
def post_multipart(host, selector, fields, files):
def encode_multipart_formdata(fields, files):
BOUNDARY = '----------ThIs_Is_tHe_bouNdaRY_$'
CRLF = '\r\n'
L = []
for (key, value) in fields:
L.append('--' + BOUNDARY)
L.append('Content-Disposition: form-data; name="%s"' % key)
L.append('')
L.append(value)
for (key,value) in files:
L.append('--' + BOUNDARY)
L.append('Content-Disposition: form-data; name="%s"; filename="%s"' % (key, key+'.pickle'))
L.append('Content-Type: application/octet-stream')
L.append('')
L.append(value)
L.append('--' + BOUNDARY + '--')
L.append('')
body = CRLF.join(L)
content_type = 'multipart/form-data; boundary=%s' % BOUNDARY
return content_type, body
content_type, body = encode_multipart_formdata(fields, files)
import httplib
headers = {"Content-type": content_type, "Accept": "*/*"}
conn = httplib.HTTPConnection(host)
conn.request("POST", '/bin/catalog_result.cgi', body, headers = headers)
response = conn.getresponse()
val = response.status
conn.close()
return val
return post_multipart('auction-in-europe.com', "/bin/catalog_result.cgi", (('uname',uname),('password',passwd),('did',did)),(('file',catalog),))
def get_dates(self, cr, uid, ids, context):
import httplib
conn = httplib.HTTPConnection('www.auction-in-europe.com')
data_obj = self.pool.get('ir.model.data')
datas = self.read(cr, uid, ids[0],['uname','password'])
conn.request("GET", "/aie_upload/dates_get_result.php?uname=%s&passwd=%s" % (datas['uname'], datas['password']))
response = conn.getresponse()
if response.status == 200:
def _date_decode(x):
return (x.split(' - ')[0], (' - '.join(x.split(' - ')[1:]).decode('latin1').encode('utf-8')))
context['selection'] = map(_date_decode, response.read().split('\n'))
self._date_get(cr, uid, context=context)
else:
raise osv.except_osv(_('Error'),
_("Connection to WWW.Auction-in-Europe.com failed !"))
id1 = data_obj._get_id(cr, uid, 'auction', 'view_auction_lots_send_result_send')
res_id = data_obj.browse(cr, uid, id1, context=context).res_id
context.update(datas)
return {
'view_type': 'form',
'view_mode': 'form',
'res_model': 'auction.lots.send.aie.results',
'views': [(res_id,'form')],
'type': 'ir.actions.act_window',
'target':'new',
'context': context
}
def send(self, cr, uid, ids, context):
import pickle
service = netsvc.LocalService("object_proxy")
datas = self.read(cr, uid, ids[0],['uname','password','dates'])
lots = service.execute(cr.dbname, uid, 'auction.lots', 'read', context['active_ids'], ['obj_num','obj_price'])
args = pickle.dumps(lots)
self._catalog_send(datas['uname'], datas['password'], datas['dates'], args)
return {}
auction_lots_pay()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -0,0 +1,58 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<!-- Auction lots send result -->
<record id="view_auction_lots_send_result_login" model="ir.ui.view">
<field name="name">Auction lots send result - Login</field>
<field name="model">auction.lots.send.aie.results</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Login">
<field name="uname"/>
<newline/>
<field name="password" password="True"/>
<group col="2" colspan="4">
<button icon='gtk-cancel' special="cancel"
string="Cancel" />
<button name="get_dates" string="Continue"
colspan="1" type="object" icon="gtk-go-forward" />
</group>
</form>
</field>
</record>
<act_window name="Send results to Auction-in-europe.com"
res_model="auction.lots.send.aie.results"
src_model="auction.lots"
view_mode="form"
view_id="view_auction_lots_send_result_login"
target="new"
key2="client_action_multi"
id="action_view_auction_lots_send_result_login"/>
<record id="view_auction_lots_send_result_send" model="ir.ui.view">
<field name="name">Auction lots send result - Send</field>
<field name="model">auction.lots.send.aie.results</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Login">
<field name="uname" readonly="1"/>
<field name="password" password="True" readonly="1"/>
<newline/>
<field name="objects" readonly="1"/>
<newline/>
<field name="dates" colspan="3"/>
<group col="2" colspan="4">
<button icon='gtk-cancel' special="cancel"
string="Cancel" />
<button name="send" string="Send on your website"
colspan="1" type="object" icon="gtk-go-forward" />
</group>
</form>
</field>
</record>
</data>
</openerp>

View File

@ -0,0 +1,63 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<!-- Auction lots send result -->
<record id="view_auction_lots_send_login" model="ir.ui.view">
<field name="name">Auction lots send - Login</field>
<field name="model">auction.lots.send.aie</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Login">
<field name="uname"/>
<newline/>
<field name="password" password="True"/>
<separator colspan="4"/>
<group col="2" colspan="4">
<button icon='gtk-cancel' special="cancel"
string="Cancel" />
<button name="get_dates" string="Continue"
colspan="1" type="object" icon="gtk-go-forward" />
</group>
</form>
</field>
</record>
<act_window name="Send to website"
res_model="auction.lots.send.aie"
src_model="auction.lots"
view_mode="form"
view_id="view_auction_lots_send_login"
target="new"
key2="client_action_multi"
id="action_view_auction_lots_send_login"/>
<record id="view_auction_lots_send" model="ir.ui.view">
<field name="name">Auction lots - Send</field>
<field name="model">auction.lots.send.aie</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Login">
<field name="uname" readonly="1"/>
<field name="password" password="True" readonly="1"/>
<newline/>
<field name="objects"/>
<field name="lang"/>
<field name="numerotation"/>
<field name="img_send"/>
<newline/>
<field name="dates" colspan="3"/>
<separator colspan="4"/>
<group col="2" colspan="4">
<button icon='gtk-cancel' special="cancel"
string="Cancel" />
<button name="send_pdf" string="Send on your website"
colspan="1" type="object" icon="gtk-go-forward" />
</group>
</form>
</field>
</record>
</data>
</openerp>

View File

@ -0,0 +1,184 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import netsvc
import sql_db
from osv import osv, fields
from tools.translate import _
class auction_lots_numerotate_per_lot(osv.osv_memory):
_name = 'auction.lots.numerotate'
_description = 'Numerotation (per lot)'
_columns = {
'bord_vnd_id': fields.many2one('auction.deposit', 'Depositer Inventory', required=True),
'lot_num': fields.integer('Inventory Number', readonly=True),
'lot_est1': fields.float('Minimum Estimation', readonly=True),
'lot_est2': fields.float('Maximum Estimation', readonly=True),
'name': fields.char('Short Description', size=64, readonly=True),
'obj_desc': fields.text('Description', readonly=True),
'obj_num': fields.integer('Catalog Number', required=True)
}
def default_get(self, cr, uid, fields, context):
"""
To get default values for the object.
@param self: The object pointer.
@param cr: A database cursor
@param uid: ID of the user currently logged in
@param fields: List of fields for which we want default values
@param context: A standard dictionary
@return: A dictionary which of fields with values.
"""
res = super(auction_lots_numerotate_per_lot, self).default_get(cr, uid, fields, context=context)
active_id = context.get('active_id',False)
active_model = context.get('active_model')
if active_id and (active_model and active_model!='auction.lots'):
return res
lots_obj = self.pool.get('auction.lots')
lots = lots_obj.browse(cr, uid, active_id)
if 'bord_vnd_id' in fields and context.get('bord_vnd_id',False):
res['bord_vnd_id'] = context.get('bord_vnd_id')
if 'lot_num' in fields and context.get('lot_num',False):
res['lot_num'] = context.get('lot_num')
if 'lot_est1' in fields:
res['lot_est1'] = lots.lot_est1
if 'lot_est2' in fields:
res['lot_est2'] = lots.lot_est2
if 'name' in fields:
res['name'] = lots.name
if 'obj_desc' in fields:
res['obj_desc'] = lots.obj_desc
if 'obj_num' in fields:
res['obj_num'] = lots.obj_num
return res
def open_init_form(self, cr, uid, ids, context={}):
record_ids = context and context.get('active_ids',False) or False
assert record_ids, _('Active IDs not Found')
data_obj = self.pool.get('ir.model.data')
view_id = data_obj._get_id(cr, uid, 'auction', 'view_auction_numerotate')
if view_id:
res_id = data_obj.browse(cr, uid, view_id, context=context).res_id
return {
'view_type': 'form',
'view_mode': 'form',
'res_model': 'auction.lots.numerotate',
'res_id' : False,
'views': [(res_id,'form')],
'type': 'ir.actions.act_window',
'target':'new',
'context': context
}
def numerotate(self, cr, uid, ids, context={}):
record_ids = context and context.get('active_ids',False) or False
assert record_ids, _('Active IDs not Found')
datas = self.read(cr, uid, ids[0], ['bord_vnd_id','lot_num','obj_num'])
data_obj = self.pool.get('ir.model.data')
lots_obj = self.pool.get('auction.lots')
res = lots_obj.search(cr,uid,[('bord_vnd_id','=',datas['bord_vnd_id']),
('lot_num','=',int(datas['lot_num']))])
found = [r for r in res if r in record_ids]
if len(found)==0:
raise osv.except_osv('UserError', 'This record does not exist !')
lots_obj.write(cr, uid, found, {'obj_num':int(datas['obj_num'])} )
view_id = data_obj._get_id(cr, uid, 'auction', 'view_auction_numerotate')
if view_id:
res_id = data_obj.browse(cr, uid, view_id, context=context).res_id
context.update(datas)
return {
'view_type': 'form',
'view_mode': 'form',
'res_model': 'auction.lots.numerotate',
'res_id' : False,
'views': [(res_id,'form')],
'type': 'ir.actions.act_window',
'target':'new',
'context': context
}
def read_record(self, cr, uid, ids, context={}):
record_ids = context and context.get('active_ids',False) or False
assert record_ids, _('Active IDs not Found')
datas = self.read(cr, uid, ids[0], ['bord_vnd_id','lot_num'])
lots_obj = self.pool.get('auction.lots')
res = lots_obj.search(cr, uid, [('bord_vnd_id','=',datas['bord_vnd_id']),
('lot_num','=',int(datas['lot_num']))])
found = [r for r in res if r in record_ids]
if len(found)==0:
raise osv.except_osv('UserError', 'This record does not exist !')
lots_datas = lots_obj.read(cr, uid, found,
['obj_num', 'name', 'lot_est1',
'lot_est2', 'obj_desc'])
return lots_datas[0]
def test_exist(self, cr, uid, ids, context={}):
record_ids = context and context.get('active_ids',False) or False
assert record_ids, _('Active IDs not Found')
data_obj = self.pool.get('ir.model.data')
datas = self.read(cr, uid, ids[0], ['bord_vnd_id','lot_num'])
res = self.pool.get('auction.lots').search(cr, uid,
[('bord_vnd_id','=',datas['bord_vnd_id']),
('lot_num','=',int(datas['lot_num']))])
found = [r for r in res if r in record_ids]
if len(found)==0:
raise osv.except_osv('Error', 'This lot does not exist !')
view_id = data_obj._get_id(cr, uid, 'auction', 'view_auction_lots_numerotate_second')
if view_id:
res_id = data_obj.browse(cr, uid, view_id, context=context).res_id
context.update(datas)
return {
'view_type': 'form',
'view_mode': 'form',
'res_model': 'auction.lots.numerotate',
'res_id' : False,
'views': [(res_id,'form')],
'type': 'ir.actions.act_window',
'target':'new',
'context' : context
}
auction_lots_numerotate_per_lot()
class auction_lots_numerotate(osv.osv_memory):
_name = 'auction.lots.numerotate_cont'
_description = 'Numerotation (automatic)'
_columns = {
'number': fields.integer('First Number', required=True)
}
def numerotate_cont(self, cr, uid, ids, context={}):
record_ids = context and context.get('active_ids',False) or False
assert record_ids, _('Active IDs not Found')
datas = self.read(cr, uid, ids[0], ['number'])
nbr = int(datas['number'])
lots_obj = self.pool.get('auction.lots')
rec_ids = lots_obj.browse(cr, uid, record_ids)
for rec_id in rec_ids:
lots_obj.write(cr, uid, [rec_id.id], {'obj_num':nbr})
nbr+=1
return {}
auction_lots_numerotate()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -0,0 +1,132 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<!-- Numerotation (per lot) -->
<record id="view_auction_numerotate" model="ir.ui.view">
<field name="name">auction.lots.numerotate.open</field>
<field name="model">auction.lots.numerotate</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Catalog Numerotation" >
<separator string="Object Reference" colspan="4"/>
<field name="bord_vnd_id"/>
<newline/>
<field name="lot_num" readonly="False" required="True"/>
<separator colspan="4"/>
<group col="4" colspan="4">
<button icon='gtk-cancel' special="cancel"
string="Exit" />
<button name="test_exist" string="Continue"
colspan="2" type="object" icon="gtk-go-forward" />
</group>
</form>
</field>
</record>
<act_window name="Numerotation (per lot)"
res_model="auction.lots.numerotate"
src_model="auction.lots"
view_id="view_auction_numerotate"
view_mode="form"
target="new"
key2="client_action_multi"
id="action_view_auction_lots_numerotate"/>
<record id="view_auction_lots_numerotate_second" model="ir.ui.view">
<field name="name">auction.lots.numerotate.second</field>
<field name="model">auction.lots.numerotate</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Catalog Numerotation" >
<group>
<separator string="Object Reference" colspan="4"/>
<field name="bord_vnd_id" readonly="1"/>
<field name="lot_num" readonly="1"/>
<field name="name" readonly="1" colspan="3"/>
<field name="obj_desc" readonly="1" colspan="3"/>
<field name="lot_est1" readonly="1"/>
<field name="lot_est2" readonly="1"/>
<separator string="Object Reference" colspan="4"/>
<field name="obj_num"/>
</group>
<newline/>
<separator colspan="4"/>
<group col="4" colspan="4">
<button icon='gtk-cancel' special="cancel"
string="Exit" />
<button name="open_init_form" string="Back" type="object"
icon="gtk-go-back"/>
<button name="numerotate" string="Numerotate"
type="object" icon="gtk-go-forward"/>
</group>
</form>
</field>
</record>
<record id="action_auction_lots_numerotate" model="ir.actions.act_window">
<field name="name">Numerotation (per lot)</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">auction.lots.numerotate</field>
<field name="view_type">form</field>
<field name="view_mode">form</field>
<field name="view_id" ref="view_auction_lots_numerotate_second"/>
<field name="target">new</field>
</record>
<record id="view_auction_numerotate_not_exist" model="ir.ui.view">
<field name="name">auction.lots.numerotate.not_exist</field>
<field name="model">auction.lots.numerotate</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Catalog Numerotation">
<label string="This lot does not exist !" colspan="4"/>
<group col="4" colspan="4">
<button icon='gtk-cancel' special="cancel"
string="Exit" />
<button name="open_init_form" string="Retry" type="object"
icon="gtk-go-back"/>
</group>
</form>
</field>
</record>
<record id="action_auction_lots_numerotate_not_exist" model="ir.actions.act_window">
<field name="name">Numerotation - Not Exist</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">auction.lots.numerotate</field>
<field name="view_type">form</field>
<field name="view_mode">form</field>
<field name="view_id" ref="view_auction_numerotate_not_exist"/>
<field name="target">new</field>
</record>
<record id="view_auction_numerotate_cont" model="ir.ui.view">
<field name="name">Numerotation (automatic)</field>
<field name="model">auction.lots.numerotate_cont</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Catalog Numerotation" >
<field name="number" colspan="4"/>
<separator colspan="4"/>
<group col="4" colspan="4">
<button icon='gtk-cancel' special="cancel"
string="Exit" />
<button name="numerotate_cont" string="Numerotation"
colspan="2" type="object" icon="gtk-go-forward" />
</group>
</form>
</field>
</record>
<act_window name="Numerotation (automatic)"
res_model="auction.lots.numerotate_cont"
src_model="auction.lots"
view_mode="form"
target="new"
key2="client_action_multi"
id="action_view_auction_numerotate_cont"/>
</data>
</openerp>

View File

@ -1,232 +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/>.
#
##############################################################################
#
# Does not properly work concurently !!!
#
import pooler
import wizard
import netsvc
import base64
import mimetypes
import httplib
import threading
from tools.translate import _
login_form = '''<?xml version="1.0"?>
<form title="Login">
<field name="uname"></field>
<newline/>
<field name="password"></field>
</form>'''
send_form = '''<?xml version="1.0"?>
<form title="Selection">
<field name="uname"></field>
<field name="password"></field>
<newline/>
<field name="objects"></field>
<field name="lang"></field>
<field name="numerotation"></field>
<field name="img_send"></field>
<newline/>
<field name="dates" colspan="3"></field>
</form>'''
login_fields = {
'uname': {'string':'Login', 'type':'char'},
'password': {'string':'Password', 'type':'char'},
'numerotation': {'string':'Numerotation', 'type':'selection', 'selection':[('prov','Provisoire'),('definite','Definitive (ordre catalogue)')]},
'dates': {'string':'Auction Date', 'type':'selection', 'selection':[]}
}
send_fields = {
'uname': {'string':'Login', 'type':'char', 'readonly':True},
'password': {'string':'Password', 'type':'char', 'readonly':True},
'objects': {'string':'# of objects', 'type':'integer', 'readonly':True},
'lang': {'string':'Langage', 'type':'selection', 'selection':[('fr','fr'),('ned','ned'),('eng','eng'),('de','de')]},
'numerotation': {'string':'Numerotation', 'type':'selection', 'selection':[('prov','Provisoire'),('definite','Definitive (ordre catalogue)')]},
'dates': {'string':'Auction Date', 'type':'selection', 'selection':[]},
'img_send': {'string':'Send Image also ?', 'type':'boolean'}
}
def _catalog_send(uname, passwd, lang, did, catalog):
def post_multipart(host, selector, fields, files):
def encode_multipart_formdata(fields, files):
BOUNDARY = '----------ThIs_Is_tHe_bouNdaRY_$'
CRLF = '\r\n'
L = []
for (key, value) in fields:
L.append('--' + BOUNDARY)
L.append('Content-Disposition: form-data; name="%s"' % key)
L.append('')
L.append(value)
for (key,value) in files:
L.append('--' + BOUNDARY)
L.append('Content-Disposition: form-data; name="%s"; filename="%s"' % (key, key+'.pickle'))
L.append('Content-Type: application/octet-stream')
L.append('')
L.append(value)
L.append('--' + BOUNDARY + '--')
L.append('')
body = CRLF.join(L)
content_type = 'multipart/form-data; boundary=%s' % BOUNDARY
return content_type, body
content_type, body = encode_multipart_formdata(fields, files)
import httplib
headers = {"Content-type": content_type, "Accept": "*/*"}
conn = httplib.HTTPConnection(host)
conn.request("POST", '/bin/catalog.cgi', body, headers = headers)
response = conn.getresponse()
val = response.status
conn.close()
return val
return post_multipart('auction-in-europe.com', "/bin/catalog.cgi", (('uname',uname),('password',passwd),('did',did),('lang',lang)),(('file',catalog),))
def _photo_bin_send(uname, passwd, ref, did, photo_name, photo_data):
def get_content_type(filename):
return mimetypes.guess_type(filename)[0] or 'application/octet-stream'
def post_multipart(host, selector, fields, files):
def encode_multipart_formdata(fields, files):
BOUNDARY = '----------ThIs_Is_tHe_bouNdaRY_$'
CRLF = '\r\n'
L = []
for (key, value) in fields:
L.append('--' + BOUNDARY)
L.append('Content-Disposition: form-data; name="%s"' % key)
L.append('')
L.append(value)
for (key, filename, data) in files:
L.append('--' + BOUNDARY)
L.append('Content-Disposition: form-data; name="%s"; filename="%s"' % (key, filename))
L.append('Content-Type: %s' % get_content_type(filename))
L.append('')
L.append(data)
L.append('--' + BOUNDARY + '--')
L.append('')
body = CRLF.join(L)
content_type = 'multipart/form-data; boundary=%s' % BOUNDARY
return content_type, body
content_type, body = encode_multipart_formdata(fields, files)
headers = {"Content-type": content_type, "Accept": "*/*"}
conn = httplib.HTTPConnection(host)
conn.request("POST", '/bin/photo.cgi', body, headers = headers)
response = conn.getresponse()
val = response.status
conn.close()
return val
return post_multipart('auction-in-europe.com', "/bin/photo.cgi", (('uname',uname),('ref',ref),('passwd',passwd),('did',did)),(('file',photo_name,photo_data),))
def _photos_send(cr,uid, uname, passwd, did, ids):
for (ref,id) in ids:
service = netsvc.LocalService("object_proxy")
# ids_attach = service.execute(db_name,uid, 'ir.attachment', 'search', [('res_model','=','auction.lots'), ('res_id', '=',id)])
datas = service.execute(cr.db_name,uid, 'auction.lots', 'read',[id], ['name','image'])
if len(datas):
bin = base64.decodestring(datas[0]['image'])
fname = datas[0]['name']
_photo_bin_send(uname, passwd, ref, did, fname, bin)
def _get_dates(self,cr,uid, datas,context={}):
global send_fields
import httplib
conn = httplib.HTTPConnection('www.auction-in-europe.com')
conn.request("GET", "/aie_upload/dates_get.php?uname=%s&passwd=%s" % (datas['form']['uname'], datas['form']['password']))
response = conn.getresponse()
if response.status == 200:
def _date_decode(x):
return (x.split(' - ')[0], (' - '.join(x.split(' - ')[1:]).decode('latin1','replace').encode('utf-8','replace')))
send_fields['dates']['selection'] = map(_date_decode, response.read().split('\n'))
else:
raise wizard.except_wizard(_('Error'), _("Connection to WWW.Auction-in-Europe.com failed !"))
return {'objects':len(datas['ids'])}
def _send(self,db_name,uid, datas,context={}):
import pickle, thread, sql_db
#cr = pooler.get_db(cr.dbname).cursor()
# cr=sql_db.db.cursor()
cr = pooler.get_db(db_name).cursor()
cr.execute('select name,aie_categ from auction_lot_category')
vals = dict(cr.fetchall())
cr.close()
service = netsvc.LocalService("object_proxy")
lots = service.execute(cr.dbname,uid, 'auction.lots', 'read', datas['ids'], ['obj_num','lot_num','obj_desc','bord_vnd_id','lot_est1','lot_est2','artist_id','lot_type','aie_categ'])
ids = []
for l in lots:
if datas['form']['numerotation']=='prov':
l['ref']='%s%03d' % (l['bord_vnd_id'][1],l['lot_num'])
l['ref2']='%s%03d' % (l['bord_vnd_id'][1],l['lot_num'])
else:
l['ref']='%04d' % (l['obj_num'],)
l['ref2']='%s%03d' % (l['bord_vnd_id'][1],l['lot_num'])
if l['artist_id']:
l['artist_id'] = l['artist_id'][1]
else:
l['artist_id'] = ''
for n in ('obj_desc','artist_id','lot_type'):
try:
l[n]=l[n].decode('utf-8','replace').encode('latin1','replace')
except:
l[n]=''
del l['lot_num']
del l['obj_num']
del l['bord_vnd_id']
l['aie_categ'] = vals.get(l['lot_type'], False)
ids.append((l['ref'], l['id']))
args = pickle.dumps(lots)
thread.start_new_thread(_catalog_send, (datas['form']['uname'],datas['form']['password'],datas['form']['lang'],datas['form']['dates'], args))
if(datas['form']['img_send']==True):
thread.start_new_thread(_photos_send, (cr.dbname,uid, datas['form']['uname'],datas['form']['password'],datas['form']['dates'], ids))
return {}
def _send_pdf(self, cr, uid, data, context):
threaded_calculation = threading.Thread(target=_send, args=(self, cr.dbname, uid, data, context))
threaded_calculation.start()
return {}
class wiz_auc_lots_pay(wizard.interface):
states = {
'init': {
'actions': [],
'result': {'type': 'form', 'arch':login_form, 'fields': login_fields, 'state':[('date_ask','Continue'),('end','Cancel')]}
},
'date_ask': {
'actions': [_get_dates],
'result': {'type': 'form', 'arch':send_form, 'fields': send_fields, 'state':[('send','Send on your website'),('end','Cancel')]}
},
'send': {
'actions': [_send_pdf],
'result': {'type': 'state', 'state':'end'}
}
}
wiz_auc_lots_pay('auction.lots.send.aie');
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -1,137 +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/>.
#
##############################################################################
#
# Does not properly work concurently !!!
#
import wizard
import netsvc
from tools.translate import _
login_form = '''<?xml version="1.0"?>
<form title="Login">
<field name="uname"></field>
<newline/>
<field name="password"></field>
</form>'''
send_form = '''<?xml version="1.0"?>
<form title="Selection">
<field name="uname"></field>
<field name="password"></field>
<newline/>
<field name="objects"></field>
<newline/>
<field name="dates" colspan="3"></field>
</form>'''
login_fields = {
'uname': {'string':'Login', 'type':'char'},
'password': {'string':'Password', 'type':'char'},
'dates': {'string':'Auction Date', 'type':'selection', 'selection':[]}
}
send_fields = {
'uname': {'string':'Login', 'type':'char', 'readonly':True},
'password': {'string':'Password', 'type':'char', 'readonly':True},
'objects': {'string':'# of objects', 'type':'integer', 'readonly':True},
'dates': {'string':'Auction Date', 'type':'selection', 'selection':[]}
}
def _catalog_send(uname, passwd, did, catalog):
def post_multipart(host, selector, fields, files):
def encode_multipart_formdata(fields, files):
BOUNDARY = '----------ThIs_Is_tHe_bouNdaRY_$'
CRLF = '\r\n'
L = []
for (key, value) in fields:
L.append('--' + BOUNDARY)
L.append('Content-Disposition: form-data; name="%s"' % key)
L.append('')
L.append(value)
for (key,value) in files:
L.append('--' + BOUNDARY)
L.append('Content-Disposition: form-data; name="%s"; filename="%s"' % (key, key+'.pickle'))
L.append('Content-Type: application/octet-stream')
L.append('')
L.append(value)
L.append('--' + BOUNDARY + '--')
L.append('')
body = CRLF.join(L)
content_type = 'multipart/form-data; boundary=%s' % BOUNDARY
return content_type, body
content_type, body = encode_multipart_formdata(fields, files)
import httplib
headers = {"Content-type": content_type, "Accept": "*/*"}
conn = httplib.HTTPConnection(host)
conn.request("POST", '/bin/catalog_result.cgi', body, headers = headers)
response = conn.getresponse()
val = response.status
conn.close()
return val
return post_multipart('auction-in-europe.com', "/bin/catalog_result.cgi", (('uname',uname),('password',passwd),('did',did)),(('file',catalog),))
def _get_dates(self,cr,uid, datas, context):
global send_fields
import httplib
conn = httplib.HTTPConnection('www.auction-in-europe.com')
conn.request("GET", "/aie_upload/dates_get_result.php?uname=%s&passwd=%s" % (datas['form']['uname'], datas['form']['password']))
response = conn.getresponse()
if response.status == 200:
def _date_decode(x):
return (x.split(' - ')[0], (' - '.join(x.split(' - ')[1:]).decode('latin1').encode('utf-8')))
send_fields['dates']['selection'] = map(_date_decode, response.read().split('\n'))
else:
raise wizard.except_wizard(_('Error'),
_("Connection to WWW.Auction-in-Europe.com failed !"))
return {'objects':len(datas['ids'])}
def _send(self,cr,uid, datas, context):
import pickle
service = netsvc.LocalService("object_proxy")
lots = service.execute(cr.dbname,uid, 'auction.lots', 'read', datas['ids'], ['obj_num','obj_price'])
args = pickle.dumps(lots)
_catalog_send(datas['form']['uname'],datas['form']['password'], datas['form']['dates'], args)
return {}
class wiz_auc_lots_pay(wizard.interface):
states = {
'init': {
'actions': [],
'result': {'type': 'form', 'arch':login_form, 'fields': login_fields, 'state':[('date_ask','Continue'),('end','Cancel')]}
},
'date_ask': {
'actions': [_get_dates],
'result': {'type': 'form', 'arch':send_form, 'fields': send_fields, 'state':[('send','Send on your website'),('end','Cancel')]}
},
'send': {
'actions': [_send],
'result': {'type': 'state', 'state':'end'}
}
}
wiz_auc_lots_pay('auction.lots.send.aie.results');
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -1,154 +0,0 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import wizard
import netsvc
import pooler
import sql_db
numerotate_form_cont = '''<?xml version="1.0"?>
<form title="%s">
<field name="number" string="%s"/>
</form>''' % ('Continuous Numerotation','First Number')
numerotate_fields_cont = {
'number': {'string':'First Number', 'type':'integer', 'required':True}
}
numerotate_not_exist = '''<?xml version="1.0"?>
<form title="%s">
<label string="This lot does not exist !" colspan="4"/>
</form>''' % ('Catalog Numerotation',)
numerotate_form = '''<?xml version="1.0"?>
<form title="%s">
<separator string="%s" colspan="4"/>
<field name="bord_vnd_id"/>
<newline/>
<field name="lot_num"/>
</form>''' % ('Catalog Numerotation','Object Reference')
numerotate_fields = {
'bord_vnd_id': {'string':'Depositer Inventory', 'type':'many2one', 'required':True, 'relation':'auction.deposit'},
'lot_num': {'string':'Lot Number', 'type':'integer', 'required':True},
}
numerotate_form2 = '''<?xml version="1.0"?>
<form title="%s">
<group>
<separator string="%s" colspan="4"/>
<field name="bord_vnd_id" readonly="1"/>
<field name="lot_num" readonly="1"/>
<field name="name" readonly="1" colspan="3"/>
<field name="obj_desc" readonly="1" colspan="3"/>
<field name="lot_est1" readonly="1"/>
<field name="lot_est2" readonly="1"/>
<separator string="%s" colspan="4"/>
<field name="obj_num"/>
</group>
</form>''' % ('Catalog Numerotation','Object Reference','Object Reference')
numerotate_fields2 = {
'bord_vnd_id': {'string':'Object Inventory', 'type':'many2one', 'relation':'auction.deposit', 'readonly':True},
'lot_num': {'string':'Inventory Number', 'type':'integer', 'readonly':True},
'lot_est1': {'string':'Minimum Estimation', 'type':'float', 'readonly':True},
'lot_est2': {'string':'Maximum Estimation', 'type':'float', 'readonly':True},
'name': {'string':'Short Description', 'type':'char', 'size':64, 'readonly':True},
'obj_desc': {'string':'Description', 'type':'text', 'readonly':True},
'obj_num': {'string':'Catalog Number', 'type':'integer', 'required':True}
}
def _read_record(self,cr,uid,datas,context={}):
form = datas['form']
res = pooler.get_pool(cr.dbname).get('auction.lots').search(cr,uid,[('bord_vnd_id','=',form['bord_vnd_id']), ('lot_num','=',int(form['lot_num']))])
found = [r for r in res if r in datas['ids']]
if len(found)==0:
raise wizard.except_wizard('UserError', 'This record does not exist !')
datas = pooler.get_pool(cr.dbname).get('auction.lots').read(cr,uid,found,['obj_num', 'name', 'lot_est1', 'lot_est2', 'obj_desc'])
return datas[0]
def _test_exist(self,cr,uid,datas,context={}):
form = datas['form']
res = pooler.get_pool(cr.dbname).get('auction.lots').search(cr,uid,[('bord_vnd_id','=',form['bord_vnd_id']), ('lot_num','=',int(form['lot_num']))])
found = [r for r in res if r in datas['ids']]
if len(found)==0:
return 'not_exist'
return 'search'
def _numerotate(self,cr,uid,datas,context={}):
form = datas['form']
res = pooler.get_pool(cr.dbname).get('auction.lots').search(cr,uid,[('bord_vnd_id','=',form['bord_vnd_id']), ('lot_num','=',int(form['lot_num']))])
found = [r for r in res if r in datas['ids']]
if len(found)==0:
raise wizard.except_wizard('UserError', 'This record does not exist !')
pooler.get_pool(cr.dbname).get('auction.lots').write(cr,uid,found,{'obj_num':int(form['obj_num'])} )
return {'lot_inv':'', 'lot_num':''}
def _numerotate_cont(self,cr,uid,datas,context={}):
nbr = int(datas['form']['number'])
refs = pooler.get_pool(cr.dbname).get('auction.lots')
rec_ids = refs.browse(cr,uid,datas['ids'])
for rec_id in rec_ids:
refs.write(cr,uid,[rec_id.id],{'obj_num':nbr})
nbr+=1
return {}
class wiz_auc_lots_numerotate(wizard.interface):
states = {
'init': {
'actions': [],
'result': {'type': 'form', 'arch':numerotate_form, 'fields': numerotate_fields, 'state':[('end','Cancel'),('choice','Continue')]}
},
'search': {
'actions': [_read_record],
'result': {'type': 'form', 'arch':numerotate_form2, 'fields': numerotate_fields2, 'state':[('end','Exit'),('init','Back'),('set_number','Numerotate')]}
},
'choice' : {
'actions' : [],
'result' : {'type' : 'choice', 'next_state': _test_exist }
},
'not_exist' : {
'actions': [],
'result': {'type': 'form', 'arch':numerotate_not_exist, 'fields': {}, 'state':[('end','Exit'),('init','Retry')]}
},
'set_number': {
'actions': [_numerotate],
'result': {'type': 'state', 'state':'init'}
}
}
wiz_auc_lots_numerotate('auction.lots.numerotate');
class wiz_auc_lots_numerotate(wizard.interface):
states = {
'init': {
'actions': [],
'result': {'type': 'form', 'arch':numerotate_form_cont, 'fields': numerotate_fields_cont, 'state':[('end','Exit'),('set_number','Numerotation')]}
},
'set_number': {
'actions': [_numerotate_cont],
'result': {'type': 'state', 'state':'end'}
}
}
wiz_auc_lots_numerotate('auction.lots.numerotate_cont');
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -7,19 +7,19 @@ msgstr ""
"Project-Id-Version: OpenERP Server 5.0.0\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2009-09-08 14:56+0000\n"
"Last-Translator: Fabien (Open ERP) <fp@tinyerp.com>\n"
"PO-Revision-Date: 2010-05-21 17:51+0000\n"
"Last-Translator: Christophe Chauvet - http://www.syleam.fr/ <Unknown>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-04-17 04:17+0000\n"
"X-Launchpad-Export-Date: 2010-05-22 04:00+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: audittrail
#: model:ir.module.module,shortdesc:audittrail.module_meta_information
msgid "Audit Trail"
msgstr ""
msgstr "Rapport de l' audit"
#. module: audittrail
#: constraint:ir.model:0
@ -72,7 +72,7 @@ msgstr "Ancienne valeur"
#. module: audittrail
#: constraint:ir.actions.act_window:0
msgid "Invalid model name in the action definition."
msgstr ""
msgstr "Nom de modèle invalide pour la définition de l'action"
#. module: audittrail
#: model:ir.actions.wizard,name:audittrail.wizard_audittrail_log
@ -143,7 +143,7 @@ msgstr "Règle AuditTrail"
#. module: audittrail
#: wizard_field:audittrail.view.log,init,to:0
msgid "Log To"
msgstr ""
msgstr "Connecter à"
#. module: audittrail
#: view:audittrail.log:0
@ -158,6 +158,10 @@ msgid ""
" Subscribe Rules for read, write, create and delete on objects and check "
"logs"
msgstr ""
"Autorise un administrateur à tracer toutes les manipulations des "
"utilisateurs sur tous les objets du système.\n"
" Règles d'abonnement pour la lecture, l'écriture, la création, la "
"suppression des objets et la consultation des journaux"
#. module: audittrail
#: field:audittrail.log,timestamp:0

View File

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
##############################################################################
#
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
@ -15,34 +15,35 @@
# 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/>.
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
{
"name" : "Basic Calendar Functionality",
"version" : "1.0",
"depends" : ["base"],
"name" : "Basic Calendar Functionality",
"version" : "1.0",
"depends" : ["base"],
'description': """Full featured calendar system that support:
- Alerts (create requests)
- Recurring events (*)
- Invitations to others people""",
"author" : "Tiny",
'category': 'Generic Modules/Others',
'website': 'http://www.openerp.com',
- Invitations to others people""",
"author" : "Tiny",
'category': 'Generic Modules/Others',
'website': 'http://www.openerp.com',
"init_xml" : [
'base_calendar_data.xml'
],
"demo_xml" : [],
],
"demo_xml" : [],
"update_xml" : [
'security/ir.model.access.csv',
'wizard/calendar_event_edit_all_view.xml',
'wizard/base_calendar_invite_attendee_view.xml',
'wizard/calendar_event_edit_all_view.xml',
'wizard/base_calendar_invite_attendee_view.xml',
'wizard/base_calendar_set_exrule_view.xml',
'base_calendar_view.xml'
],
"test" : ['test/base_calendar_test.yml'],
"installable" : True,
"active" : False,
],
# "test" : ['test/base_calendar_test.yml'],
"installable" : True,
"active" : False,
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

File diff suppressed because it is too large Load Diff

View File

@ -2,6 +2,8 @@
<openerp>
<data>
<!-- Attendee form view-->
<record id="base_calendar_attendee_form_view" model="ir.ui.view">
<field name="name">calendar.attendee.form</field>
<field name="model">calendar.attendee</field>
@ -22,7 +24,7 @@
<field name="user_id" string="Invited User"/>
<newline/>
<field name="partner_address_id"
string="Partner Contact" />
string="Contact" />
<field name="partner_id"
string="Partner" readonly="1" />
</group>
@ -66,6 +68,8 @@
</field>
</record>
<!-- Attendee tree view-->
<record id="base_calendar_attendee_tree_view" model="ir.ui.view">
<field name="name">calendar.attendee.tree</field>
<field name="model">calendar.attendee</field>
@ -77,10 +81,14 @@
<field name="partner_address_id" string="Contact" />
<field name="role" />
<field name="state" />
<field name="cutype" invisible="1"/>
<field name="rsvp" invisible="1"/>
</tree>
</field>
</record>
<!-- Attendee search view-->
<record id="base_calendar_attendee_search_view" model="ir.ui.view">
<field name="name">calendar.attendee.search</field>
<field name="model">calendar.attendee</field>
@ -99,11 +107,25 @@
<separator orientation="vertical"/>
<field name="cutype" string="Invitation type" select="1"/>
<field name="event_date" select="1"/>
<newline/>
<group expand="1" string="Group By...">
<filter string="Type" icon="terp-project" help="Invitation Type"
domain="[]" context="{'group_by':'cutype'}" />
<filter string="Role" icon="terp-project"
domain="[]" context="{'group_by':'role'}" />
<filter string="Required Reply" icon="terp-crm"
domain="[]" context="{'group_by':'rsvp'}" />
<separator orientation="vertical" />
<filter string="User" icon="terp-partner" domain="[]"
context="{'group_by':'user_id'}" />
<filter string="Contact" icon="terp-partner" domain="[]"
context="{'group_by':'partner_address_id'}" />
<filter string="State" icon="terp-project" help="Invitation Type"
domain="[]" context="{'group_by':' state'}" />
</group>
</search>
</field>
</record>
<record id="action_view_attendee_form" model="ir.actions.act_window">
<field name="name">Event Invitations</field>
<field name="type">ir.actions.act_window</field>
@ -113,12 +135,14 @@
<field name="view_id" ref="base_calendar.base_calendar_attendee_tree_view" />
<field name="context">{'default_sent_by_uid': uid}</field>
</record>
<!-- Calenadar's menu -->
<menuitem id="base.menu_calendar_configuration" name="Calendar"
parent="base.menu_base_config" sequence="10" />
<!-- Invitation menu -->
<menuitem id="menu_attendee_invitations"
name="Event Invitations" parent="base.menu_calendar_configuration"
sequence="10" action="action_view_attendee_form" />
@ -138,9 +162,6 @@
<field name="trigger_interval" select="1" />
<field name="trigger_occurs" select="1" />
<field name="trigger_related" select="1" />
<separator string="" colspan="4" />
<field name="duration" />
<field name="repeat" />
</form>
</field>
</record>
@ -161,8 +182,6 @@
</tree>
</field>
</record>
<record id="action_res_alarm_view" model="ir.actions.act_window">
<field name="name">Available Alarms</field>
<field name="type">ir.actions.act_window</field>
@ -171,13 +190,15 @@
<field name="view_mode">tree,form</field>
</record>
<!-- Menu for Alarms-->
<menuitem id="menu_crm_meeting_avail_alarm"
groups="base.group_extended"
action="base_calendar.action_res_alarm_view"
parent="base.menu_calendar_configuration" />
<!-- Event Form View-->
<!-- Event Form View-->
<record model="ir.ui.view" id="event_form_view">
<field name="name">Event Form</field>
<field name="model">calendar.event</field>
@ -275,7 +296,7 @@
nolabel="1" widget="one2many" mode="tree,form">
<tree string="Invitation details" editable="top">
<field name="email" />
<field name="role" select="1" />
<field name="role" width="200" select="1" />
<field name="state" />
</tree>
<form string="Invitation details">
@ -338,7 +359,7 @@
</tree>
</field>
</record>
<!-- Event Calendar View -->
<record model="ir.ui.view" id="event_calendar_view">
@ -354,9 +375,9 @@
</calendar>
</field>
</record>
<!-- Event Search View-->
<record id="view_calendar_event_filter" model="ir.ui.view">
<field name="name">Calendar Events Search</field>
<field name="model">calendar.event</field>
@ -377,7 +398,7 @@
<field name="class" select="1"/>
</group>
<newline/>
<group expand="0" string="Group By..." colspan="16">
<group expand="1" string="Group By...">
<filter string="Date" icon="terp-project"
domain="[]" context="{'group_by':'date'}" />
<filter string="Availability" icon="terp-project"
@ -394,7 +415,7 @@
<!-- Event action -->
<record id="action_view_event" model="ir.actions.act_window">
<field name="name">Events</field>
<field name="type">ir.actions.act_window</field>
@ -403,11 +424,12 @@
<field name="view_mode">tree,form,calendar</field>
<field name="search_view_id" ref="view_calendar_event_filter"/>
</record>
<!-- Event menu -->
<menuitem id="menu_events"
name="Events" parent="base.menu_calendar_configuration"
sequence="5" action="action_view_event" />
</data>
</openerp>

View File

@ -6,3 +6,4 @@
"access_calendar_todo","calendar.todo","model_calendar_todo",,1,1,1,1
"access_base_calendar_invite_attendee","base_calendar.invite.attendee","model_base_calendar_invite_attendee",,1,1,1,1
"access_calendar_event_edit_all","calendar_event_edit_all","model_calendar_event_edit_all",,1,1,1,1
"access_base_calendar_set_exrule","base.calendar.set.exrule","model_base_calendar_set_exrule",,1,1,1,1

1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
6 access_calendar_todo calendar.todo model_calendar_todo 1 1 1 1
7 access_base_calendar_invite_attendee base_calendar.invite.attendee model_base_calendar_invite_attendee 1 1 1 1
8 access_calendar_event_edit_all calendar_event_edit_all model_calendar_event_edit_all 1 1 1 1
9 access_base_calendar_set_exrule base.calendar.set.exrule model_base_calendar_set_exrule 1 1 1 1

View File

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
##############################################################################
#
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
#
@ -15,12 +15,13 @@
# 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/>.
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import calendar_event_edit_all
import base_calendar_invite_attendee
import base_calendar_set_exrule
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -13,37 +13,38 @@
<field name="type" />
<field name="send_mail" />
<newline />
<group col="1" colspan="4"
<group col="2" colspan="6"
attrs="{'invisible': [('type', '!=', 'external')]}">
<field name="email" colspan="4"
attrs="{'required': [('type', '=', 'external')]}" />
</group>
<group col="1" colspan="4"
<group col="2" colspan="6"
attrs="{'invisible': [('type', '!=', 'internal')]}">
<separator string="Users" colspan="4" />
<field name="user_ids" select="1" colspan="4"
nolabel="1" />
<newline />
</group>
<group col="2" colspan="4"
<group col="2" colspan="6"
attrs="{'invisible': [('type', '!=', 'partner')]}">
<field name="partner_id" colspan="2"
on_change="onchange_partner_id(partner_id)"
attrs="{'required': [('type', '=', 'partner')]}" />
<newline />
<separator string="Partner Contacts"
colspan="4" />
colspan="6" />
<field name="contact_ids" select="1" colspan="4"
nolabel="1" domain="[('partner_id', '=', partner_id)]"
attrs="{'readonly': [('type', '!=', 'partner')]}" />
</group>
<newline />
<separator string="" colspan="6" />
<label string="" colspan="2" />
<group col="4" colspan="4">
<button icon='gtk-cancel' special="cancel"
string="Cancel" />
<button name="do_invite" string="Invite"
type="object" icon="gtk-ok" />
</group>
</form>
</field>
</record>

View File

@ -0,0 +1,162 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 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 base_calendar import base_calendar
from osv import fields, osv
from tools.translate import _
import tools
import mx.DateTime
import re
months = {
1: "January", 2: "February", 3: "March", 4: "April", \
5: "May", 6: "June", 7: "July", 8: "August", 9: "September", \
10: "October", 11: "November", 12: "December"
}
class base_calendar_set_exrule(osv.osv_memory):
"""
Set Exrule.
"""
_name = "base.calendar.set.exrule"
_description = "Set Exrule"
_columns = {
'freq': fields.selection([('None', 'No Repeat'), \
('secondly', 'Secondly'), \
('minutely', 'Minutely'), \
('hourly', 'Hourly'), \
('daily', 'Daily'), \
('weekly', 'Weekly'), \
('monthly', 'Monthly'), \
('yearly', 'Yearly')], 'Frequency',required=True),
'interval': fields.integer('Interval'),
'count': fields.integer('Count'),
'mo': fields.boolean('Mon'),
'tu': fields.boolean('Tue'),
'we': fields.boolean('Wed'),
'th': fields.boolean('Thu'),
'fr': fields.boolean('Fri'),
'sa': fields.boolean('Sat'),
'su': fields.boolean('Sun'),
'select1': fields.selection([('date', 'Date of month'), \
('day', 'Day of month')], 'Option'),
'day': fields.integer('Date of month'),
'week_list': fields.selection([('MO', 'Monday'), ('TU', 'Tuesday'), \
('WE', 'Wednesday'), ('TH', 'Thursday'), \
('FR', 'Friday'), ('SA', 'Saturday'), \
('SU', 'Sunday')], 'Weekday'),
'byday': fields.selection([('1', 'First'), ('2', 'Second'), \
('3', 'Third'), ('4', 'Fourth'), \
('5', 'Fifth'), ('-1', 'Last')], 'By day'),
'month_list': fields.selection(months.items(),'Month'),
'end_date': fields.date('Repeat Until'),
}
def view_init(self, cr, uid, fields, context=None):
"""
This function checks for precondition before wizard executes
@param self: The object pointer
@param cr: the current row, from the database cursor,
@param uid: the current users ID for security checks,
@param fields: List of fields for default value
@param context: A standard dictionary for contextual values
"""
crm_obj = self.pool.get('crm.meeting')
for meeting in crm_obj.browse(cr, uid, context.get('active_ids', [])):
if not meeting.rrule:
raise osv.except_osv(_("Warning !"), _("Please Apply Recurrency after Apply Exception Rule"))
return False
def compute_exrule_string(self, cr, uid, ids, context=None):
"""
Compute rule string.
@param self: the object pointer
@param cr: the current row, from the database cursor,
@param uid: the current users ID for security checks,
@param datas: dictionary of freq and interval value.
@return: string value which compute FREQILY;INTERVAL
"""
weekdays = ['mo', 'tu', 'we', 'th', 'fr', 'sa', 'su']
weekstring = ''
monthstring = ''
yearstring = ''
for datas in self.read(cr, uid, ids, context=context):
freq = datas.get('freq')
if freq == 'None':
return ''
interval_srting = datas.get('interval') and (';INTERVAL=' + str(datas.get('interval'))) or ''
if freq == 'weekly':
byday = map(lambda x: x.upper(), filter(lambda x: datas.get(x) and x in weekdays, datas))
if byday:
weekstring = ';BYDAY=' + ','.join(byday)
elif freq == 'monthly':
if datas.get('select1')=='date' and (datas.get('day') < 1 or datas.get('day') > 31):
raise osv.except_osv(_('Error!'), ("Please select proper Day of month"))
if datas.get('select1')=='day':
monthstring = ';BYDAY=' + datas.get('byday') + datas.get('week_list')
elif datas.get('select1')=='date':
monthstring = ';BYMONTHDAY=' + str(datas.get('day'))
elif freq == 'yearly':
if datas.get('select1')=='date' and (datas.get('day') < 1 or datas.get('day') > 31):
raise osv.except_osv(_('Error!'), ("Please select proper Day of month"))
bymonth = ';BYMONTH=' + str(datas.get('month_list'))
if datas.get('select1')=='day':
bystring = ';BYDAY=' + datas.get('byday') + datas.get('week_list')
elif datas.get('select1')=='date':
bystring = ';BYMONTHDAY=' + str(datas.get('day'))
yearstring = bymonth + bystring
if datas.get('end_date'):
datas['end_date'] = ''.join((re.compile('\d')).findall(datas.get('end_date'))) + '235959Z'
enddate = (datas.get('count') and (';COUNT=' + str(datas.get('count'))) or '') +\
((datas.get('end_date') and (';UNTIL=' + datas.get('end_date'))) or '')
exrule_string = 'FREQ=' + freq.upper() + weekstring + interval_srting \
+ enddate + monthstring + yearstring
ex_id = base_calendar.base_calendar_id2real_id(context['active_id'])
model = context.get('model', False)
model_obj = self.pool.get(model)
exrule_value = model_obj.write(cr, uid,ex_id,{
'exrule': exrule_string,
})
return {}
_defaults = {
'freq': lambda *x: 'None',
'select1': lambda *x: 'date',
'interval': lambda *x: 1,
}
base_calendar_set_exrule()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -0,0 +1,69 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="view_base_calendar_set_exrule" model="ir.ui.view">
<field name="name">base.calendar.set.exrule.form</field>
<field name="model">base.calendar.set.exrule</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Set Exrule">
<separator string="Select data for ExRule" colspan="8"/>
<group col="8" colspan="6">
<field name="freq" />
<field name="interval" />
<field name="count" />
<field name="end_date" />
</group>
<group col="8" colspan="8" name="Select weekdays"
attrs="{'invisible' : [('freq','!=','weekly')]}">
<field name="mo" colspan="1" />
<field name="tu" colspan="1" />
<field name="we" colspan="1" />
<field name="th" colspan="1" />
<field name="fr" colspan="1" />
<field name="sa" colspan="1" />
<field name="su" colspan="1" />
<newline />
</group>
<group col="8" colspan="6"
attrs="{'invisible' : [('freq','!=','monthly'), ('freq','!=','yearly')]}">
<group col="2" colspan="1">
<field name="select1" />
</group>
<group col="2" colspan="1"
attrs="{'invisible' : [('select1','=','day')]}">
<field name="day"
attrs="{'required' : [('select1','=','date')]}"/>
</group>
<group col="3" colspan="1"
attrs="{'invisible' : [('select1','=','date')]}">
<field name="byday" string="The"
attrs="{'required' : [('select1','=','day')]}"/>
<field name="week_list" nolabel="1"
attrs="{'required' : [('select1','=','day')]}"/>
</group>
<group col="1" colspan="1"
attrs="{'invisible' : [('freq','!=','yearly')]}">
<field name="month_list" string="of"
colspan="1"
attrs="{'required' : [('freq','=','yearly')]}"/>
</group>
</group>
<group colspan="4" col="6">
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
<button icon="gtk-ok" string="ok" name="compute_exrule_string" type="object"/>
</group>
</form>
</field>
</record>
<record id="action_base_calendar_set_exrule" model="ir.actions.act_window">
<field name="name">Set Exrule</field>
<field name="res_model">base.calendar.set.exrule</field>
<field name="view_type">form</field>
<field name="view_mode">form,tree</field>
<field name="target">new</field>
</record>
</data>
</openerp>

View File

@ -72,8 +72,8 @@ class res_partner_contact(osv.osv):
it will allow you to hide the partner contact without removing it."),
'partner_id': fields.related('job_ids','address_id','partner_id',type='many2one',\
relation='res.partner', string='Main Employer'),
'function_id': fields.related('job_ids','function_id',type='many2one', \
relation='res.partner.function', string='Main Function'),
'function': fields.related('job_ids', 'function', type='char', \
string='Main Function'),
'job_id': fields.function(_main_job, method=True, type='many2one',\
relation='res.partner.job', string='Main Job'),
'email': fields.char('E-Mail', size=240),
@ -164,7 +164,7 @@ class res_partner_job(osv.osv):
return []
res = []
for r in self.browse(cr, uid, ids):
funct = r.function_id and (", " + r.function_id.name) or ""
funct = r.function and (", " + r.function) or ""
res.append((r.id, self.pool.get('res.partner.contact').name_get(cr, uid, \
[r.contact_id.id])[0][1] + funct))
return res
@ -212,11 +212,10 @@ class res_partner_job(osv.osv):
'name': fields.related('address_id', 'partner_id', type='many2one',\
relation='res.partner', string='Partner', help="You may\
enter Address first,Partner will be linked automatically if any."),
'address_id': fields.many2one('res.partner.address', 'Address', domain=[('partner_id', '=', name)], \
help='Address which is linked to the Partner'),
'address_id': fields.many2one('res.partner.address', 'Address', \
help='Address which is linked to the Partner'), # TO Correct: domain=[('partner_id', '=', name)]
'contact_id': fields.many2one('res.partner.contact','Contact', required=True, ondelete='cascade'),
'function_id': fields.many2one('res.partner.function','Partner Function', \
help="Function of this contact with this partner"),
'function': fields.char('Partner Function', size=34, help="Function of this contact with this partner"),
'sequence_contact': fields.integer('Contact Seq.',help='Order of\
importance of this address in the list of addresses of the linked contact'),
'sequence_partner': fields.integer('Partner Seq.',help='Order of importance\

View File

@ -1,11 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<!-- Create the functions -->
<record id="res_partner_function_privateaddress0" model="res.partner.function">
<field eval="&quot;&quot;&quot;Private Address&quot;&quot;&quot;" name="name"/>
<field name="code">PA</field>
</record>
<!-- Create the contacts -->
<record id="res_partner_contact_mortier0" model="res.partner.contact">
@ -171,35 +166,35 @@
<!-- Create the jobs -->
<record id="res_partner_job_0" model="res.partner.job">
<field name="address_id" ref="base.res_partner_address_1"/>
<field name="function_id" ref="base.function_sale"/>
<field name="function">Salesman</field>
<field name="contact_id" ref="res_partner_contact_mortier0"/>
<field name="sequence_partner">2</field>
</record>
<record id="res_partner_job_1" model="res.partner.job">
<field name="address_id" ref="base.res_partner_address_2"/>
<field name="function_id" ref="base.function_sale"/>
<field name="function">Salesman</field>
<field eval="&quot;&quot;&quot;contact@tecsas.fr&quot;&quot;&quot;" name="email"/>
<field name="contact_id" ref="res_partner_contact_jacot0"/>
</record>
<record id="res_partner_job_2" model="res.partner.job">
<field name="address_id" ref="base.res_partner_address_3"/>
<field name="function_id" ref="base.function_it"/>
<field name="function">CTO</field>
<field eval="&quot;&quot;&quot;info@mediapole.net&quot;&quot;&quot;" name="email"/>
<field name="contact_id" ref="res_partner_contact_passot0"/>
</record>
<record id="res_partner_job_3" model="res.partner.job">
<field name="address_id" ref="base.res_partner_address_tang"/>
<field name="function_id" ref="base.function_sale"/>
<field name="function">Salesman</field>
<field name="contact_id" ref="res_partner_contact_tang0"/>
</record>
<record id="res_partner_job_4" model="res.partner.job">
<field name="address_id" ref="base.res_partner_address_wong"/>
<field name="function_id" ref="base.function_sale"/>
<field name="function">Salesman</field>
<field name="contact_id" ref="res_partner_contact_wong0"/>
</record>
<record id="res_partner_job_5" model="res.partner.job">
<field name="address_id" ref="base.res_partner_address_6"/>
<field name="function_id" ref="base.function_director"/>
<field name="function">CEO</field>
<field name="contact_id" ref="res_partner_contact_lacarte0"/>
<field name="sequence_contact">1</field>
<field name="sequence_partner">0</field>
@ -207,120 +202,120 @@
</record>
<record id="res_partner_job_6" model="res.partner.job">
<field name="address_id" ref="base.res_partner_address_7"/>
<field name="function_id" ref="base.function_sale"/>
<field name="function">Salesman</field>
<field name="contact_id" ref="res_partner_contact_lavente0"/>
</record>
<record id="res_partner_job_7" model="res.partner.job">
<field name="address_id" ref="base.res_partner_address_8"/>
<field name="function_id" ref="base.function_it"/>
<field name="function">CTO</field>
<field name="contact_id" ref="res_partner_contact_lelitre0"/>
</record>
<record id="res_partner_job_8" model="res.partner.job">
<field name="address_id" ref="base.res_partner_address_9"/>
<field name="function_id" ref="base.function_director"/>
<field name="function">CEO</field>
<field name="contact_id" ref="res_partner_contact_grosbonnet0"/>
</record>
<record id="res_partner_job_9" model="res.partner.job">
<field name="address_id" ref="base.res_partner_address_10"/>
<field name="function_id" ref="base.function_sale"/>
<field name="function">Salesman</field>
<field name="contact_id" ref="res_partner_contact_lesbrouffe0"/>
</record>
<record id="res_partner_job_10" model="res.partner.job">
<field name="address_id" ref="base.res_partner_address_zen"/>
<field name="function_id" ref="base.function_it"/>
<field name="function">CTO</field>
<field name="contact_id" ref="res_partner_contact_zen0"/>
</record>
<record id="res_partner_job_11" model="res.partner.job">
<field name="address_id" ref="base.main_address"/>
<field name="function_id" ref="base.function_sale"/>
<field name="function">Salesman</field>
<field eval="&quot;&quot;&quot;re@mycompany.com&quot;&quot;&quot;" name="email"/>
<field name="contact_id" ref="res_partner_contact_mignon0"/>
</record>
<record id="res_partner_job_12" model="res.partner.job">
<field name="address_id" ref="base.main_address"/>
<field name="function_id" ref="base.function_it"/>
<field name="function">CTO</field>
<field eval="&quot;&quot;&quot;st@mycompany.com&quot;&quot;&quot;" name="email"/>
<field name="contact_id" ref="res_partner_contact_wirtel0"/>
</record>
<record id="res_partner_job_13" model="res.partner.job">
<field name="address_id" ref="base.main_address"/>
<field name="function_id" ref="base.function_it"/>
<field name="function">CTO</field>
<field eval="&quot;&quot;&quot;ch@mycompany.com&quot;&quot;&quot;" name="email"/>
<field name="contact_id" ref="res_partner_contact_simonis0"/>
</record>
<record id="res_partner_job_14" model="res.partner.job">
<field name="address_id" ref="base.main_address"/>
<field name="function_id" ref="base.function_it"/>
<field name="function">CTO</field>
<field eval="&quot;&quot;&quot;ol@mycompany.com&quot;&quot;&quot;" name="email"/>
<field name="contact_id" ref="res_partner_contact_laurent0"/>
</record>
<record id="res_partner_job_15" model="res.partner.job">
<field name="address_id" ref="base.main_address"/>
<field name="function_id" ref="base.function_it"/>
<field name="function">CTO</field>
<field eval="&quot;&quot;&quot;fl@mycompany.com&quot;&quot;&quot;" name="email"/>
<field name="contact_id" ref="res_partner_contact_lambotte0"/>
</record>
<record id="res_partner_job_16" model="res.partner.job">
<field name="address_id" ref="base.main_address"/>
<field name="function_id" ref="base.function_sale"/>
<field name="function">Salesman</field>
<field eval="&quot;&quot;&quot;av@mycompany.com&quot;&quot;&quot;" name="email"/>
<field name="contact_id" ref="res_partner_contact_vandewerve0"/>
</record>
<record id="res_partner_job_17" model="res.partner.job">
<field name="address_id" ref="base.main_address"/>
<field name="function_id" ref="base.function_it"/>
<field name="function">CTO</field>
<field eval="&quot;&quot;&quot;fb@mycompany.com&quot;&quot;&quot;" name="email"/>
<field name="contact_id" ref="res_partner_contact_semal0"/>
</record>
<record id="res_partner_job_18" model="res.partner.job">
<field name="address_id" ref="base.main_address"/>
<field name="function_id" ref="base.function_it"/>
<field name="function">CTO</field>
<field eval="&quot;&quot;&quot;qd@mycompany.com&quot;&quot;&quot;" name="email"/>
<field name="contact_id" ref="res_partner_contact_depaoli0"/>
</record>
<record id="res_partner_job_19" model="res.partner.job">
<field name="address_id" ref="base.main_address"/>
<field name="function_id" ref="base.function_it"/>
<field name="function">CTO</field>
<field eval="&quot;&quot;&quot;ne@mycompany.com&quot;&quot;&quot;" name="email"/>
<field name="contact_id" ref="res_partner_contact_elkhayat0"/>
</record>
<record id="res_partner_job_20" model="res.partner.job">
<field name="address_id" ref="base.main_address"/>
<field name="function_id" ref="base.function_it"/>
<field name="function">CTO</field>
<field eval="&quot;&quot;&quot;ph@mycompany.com&quot;&quot;&quot;" name="email"/>
<field name="contact_id" ref="res_partner_contact_luu0"/>
</record>
<record id="res_partner_job_21" model="res.partner.job">
<field name="address_id" ref="base.main_address"/>
<field name="function_id" ref="base.function_director"/>
<field name="function">CEO</field>
<field eval="&quot;&quot;&quot;fp@mycompany.com&quot;&quot;&quot;" name="email"/>
<field name="contact_id" ref="res_partner_contact_pinckears0"/>
<field name="sequence_partner">-1</field>
</record>
<record id="res_partner_job_22" model="res.partner.job">
<field name="address_id" ref="base.main_address"/>
<field name="function_id" ref="base.function_sale"/>
<field name="function">Salesman</field>
<field eval="&quot;&quot;&quot;cd@mycompany.com&quot;&quot;&quot;" name="email"/>
<field name="contact_id" ref="res_partner_contact_debois0"/>
</record>
<record id="res_partner_job_23" model="res.partner.job">
<field name="address_id" ref="res_partner_address_0"/>
<field name="contact_id" ref="res_partner_contact_mortier0"/>
<field name="function_id" ref="res_partner_function_privateaddress0"/>
<field name="sequence_contact">5</field>
<field name="function">PA</field>
</record>
<record id="res_partner_job_24" model="res.partner.job">
<field eval="1" name="sequence_contact"/>
<field name="address_id" ref="res_partner_address_1"/>
<field name="contact_id" ref="res_partner_contact_lacarte0"/>
<field name="function_id" ref="res_partner_function_privateaddress0"/>
<field name="function">PA</field>
<field name="sequence_contact">5</field>
</record>
<record id="res_partner_job_25" model="res.partner.job">
<field eval="2" name="sequence_contact"/>
<field name="address_id" ref="base.res_partner_address_1"/>
<field name="contact_id" ref="res_partner_contact_lacarte0"/>
<field name="function_id" ref="base.function_director"/>
<field name="function">CEO</field>
<field name="sequence_contact">1</field>
</record>
</data>

View File

@ -16,7 +16,7 @@
<field name="email"/>
<field name="lang_id"/>
<field name="partner_id"/>
<field name="function_id"/>
<field name="function"/>
</tree>
</field>
</record>
@ -38,7 +38,7 @@
<group string="Partner" colspan="2" col="2">
<field name="partner_id" invisible="1" select="1"/>
<field name="title" select="1"/>
<field name="function_id" invisible="1"/>
<field name="function" invisible="1"/>
<field name="email"/>
<field name="lang_id"/>
<field name="active"/>
@ -51,7 +51,7 @@
<field name="job_ids" colspan="4" nolabel="1" mode="tree,form">
<form string="Functions and Addresses">
<group string="Partner" colspan="2" col="4">
<field name="function_id"/>
<field name="function"/>
<field name="address_id"/>
<field name="name"/>
<field name="date_start" />
@ -69,7 +69,7 @@
</form>
<tree string="Functions and Addresses">
<field name="sequence_contact" string="Seq."/>
<field name="function_id"/>
<field name="function"/>
<field name="name"/>
<field name="address_id"/>
<field name="phone"/>
@ -152,7 +152,7 @@
<tree string="Contacts" editable="top">
<field name="sequence_partner"/>
<field name="contact_id"/>
<field name="function_id"/>
<field name="function"/>
<field name="phone"/>
<field name="fax"/>
<field name="extension"/>
@ -164,7 +164,7 @@
<field name="sequence_partner"/>
<field name="name"/>
<field name="contact_id"/>
<field name="function_id"/>
<field name="function"/>
</group>
<group string="Communication" colspan="2" col="2">
<field name="phone"/>
@ -337,7 +337,7 @@
<field name="arch" type="xml">
<tree string="Contact Functions">
<field name="contact_id"/>
<field name="function_id"/>
<field name="function"/>
<field name="name"/>
<field name="address_id"/>
<field name="email"/>
@ -360,7 +360,7 @@
<field name="name" select="1" on_change="onchange_partner(name)"/>
<field name="address_id" select="1" attrs="{'required': [('name', '!=', False)]}" on_change="onchange_address(address_id)"/>
<field name="contact_id" select="1"/>
<field name="function_id" select="1"/>
<field name="function" select="1"/>
<field name="email" widget="email"/>
<field name="phone"/>
<field name="fax"/>

View File

@ -23,7 +23,7 @@
first_name: Laura
job_ids:
- email: lwilliams@mydomain.com
function_id: base_contact.res_partner_function_privateaddress0
function: PA
phone: (+32).10.45.18.77
sequence_contact: 1
state: current
@ -44,7 +44,7 @@
zip: '2324324'
job_ids:
- address_id: res_partner_address_1
function_id: base.function_director
function: CEO
contact_id: res_partner_contact_williams0
sequence_partner: 2
state: current
@ -66,10 +66,10 @@
first_name: Nicolas
job_ids:
- address_id: base.main_address
function_id: base.function_it
function: CTO
state: current
- address_id: base.res_partner_address_3000
function_id: base.function_director
function: CEO
state: current
lang_id: res_lang_french0
mobile: (+32).23.44.32.12
@ -84,10 +84,10 @@
first_name: Christina
job_ids:
- address_id: base.res_partner_address_1
function_id: base.function_director
function: CEO
state: past
- address_id: base.res_partner_address_1
function_id: base.function_it
function: CTO
state: current
lang_id: base_contact.res_lang_french0
mobile: (+32).10.45.18.77

View File

@ -0,0 +1,277 @@
# Thai translation for openobject-addons
# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2010-05-20 04:32+0000\n"
"Last-Translator: Songpon Phusing <p.songpon@gmail.com>\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: 2010-05-21 03:37+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: base_setup
#: wizard_field:base_setup.base_setup,company,city:0
#: wizard_field:base_setup.base_setup,init,city:0
#: wizard_field:base_setup.base_setup,update,city:0
msgid "City"
msgstr "อำเภอ"
#. module: base_setup
#: wizard_view:base_setup.base_setup,finish:0
msgid ""
"You can start configuring the system or connect directly to the database "
"using the default setup."
msgstr "คุณอาจจะเริ่มตั้งค่าหรือใช้ค่าพื้นฐานเบื้องต้น"
#. module: base_setup
#: wizard_field:base_setup.base_setup,company,zip:0
#: wizard_field:base_setup.base_setup,init,zip:0
#: wizard_field:base_setup.base_setup,update,zip:0
msgid "Zip code"
msgstr "รหัสไปรษณีย์"
#. module: base_setup
#: wizard_view:base_setup.base_setup,init:0
msgid "Select a Profile"
msgstr "เลือกแบบ"
#. module: base_setup
#: wizard_view:base_setup.base_setup,company:0
msgid "Report header"
msgstr "หัวรายงาน"
#. module: base_setup
#: wizard_button:base_setup.base_setup,finish,config:0
msgid "Start Configuration"
msgstr "เริ่มการตั้งค่า"
#. module: base_setup
#: wizard_view:base_setup.base_setup,init:0
msgid ""
"You'll be able to install more modules later through the Administration menu."
msgstr "คุณสามารถลงโมดูลใหม่ๆได้ในเมนูการบริหารระบบ"
#. module: base_setup
#: wizard_view:base_setup.base_setup,init:0
msgid ""
"A profile sets a pre-selection of modules for specific needs. These profiles "
"have been setup to help you discover the different aspects of OpenERP. This "
"is just an overview, we have 300+ available modules."
msgstr ""
"รูปแบบโมดูลเป็นเพียงการตั้งค่าแนะนำในการใช้งานเพื่อตั้งค่าได้ง่ายขึ้น "
"แต่เรามีโมดูลที่สามารถหาติดตั้งได้มากกว่า 500 โมดูล"
#. module: base_setup
#: wizard_button:base_setup.base_setup,company,update:0
#: wizard_button:base_setup.base_setup,init,company:0
msgid "Next"
msgstr "ถัดไป"
#. module: base_setup
#: wizard_field:base_setup.base_setup,company,email:0
#: wizard_field:base_setup.base_setup,init,email:0
#: wizard_field:base_setup.base_setup,update,email:0
msgid "E-mail"
msgstr "อีเมล์"
#. module: base_setup
#: wizard_field:base_setup.base_setup,company,state_id:0
#: wizard_field:base_setup.base_setup,init,state_id:0
#: wizard_field:base_setup.base_setup,update,state_id:0
msgid "State"
msgstr "จังหวัด"
#. module: base_setup
#: wizard_view:base_setup.base_setup,finish:0
msgid "Your new database is now fully installed."
msgstr "ฐานข้อมูลใหม่ตั้งตั้งเสร็จสิ้น"
#. module: base_setup
#: wizard_field:base_setup.base_setup,company,profile:0
#: wizard_field:base_setup.base_setup,init,profile:0
#: wizard_field:base_setup.base_setup,update,profile:0
msgid "Profile"
msgstr "รูปแบบ"
#. module: base_setup
#: wizard_field:base_setup.base_setup,company,rml_footer1:0
#: wizard_field:base_setup.base_setup,init,rml_footer1:0
#: wizard_field:base_setup.base_setup,update,rml_footer1:0
msgid "Report Footer 1"
msgstr "หัวรายงาน 1"
#. module: base_setup
#: wizard_field:base_setup.base_setup,company,rml_footer2:0
#: wizard_field:base_setup.base_setup,init,rml_footer2:0
#: wizard_field:base_setup.base_setup,update,rml_footer2:0
msgid "Report Footer 2"
msgstr "ท้ายรายงาน 2"
#. module: base_setup
#: wizard_view:base_setup.base_setup,company:0
msgid "General Information"
msgstr "ข้อมูลทั่วไป"
#. module: base_setup
#: wizard_field:base_setup.base_setup,company,street2:0
#: wizard_field:base_setup.base_setup,init,street2:0
#: wizard_field:base_setup.base_setup,update,street2:0
msgid "Street2"
msgstr "ตำบล"
#. module: base_setup
#: wizard_view:base_setup.base_setup,company:0
msgid "Report Information"
msgstr "ข้อมูลรายงาน"
#. module: base_setup
#: wizard_field:base_setup.base_setup,company,phone:0
#: wizard_field:base_setup.base_setup,init,phone:0
#: wizard_field:base_setup.base_setup,update,phone:0
msgid "Phone"
msgstr "โทรศัพท์"
#. module: base_setup
#: wizard_view:base_setup.base_setup,company:0
msgid "Define Main Company"
msgstr "ตั้งบริษัทหลัก"
#. module: base_setup
#: wizard_field:base_setup.base_setup,company,name:0
#: wizard_field:base_setup.base_setup,init,name:0
#: wizard_field:base_setup.base_setup,update,name:0
msgid "Company Name"
msgstr "ชื่อบริษัท"
#. module: base_setup
#: help:base_setup.base_setup,company,rml_footer2:0
#: help:base_setup.base_setup,init,rml_footer2:0
#: help:base_setup.base_setup,update,rml_footer2:0
msgid ""
"This sentence will appear at the bottom of your reports.\n"
"We suggest you to put bank information here:\n"
"IBAN: BE74 1262 0121 6907 - SWIFT: CPDF BE71 - VAT: BE0477.472.701"
msgstr ""
"ข้อมูลนี่จะอยู่ในท้ายกระดาษของรายงาน\n"
"เราแนะนำให้เปลี่ยนโดยใส่ข้อมูลของธนาคาร\n"
"IBAN: BE74 1262 0121 6907 - SWIFT: CPDF BE71 - VAT: BE0477.472.701"
#. module: base_setup
#: wizard_field:base_setup.base_setup,company,country_id:0
#: wizard_field:base_setup.base_setup,init,country_id:0
#: wizard_field:base_setup.base_setup,update,country_id:0
msgid "Country"
msgstr "ประเทศ"
#. module: base_setup
#: wizard_view:base_setup.base_setup,company:0
#: wizard_view:base_setup.base_setup,finish:0
#: wizard_view:base_setup.base_setup,init:0
#: wizard_view:base_setup.base_setup,update:0
#: model:ir.actions.wizard,name:base_setup.action_wizard_setup
#: model:ir.actions.wizard,name:base_setup.wizard_base_setup
msgid "Setup"
msgstr "ตั้งค่า"
#. module: base_setup
#: help:base_setup.base_setup,company,rml_footer1:0
#: help:base_setup.base_setup,init,rml_footer1:0
#: help:base_setup.base_setup,update,rml_footer1:0
msgid ""
"This sentence will appear at the bottom of your reports.\n"
"We suggest you to write legal sentences here:\n"
"Web: http://openerp.com - Fax: +32.81.73.35.01 - Fortis Bank: 126-2013269-07"
msgstr ""
"ข้อมูลนี่จะอยู่ในท้ายกระดาษของรายงาน\n"
"เราแนะนำให้ท่านนำข้อมูลเกี่ยวกับทางกฏหมาย\n"
"Web: http://openerp.com - Fax: +32.81.73.35.01 - Fortis Bank: 126-2013269-07"
#. module: base_setup
#: wizard_view:base_setup.base_setup,update:0
msgid "Summary"
msgstr "สรุป"
#. module: base_setup
#: wizard_button:base_setup.base_setup,update,finish:0
msgid "Install"
msgstr "ติดตั้ง"
#. module: base_setup
#: wizard_view:base_setup.base_setup,finish:0
msgid "Installation Done"
msgstr "ติดตั้งเสร็จสิ้น"
#. module: base_setup
#: help:base_setup.base_setup,company,rml_header1:0
#: help:base_setup.base_setup,init,rml_header1:0
#: help:base_setup.base_setup,update,rml_header1:0
msgid ""
"This sentence will appear at the top right corner of your reports.\n"
"We suggest you to put a slogan here:\n"
"\"Open Source Business Solutions\"."
msgstr ""
"ข้อมูลนี่จะอยู่ในด้านบนขวาของรายงานท่าน\n"
"กรุณาใส่ สโลแกน\n"
"\"Open Source Business Solutions\"."
#. module: base_setup
#: wizard_field:base_setup.base_setup,company,rml_header1:0
#: wizard_field:base_setup.base_setup,init,rml_header1:0
#: wizard_field:base_setup.base_setup,update,rml_header1:0
msgid "Report Header"
msgstr "หัวรายงาน"
#. module: base_setup
#: wizard_view:base_setup.base_setup,company:0
msgid "Your Logo - Use a size of about 450x150 pixels."
msgstr "กรุณาใช้โลโก้ขนาด 450X150 px"
#. module: base_setup
#: wizard_field:base_setup.base_setup,company,currency:0
#: wizard_field:base_setup.base_setup,init,currency:0
#: wizard_field:base_setup.base_setup,update,currency:0
msgid "Currency"
msgstr "อัตราแลกเปลี่ยน"
#. module: base_setup
#: wizard_field:base_setup.base_setup,company,street:0
#: wizard_field:base_setup.base_setup,init,street:0
#: wizard_field:base_setup.base_setup,update,street:0
msgid "Street"
msgstr "ที่อยู่"
#. module: base_setup
#: wizard_button:base_setup.base_setup,finish,menu:0
msgid "Use Directly"
msgstr "ใช้ทันที"
#. module: base_setup
#: wizard_button:base_setup.base_setup,init,menu:0
msgid "Cancel"
msgstr "ยกเลิก"
#. module: base_setup
#: wizard_field:base_setup.base_setup,company,logo:0
#: wizard_field:base_setup.base_setup,init,logo:0
#: wizard_field:base_setup.base_setup,update,logo:0
msgid "Logo"
msgstr "โลโก้"
#. module: base_setup
#: model:ir.module.module,shortdesc:base_setup.module_meta_information
msgid "Base Setup"
msgstr "โครงสร้าง ตั้งค่า"
#. module: base_setup
#: wizard_button:base_setup.base_setup,company,init:0
#: wizard_button:base_setup.base_setup,update,company:0
msgid "Previous"
msgstr "ก่อนหน้า"

View File

@ -7,24 +7,24 @@ msgstr ""
"Project-Id-Version: OpenERP Server 5.0.0\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2009-09-08 12:10+0000\n"
"Last-Translator: Fabien (Open ERP) <fp@tinyerp.com>\n"
"PO-Revision-Date: 2010-05-25 16:41+0000\n"
"Last-Translator: Grzegorz Grzelak (Cirrus.pl) <Unknown>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-04-17 04:16+0000\n"
"X-Launchpad-Export-Date: 2010-05-26 03:47+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: board_account
#: view:board.board:0
msgid "Analytic accounts to close"
msgstr ""
msgstr "Konta analityczne do zamknięcia"
#. module: board_account
#: view:board.board:0
msgid "Draft invoices"
msgstr ""
msgstr "Projekty faktur"
#. module: board_account
#: constraint:ir.ui.view:0
@ -35,61 +35,61 @@ msgstr "XML niewłaściwy dla tej architektury wyświetlania!"
#: model:ir.actions.act_window,name:board_account.open_board_account
#: model:ir.ui.menu,name:board_account.menu_board_account
msgid "Accounting Dashboard"
msgstr ""
msgstr "Konsola księgowości"
#. module: board_account
#: model:ir.actions.act_window,name:board_account.action_aged_receivable
msgid "Receivable Accounts"
msgstr ""
msgstr "Konta wierzytelności"
#. module: board_account
#: view:board.board:0
#: model:ir.actions.act_window,name:board_account.act_my_account
msgid "Accounts to invoice"
msgstr ""
msgstr "Konta do faktur"
#. module: board_account
#: view:board.board:0
#: model:ir.actions.act_window,name:board_account.action_account_analytic_line_to_invoice
msgid "Costs to invoice"
msgstr ""
msgstr "Koszty do faktur"
#. module: board_account
#: view:board.board:0
msgid "Aged receivables"
msgstr ""
msgstr "Przeterminowane wierzytelności"
#. module: board_account
#: model:ir.module.module,shortdesc:board_account.module_meta_information
msgid "Board for accountant"
msgstr ""
msgstr "Konsola dla księgowści"
#. module: board_account
#: model:ir.actions.act_window,name:board_account.action_aged_income
msgid "Income Accounts"
msgstr ""
msgstr "Konta przychodowe"
#. module: board_account
#: view:board.board:0
msgid "My indicators"
msgstr ""
msgstr "Moje wskaźniki"
#. module: board_account
#: constraint:ir.actions.act_window:0
msgid "Invalid model name in the action definition."
msgstr ""
msgstr "Nieprawidłowa nazwa modelu w definicji akcji."
#. module: board_account
#: model:ir.ui.menu,name:board_account.next_id_68
msgid "Accounting"
msgstr ""
msgstr "Księgowość"
#. module: board_account
#: view:board.board:0
msgid "Account Board"
msgstr ""
msgstr "Konsola kont"
#. module: board_account
#: view:board.board:0
msgid "Aged income"
msgstr ""
msgstr "Przeterminowany dochód"

View File

@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 5.0.0\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2009-09-08 15:20+0000\n"
"Last-Translator: Fabien (Open ERP) <fp@tinyerp.com>\n"
"PO-Revision-Date: 2010-05-19 09:15+0000\n"
"Last-Translator: Rytis Ūsalis <Unknown>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-04-17 03:57+0000\n"
"X-Launchpad-Export-Date: 2010-05-20 05:23+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: board_association
@ -40,7 +40,7 @@ msgstr ""
#. module: board_association
#: view:board.board:0
msgid "My tasks"
msgstr ""
msgstr "Mano užduotys"
#. module: board_association
#: view:board.board:0

View File

@ -11,7 +11,7 @@
<field name="name">My Expenses</field>
<field name="res_model">hr.expense.expense</field>
<field name="view_type">form</field>
<field name="domain">[('state','=','draft'),('user_id','=',uid)]</field>
<field name="domain">[('state','in',('draft', 'confirm')),('user_id','=',uid)]</field>
<field name="view_id" ref="hr_expense.view_editable_expenses_tree"/>
</record>

View File

@ -7,19 +7,19 @@ msgstr ""
"Project-Id-Version: OpenERP Server 5.0.0\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2009-11-21 15:58+0000\n"
"Last-Translator: Andrzej MoST (Marcin Ostajewski) <Unknown>\n"
"PO-Revision-Date: 2010-05-23 20:02+0000\n"
"Last-Translator: Grzegorz Grzelak (Cirrus.pl) <Unknown>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-04-17 04:00+0000\n"
"X-Launchpad-Export-Date: 2010-05-24 03:46+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: board_manufacturing
#: view:board.board:0
msgid "Procurement in Exception"
msgstr ""
msgstr "Niepoprawne nabycia"
#. module: board_manufacturing
#: view:board.board:0
@ -34,7 +34,7 @@ msgstr "XML niewłaściwy dla tej architektury wyświetlania!"
#. module: board_manufacturing
#: view:board.board:0
msgid "Deliveries (Out packing)"
msgstr ""
msgstr "Dostawy do klientów"
#. module: board_manufacturing
#: view:board.board:0
@ -49,7 +49,7 @@ msgstr "Produkcja"
#. module: board_manufacturing
#: constraint:ir.actions.act_window:0
msgid "Invalid model name in the action definition."
msgstr ""
msgstr "Nieprawidłowa nazwa modelu w definicji akcji."
#. module: board_manufacturing
#: model:ir.actions.act_window,name:board_manufacturing.open_board_manufacturing
@ -65,9 +65,9 @@ msgstr "Konsola dla produkcji"
#. module: board_manufacturing
#: view:board.board:0
msgid "Stock value variation"
msgstr ""
msgstr "Zmiany wartości zapasów"
#. module: board_manufacturing
#: view:board.board:0
msgid "Workcenter futur load"
msgstr "Przyszłe obiciążenie centrum roboczego"
msgstr "Obciążenie centrów roboczych"

View File

@ -7,24 +7,72 @@
<field name="res_model">project.issue</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="domain">[('create_date', '&gt;=', time.strftime('%Y-%m-%d 00:00:00')),('create_date', '&lt;=', time.strftime('%Y-%m-%d 23:59:59'))]</field>
<field name="domain">[('user_id','=',uid),('state','in',['draft','open'])]</field>
<field name="view_id" ref="project_issue.project_issue_tree_view"/>
</record>
<record id="action_view_pending_project_issue_tree" model="ir.actions.act_window">
<field name="name">Project issues</field>
<field name="res_model">project.issue</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="domain">[('user_id','=',uid),('state','=','pending')]</field>
<field name="view_id" ref="project_issue.project_issue_tree_view"/>
</record>
<record id="action_project_issue_graph_state" model="ir.actions.act_window">
<field name="name">Project Issue</field>
<field name="res_model">project.issue.report</field>
<field name="view_type">form</field>
<field name="view_mode">graph</field>
<field name="domain">[('user_id','=',uid)]</field>
<field name="view_id" ref="project_issue.view_project_issue_report_graph"/>
</record>
<record id="view_project_issue_graph_stage" model="ir.ui.view">
<field name="name">project.issue.report.graph</field>
<field name="model">project.issue.report</field>
<field name="type">graph</field>
<field name="arch" type="xml">
<graph orientation="vertical" string="Project Issue" type="bar">
<field name="stage_id"/>
<field name="nbr" operator="+"/>
<field group="True" name="user_id"/>
</graph>
</field>
</record>
<record id="action_project_issue_graph_stage" model="ir.actions.act_window">
<field name="name">Project Issue</field>
<field name="res_model">project.issue.report</field>
<field name="view_type">form</field>
<field name="view_mode">graph</field>
<field name="domain">[('user_id','=',uid)]</field>
<field name="view_id" ref="view_project_issue_graph_stage"/>
</record>
<record id="board_project_issue_form" model="ir.ui.view">
<field name="name">board.project.issue.form</field>
<field name="model">board.board</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Project Issue Board">
<vpaned>
<form string="My Board">
<hpaned>
<child1>
<action colspan="4" height="220" name="%(action_view_current_project_issue_tree)d" string="Current Project Issues" width="510"/>
<action colspan="4" name="%(action_view_current_project_issue_tree)d" string="Current Issues" width="510"/>
<action colspan="4" name="%(action_view_pending_project_issue_tree)d" string="Pending Issues" width="510"/>
</child1>
<child2>
<action colspan="4" height="220" name="%(project.action_task_by_days_graph)d" string="Project Tasks By Days" width="510"/>
<vpaned>
<child1>
<action colspan="4" name="%(action_project_issue_graph_state)d" string="Issues By State" />
</child1>
<child2>
<action colspan="4" name="%(action_project_issue_graph_stage)d" string="Issues By Stage" />
</child2>
</vpaned>
</child2>
</vpaned>
</hpaned>
</form>
</field>
</record>

View File

@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 5.0.4\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2009-02-03 11:08+0000\n"
"Last-Translator: Fabien (Open ERP) <fp@tinyerp.com>\n"
"PO-Revision-Date: 2010-05-24 16:30+0000\n"
"Last-Translator: Grzegorz Grzelak (Cirrus.pl) <Unknown>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-04-17 04:04+0000\n"
"X-Launchpad-Export-Date: 2010-05-25 03:42+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: board_project
@ -25,23 +25,23 @@ msgstr "Planowanie mojego projektu"
#: view:hr_timesheet_sheet.sheet:0
#: model:ir.actions.act_window,name:board_project.act_hr_timesheet_sheet
msgid "Timesheets"
msgstr ""
msgstr "Karty czasu pracy"
#. module: board_project
#: constraint:ir.actions.act_window:0
msgid "Invalid model name in the action definition."
msgstr ""
msgstr "Nieprawidłowa nazwa modelu w definicji akcji."
#. module: board_project
#: view:board.board:0
#: model:ir.actions.act_window,name:board_project.act_my_project
msgid "My projects"
msgstr ""
msgstr "Moje projekty"
#. module: board_project
#: model:ir.actions.act_window,name:board_project.action_view_task_tree_deadline
msgid "My Task's Deadlines"
msgstr ""
msgstr "Moje terminy"
#. module: board_project
#: view:project.task:0
@ -52,40 +52,40 @@ msgstr "Moje zadania"
#: view:board.board:0
#: model:ir.actions.act_window,name:board_project.action_view_board_note_tree
msgid "Public Notes"
msgstr ""
msgstr "Uwagi ogólne"
#. module: board_project
#: model:ir.actions.act_window,name:board_project.open_board_project
#: model:ir.ui.menu,name:board_project.menu_board_project
msgid "Project Dashboard"
msgstr ""
msgstr "Konsola projektu"
#. module: board_project
#: model:ir.module.module,shortdesc:board_project.module_meta_information
msgid "Board for project users"
msgstr ""
msgstr "Konsola dla użytkowników projektu"
#. module: board_project
#: model:ir.actions.act_window,name:board_project.action_project_pipeline_user
msgid "Pipeline of tasks"
msgstr ""
msgstr "Przepływ zadań"
#. module: board_project
#: view:board.board:0
msgid "My Planning"
msgstr ""
msgstr "Moje planowania"
#. module: board_project
#: view:board.board:0
#: model:ir.actions.act_window,name:board_project.act_my_account
msgid "My accounts to invoice"
msgstr ""
msgstr "Moje konta do fakturowania"
#. module: board_project
#: model:ir.actions.act_window,name:board_project.open_board_project_manager
#: model:ir.ui.menu,name:board_project.menu_board_project_manager
msgid "Project Manager Dashboard"
msgstr ""
msgstr "Konsola Menedżera projektów"
#. module: board_project
#: view:board.board:0
@ -100,7 +100,7 @@ msgstr "XML niewłaściwy dla tej architektury wyświetlania!"
#. module: board_project
#: view:board.board:0
msgid "User's timesheets"
msgstr ""
msgstr "Karty czasu pracy użytkownika"
#. module: board_project
#: model:ir.ui.menu,name:board_project.next_id_86
@ -110,30 +110,30 @@ msgstr "Projekt"
#. module: board_project
#: view:board.board:0
msgid "Project manager board"
msgstr ""
msgstr "Konsola Menedżera projektu"
#. module: board_project
#: view:board.board:0
#: model:ir.actions.act_window,name:board_project.action_view_task_tree
msgid "My Open Tasks"
msgstr ""
msgstr "Moje otwarte zadania"
#. module: board_project
#: view:board.board:0
msgid "My Board"
msgstr ""
msgstr "Moja konsola"
#. module: board_project
#: view:board.board:0
msgid "My tasks board"
msgstr ""
msgstr "Konsola moich zadań"
#. module: board_project
#: view:board.board:0
msgid "My user's pipeline"
msgstr ""
msgstr "Moje przepływy zadań"
#. module: board_project
#: view:board.board:0
msgid "My Timesheet"
msgstr ""
msgstr "Moja karta czasu pracy"

View File

@ -8,6 +8,15 @@
name="Purchase"
parent="base.dashboard"/>
<record id="purchase_draft" model="ir.actions.act_window">
<field name="name">Draft Purchases</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">purchase.order</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="domain">[('date_order','&gt;',time.strftime('%Y-01-01 00:00:00')),('date_order','&lt;',time.strftime('%Y-12-31 23:59:59')), ('state','=','draft')]</field>
<field name="search_view_id" ref="purchase.purchase_order_tree"/>
</record>
<record id="purchase_waiting" model="ir.actions.act_window">
<field name="name">Quotation Request</field>
<field name="type">ir.actions.act_window</field>
@ -26,7 +35,7 @@
<form string="My Board">
<hpaned>
<child1>
<action colspan="4" height="220" name="%(purchase.purchase_rfq)d" string="Draft Purchase Order" width="510"/>
<action colspan="4" height="220" name="%(purchase_draft)d" string="Draft Purchase Order" width="510"/>
<action colspan="4" height="220" name="%(purchase_waiting)d" string="Purchase Order in Waiting" width="510"/>
</child1>
<child2>

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