bzr revid: fp@fp-laptop-20110904165939-4oy32t80xgk040kj
This commit is contained in:
fp 2011-09-04 18:59:39 +02:00
commit d62bfd8a88
196 changed files with 30986 additions and 2757 deletions

View File

@ -660,11 +660,6 @@ class account_journal(osv.osv):
def create_sequence(self, cr, uid, vals, context=None):
"""
Create new entry sequence for every new Joural
@param cr: cursor to database
@param user: id of current user
@param ids: list of record ids to be process
@param context: context arguments, like lang, time zone
@return: return a result
"""
seq_pool = self.pool.get('ir.sequence')
seq_typ_pool = self.pool.get('ir.sequence.type')
@ -686,6 +681,8 @@ class account_journal(osv.osv):
'padding': 4,
'number_increment': 1
}
if 'company_id' in vals:
seq['company_id'] = vals['company_id']
return seq_pool.create(cr, uid, seq)
def create(self, cr, uid, vals, context=None):
@ -711,6 +708,8 @@ class account_journal(osv.osv):
name = rs.name
if rs.currency:
name = "%s (%s)" % (rs.name, rs.currency.name)
else:
name = "%s (%s)" % (rs.name, rs.company_id.currency_id.name)
res += [(rs.id, name)]
return res
@ -916,10 +915,17 @@ class account_period(osv.osv):
return False
def find(self, cr, uid, dt=None, context=None):
if context is None: context = {}
if not dt:
dt = time.strftime('%Y-%m-%d')
#CHECKME: shouldn't we check the state of the period?
ids = self.search(cr, uid, [('date_start','<=',dt),('date_stop','>=',dt)])
args = [('date_start', '<=' ,dt), ('date_stop', '>=', dt)]
if context.get('company_id', False):
args.append(('company_id', '=', context['company_id']))
else:
company_id = self.pool.get('res.users').browse(cr, uid, uid, context=context).company_id.id
args.append(('company_id', '=', company_id))
ids = self.search(cr, uid, args, context=context)
if not ids:
raise osv.except_osv(_('Error !'), _('No period defined for this date: %s !\nPlease create one.')%dt)
return ids

View File

@ -51,26 +51,22 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Invoice Line">
<notebook>
<page string="Line">
<field name="product_id" on_change="product_id_change(product_id, uos_id, quantity, name, parent.type, parent.partner_id, parent.fiscal_position, price_unit, parent.address_invoice_id, parent.currency_id, context, parent.company_id)"/>
<field name="uos_id" on_change="uos_id_change(product_id, uos_id, quantity, name, parent.type, parent.partner_id, parent.fiscal_position, price_unit, parent.address_invoice_id, parent.currency_id, context, parent.company_id)"/>
<field name="quantity"/>
<field name="price_unit"/>
<field name="discount" groups="base.group_extended"/>
<field colspan="4" name="name"/>
<field domain="[('company_id', '=', parent.company_id), ('journal_id', '=', parent.journal_id), ('type', '&lt;&gt;', 'view')]" name="account_id" on_change="onchange_account_id(parent.fiscal_position,account_id)"/>
<field domain="[('type','&lt;&gt;','view'), ('company_id', '=', parent.company_id), ('parent_id', '!=', False)]" name="account_analytic_id" groups="analytic.group_analytic_accounting"/>
<newline/>
<field name="company_id" groups="base.group_multi_company" readonly="1"/>
<separator colspan="4" string="Taxes"/>
<field colspan="4" name="invoice_line_tax_id" context="{'type':parent.type}" domain="[('parent_id','=',False),('company_id', '=', parent.company_id)]"
nolabel="1"/>
</page>
<page string="Notes">
<field colspan="4" name="note" nolabel="1"/>
</page>
</notebook>
<field name="product_id" on_change="product_id_change(product_id, uos_id, quantity, name, parent.type, parent.partner_id, parent.fiscal_position, price_unit, parent.address_invoice_id, parent.currency_id, context, parent.company_id)"/>
<field colspan="2" name="name"/>
<label string="Quantity :" align="1.0"/>
<group colspan="1" col="2">
<field name="quantity" nolabel="1"/>
<field name="uos_id" on_change="uos_id_change(product_id, uos_id, quantity, name, parent.type, parent.partner_id, parent.fiscal_position, price_unit, parent.address_invoice_id, parent.currency_id, context, parent.company_id)" nolabel="1"/>
</group>
<field name="price_unit"/>
<field domain="[('company_id', '=', parent.company_id), ('journal_id', '=', parent.journal_id), ('type', '&lt;&gt;', 'view')]" name="account_id" on_change="onchange_account_id(parent.fiscal_position,account_id)"/>
<field name="discount" groups="base.group_extended"/>
<field domain="[('type','&lt;&gt;','view'), ('company_id', '=', parent.company_id), ('parent_id', '!=', False)]" name="account_analytic_id" groups="analytic.group_analytic_accounting"/>
<field name="company_id" groups="base.group_multi_company" readonly="1"/>
<separator string="Notes" colspan="4"/>
<field colspan="4" name="note" nolabel="1"/>
<separator colspan="4" string="Taxes"/>
<field colspan="4" name="invoice_line_tax_id" context="{'type':parent.type}" domain="[('parent_id','=',False),('company_id', '=', parent.company_id)]" nolabel="1"/>
</form>
</field>
</record>
@ -238,6 +234,7 @@
<field name="payment_ids" colspan="4" nolabel="1" >
<tree string="Payments">
<field name="date" string="Payment Date"/>
<field name="move_id"/>
<field name="ref"/>
<field name="name" groups="base.group_extended"/>
<field name="journal_id"/>
@ -336,6 +333,7 @@
<field name="payment_ids" colspan="4" nolabel="1">
<tree string="Payments">
<field name="date"/>
<field name="move_id"/>
<field name="ref"/>
<field name="name"/>
<field name="journal_id" groups="base.group_user"/>

View File

@ -362,7 +362,7 @@
<field name="help">Here you can customize an existing journal view or create a new view. Journal views determine the way you can record entries in your journal. Select the fields you want to appear in a journal and determine the sequence in which they will appear. Then you can create a new journal and link your view to it.</field>
</record>
<menuitem action="action_account_journal_view" id="menu_action_account_journal_view" parent="account.menu_journals"/>
<menuitem action="action_account_journal_view" id="menu_action_account_journal_view" parent="account.menu_journals" sequence="20" groups="base.group_extended"/>
<!--
# Account Journal
@ -767,7 +767,7 @@
<field name="search_view_id" ref="view_account_type_search"/>
<field name="help">An account type is used to determine how an account is used in each journal. The deferral method of an account type determines the process for the annual closing. Reports such as the Balance Sheet and the Profit and Loss report use the category (profit/loss or balance sheet). For example, the account type could be linked to an asset account, expense account or payable account. From this view, you can create and manage the account types you need for your company.</field>
</record>
<menuitem action="action_account_type_form" sequence="6" id="menu_action_account_type_form" parent="account_account_menu" groups="base.group_extended"/>
<menuitem action="action_account_type_form" sequence="20" id="menu_action_account_type_form" parent="account_account_menu" groups="base.group_extended"/>
<!--
Entries
-->

View File

@ -36,12 +36,13 @@ class res_company(osv.osv):
}
_defaults = {
'overdue_msg': 'Please note that the following payments are now due. If your payment \
has been sent, kindly forward your payment details. If payment will be \
delayed further, please contact us to discuss. \
\nWould your payment have been carried out after this mail was sent, please consider the present one as void.'
'overdue_msg': '''Our records indicate that the following payments are still due. If the amount
has already been paid, please disregard this notice. However, if you have any
queries regarding your account, please contact us.
Thank you in advance.
'''
}
res_company()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -25,6 +25,40 @@
<field name="name">Payment Term</field>
<field name="digits">6</field>
</record>
<record id="account_payment_term_net" model="account.payment.term">
<field name="name">30 Net Days</field>
<field name="note">30 Net Days</field>
</record>
<record id="account_payment_term_line_net" model="account.payment.term.line">
<field name="name">30 Net Days</field>
<field name="value">balance</field>
<field eval="30" name="days"/>
<field eval="0" name="days2"/>
<field eval="account_payment_term_net" name="payment_id"/>
</record>
<record id="account_payment_term_advance" model="account.payment.term">
<field name="name">30% Advance End 30 Days</field>
<field name="note">30% Advance End 30 Days</field>
</record>
<record id="account_payment_term_line_advance1" model="account.payment.term.line">
<field name="name">30% Advance</field>
<field name="value">procent</field>
<field eval="3" name="sequence"/>
<field eval="0.300000" name="value_amount"/>
<field eval="0" name="days"/>
<field eval="0" name="days2"/>
<field eval="account_payment_term_advance" name="payment_id"/>
</record>
<record id="account_payment_term_line_advance2" model="account.payment.term.line">
<field name="name">Remaining Balance</field>
<field name="value">balance</field>
<field eval="30" name="days"/>
<field eval="-1" name="days2"/>
<field eval="account_payment_term_advance" name="payment_id"/>
</record>
<!--
Account Journal View
-->

View File

@ -13,7 +13,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2011-08-20 04:53+0000\n"
"X-Launchpad-Export-Date: 2011-08-23 05:05+0000\n"
"X-Generator: Launchpad (build 13697)\n"
#. module: account

9716
addons/account/i18n/en_GB.po Normal file

File diff suppressed because it is too large Load Diff

View File

@ -13,7 +13,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2011-08-20 04:53+0000\n"
"X-Launchpad-Export-Date: 2011-08-23 05:05+0000\n"
"X-Generator: Launchpad (build 13697)\n"
#. module: account

9679
addons/account/i18n/kk.po Normal file

File diff suppressed because it is too large Load Diff

View File

@ -209,7 +209,7 @@ class account_invoice(osv.osv):
\n* The \'Open\' state is used when user create invoice,a invoice number is generated.Its in open state till user does not pay invoice. \
\n* The \'Paid\' state is set automatically when invoice is paid.\
\n* The \'Cancelled\' state is used when user cancel invoice.'),
'date_invoice': fields.date('Invoice Date', states={'paid':[('readonly',True)], 'open':[('readonly',True)], 'close':[('readonly',True)]}, select=True, help="Keep empty to use the current date"),
'date_invoice': fields.date('Invoice Date', readonly=True, states={'draft':[('readonly',False)]}, select=True, help="Keep empty to use the current date"),
'date_due': fields.date('Due Date', states={'paid':[('readonly',True)], 'open':[('readonly',True)], 'close':[('readonly',True)]}, select=True,
help="If you use payment terms, the due date will be computed automatically at the generation "\
"of accounting entries. If you keep the payment term and the due date empty, it means direct payment. The payment term may compute several due dates, for example 50% now, 50% in one month."),

View File

@ -0,0 +1,38 @@
# English (United Kingdom) translation for openobject-addons
# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2011.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2011-01-11 11:14+0000\n"
"PO-Revision-Date: 2011-08-25 11:46+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: English (United Kingdom) <en_GB@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: 2011-08-26 04:33+0000\n"
"X-Generator: Launchpad (build 13779)\n"
#. module: account_accountant
#: model:ir.module.module,description:account_accountant.module_meta_information
msgid ""
"\n"
"This module gives the admin user the access to all the accounting features "
"like the journal\n"
"items and the chart of accounts.\n"
" "
msgstr ""
"\n"
"This module gives the admin user access to all accounting features such as "
"the journal\n"
"items and the chart of accounts.\n"
" "
#. module: account_accountant
#: model:ir.module.module,shortdesc:account_accountant.module_meta_information
msgid "Accountant"
msgstr "Accountant"

View File

@ -8,21 +8,22 @@ msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2011-01-11 11:14+0000\n"
"PO-Revision-Date: 2010-08-02 21:56+0000\n"
"Last-Translator: Mantavya Gajjar (Open ERP) <Unknown>\n"
"PO-Revision-Date: 2011-08-23 11:12+0000\n"
"Last-Translator: Rolv Råen (adEgo) <Unknown>\n"
"Language-Team: Norwegian Bokmal <nb@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: 2011-04-29 05:20+0000\n"
"X-Generator: Launchpad (build 12758)\n"
"X-Launchpad-Export-Date: 2011-08-24 04:37+0000\n"
"X-Generator: Launchpad (build 13697)\n"
#. module: account_analytic_analysis
#: help:account.analytic.account,hours_qtt_invoiced:0
msgid ""
"Number of hours that can be invoiced plus those that already have been "
"invoiced."
msgstr "Antall timer som faktureres plus de som allerede har blitt fakturert"
msgstr ""
"Antall timer som kan faktureres pluss de som allerede har blitt fakturert"
#. module: account_analytic_analysis
#: help:account.analytic.account,remaining_ca:0

View File

@ -8,19 +8,19 @@ msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2011-01-11 11:14+0000\n"
"PO-Revision-Date: 2009-09-08 15:46+0000\n"
"Last-Translator: Fabien (Open ERP) <fp@tinyerp.com>\n"
"PO-Revision-Date: 2011-09-01 12:50+0000\n"
"Last-Translator: Nauris Sedlers <Unknown>\n"
"Language-Team: Latvian <lv@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: 2011-04-29 05:24+0000\n"
"X-Generator: Launchpad (build 12758)\n"
"X-Launchpad-Export-Date: 2011-09-02 04:41+0000\n"
"X-Generator: Launchpad (build 13830)\n"
#. module: account_analytic_default
#: model:ir.module.module,shortdesc:account_analytic_default.module_meta_information
msgid "Account Analytic Default"
msgstr "Analītiskais Konts pēc Noklusējuma"
msgstr "Noklusētais Analītiskais Konts"
#. module: account_analytic_default
#: help:account.analytic.default,partner_id:0
@ -29,16 +29,16 @@ msgid ""
"default (eg. create new cutomer invoice or Sale order if we select this "
"partner, it will automatically take this as an analytical account)"
msgstr ""
"Izvēlieties partneri, kurš tiks izmantots analītiskajā kontā pēc "
"noklusējuma. Piemēram, veidojot jaunu klienta rēķinu, izvēloties klientu, "
"automātiski tiks izvēlēts attiecīgais analītiskais konts."
"Izvēlieties partneri, kurš tiks izmantots noklusētajā analītiskajā kontā. "
"Piemēram, veidojot jaunu klienta rēķinu, izvēloties klientu, automātiski "
"tiks izvēlēts attiecīgais analītiskais konts."
#. module: account_analytic_default
#: model:ir.actions.act_window,name:account_analytic_default.analytic_rule_action_partner
#: model:ir.actions.act_window,name:account_analytic_default.analytic_rule_action_product
#: model:ir.actions.act_window,name:account_analytic_default.analytic_rule_action_user
msgid "Analytic Rules"
msgstr "Noteikumi Analītiskajiem aprēķiniem"
msgstr "Noteikumi Analītiskajiem Aprēķiniem"
#. module: account_analytic_default
#: help:account.analytic.default,analytic_id:0
@ -48,7 +48,7 @@ msgstr "Analītiskais Konts"
#. module: account_analytic_default
#: view:account.analytic.default:0
msgid "Current"
msgstr "Pašreizējais"
msgstr "Tekošais"
#. module: account_analytic_default
#: view:account.analytic.default:0
@ -63,7 +63,7 @@ msgstr "Noklusētais beigu datums Analītiskajam Kontam"
#. module: account_analytic_default
#: model:ir.model,name:account_analytic_default.model_stock_picking
msgid "Picking List"
msgstr "Iepakošanas Saraksts"
msgstr "Izvades Saraksts"
#. module: account_analytic_default
#: view:account.analytic.default:0
@ -132,7 +132,7 @@ msgstr ""
#: model:ir.actions.act_window,name:account_analytic_default.action_analytic_default_list
#: model:ir.ui.menu,name:account_analytic_default.menu_analytic_default_list
msgid "Analytic Defaults"
msgstr "Analītikas Noklusētie uzstādījumi"
msgstr "Analītikas Noklusētie Iestatījumi"
#. module: account_analytic_default
#: model:ir.module.module,description:account_analytic_default.module_meta_information
@ -153,7 +153,7 @@ msgstr ""
"* Partnera\n"
"* Lietotāja\n"
"* Uzņēmuma\n"
"* Datuma.\n"
"* Datuma\n"
" "
#. module: account_analytic_default

View File

@ -13,7 +13,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2011-08-20 04:53+0000\n"
"X-Launchpad-Export-Date: 2011-08-23 05:05+0000\n"
"X-Generator: Launchpad (build 13697)\n"
#. module: account_analytic_plans

View File

@ -0,0 +1,566 @@
# Latvian translation for openobject-addons
# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2011.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2011-01-03 16:56+0000\n"
"PO-Revision-Date: 2011-09-01 12:44+0000\n"
"Last-Translator: Nauris Sedlers <Unknown>\n"
"Language-Team: Latvian <lv@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: 2011-09-02 04:41+0000\n"
"X-Generator: Launchpad (build 13830)\n"
#. module: account_analytic_plans
#: view:analytic.plan.create.model:0
msgid ""
"This distribution model has been saved.You will be able to reuse it later."
msgstr ""
"Šo sadalījuma modelis ir saglabāts. Jūs varēsiet to atkārtoti izmantot vēlāk."
#. module: account_analytic_plans
#: field:account.analytic.plan.instance.line,plan_id:0
msgid "Plan Id"
msgstr "Plāna Id"
#. module: account_analytic_plans
#: report:account.analytic.account.crossovered.analytic:0
msgid "From Date"
msgstr "No Datuma"
#. module: account_analytic_plans
#: report:account.analytic.account.crossovered.analytic:0
#: view:account.crossovered.analytic:0
#: model:ir.actions.act_window,name:account_analytic_plans.action_account_crossovered_analytic
#: model:ir.actions.report.xml,name:account_analytic_plans.account_analytic_account_crossovered_analytic
msgid "Crossovered Analytic"
msgstr "Šķērsanalīze"
#. module: account_analytic_plans
#: view:account.analytic.plan:0
#: field:account.analytic.plan,name:0
#: field:account.analytic.plan.line,plan_id:0
#: model:ir.actions.act_window,name:account_analytic_plans.account_analytic_plan_form_action
#: model:ir.model,name:account_analytic_plans.model_account_analytic_plan
#: model:ir.ui.menu,name:account_analytic_plans.menu_account_analytic_plan_action
msgid "Analytic Plan"
msgstr "Analītiskais Plāns"
#. module: account_analytic_plans
#: model:ir.module.module,shortdesc:account_analytic_plans.module_meta_information
msgid "Multiple-plans management in Analytic Accounting"
msgstr "Vairāku plānu apstrāde Analītiskajā Grāmatvedībā"
#. module: account_analytic_plans
#: field:account.analytic.plan.instance,journal_id:0
#: view:account.crossovered.analytic:0
#: field:account.crossovered.analytic,journal_ids:0
msgid "Analytic Journal"
msgstr "Analītskais Žurnāls"
#. module: account_analytic_plans
#: view:account.analytic.plan.line:0
#: model:ir.model,name:account_analytic_plans.model_account_analytic_plan_line
msgid "Analytic Plan Line"
msgstr "Analītiskā Plāna Rinda"
#. module: account_analytic_plans
#: code:addons/account_analytic_plans/wizard/account_crossovered_analytic.py:60
#, python-format
msgid "User Error"
msgstr "Lietotāja Kļūda"
#. module: account_analytic_plans
#: model:ir.model,name:account_analytic_plans.model_account_analytic_plan_instance
msgid "Analytic Plan Instance"
msgstr "Analītiskākā Plāna Instance"
#. module: account_analytic_plans
#: view:analytic.plan.create.model:0
msgid "Ok"
msgstr "Labi"
#. module: account_analytic_plans
#: constraint:account.move.line:0
msgid "You can not create move line on closed account."
msgstr "Nav iespējams veikt grāmatojumus slēgtā kontā."
#. module: account_analytic_plans
#: field:account.analytic.plan.instance,plan_id:0
msgid "Model's Plan"
msgstr "Modeļa Plāns"
#. module: account_analytic_plans
#: field:account.analytic.plan.instance,account2_ids:0
msgid "Account2 Id"
msgstr "Konta2 Id"
#. module: account_analytic_plans
#: field:account.analytic.plan.instance,account_ids:0
msgid "Account Id"
msgstr "Konta Id"
#. module: account_analytic_plans
#: report:account.analytic.account.crossovered.analytic:0
msgid "Amount"
msgstr "Summa"
#. module: account_analytic_plans
#: report:account.analytic.account.crossovered.analytic:0
msgid "Code"
msgstr "Kods"
#. module: account_analytic_plans
#: sql_constraint:account.move.line:0
msgid "Wrong credit or debit value in accounting entry !"
msgstr "Kļūdaina kredīta vai debeta vērtība grāmatojumā!"
#. module: account_analytic_plans
#: field:account.analytic.plan.instance,account6_ids:0
msgid "Account6 Id"
msgstr "Konta6 Id"
#. module: account_analytic_plans
#: model:ir.ui.menu,name:account_analytic_plans.menu_account_analytic_multi_plan_action
msgid "Multi Plans"
msgstr "Multi Plāni"
#. module: account_analytic_plans
#: model:ir.model,name:account_analytic_plans.model_account_bank_statement_line
msgid "Bank Statement Line"
msgstr "Konta Izraksta Rinda"
#. module: account_analytic_plans
#: field:account.analytic.plan.instance.line,analytic_account_id:0
msgid "Analytic Account"
msgstr "Analītiskais Konts"
#. module: account_analytic_plans
#: sql_constraint:account.journal:0
msgid "The code of the journal must be unique per company !"
msgstr "Žurnāla kodam ir jābūt unikālam katram uzņēmumam!"
#. module: account_analytic_plans
#: field:account.crossovered.analytic,ref:0
msgid "Analytic Account Reference"
msgstr "Analītiskā Konta Reference"
#. module: account_analytic_plans
#: constraint:account.move.line:0
msgid ""
"You can not create move line on receivable/payable account without partner"
msgstr ""
"Tu nevari izveidot grāmatojumu izejošam/ienākošam kontam bez partnera"
#. module: account_analytic_plans
#: model:ir.model,name:account_analytic_plans.model_sale_order_line
msgid "Sales Order Line"
msgstr "Pasūtījuma Rinda"
#. module: account_analytic_plans
#: code:addons/account_analytic_plans/wizard/analytic_plan_create_model.py:47
#: view:analytic.plan.create.model:0
#, python-format
msgid "Distribution Model Saved"
msgstr "Sadalījuma Modelis Saglabāts"
#. module: account_analytic_plans
#: model:ir.actions.act_window,name:account_analytic_plans.account_analytic_plan_instance_action
msgid "Analytic Distribution's Models"
msgstr "Analītiskā Sadalījuma Modeļi"
#. module: account_analytic_plans
#: view:account.crossovered.analytic:0
msgid "Print"
msgstr "Drukāt"
#. module: account_analytic_plans
#: report:account.analytic.account.crossovered.analytic:0
msgid "Percentage"
msgstr "Procenti"
#. module: account_analytic_plans
#: code:addons/account_analytic_plans/account_analytic_plans.py:201
#, python-format
msgid "A model having this name and code already exists !"
msgstr "Modelis ar šo vārdu un kodu jau eksistē!"
#. module: account_analytic_plans
#: code:addons/account_analytic_plans/wizard/analytic_plan_create_model.py:41
#, python-format
msgid "No analytic plan defined !"
msgstr "Nav nodefinēts analītiskais plāns!"
#. module: account_analytic_plans
#: field:account.analytic.plan.instance.line,rate:0
msgid "Rate (%)"
msgstr "Likme (%)"
#. module: account_analytic_plans
#: view:account.analytic.plan:0
#: field:account.analytic.plan,plan_ids:0
#: field:account.journal,plan_id:0
msgid "Analytic Plans"
msgstr "Analītiskie Plāni"
#. module: account_analytic_plans
#: report:account.analytic.account.crossovered.analytic:0
msgid "Perc(%)"
msgstr "Proc(%)"
#. module: account_analytic_plans
#: field:account.analytic.plan.line,max_required:0
msgid "Maximum Allowed (%)"
msgstr "Maksimāli Pieļaujamie (%)"
#. module: account_analytic_plans
#: report:account.analytic.account.crossovered.analytic:0
msgid "Printing date"
msgstr "Izdrukas datums"
#. module: account_analytic_plans
#: view:account.analytic.plan.line:0
msgid "Analytic Plan Lines"
msgstr "Analītiskā Plāna Rindas"
#. module: account_analytic_plans
#: constraint:account.bank.statement.line:0
msgid ""
"The amount of the voucher must be the same amount as the one on the "
"statement line"
msgstr "Rēķina summai ir jāsakrīt ar konta izraksta rindā esošo"
#. module: account_analytic_plans
#: model:ir.model,name:account_analytic_plans.model_account_invoice_line
msgid "Invoice Line"
msgstr "Rēķina Rinda"
#. module: account_analytic_plans
#: report:account.analytic.account.crossovered.analytic:0
msgid "Currency"
msgstr "Valūta"
#. module: account_analytic_plans
#: field:account.crossovered.analytic,date1:0
msgid "Start Date"
msgstr "Sākuma Datums"
#. module: account_analytic_plans
#: report:account.analytic.account.crossovered.analytic:0
msgid "Company"
msgstr "Uzņēmums"
#. module: account_analytic_plans
#: field:account.analytic.plan.instance,account5_ids:0
msgid "Account5 Id"
msgstr "Konts5 Id"
#. module: account_analytic_plans
#: model:ir.model,name:account_analytic_plans.model_account_analytic_plan_instance_line
msgid "Analytic Instance Line"
msgstr "Analītiskās Instances Rinda"
#. module: account_analytic_plans
#: field:account.analytic.plan.line,root_analytic_id:0
msgid "Root Account"
msgstr "Pamata Konts"
#. module: account_analytic_plans
#: report:account.analytic.account.crossovered.analytic:0
msgid "To Date"
msgstr "Līdz Datumam"
#. module: account_analytic_plans
#: code:addons/account_analytic_plans/account_analytic_plans.py:321
#: code:addons/account_analytic_plans/account_analytic_plans.py:462
#, python-format
msgid "You have to define an analytic journal on the '%s' journal!"
msgstr "Žurnālam '%s' ir jādefinē atbilstošs analītiskais žurnāls!"
#. module: account_analytic_plans
#: field:account.crossovered.analytic,empty_line:0
msgid "Dont show empty lines"
msgstr "Nerādīt tukšās rindas"
#. module: account_analytic_plans
#: model:ir.actions.act_window,name:account_analytic_plans.action_analytic_plan_create_model
msgid "analytic.plan.create.model.action"
msgstr "analytic.plan.create.model.action"
#. module: account_analytic_plans
#: report:account.analytic.account.crossovered.analytic:0
msgid "Analytic Account :"
msgstr "Analītiskais Konts:"
#. module: account_analytic_plans
#: model:ir.module.module,description:account_analytic_plans.module_meta_information
msgid ""
"This module allows to use several analytic plans, according to the general "
"journal,\n"
"so that multiple analytic lines are created when the invoice or the entries\n"
"are confirmed.\n"
"\n"
"For example, you can define the following analytic structure:\n"
" Projects\n"
" Project 1\n"
" SubProj 1.1\n"
" SubProj 1.2\n"
" Project 2\n"
" Salesman\n"
" Eric\n"
" Fabien\n"
"\n"
"Here, we have two plans: Projects and Salesman. An invoice line must\n"
"be able to write analytic entries in the 2 plans: SubProj 1.1 and\n"
"Fabien. The amount can also be split. The following example is for\n"
"an invoice that touches the two subproject and assigned to one salesman:\n"
"\n"
"Plan1:\n"
" SubProject 1.1 : 50%\n"
" SubProject 1.2 : 50%\n"
"Plan2:\n"
" Eric: 100%\n"
"\n"
"So when this line of invoice will be confirmed, it will generate 3 analytic "
"lines,\n"
"for one account entry.\n"
"The analytic plan validates the minimum and maximum percentage at the time "
"of creation\n"
"of distribution models.\n"
" "
msgstr ""
"Šis modulis ļauj izmantot vairākus analītiskos plānus, atbilstoši galvenajam "
"žurnālam,\n"
"tādejādi apstiprinot rēķinus vai ievades rindas, tiek izveidotas vairākas "
"analītisko\n"
"kontu rindas.\n"
"\n"
"Piemēram, jūs varat nodefinēt sekojošu analītisko struktūru:\n"
" Projekts\n"
" Projekts 1\n"
" Apakš Projekts 1.1\n"
" Apakš Projekts 1.2\n"
" Projekts 2\n"
" Pārdevēji\n"
" Ēriks\n"
" Gatis\n"
"\n"
"Šeit mums ir redzami divi plāni: Projekti un Pārdevēji. Rēķina rindā ir "
"jāievada\n"
"divas analītiskās pazīmes: Apakš Projekts 1.1 un Gatis.\n"
"Arī kopējo summu var sadalīt. Sekojošais piemērs ir rēķiniem\n"
"kas saistīti ar viena pārdevēja diviem apakš projektiem:\n"
"\n"
"Plāns1:\n"
" Apakš Projekts 1.1: 50%\n"
" Apakš Projekts 1.2: 50%\n"
"Plāns2:\n"
" Gatis: 100%\n"
"\n"
"Tādejādi grāmatojot šo rēķina rindiņu, tā izveidos 3 analītiskās rindiņas,\n"
"katram konta ierakstam.\n"
"Analītiskais plāns sadalījuma modeļa izveides brīdi pārbauda noteikto "
"minimālo\n"
"un maksimālo procentuālo sadalījumu.\n"
" "
#. module: account_analytic_plans
#: report:account.analytic.account.crossovered.analytic:0
msgid "Analytic Account Reference:"
msgstr "Analītiskā Konta Reference"
#. module: account_analytic_plans
#: field:account.analytic.plan.line,name:0
msgid "Plan Name"
msgstr "Plāna Nosaukums"
#. module: account_analytic_plans
#: field:account.analytic.plan,default_instance_id:0
msgid "Default Entries"
msgstr "Noklusētās Vērtības"
#. module: account_analytic_plans
#: model:ir.model,name:account_analytic_plans.model_account_move_line
msgid "Journal Items"
msgstr "Žurnāla Vienumi"
#. module: account_analytic_plans
#: field:account.analytic.plan.instance,account1_ids:0
msgid "Account1 Id"
msgstr "Konts1 Id"
#. module: account_analytic_plans
#: constraint:account.move.line:0
msgid "Company must be same for its related account and period."
msgstr "Uzņēmumam ir jāsakrīt ar saistīto kontu un periodu."
#. module: account_analytic_plans
#: field:account.analytic.plan.line,min_required:0
msgid "Minimum Allowed (%)"
msgstr "Minimāli Atļautie (%)"
#. module: account_analytic_plans
#: help:account.analytic.plan.line,root_analytic_id:0
msgid "Root account of this plan."
msgstr "Šā plāna pamata konts."
#. module: account_analytic_plans
#: code:addons/account_analytic_plans/account_analytic_plans.py:201
#: code:addons/account_analytic_plans/wizard/analytic_plan_create_model.py:38
#: code:addons/account_analytic_plans/wizard/analytic_plan_create_model.py:41
#, python-format
msgid "Error"
msgstr "Kļūda"
#. module: account_analytic_plans
#: view:analytic.plan.create.model:0
msgid "Save This Distribution as a Model"
msgstr "Saglabāt šo Sadalījumu kā Modeli"
#. module: account_analytic_plans
#: report:account.analytic.account.crossovered.analytic:0
msgid "Quantity"
msgstr "Daudzums"
#. module: account_analytic_plans
#: code:addons/account_analytic_plans/wizard/analytic_plan_create_model.py:38
#, python-format
msgid "Please put a name and a code before saving the model !"
msgstr "Lūdzu, norādiet nosaukumu un kodu, pirms saglabāt modeli!"
#. module: account_analytic_plans
#: model:ir.model,name:account_analytic_plans.model_account_crossovered_analytic
msgid "Print Crossovered Analytic"
msgstr "Izdrukāt Šķērssaistīto Analītiku"
#. module: account_analytic_plans
#: code:addons/account_analytic_plans/account_analytic_plans.py:321
#: code:addons/account_analytic_plans/account_analytic_plans.py:462
#, python-format
msgid "No Analytic Journal !"
msgstr "Nav norādīts analītiskais žurnāls!"
#. module: account_analytic_plans
#: model:ir.model,name:account_analytic_plans.model_account_bank_statement
msgid "Bank Statement"
msgstr "Bankas Konta Izraksts"
#. module: account_analytic_plans
#: field:account.analytic.plan.instance,account3_ids:0
msgid "Account3 Id"
msgstr "Konts3 Id"
#. module: account_analytic_plans
#: model:ir.model,name:account_analytic_plans.model_account_invoice
msgid "Invoice"
msgstr "Rēķins"
#. module: account_analytic_plans
#: view:account.crossovered.analytic:0
#: view:analytic.plan.create.model:0
msgid "Cancel"
msgstr "Atcelt"
#. module: account_analytic_plans
#: field:account.analytic.plan.instance,account4_ids:0
msgid "Account4 Id"
msgstr "Konts4 Id"
#. module: account_analytic_plans
#: view:account.analytic.plan.instance.line:0
msgid "Analytic Distribution Lines"
msgstr "Analītiskā Sadaklījuma Rindas"
#. module: account_analytic_plans
#: code:addons/account_analytic_plans/account_analytic_plans.py:214
#, python-format
msgid "The Total Should be Between %s and %s"
msgstr "Kopsummai ir jābūt starp %s un %s"
#. module: account_analytic_plans
#: report:account.analytic.account.crossovered.analytic:0
msgid "at"
msgstr "uz"
#. module: account_analytic_plans
#: report:account.analytic.account.crossovered.analytic:0
msgid "Account Name"
msgstr "Konta Nosaukums"
#. module: account_analytic_plans
#: view:account.analytic.plan.instance.line:0
msgid "Analytic Distribution Line"
msgstr "Analītiskā Sadaklījuma Rinda"
#. module: account_analytic_plans
#: field:account.analytic.plan.instance,code:0
msgid "Distribution Code"
msgstr "Sadalījuma Kods"
#. module: account_analytic_plans
#: report:account.analytic.account.crossovered.analytic:0
msgid "%"
msgstr "%"
#. module: account_analytic_plans
#: report:account.analytic.account.crossovered.analytic:0
msgid "100.00%"
msgstr "100.00%"
#. module: account_analytic_plans
#: field:account.analytic.default,analytics_id:0
#: view:account.analytic.plan.instance:0
#: field:account.analytic.plan.instance,name:0
#: field:account.bank.statement.line,analytics_id:0
#: field:account.invoice.line,analytics_id:0
#: field:account.move.line,analytics_id:0
#: model:ir.model,name:account_analytic_plans.model_account_analytic_default
msgid "Analytic Distribution"
msgstr "Analītiskais Sadalījums"
#. module: account_analytic_plans
#: model:ir.model,name:account_analytic_plans.model_account_journal
msgid "Journal"
msgstr "Žurnāls"
#. module: account_analytic_plans
#: model:ir.model,name:account_analytic_plans.model_analytic_plan_create_model
msgid "analytic.plan.create.model"
msgstr "analytic.plan.create.model"
#. module: account_analytic_plans
#: field:account.crossovered.analytic,date2:0
msgid "End Date"
msgstr "Beigu Datums"
#. module: account_analytic_plans
#: model:ir.actions.act_window,name:account_analytic_plans.account_analytic_instance_model_open
msgid "Distribution Models"
msgstr "Sadalījuma Modeļi"
#. module: account_analytic_plans
#: field:account.analytic.plan.line,sequence:0
msgid "Sequence"
msgstr "Secība"
#. module: account_analytic_plans
#: sql_constraint:account.journal:0
msgid "The name of the journal must be unique per company !"
msgstr "Žurnāla nosaukumam katrai kompānijai ir jābūt unikālam!"
#. module: account_analytic_plans
#: code:addons/account_analytic_plans/account_analytic_plans.py:214
#, python-format
msgid "Value Error"
msgstr "Vērtības Kļūda"
#. module: account_analytic_plans
#: constraint:account.move.line:0
msgid "You can not create move line on view account."
msgstr "Jūs nevarat izveidor grāmatojumu pārskata kontam."

View File

@ -0,0 +1,124 @@
# English (United Kingdom) translation for openobject-addons
# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2011.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2011-01-11 11:14+0000\n"
"PO-Revision-Date: 2011-08-25 11:47+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: English (United Kingdom) <en_GB@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: 2011-08-26 04:33+0000\n"
"X-Generator: Launchpad (build 13779)\n"
#. module: account_anglo_saxon
#: view:product.category:0
msgid " Accounting Property"
msgstr " Accounting Property"
#. module: account_anglo_saxon
#: sql_constraint:purchase.order:0
msgid "Order Reference must be unique !"
msgstr "Order Reference must be unique !"
#. module: account_anglo_saxon
#: constraint:product.category:0
msgid "Error ! You can not create recursive categories."
msgstr "Error ! You can not create recursive categories."
#. module: account_anglo_saxon
#: constraint:product.template:0
msgid ""
"Error: The default UOM and the purchase UOM must be in the same category."
msgstr ""
"Error: The default UOM and the purchase UOM must be in the same category."
#. module: account_anglo_saxon
#: model:ir.model,name:account_anglo_saxon.model_account_invoice_line
msgid "Invoice Line"
msgstr "Invoice Line"
#. module: account_anglo_saxon
#: model:ir.model,name:account_anglo_saxon.model_purchase_order
msgid "Purchase Order"
msgstr "Purchase Order"
#. module: account_anglo_saxon
#: model:ir.model,name:account_anglo_saxon.model_product_template
msgid "Product Template"
msgstr "Product Template"
#. module: account_anglo_saxon
#: model:ir.model,name:account_anglo_saxon.model_product_category
msgid "Product Category"
msgstr "Product Category"
#. module: account_anglo_saxon
#: model:ir.module.module,shortdesc:account_anglo_saxon.module_meta_information
msgid "Stock Accounting for Anglo Saxon countries"
msgstr "Stock Accounting for Anglo Saxon countries"
#. module: account_anglo_saxon
#: field:product.category,property_account_creditor_price_difference_categ:0
#: field:product.template,property_account_creditor_price_difference:0
msgid "Price Difference Account"
msgstr "Price Difference Account"
#. module: account_anglo_saxon
#: model:ir.model,name:account_anglo_saxon.model_account_invoice
msgid "Invoice"
msgstr "Invoice"
#. module: account_anglo_saxon
#: model:ir.model,name:account_anglo_saxon.model_stock_picking
msgid "Picking List"
msgstr "Picking List"
#. module: account_anglo_saxon
#: model:ir.module.module,description:account_anglo_saxon.module_meta_information
msgid ""
"This module will support the Anglo-Saxons accounting methodology by\n"
" changing the accounting logic with stock transactions. The difference "
"between the Anglo-Saxon accounting countries\n"
" and the Rhine or also called Continental accounting countries is the "
"moment of taking the Cost of Goods Sold versus Cost of Sales.\n"
" Anglo-Saxons accounting does take the cost when sales invoice is "
"created, Continental accounting will take the cost at the moment the goods "
"are shipped.\n"
" This module will add this functionality by using a interim account, to "
"store the value of shipped goods and will contra book this interim account\n"
" when the invoice is created to transfer this amount to the debtor or "
"creditor account.\n"
" Secondly, price differences between actual purchase price and fixed "
"product standard price are booked on a separate account"
msgstr ""
"This module will support the Anglo-Saxons accounting methodology by\n"
" changing the accounting logic with stock transactions. The difference "
"between the Anglo-Saxon accounting countries\n"
" and the Rhine or also called Continental accounting countries is the "
"moment of taking the Cost of Goods Sold versus Cost of Sales.\n"
" Anglo-Saxons accounting takes the cost when sales invoice is created, "
"Continental accounting will take the cost at the moment the goods are "
"shipped.\n"
" This module adds this functionality by using a interim account, to store "
"the value of shipped goods and will contra book this interim account\n"
" When the invoice is created to transfer this amount to the debtor or "
"creditor account.\n"
" Secondly, price differences between actual purchase price and fixed "
"product standard price are booked on a separate account"
#. module: account_anglo_saxon
#: help:product.category,property_account_creditor_price_difference_categ:0
#: help:product.template,property_account_creditor_price_difference:0
msgid ""
"This account will be used to value price difference between purchase price "
"and cost price."
msgstr ""
"This account will be used to value price difference between purchase price "
"and cost price."

View File

@ -0,0 +1,124 @@
# Latvian translation for openobject-addons
# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2011.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2011-01-11 11:14+0000\n"
"PO-Revision-Date: 2011-09-01 19:23+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Latvian <lv@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: 2011-09-02 04:41+0000\n"
"X-Generator: Launchpad (build 13830)\n"
#. module: account_anglo_saxon
#: view:product.category:0
msgid " Accounting Property"
msgstr " Grāmatvedības Veids"
#. module: account_anglo_saxon
#: sql_constraint:purchase.order:0
msgid "Order Reference must be unique !"
msgstr "Pasūtījuma referencei ir jābūt unikālai!"
#. module: account_anglo_saxon
#: constraint:product.category:0
msgid "Error ! You can not create recursive categories."
msgstr "Kļūda! Jūs nevarat veidot rekursīvas kategorijas."
#. module: account_anglo_saxon
#: constraint:product.template:0
msgid ""
"Error: The default UOM and the purchase UOM must be in the same category."
msgstr ""
"Kļūda: Noklusētajām vienībām ir jāsakrīt ar iepirktajām vienībām (UOM)."
#. module: account_anglo_saxon
#: model:ir.model,name:account_anglo_saxon.model_account_invoice_line
msgid "Invoice Line"
msgstr "Rēķina Rinda"
#. module: account_anglo_saxon
#: model:ir.model,name:account_anglo_saxon.model_purchase_order
msgid "Purchase Order"
msgstr "Iepirkuma Rīkojums"
#. module: account_anglo_saxon
#: model:ir.model,name:account_anglo_saxon.model_product_template
msgid "Product Template"
msgstr "Produkta Veidne"
#. module: account_anglo_saxon
#: model:ir.model,name:account_anglo_saxon.model_product_category
msgid "Product Category"
msgstr "Produkta Kategorija"
#. module: account_anglo_saxon
#: model:ir.module.module,shortdesc:account_anglo_saxon.module_meta_information
msgid "Stock Accounting for Anglo Saxon countries"
msgstr "Krājumu Grāmatvedība Anglo Sakšu valstīm"
#. module: account_anglo_saxon
#: field:product.category,property_account_creditor_price_difference_categ:0
#: field:product.template,property_account_creditor_price_difference:0
msgid "Price Difference Account"
msgstr "Ceny Starpības Konts"
#. module: account_anglo_saxon
#: model:ir.model,name:account_anglo_saxon.model_account_invoice
msgid "Invoice"
msgstr "Rēķins"
#. module: account_anglo_saxon
#: model:ir.model,name:account_anglo_saxon.model_stock_picking
msgid "Picking List"
msgstr "Izvades Saraksts"
#. module: account_anglo_saxon
#: model:ir.module.module,description:account_anglo_saxon.module_meta_information
msgid ""
"This module will support the Anglo-Saxons accounting methodology by\n"
" changing the accounting logic with stock transactions. The difference "
"between the Anglo-Saxon accounting countries\n"
" and the Rhine or also called Continental accounting countries is the "
"moment of taking the Cost of Goods Sold versus Cost of Sales.\n"
" Anglo-Saxons accounting does take the cost when sales invoice is "
"created, Continental accounting will take the cost at the moment the goods "
"are shipped.\n"
" This module will add this functionality by using a interim account, to "
"store the value of shipped goods and will contra book this interim account\n"
" when the invoice is created to transfer this amount to the debtor or "
"creditor account.\n"
" Secondly, price differences between actual purchase price and fixed "
"product standard price are booked on a separate account"
msgstr ""
"Šis modulis atbalstīs Anglo-Sakšu grāmatvedības metodoloģiju\n"
" mainot uzskaites loģiku pie krājumu transakcijām. Starpība starp Anglo-"
"Sakšu grāmatvedības zemēm\n"
" un Kontinentālās grāmatvedības zemēm ir mirklī, kad Pārdoto Preču "
"Izmaksas tiek attiecinātas pret Pārdošanas Izmaksām.\n"
" Anglo-Sakšu grāmatvedība uzskaita izmaksas uz pārdošanas rēķina "
"izveidošanas brīdi, Kontinentālā grāmatvedība izmaksas attiecinās preču "
"nosūtīšanas brīdī.\n"
" Šis modulis pievienos šo funkcionalitāti ar starpkonta palīdzību "
"nosūtīto preču vērtības uzglabāšanai un reversi iegrāmatos šo kontu\n"
" kad tiks izveidots rēķins, lai šo summu pārvestu uz debitora vai "
"kreditora kontu.\n"
" Otrkārt, cenas starpība starp patieso iegādes cenu un fiksēto preces "
"pārdošanas cenu tiek iegrāmatota atsevišķā kontā."
#. module: account_anglo_saxon
#: help:product.category,property_account_creditor_price_difference_categ:0
#: help:product.template,property_account_creditor_price_difference:0
msgid ""
"This account will be used to value price difference between purchase price "
"and cost price."
msgstr ""
"Šis konts tiks izmantots cenu starpības uzskaitei starp iepirkuma cenu un "
"izmaksu cenu."

View File

@ -14,7 +14,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2011-08-20 04:53+0000\n"
"X-Launchpad-Export-Date: 2011-08-23 05:05+0000\n"
"X-Generator: Launchpad (build 13697)\n"
#. module: account_asset

View File

@ -8,14 +8,14 @@ msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2009-11-24 12:54+0000\n"
"PO-Revision-Date: 2011-07-12 12:04+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"PO-Revision-Date: 2011-08-29 20:43+0000\n"
"Last-Translator: lholivier <olivier.lenoir@free.fr>\n"
"Language-Team: French <fr@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: 2011-07-13 04:36+0000\n"
"X-Generator: Launchpad (build 13168)\n"
"X-Launchpad-Export-Date: 2011-08-30 04:49+0000\n"
"X-Generator: Launchpad (build 13794)\n"
#. module: account_asset
#: model:ir.actions.act_window,name:account_asset.action_account_asset_asset_list_normal
@ -27,7 +27,7 @@ msgstr ""
#: field:account.asset.property,method_end:0
#: field:account.asset.property.history,method_end:0
msgid "Ending date"
msgstr ""
msgstr "Date de Fin"
#. module: account_asset
#: view:account.asset.asset:0
@ -50,17 +50,17 @@ msgstr ""
#. module: account_asset
#: 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: account_asset
#: selection:account.asset.property,method:0
msgid "Linear"
msgstr ""
msgstr "Linéaire"
#. module: account_asset
#: view:account.asset.asset:0
msgid "Change duration"
msgstr ""
msgstr "Changer la durée"
#. module: account_asset
#: field:account.asset.asset,child_ids:0
@ -75,19 +75,19 @@ msgstr ""
#. module: account_asset
#: wizard_field:account.asset.modify,init,name:0
msgid "Reason"
msgstr ""
msgstr "Motif"
#. module: account_asset
#: view:account.asset.asset:0
#: field:account.asset.asset,entry_ids:0
#: wizard_field:account.asset.compute,asset_compute,move_ids:0
msgid "Entries"
msgstr ""
msgstr "Ecritures"
#. module: account_asset
#: wizard_view:account.asset.compute,asset_compute:0
msgid "Generated entries"
msgstr ""
msgstr "Écritures générées"
#. module: account_asset
#: wizard_field:account.asset.modify,init,method_delay:0
@ -113,7 +113,7 @@ msgstr ""
#. module: account_asset
#: selection:account.asset.property,method:0
msgid "Progressive"
msgstr ""
msgstr "Progressif"
#. module: account_asset
#: model:ir.actions.act_window,name:account_asset.action_account_asset_asset_list_draft
@ -126,7 +126,7 @@ msgstr ""
#: wizard_field:account.asset.modify,init,note:0
#: view:account.asset.property.history:0
msgid "Notes"
msgstr ""
msgstr "Commentaires"
#. module: account_asset
#: view:account.asset.asset:0
@ -136,7 +136,7 @@ msgstr ""
#. module: account_asset
#: view:account.asset.asset:0
msgid "Depreciation entries"
msgstr ""
msgstr "Écritures d'amortissement"
#. module: account_asset
#: view:account.asset.asset:0
@ -151,7 +151,7 @@ msgstr ""
#. module: account_asset
#: field:account.asset.asset,partner_id:0
msgid "Partner"
msgstr ""
msgstr "Partenaire"
#. module: account_asset
#: wizard_field:account.asset.modify,init,method_period:0
@ -163,12 +163,12 @@ msgstr ""
#. module: account_asset
#: view:account.asset.asset:0
msgid "Depreciation duration"
msgstr ""
msgstr "Durée de l'amortissement"
#. module: account_asset
#: field:account.asset.property,account_analytic_id:0
msgid "Analytic account"
msgstr ""
msgstr "Compte Analytique"
#. module: account_asset
#: field:account.asset.property,state:0
@ -178,17 +178,17 @@ msgstr ""
#. module: account_asset
#: view:account.asset.asset:0
msgid "Depreciation methods"
msgstr ""
msgstr "Méthodes d'amortissement"
#. module: account_asset
#: view:account.asset.asset:0
msgid "Other information"
msgstr ""
msgstr "Autre information"
#. module: account_asset
#: field:account.asset.board,value_asset_cumul:0
msgid "Cumul. value"
msgstr ""
msgstr "Valeur cumulée"
#. module: account_asset
#: view:account.asset.property:0
@ -203,7 +203,7 @@ msgstr ""
#. module: account_asset
#: model:ir.model,name:account_asset.model_account_asset_property
msgid "Asset property"
msgstr ""
msgstr "Propriété de l'immobilisation"
#. module: account_asset
#: wizard_view:account.asset.compute,asset_compute:0
@ -212,30 +212,30 @@ msgstr ""
#: model:ir.actions.wizard,name:account_asset.wizard_asset_compute
#: model:ir.ui.menu,name:account_asset.menu_wizard_asset_compute
msgid "Compute assets"
msgstr ""
msgstr "Calculer les immobilisations"
#. module: account_asset
#: wizard_view:account.asset.modify,init:0
#: wizard_button:account.asset.modify,init,asset_modify:0
#: model:ir.actions.wizard,name:account_asset.wizard_asset_modify
msgid "Modify asset"
msgstr ""
msgstr "Modifier l'immobilisation"
#. module: account_asset
#: view:account.asset.asset:0
msgid "Confirm asset"
msgstr ""
msgstr "Confirmer l'immobilisation"
#. module: account_asset
#: view:account.asset.property.history:0
#: model:ir.model,name:account_asset.model_account_asset_property_history
msgid "Asset history"
msgstr ""
msgstr "Historique de l'immobilisation"
#. module: account_asset
#: field:account.asset.property,date:0
msgid "Date created"
msgstr ""
msgstr "Date de création"
#. module: account_asset
#: model:ir.module.module,description:account_asset.module_meta_information
@ -274,43 +274,43 @@ msgstr ""
#: field:account.asset.category,note:0
#: field:account.asset.property.history,note:0
msgid "Note"
msgstr ""
msgstr "Remarque"
#. module: account_asset
#: selection:account.asset.asset,state:0
#: selection:account.asset.property,state:0
msgid "Draft"
msgstr ""
msgstr "Brouilon"
#. module: account_asset
#: field:account.asset.property,type:0
msgid "Depr. method type"
msgstr ""
msgstr "Type de méthode d'immobilisation"
#. module: account_asset
#: field:account.asset.property,account_asset_id:0
msgid "Asset account"
msgstr ""
msgstr "Compte d'immobilisation"
#. module: account_asset
#: field:account.asset.property.history,asset_property_id:0
msgid "Method"
msgstr ""
msgstr "Méthode"
#. module: account_asset
#: selection:account.asset.asset,state:0
msgid "Normal"
msgstr ""
msgstr "Standard"
#. module: account_asset
#: field:account.asset.property,method_progress_factor:0
msgid "Progressif factor"
msgstr ""
msgstr "Facteur progressif"
#. module: account_asset
#: field:account.asset.asset,localisation:0
msgid "Localisation"
msgstr ""
msgstr "Emplacement"
#. module: account_asset
#: field:account.asset.property,method:0
@ -330,7 +330,7 @@ msgstr ""
#. module: account_asset
#: field:account.asset.property.history,user_id:0
msgid "User"
msgstr ""
msgstr "Utilisateur"
#. module: account_asset
#: field:account.asset.asset,property_ids:0
@ -346,7 +346,7 @@ msgstr ""
#. module: account_asset
#: field:account.asset.board,value_net:0
msgid "Net value"
msgstr ""
msgstr "Valeur nette"
#. module: account_asset
#: wizard_view:account.asset.close,init:0
@ -357,12 +357,12 @@ msgstr ""
#. module: account_asset
#: field:account.asset.property,history_ids:0
msgid "History"
msgstr ""
msgstr "Hstorique"
#. module: account_asset
#: field:account.asset.property,account_actif_id:0
msgid "Depreciation account"
msgstr ""
msgstr "Comte d'amortissement"
#. module: account_asset
#: field:account.asset.asset,period_id:0
@ -381,19 +381,19 @@ msgstr ""
#: wizard_button:account.asset.compute,init,end:0
#: wizard_button:account.asset.modify,init,end:0
msgid "Cancel"
msgstr ""
msgstr "Annuler"
#. module: account_asset
#: selection:account.asset.asset,state:0
#: wizard_button:account.asset.compute,asset_compute,end:0
#: selection:account.asset.property,state:0
msgid "Close"
msgstr ""
msgstr "Fermer"
#. module: account_asset
#: selection:account.asset.property,state:0
msgid "Open"
msgstr ""
msgstr "Ouvrir"
#. module: account_asset
#: constraint:ir.model:0
@ -416,7 +416,7 @@ msgstr ""
#. module: account_asset
#: field:account.asset.asset,state:0
msgid "Global state"
msgstr ""
msgstr "État global"
#. module: account_asset
#: selection:account.asset.property,method_time:0
@ -431,7 +431,7 @@ msgstr ""
#. module: account_asset
#: field:account.asset.property,journal_analytic_id:0
msgid "Analytic journal"
msgstr ""
msgstr "Journal analytique"
#. module: account_asset
#: field:account.asset.property,name:0
@ -441,7 +441,7 @@ msgstr ""
#. module: account_asset
#: field:account.asset.property,journal_id:0
msgid "Journal"
msgstr ""
msgstr "Journal"
#. module: account_asset
#: field:account.asset.property.history,name:0
@ -464,12 +464,12 @@ msgstr ""
#: field:account.asset.category,name:0
#: model:ir.model,name:account_asset.model_account_asset_category
msgid "Asset category"
msgstr ""
msgstr "Catégorie d'immobilisation"
#. module: account_asset
#: view:account.asset.asset:0
msgid "Depreciation"
msgstr ""
msgstr "Amortissement"
#. module: account_asset
#: field:account.asset.asset,code:0

View File

@ -0,0 +1,36 @@
# English (United Kingdom) translation for openobject-addons
# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2011.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2011-01-11 11:14+0000\n"
"PO-Revision-Date: 2011-08-25 11:46+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: English (United Kingdom) <en_GB@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: 2011-08-26 04:33+0000\n"
"X-Generator: Launchpad (build 13779)\n"
#. module: account_cancel
#: model:ir.module.module,description:account_cancel.module_meta_information
msgid ""
"\n"
" Module adds 'Allow cancelling entries' field on form view of account "
"journal. If set to true it allows user to cancel entries & invoices.\n"
" "
msgstr ""
"\n"
" Module adds 'Allow cancelling entries' field on form view of account "
"journal. If set to true it allows user to cancel entries & invoices.\n"
" "
#. module: account_cancel
#: model:ir.module.module,shortdesc:account_cancel.module_meta_information
msgid "Account Cancel"
msgstr "Account Cancel"

View File

@ -0,0 +1,37 @@
# Latvian translation for openobject-addons
# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2011.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2011-01-11 11:14+0000\n"
"PO-Revision-Date: 2011-08-30 20:56+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Latvian <lv@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: 2011-08-31 04:35+0000\n"
"X-Generator: Launchpad (build 13815)\n"
#. module: account_cancel
#: model:ir.module.module,description:account_cancel.module_meta_information
msgid ""
"\n"
" Module adds 'Allow cancelling entries' field on form view of account "
"journal. If set to true it allows user to cancel entries & invoices.\n"
" "
msgstr ""
"\n"
" Modulis pievieno 'Atļaut anulējošus uzskaites žurnāla ierakstus' lauku "
"kontu plāna formas skatā. Ja tā ir aktivēta, tā ļauj lietotājam atcelt "
"ierakstus un rēķinus.\n"
" "
#. module: account_cancel
#: model:ir.module.module,shortdesc:account_cancel.module_meta_information
msgid "Account Cancel"
msgstr "Atcelt Kontu"

View File

@ -0,0 +1,28 @@
# English (United Kingdom) translation for openobject-addons
# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2011.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2011-01-11 11:14+0000\n"
"PO-Revision-Date: 2011-08-25 11:47+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: English (United Kingdom) <en_GB@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: 2011-08-26 04:33+0000\n"
"X-Generator: Launchpad (build 13779)\n"
#. module: account_chart
#: model:ir.module.module,description:account_chart.module_meta_information
msgid "Remove minimal account chart"
msgstr "Remove minimal account chart"
#. module: account_chart
#: model:ir.module.module,shortdesc:account_chart.module_meta_information
msgid "Charts of Accounts"
msgstr "Charts of Accounts"

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2011-04-29 05:42+0000\n"
"X-Generator: Launchpad (build 12758)\n"
"X-Launchpad-Export-Date: 2011-08-31 04:34+0000\n"
"X-Generator: Launchpad (build 13815)\n"
#. module: account_coda
#: help:account.coda,journal_id:0

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2011-04-29 05:42+0000\n"
"X-Generator: Launchpad (build 12758)\n"
"X-Launchpad-Export-Date: 2011-08-31 04:34+0000\n"
"X-Generator: Launchpad (build 13815)\n"
#. module: account_coda
#: help:account.coda,journal_id:0

View File

@ -14,66 +14,66 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2011-04-29 05:42+0000\n"
"X-Generator: Launchpad (build 12758)\n"
"X-Launchpad-Export-Date: 2011-08-31 04:34+0000\n"
"X-Generator: Launchpad (build 13815)\n"
#. module: account_coda
#: help:account.coda,journal_id:0
#: field:account.coda.import,journal_id:0
msgid "Bank Journal"
msgstr ""
msgstr "Diari bancari"
#. module: account_coda
#: view:account.coda:0
#: field:account.coda.import,note:0
msgid "Log"
msgstr ""
msgstr "Registre"
#. module: account_coda
#: model:ir.model,name:account_coda.model_account_coda_import
msgid "Account Coda Import"
msgstr ""
msgstr "Importació comptabilitat Coda"
#. module: account_coda
#: field:account.coda,name:0
msgid "Coda file"
msgstr ""
msgstr "Fitxer Coda"
#. module: account_coda
#: view:account.coda:0
msgid "Group By..."
msgstr ""
msgstr "Agrupa per..."
#. module: account_coda
#: field:account.coda.import,awaiting_account:0
msgid "Default Account for Unrecognized Movement"
msgstr ""
msgstr "Compte per defecte per a moviments no reconeguts"
#. module: account_coda
#: help:account.coda,date:0
msgid "Import Date"
msgstr ""
msgstr "Data de l'importació"
#. module: account_coda
#: field:account.coda,note:0
msgid "Import log"
msgstr ""
msgstr "Registre de la importació"
#. module: account_coda
#: view:account.coda.import:0
msgid "Import"
msgstr ""
msgstr "Importa"
#. module: account_coda
#: view:account.coda:0
msgid "Coda import"
msgstr ""
msgstr "Importa Coda"
#. module: account_coda
#: code:addons/account_coda/account_coda.py:51
#, python-format
msgid "Coda file not found for bank statement !!"
msgstr ""
msgstr "No s'ha trobat el fitxer Coda per a l'extracte bancari!"
#. module: account_coda
#: help:account.coda.import,awaiting_account:0
@ -81,12 +81,14 @@ msgid ""
"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"
msgstr ""
"Indiqueu aquí el compte per defecte que s'utilitzarà, si es troba l'empresa "
"però no té el compte bancari, o si està domiciliat."
#. module: account_coda
#: view:account.coda:0
#: field:account.coda,company_id:0
msgid "Company"
msgstr ""
msgstr "Companyia"
#. module: account_coda
#: help:account.coda.import,def_payable:0
@ -94,70 +96,72 @@ msgid ""
"Set here the payable account that will be used, by default, if the partner "
"is not found"
msgstr ""
"Indiqueu aquí el compte a pagar que s'utilitzarà per defecte, si no es troba "
"l'empresa."
#. module: account_coda
#: view:account.coda:0
msgid "Search Coda"
msgstr ""
msgstr "Cerca Coda"
#. module: account_coda
#: view:account.coda:0
#: field:account.coda,user_id:0
msgid "User"
msgstr ""
msgstr "Usuari"
#. module: account_coda
#: view:account.coda:0
#: field:account.coda,date:0
msgid "Date"
msgstr ""
msgstr "Data"
#. module: account_coda
#: model:ir.ui.menu,name:account_coda.menu_account_coda_statement
msgid "Coda Import Logs"
msgstr ""
msgstr "Històric de la importació Coda"
#. module: account_coda
#: model:ir.model,name:account_coda.model_account_coda
msgid "coda for an Account"
msgstr ""
msgstr "Coda per a un compte"
#. module: account_coda
#: field:account.coda.import,def_payable:0
msgid "Default Payable Account"
msgstr ""
msgstr "Compte a pagar per defecte"
#. module: account_coda
#: help:account.coda,name:0
msgid "Store the detail of bank statements"
msgstr ""
msgstr "Desa el detall d'extractes bancaris."
#. module: account_coda
#: view:account.coda.import:0
msgid "Cancel"
msgstr ""
msgstr "Cancel·la"
#. module: account_coda
#: view:account.coda.import:0
msgid "Open Statements"
msgstr ""
msgstr "Obre extractes"
#. module: account_coda
#: code:addons/account_coda/wizard/account_coda_import.py:167
#, python-format
msgid "The bank account %s is not defined for the partner %s.\n"
msgstr ""
msgstr "El compte bancari %s no està definit per a l'empresa %s.\n"
#. module: account_coda
#: model:ir.ui.menu,name:account_coda.menu_account_coda_import
msgid "Import Coda Statements"
msgstr ""
msgstr "Importa els extractes Coda"
#. module: account_coda
#: view:account.coda.import:0
#: model:ir.actions.act_window,name:account_coda.action_account_coda_import
msgid "Import Coda Statement"
msgstr ""
msgstr "Importa l'extracte Coda"
#. module: account_coda
#: model:ir.module.module,description:account_coda.module_meta_information
@ -167,26 +171,30 @@ msgid ""
" bank statements from coda files.\n"
" "
msgstr ""
"\n"
" El mòdul proporciona la funcionalitat per importar\n"
" extractes bancaris des de fitxers coda.\n"
" "
#. module: account_coda
#: view:account.coda:0
msgid "Statements"
msgstr ""
msgstr "Extractes"
#. module: account_coda
#: field:account.bank.statement,coda_id:0
msgid "Coda"
msgstr ""
msgstr "Coda"
#. module: account_coda
#: view:account.coda.import:0
msgid "Results :"
msgstr ""
msgstr "Resultats :"
#. module: account_coda
#: view:account.coda.import:0
msgid "Result of Imported Coda Statements"
msgstr ""
msgstr "Resultat dels extractes Coda importats"
#. module: account_coda
#: help:account.coda.import,def_receivable:0
@ -194,66 +202,68 @@ msgid ""
"Set here the receivable account that will be used, by default, if the "
"partner is not found"
msgstr ""
"Indiqueu aquí el compte a cobrar que s'utilitzarà per defecte, si no es "
"troba l'empresa."
#. module: account_coda
#: field:account.coda.import,coda:0
#: model:ir.actions.act_window,name:account_coda.act_account_payment_account_bank_statement
msgid "Coda File"
msgstr ""
msgstr "Fitxer Coda"
#. module: account_coda
#: model:ir.model,name:account_coda.model_account_bank_statement
msgid "Bank Statement"
msgstr ""
msgstr "Extracte bancari"
#. module: account_coda
#: model:ir.actions.act_window,name:account_coda.action_account_coda
msgid "Coda Logs"
msgstr ""
msgstr "Històric Coda"
#. module: account_coda
#: code:addons/account_coda/wizard/account_coda_import.py:311
#, python-format
msgid "Result"
msgstr ""
msgstr "Resultat"
#. module: account_coda
#: view:account.coda.import:0
msgid "Click on 'New' to select your file :"
msgstr ""
msgstr "Feu clic en 'Nou' per seleccionar el fitxer :"
#. module: account_coda
#: field:account.coda.import,def_receivable:0
msgid "Default Receivable Account"
msgstr ""
msgstr "Compte a cobrar per defecte"
#. module: account_coda
#: view:account.coda.import:0
msgid "Close"
msgstr ""
msgstr "Tanca"
#. module: account_coda
#: field:account.coda,statement_ids:0
msgid "Generated Bank Statements"
msgstr ""
msgstr "Extractes bancaris generats"
#. module: account_coda
#: model:ir.module.module,shortdesc:account_coda.module_meta_information
msgid "Account CODA - import bank statements from coda file"
msgstr ""
msgstr "Comptabilitat CODA - importa extractes bancaris des de fitxer Coda"
#. module: account_coda
#: view:account.coda.import:0
msgid "Configure Your Journal and Account :"
msgstr ""
msgstr "Configureu el diari i compte :"
#. module: account_coda
#: view:account.coda:0
msgid "Coda Import"
msgstr ""
msgstr "Importació Coda"
#. module: account_coda
#: view:account.coda:0
#: field:account.coda,journal_id:0
msgid "Journal"
msgstr ""
msgstr "Diari"

View File

@ -7,15 +7,15 @@ msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2011-01-11 11:14+0000\n"
"PO-Revision-Date: 2011-01-13 17:16+0000\n"
"PO-Revision-Date: 2011-08-30 17:18+0000\n"
"Last-Translator: Thorsten Vocks (OpenBig.org) <thorsten.vocks@big-"
"consulting.net>\n"
"Language-Team: German <de@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: 2011-04-29 05:42+0000\n"
"X-Generator: Launchpad (build 12758)\n"
"X-Launchpad-Export-Date: 2011-08-31 04:35+0000\n"
"X-Generator: Launchpad (build 13815)\n"
#. module: account_coda
#: help:account.coda,journal_id:0
@ -319,23 +319,3 @@ msgstr "Journal"
#~ msgid "Select your bank journal :"
#~ msgstr "Wähle Bank Journal :"
#~ msgid "Error ! You can not create recursive Menu."
#~ msgstr "Fehler ! Sie können kein rekursives Menü erstellen."
#~ msgid "Rules are not supported for osv_memory objects !"
#~ msgstr "Regeln werden nur unterstützt für osv_memory Objekte !"
#~ msgid "The certificate ID of the module must be unique !"
#~ msgstr "Die Zertifikat ID des Moduls sollte eindeutig sein !"
#~ msgid "Rule must have at least one checked access right !"
#~ msgstr ""
#~ "Die Berechtigung für diese Regel sollte mindestens bei einem Benutzer "
#~ "vorhanden sein !"
#~ msgid "The name of the module must be unique !"
#~ msgstr "Die Modulbezeichnung sollte eindeutig sein !"
#~ msgid "Size of the field can never be less than 1 !"
#~ msgstr "Die Größe des Feldes sollte niemals kleiner als 1 sein !"

View File

@ -8,14 +8,14 @@ msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2011-01-11 11:14+0000\n"
"PO-Revision-Date: 2010-11-14 08:11+0000\n"
"PO-Revision-Date: 2011-08-30 17:18+0000\n"
"Last-Translator: Dimitris Andavoglou <dimitrisand@gmail.com>\n"
"Language-Team: Greek <el@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: 2011-04-29 05:42+0000\n"
"X-Generator: Launchpad (build 12758)\n"
"X-Launchpad-Export-Date: 2011-08-31 04:35+0000\n"
"X-Generator: Launchpad (build 13815)\n"
#. module: account_coda
#: help:account.coda,journal_id:0
@ -311,6 +311,3 @@ msgstr "Ημερολόγιο"
#~ msgid "Select your bank journal :"
#~ msgstr "Επιλέξτε το ημερολόγιο τράπεζά σας :"
#~ msgid "Error ! You can not create recursive Menu."
#~ msgstr "Λάθος ! Δεν μπορείς να δημιουργήσεις κενό Μενού"

View File

@ -8,15 +8,15 @@ msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2011-01-11 11:14+0000\n"
"PO-Revision-Date: 2010-12-26 07:57+0000\n"
"PO-Revision-Date: 2011-08-30 17:18+0000\n"
"Last-Translator: Jordi Esteve (www.zikzakmedia.com) "
"<jesteve@zikzakmedia.com>\n"
"Language-Team: Spanish <es@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: 2011-04-29 05:42+0000\n"
"X-Generator: Launchpad (build 12758)\n"
"X-Launchpad-Export-Date: 2011-08-31 04:35+0000\n"
"X-Generator: Launchpad (build 13815)\n"
#. module: account_coda
#: help:account.coda,journal_id:0
@ -294,21 +294,3 @@ msgstr "Diario"
#~ msgid "Select your bank journal :"
#~ msgstr "Seleccione su diario bancario :"
#~ msgid "Error ! You can not create recursive Menu."
#~ msgstr "¡Error! No puede crear menús recursivos."
#~ msgid "Rules are not supported for osv_memory objects !"
#~ msgstr "¡Las reglas no son soportadas en objetos osv_memory!"
#~ msgid "The certificate ID of the module must be unique !"
#~ msgstr "¡El ID del certificado del módulo debe ser único!"
#~ msgid "Rule must have at least one checked access right !"
#~ msgstr "¡La regla debe tener por lo menos un derecho de acceso marcado!"
#~ msgid "The name of the module must be unique !"
#~ msgstr "¡El nombre del módulo debe ser único!"
#~ msgid "Size of the field can never be less than 1 !"
#~ msgstr "¡El tamaño del campo nunca puede ser menor que 1!"

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2011-04-29 05:42+0000\n"
"X-Generator: Launchpad (build 12758)\n"
"X-Launchpad-Export-Date: 2011-08-31 04:35+0000\n"
"X-Generator: Launchpad (build 13815)\n"
#. module: account_coda
#: help:account.coda,journal_id:0
@ -32,22 +32,22 @@ msgstr "Registro"
#. module: account_coda
#: model:ir.model,name:account_coda.model_account_coda_import
msgid "Account Coda Import"
msgstr ""
msgstr "Contabilidad Importación Coda"
#. module: account_coda
#: field:account.coda,name:0
msgid "Coda file"
msgstr ""
msgstr "Fichero Coda"
#. module: account_coda
#: view:account.coda:0
msgid "Group By..."
msgstr ""
msgstr "Agrupar por..."
#. module: account_coda
#: field:account.coda.import,awaiting_account:0
msgid "Default Account for Unrecognized Movement"
msgstr ""
msgstr "Cuenta por defecto para movimientos no reconocidos"
#. module: account_coda
#: help:account.coda,date:0
@ -62,18 +62,18 @@ msgstr "Registro de importación"
#. module: account_coda
#: view:account.coda.import:0
msgid "Import"
msgstr ""
msgstr "Importar"
#. module: account_coda
#: view:account.coda:0
msgid "Coda import"
msgstr ""
msgstr "Importar Coda"
#. module: account_coda
#: code:addons/account_coda/account_coda.py:51
#, python-format
msgid "Coda file not found for bank statement !!"
msgstr ""
msgstr "¡No se ha encontrado el archivo Coda para el extracto bancario!"
#. module: account_coda
#: help:account.coda.import,awaiting_account:0
@ -81,12 +81,14 @@ msgid ""
"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"
msgstr ""
"Indique aquí la cuenta por defecto que se utilizará, si se encuentra la "
"empresa pero no tiene la cuenta bancaria, o si está domiciliado."
#. module: account_coda
#: view:account.coda:0
#: field:account.coda,company_id:0
msgid "Company"
msgstr ""
msgstr "Compañía"
#. module: account_coda
#: help:account.coda.import,def_payable:0
@ -94,6 +96,8 @@ msgid ""
"Set here the payable account that will be used, by default, if the partner "
"is not found"
msgstr ""
"Indique aquí la cuenta a pagar que se utilizará por defecto, si no se "
"encuentra la empresa."
#. module: account_coda
#: view:account.coda:0

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2011-04-29 05:42+0000\n"
"X-Generator: Launchpad (build 12758)\n"
"X-Launchpad-Export-Date: 2011-08-31 04:35+0000\n"
"X-Generator: Launchpad (build 13815)\n"
#. module: account_coda
#: help:account.coda,journal_id:0

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2011-04-29 05:42+0000\n"
"X-Generator: Launchpad (build 12758)\n"
"X-Launchpad-Export-Date: 2011-08-31 04:35+0000\n"
"X-Generator: Launchpad (build 13815)\n"
#. module: account_coda
#: help:account.coda,journal_id:0

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2011-06-29 04:43+0000\n"
"X-Generator: Launchpad (build 13168)\n"
"X-Launchpad-Export-Date: 2011-08-31 04:35+0000\n"
"X-Generator: Launchpad (build 13815)\n"
#. module: account_coda
#: help:account.coda,journal_id:0
@ -81,6 +81,8 @@ msgid ""
"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"
msgstr ""
"Aseta tähän tili jota käytetään oletuksena, jos kumppani löytyy mutta "
"pankkitiliä ei ole määriteltynä"
#. module: account_coda
#: view:account.coda:0
@ -94,6 +96,7 @@ msgid ""
"Set here the payable account that will be used, by default, if the partner "
"is not found"
msgstr ""
"Aseta tähän maksutili jota käytetään oletuksena, jos kumppania ei löydy"
#. module: account_coda
#: view:account.coda:0
@ -146,7 +149,7 @@ msgstr "Avaa tiliotteet"
#: code:addons/account_coda/wizard/account_coda_import.py:167
#, python-format
msgid "The bank account %s is not defined for the partner %s.\n"
msgstr ""
msgstr "Pankkitiliä %s ei ole määritelty kumppanille %s.\n"
#. module: account_coda
#: model:ir.ui.menu,name:account_coda.menu_account_coda_import
@ -242,20 +245,20 @@ msgstr "Luodut tiliotteet"
#. module: account_coda
#: model:ir.module.module,shortdesc:account_coda.module_meta_information
msgid "Account CODA - import bank statements from coda file"
msgstr ""
msgstr "CODA tili - tuo pankkitiliotteet coda tiedostosta"
#. module: account_coda
#: view:account.coda.import:0
msgid "Configure Your Journal and Account :"
msgstr ""
msgstr "Konfiguroi päiväkirja ja tili :"
#. module: account_coda
#: view:account.coda:0
msgid "Coda Import"
msgstr ""
msgstr "Coda tuonti"
#. module: account_coda
#: view:account.coda:0
#: field:account.coda,journal_id:0
msgid "Journal"
msgstr ""
msgstr "Päiväkirja"

View File

@ -9,13 +9,13 @@ msgstr ""
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2011-01-11 11:14+0000\n"
"PO-Revision-Date: 2010-12-31 10:33+0000\n"
"Last-Translator: lolivier <olivier.lenoir@free.fr>\n"
"Last-Translator: lholivier <olivier.lenoir@free.fr>\n"
"Language-Team: French <fr@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: 2011-04-29 05:42+0000\n"
"X-Generator: Launchpad (build 12758)\n"
"X-Launchpad-Export-Date: 2011-08-31 04:35+0000\n"
"X-Generator: Launchpad (build 13815)\n"
#. module: account_coda
#: help:account.coda,journal_id:0

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2011-04-29 05:42+0000\n"
"X-Generator: Launchpad (build 12758)\n"
"X-Launchpad-Export-Date: 2011-08-31 04:35+0000\n"
"X-Generator: Launchpad (build 13815)\n"
#. module: account_coda
#: help:account.coda,journal_id:0

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2011-04-29 05:42+0000\n"
"X-Generator: Launchpad (build 12758)\n"
"X-Launchpad-Export-Date: 2011-08-31 04:35+0000\n"
"X-Generator: Launchpad (build 13815)\n"
#. module: account_coda
#: help:account.coda,journal_id:0

View File

@ -13,8 +13,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2011-04-29 05:42+0000\n"
"X-Generator: Launchpad (build 12758)\n"
"X-Launchpad-Export-Date: 2011-08-31 04:35+0000\n"
"X-Generator: Launchpad (build 13815)\n"
#. module: account_coda
#: help:account.coda,journal_id:0

View File

@ -8,14 +8,14 @@ msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2011-01-11 11:14+0000\n"
"PO-Revision-Date: 2011-01-13 08:19+0000\n"
"Last-Translator: Nicola Riolini - Micronaet <Unknown>\n"
"PO-Revision-Date: 2011-08-30 17:18+0000\n"
"Last-Translator: OpenERP Administrators <Unknown>\n"
"Language-Team: Italian <it@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: 2011-04-29 05:42+0000\n"
"X-Generator: Launchpad (build 12758)\n"
"X-Launchpad-Export-Date: 2011-08-31 04:35+0000\n"
"X-Generator: Launchpad (build 13815)\n"
#. module: account_coda
#: help:account.coda,journal_id:0
@ -303,18 +303,3 @@ msgstr ""
#~ msgid "Coda Statements"
#~ msgstr "Dichiarazione CODA"
#~ msgid "The certificate ID of the module must be unique !"
#~ msgstr "L'ID certificato del modulo deve essere unico!"
#~ msgid "Error ! You can not create recursive Menu."
#~ msgstr "Errore! Non è possibile creare un menù ricorsivo."
#~ msgid "Rules are not supported for osv_memory objects !"
#~ msgstr "Le regole non sono supportate per gli oggetti: osv_memory!"
#~ msgid "Rule must have at least one checked access right !"
#~ msgstr "La regola deve avere almeno un diritto di accesso spuntato!"
#~ msgid "The name of the module must be unique !"
#~ msgstr "Il nome del modulo deve essere unico!"

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2011-04-29 05:42+0000\n"
"X-Generator: Launchpad (build 12758)\n"
"X-Launchpad-Export-Date: 2011-08-31 04:35+0000\n"
"X-Generator: Launchpad (build 13815)\n"
#. module: account_coda
#: help:account.coda,journal_id:0

View File

@ -8,14 +8,14 @@ msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2011-01-11 11:14+0000\n"
"PO-Revision-Date: 2011-01-13 06:02+0000\n"
"Last-Translator: Douwe Wullink (Dypalio) <Unknown>\n"
"PO-Revision-Date: 2011-08-30 17:18+0000\n"
"Last-Translator: OpenERP Administrators <Unknown>\n"
"Language-Team: Dutch <nl@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: 2011-04-29 05:42+0000\n"
"X-Generator: Launchpad (build 12758)\n"
"X-Launchpad-Export-Date: 2011-08-31 04:35+0000\n"
"X-Generator: Launchpad (build 13815)\n"
#. module: account_coda
#: help:account.coda,journal_id:0
@ -317,21 +317,3 @@ msgstr "Dagboek"
#~ msgid "Select your bank journal :"
#~ msgstr "Selecteer bank dagboek :"
#~ msgid "Error ! You can not create recursive Menu."
#~ msgstr "Fout ! U kan geen herhalend Menu maken"
#~ msgid "Rules are not supported for osv_memory objects !"
#~ msgstr "Regels worden niet ondersteund bij osv_memory objecten !"
#~ msgid "The certificate ID of the module must be unique !"
#~ msgstr "Het kwaliteitscertificaat id van de module moet uniek zijn !"
#~ msgid "Rule must have at least one checked access right !"
#~ msgstr "Regel moet tenminste één toegangsrecht aangevinkt hebben !"
#~ msgid "The name of the module must be unique !"
#~ msgstr "De modulenaam moet uniek zijn !"
#~ msgid "Size of the field can never be less than 1 !"
#~ msgstr "De veldlengte kan nooit kleiner dan 1 zijn !"

View File

@ -0,0 +1,259 @@
# Polish translation for openobject-addons
# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2011.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2011-01-11 11:14+0000\n"
"PO-Revision-Date: 2011-08-25 12:34+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Polish <pl@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: 2011-08-31 04:35+0000\n"
"X-Generator: Launchpad (build 13815)\n"
#. module: account_coda
#: help:account.coda,journal_id:0
#: field:account.coda.import,journal_id:0
msgid "Bank Journal"
msgstr "Dziennik bankowy"
#. module: account_coda
#: view:account.coda:0
#: field:account.coda.import,note:0
msgid "Log"
msgstr "Dziennik"
#. module: account_coda
#: model:ir.model,name:account_coda.model_account_coda_import
msgid "Account Coda Import"
msgstr ""
#. module: account_coda
#: field:account.coda,name:0
msgid "Coda file"
msgstr ""
#. module: account_coda
#: view:account.coda:0
msgid "Group By..."
msgstr "Grupuj wg"
#. module: account_coda
#: field:account.coda.import,awaiting_account:0
msgid "Default Account for Unrecognized Movement"
msgstr ""
#. module: account_coda
#: help:account.coda,date:0
msgid "Import Date"
msgstr "Data importu"
#. module: account_coda
#: field:account.coda,note:0
msgid "Import log"
msgstr ""
#. module: account_coda
#: view:account.coda.import:0
msgid "Import"
msgstr ""
#. module: account_coda
#: view:account.coda:0
msgid "Coda import"
msgstr ""
#. module: account_coda
#: code:addons/account_coda/account_coda.py:51
#, python-format
msgid "Coda file not found for bank statement !!"
msgstr ""
#. module: account_coda
#: help:account.coda.import,awaiting_account:0
msgid ""
"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"
msgstr ""
#. module: account_coda
#: view:account.coda:0
#: field:account.coda,company_id:0
msgid "Company"
msgstr "Firma"
#. module: account_coda
#: help:account.coda.import,def_payable:0
msgid ""
"Set here the payable account that will be used, by default, if the partner "
"is not found"
msgstr ""
#. module: account_coda
#: view:account.coda:0
msgid "Search Coda"
msgstr ""
#. module: account_coda
#: view:account.coda:0
#: field:account.coda,user_id:0
msgid "User"
msgstr "Użytkownik"
#. module: account_coda
#: view:account.coda:0
#: field:account.coda,date:0
msgid "Date"
msgstr "Data"
#. module: account_coda
#: model:ir.ui.menu,name:account_coda.menu_account_coda_statement
msgid "Coda Import Logs"
msgstr ""
#. module: account_coda
#: model:ir.model,name:account_coda.model_account_coda
msgid "coda for an Account"
msgstr ""
#. module: account_coda
#: field:account.coda.import,def_payable:0
msgid "Default Payable Account"
msgstr ""
#. module: account_coda
#: help:account.coda,name:0
msgid "Store the detail of bank statements"
msgstr ""
#. module: account_coda
#: view:account.coda.import:0
msgid "Cancel"
msgstr "Anuluj"
#. module: account_coda
#: view:account.coda.import:0
msgid "Open Statements"
msgstr ""
#. module: account_coda
#: code:addons/account_coda/wizard/account_coda_import.py:167
#, python-format
msgid "The bank account %s is not defined for the partner %s.\n"
msgstr ""
#. module: account_coda
#: model:ir.ui.menu,name:account_coda.menu_account_coda_import
msgid "Import Coda Statements"
msgstr ""
#. module: account_coda
#: view:account.coda.import:0
#: model:ir.actions.act_window,name:account_coda.action_account_coda_import
msgid "Import Coda Statement"
msgstr ""
#. module: account_coda
#: model:ir.module.module,description:account_coda.module_meta_information
msgid ""
"\n"
" Module provides functionality to import\n"
" bank statements from coda files.\n"
" "
msgstr ""
#. module: account_coda
#: view:account.coda:0
msgid "Statements"
msgstr ""
#. module: account_coda
#: field:account.bank.statement,coda_id:0
msgid "Coda"
msgstr ""
#. module: account_coda
#: view:account.coda.import:0
msgid "Results :"
msgstr "Wyniki"
#. module: account_coda
#: view:account.coda.import:0
msgid "Result of Imported Coda Statements"
msgstr ""
#. module: account_coda
#: help:account.coda.import,def_receivable:0
msgid ""
"Set here the receivable account that will be used, by default, if the "
"partner is not found"
msgstr ""
#. module: account_coda
#: field:account.coda.import,coda:0
#: model:ir.actions.act_window,name:account_coda.act_account_payment_account_bank_statement
msgid "Coda File"
msgstr ""
#. module: account_coda
#: model:ir.model,name:account_coda.model_account_bank_statement
msgid "Bank Statement"
msgstr ""
#. module: account_coda
#: model:ir.actions.act_window,name:account_coda.action_account_coda
msgid "Coda Logs"
msgstr ""
#. module: account_coda
#: code:addons/account_coda/wizard/account_coda_import.py:311
#, python-format
msgid "Result"
msgstr ""
#. module: account_coda
#: view:account.coda.import:0
msgid "Click on 'New' to select your file :"
msgstr ""
#. module: account_coda
#: field:account.coda.import,def_receivable:0
msgid "Default Receivable Account"
msgstr ""
#. module: account_coda
#: view:account.coda.import:0
msgid "Close"
msgstr ""
#. module: account_coda
#: field:account.coda,statement_ids:0
msgid "Generated Bank Statements"
msgstr ""
#. module: account_coda
#: model:ir.module.module,shortdesc:account_coda.module_meta_information
msgid "Account CODA - import bank statements from coda file"
msgstr ""
#. module: account_coda
#: view:account.coda.import:0
msgid "Configure Your Journal and Account :"
msgstr ""
#. module: account_coda
#: view:account.coda:0
msgid "Coda Import"
msgstr ""
#. module: account_coda
#: view:account.coda:0
#: field:account.coda,journal_id:0
msgid "Journal"
msgstr ""

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2011-04-29 05:42+0000\n"
"X-Generator: Launchpad (build 12758)\n"
"X-Launchpad-Export-Date: 2011-08-31 04:35+0000\n"
"X-Generator: Launchpad (build 13815)\n"
#. module: account_coda
#: help:account.coda,journal_id:0

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2011-04-29 05:42+0000\n"
"X-Generator: Launchpad (build 12758)\n"
"X-Launchpad-Export-Date: 2011-08-31 04:35+0000\n"
"X-Generator: Launchpad (build 13815)\n"
#. module: account_coda
#: help:account.coda,journal_id:0

View File

@ -9,13 +9,13 @@ msgstr ""
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2011-01-11 11:14+0000\n"
"PO-Revision-Date: 2011-01-20 20:13+0000\n"
"Last-Translator: Mihai Boiciuc <Unknown>\n"
"Last-Translator: Mihai Satmarean <Unknown>\n"
"Language-Team: Romanian <ro@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: 2011-04-29 05:42+0000\n"
"X-Generator: Launchpad (build 12758)\n"
"X-Launchpad-Export-Date: 2011-08-31 04:35+0000\n"
"X-Generator: Launchpad (build 13815)\n"
#. module: account_coda
#: help:account.coda,journal_id:0

View File

@ -8,14 +8,14 @@ msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2011-01-11 11:14+0000\n"
"PO-Revision-Date: 2010-11-29 07:47+0000\n"
"PO-Revision-Date: 2011-08-30 17:18+0000\n"
"Last-Translator: OpenERP Administrators <Unknown>\n"
"Language-Team: Russian <ru@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: 2011-04-29 05:42+0000\n"
"X-Generator: Launchpad (build 12758)\n"
"X-Launchpad-Export-Date: 2011-08-31 04:35+0000\n"
"X-Generator: Launchpad (build 13815)\n"
#. module: account_coda
#: help:account.coda,journal_id:0
@ -37,7 +37,7 @@ msgstr ""
#. module: account_coda
#: field:account.coda,name:0
msgid "Coda file"
msgstr ""
msgstr "Coda файл"
#. module: account_coda
#: view:account.coda:0
@ -67,13 +67,13 @@ msgstr "Импорт"
#. module: account_coda
#: view:account.coda:0
msgid "Coda import"
msgstr ""
msgstr "Импорт coda"
#. module: account_coda
#: code:addons/account_coda/account_coda.py:51
#, python-format
msgid "Coda file not found for bank statement !!"
msgstr ""
msgstr "Не найден coda файл для банковской выписки!"
#. module: account_coda
#: help:account.coda.import,awaiting_account:0
@ -81,6 +81,8 @@ msgid ""
"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"
msgstr ""
"Установите счет, который будет использоваться, если у партнера не имеется "
"банковского счета или он домицилирован"
#. module: account_coda
#: view:account.coda:0
@ -94,11 +96,13 @@ msgid ""
"Set here the payable account that will be used, by default, if the partner "
"is not found"
msgstr ""
"Установите расчетный счет для использования по-умолчанию, если партнер не "
"найден."
#. module: account_coda
#: view:account.coda:0
msgid "Search Coda"
msgstr ""
msgstr "Искать Coda файл"
#. module: account_coda
#: view:account.coda:0
@ -115,22 +119,22 @@ msgstr "Дата"
#. module: account_coda
#: model:ir.ui.menu,name:account_coda.menu_account_coda_statement
msgid "Coda Import Logs"
msgstr ""
msgstr "Журналы импорта Coda"
#. module: account_coda
#: model:ir.model,name:account_coda.model_account_coda
msgid "coda for an Account"
msgstr ""
msgstr "coda для счета"
#. module: account_coda
#: field:account.coda.import,def_payable:0
msgid "Default Payable Account"
msgstr ""
msgstr "Расчетный счет по-умолчанию"
#. module: account_coda
#: help:account.coda,name:0
msgid "Store the detail of bank statements"
msgstr ""
msgstr "Сохранить детали банковской выписки"
#. module: account_coda
#: view:account.coda.import:0
@ -146,18 +150,18 @@ msgstr ""
#: code:addons/account_coda/wizard/account_coda_import.py:167
#, python-format
msgid "The bank account %s is not defined for the partner %s.\n"
msgstr ""
msgstr "Банковский счет %s не установлен для контрагента %s.\n"
#. module: account_coda
#: model:ir.ui.menu,name:account_coda.menu_account_coda_import
msgid "Import Coda Statements"
msgstr ""
msgstr "Импортировать Coda выписки"
#. module: account_coda
#: view:account.coda.import:0
#: model:ir.actions.act_window,name:account_coda.action_account_coda_import
msgid "Import Coda Statement"
msgstr ""
msgstr "Импортировать Coda выписку"
#. module: account_coda
#: model:ir.module.module,description:account_coda.module_meta_information
@ -167,6 +171,10 @@ msgid ""
" bank statements from coda files.\n"
" "
msgstr ""
"\n"
" Модуль предоставляет функции импорта\n"
" банковских выписок из Coda файлов.\n"
" "
#. module: account_coda
#: view:account.coda:0
@ -186,7 +194,7 @@ msgstr "Результаты:"
#. module: account_coda
#: view:account.coda.import:0
msgid "Result of Imported Coda Statements"
msgstr ""
msgstr "Результат импортированных из Coda выписок"
#. module: account_coda
#: help:account.coda.import,def_receivable:0
@ -199,7 +207,7 @@ msgstr ""
#: field:account.coda.import,coda:0
#: model:ir.actions.act_window,name:account_coda.act_account_payment_account_bank_statement
msgid "Coda File"
msgstr ""
msgstr "Coda файл"
#. module: account_coda
#: model:ir.model,name:account_coda.model_account_bank_statement
@ -245,12 +253,12 @@ msgstr ""
#. module: account_coda
#: view:account.coda.import:0
msgid "Configure Your Journal and Account :"
msgstr ""
msgstr "Настройте журнал и счет:"
#. module: account_coda
#: view:account.coda:0
msgid "Coda Import"
msgstr ""
msgstr "Импорт Coda файла"
#. module: account_coda
#: view:account.coda:0
@ -275,21 +283,3 @@ msgstr "Журнал"
#~ msgid "_Ok"
#~ msgstr "_Далее"
#~ msgid "Error ! You can not create recursive Menu."
#~ msgstr "Ошибка ! Нельзя создать зацикленные меню."
#~ msgid "The certificate ID of the module must be unique !"
#~ msgstr "Идентификатор сертификата модуля должен быть уникальным !"
#~ msgid "Rules are not supported for osv_memory objects !"
#~ msgstr "Правила не поддерживаются в объектах osv_memory !"
#~ msgid "Rule must have at least one checked access right !"
#~ msgstr "Правило должно иметь хотя бы одно проверенное право доступа !"
#~ msgid "The name of the module must be unique !"
#~ msgstr "Название модуля должно быть уникальным !"
#~ msgid "Size of the field can never be less than 1 !"
#~ msgstr "Размер поля никогда не может быть меньше 1 !"

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2011-04-29 05:42+0000\n"
"X-Generator: Launchpad (build 12758)\n"
"X-Launchpad-Export-Date: 2011-08-31 04:34+0000\n"
"X-Generator: Launchpad (build 13815)\n"
#. module: account_coda
#: help:account.coda,journal_id:0

View File

@ -8,14 +8,14 @@ msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2011-01-11 11:14+0000\n"
"PO-Revision-Date: 2010-11-14 08:09+0000\n"
"PO-Revision-Date: 2011-08-30 17:18+0000\n"
"Last-Translator: OpenERP Administrators <Unknown>\n"
"Language-Team: Serbian <sr@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2011-04-29 05:42+0000\n"
"X-Generator: Launchpad (build 12758)\n"
"X-Launchpad-Export-Date: 2011-08-31 04:35+0000\n"
"X-Generator: Launchpad (build 13815)\n"
#. module: account_coda
#: help:account.coda,journal_id:0
@ -313,9 +313,3 @@ msgstr "Dnevnik"
#~ msgid "Select your bank journal :"
#~ msgstr "Izaberi svoj bancin dnevnik"
#~ msgid "Error ! You can not create recursive Menu."
#~ msgstr "Greska ! Ne mozes kreirati rekursivni meni."
#~ msgid "Rules are not supported for osv_memory objects !"
#~ msgstr "Pravila nisu podrzana od strane osv_memory objekta !"

View File

@ -8,14 +8,14 @@ msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2011-01-11 11:14+0000\n"
"PO-Revision-Date: 2010-12-23 15:47+0000\n"
"PO-Revision-Date: 2011-08-30 17:18+0000\n"
"Last-Translator: OpenERP Administrators <Unknown>\n"
"Language-Team: Serbian latin <sr@latin@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: 2011-04-29 05:42+0000\n"
"X-Generator: Launchpad (build 12758)\n"
"X-Launchpad-Export-Date: 2011-08-31 04:35+0000\n"
"X-Generator: Launchpad (build 13815)\n"
#. module: account_coda
#: help:account.coda,journal_id:0
@ -272,15 +272,9 @@ msgstr "Dnevnik"
#~ msgid "Invalid model name in the action definition."
#~ msgstr "Pogrešno ime modela u definiciji akcije."
#~ msgid "Error ! You can not create recursive Menu."
#~ msgstr "Greska ! Ne mozes kreirati rekursivni meni."
#~ msgid "Invalid XML for View Architecture!"
#~ msgstr "Nevažeći XML za pregled arhitekture"
#~ msgid "Rules are not supported for osv_memory objects !"
#~ msgstr "Pravila nisu podrzana od strane osv_memory objekta !"
#~ msgid "Clic on 'New' to select your file :"
#~ msgstr "Klikni na 'Novi' da izaberes svoj fajl"

View File

@ -8,14 +8,14 @@ msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2011-01-11 11:14+0000\n"
"PO-Revision-Date: 2011-01-26 07:01+0000\n"
"Last-Translator: Magnus Brandt (mba), Aspirix AB <Unknown>\n"
"PO-Revision-Date: 2011-08-30 17:18+0000\n"
"Last-Translator: OpenERP Administrators <Unknown>\n"
"Language-Team: Swedish <sv@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: 2011-04-29 05:42+0000\n"
"X-Generator: Launchpad (build 12758)\n"
"X-Launchpad-Export-Date: 2011-08-31 04:35+0000\n"
"X-Generator: Launchpad (build 13815)\n"
#. module: account_coda
#: help:account.coda,journal_id:0
@ -266,14 +266,5 @@ msgstr ""
#~ msgid "Invalid model name in the action definition."
#~ msgstr "Ogiltigt modellnamn i åtgärdsdefinitionen."
#~ msgid "Error ! You can not create recursive Menu."
#~ msgstr "Fel! Ni kan inte skapa recursiva menyer"
#~ msgid "The certificate ID of the module must be unique !"
#~ msgstr "Certifikat ID för modulen måste vara unik!"
#~ msgid "Invalid XML for View Architecture!"
#~ msgstr "Ogiltig XML för Vy-arkitektur!"
#~ msgid "The name of the module must be unique !"
#~ msgstr "Namnet på modulen måste vara unikt!"

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2011-05-16 04:39+0000\n"
"X-Generator: Launchpad (build 12959)\n"
"X-Launchpad-Export-Date: 2011-08-31 04:35+0000\n"
"X-Generator: Launchpad (build 13815)\n"
#. module: account_coda
#: help:account.coda,journal_id:0
@ -81,6 +81,8 @@ msgid ""
"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"
msgstr ""
"Eğer bir paydaş var ama banka hesabı yok ise ya da ikametgahlı ise burada "
"kullanılacak varsayılan hesabı ayarlayın"
#. module: account_coda
#: view:account.coda:0
@ -94,6 +96,8 @@ msgid ""
"Set here the payable account that will be used, by default, if the partner "
"is not found"
msgstr ""
"Eğer bir paydaş yok ise burada kullanılacak varsayılan alıcı hesabını "
"ayarlayın"
#. module: account_coda
#: view:account.coda:0
@ -104,60 +108,60 @@ msgstr "Coda Araştır"
#: view:account.coda:0
#: field:account.coda,user_id:0
msgid "User"
msgstr ""
msgstr "Kullanıcı"
#. module: account_coda
#: view:account.coda:0
#: field:account.coda,date:0
msgid "Date"
msgstr ""
msgstr "Tarih"
#. module: account_coda
#: model:ir.ui.menu,name:account_coda.menu_account_coda_statement
msgid "Coda Import Logs"
msgstr ""
msgstr "Coda içeaktarım günlüğü"
#. module: account_coda
#: model:ir.model,name:account_coda.model_account_coda
msgid "coda for an Account"
msgstr ""
msgstr "Bir hesap için Coda"
#. module: account_coda
#: field:account.coda.import,def_payable:0
msgid "Default Payable Account"
msgstr ""
msgstr "Varsayılan Satıcılar Hesabı"
#. module: account_coda
#: help:account.coda,name:0
msgid "Store the detail of bank statements"
msgstr ""
msgstr "Banka ekstreleri ayrıntılarını saklayın"
#. module: account_coda
#: view:account.coda.import:0
msgid "Cancel"
msgstr ""
msgstr "Vazgeç"
#. module: account_coda
#: view:account.coda.import:0
msgid "Open Statements"
msgstr ""
msgstr "Ekstreleri Aç"
#. module: account_coda
#: code:addons/account_coda/wizard/account_coda_import.py:167
#, python-format
msgid "The bank account %s is not defined for the partner %s.\n"
msgstr ""
msgstr "%s Paydaşı için %s banka hesabı tanımlanmamıştır.\n"
#. module: account_coda
#: model:ir.ui.menu,name:account_coda.menu_account_coda_import
msgid "Import Coda Statements"
msgstr ""
msgstr "Coda Ekstrelerini İçeaktar"
#. module: account_coda
#: view:account.coda.import:0
#: model:ir.actions.act_window,name:account_coda.action_account_coda_import
msgid "Import Coda Statement"
msgstr ""
msgstr "Coda Ekstresini İçeaktar"
#. module: account_coda
#: model:ir.module.module,description:account_coda.module_meta_information
@ -167,26 +171,30 @@ msgid ""
" bank statements from coda files.\n"
" "
msgstr ""
"\n"
" Modül banka ekstrelerinin coda\n"
" dosyalarından içeaktarımını sağlar.\n"
" "
#. module: account_coda
#: view:account.coda:0
msgid "Statements"
msgstr ""
msgstr "Ekstreler"
#. module: account_coda
#: field:account.bank.statement,coda_id:0
msgid "Coda"
msgstr ""
msgstr "Coda"
#. module: account_coda
#: view:account.coda.import:0
msgid "Results :"
msgstr ""
msgstr "Sonuçlar :"
#. module: account_coda
#: view:account.coda.import:0
msgid "Result of Imported Coda Statements"
msgstr ""
msgstr "İçeaktarılmış Coda Ekstreleri Sonucu"
#. module: account_coda
#: help:account.coda.import,def_receivable:0
@ -194,66 +202,68 @@ msgid ""
"Set here the receivable account that will be used, by default, if the "
"partner is not found"
msgstr ""
"Eğer bir paydaş yoksa, burada kullanılacak varsayılan alıcılar hesabını "
"ayarlayın"
#. module: account_coda
#: field:account.coda.import,coda:0
#: model:ir.actions.act_window,name:account_coda.act_account_payment_account_bank_statement
msgid "Coda File"
msgstr ""
msgstr "Coda Dosyası"
#. module: account_coda
#: model:ir.model,name:account_coda.model_account_bank_statement
msgid "Bank Statement"
msgstr ""
msgstr "Banka Ekstresi"
#. module: account_coda
#: model:ir.actions.act_window,name:account_coda.action_account_coda
msgid "Coda Logs"
msgstr ""
msgstr "Coda Günlükleri"
#. module: account_coda
#: code:addons/account_coda/wizard/account_coda_import.py:311
#, python-format
msgid "Result"
msgstr ""
msgstr "Sonuç"
#. module: account_coda
#: view:account.coda.import:0
msgid "Click on 'New' to select your file :"
msgstr ""
msgstr "Dosyanızı seçmek için 'Yeni' ye tıklayın :"
#. module: account_coda
#: field:account.coda.import,def_receivable:0
msgid "Default Receivable Account"
msgstr ""
msgstr "Varsayılan Alıcı Hesabı"
#. module: account_coda
#: view:account.coda.import:0
msgid "Close"
msgstr ""
msgstr "Kapat"
#. module: account_coda
#: field:account.coda,statement_ids:0
msgid "Generated Bank Statements"
msgstr ""
msgstr "Oluşturulan Banka Ekstreleri"
#. module: account_coda
#: model:ir.module.module,shortdesc:account_coda.module_meta_information
msgid "Account CODA - import bank statements from coda file"
msgstr ""
msgstr "CODA Hesabı - coda dosyalarından banka ekstrelerini içe aktar"
#. module: account_coda
#: view:account.coda.import:0
msgid "Configure Your Journal and Account :"
msgstr ""
msgstr "Yevmiye ve Hesaplarınızı Yapılandırın"
#. module: account_coda
#: view:account.coda:0
msgid "Coda Import"
msgstr ""
msgstr "Coda İçeaktar"
#. module: account_coda
#: view:account.coda:0
#: field:account.coda,journal_id:0
msgid "Journal"
msgstr ""
msgstr "Yevmiye"

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2011-06-06 04:37+0000\n"
"X-Generator: Launchpad (build 12959)\n"
"X-Launchpad-Export-Date: 2011-08-31 04:35+0000\n"
"X-Generator: Launchpad (build 13815)\n"
#. module: account_coda
#: help:account.coda,journal_id:0

View File

@ -14,14 +14,14 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2011-04-29 05:42+0000\n"
"X-Generator: Launchpad (build 12758)\n"
"X-Launchpad-Export-Date: 2011-08-31 04:35+0000\n"
"X-Generator: Launchpad (build 13815)\n"
#. module: account_coda
#: help:account.coda,journal_id:0
#: field:account.coda.import,journal_id:0
msgid "Bank Journal"
msgstr "银行记录集合"
msgstr "银行日记账"
#. module: account_coda
#: view:account.coda:0
@ -32,12 +32,12 @@ msgstr "日志"
#. module: account_coda
#: model:ir.model,name:account_coda.model_account_coda_import
msgid "Account Coda Import"
msgstr ""
msgstr "结帐科目录入"
#. module: account_coda
#: field:account.coda,name:0
msgid "Coda file"
msgstr "Coda 文件"
msgstr "归档结帐"
#. module: account_coda
#: view:account.coda:0
@ -47,7 +47,7 @@ msgstr "分组..."
#. module: account_coda
#: field:account.coda.import,awaiting_account:0
msgid "Default Account for Unrecognized Movement"
msgstr ""
msgstr "默认科目无法识别的记帐"
#. module: account_coda
#: help:account.coda,date:0
@ -67,38 +67,38 @@ msgstr "导入"
#. module: account_coda
#: view:account.coda:0
msgid "Coda import"
msgstr "Coda 导入"
msgstr "结帐录入"
#. module: account_coda
#: code:addons/account_coda/account_coda.py:51
#, python-format
msgid "Coda file not found for bank statement !!"
msgstr ""
msgstr "结账文件未找到银行对帐单"
#. module: account_coda
#: help:account.coda.import,awaiting_account:0
msgid ""
"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"
msgstr ""
msgstr "针对没有银行帐号或指定支付地点的业务伙伴,这里设置要使用的默认银行帐号。"
#. module: account_coda
#: view:account.coda:0
#: field:account.coda,company_id:0
msgid "Company"
msgstr ""
msgstr "公司"
#. module: account_coda
#: help:account.coda.import,def_payable:0
msgid ""
"Set here the payable account that will be used, by default, if the partner "
"is not found"
msgstr ""
msgstr "如果没有找到合作伙伴,那么在这里设置默认支付帐户."
#. module: account_coda
#: view:account.coda:0
msgid "Search Coda"
msgstr ""
msgstr "结账搜索"
#. module: account_coda
#: view:account.coda:0
@ -110,17 +110,17 @@ msgstr "用户"
#: view:account.coda:0
#: field:account.coda,date:0
msgid "Date"
msgstr ""
msgstr "日期"
#. module: account_coda
#: model:ir.ui.menu,name:account_coda.menu_account_coda_statement
msgid "Coda Import Logs"
msgstr ""
msgstr "导入结账日志"
#. module: account_coda
#: model:ir.model,name:account_coda.model_account_coda
msgid "coda for an Account"
msgstr "帐号的CODA"
msgstr "科目结账"
#. module: account_coda
#: field:account.coda.import,def_payable:0
@ -130,34 +130,34 @@ msgstr "默认应付帐款科目"
#. module: account_coda
#: help:account.coda,name:0
msgid "Store the detail of bank statements"
msgstr ""
msgstr "银行对账单的详细"
#. module: account_coda
#: view:account.coda.import:0
msgid "Cancel"
msgstr ""
msgstr "取消"
#. module: account_coda
#: view:account.coda.import:0
msgid "Open Statements"
msgstr ""
msgstr "打开报表"
#. module: account_coda
#: code:addons/account_coda/wizard/account_coda_import.py:167
#, python-format
msgid "The bank account %s is not defined for the partner %s.\n"
msgstr ""
msgstr "银行帐户%s没有定义合作伙伴%s\n"
#. module: account_coda
#: model:ir.ui.menu,name:account_coda.menu_account_coda_import
msgid "Import Coda Statements"
msgstr "导入CODA"
msgstr "导入结账"
#. module: account_coda
#: view:account.coda.import:0
#: model:ir.actions.act_window,name:account_coda.action_account_coda_import
msgid "Import Coda Statement"
msgstr "导入CODA"
msgstr "导入结账报表"
#. module: account_coda
#: model:ir.module.module,description:account_coda.module_meta_information
@ -167,11 +167,14 @@ msgid ""
" bank statements from coda files.\n"
" "
msgstr ""
"\n"
" 模块提供了导入结账报表功能\n"
" "
#. module: account_coda
#: view:account.coda:0
msgid "Statements"
msgstr ""
msgstr "报表"
#. module: account_coda
#: field:account.bank.statement,coda_id:0
@ -186,77 +189,77 @@ msgstr "结果:"
#. module: account_coda
#: view:account.coda.import:0
msgid "Result of Imported Coda Statements"
msgstr ""
msgstr "导入结账报表"
#. module: account_coda
#: help:account.coda.import,def_receivable:0
msgid ""
"Set here the receivable account that will be used, by default, if the "
"partner is not found"
msgstr ""
msgstr "如果没找到业务伙伴,在这里设置应收账款科目"
#. module: account_coda
#: field:account.coda.import,coda:0
#: model:ir.actions.act_window,name:account_coda.act_account_payment_account_bank_statement
msgid "Coda File"
msgstr "CODA文件"
msgstr "结账文件"
#. module: account_coda
#: model:ir.model,name:account_coda.model_account_bank_statement
msgid "Bank Statement"
msgstr ""
msgstr "银行对账单"
#. module: account_coda
#: model:ir.actions.act_window,name:account_coda.action_account_coda
msgid "Coda Logs"
msgstr ""
msgstr "结账日志"
#. module: account_coda
#: code:addons/account_coda/wizard/account_coda_import.py:311
#, python-format
msgid "Result"
msgstr ""
msgstr "结果"
#. module: account_coda
#: view:account.coda.import:0
msgid "Click on 'New' to select your file :"
msgstr ""
msgstr "点击“新建”,选择您的文件"
#. module: account_coda
#: field:account.coda.import,def_receivable:0
msgid "Default Receivable Account"
msgstr ""
msgstr "默认的应收账款"
#. module: account_coda
#: view:account.coda.import:0
msgid "Close"
msgstr ""
msgstr "关闭"
#. module: account_coda
#: field:account.coda,statement_ids:0
msgid "Generated Bank Statements"
msgstr ""
msgstr "生成银行对账单"
#. module: account_coda
#: model:ir.module.module,shortdesc:account_coda.module_meta_information
msgid "Account CODA - import bank statements from coda file"
msgstr ""
msgstr "科目结账 - 导入结账的银行对账单"
#. module: account_coda
#: view:account.coda.import:0
msgid "Configure Your Journal and Account :"
msgstr ""
msgstr "设置你的账簿和科目"
#. module: account_coda
#: view:account.coda:0
msgid "Coda Import"
msgstr ""
msgstr "导入结账"
#. module: account_coda
#: view:account.coda:0
#: field:account.coda,journal_id:0
msgid "Journal"
msgstr ""
msgstr "账簿"
#~ msgid "Clic on 'New' to select your file :"
#~ msgstr "点击\"新\"去选择你的文件:"

View File

@ -13,7 +13,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2011-08-20 04:52+0000\n"
"X-Launchpad-Export-Date: 2011-08-23 05:04+0000\n"
"X-Generator: Launchpad (build 13697)\n"
#. module: account_followup

View File

@ -13,7 +13,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2011-08-20 04:53+0000\n"
"X-Launchpad-Export-Date: 2011-08-23 05:05+0000\n"
"X-Generator: Launchpad (build 13697)\n"
#. module: account_payment

View File

@ -0,0 +1,714 @@
# Spanish (Chile) translation for openobject-addons
# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2011.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2011-01-11 11:14+0000\n"
"PO-Revision-Date: 2011-08-26 23:15+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Spanish (Chile) <es_CL@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: 2011-08-27 05:41+0000\n"
"X-Generator: Launchpad (build 13794)\n"
#. module: account_payment
#: field:payment.order,date_scheduled:0
msgid "Scheduled date if fixed"
msgstr ""
#. module: account_payment
#: field:payment.line,currency:0
msgid "Partner Currency"
msgstr ""
#. module: account_payment
#: view:payment.order:0
msgid "Set to draft"
msgstr ""
#. module: account_payment
#: help:payment.order,mode:0
msgid "Select the Payment Mode to be applied."
msgstr ""
#. module: account_payment
#: view:payment.mode:0
#: view:payment.order:0
msgid "Group By..."
msgstr ""
#. module: account_payment
#: model:ir.module.module,description:account_payment.module_meta_information
msgid ""
"\n"
"This module provides :\n"
"* a more efficient way to manage invoice payment.\n"
"* a basic mechanism to easily plug various automated payment.\n"
" "
msgstr ""
#. module: account_payment
#: field:payment.order,line_ids:0
msgid "Payment lines"
msgstr ""
#. module: account_payment
#: view:payment.line:0
#: field:payment.line,info_owner:0
#: view:payment.order:0
msgid "Owner Account"
msgstr ""
#. module: account_payment
#: help:payment.order,state:0
msgid ""
"When an order is placed the state is 'Draft'.\n"
" Once the bank is confirmed the state is set to 'Confirmed'.\n"
" Then the order is paid the state is 'Done'."
msgstr ""
#. module: account_payment
#: help:account.invoice,amount_to_pay:0
msgid ""
"The amount which should be paid at the current date\n"
"minus the amount which is already in payment order"
msgstr ""
#. module: account_payment
#: field:payment.mode,company_id:0
msgid "Company"
msgstr ""
#. module: account_payment
#: field:payment.order,date_prefered:0
msgid "Preferred date"
msgstr ""
#. module: account_payment
#: selection:payment.line,state:0
msgid "Free"
msgstr ""
#. module: account_payment
#: field:payment.order.create,entries:0
msgid "Entries"
msgstr ""
#. module: account_payment
#: report:payment.order:0
msgid "Used Account"
msgstr ""
#. module: account_payment
#: field:payment.line,ml_maturity_date:0
#: field:payment.order.create,duedate:0
msgid "Due Date"
msgstr ""
#. module: account_payment
#: constraint:account.move.line:0
msgid "You can not create move line on closed account."
msgstr ""
#. module: account_payment
#: view:account.move.line:0
msgid "Account Entry Line"
msgstr ""
#. module: account_payment
#: view:payment.order.create:0
msgid "_Add to payment order"
msgstr ""
#. module: account_payment
#: model:ir.actions.act_window,name:account_payment.action_account_payment_populate_statement
#: model:ir.actions.act_window,name:account_payment.action_account_populate_statement_confirm
msgid "Payment Populate statement"
msgstr ""
#. module: account_payment
#: report:payment.order:0
#: view:payment.order:0
msgid "Amount"
msgstr ""
#. module: account_payment
#: sql_constraint:account.move.line:0
msgid "Wrong credit or debit value in accounting entry !"
msgstr ""
#. module: account_payment
#: view:payment.order:0
msgid "Total in Company Currency"
msgstr ""
#. module: account_payment
#: selection:payment.order,state:0
msgid "Cancelled"
msgstr ""
#. module: account_payment
#: model:ir.actions.act_window,name:account_payment.action_payment_order_tree_new
msgid "New Payment Order"
msgstr ""
#. module: account_payment
#: report:payment.order:0
#: field:payment.order,reference:0
msgid "Reference"
msgstr ""
#. module: account_payment
#: sql_constraint:payment.line:0
msgid "The payment line name must be unique!"
msgstr ""
#. module: account_payment
#: model:ir.actions.act_window,name:account_payment.action_payment_order_tree
#: model:ir.ui.menu,name:account_payment.menu_action_payment_order_form
msgid "Payment Orders"
msgstr ""
#. module: account_payment
#: selection:payment.order,date_prefered:0
msgid "Directly"
msgstr ""
#. module: account_payment
#: model:ir.actions.act_window,name:account_payment.action_payment_line_form
#: model:ir.model,name:account_payment.model_payment_line
#: view:payment.line:0
#: view:payment.order:0
msgid "Payment Line"
msgstr ""
#. module: account_payment
#: view:payment.line:0
msgid "Amount Total"
msgstr ""
#. module: account_payment
#: view:payment.order:0
#: selection:payment.order,state:0
msgid "Confirmed"
msgstr ""
#. module: account_payment
#: help:payment.line,ml_date_created:0
msgid "Invoice Effective Date"
msgstr ""
#. module: account_payment
#: report:payment.order:0
msgid "Execution Type"
msgstr ""
#. module: account_payment
#: selection:payment.line,state:0
msgid "Structured"
msgstr ""
#. module: account_payment
#: view:payment.order:0
#: field:payment.order,state:0
msgid "State"
msgstr ""
#. module: account_payment
#: view:payment.line:0
#: view:payment.order:0
msgid "Transaction Information"
msgstr ""
#. module: account_payment
#: model:ir.actions.act_window,name:account_payment.action_payment_mode_form
#: model:ir.model,name:account_payment.model_payment_mode
#: model:ir.ui.menu,name:account_payment.menu_action_payment_mode_form
#: view:payment.mode:0
#: view:payment.order:0
msgid "Payment Mode"
msgstr ""
#. module: account_payment
#: field:payment.line,ml_date_created:0
msgid "Effective Date"
msgstr ""
#. module: account_payment
#: field:payment.line,ml_inv_ref:0
msgid "Invoice Ref."
msgstr ""
#. module: account_payment
#: help:payment.order,date_prefered:0
msgid ""
"Choose an option for the Payment Order:'Fixed' stands for a date specified "
"by you.'Directly' stands for the direct execution.'Due date' stands for the "
"scheduled date of execution."
msgstr ""
#. module: account_payment
#: code:addons/account_payment/account_move_line.py:110
#, python-format
msgid "Error !"
msgstr ""
#. module: account_payment
#: view:account.move.line:0
msgid "Total debit"
msgstr ""
#. module: account_payment
#: field:payment.order,date_done:0
msgid "Execution date"
msgstr ""
#. module: account_payment
#: help:payment.mode,journal:0
msgid "Bank or Cash Journal for the Payment Mode"
msgstr ""
#. module: account_payment
#: selection:payment.order,date_prefered:0
msgid "Fixed date"
msgstr ""
#. module: account_payment
#: field:payment.line,info_partner:0
#: view:payment.order:0
msgid "Destination Account"
msgstr ""
#. module: account_payment
#: view:payment.line:0
msgid "Desitination Account"
msgstr ""
#. module: account_payment
#: view:payment.order:0
msgid "Search Payment Orders"
msgstr ""
#. module: account_payment
#: constraint:account.move.line:0
msgid ""
"You can not create move line on receivable/payable account without partner"
msgstr ""
#. module: account_payment
#: field:payment.line,create_date:0
msgid "Created"
msgstr ""
#. module: account_payment
#: view:payment.order:0
msgid "Select Invoices to Pay"
msgstr ""
#. module: account_payment
#: view:payment.line:0
msgid "Currency Amount Total"
msgstr ""
#. module: account_payment
#: view:payment.order:0
msgid "Make Payments"
msgstr ""
#. module: account_payment
#: field:payment.line,state:0
msgid "Communication Type"
msgstr ""
#. module: account_payment
#: model:ir.module.module,shortdesc:account_payment.module_meta_information
msgid "Payment Management"
msgstr ""
#. module: account_payment
#: field:payment.line,bank_statement_line_id:0
msgid "Bank statement line"
msgstr ""
#. module: account_payment
#: selection:payment.order,date_prefered:0
msgid "Due date"
msgstr ""
#. module: account_payment
#: field:account.invoice,amount_to_pay:0
msgid "Amount to be paid"
msgstr ""
#. module: account_payment
#: report:payment.order:0
msgid "Currency"
msgstr ""
#. module: account_payment
#: view:account.payment.make.payment:0
msgid "Yes"
msgstr ""
#. module: account_payment
#: help:payment.line,info_owner:0
msgid "Address of the Main Partner"
msgstr ""
#. module: account_payment
#: help:payment.line,date:0
msgid ""
"If no payment date is specified, the bank will treat this payment line "
"directly"
msgstr ""
#. module: account_payment
#: model:ir.model,name:account_payment.model_account_payment_populate_statement
msgid "Account Payment Populate Statement"
msgstr ""
#. module: account_payment
#: help:payment.mode,name:0
msgid "Mode of Payment"
msgstr ""
#. module: account_payment
#: report:payment.order:0
msgid "Value Date"
msgstr ""
#. module: account_payment
#: report:payment.order:0
msgid "Payment Type"
msgstr ""
#. module: account_payment
#: help:payment.line,amount_currency:0
msgid "Payment amount in the partner currency"
msgstr ""
#. module: account_payment
#: view:payment.order:0
#: selection:payment.order,state:0
msgid "Draft"
msgstr ""
#. module: account_payment
#: help:payment.line,communication2:0
msgid "The successor message of Communication."
msgstr ""
#. module: account_payment
#: code:addons/account_payment/account_move_line.py:110
#, python-format
msgid "No partner defined on entry line"
msgstr ""
#. module: account_payment
#: help:payment.line,info_partner:0
msgid "Address of the Ordering Customer."
msgstr ""
#. module: account_payment
#: view:account.payment.populate.statement:0
msgid "Populate Statement:"
msgstr ""
#. module: account_payment
#: view:account.move.line:0
msgid "Total credit"
msgstr ""
#. module: account_payment
#: help:payment.order,date_scheduled:0
msgid "Select a date if you have chosen Preferred Date to be fixed."
msgstr ""
#. module: account_payment
#: field:payment.order,user_id:0
msgid "User"
msgstr ""
#. module: account_payment
#: field:account.payment.populate.statement,lines:0
#: model:ir.actions.act_window,name:account_payment.act_account_invoice_2_payment_line
msgid "Payment Lines"
msgstr ""
#. module: account_payment
#: model:ir.model,name:account_payment.model_account_move_line
msgid "Journal Items"
msgstr ""
#. module: account_payment
#: constraint:account.move.line:0
msgid "Company must be same for its related account and period."
msgstr ""
#. module: account_payment
#: help:payment.line,move_line_id:0
msgid ""
"This Entry Line will be referred for the information of the ordering "
"customer."
msgstr ""
#. module: account_payment
#: view:payment.order.create:0
msgid "Search"
msgstr ""
#. module: account_payment
#: model:ir.actions.report.xml,name:account_payment.payment_order1
#: model:ir.model,name:account_payment.model_payment_order
msgid "Payment Order"
msgstr ""
#. module: account_payment
#: field:payment.line,date:0
msgid "Payment Date"
msgstr ""
#. module: account_payment
#: report:payment.order:0
msgid "Total:"
msgstr ""
#. module: account_payment
#: field:payment.order,date_created:0
msgid "Creation date"
msgstr ""
#. module: account_payment
#: view:account.payment.populate.statement:0
msgid "ADD"
msgstr ""
#. module: account_payment
#: view:account.bank.statement:0
msgid "Import payment lines"
msgstr ""
#. module: account_payment
#: field:account.move.line,amount_to_pay:0
msgid "Amount to pay"
msgstr ""
#. module: account_payment
#: field:payment.line,amount:0
msgid "Amount in Company Currency"
msgstr ""
#. module: account_payment
#: help:payment.line,partner_id:0
msgid "The Ordering Customer"
msgstr ""
#. module: account_payment
#: model:ir.model,name:account_payment.model_account_payment_make_payment
msgid "Account make payment"
msgstr ""
#. module: account_payment
#: report:payment.order:0
msgid "Invoice Ref"
msgstr ""
#. module: account_payment
#: field:payment.line,name:0
msgid "Your Reference"
msgstr ""
#. module: account_payment
#: field:payment.order,mode:0
msgid "Payment mode"
msgstr ""
#. module: account_payment
#: view:payment.order:0
msgid "Payment order"
msgstr ""
#. module: account_payment
#: view:payment.line:0
#: view:payment.order:0
msgid "General Information"
msgstr ""
#. module: account_payment
#: view:payment.order:0
#: selection:payment.order,state:0
msgid "Done"
msgstr ""
#. module: account_payment
#: model:ir.model,name:account_payment.model_account_invoice
msgid "Invoice"
msgstr ""
#. module: account_payment
#: field:payment.line,communication:0
msgid "Communication"
msgstr ""
#. module: account_payment
#: view:account.payment.make.payment:0
#: view:account.payment.populate.statement:0
#: view:payment.order:0
#: view:payment.order.create:0
msgid "Cancel"
msgstr ""
#. module: account_payment
#: view:payment.line:0
#: view:payment.order:0
msgid "Information"
msgstr ""
#. module: account_payment
#: model:ir.actions.act_window,help:account_payment.action_payment_order_tree
msgid ""
"A payment order is a payment request from your company to pay a supplier "
"invoice or a customer credit note. Here you can register all payment orders "
"that should be done, keep track of all payment orders and mention the "
"invoice reference and the partner the payment should be done for."
msgstr ""
#. module: account_payment
#: help:payment.line,amount:0
msgid "Payment amount in the company currency"
msgstr ""
#. module: account_payment
#: view:payment.order.create:0
msgid "Search Payment lines"
msgstr ""
#. module: account_payment
#: field:payment.line,amount_currency:0
msgid "Amount in Partner Currency"
msgstr ""
#. module: account_payment
#: field:payment.line,communication2:0
msgid "Communication 2"
msgstr ""
#. module: account_payment
#: field:payment.line,bank_id:0
msgid "Destination Bank account"
msgstr ""
#. module: account_payment
#: view:account.payment.make.payment:0
msgid "Are you sure you want to make payment?"
msgstr ""
#. module: account_payment
#: view:payment.mode:0
#: field:payment.mode,journal:0
msgid "Journal"
msgstr ""
#. module: account_payment
#: field:payment.mode,bank_id:0
msgid "Bank account"
msgstr ""
#. module: account_payment
#: view:payment.order:0
msgid "Confirm Payments"
msgstr ""
#. module: account_payment
#: field:payment.line,company_currency:0
#: report:payment.order:0
msgid "Company Currency"
msgstr ""
#. module: account_payment
#: model:ir.ui.menu,name:account_payment.menu_main_payment
#: view:payment.line:0
#: view:payment.order:0
msgid "Payment"
msgstr ""
#. module: account_payment
#: report:payment.order:0
msgid "Payment Order / Payment"
msgstr ""
#. module: account_payment
#: field:payment.line,move_line_id:0
msgid "Entry line"
msgstr ""
#. module: account_payment
#: help:payment.line,communication:0
msgid ""
"Used as the message between ordering customer and current company. Depicts "
"'What do you want to say to the recipient about this order ?'"
msgstr ""
#. module: account_payment
#: field:payment.mode,name:0
msgid "Name"
msgstr ""
#. module: account_payment
#: report:payment.order:0
msgid "Bank Account"
msgstr ""
#. module: account_payment
#: view:payment.line:0
#: view:payment.order:0
msgid "Entry Information"
msgstr ""
#. module: account_payment
#: model:ir.model,name:account_payment.model_payment_order_create
msgid "payment.order.create"
msgstr ""
#. module: account_payment
#: field:payment.line,order_id:0
msgid "Order"
msgstr ""
#. module: account_payment
#: field:payment.order,total:0
msgid "Total"
msgstr ""
#. module: account_payment
#: view:account.payment.make.payment:0
#: model:ir.actions.act_window,name:account_payment.action_account_payment_make_payment
msgid "Make Payment"
msgstr ""
#. module: account_payment
#: field:payment.line,partner_id:0
#: report:payment.order:0
msgid "Partner"
msgstr ""
#. module: account_payment
#: model:ir.actions.act_window,name:account_payment.action_create_payment_order
msgid "Populate Payment"
msgstr ""
#. module: account_payment
#: help:payment.mode,bank_id:0
msgid "Bank Account for the Payment Mode"
msgstr ""
#. module: account_payment
#: constraint:account.move.line:0
msgid "You can not create move line on view account."
msgstr ""

View File

@ -14,7 +14,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2011-08-20 04:53+0000\n"
"X-Launchpad-Export-Date: 2011-08-23 05:05+0000\n"
"X-Generator: Launchpad (build 13697)\n"
#. module: account_sequence

View File

@ -20,8 +20,9 @@
##############################################################################
import account_voucher
import company
import invoice
import report
import wizard
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -25,15 +25,22 @@
"author" : 'OpenERP SA',
'complexity': "normal",
"description": """
Account Voucher module includes all the basic requirements of Voucher Entries for Bank, Cash, Sales, Purchase, Expanse, Contra, etc.
====================================================================================================================================
Account Voucher module offers an easy way to deal with all the basic requirements of Voucher Entries
====================================================================================================
* Voucher Entry
* Voucher Receipt
* Cheque Register
Its increased usabililty allows you to create easily sales/purchases documents but also to encode payments.
Doing so, you'll be able to see all the open transactions for the selected partner and that will help you
to reconcile your entry with its invoice.
Account Voucher module multi-currency support
=============================================
Thanks to the contribution of Camptocamp, the vouchers fully support the multi currency and compute the
currency rate difference besides the write off amount. Of course, the accounting entries are also created
accordingly.
""",
"category" : "Finance",
"website" : "http://tinyerp.com",
"website" : "http://www.openerp.com",
"images" : ["images/customer_payment.jpeg","images/journal_voucher.jpeg","images/sales_receipt.jpeg","images/supplier_voucher.jpeg"],
"depends" : ["account"],
"init_xml" : [],
@ -48,6 +55,7 @@ Account Voucher module includes all the basic requirements of Voucher Entries fo
"wizard/account_voucher_unreconcile_view.xml",
"wizard/account_statement_from_invoice_view.xml",
"account_voucher_view.xml",
"company_view.xml",
"voucher_payment_receipt_view.xml",
"voucher_sales_purchase_view.xml",
"account_voucher_wizard.xml",
@ -59,7 +67,12 @@ Account Voucher module includes all the basic requirements of Voucher Entries fo
"test/account_voucher.yml",
"test/sales_receipt.yml",
"test/sales_payment.yml",
"test/account_voucher_report.yml"
"test/account_voucher_report.yml",
"test/case1_usd_usd.yml",
"test/case2_usd_eur.yml",
"test/case2_suppl_usd_eur.yml",
"test/case3_eur_eur.yml",
"test/case4_cad_chf.yml",
],
'certificate': '0037580727101',
"active": False,

View File

@ -39,7 +39,10 @@ class account_voucher(osv.osv):
if context is None: context = {}
if context.get('period_id', False):
return context.get('period_id')
periods = self.pool.get('account.period').find(cr, uid)
if context.get('invoice_id', False):
company_id = self.pool.get('account.invoice').browse(cr, uid, context['invoice_id'], context=context).company_id.id
context.update({'company_id': company_id})
periods = self.pool.get('account.period').find(cr, uid, context=context)
return periods and periods[0] or False
def _get_journal(self, cr, uid, context=None):
@ -142,39 +145,92 @@ class account_voucher(osv.osv):
res['arch'] = etree.tostring(doc)
return res
def _compute_writeoff_amount(self, cr, uid, line_dr_ids, line_cr_ids, amount):
debit = credit = 0.0
def _compute_writeoff_amount(self, cr, uid, line_dr_ids, line_cr_ids, amount, voucher_date, context=None):
if context is None:
context = {}
currency_pool = self.pool.get('res.currency')
ctx = context.copy()
voucher_type = context.get('type', False)
counter_for_writeoff = counter_for_currency_diff = real_amount = 0.0
ctx.update({'date': voucher_date})
for l in line_dr_ids:
debit += l['amount']
#compute the amount in voucher currency and in company currency if there aren't set yet
if not l.get('amount_in_company_currency', False):
ctx.update({'date': l['date_original']})
amount_in_company_currency = currency_pool.compute(cr, uid, l['currency_id'], l['company_currency_id'], l['amount'], context=ctx)
ctx.update({'date': voucher_date})
else:
amount_in_company_currency = l.get('amount_in_company_currency', 0.0)
if not l.get('amount_in_voucher_currency'):
amount_in_voucher_currency = currency_pool.compute(cr, uid, l['currency_id'], l['voucher_currency_id'], l['amount'], context=ctx)
else:
amount_in_voucher_currency = l.get('amount_in_voucher_currency', 0.0)
real_amount -= amount_in_company_currency
counter_for_writeoff -= l.get('voucher_currency_id') == l.get('currency_id') and l['amount'] or amount_in_voucher_currency
counter_for_currency_diff -= currency_pool.compute(cr, uid, l['currency_id'], l['company_currency_id'], l['amount'], context=ctx)
for l in line_cr_ids:
credit += l['amount']
return abs(amount - abs(credit - debit))
#compute the amount in voucher currency and in company currency if there aren't set yet
if not l.get('amount_in_company_currency', False):
ctx.update({'date': l['date_original']})
amount_in_company_currency = currency_pool.compute(cr, uid, l['currency_id'], l['company_currency_id'], l['amount'], context=ctx)
ctx.update({'date': voucher_date})
else:
amount_in_company_currency = l.get('amount_in_company_currency', 0.0)
if not l.get('amount_in_voucher_currency'):
amount_in_voucher_currency = currency_pool.compute(cr, uid, l['currency_id'], l['voucher_currency_id'], l['amount'], context=ctx)
else:
amount_in_voucher_currency = l.get('amount_in_voucher_currency', 0.0)
real_amount += amount_in_company_currency
counter_for_writeoff += l.get('voucher_currency_id') == l.get('currency_id') and l['amount'] or amount_in_voucher_currency
counter_for_currency_diff += currency_pool.compute(cr, uid, l['currency_id'], l['company_currency_id'], l['amount'], context=ctx)
sign = voucher_type in ['sale','receipt'] and 1 or -1
writeoff_amount = (sign * amount) - counter_for_writeoff
currency_rate_difference = real_amount - counter_for_currency_diff
return writeoff_amount, currency_rate_difference
def onchange_line_ids(self, cr, uid, ids, line_dr_ids, line_cr_ids, amount, context=None):
context = context or {}
def onchange_line_ids(self, cr, uid, ids, line_dr_ids, line_cr_ids, amount, voucher_date, context=None):
if not line_dr_ids and not line_cr_ids:
return {'value':{}}
line_osv = self.pool.get("account.voucher.line")
line_dr_ids = resolve_o2m_operations(cr, uid, line_osv, line_dr_ids, ['amount'], context)
line_cr_ids = resolve_o2m_operations(cr, uid, line_osv, line_cr_ids, ['amount'], context)
return {'value': {'writeoff_amount': self._compute_writeoff_amount(cr, uid, line_dr_ids, line_cr_ids, amount)}}
writeoff_amount, currency_rate_diff = self._compute_writeoff_amount(cr, uid, line_dr_ids, line_cr_ids, amount, voucher_date, context=context)
return {'value': {'writeoff_amount': writeoff_amount, 'currency_rate_difference': currency_rate_diff}}
def _get_writeoff_amount(self, cr, uid, ids, name, args, context=None):
if not ids: return {}
res = {}
debit = credit = 0.0
if context is None:
context = {}
res = {}.fromkeys(ids,{})
counter_for_writeoff = counter_for_currency_diff = real_amount = 0.0
currency_pool = self.pool.get('res.currency')
for voucher in self.browse(cr, uid, ids, context=context):
ctx = context.copy()
ctx.update({'date': voucher.date})
for l in voucher.line_dr_ids:
debit += l.amount
real_amount -= l.amount_in_company_currency
counter_for_writeoff -= (l.voucher_currency_id.id == l.currency_id.id) and l.amount or l.amount_in_voucher_currency
counter_for_currency_diff -= currency_pool.compute(cr, uid, l.currency_id.id, voucher.company_id.currency_id.id, l.amount, context=ctx)
for l in voucher.line_cr_ids:
credit += l.amount
res[voucher.id] = abs(voucher.amount - abs(credit - debit))
real_amount += l.amount_in_company_currency
counter_for_writeoff += (l.voucher_currency_id.id == l.currency_id.id) and l.amount or l.amount_in_voucher_currency
counter_for_currency_diff += currency_pool.compute(cr, uid, l.currency_id.id, voucher.company_id.currency_id.id, l.amount, context=ctx)
sign = voucher.type in ['sale','receipt'] and 1 or -1
writeoff_amount = (sign * voucher.amount) - counter_for_writeoff
res[voucher.id]['writeoff_amount'] = writeoff_amount
res[voucher.id]['currency_rate_difference'] = real_amount - counter_for_currency_diff
return res
def _currency_id(self, cr, uid, ids, name, args, context=None):
res = {}
for voucher in self.browse(cr, uid, ids, context=context):
currency = voucher.journal_id.currency and voucher.journal_id.currency.id or voucher.company_id.currency_id.id
res[voucher.id] = {'currency_id': currency, 'currency_id2': currency}
return res
_name = 'account.voucher'
_description = 'Accounting Voucher'
_order = "date desc, id desc"
# _rec_name = 'number'
_columns = {
'type':fields.selection([
('sale','Sale'),
@ -184,7 +240,7 @@ class account_voucher(osv.osv):
],'Default Type', readonly=True, states={'draft':[('readonly',False)]}),
'name':fields.char('Memo', size=256, readonly=True, states={'draft':[('readonly',False)]}),
'date':fields.date('Date', readonly=True, select=True, states={'draft':[('readonly',False)]}, help="Effective date for accounting entries"),
'journal_id':fields.many2one('account.journal', 'Journal', required=True, readonly=True, states={'draft':[('readonly',False)]}),
'journal_id':fields.many2one('account.journal', 'Journal', required=True, readonly=True, states={'draft':[('readonly',False)]}, change_default=1),
'account_id':fields.many2one('account.account', 'Account', required=True, readonly=True, states={'draft':[('readonly',False)]}),
'line_ids':fields.one2many('account.voucher.line','voucher_id','Voucher Lines', readonly=True, states={'draft':[('readonly',False)]}),
'line_cr_ids':fields.one2many('account.voucher.line','voucher_id','Credits',
@ -193,9 +249,11 @@ class account_voucher(osv.osv):
domain=[('type','=','dr')], context={'default_type':'dr'}, readonly=True, states={'draft':[('readonly',False)]}),
'period_id': fields.many2one('account.period', 'Period', required=True, readonly=True, states={'draft':[('readonly',False)]}),
'narration':fields.text('Notes', readonly=True, states={'draft':[('readonly',False)]}),
'currency_id':fields.many2one('res.currency', 'Currency', required=True, readonly=True, states={'draft':[('readonly',False)]}),
# 'currency_id': fields.related('journal_id','currency', type='many2one', relation='res.currency', string='Currency', store=True, readonly=True, states={'draft':[('readonly',False)]}),
'company_id': fields.many2one('res.company', 'Company', required=True, readonly=True, states={'draft':[('readonly',False)]}),
'currency_id': fields.function(_currency_id, type='many2one', relation='res.currency', string='Currency', store=True, readonly=True, multi="currency"),
#duplicated field for display purposes
'currency_id2': fields.function(_currency_id, type='many2one', relation='res.currency', string='Currency', store=True, readonly=True, multi="currency"),
'company_id': fields.related('journal_id', 'company_id', type='many2one', relation='res.company', string='Company', store=True, readonly=True),
'company_currency': fields.related('company_id','currency_id', type='many2one', relation='res.currency', string='Currency', readonly=True),
'state':fields.selection(
[('draft','Draft'),
('proforma','Pro-forma'),
@ -223,12 +281,13 @@ class account_voucher(osv.osv):
'date_due': fields.date('Due Date', readonly=True, select=True, states={'draft':[('readonly',False)]}),
'payment_option':fields.selection([
('without_writeoff', 'Keep Open'),
('with_writeoff', 'Reconcile with Write-Off'),
('with_writeoff', 'Reconcile'),
], 'Payment Difference', required=True, readonly=True, states={'draft': [('readonly', False)]}),
'writeoff_acc_id': fields.many2one('account.account', 'Write-Off account', readonly=True, states={'draft': [('readonly', False)]}),
'comment': fields.char('Write-Off Comment', size=64, required=True, readonly=True, states={'draft': [('readonly', False)]}),
'analytic_id': fields.many2one('account.analytic.account','Write-Off Analytic Account', readonly=True, states={'draft': [('readonly', False)]}),
'writeoff_amount': fields.function(_get_writeoff_amount, string='Write-Off Amount', type='float', readonly=True),
'writeoff_amount': fields.function(_get_writeoff_amount, string='Write-Off Amount', type='float', readonly=True, multi="writeoff"),
'currency_rate_difference': fields.function(_get_writeoff_amount, string="Currency Rate Difference", type='float', multi="writeoff"),
}
_defaults = {
'period_id': _get_period,
@ -253,7 +312,7 @@ class account_voucher(osv.osv):
tax_pool = self.pool.get('account.tax')
partner_pool = self.pool.get('res.partner')
position_pool = self.pool.get('account.fiscal.position')
voucher_line_pool = self.pool.get('account.voucher.line')
voucher_voucher_line_obj = self.pool.get('account.voucher.line')
voucher_pool = self.pool.get('account.voucher')
if context is None: context = {}
@ -262,7 +321,7 @@ class account_voucher(osv.osv):
for line in voucher.line_ids:
voucher_amount += line.untax_amount or line.amount
line.amount = line.untax_amount or line.amount
voucher_line_pool.write(cr, uid, [line.id], {'amount':line.amount, 'untax_amount':line.untax_amount})
voucher_voucher_line_obj.write(cr, uid, [line.id], {'amount':line.amount, 'untax_amount':line.untax_amount})
if not voucher.tax_id:
self.write(cr, uid, [voucher.id], {'amount':voucher_amount, 'tax_amount':0.0})
@ -290,7 +349,7 @@ class account_voucher(osv.osv):
line_total += tax_line.get('price_unit')
total_tax += line_tax
untax_amount = line.untax_amount or line.amount
voucher_line_pool.write(cr, uid, [line.id], {'amount':line_total, 'untax_amount':untax_amount})
voucher_voucher_line_obj.write(cr, uid, [line.id], {'amount':line_total, 'untax_amount':untax_amount})
self.write(cr, uid, [voucher.id], {'amount':total, 'tax_amount':total_tax})
return True
@ -300,14 +359,14 @@ class account_voucher(osv.osv):
tax_pool = self.pool.get('account.tax')
partner_pool = self.pool.get('res.partner')
position_pool = self.pool.get('account.fiscal.position')
line_pool = self.pool.get('account.voucher.line')
voucher_line_obj = self.pool.get('account.voucher.line')
res = {
'tax_amount': False,
'amount': False,
}
voucher_total = 0.0
line_ids = resolve_o2m_operations(cr, uid, line_pool, line_ids, ["amount"], context)
line_ids = resolve_o2m_operations(cr, uid, voucher_line_obj, line_ids, ["amount"], context)
total = 0.0
total_tax = 0.0
@ -396,7 +455,7 @@ class account_voucher(osv.osv):
return default
def onchange_partner_id(self, cr, uid, ids, partner_id, journal_id, price, currency_id, ttype, date, context=None):
def onchange_partner_id(self, cr, uid, ids, partner_id, journal_id, price, voucher_currency_id, ttype, date, context=None):
"""price
Returns a dict that contains new values and context
@ -406,38 +465,33 @@ class account_voucher(osv.osv):
@return: Returns a dict which contains new values, and context
"""
if context is None:
context = {}
if not journal_id:
return {}
if context is None:
context = {}
context_multi_currency = context.copy()
if date:
context_multi_currency.update({'date': date})
line_pool = self.pool.get('account.voucher.line')
line_ids = ids and line_pool.search(cr, uid, [('voucher_id', '=', ids[0])]) or False
if line_ids:
line_pool.unlink(cr, uid, line_ids)
currency_pool = self.pool.get('res.currency')
move_line_pool = self.pool.get('account.move.line')
move_line_obj = self.pool.get('account.move.line')
partner_pool = self.pool.get('res.partner')
journal_pool = self.pool.get('account.journal')
vals = self.onchange_journal(cr, uid, ids, journal_id, [], False, partner_id, context)
vals = vals.get('value')
currency_id = vals.get('currency_id', currency_id)
voucher_line_obj = self.pool.get('account.voucher.line')
#get default values
vals = self.onchange_journal(cr, uid, ids, journal_id, [], False, partner_id, context=context)
vals = vals.get('value',{})
voucher_currency_id = vals.get('currency_id', voucher_currency_id)
default = {
'value':{'line_ids':[], 'line_dr_ids':[], 'line_cr_ids':[], 'pre_line': False, 'currency_id':currency_id},
'value':{'line_ids':[], 'line_dr_ids':[], 'line_cr_ids':[], 'pre_line': False, 'currency_id': voucher_currency_id},
}
if not partner_id:
return default
#drop existing lines
line_ids = ids and voucher_line_obj.search(cr, uid, [('voucher_id', 'in', ids)]) or []
if line_ids:
voucher_line_obj.unlink(cr, uid, line_ids, context=context)
if not partner_id and ids:
line_ids = line_pool.search(cr, uid, [('voucher_id', '=', ids[0])])
if line_ids:
line_pool.unlink(cr, uid, line_ids)
if not partner_id:
return default
journal = journal_pool.browse(cr, uid, journal_id, context=context)
@ -455,63 +509,98 @@ class account_voucher(osv.osv):
if journal.type not in ('cash', 'bank'):
return default
total_credit = 0.0
total_debit = 0.0
account_type = 'receivable'
if ttype == 'payment':
account_type = 'payable'
total_debit = price or 0.0
else:
total_credit = price or 0.0
account_type = 'receivable'
if not context.get('move_line_ids', False):
ids = move_line_pool.search(cr, uid, [('state','=','valid'), ('account_id.type', '=', account_type), ('reconcile_id', '=', False), ('partner_id', '=', partner_id)], context=context)
ids = move_line_obj.search(cr, uid, [('state','=','valid'), ('account_id.type', '=', account_type), ('reconcile_id', '=', False), ('partner_id', '=', partner_id)], context=context)
else:
ids = context['move_line_ids']
ids.reverse()
moves = move_line_pool.browse(cr, uid, ids, context=context)
#computation of the assignation of voucher amount on voucher lines
total_credit = account_type == 'receivable' and price or 0.0
total_debit = account_type == 'payable' and price or 0.0
moves = move_line_obj.browse(cr, uid, ids, context=context)
company_currency = journal.company_id.currency_id.id
if company_currency != currency_id and ttype == 'payment':
total_debit = currency_pool.compute(cr, uid, currency_id, company_currency, total_debit, context=context_multi_currency)
elif company_currency != currency_id and ttype == 'receipt':
total_credit = currency_pool.compute(cr, uid, currency_id, company_currency, total_credit, context=context_multi_currency)
invoice_id = context.get('invoice_id', False)
move_line_found = False
#order the lines by most old first
ids.reverse()
for line in moves:
if line.credit and line.reconcile_partial_id and ttype == 'receipt':
continue
if line.debit and line.reconcile_partial_id and ttype == 'payment':
continue
total_credit += line.credit or 0.0
total_debit += line.debit or 0.0
if invoice_id:
if line.invoice.id == invoice_id:
#if the invoice linked to the voucher line is equal to the invoice_id in context
#then we assign the amount on that line, whatever the other voucher lines
move_line_found = line.id
break
elif voucher_currency_id == company_currency:
#otherwise treatments is the same but with other field names
if line.amount_residual == price:
#if the amount residual is equal the amount voucher, we assign it to that voucher
#line, whatever the other voucher lines
move_line_found = line.id
break
#otherwise we will split the voucher amount on each line (by most old first)
total_credit += line.credit or 0.0
total_debit += line.debit or 0.0
elif voucher_currency_id == line.currency_id.id:
if line.amount_residual_currency == price:
move_line_found = line.id
break
total_credit += line.credit and line.amount_currency or 0.0
total_debit += line.debit and line.amount_currency or 0.0
#voucher line creation
for line in moves:
if line.credit and line.reconcile_partial_id and ttype == 'receipt':
continue
if line.debit and line.reconcile_partial_id and ttype == 'payment':
continue
original_amount = line.credit or line.debit or 0.0
amount_unreconciled = currency_pool.compute(cr, uid, line.currency_id and line.currency_id.id or company_currency, currency_id, abs(line.amount_residual_currency), context=context_multi_currency)
amount_original, amount_unreconciled = voucher_line_obj._get_amounts(cr, uid, line, context=context)
currency_id = line.currency_id and line.currency_id.id or line.company_id.currency_id.id
rs = {
'name':line.move_id.name,
'type': line.credit and 'dr' or 'cr',
'move_line_id':line.id,
'account_id':line.account_id.id,
'amount_original': currency_pool.compute(cr, uid, line.currency_id and line.currency_id.id or company_currency, currency_id, line.currency_id and abs(line.amount_currency) or original_amount, context=context_multi_currency),
'amount_original': amount_original,
'amount': (move_line_found == line.id) and min(price, amount_unreconciled) or 0.0,
'currency_id': currency_id,
'voucher_currency_id': voucher_currency_id,
'date_original':line.date,
'company_currency_id': line.company_id.currency_id.id,
'date_due':line.date_maturity,
'amount_unreconciled': amount_unreconciled,
}
if line.credit:
amount = min(amount_unreconciled, currency_pool.compute(cr, uid, company_currency, currency_id, abs(total_debit), context=context_multi_currency))
rs['amount'] = amount
total_debit -= amount
else:
amount = min(amount_unreconciled, currency_pool.compute(cr, uid, company_currency, currency_id, abs(total_credit), context=context_multi_currency))
rs['amount'] = amount
total_credit -= amount
#split voucher amount by most old first
if not move_line_found:
if company_currency == voucher_currency_id:
if line.credit:
amount = min(amount_unreconciled, abs(total_debit))
rs['amount'] = amount
total_debit -= amount
else:
amount = min(amount_unreconciled, abs(total_credit))
rs['amount'] = amount
total_credit -= amount
elif voucher_currency_id == line.currency_id.id:
if line.credit:
amount = min(amount_unreconciled, abs(total_debit))
rs['amount'] = amount
total_debit -= amount
else:
amount = min(amount_unreconciled, abs(total_credit))
rs['amount'] = amount
total_credit -= amount
default['value']['line_ids'].append(rs)
if rs['type'] == 'cr':
@ -523,7 +612,7 @@ class account_voucher(osv.osv):
default['value']['pre_line'] = 1
elif ttype == 'receipt' and len(default['value']['line_dr_ids']) > 0:
default['value']['pre_line'] = 1
default['value']['writeoff_amount'] = self._compute_writeoff_amount(cr, uid, default['value']['line_dr_ids'], default['value']['line_cr_ids'], price)
default['value']['writeoff_amount'], default['value']['currency_rate_difference'] = self._compute_writeoff_amount(cr, uid, default['value']['line_dr_ids'], default['value']['line_cr_ids'], price, date, context=context)
return default
def onchange_date(self, cr, uid, ids, partner_id, journal_id, price, currency_id, ttype, date, context=None):
@ -533,9 +622,13 @@ class account_voucher(osv.osv):
@param context: context arguments, like lang, time zone
@return: Returns a dict which contains new values, and context
"""
if context is None: context = {}
period_pool = self.pool.get('account.period')
res = self.onchange_partner_id(cr, uid, ids, partner_id, journal_id, price, currency_id, ttype, date, context=context)
pids = period_pool.search(cr, uid, [('date_start', '<=', date), ('date_stop', '>=', date)])
if context.get('invoice_id', False):
company_id = self.pool.get('account.invoice').browse(cr, uid, context['invoice_id'], context=context).company_id.id
context.update({'company_id': company_id})
pids = period_pool.find(cr, uid, date, context=context)
if pids:
if not 'value' in res:
res['value'] = {}
@ -543,8 +636,9 @@ class account_voucher(osv.osv):
return res
def onchange_journal(self, cr, uid, ids, journal_id, line_ids, tax_id, partner_id, context=None):
if context is None: context = {}
if not journal_id:
return False
return {}
journal_pool = self.pool.get('account.journal')
journal = journal_pool.browse(cr, uid, journal_id, context=context)
account_id = journal.default_credit_account_id or journal.default_debit_account_id
@ -558,6 +652,10 @@ class account_voucher(osv.osv):
if journal.currency:
currency_id = journal.currency.id
vals['value'].update({'currency_id':currency_id})
context.update({'company_id': journal.company_id.id})
periods = self.pool.get('account.period').find(cr, uid, context=context)
if periods:
vals['value'].update({'period_id':periods[0]})
return vals
def proforma_voucher(self, cr, uid, ids, context=None):
@ -601,7 +699,6 @@ class account_voucher(osv.osv):
raise osv.except_osv(_('Invalid action !'), _('Cannot delete Voucher(s) which are already opened or paid !'))
return super(account_voucher, self).unlink(cr, uid, ids, context=context)
# TODO: may be we can remove this method if not used anyware
def onchange_payment(self, cr, uid, ids, pay_now, journal_id, partner_id, ttype='sale'):
res = {}
if not partner_id:
@ -632,48 +729,44 @@ class account_voucher(osv.osv):
if context is None:
context = {}
move_pool = self.pool.get('account.move')
move_line_pool = self.pool.get('account.move.line')
move_line_obj = self.pool.get('account.move.line')
currency_pool = self.pool.get('res.currency')
tax_obj = self.pool.get('account.tax')
seq_obj = self.pool.get('ir.sequence')
for inv in self.browse(cr, uid, ids, context=context):
if inv.move_id:
for voucher in self.browse(cr, uid, ids, context=context):
if voucher.move_id:
continue
context_multi_currency = context.copy()
context_multi_currency.update({'date': inv.date})
context_multi_currency.update({'date': voucher.date})
if inv.number:
name = inv.number
elif inv.journal_id.sequence_id:
name = seq_obj.get_id(cr, uid, inv.journal_id.sequence_id.id)
if voucher.number:
name = voucher.number
else:
raise osv.except_osv(_('Error !'), _('Please define a sequence on the journal !'))
if not inv.reference:
name = seq_obj.get_id(cr, uid, voucher.journal_id.sequence_id.id)
if not voucher.reference:
ref = name.replace('/','')
else:
ref = inv.reference
ref = voucher.reference
move = {
'name': name,
'journal_id': inv.journal_id.id,
'narration': inv.narration,
'date': inv.date,
'journal_id': voucher.journal_id.id,
'narration': voucher.narration,
'date': voucher.date,
'ref': ref,
'period_id': inv.period_id and inv.period_id.id or False
'period_id': voucher.period_id and voucher.period_id.id or False
}
move_id = move_pool.create(cr, uid, move)
#create the first line manually
company_currency = inv.journal_id.company_id.currency_id.id
current_currency = inv.currency_id.id
company_currency = voucher.journal_id.company_id.currency_id.id
voucher_currency = voucher.currency_id.id
debit = 0.0
credit = 0.0
# TODO: is there any other alternative then the voucher type ??
# -for sale, purchase we have but for the payment and receipt we do not have as based on the bank/cash journal we can not know its payment or receipt
if inv.type in ('purchase', 'payment'):
credit = currency_pool.compute(cr, uid, current_currency, company_currency, inv.amount, context=context_multi_currency)
elif inv.type in ('sale', 'receipt'):
debit = currency_pool.compute(cr, uid, current_currency, company_currency, inv.amount, context=context_multi_currency)
if voucher.type in ('purchase', 'payment'):
credit = currency_pool.compute(cr, uid, voucher_currency, company_currency, voucher.amount, context=context_multi_currency)
elif voucher.type in ('sale', 'receipt'):
debit = currency_pool.compute(cr, uid, voucher_currency, company_currency, voucher.amount, context=context_multi_currency)
if debit < 0:
credit = -debit
debit = 0.0
@ -683,28 +776,48 @@ class account_voucher(osv.osv):
sign = debit - credit < 0 and -1 or 1
#create the first line of the voucher
move_line = {
'name': inv.name or '/',
'name': voucher.name or '/',
'debit': debit,
'credit': credit,
'account_id': inv.account_id.id,
'account_id': voucher.account_id.id,
'move_id': move_id,
'journal_id': inv.journal_id.id,
'period_id': inv.period_id.id,
'partner_id': inv.partner_id.id,
'currency_id': company_currency <> current_currency and current_currency or False,
'amount_currency': company_currency <> current_currency and sign * inv.amount or 0.0,
'date': inv.date,
'date_maturity': inv.date_due
'journal_id': voucher.journal_id.id,
'period_id': voucher.period_id.id,
'partner_id': voucher.partner_id.id,
'currency_id': company_currency <> voucher_currency and voucher_currency or False,
'amount_currency': company_currency <> voucher_currency and sign * voucher.amount or 0.0,
'date': voucher.date,
'date_maturity': voucher.date_due
}
move_line_pool.create(cr, uid, move_line)
rec_list_ids = []
line_total = debit - credit
if inv.type == 'sale':
line_total = line_total - currency_pool.compute(cr, uid, inv.currency_id.id, company_currency, inv.tax_amount, context=context_multi_currency)
elif inv.type == 'purchase':
line_total = line_total + currency_pool.compute(cr, uid, inv.currency_id.id, company_currency, inv.tax_amount, context=context_multi_currency)
move_line_obj.create(cr, uid, move_line)
for line in inv.line_ids:
#create the move line for the currency difference
if voucher.currency_rate_difference:
if voucher.currency_rate_difference > 0:
account_id = voucher.company_id.property_expense_currency_exchange
if not account_id:
raise osv.except_osv(_('Warning'),_("Unable to create accounting entry for currency rate difference. You have to configure the field 'Income Currency Rate' on the company! "))
else:
account_id = voucher.company_id.property_income_currency_exchange
if not account_id:
raise osv.except_osv(_('Warning'),_("Unable to create accounting entry for currency rate difference. You have to configure the field 'Expense Currency Rate' on the company! "))
currency_diff_line = {
'name': _('Currency Difference'),
'debit': voucher.currency_rate_difference > 0 and voucher.currency_rate_difference or 0.0,
'credit': voucher.currency_rate_difference < 0 and -voucher.currency_rate_difference or 0.0,
'account_id': account_id.id,
'move_id': move_id,
'journal_id': voucher.journal_id.id,
'period_id': voucher.period_id.id,
'partner_id': voucher.partner_id.id,
'date': voucher.date,
'date_maturity': voucher.date_due
}
move_line_obj.create(cr, uid, currency_diff_line, context=context)
rec_list_ids = []
for line in voucher.line_ids:
#create one move line per voucher line where amount is not 0.0
if not line.amount:
continue
@ -712,20 +825,20 @@ class account_voucher(osv.osv):
if line.amount == line.amount_unreconciled:
amount = line.move_line_id.amount_residual #residual amount in company currency
else:
amount = currency_pool.compute(cr, uid, current_currency, company_currency, line.untax_amount or line.amount, context=context_multi_currency)
amount = line.amount_in_company_currency
move_line = {
'journal_id': inv.journal_id.id,
'period_id': inv.period_id.id,
'journal_id': voucher.journal_id.id,
'period_id': voucher.period_id.id,
'name': line.name or '/',
'account_id': line.account_id.id,
'move_id': move_id,
'partner_id': inv.partner_id.id,
'currency_id': company_currency <> current_currency and current_currency or False,
'partner_id': voucher.partner_id.id,
'currency_id': company_currency <> line.currency_id.id and line.currency_id.id or False,
'analytic_account_id': line.account_analytic_id and line.account_analytic_id.id or False,
'quantity': 1,
'credit': 0.0,
'debit': 0.0,
'date': inv.date
'date': voucher.date
}
if amount < 0:
amount = -amount
@ -734,60 +847,59 @@ class account_voucher(osv.osv):
else:
line.type = 'dr'
if (line.type=='dr'):
line_total += amount
move_line['debit'] = amount
else:
line_total -= amount
move_line['credit'] = amount
if inv.tax_id and inv.type in ('sale', 'purchase'):
if voucher.tax_id and voucher.type in ('sale', 'purchase'):
move_line.update({
'account_tax_id': inv.tax_id.id,
'account_tax_id': voucher.tax_id.id,
})
if move_line.get('account_tax_id', False):
tax_data = tax_obj.browse(cr, uid, [move_line['account_tax_id']], context=context)[0]
if not (tax_data.base_code_id and tax_data.tax_code_id):
raise osv.except_osv(_('No Account Base Code and Account Tax Code!'),_("You have to configure account base code and account tax code on the '%s' tax!") % (tax_data.name))
sign = (move_line['debit'] - move_line['credit']) < 0 and -1 or 1
move_line['amount_currency'] = company_currency <> current_currency and sign * line.amount or 0.0
voucher_line = move_line_pool.create(cr, uid, move_line)
move_line['amount_currency'] = company_currency <> line.currency_id.id and sign * line.amount or 0.0
voucher_line = move_line_obj.create(cr, uid, move_line)
if line.move_line_id.id:
rec_ids = [voucher_line, line.move_line_id.id]
rec_list_ids.append(rec_ids)
if not currency_pool.is_zero(cr, uid, inv.currency_id, line_total):
diff = line_total
if not currency_pool.is_zero(cr, uid, voucher.currency_id, voucher.writeoff_amount):
#create one line for the write off if needed
diff = currency_pool.compute(cr, uid, voucher_currency, company_currency, voucher.writeoff_amount, context=context_multi_currency)
account_id = False
write_off_name = ''
if inv.payment_option == 'with_writeoff':
account_id = inv.writeoff_acc_id.id
write_off_name = inv.comment
elif inv.type in ('sale', 'receipt'):
account_id = inv.partner_id.property_account_receivable.id
if voucher.payment_option == 'with_writeoff':
account_id = voucher.writeoff_acc_id.id
write_off_name = voucher.comment
elif voucher.type in ('sale', 'receipt'):
account_id = voucher.partner_id.property_account_receivable.id
else:
account_id = inv.partner_id.property_account_payable.id
account_id = voucher.partner_id.property_account_payable.id
move_line = {
'name': write_off_name or name,
'account_id': account_id,
'move_id': move_id,
'partner_id': inv.partner_id.id,
'date': inv.date,
'credit': diff > 0 and diff or 0.0,
'partner_id': voucher.partner_id.id,
'date': voucher.date,
'debit': diff < 0 and -diff or 0.0,
#'amount_currency': company_currency <> current_currency and currency_pool.compute(cr, uid, company_currency, current_currency, diff * -1, context=context_multi_currency) or 0.0,
#'currency_id': company_currency <> current_currency and current_currency or False,
'credit': diff > 0 and diff or 0.0,
'amount_currency': company_currency <> voucher_currency and -voucher.writeoff_amount or 0.0,
'currency_id': company_currency <> voucher_currency and voucher_currency or False,
}
move_line_pool.create(cr, uid, move_line)
self.write(cr, uid, [inv.id], {
move_line_obj.create(cr, uid, move_line)
self.write(cr, uid, [voucher.id], {
'move_id': move_id,
'state': 'posted',
'number': name,
})
if inv.journal_id.entry_posted:
if voucher.journal_id.entry_posted:
move_pool.post(cr, uid, [move_id], context={})
for rec_ids in rec_list_ids:
if len(rec_ids) >= 2:
move_line_pool.reconcile_partial(cr, uid, rec_ids)
move_line_obj.reconcile_partial(cr, uid, rec_ids)
return True
def copy(self, cr, uid, id, default={}, context=None):
@ -810,43 +922,86 @@ class account_voucher_line(osv.osv):
_description = 'Voucher Lines'
_order = "move_line_id"
def _currency_id(self, cr, uid, ids, name, args, context=None):
res = {}
for line in self.browse(cr, uid, ids, context=context):
move_line = line.move_line_id
if move_line:
res[line.id] = move_line.currency_id and move_line.currency_id.id or move_line.company_id.currency_id.id
else:
res[line.id] = line.voucher_id.currency_id.id
return res
def _get_amounts(self, cr, uid, line_browse_rec, context=None):
if line_browse_rec.currency_id:
amount_original = line_browse_rec.amount_currency or 0.0
amount_unreconciled = line_browse_rec.amount_residual_currency
elif line_browse_rec.credit > 0:
amount_original = line_browse_rec.credit or 0.0
amount_unreconciled = line_browse_rec.amount_residual
else:
amount_original = line_browse_rec.debit or 0.0
amount_unreconciled = line_browse_rec.amount_residual
return amount_original, amount_unreconciled
def _compute_balance(self, cr, uid, ids, name, args, context=None):
currency_pool = self.pool.get('res.currency')
rs_data = {}
res = {}
for line in self.browse(cr, uid, ids, context=context):
ctx = context.copy()
ctx.update({'date': line.voucher_id.date})
res = {}
company_currency = line.voucher_id.journal_id.company_id.currency_id.id
voucher_currency = line.voucher_id.currency_id.id
move_line = line.move_line_id or False
amount_original, amount_unreconciled = self._get_amounts(cr, uid, line.move_line_id, context)
res[line.id] = {
'amount_original': amount_original,
'amount_unreconciled': amount_unreconciled,
}
if not move_line:
res['amount_original'] = 0.0
res['amount_unreconciled'] = 0.0
return res
elif move_line.currency_id:
res['amount_original'] = currency_pool.compute(cr, uid, move_line.currency_id.id, voucher_currency, move_line.amount_currency, context=ctx)
elif move_line and move_line.credit > 0:
res['amount_original'] = currency_pool.compute(cr, uid, company_currency, voucher_currency, move_line.credit, context=ctx)
else:
res['amount_original'] = currency_pool.compute(cr, uid, company_currency, voucher_currency, move_line.debit, context=ctx)
def __company_currency_amount(self, cr, uid, line, amount, context=None):
if context is None:
context = {}
ctx = context.copy()
ctx.update({'date': line.date_original})
currency_pool = self.pool.get('res.currency')
amount_company_cur = currency_pool.compute(cr, uid, line.currency_id.id, line.company_currency_id.id, amount, context=ctx)
ctx.update({'date': line.voucher_id.date})
amount_voucher_cur = currency_pool.compute(cr, uid, line.currency_id.id, line.voucher_currency_id.id, amount, context=ctx)
return amount_company_cur, amount_voucher_cur
if move_line:
res['amount_unreconciled'] = currency_pool.compute(cr, uid, move_line.currency_id and move_line.currency_id.id or company_currency, voucher_currency, abs(move_line.amount_residual_currency), context=ctx)
rs_data[line.id] = res
return rs_data
def onchange_amount(self, cr, uid, ids, amount, context=None):
if not amount or not ids:
return {'value':{'amount_in_company_currency': 0.0, 'amount_in_voucher_currency': 0.0}}
for line in self.browse(cr, uid, ids, context=context):
amount_company_cur, amount_voucher_cur = self.__company_currency_amount(cr, uid, line, amount, context=context)
return {'value': {'amount_in_company_currency': amount_company_cur, 'amount_in_voucher_currency': amount_voucher_cur}}
def _get_amount_in_company_currency(self, cr, uid, ids, name, args, context=None):
res = {}
for line in self.browse(cr, uid, ids, context=context):
amount_in_company_currency, amount_in_voucher_currency = self.__company_currency_amount(cr, uid, line, line.amount, context=context)
res[line.id] = {
'amount_in_company_currency': amount_in_company_currency,
'amount_in_voucher_currency': amount_in_voucher_currency,
}
return res
_columns = {
'voucher_id':fields.many2one('account.voucher', 'Voucher', required=1, ondelete='cascade'),
'move_line_id': fields.many2one('account.move.line', 'Journal Item'),
'type':fields.selection([('dr','Debit'),('cr','Credit')], 'Dr/Cr'),
'name':fields.char('Description', size=256),
'account_id':fields.many2one('account.account','Account', required=True),
'account_analytic_id': fields.many2one('account.analytic.account', 'Analytic Account'),
'partner_id':fields.related('voucher_id', 'partner_id', type='many2one', relation='res.partner', string='Partner'),
'untax_amount':fields.float('Untax Amount'),
'currency_id': fields.function(_currency_id, string='Currency', type='many2one', relation='res.currency'),
'company_currency_id': fields.related('move_line_id','company_id','currency_id', type='many2one', relation='res.currency', string="Company Currency"),
'voucher_currency_id': fields.related('voucher_id', 'currency_id', type='many2one', relation='res.currency', string="Voucher Currency"),
'amount':fields.float('Amount', digits_compute=dp.get_precision('Account')),
'type':fields.selection([('dr','Debit'),('cr','Credit')], 'Dr/Cr'),
'account_analytic_id': fields.many2one('account.analytic.account', 'Analytic Account'),
'move_line_id': fields.many2one('account.move.line', 'Journal Item'),
'amount_in_company_currency': fields.function(_get_amount_in_company_currency, string='Amount in Company Currency', type='float', digits_compute=dp.get_precision('Account'), multi="voucher_line_amount"),
'amount_in_voucher_currency': fields.function(_get_amount_in_company_currency, string='Amount in Voucher Currency', type='float', digits_compute=dp.get_precision('Account'), multi="voucher_line_amount"),
'date_original': fields.related('move_line_id','date', type='date', relation='account.move.line', string='Date', readonly=1),
'date_due': fields.related('move_line_id','date_maturity', type='date', relation='account.move.line', string='Due Date', readonly=1),
'amount_original': fields.function(_compute_balance, multi='dc', type='float', string='Original Amount', store=True),
@ -868,9 +1023,9 @@ class account_voucher_line(osv.osv):
@return: Returns a dict which contains new values, and context
"""
res = {}
move_line_pool = self.pool.get('account.move.line')
move_line_obj = self.pool.get('account.move.line')
if move_line_id:
move_line = move_line_pool.browse(cr, user, move_line_id, context=context)
move_line = move_line_obj.browse(cr, user, move_line_id, context=context)
if move_line.credit:
ttype = 'dr'
else:
@ -945,7 +1100,7 @@ class account_bank_statement(osv.osv):
bank_st_line_obj = self.pool.get('account.bank.statement.line')
st_line = bank_st_line_obj.browse(cr, uid, st_line_id, context=context)
if st_line.voucher_id:
voucher_obj.write(cr, uid, [st_line.voucher_id.id], {'number': next_number}, context=context)
voucher_obj.write(cr, uid, [st_line.voucher_id.id], {'number': next_number, 'date': st_line.date}, context=context)
if st_line.voucher_id.state == 'cancel':
voucher_obj.action_cancel_draft(cr, uid, [st_line.voucher_id.id], context=context)
wf_service.trg_validate(uid, 'account.voucher', st_line.voucher_id.id, 'proforma_voucher', cr)
@ -955,7 +1110,7 @@ class account_bank_statement(osv.osv):
'move_ids': [(4, v.move_id.id, False)]
})
return move_line_obj.write(cr, uid, [x.id for x in v.move_ids], {'statement_id': st_line.statement_id.id}, context=context)
return move_line_obj.write(cr, uid, [x.id for x in v.move_ids], {'statement_id': st_line.statement_id.id, 'date': st_line.date}, update_check=False, context=context)
return super(account_bank_statement, self).create_move_from_st_line(cr, uid, st_line.id, company_currency_id, next_number, context=context)
account_bank_statement()

View File

@ -43,7 +43,7 @@
<form string="Accounting Voucher">
<group col="6" colspan="4">
<field name="partner_id" required="1" on_change="onchange_journal_voucher(line_ids, tax_id, amount, partner_id, journal_id, type)"/>
<field name="date" on_change="onchange_date(partner_id, journal_id, amount, currency_id, type, date)"/>
<field name="date" on_change="onchange_date(partner_id, journal_id, amount, currency_id, type, date, context)"/>
<field name="journal_id" widget="selection" select="1" on_change="onchange_journal_voucher(line_ids, tax_id, amount, partner_id, journal_id, type)"/>
<field name="type" required="1"/>
<field name="name" colspan="2"/>

View File

@ -0,0 +1,45 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
from osv import fields, osv
class res_company(osv.osv):
_inherit = "res.company"
_columns = {
'property_income_currency_exchange': fields.property(
'account.account',
type='many2one',
relation='account.account',
string="Income Currency Rate",
view_load=True,
domain="[('type', '=', 'other')]",),
'property_expense_currency_exchange': fields.property(
'account.account',
type='many2one',
relation='account.account',
string="Expense Currency Rate",
view_load=True,
domain="[('type', '=', 'other')]",),
}
res_company()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record model="ir.ui.view" id="view_company_inherit_currency_xchange_form">
<field name="name">res.company.form.inherit</field>
<field name="inherit_id" ref="base.view_company_form"/>
<field name="model">res.company</field>
<field name="type">form</field>
<field name="arch" type="xml">
<field name="currency_id" position="after">
<field name="property_income_currency_exchange" colspan="2"/>
<field name="property_expense_currency_exchange" colspan="2"/>
</field>
</field>
</record>
</data>
</openerp>

View File

@ -45,10 +45,11 @@ class invoice(osv.osv):
'close_after_process': True,
'invoice_type':inv.type,
'invoice_id':inv.id,
'default_type': inv.type in ('out_invoice','out_refund') and 'receipt' or 'payment'
'default_type': inv.type in ('out_invoice','out_refund') and 'receipt' or 'payment',
'type': inv.type in ('out_invoice','out_refund') and 'receipt' or 'payment'
}
}
invoice()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -0,0 +1,355 @@
-
In order to check the Account_voucher module with multi-currency in OpenERP,
I create 2 Invoices in USD and make 2 Payments in USD based on the currency rating on that particular date
-
I create currency USD in OpenERP for January of 1.333333 Rate
-
!python {model: res.currency.rate}: |
from datetime import datetime
curr_id = self.pool.get('res.currency').search(cr, uid, [('name', '=', 'USD')])
date = '%s-01-01' %(datetime.now().year)
ids = self.search(cr, uid, [('currency_id','=',curr_id), ('name', '=', date)])
self.write(cr, uid, ids, {'rate': 1.333333})
-
I create currency USD in OpenERP for February of 1.250000 Rate
-
!record {model: res.currency.rate, id: feb_usd}:
currency_id: base.USD
name: !eval "'%s-02-01' %(datetime.now().year)"
rate: 1.250000
-
I create currency USD in OpenERP for March of 1.111111 Rate
-
!record {model: res.currency.rate, id: mar_usd}:
currency_id: base.USD
name: !eval "'%s-03-01' %(datetime.now().year)"
rate: 1.111111
-
I create currency USD in OpenERP for April of 1.052632 Rate
-
!record {model: res.currency.rate, id: apr_usd}:
currency_id: base.USD
name: !eval "'%s-04-01' %(datetime.now().year)"
rate: 1.052632
-
I create a bank journal with USD as currency
-
!record {model: account.journal, id: bank_journal_USD}:
name: Bank Journal(USD)
code: BUSD
type: bank
analytic_journal_id: account.sit
sequence_id: account.sequence_bank_journal
default_debit_account_id: account.cash
default_credit_account_id: account.cash
currency: base.USD
company_id: base.main_company
view_id: account.account_journal_bank_view
-
I set up some accounts for currency rate expense/income in my company
-
!record {model: res.company, id: base.main_company}:
property_expense_currency_exchange: account.o_expense
property_income_currency_exchange: account.o_income
-
I create new partner Mark Strauss.
-
!record {model: res.partner, id: res_partner_strauss0}:
address:
- city: paris
country_id: base.fr
name: Mark Strauss
street: 1 rue Rockfeller
type: invoice
zip: '75016'
name: Mr. Mark Strauss
-
I create the first invoice on 1st January for 200 USD
-
!record {model: account.invoice, id: account_invoice_jan}:
account_id: account.a_recv
address_contact_id: base.res_partner_address_3000
address_invoice_id: base.res_partner_address_3000
company_id: base.main_company
currency_id: base.USD
date_invoice: !eval "'%s-01-01' %(datetime.now().year)"
period_id: account.period_1
invoice_line:
- account_id: account.a_sale
name: '[PC1] Basic PC'
price_unit: 200.0
quantity: 1.0
product_id: product.product_product_pc1
uos_id: product.product_uom_unit
journal_id: account.sales_journal
partner_id: res_partner_strauss0
reference_type: none
-
I Validate invoice by clicking on Validate button
-
!workflow {model: account.invoice, action: invoice_open, ref: account_invoice_jan}
-
I check that first invoice move is correct for debtor account (debit - credit == 150.0)
-
!python {model: account.invoice}: |
invoice_id = self.browse(cr, uid, ref("account_invoice_jan"))
assert invoice_id.move_id, "Move not created for open invoice"
move_line_obj = self.pool.get('account.move.line')
move_lines = move_line_obj.search(cr, uid, [('move_id', '=', invoice_id.move_id.id), ('account_id', '=', invoice_id.account_id.id)])
move_line = move_line_obj.browse(cr, uid, move_lines[0])
assert (move_line.debit - move_line.credit == 150.0), "Invoice move is not correct for debtors account"
-
I create the second invoice on 1st February for 100 USD
-
!record {model: account.invoice, id: account_invoice_feb}:
account_id: account.a_recv
address_contact_id: base.res_partner_address_3000
address_invoice_id: base.res_partner_address_3000
company_id: base.main_company
currency_id: base.USD
date_invoice: !eval "'%s-02-01' %(datetime.now().year)"
period_id: account.period_2
invoice_line:
- account_id: account.a_sale
name: '[PC1] Basic PC'
price_unit: 100.0
quantity: 1.0
product_id: product.product_product_pc1
uos_id: product.product_uom_unit
journal_id: account.sales_journal
partner_id: res_partner_strauss0
reference_type: none
-
I Validate invoice by clicking on Validate button
-
!workflow {model: account.invoice, action: invoice_open, ref: account_invoice_feb}
-
I check that second invoice move is correct for debtor account (debit - credit == 80)
-
!python {model: account.invoice}: |
invoice_id = self.browse(cr, uid, ref("account_invoice_feb"))
assert invoice_id.move_id, "Move not created for open invoice"
move_line_obj = self.pool.get('account.move.line')
move_lines = move_line_obj.search(cr, uid, [('move_id', '=', invoice_id.move_id.id), ('account_id', '=', invoice_id.account_id.id)])
move_line = move_line_obj.browse(cr, uid, move_lines[0])
assert (move_line.debit - move_line.credit == 80), "Invoice move is not correct for debtors account"
-
I create the first voucher of payment
<create with values 240 USD, journal USD, and fill amounts 180 for the invoice of 200$ and 70 for the invoice of 100$>
-
!python {model: account.voucher}: |
import netsvc, time
vals = {}
res = self.onchange_partner_id(cr, uid, [], ref("res_partner_strauss0"), ref('bank_journal_USD'), 240.00, 2, ttype='receipt', date=False)
vals = {
'account_id': ref('account.cash'),
'amount': 240.00,
'company_id': ref('base.main_company'),
'currency_id': ref('base.USD'),
'journal_id': ref('bank_journal_USD'),
'partner_id': ref('res_partner_strauss0'),
'period_id': ref('account.period_3'),
'type': 'receipt',
'date': time.strftime("%Y-03-01"),
'payment_option': 'with_writeoff',
'writeoff_acc_id': ref('account.a_expense'),
'comment': 'Write Off',
'name': 'First payment',
}
if not res['value']['line_cr_ids']:
res['value']['line_cr_ids'] = [{'type': 'cr', 'account_id': ref('account.a_recv'),}]
for item in res['value']['line_cr_ids']:
if item['amount_unreconciled'] == 200.00:
item['amount'] = 180.00
else:
item['amount'] = 70.00
vals['line_cr_ids'] = [(0,0,i) for i in res['value']['line_cr_ids']]
id = self.create(cr, uid, vals)
voucher_id = self.browse(cr, uid, id)
assert (voucher_id.state=='draft'), "Voucher is not in draft state"
-
I check that writeoff amount computed is -10.0
-
!python {model: account.voucher}: |
voucher = self.search(cr, uid, [('name', '=', 'First payment'), ('partner_id', '=', ref('res_partner_strauss0'))])
voucher_id = self.browse(cr, uid, voucher[0])
assert (voucher_id.writeoff_amount == -10.0), "Writeoff amount is not -10.0"
-
I check that currency rate difference is -34.0
-
!python {model: account.voucher}: |
voucher = self.search(cr, uid, [('name', '=', 'First payment'), ('partner_id', '=', ref('res_partner_strauss0'))])
voucher_id = self.browse(cr, uid, voucher[0])
assert (voucher_id.currency_rate_difference == -34.0), "Currency rate difference is not -34.0"
-
I confirm the voucher
-
!python {model: account.voucher}: |
import netsvc
voucher = self.search(cr, uid, [('name', '=', 'First payment'), ('partner_id', '=', ref('res_partner_strauss0'))])
wf_service = netsvc.LocalService("workflow")
wf_service.trg_validate(uid, 'account.voucher', voucher[0], 'proforma_voucher', cr)
-
I check that the move of my first voucher is valid
-
!python {model: account.voucher}: |
voucher = self.search(cr, uid, [('name', '=', 'First payment'), ('partner_id', '=', ref('res_partner_strauss0'))])
voucher_id = self.browse(cr, uid, voucher[0])
move_line_obj = self.pool.get('account.move.line')
move_lines = move_line_obj.search(cr, uid, [('move_id', '=', voucher_id.move_id.id)])
for move_line in move_line_obj.browse(cr, uid, move_lines):
assert move_line.state == 'valid', "Voucher move is not valid"
-
I check that my debtor account is correct
-
I check that the debtor account has 2 new lines with -180 and -70 as amount_currency columns and that their credit columns are respectively 135 and 56
-
I check that my currency rate difference is correct. 34 in credit with no amount_currency
-
I check that my write-off is correct. 9 debit and 10 amount_currency
-
!python {model: account.voucher}: |
voucher = self.search(cr, uid, [('name', '=', 'First payment'), ('partner_id', '=', ref('res_partner_strauss0'))])
voucher_id = self.browse(cr, uid, voucher[0])
move_line_obj = self.pool.get('account.move.line')
move_lines = move_line_obj.search(cr, uid, [('move_id', '=', voucher_id.move_id.id)])
for move_line in move_line_obj.browse(cr, uid, move_lines):
if move_line.amount_currency == -180.00:
assert move_line.credit == 135.00, "Debtor account has wrong entry."
elif move_line.amount_currency == -70.00:
assert move_line.credit == 56.00, "Debtor account has wrong entry."
elif move_line.credit == 34.00:
assert move_line.amount_currency == 0.00, "Incorrect currency rate difference."
elif move_line.amount_currency == 10.00:
assert move_line.debit == 9.00, "Writeoff amount is wrong."
-
I check the residual amount of Invoice1, should be 20 in amount_currency and 15 in company currency
-
!python {model: account.invoice}: |
invoice_id = self.browse(cr, uid, ref("account_invoice_jan"))
move_line_obj = self.pool.get('account.move.line')
move_lines = move_line_obj.search(cr, uid, [('move_id', '=', invoice_id.move_id.id), ('invoice', '=', invoice_id.id), ('account_id', '=', invoice_id.account_id.id)])
move_line = move_line_obj.browse(cr, uid, move_lines[0])
assert (move_line.amount_residual_currency == 20.0 and move_line.amount_residual == 15.0) , "Residual amount is not correct for first Invoice"
-
I check the residual amuont of Invoice2, should be 30 in residual currency and 24 in amount_residual
-
!python {model: account.invoice}: |
invoice_id = self.browse(cr, uid, ref("account_invoice_feb"))
move_line_obj = self.pool.get('account.move.line')
move_lines = move_line_obj.search(cr, uid, [('move_id', '=', invoice_id.move_id.id), ('invoice', '=', invoice_id.id), ('account_id', '=', invoice_id.account_id.id)])
move_line = move_line_obj.browse(cr, uid, move_lines[0])
assert (move_line.amount_residual_currency == 30.0 and move_line.amount_residual == 24.0) , "Residual amount is not correct for first Invoice"
-
I create the second voucher of payment
<create with values 45 USD, journal USD, and fill amounts 20 for the invoice of 200$ and 30 for the invoice of 100$>
-
!python {model: account.voucher}: |
import netsvc, time
vals = {}
res = self.onchange_partner_id(cr, uid, [], ref("res_partner_strauss0"), ref('bank_journal_USD'), 45.00, 2, ttype='receipt', date=False)
vals = {
'account_id': ref('account.cash'),
'amount': 45.00,
'company_id': ref('base.main_company'),
'currency_id': ref('base.USD'),
'journal_id': ref('bank_journal_USD'),
'partner_id': ref('res_partner_strauss0'),
'period_id': ref('account.period_3'),
'type': 'receipt',
'date': time.strftime("%Y-04-01"),
'payment_option': 'with_writeoff',
'writeoff_acc_id': ref('account.a_expense'),
'comment': 'Write Off',
'name': 'Second payment',
}
if not res['value']['line_cr_ids']:
res['value']['line_cr_ids'] = [{'type': 'cr', 'account_id': ref('account.a_recv'),}]
for item in res['value']['line_cr_ids']:
if item['amount_unreconciled'] == 20.00:
item['amount'] = 20.00
else:
item['amount'] = 30.00
vals['line_cr_ids'] = [(0,0,i) for i in res['value']['line_cr_ids']]
id = self.create(cr, uid, vals)
voucher_id = self.browse(cr, uid, id)
assert (voucher_id.state=='draft'), "Voucher is not in draft state"
-
I check that writeoff amount computed is -5.0
-
!python {model: account.voucher}: |
voucher = self.search(cr, uid, [('name', '=', 'Second payment'), ('partner_id', '=', ref('res_partner_strauss0'))])
voucher_id = self.browse(cr, uid, voucher[0])
assert (voucher_id.writeoff_amount == -5.0), "Writeoff amount is not -5.0"
-
I check that currency rate difference is -8.50
-
!python {model: account.voucher}: |
voucher = self.search(cr, uid, [('name', '=', 'Second payment'), ('partner_id', '=', ref('res_partner_strauss0'))])
voucher_id = self.browse(cr, uid, voucher[0])
assert (voucher_id.currency_rate_difference == -8.50), "Currency rate difference is not -8.50"
-
I confirm the voucher
-
!python {model: account.voucher}: |
import netsvc
voucher = self.search(cr, uid, [('name', '=', 'Second payment'), ('partner_id', '=', ref('res_partner_strauss0'))])
wf_service = netsvc.LocalService("workflow")
wf_service.trg_validate(uid, 'account.voucher', voucher[0], 'proforma_voucher', cr)
-
I check that the move of my second voucher is valid
-
!python {model: account.voucher}: |
voucher = self.search(cr, uid, [('name', '=', 'Second payment'), ('partner_id', '=', ref('res_partner_strauss0'))])
voucher_id = self.browse(cr, uid, voucher[0])
move_line_obj = self.pool.get('account.move.line')
move_lines = move_line_obj.search(cr, uid, [('move_id', '=', voucher_id.move_id.id)])
for move_line in move_line_obj.browse(cr, uid, move_lines):
assert move_line.state == 'valid', "Voucher move is not valid"
-
I check that my debtor account is correct
-
I check that the debtor account has 2 new lines with -20 and -30 as amount_currency columns and their credit columns are respectively 15 and 24.
-
I check that my currency rate difference is correct. 8.5 in credit with no amount_currency
-
I check that my writeoff is correct. 4.75 debit and 5 amount_currency
-
!python {model: account.voucher}: |
voucher = self.search(cr, uid, [('name', '=', 'Second payment'), ('partner_id', '=', ref('res_partner_strauss0'))])
voucher_id = self.browse(cr, uid, voucher[0])
move_line_obj = self.pool.get('account.move.line')
move_lines = move_line_obj.search(cr, uid, [('move_id', '=', voucher_id.move_id.id)])
for move_line in move_line_obj.browse(cr, uid, move_lines):
if move_line.amount_currency == -20.00:
assert move_line.credit == 15.00, "Debtor account has wrong entry."
elif move_line.amount_currency == -30.00:
assert move_line.credit == 24.00, "Debtor account has wrong entry."
elif move_line.credit == 8.50:
assert move_line.amount_currency == 0.00, "Incorrect Currency Difference."
elif move_line.amount_currency == 5.00:
assert move_line.debit == 4.75, "Writeoff amount is wrong."
-
I check the residual amount of Invoice1, should be 0 in residual currency and 0 in amount_residual and paid
-
!python {model: account.invoice}: |
invoice_id = self.browse(cr, uid, ref("account_invoice_jan"))
move_line_obj = self.pool.get('account.move.line')
move_lines = move_line_obj.search(cr, uid, [('move_id', '=', invoice_id.move_id.id), ('invoice', '=', invoice_id.id), ('account_id', '=', invoice_id.account_id.id)])
move_line = move_line_obj.browse(cr, uid, move_lines[0])
assert (move_line.amount_residual_currency == 0.0 and move_line.amount_residual == 0.0 and invoice_id.state == 'paid') , "Residual amount is not correct for first Invoice"
-
I check the residual amuont of Invoice2, should be 0 in residual currency and 0 in amount_residual and paid
-
!python {model: account.invoice}: |
invoice_id = self.browse(cr, uid, ref("account_invoice_feb"))
move_line_obj = self.pool.get('account.move.line')
move_lines = move_line_obj.search(cr, uid, [('move_id', '=', invoice_id.move_id.id), ('invoice', '=', invoice_id.id), ('account_id', '=', invoice_id.account_id.id)])
move_line = move_line_obj.browse(cr, uid, move_lines[0])
assert (move_line.amount_residual_currency == 0.0 and move_line.amount_residual == 0.0 and invoice_id.state == 'paid') , "Residual amount is not correct for second Invoice"

View File

@ -0,0 +1,328 @@
-
In order to check the Account_voucher module with multi-currency in OpenERP,
I create 2 Invoices in USD and make 2 Payments one in USD and another in EUR, based on the currency rating on that particular date
-
I create a bank journal with EUR as currency
-
!record {model: account.journal, id: bank_journal_EUR}:
name: Bank Journal(EUR)
code: BEUR
type: bank
analytic_journal_id: account.sit
sequence_id: account.sequence_bank_journal
default_debit_account_id: account.cash
default_credit_account_id: account.cash
currency: base.EUR
company_id: base.main_company
view_id: account.account_journal_bank_view
-
I create a bank journal with USD as currency
-
!record {model: account.journal, id: bank_journal_USD}:
name: Bank Journal(USD)
code: BUSD
type: bank
analytic_journal_id: account.sit
sequence_id: account.sequence_bank_journal
default_debit_account_id: account.cash
default_credit_account_id: account.cash
currency: base.USD
company_id: base.main_company
view_id: account.account_journal_bank_view
-
I create a new partner Robert Clements
-
!record {model: res.partner, id: res_partner_clements0}:
address:
- city: marseille
country_id: base.fr
name: Robert
street: 1 rue Rockfeller
type: invoice
zip: '13016'
name: Mr.Robert Clements
-
I create the first invoice on 1st January for 200 USD
-
!record {model: account.invoice, id: account_first_invoice_jan_suppl}:
account_id: account.a_pay
type : in_invoice
address_contact_id: base.res_partner_address_3000
address_invoice_id: base.res_partner_address_3000
company_id: base.main_company
currency_id: base.USD
date_invoice: !eval "'%s-01-01' %(datetime.now().year)"
period_id: account.period_1
invoice_line:
- account_id: account.a_expense
name: '[PC1] Basic PC'
price_unit: 200.0
quantity: 1.0
product_id: product.product_product_pc1
uos_id: product.product_uom_unit
journal_id: account.sales_journal
partner_id: res_partner_clements0
reference_type: none
check_total : 200
-
I Validate invoice by clicking on Validate button
-
!workflow {model: account.invoice, action: invoice_open, ref: account_first_invoice_jan_suppl}
-
I check that first invoice move is correct for debtor account(debit - credit == -150)
-
!python {model: account.invoice}: |
invoice_id = self.browse(cr, uid, ref("account_first_invoice_jan_suppl"))
assert invoice_id.move_id, "Move not created for open invoice"
move_line_obj = self.pool.get('account.move.line')
move_lines = move_line_obj.search(cr, uid, [('move_id', '=', invoice_id.move_id.id), ('account_id', '=', invoice_id.account_id.id)])
move_line = move_line_obj.browse(cr, uid, move_lines[0])
assert (move_line.debit - move_line.credit == -150.00), "Invoice move is incorrect for debtors account"
-
I create the second invoice on 1st February for 100 USD
-
!record {model: account.invoice, id: account_second_invoice_feb_suppl}:
account_id: account.a_pay
address_contact_id: base.res_partner_address_3000
address_invoice_id: base.res_partner_address_3000
company_id: base.main_company
currency_id: base.USD
date_invoice: !eval "'%s-02-01' %(datetime.now().year)"
period_id: account.period_2
type : in_invoice
invoice_line:
- account_id: account.a_expense
name: '[PC1] Basic PC'
price_unit: 100.0
quantity: 1.0
product_id: product.product_product_pc1
uos_id: product.product_uom_unit
journal_id: account.sales_journal
partner_id: res_partner_clements0
reference_type: none
check_total : 100.0
-
I Validate invoice by clicking on Validate button
-
!workflow {model: account.invoice, action: invoice_open, ref: account_second_invoice_feb_suppl}
-
I check that second invoice move is correct for debtor account (debit - credit == -80)
-
!python {model: account.invoice}: |
invoice_id = self.browse(cr, uid, ref("account_second_invoice_feb_suppl"))
assert invoice_id.move_id, "Move not created for open invoice"
move_line_obj = self.pool.get('account.move.line')
move_lines = move_line_obj.search(cr, uid, [('move_id', '=', invoice_id.move_id.id), ('account_id', '=', invoice_id.account_id.id)])
move_line = move_line_obj.browse(cr, uid, move_lines[0])
assert (move_line.debit - move_line.credit == -80), "Invoice move is incorrect for debtors account"
-
I create the first voucher of payment
<create with values 240 EUR, journal EUR, and fills amount 180 for the invoice of 200$ and 70 for the invoice of 100$>
-
!python {model: account.voucher}: |
import netsvc, time
vals = {}
res = self.onchange_partner_id(cr, uid, [], ref("res_partner_clements0"), ref('bank_journal_EUR'), 240.0, 2, ttype='payment', date=False)
vals = {
'account_id': ref('account.cash'),
'amount': 240.0,
'company_id': ref('base.main_company'),
'currency_id': ref('base.EUR'),
'journal_id': ref('bank_journal_EUR'),
'partner_id': ref('res_partner_clements0'),
'period_id': ref('account.period_3'),
'type': 'payment',
'date': time.strftime("%Y-03-01"),
'payment_option': 'with_writeoff',
'writeoff_acc_id': ref('account.a_expense'),
'comment': 'Write Off',
'name': 'First payment',
}
if not res['value']['line_dr_ids']:
res['value']['line_dr_ids'] = [{'type': 'dr', 'account_id': ref('account.a_pay'),}]
for item in res['value']['line_dr_ids']:
if item['amount_unreconciled'] == 200.00:
item['amount'] = 180.00
else:
item['amount'] = 70.00
vals['line_dr_ids'] = [(0,0,i) for i in res['value']['line_dr_ids']]
id = self.create(cr, uid, vals)
voucher_id = self.browse(cr, uid, id)
assert (voucher_id.state=='draft'), "Voucher is not in draft state"
-
I check that writeoff amount computed is -15.0
-
!python {model: account.voucher}: |
voucher = self.search(cr, uid, [('name', '=', 'First payment'), ('partner_id', '=', ref('res_partner_clements0'))])
voucher_id = self.browse(cr, uid, voucher[0])
assert (voucher_id.writeoff_amount == -15.0), "Writeoff amount is not -15.0"
-
I check that currency rate difference is 34.0
-
!python {model: account.voucher}: |
voucher = self.search(cr, uid, [('name', '=', 'First payment'), ('partner_id', '=', ref('res_partner_clements0'))])
voucher_id = self.browse(cr, uid, voucher[0])
assert (voucher_id.currency_rate_difference == 34.0), "Currency rate difference is not 34.0"
-
I confirm the voucher
-
!python {model: account.voucher}: |
import netsvc
voucher = self.search(cr, uid, [('name', '=', 'First payment'), ('partner_id', '=', ref('res_partner_clements0'))])
wf_service = netsvc.LocalService("workflow")
wf_service.trg_validate(uid, 'account.voucher', voucher[0], 'proforma_voucher', cr)
-
I check that the move of my voucher is valid
-
!python {model: account.voucher}: |
voucher = self.search(cr, uid, [('name', '=', 'First payment'), ('partner_id', '=', ref('res_partner_clements0'))])
voucher_id = self.browse(cr, uid, voucher[0])
move_line_obj = self.pool.get('account.move.line')
move_lines = move_line_obj.search(cr, uid, [('move_id', '=', voucher_id.move_id.id)])
for move_line in move_line_obj.browse(cr, uid, move_lines):
assert move_line.state == 'valid', "Voucher move is not valid"
-
I check that my creditor account is correct
-
I check that the creditor account has 2 new lines with 180 and 70 in amount_currency columns and their debit columns are respectively 135 and 56 and currency is USD($).
-
I check that my currency rate difference is correct. -34 in credit with no amount_currency
-
I check that my writeoff is correct. -15 in credit with no amount_currency
-
!python {model: account.voucher}: |
voucher = self.search(cr, uid, [('name', '=', 'First payment'), ('partner_id', '=', ref('res_partner_clements0'))])
voucher_id = self.browse(cr, uid, voucher[0])
move_line_obj = self.pool.get('account.move.line')
move_lines = move_line_obj.search(cr, uid, [('move_id', '=', voucher_id.move_id.id)])
for move_line in move_line_obj.browse(cr, uid, move_lines):
if move_line.amount_currency == 180.00:
assert move_line.debit == 135.00, "Creditor account has wrong entry."
elif move_line.amount_currency == 70.00:
assert move_line.debit == 56.00, "Debtor account has wrong entry."
elif move_line.debit == 34.00:
assert move_line.amount_currency == 0.00, "Incorrect Currency Difference."
elif move_line.debit == 15.00:
assert move_line.amount_currency == 0.00, "Writeoff amount is wrong."
-
I check the residual amount of Invoice1, should be 20 in residual currency and 15 in amount_residual
-
!python {model: account.invoice}: |
invoice_id = self.browse(cr, uid, ref("account_first_invoice_jan_suppl"))
move_line_obj = self.pool.get('account.move.line')
move_lines = move_line_obj.search(cr, uid, [('move_id', '=', invoice_id.move_id.id), ('invoice', '=', invoice_id.id), ('account_id', '=', invoice_id.account_id.id)])
move_line = move_line_obj.browse(cr, uid, move_lines[0])
assert (move_line.amount_residual_currency == 20.0 and move_line.amount_residual == 15) , "Residual amount is not correct for first Invoice"
-
I check the residual amuont of Invoice2, should be 30 in residual currency and 24 in amount_residual
-
!python {model: account.invoice}: |
invoice_id = self.browse(cr, uid, ref("account_second_invoice_feb_suppl"))
move_line_obj = self.pool.get('account.move.line')
move_lines = move_line_obj.search(cr, uid, [('move_id', '=', invoice_id.move_id.id), ('invoice', '=', invoice_id.id), ('account_id', '=', invoice_id.account_id.id)])
move_line = move_line_obj.browse(cr, uid, move_lines[0])
assert (move_line.amount_residual_currency == 30 and move_line.amount_residual == 24) , "Residual amount is not correct for second Invoice"
-
I create the second voucher of payment
<create with values 45 USD, journal USD, and fill amounts 20 for the invoice of 200$ and 30 for the invoice of 100$>
-
!python {model: account.voucher}: |
import netsvc, time
vals = {}
res = self.onchange_partner_id(cr, uid, [], ref("res_partner_clements0"), ref('bank_journal_EUR'), 45.0, 2, ttype='payment', date=False)
vals = {
'account_id': ref('account.cash'),
'amount': 45.0,
'company_id': ref('base.main_company'),
'currency_id': ref('base.USD'),
'journal_id': ref('bank_journal_USD'),
'partner_id': ref('res_partner_clements0'),
'period_id': ref('account.period_3'),
'type': 'payment',
'date': time.strftime("%Y-04-01"),
'payment_option': 'with_writeoff',
'writeoff_acc_id': ref('account.a_expense'),
'comment': 'Write Off',
'name': 'Second payment',
}
if not res['value']['line_dr_ids']:
res['value']['line_dr_ids'] = [{'type': 'dr', 'account_id': ref('account.a_pay'),}]
for item in res['value']['line_dr_ids']:
if item['amount_unreconciled'] == 20.00:
item['amount'] = 20.00
else:
item['amount'] = 30.00
vals['line_dr_ids'] = [(0,0,i) for i in res['value']['line_dr_ids']]
id = self.create(cr, uid, vals)
voucher_id = self.browse(cr, uid, id)
assert (voucher_id.state=='draft'), "Voucher is not in draft state"
-
I check that writeoff amount computed is -5.0
-
!python {model: account.voucher}: |
voucher = self.search(cr, uid, [('name', '=', 'Second payment'), ('partner_id', '=', ref('res_partner_clements0'))])
voucher_id = self.browse(cr, uid, voucher[0])
assert (voucher_id.writeoff_amount == 5.0), "Writeoff amount is not 5.0"
-
I check that currency rate difference is 8.50
-
!python {model: account.voucher}: |
voucher = self.search(cr, uid, [('name', '=', 'Second payment'), ('partner_id', '=', ref('res_partner_clements0'))])
voucher_id = self.browse(cr, uid, voucher[0])
assert (voucher_id.currency_rate_difference == 8.50), "Currency rate difference is not 8.50"
-
I confirm the voucher
-
!python {model: account.voucher}: |
import netsvc
voucher = self.search(cr, uid, [('name', '=', 'Second payment'), ('partner_id', '=', ref('res_partner_clements0'))])
wf_service = netsvc.LocalService("workflow")
wf_service.trg_validate(uid, 'account.voucher', voucher[0], 'proforma_voucher', cr)
-
I check that my voucher state is posted
-
!python {model: account.voucher}: |
voucher = self.search(cr, uid, [('name', '=', 'Second payment'), ('partner_id', '=', ref('res_partner_clements0'))])
voucher_id = self.browse(cr, uid, voucher[0])
assert voucher_id.state == 'posted', "Voucher state is not posted"
-
I check that my creditor account is correct
-
I check that the creditor account has 2 new lines with 20 and 30 in amount_currency columns and their debit columns are respectively 15 and 24 and currency is USD($).
-
I check that my currency rate difference is correct. 8.50 in debit with no amount_currency
-
I check that my writeoff is correct. 4.75 in credit and 5 in amount_currency
-
!python {model: account.voucher}: |
voucher = self.search(cr, uid, [('name', '=', 'Second payment'), ('partner_id', '=', ref('res_partner_clements0'))])
voucher_id = self.browse(cr, uid, voucher[0])
move_line_obj = self.pool.get('account.move.line')
move_lines = move_line_obj.search(cr, uid, [('move_id', '=', voucher_id.move_id.id)])
for move_line in move_line_obj.browse(cr, uid, move_lines):
if move_line.amount_currency == 20.00:
assert move_line.debit == 15.00, "Debtor account has wrong entry."
elif move_line.amount_currency == 30.00:
assert move_line.debit == 24.00, "Debtor account has wrong entry."
elif move_line.debit == 8.50:
assert move_line.amount_currency == 0.00, "Incorrect Currency Difference."
elif move_line.amount_currency == -5.00:
assert move_line.credit == 4.75, "Writeoff amount is wrong."
-
I check the residual amount of invoice 1, should be 0 in residual currency and 0 in amount_residual and paid
-
!python {model: account.invoice}: |
invoice_id = self.browse(cr, uid, ref("account_first_invoice_jan_suppl"))
move_line_obj = self.pool.get('account.move.line')
move_lines = move_line_obj.search(cr, uid, [('move_id', '=', invoice_id.move_id.id), ('invoice', '=', invoice_id.id), ('account_id', '=', invoice_id.account_id.id)])
move_line = move_line_obj.browse(cr, uid, move_lines[0])
assert (move_line.amount_residual_currency == 0.0 and move_line.amount_residual == 0.0 and invoice_id.state == 'paid') , "Residual amount is not correct for first Invoice"
-
I check the residual amount of invoice 2, should be 0 in residual currency and 0 in amount_residual and paid
-
!python {model: account.invoice}: |
invoice_id = self.browse(cr, uid, ref("account_second_invoice_feb_suppl"))
move_line_obj = self.pool.get('account.move.line')
move_lines = move_line_obj.search(cr, uid, [('move_id', '=', invoice_id.move_id.id), ('invoice', '=', invoice_id.id), ('account_id', '=', invoice_id.account_id.id)])
move_line = move_line_obj.browse(cr, uid, move_lines[0])
assert (move_line.amount_residual_currency == 0.0 and move_line.amount_residual == 0.0 and invoice_id.state == 'paid') , "Residual amount is not correct for second Invoice"

View File

@ -0,0 +1,360 @@
-
In order to check the Account_voucher module with multi-currency in OpenERP,
I create 2 Invoices in USD and make 2 Payments one in USD and another in EUR, based on the currency rating on that particular date
-
I create currency USD in OpenERP for January of 1.333333 Rate
-
!python {model: res.currency.rate}: |
from datetime import datetime
curr_id = self.pool.get('res.currency').search(cr, uid, [('name', '=', 'USD')])
date = '%s-01-01' %(datetime.now().year)
ids = self.search(cr, uid, [('currency_id', '=', curr_id), ('name', '=', date)])
self.write(cr, uid, ids, {'rate': 1.333333})
-
I create currency USD in OpenERP for February of 1.250000 Rate
-
!record {model: res.currency.rate, id: febr_usd}:
currency_id: base.USD
name: !eval "'%s-02-01' %(datetime.now().year)"
rate: 1.250000
-
I create currency USD in OpenERP for March of 1.111111 Rate
-
!record {model: res.currency.rate, id: marc_usd}:
currency_id: base.USD
name: !eval "'%s-03-01' %(datetime.now().year)"
rate: 1.111111
-
I create currency USD in OpenERP for April of 1.052632 Rate
-
!record {model: res.currency.rate, id: apri_usd}:
currency_id: base.USD
name: !eval "'%s-04-01' %(datetime.now().year)"
rate: 1.052632
-
I create a bank journal with EUR as currency
-
!record {model: account.journal, id: bank_journal_EUR}:
name: Bank Journal(EUR)
code: BEUR
type: bank
analytic_journal_id: account.sit
sequence_id: account.sequence_bank_journal
default_debit_account_id: account.cash
default_credit_account_id: account.cash
currency: base.EUR
company_id: base.main_company
view_id: account.account_journal_bank_view
-
I create a bank journal with USD as currency
-
!record {model: account.journal, id: bank_journal_USD}:
name: Bank Journal(USD)
code: BUSD
type: bank
analytic_journal_id: account.sit
sequence_id: account.sequence_bank_journal
default_debit_account_id: account.cash
default_credit_account_id: account.cash
currency: base.USD
company_id: base.main_company
view_id: account.account_journal_bank_view
-
I set up some accounts for currency rate expense/income in my company
-
!record {model: res.company, id: base.main_company}:
property_expense_currency_exchange: account.o_expense
property_income_currency_exchange: account.o_income
-
I create a new partner Michael Geller
-
!record {model: res.partner, id: res_partner_michael0}:
address:
- city: paris
country_id: base.fr
name: Michael
street: 1 rue Rockfeller
type: invoice
zip: '75016'
name: Mr.Michael Geller
-
I create the first invoice on 1st January for 200 USD
-
!record {model: account.invoice, id: account_first_invoice_jan}:
account_id: account.a_recv
address_contact_id: base.res_partner_address_3000
address_invoice_id: base.res_partner_address_3000
company_id: base.main_company
currency_id: base.USD
date_invoice: !eval "'%s-01-01' %(datetime.now().year)"
period_id: account.period_1
invoice_line:
- account_id: account.a_sale
name: '[PC1] Basic PC'
price_unit: 200.0
quantity: 1.0
product_id: product.product_product_pc1
uos_id: product.product_uom_unit
journal_id: account.sales_journal
partner_id: res_partner_michael0
reference_type: none
-
I Validate invoice by clicking on Validate button
-
!workflow {model: account.invoice, action: invoice_open, ref: account_first_invoice_jan}
-
I check that first invoice move is correct for debtor account(debit - credit == 150)
-
!python {model: account.invoice}: |
invoice_id = self.browse(cr, uid, ref("account_first_invoice_jan"))
assert invoice_id.move_id, "Move not created for open invoice"
move_line_obj = self.pool.get('account.move.line')
move_lines = move_line_obj.search(cr, uid, [('move_id', '=', invoice_id.move_id.id), ('account_id', '=', invoice_id.account_id.id)])
move_line = move_line_obj.browse(cr, uid, move_lines[0])
assert (move_line.debit - move_line.credit == 150.00), "Invoice move is incorrect for debtors account"
-
I create the second invoice on 1st February for 100 USD
-
!record {model: account.invoice, id: account_second_invoice_feb}:
account_id: account.a_recv
address_contact_id: base.res_partner_address_3000
address_invoice_id: base.res_partner_address_3000
company_id: base.main_company
currency_id: base.USD
date_invoice: !eval "'%s-02-01' %(datetime.now().year)"
period_id: account.period_2
invoice_line:
- account_id: account.a_sale
name: '[PC1] Basic PC'
price_unit: 100.0
quantity: 1.0
product_id: product.product_product_pc1
uos_id: product.product_uom_unit
journal_id: account.sales_journal
partner_id: res_partner_michael0
reference_type: none
-
I Validate invoice by clicking on Validate button
-
!workflow {model: account.invoice, action: invoice_open, ref: account_second_invoice_feb}
-
I check that second invoice move is correct for debtor account (debit - credit == 80)
-
!python {model: account.invoice}: |
invoice_id = self.browse(cr, uid, ref("account_second_invoice_feb"))
assert invoice_id.move_id, "Move not created for open invoice"
move_line_obj = self.pool.get('account.move.line')
move_lines = move_line_obj.search(cr, uid, [('move_id', '=', invoice_id.move_id.id), ('account_id', '=', invoice_id.account_id.id)])
move_line = move_line_obj.browse(cr, uid, move_lines[0])
assert (move_line.debit - move_line.credit == 80), "Invoice move is incorrect for debtors account"
-
I create the first voucher of payment
<create with values 240 EUR, journal EUR, and fills amount 180 for the invoice of 200$ and 70 for the invoice of 100$>
-
!python {model: account.voucher}: |
import netsvc, time
vals = {}
res = self.onchange_partner_id(cr, uid, [], ref("res_partner_michael0"), ref('bank_journal_EUR'), 240.0, 2, ttype='receipt', date=False)
vals = {
'account_id': ref('account.cash'),
'amount': 240.0,
'company_id': ref('base.main_company'),
'currency_id': ref('base.EUR'),
'journal_id': ref('bank_journal_EUR'),
'partner_id': ref('res_partner_michael0'),
'period_id': ref('account.period_3'),
'type': 'receipt',
'date': time.strftime("%Y-03-01"),
'payment_option': 'with_writeoff',
'writeoff_acc_id': ref('account.a_expense'),
'comment': 'Write Off',
'name': 'First payment',
}
if not res['value']['line_cr_ids']:
res['value']['line_cr_ids'] = [{'type': 'cr', 'account_id': ref('account.a_recv'),}]
for item in res['value']['line_cr_ids']:
if item['amount_unreconciled'] == 200.00:
item['amount'] = 180.00
else:
item['amount'] = 70.00
vals['line_cr_ids'] = [(0,0,i) for i in res['value']['line_cr_ids']]
id = self.create(cr, uid, vals)
voucher_id = self.browse(cr, uid, id)
assert (voucher_id.state=='draft'), "Voucher is not in draft state"
-
I check that writeoff amount computed is 15.0
-
!python {model: account.voucher}: |
voucher = self.search(cr, uid, [('name', '=', 'First payment'), ('partner_id', '=', ref('res_partner_michael0'))])
voucher_id = self.browse(cr, uid, voucher[0])
assert (voucher_id.writeoff_amount == 15.0), "Writeoff amount is not 15.0"
-
I check that currency rate difference is -34.0
-
!python {model: account.voucher}: |
voucher = self.search(cr, uid, [('name', '=', 'First payment'), ('partner_id', '=', ref('res_partner_michael0'))])
voucher_id = self.browse(cr, uid, voucher[0])
assert (voucher_id.currency_rate_difference == -34.0), "Currency rate difference is not -34.0"
-
I confirm the voucher
-
!python {model: account.voucher}: |
import netsvc
voucher = self.search(cr, uid, [('name', '=', 'First payment'), ('partner_id', '=', ref('res_partner_michael0'))])
wf_service = netsvc.LocalService("workflow")
wf_service.trg_validate(uid, 'account.voucher', voucher[0], 'proforma_voucher', cr)
-
I check that the move of my voucher is valid
-
!python {model: account.voucher}: |
voucher = self.search(cr, uid, [('name', '=', 'First payment'), ('partner_id', '=', ref('res_partner_michael0'))])
voucher_id = self.browse(cr, uid, voucher[0])
move_line_obj = self.pool.get('account.move.line')
move_lines = move_line_obj.search(cr, uid, [('move_id', '=', voucher_id.move_id.id)])
for move_line in move_line_obj.browse(cr, uid, move_lines):
assert move_line.state == 'valid', "Voucher move is not valid"
-
I check that my debtor account is correct
-
I check that the debtor account has 2 new lines with -180 and -70 in amount_currency columns and their credit columns are respectively 135 and 56 and currency is USD($).
-
I check that my currency rate difference is correct. 34 in credit with no amount_currency
-
I check that my writeoff is correct. 15 in credit with no amount_currency
-
!python {model: account.voucher}: |
voucher = self.search(cr, uid, [('name', '=', 'First payment'), ('partner_id', '=', ref('res_partner_michael0'))])
voucher_id = self.browse(cr, uid, voucher[0])
move_line_obj = self.pool.get('account.move.line')
move_lines = move_line_obj.search(cr, uid, [('move_id', '=', voucher_id.move_id.id)])
for move_line in move_line_obj.browse(cr, uid, move_lines):
if move_line.amount_currency == -180.00:
assert move_line.credit == 135.00, "Debtor account has wrong entry."
elif move_line.amount_currency == -70.00:
assert move_line.credit == 56.00, "Debtor account has wrong entry."
elif move_line.credit == 34.00:
assert move_line.amount_currency == 0.00, "Incorrect Currency Difference."
elif move_line.credit == 15.00:
assert move_line.amount_currency == 0.00, "Writeoff amount is wrong."
-
I check the residual amount of Invoice1, should be 20 in residual currency and 15 in amount_residual
-
!python {model: account.invoice}: |
invoice_id = self.browse(cr, uid, ref("account_first_invoice_jan"))
move_line_obj = self.pool.get('account.move.line')
move_lines = move_line_obj.search(cr, uid, [('move_id', '=', invoice_id.move_id.id), ('invoice', '=', invoice_id.id), ('account_id', '=', invoice_id.account_id.id)])
move_line = move_line_obj.browse(cr, uid, move_lines[0])
assert (move_line.amount_residual_currency == 20.0 and move_line.amount_residual == 15) , "Residual amount is not correct for first Invoice"
-
I check the residual amuont of Invoice2, should be 30 in residual currency and 24 in amount_residual
-
!python {model: account.invoice}: |
invoice_id = self.browse(cr, uid, ref("account_second_invoice_feb"))
move_line_obj = self.pool.get('account.move.line')
move_lines = move_line_obj.search(cr, uid, [('move_id', '=', invoice_id.move_id.id), ('invoice', '=', invoice_id.id), ('account_id', '=', invoice_id.account_id.id)])
move_line = move_line_obj.browse(cr, uid, move_lines[0])
assert (move_line.amount_residual_currency == 30 and move_line.amount_residual == 24) , "Residual amount is not correct for second Invoice"
-
I create the second voucher of payment
<create with values 45 USD, journal USD, and fill amounts 20 for the invoice of 200$ and 30 for the invoice of 100$>
-
!python {model: account.voucher}: |
import netsvc, time
vals = {}
res = self.onchange_partner_id(cr, uid, [], ref("res_partner_michael0"), ref('bank_journal_EUR'), 45.0, 2, ttype='receipt', date=False)
vals = {
'account_id': ref('account.cash'),
'amount': 45.0,
'company_id': ref('base.main_company'),
'currency_id': ref('base.USD'),
'journal_id': ref('bank_journal_USD'),
'partner_id': ref('res_partner_michael0'),
'period_id': ref('account.period_3'),
'type': 'receipt',
'date': time.strftime("%Y-04-01"),
'payment_option': 'with_writeoff',
'writeoff_acc_id': ref('account.a_expense'),
'comment': 'Write Off',
'name': 'Second payment',
}
if not res['value']['line_cr_ids']:
res['value']['line_cr_ids'] = [{'type': 'cr', 'account_id': ref('account.a_recv'),}]
for item in res['value']['line_cr_ids']:
if item['amount_unreconciled'] == 20.00:
item['amount'] = 20.00
else:
item['amount'] = 30.00
vals['line_cr_ids'] = [(0,0,i) for i in res['value']['line_cr_ids']]
id = self.create(cr, uid, vals)
voucher_id = self.browse(cr, uid, id)
assert (voucher_id.state=='draft'), "Voucher is not in draft state"
-
I check that writeoff amount computed is -5.0
-
!python {model: account.voucher}: |
voucher = self.search(cr, uid, [('name', '=', 'Second payment'), ('partner_id', '=', ref('res_partner_michael0'))])
voucher_id = self.browse(cr, uid, voucher[0])
assert (voucher_id.writeoff_amount == -5.0), "Writeoff amount is not -5.0"
-
I check that currency rate difference is -8.50
-
!python {model: account.voucher}: |
voucher = self.search(cr, uid, [('name', '=', 'Second payment'), ('partner_id', '=', ref('res_partner_michael0'))])
voucher_id = self.browse(cr, uid, voucher[0])
assert (voucher_id.currency_rate_difference == -8.50), "Currency rate difference is not -8.50"
-
I confirm the voucher
-
!python {model: account.voucher}: |
import netsvc
voucher = self.search(cr, uid, [('name', '=', 'Second payment'), ('partner_id', '=', ref('res_partner_michael0'))])
wf_service = netsvc.LocalService("workflow")
wf_service.trg_validate(uid, 'account.voucher', voucher[0], 'proforma_voucher', cr)
-
I check that my voucher state is posted
-
!python {model: account.voucher}: |
voucher = self.search(cr, uid, [('name', '=', 'Second payment'), ('partner_id', '=', ref('res_partner_michael0'))])
voucher_id = self.browse(cr, uid, voucher[0])
assert voucher_id.state == 'posted', "Voucher state is not posted"
-
I check that my debtor account is correct
-
I check that the debtor account has 2 new lines with -20 and -30 in amount_currency columns and their credit columns are respectively 15 and 24 and currency is USD($).
-
I check that my currency rate difference is correct. 8.50 in credit with no amount_currency
-
I check that my writeoff is correct. 4.75 in debit and 5 in amount_currency
-
!python {model: account.voucher}: |
voucher = self.search(cr, uid, [('name', '=', 'Second payment'), ('partner_id', '=', ref('res_partner_michael0'))])
voucher_id = self.browse(cr, uid, voucher[0])
move_line_obj = self.pool.get('account.move.line')
move_lines = move_line_obj.search(cr, uid, [('move_id', '=', voucher_id.move_id.id)])
for move_line in move_line_obj.browse(cr, uid, move_lines):
if move_line.amount_currency == -20.00:
assert move_line.credit == 15.00, "Debtor account has wrong entry."
elif move_line.amount_currency == -30.00:
assert move_line.credit == 24.00, "Debtor account has wrong entry."
elif move_line.credit == 8.50:
assert move_line.amount_currency == 0.00, "Incorrect Currency Difference."
elif move_line.amount_currency == 5.00:
assert move_line.debit == 4.75, "Writeoff amount is wrong."
-
I check the residual amount of invoice 1, should be 0 in residual currency and 0 in amount_residual and paid
-
!python {model: account.invoice}: |
invoice_id = self.browse(cr, uid, ref("account_first_invoice_jan"))
move_line_obj = self.pool.get('account.move.line')
move_lines = move_line_obj.search(cr, uid, [('move_id', '=', invoice_id.move_id.id), ('invoice', '=', invoice_id.id), ('account_id', '=', invoice_id.account_id.id)])
move_line = move_line_obj.browse(cr, uid, move_lines[0])
assert (move_line.amount_residual_currency == 0.0 and move_line.amount_residual == 0.0 and invoice_id.state == 'paid') , "Residual amount is not correct for first Invoice"
-
I check the residual amuont of invoice 2, should be 0 in residual currency and 0 in amount_residual and paid
-
!python {model: account.invoice}: |
invoice_id = self.browse(cr, uid, ref("account_second_invoice_feb"))
move_line_obj = self.pool.get('account.move.line')
move_lines = move_line_obj.search(cr, uid, [('move_id', '=', invoice_id.move_id.id), ('invoice', '=', invoice_id.id), ('account_id', '=', invoice_id.account_id.id)])
move_line = move_line_obj.browse(cr, uid, move_lines[0])
assert (move_line.amount_residual_currency == 0.0 and move_line.amount_residual == 0.0 and invoice_id.state == 'paid') , "Residual amount is not correct for second Invoice"

View File

@ -0,0 +1,331 @@
-
In order to check the Account_voucher module with multi-currency in OpenERP,
I create 2 Invoices in EUR and make 2 Payments in EUR based on the currency rating on that particular date.
-
I create currency EUR in OpenERP for January of 1.000000 Rate
-
!record {model: res.currency.rate, id: jan_eur}:
currency_id: base.EUR
name: !eval "'%s-01-01' %(datetime.now().year)"
rate: 1.000000
-
I create currency EUR in OpenERP for February of 1.000000 Rate
-
!record {model: res.currency.rate, id: feb_eur}:
currency_id: base.EUR
name: !eval "'%s-02-01' %(datetime.now().year)"
rate: 1.000000
-
I create currency EUR in OpenERP for March of 1.000000 Rate
-
!record {model: res.currency.rate, id: mar_eur}:
currency_id: base.EUR
name: !eval "'%s-03-01' %(datetime.now().year)"
rate: 1.000000
-
I create currency EUR in OpenERP for April of 1.000000 Rate
-
!record {model: res.currency.rate, id: apr_eur}:
currency_id: base.EUR
name: !eval "'%s-04-01' %(datetime.now().year)"
rate: 1.000000
-
I create a bank journal with EUR as currency
-
!record {model: account.journal, id: bank_journal_EUR}:
name: Bank Journal(EUR)
code: BEUR
type: bank
analytic_journal_id: account.sit
sequence_id: account.sequence_bank_journal
default_debit_account_id: account.cash
default_credit_account_id: account.cash
currency: base.EUR
company_id: base.main_company
view_id: account.account_journal_bank_view
-
I set up some accounts for currency rate expense/income in my company
-
!record {model: res.company, id: base.main_company}:
property_expense_currency_exchange: account.o_expense
property_income_currency_exchange: account.o_income
-
I create a new partner Peter Lawson.
-
!record {model: res.partner, id: res_partner_peter0}:
address:
- city: paris
country_id: base.fr
name: Peter
street: 1 rue Rockfeller
type: invoice
zip: '75016'
name: Mr.Peter Lawson
-
I create the first invoice on 1st January for 150 EUR
-
!record {model: account.invoice, id: account_first_invoice_jan_eur}:
account_id: account.a_recv
address_contact_id: base.res_partner_address_3000
address_invoice_id: base.res_partner_address_3000
company_id: base.main_company
currency_id: base.EUR
date_invoice: !eval "'%s-01-01' %(datetime.now().year)"
period_id: account.period_1
invoice_line:
- account_id: account.a_sale
name: '[PC1] Basic PC'
price_unit: 150.0
quantity: 1.0
product_id: product.product_product_pc1
uos_id: product.product_uom_unit
journal_id: account.sales_journal
partner_id: res_partner_peter0
reference_type: none
-
I Validate invoice by clicking on Validate button
-
!workflow {model: account.invoice, action: invoice_open, ref: account_first_invoice_jan_eur}
-
I check that first invoice move is correct for debtor account(debit - credit == 150)
-
!python {model: account.invoice}: |
invoice_id = self.browse(cr, uid, ref("account_first_invoice_jan_eur"))
assert invoice_id.move_id, "Move not created for open invoice"
move_line_obj = self.pool.get('account.move.line')
move_lines = move_line_obj.search(cr, uid, [('move_id', '=', invoice_id.move_id.id), ('account_id', '=', invoice_id.account_id.id)])
move_line = move_line_obj.browse(cr, uid, move_lines[0])
assert (move_line.debit - move_line.credit == 150.00), "Invoice move is incorrect for debtors account"
-
I create the second invoice on 1st February for 80 EUR
-
!record {model: account.invoice, id: account_second_invoice_feb_eur}:
account_id: account.a_recv
address_contact_id: base.res_partner_address_3000
address_invoice_id: base.res_partner_address_3000
company_id: base.main_company
currency_id: base.EUR
date_invoice: !eval "'%s-02-01' %(datetime.now().year)"
period_id: account.period_1
invoice_line:
- account_id: account.a_sale
name: '[PC1] Basic PC'
price_unit: 80.0
quantity: 1.0
product_id: product.product_product_pc1
uos_id: product.product_uom_unit
journal_id: account.sales_journal
partner_id: res_partner_peter0
reference_type: none
-
I Validate invoice by clicking on Validate button
-
!workflow {model: account.invoice, action: invoice_open, ref: account_second_invoice_feb_eur}
-
I check that second invoice move is correct for debtor account (debit - credit == 80)
-
!python {model: account.invoice}: |
invoice_id = self.browse(cr, uid, ref("account_second_invoice_feb_eur"))
assert invoice_id.move_id, "Move not created for open invoice"
move_line_obj = self.pool.get('account.move.line')
move_lines = move_line_obj.search(cr, uid, [('move_id', '=', invoice_id.move_id.id), ('account_id', '=', invoice_id.account_id.id)])
move_line = move_line_obj.browse(cr, uid, move_lines[0])
assert (move_line.debit - move_line.credit == 80.00), "Invoice move is incorrect for debtors account"
-
I create the first voucher of payment
<create with values 120 EUR, journal EUR, and fill amounts 100 for the invoice of 150 EUR and 20 for the invoice of 80 EUR>
-
!python {model: account.voucher}: |
import netsvc, time
vals = {}
res = self.onchange_partner_id(cr, uid, [], ref("res_partner_peter0"), ref('bank_journal_EUR'), 120.00, 2, ttype='receipt', date=False)
vals = {
'account_id': ref('account.cash'),
'amount': 120.00,
'company_id': ref('base.main_company'),
'currency_id': ref('base.EUR'),
'journal_id': ref('bank_journal_EUR'),
'partner_id': ref('res_partner_peter0'),
'period_id': ref('account.period_3'),
'type': 'receipt',
'date': time.strftime("%Y-03-01"),
'payment_option': 'with_writeoff',
'writeoff_acc_id': ref('account.a_expense'),
'comment': 'Write Off',
'name': 'First payment',
}
if not res['value']['line_cr_ids']:
res['value']['line_cr_ids'] = [{'type': 'cr', 'account_id': ref('account.a_recv'),}]
for item in res['value']['line_cr_ids']:
if item['amount_unreconciled'] == 150.00:
item['amount'] = 100.00
else:
item['amount'] = 20.00
vals['line_cr_ids'] = [(0,0,i) for i in res['value']['line_cr_ids']]
id = self.create(cr, uid, vals)
voucher_id = self.browse(cr, uid, id)
assert (voucher_id.state=='draft'), "Voucher is not in draft state"
-
I check that writeoff amount computed is 0.00
-
!python {model: account.voucher}: |
voucher = self.search(cr, uid, [('name', '=', 'First payment'),('partner_id', '=', ref('res_partner_peter0'))])
voucher_id = self.browse(cr, uid, voucher[0])
assert (voucher_id.writeoff_amount == 0.00), "Writeoff amount is not 0.00"
-
I check that currency rate difference is 0.00
-
!python {model: account.voucher}: |
voucher = self.search(cr, uid, [('name', '=', 'First payment'),('partner_id', '=', ref('res_partner_peter0'))])
voucher_id = self.browse(cr, uid, voucher[0])
assert (voucher_id.currency_rate_difference == 0.00), "Currency rate difference is not 0.00"
-
I confirm the voucher
-
!python {model: account.voucher}: |
import netsvc
voucher = self.search(cr, uid, [('name', '=', 'First payment'),('partner_id', '=', ref('res_partner_peter0'))])
wf_service = netsvc.LocalService("workflow")
wf_service.trg_validate(uid, 'account.voucher', voucher[0], 'proforma_voucher', cr)
-
I check that the move of my first voucher is valid
-
!python {model: account.voucher}: |
voucher = self.search(cr, uid, [('name', '=', 'First payment'),('partner_id', '=', ref('res_partner_peter0'))])
voucher_id = self.browse(cr, uid, voucher[0])
move_line_obj = self.pool.get('account.move.line')
move_lines = move_line_obj.search(cr, uid, [('move_id', '=', voucher_id.move_id.id)])
for move_line in move_line_obj.browse(cr, uid, move_lines):
assert move_line.state == 'valid', "Voucher move is not valid"
-
I check that my debtor account is correct
-
I check that the debtor account has 2 new lines with 0.00 and 0.00 in amount_currency columns and their credit are 20 and 100 respectively
-
!python {model: account.voucher}: |
voucher = self.search(cr, uid, [('name', '=', 'First payment'),('partner_id', '=', ref('res_partner_peter0'))])
voucher_id = self.browse(cr, uid, voucher[0])
move_line_obj = self.pool.get('account.move.line')
move_lines = move_line_obj.search(cr, uid, [('move_id', '=', voucher_id.move_id.id)])
for move_line in move_line_obj.browse(cr, uid, move_lines):
if move_line.credit == 20.00:
assert move_line.amount_currency == 0.00, "Debtor account has wrong entry."
elif move_line.credit == 100.00:
assert move_line.amount_currency == 0.00, "Debtor account has wrong entry."
-
I check the residual amount of Invoice1 is 50
-
!python {model: account.invoice}: |
invoice_id = self.browse(cr, uid, ref("account_first_invoice_jan_eur"))
move_line_obj = self.pool.get('account.move.line')
move_lines = move_line_obj.search(cr, uid, [('move_id', '=', invoice_id.move_id.id), ('invoice', '=', invoice_id.id), ('account_id', '=', invoice_id.account_id.id)])
move_line = move_line_obj.browse(cr, uid, move_lines[0])
assert (move_line.amount_residual_currency == 50.0 and move_line.amount_residual == 50.0) , "Residual amount is not correct for first Invoice"
-
I check the residual amuont of Invoice2 is 60
-
!python {model: account.invoice}: |
invoice_id = self.browse(cr, uid, ref("account_second_invoice_feb_eur"))
move_line_obj = self.pool.get('account.move.line')
move_lines = move_line_obj.search(cr, uid, [('move_id', '=', invoice_id.move_id.id), ('invoice', '=', invoice_id.id), ('account_id', '=', invoice_id.account_id.id)])
move_line = move_line_obj.browse(cr, uid, move_lines[0])
assert (move_line.amount_residual_currency == 60.0 and move_line.amount_residual == 60.0) , "Residual amount is not correct for second Invoice"
-
I create the second voucher of payment and check to let open the debtor overpaid amount.
<create with values 120 EUR, journal EUR, and fill amounts 50 for the invoice of 150 EUR and 70 for the invoice of 80 EUR>
-
!python {model: account.voucher}: |
import netsvc, time
vals = {}
res = self.onchange_partner_id(cr, uid, [], ref("res_partner_peter0"), ref('bank_journal_EUR'), 120.00, 2, ttype='receipt', date=False)
vals = {
'account_id': ref('account.cash'),
'amount': 120.00,
'company_id': ref('base.main_company'),
'currency_id': ref('base.EUR'),
'journal_id': ref('bank_journal_EUR'),
'partner_id': ref('res_partner_peter0'),
'period_id': ref('account.period_3'),
'type': 'receipt',
'date': time.strftime("%Y-04-01"),
'payment_option': 'with_writeoff',
'writeoff_acc_id': ref('account.a_expense'),
'comment': 'Write Off',
'name': 'Second payment',
}
if not res['value']['line_cr_ids']:
res['value']['line_cr_ids'] = [{'type': 'cr', 'account_id': ref('account.a_recv'),}]
for item in res['value']['line_cr_ids']:
if item['amount_unreconciled'] == 50.00:
item['amount'] = 50.00
elif item['amount_unreconciled'] == 60.00:
item['amount'] = 70.00
vals['line_cr_ids'] = [(0,0,i) for i in res['value']['line_cr_ids']]
id = self.create(cr, uid, vals)
voucher_id = self.browse(cr, uid, id)
assert (voucher_id.state=='draft'), "Voucher is not in draft state"
-
I check that writeoff amount computed is 0.00
-
!python {model: account.voucher}: |
voucher = self.search(cr, uid, [('name', '=', 'Second payment'),('partner_id', '=', ref('res_partner_peter0'))])
voucher_id = self.browse(cr, uid, voucher[0])
assert (voucher_id.writeoff_amount == 0.00), "Writeoff amount is not 0"
-
I check that currency rate difference is 0.00
-
!python {model: account.voucher}: |
voucher = self.search(cr, uid, [('name', '=', 'Second payment'), ('partner_id', '=', ref('res_partner_peter0'))])
voucher_id = self.browse(cr, uid, voucher[0])
assert (voucher_id.currency_rate_difference == 0.00), "Currency rate difference is not 0"
-
I confirm the voucher
-
!python {model: account.voucher}: |
import netsvc
voucher = self.search(cr, uid, [('name', '=', 'Second payment'), ('partner_id', '=', ref('res_partner_peter0'))])
wf_service = netsvc.LocalService("workflow")
wf_service.trg_validate(uid, 'account.voucher', voucher[0], 'proforma_voucher', cr)
-
I check that the move of my second voucher is valid
-
!python {model: account.voucher}: |
voucher = self.search(cr, uid, [('name', '=', 'Second payment'), ('partner_id', '=', ref('res_partner_peter0'))])
voucher_id = self.browse(cr, uid, voucher[0])
move_line_obj = self.pool.get('account.move.line')
move_lines = move_line_obj.search(cr, uid, [('move_id', '=', voucher_id.move_id.id)])
for move_line in move_line_obj.browse(cr, uid, move_lines):
assert move_line.state == 'valid', "Voucher move is not valid"
-
I check that my debtor account is correct
-
I check that the debtor account has 2 new lines with 0.00 and 0.00 in amount_currency columns and their credit are 70 and 50
-
!python {model: account.voucher}: |
voucher = self.search(cr, uid, [('name', '=', 'Second payment'), ('partner_id', '=', ref('res_partner_peter0'))])
voucher_id = self.browse(cr, uid, voucher[0])
move_line_obj = self.pool.get('account.move.line')
move_lines = move_line_obj.search(cr, uid, [('move_id', '=', voucher_id.move_id.id)])
for move_line in move_line_obj.browse(cr, uid, move_lines):
if move_line.credit == 70.00:
assert move_line.amount_currency == 0.00, "Debtor account has wrong entry."
elif move_line.credit == 50.00:
assert move_line.amount_currency == 0.00, "Debtor account has wrong entry."
-
I check the residual amount of Invoice1 is 0
-
!python {model: account.invoice}: |
invoice_id = self.browse(cr, uid, ref("account_first_invoice_jan_eur"))
move_line_obj = self.pool.get('account.move.line')
move_lines = move_line_obj.search(cr, uid, [('move_id', '=', invoice_id.move_id.id), ('invoice', '=', invoice_id.id), ('account_id', '=', invoice_id.account_id.id)])
move_line = move_line_obj.browse(cr, uid, move_lines[0])
assert (move_line.amount_residual_currency == 0 and move_line.amount_residual == 0) , "Residual amount is not correct for first Invoice"
-
I check the residual amuont of Invoice2 is -10
-
!python {model: account.invoice}: |
invoice_id = self.browse(cr, uid, ref("account_second_invoice_feb_eur"))
move_line_obj = self.pool.get('account.move.line')
move_lines = move_line_obj.search(cr, uid, [('move_id', '=', invoice_id.move_id.id), ('invoice', '=', invoice_id.id), ('account_id', '=', invoice_id.account_id.id)])
move_line = move_line_obj.browse(cr, uid, move_lines[0])
assert (move_line.amount_residual_currency == -10.0 and move_line.amount_residual == -10.0) , "Residual amount is not correct for second Invoice"

View File

@ -0,0 +1,194 @@
-
In order to check the Account_voucher module with multi-currency in OpenERP,
I create an invoice in CAD and make its Payment in CHF based on the currency rating on that particular date.
-
I create currency CAD in OpenERP for January of 1.338800 Rate
-
!record {model: res.currency.rate, id: jan_cad}:
currency_id: base.CAD
name: !eval "'%s-01-01' %(datetime.now().year)"
rate: 1.338800
-
I create currency CAD in OpenERP for March of 2.000000 Rate
-
!record {model: res.currency.rate, id: mar_cad}:
currency_id: base.CAD
name: !eval "'%s-03-01' %(datetime.now().year)"
rate: 2.000000
-
I create currency CHF in OpenERP for January of 1.308600 Rate
-
!record {model: res.currency.rate, id: jan_chf}:
currency_id: base.CHF
name: !eval "'%s-01-01' %(datetime.now().year)"
rate: 1.308600
-
I create currency CHF in OpenERP for March of 1.250000 Rate
-
!record {model: res.currency.rate, id: mar_chf}:
currency_id: base.CHF
name: !eval "'%s-03-01' %(datetime.now().year)"
rate: 1.250000
-
I create a bank journal with CHF as currency
-
!record {model: account.journal, id: bank_journal_CHF}:
name: Bank Journal(CHF)
code: BCHF
type: bank
analytic_journal_id: account.sit
sequence_id: account.sequence_bank_journal
default_debit_account_id: account.cash
default_credit_account_id: account.cash
currency: base.CHF
company_id: base.main_company
view_id: account.account_journal_bank_view
-
I set up some accounts for currency rate expense/income in my company
-
!record {model: res.company, id: base.main_company}:
property_expense_currency_exchange: account.o_expense
property_income_currency_exchange: account.o_income
-
I create a new partner John Armani.
-
!record {model: res.partner, id: res_partner_john0}:
address:
- city: paris
country_id: base.fr
name: John
street: 1 rue Rockfeller
type: invoice
zip: '75016'
name: Mr.John Armani
-
I create the first invoice on 1st January for 200 CAD
-
!record {model: account.invoice, id: account_first_invoice_jan_cad}:
account_id: account.a_recv
address_contact_id: base.res_partner_address_3000
address_invoice_id: base.res_partner_address_3000
company_id: base.main_company
currency_id: base.CAD
date_invoice: !eval "'%s-01-01' %(datetime.now().year)"
period_id: account.period_1
invoice_line:
- account_id: account.a_sale
name: '[PC1] Basic PC'
price_unit: 200.0
quantity: 1.0
product_id: product.product_product_pc1
uos_id: product.product_uom_unit
journal_id: account.sales_journal
partner_id: res_partner_john0
reference_type: none
-
I Validate invoice by clicking on Validate button
-
!workflow {model: account.invoice, action: invoice_open, ref: account_first_invoice_jan_cad}
-
I check that first invoice move is correct for debtor account (debit - credit == 149.39)
-
!python {model: account.invoice}: |
invoice_id = self.browse(cr, uid, ref("account_first_invoice_jan_cad"))
assert invoice_id.move_id, "Move not created for open invoice"
move_line_obj = self.pool.get('account.move.line')
move_lines = move_line_obj.search(cr, uid, [('move_id', '=', invoice_id.move_id.id), ('account_id', '=', invoice_id.account_id.id)])
move_line = move_line_obj.browse(cr, uid, move_lines[0])
assert (move_line.debit - move_line.credit == 149.39), "Invoice move is incorrect for debtors account"
-
I create the first voucher of payment
<create with values 300 CHF, journal CHF, and fill amounts 200 for the invoice of 200 CAD>
-
!python {model: account.voucher}: |
import netsvc, time
vals = {}
res = self.onchange_partner_id(cr, uid, [], ref("res_partner_john0"), ref('bank_journal_CHF'), 300.00, 2, ttype='receipt', date=False)
vals = {
'account_id': ref('account.cash'),
'amount': 300.00,
'company_id': ref('base.main_company'),
'currency_id': ref('base.CHF'),
'journal_id': ref('bank_journal_CHF'),
'partner_id': ref('res_partner_john0'),
'period_id': ref('account.period_3'),
'type': 'receipt',
'date': time.strftime("%Y-03-01"),
'payment_option': 'with_writeoff',
'writeoff_acc_id': ref('account.a_expense'),
'comment': 'Write Off',
'name': 'First payment',
}
if not res['value']['line_cr_ids']:
res['value']['line_cr_ids'] = [{'type': 'cr', 'account_id': ref('account.a_recv'),}]
for item in res['value']['line_cr_ids']:
if item['amount_unreconciled'] == 200.00:
item['amount'] = 200.00
vals['line_cr_ids'] = [(0,0,i) for i in res['value']['line_cr_ids']]
id = self.create(cr, uid, vals)
voucher_id = self.browse(cr, uid, id)
assert (voucher_id.state=='draft'), "Voucher is not in draft state"
-
I check that writeoff amount computed is 175.0
-
!python {model: account.voucher}: |
voucher = self.search(cr, uid, [('name', '=', 'First payment'), ('partner_id', '=', ref('res_partner_john0'))])
voucher_id = self.browse(cr, uid, voucher[0])
assert (voucher_id.writeoff_amount == 175.0), "Writeoff amount is not 175.0"
-
I check that currency rate difference is 49.39
-
!python {model: account.voucher}: |
voucher = self.search(cr, uid, [('name', '=', 'First payment'), ('partner_id', '=', ref('res_partner_john0'))])
voucher_id = self.browse(cr, uid, voucher[0])
curr_diff = float(str(voucher_id.currency_rate_difference))
assert (curr_diff == 49.39), "Currency rate difference is not 49.39"
-
I confirm the voucher
-
!python {model: account.voucher}: |
import netsvc
voucher = self.search(cr, uid, [('name', '=', 'First payment'), ('partner_id', '=', ref('res_partner_john0'))])
wf_service = netsvc.LocalService("workflow")
wf_service.trg_validate(uid, 'account.voucher', voucher[0], 'proforma_voucher', cr)
-
I check that the move of my voucher is valid
-
!python {model: account.voucher}: |
voucher = self.search(cr, uid, [('name', '=', 'First payment'), ('partner_id', '=', ref('res_partner_john0'))])
voucher_id = self.browse(cr, uid, voucher[0])
move_line_obj = self.pool.get('account.move.line')
move_lines = move_line_obj.search(cr, uid, [('move_id', '=', voucher_id.move_id.id)])
for move_line in move_line_obj.browse(cr, uid, move_lines):
assert move_line.state == 'valid', "Voucher move is not valid"
assert voucher_id.state == 'posted', "Voucher state is not posted"
-
I check that my debtor account is correct
-
I check that the debtor account has 1 new line with -200 as amount_currency columns and 149.39 of credit and currency is CAD($).
-
I check that my currency rate difference is correct. 49.39 in debit with no amount_currency
-
I check that my writeoff is correct. 140 credit and -175 amount_currency
-
!python {model: account.voucher}: |
voucher = self.search(cr, uid, [('name', '=', 'First payment'), ('partner_id', '=', ref('res_partner_john0'))])
voucher_id = self.browse(cr, uid, voucher[0])
move_line_obj = self.pool.get('account.move.line')
move_lines = move_line_obj.search(cr, uid, [('move_id', '=', voucher_id.move_id.id)])
for move_line in move_line_obj.browse(cr, uid, move_lines):
if move_line.amount_currency == -200:
assert move_line.credit == 149.39, "Debtor account has wrong entry."
elif move_line.debit == 49.39:
assert move_line.amount_currency == 0.00, "Incorrect Currency Difference."
elif move_line.credit == 140.00:
assert move_line.amount_currency == -175.00, "Writeoff amount is wrong."
-
I check the residual amount of Invoice1, should be 0 in residual currency and 0 in amount_residual and paid
-
!python {model: account.invoice}: |
invoice_id = self.browse(cr, uid, ref("account_first_invoice_jan_cad"))
move_line_obj = self.pool.get('account.move.line')
move_lines = move_line_obj.search(cr, uid, [('move_id', '=', invoice_id.move_id.id), ('invoice', '=', invoice_id.id), ('account_id', '=', invoice_id.account_id.id)])
move_line = move_line_obj.browse(cr, uid, move_lines[0])
assert (move_line.amount_residual_currency == 0.0 and move_line.amount_residual == 0.0 and invoice_id.state == 'paid') , "Residual amount is not correct for first Invoice"

View File

@ -74,14 +74,24 @@
<field name="arch" type="xml">
<form string="Bill Payment">
<group col="6" colspan="4">
<field name="partner_id" required="1" on_change="onchange_partner_id(partner_id, journal_id, amount, currency_id, type, date)" context="{'invoice_currency':currency_id}" string="Supplier"/>
<field name="amount" on_change="onchange_partner_id(partner_id, journal_id, amount, currency_id, type, date)"/>
<field name="partner_id"
required="1"
on_change="onchange_partner_id(partner_id, journal_id, amount,
currency_id, type, date, context)"
string="Supplier"/>
<field name="journal_id"
domain="[('type','in',['bank', 'cash'])]"
widget="selection" select="1"
on_change="onchange_partner_id(partner_id, journal_id, amount, currency_id, type, date)"
on_change="onchange_partner_id(partner_id, journal_id, amount,
currency_id, type, date, context)"
string="Payment Method"/>
<field name="date" select="1" on_change="onchange_date(partner_id, journal_id, amount, currency_id, type, date)"/>
<field name="amount"
on_change="onchange_partner_id(partner_id, journal_id, amount,
currency_id, type, date, context)"/>
<field name="date"
select="1"
on_change="onchange_date(partner_id, journal_id, amount,
currency_id, type, date, context)"/>
<field name="reference" select="1" string="Payment Ref"/>
<field name="name" colspan="2"/>
<field name="account_id"
@ -94,25 +104,37 @@
<page string="Payment Information">
<field name="line_dr_ids" attrs="{'invisible': [('type', '=', 'receipt')]}" default_get="{'journal_id':journal_id, 'type':type, 'partner_id':partner_id}" colspan="4" nolabel="1" height="140" on_change="onchange_line_ids(line_dr_ids, line_cr_ids, amount)">
<tree string="Open Supplier Journal Entries" editable="bottom">
<field name="move_line_id" context="{'journal_id':parent.journal_id, 'partner_id':parent.partner_id}"
<field name="move_line_id" required="1" context="{'journal_id':parent.journal_id, 'partner_id':parent.partner_id}"
on_change="onchange_move_line_id(move_line_id)"
domain="[('account_id.type','=','payable'), ('reconcile_id','=', False), ('partner_id','=',parent.partner_id)]"
/>
<field name="account_id" groups="base.group_extended" domain="[('type','=','payable')]"/>
<field name="account_id" groups="base.group_extended" domain="[('type','=','payable')]" invisible="1"/>
<field name="date_original" readonly="1"/>
<field name="date_due" readonly="1"/>
<field name="amount_original" readonly="1"/>
<field name="amount_unreconciled" sum="Open Balance" readonly="1"/>
<field name="amount" sum="Payment"/>
<field name="currency_id" readonly="1"/>
<field name="amount_original" readonly="1" invisible="1"/>
<field name="amount_unreconciled" readonly="1"/>
<field name="amount" on_change="onchange_amount(amount)"/>
<field name="amount_in_voucher_currency" readonly="1" groups="base.group_no_one"/>
<field name="voucher_currency_id" readonly="1" groups="base.group_no_one"/>
<field name="amount_in_company_currency" readonly="1" invisible="1"/>
<field name="company_currency_id" readonly="1" invisible="1"/>
</tree>
</field>
<field name="line_cr_ids" colspan="4" nolabel="1" attrs="{'invisible': [('type', '=', 'payment')]}" default_get="{'journal_id':journal_id, 'partner_id':partner_id}" on_change="onchange_line_ids(line_dr_ids, line_cr_ids, amount)">
<tree string="Open Customer Journal Entries" editable="bottom">
<field name="move_line_id"/>
<field name="move_line_id" required="1"/>
<field name="account_id" groups="base.group_extended" domain="[('type','=','receivable')]"/>
<field name="date_original"/>
<field name="amount_original"/>
<field name="amount" sum="Payment"/>
<field name="date_original" readonly="1"/>
<field name="date_due" readonly="1"/>
<field name="currency_id" readonly="1"/>
<field name="amount_original" readonly="1" invisible="1"/>
<field name="amount_unreconciled" readonly="1"/>
<field name="amount" on_change="onchange_amount(amount)"/>
<field name="amount_in_voucher_currency" readonly="1" groups="base.group_no_one"/>
<field name="voucher_currency_id" readonly="1" groups="base.group_no_one"/>
<field name="amount_in_company_currency" readonly="1" invisible="1"/>
<field name="company_currency_id" readonly="1" invisible="1"/>
</tree>
</field>
<group col="2" colspan="3">
@ -137,15 +159,28 @@
<field name="arch" type="xml">
<form string="Bill Payment">
<group col="6" colspan="4">
<field name="partner_id" domain="[('supplier','=',True)]" required="1" invisible="context.get('line_type', False)" on_change="onchange_partner_id(partner_id, journal_id, amount, currency_id, type, date)" context="{'invoice_currency':currency_id}" string="Supplier"/>
<field name="amount" invisible="context.get('line_type', False)" on_change="onchange_partner_id(partner_id, journal_id, amount, currency_id, type, date)"/>
<field name="partner_id"
domain="[('supplier','=',True)]"
required="1"
invisible="context.get('line_type', False)"
on_change="onchange_partner_id(partner_id, journal_id, amount,
currency_id, type, date, context)"
string="Supplier"/>
<field name="journal_id"
domain="[('type','in',['bank', 'cash'])]"
invisible="context.get('line_type', False)"
widget="selection" select="1"
on_change="onchange_partner_id(partner_id, journal_id, amount, currency_id, type, date)"
on_change="onchange_partner_id(partner_id, journal_id, amount,
currency_id, type, date, context)"
string="Payment Method"/>
<field name="date" select="1" invisible="context.get('line_type', False)" on_change="onchange_date(partner_id, journal_id, amount, currency_id, type, date)"/>
<field name="amount"
invisible="context.get('line_type', False)"
on_change="onchange_partner_id(partner_id, journal_id, amount,
currency_id, type, date, context)"/>
<field name="date"
invisible="context.get('line_type', False)"
on_change="onchange_date(partner_id, journal_id, amount,
currency_id, type, date, context)"/>
<field name="reference" select="1" invisible="context.get('line_type', False)" string="Payment Ref"/>
<field name="name" colspan="2" invisible="context.get('line_type', False)"/>
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
@ -159,25 +194,37 @@
<page string="Payment Information">
<field name="line_dr_ids" default_get="{'journal_id':journal_id, 'type':type, 'partner_id':partner_id}" colspan="4" nolabel="1" height="140">
<tree string="Supplier Invoices and Outstanding transactions" editable="bottom">
<field name="move_line_id" context="{'journal_id':parent.journal_id, 'partner_id':parent.partner_id}"
<field name="move_line_id" required="1" context="{'journal_id':parent.journal_id, 'partner_id':parent.partner_id}"
on_change="onchange_move_line_id(move_line_id)"
domain="[('account_id.type','=','payable'), ('reconcile_id','=', False), ('partner_id','=',parent.partner_id)]"
/>
<field name="account_id" groups="base.group_extended" domain="[('type','=','payable')]"/>
<field name="date_original" readonly="1"/>
<field name="date_due" readonly="1"/>
<field name="amount_original" readonly="1"/>
<field name="amount_unreconciled" sum="Open Balance" readonly="1"/>
<field name="amount" sum="Payment"/>
<field name="currency_id" readonly="1"/>
<field name="amount_original" readonly="1" invisible="1"/>
<field name="amount_unreconciled" readonly="1"/>
<field name="amount" on_change="onchange_amount(amount)"/>
<field name="amount_in_voucher_currency" readonly="1" groups="base.group_no_one"/>
<field name="voucher_currency_id" readonly="1" groups="base.group_no_one"/>
<field name="amount_in_company_currency" readonly="1" invisible="1"/>
<field name="company_currency_id" readonly="1" invisible="1"/>
</tree>
</field>
<field name="line_cr_ids" colspan="4" nolabel="1" attrs="{'invisible': [('pre_line','=',False)]}" default_get="{'journal_id':journal_id, 'partner_id':partner_id}">
<tree string="Credits" editable="bottom">
<field name="move_line_id"/>
<field name="move_line_id" required="1"/>
<field name="account_id" groups="base.group_extended" domain="[('type','=','receivable')]"/>
<field name="date_original"/>
<field name="amount_original"/>
<field name="amount" sum="Payment"/>
<field name="date_original" readonly="1"/>
<field name="date_due" readonly="1"/>
<field name="currency_id" readonly="1"/>
<field name="amount_original" readonly="1" invisible="1"/>
<field name="amount_unreconciled" readonly="1"/>
<field name="amount" on_change="onchange_amount(amount)"/>
<field name="amount_in_voucher_currency" readonly="1" groups="base.group_no_one"/>
<field name="voucher_currency_id" readonly="1" groups="base.group_no_one"/>
<field name="amount_in_company_currency" readonly="1" invisible="1"/>
<field name="company_currency_id" readonly="1" invisible="1"/>
</tree>
</field>
<group col="2" colspan="3">
@ -185,24 +232,26 @@
<field name="narration" colspan="2" nolabel="1"/>
</group>
<group col="2" colspan="1">
<group col="2" colspan="1">
<separator string="Payment Options" colspan="2"/>
<field name="payment_option" required="1"/>
<group col="4" colspan="1">
<separator string="Payment Options" colspan="4"/>
<field name="payment_option" required="1" colspan="4"/>
<field name="currency_rate_difference" attrs="{'invisible':[('payment_option','!=','with_writeoff')]}"/>
<field name="company_currency" attrs="{'invisible':[('payment_option','!=','with_writeoff')]}" nolabel="1"/><newline/>
<field name="writeoff_amount"
attrs="{'invisible':[('payment_option','!=','with_writeoff')]}"/>
<field name="currency_id2" nolabel="1" attrs="{'invisible':[('payment_option','!=','with_writeoff')]}"/><newline/>
<field name="writeoff_acc_id"
attrs="{'invisible':[('payment_option','!=','with_writeoff')], 'required':[('payment_option','=','with_writeoff')]}"
domain="[('type','=','other')]"/>
domain="[('type','=','other')]" colspan="4"/>
<field name="comment"
attrs="{'invisible':[('payment_option','!=','with_writeoff')]}"/>
attrs="{'invisible':[('payment_option','!=','with_writeoff')]}" colspan="4"/>
<field name="analytic_id"
attrs="{'invisible':[('payment_option','!=','with_writeoff')]}"
groups="analytic.group_analytic_accounting"/>
groups="analytic.group_analytic_accounting" colspan="4"/>
</group>
<separator string="Other Information" colspan="2"/>
<group col="4" colspan="1">
<field name="currency_id"/>
<field name="number"/>
<field name="number"/>
</group>
</group>
</page>
@ -269,56 +318,88 @@
id="menu_action_vendor_payment" parent="account.menu_finance_payables"/>
<record model="ir.ui.view" id="view_vendor_receipt_form">
<field name="name">account.voucher.receipt.form</field>
<field name="name">voucher.form.customer.payment</field>
<field name="model">account.voucher</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Customer Payment">
<group col="6" colspan="4">
<field name="partner_id" required="1" invisible="context.get('line_type', False)" on_change="onchange_partner_id(partner_id, journal_id, amount, currency_id, type, date)" string="Customer"/>
<field name="amount"
invisible="context.get('line_type', False)"
string="Paid Amount"
on_change="onchange_partner_id(partner_id, journal_id, amount, currency_id, type, date)"/>
<group col="12" colspan="4">
<field name="partner_id"
colspan="4"
required="1"
invisible="context.get('line_type', False)"
on_change="onchange_partner_id(partner_id, journal_id, amount,
currency_id, type, date, context)"
string="Customer"/>
<field name="journal_id"
domain="[('type','in',['bank', 'cash'])]"
invisible="context.get('line_type', False)"
widget="selection" select="1"
on_change="onchange_partner_id(partner_id, journal_id, amount, currency_id, type, date)"
string="Payment Method"/>
<field name="date" select="1" invisible="context.get('line_type', False)" on_change="onchange_date(partner_id, journal_id, amount, currency_id, type, date)"/>
<field name="reference" select="1" invisible="context.get('line_type', False)" string="Payment Ref"/>
<field name="name" colspan="2" invisible="context.get('line_type', False)"/>
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
<field name="account_id"
widget="selection"
select="1"
on_change="onchange_partner_id(partner_id, journal_id, amount,
currency_id, type, date, context)"
string="Payment Method"
colspan="4"/>
<field name="amount"
colspan="1"
invisible="context.get('line_type', False)"
string="Paid Amount"
on_change="onchange_partner_id(partner_id, journal_id, amount,
currency_id, type, date, context)"/>
<field name="currency_id" nolabel="1" invisible="1"/>
<field name="date"
colspan="4"
select="1"
invisible="context.get('line_type', False)"
on_change="onchange_date(partner_id, journal_id, amount,
currency_id, type, date, context)"/>
<field name="reference" colspan="4" select="1" invisible="context.get('line_type', False)" string="Payment Ref"/>
<field name="name" colspan="4" invisible="context.get('line_type', False)"/>
<field name="company_id" colspan="4" widget="selection" groups="base.group_multi_company"/>
<field name="account_id" colspan="4"
widget="selection"
invisible="True"/>
<field name="pre_line" invisible="1"/>
<field name="type" invisible="True"/>
<field name="pre_line" colspan="4" invisible="1"/>
<field name="type" colspan="4" invisible="True"/>
</group>
<notebook colspan="4">
<page string="Payment Information">
<field name="line_cr_ids" default_get="{'journal_id':journal_id, 'type':type, 'partner_id':partner_id}" colspan="4" nolabel="1" height="140" on_change="onchange_line_ids(line_dr_ids, line_cr_ids, amount)">
<field name="line_cr_ids" default_get="{'journal_id':journal_id, 'type':type, 'partner_id':partner_id}" colspan="4" nolabel="1" height="140" on_change="onchange_line_ids(line_dr_ids, line_cr_ids, amount, date, context)">
<tree string="Invoices and outstanding transactions" editable="bottom">
<field name="move_line_id" context="{'journal_id':parent.journal_id, 'partner_id':parent.partner_id}"
<field name="move_line_id" required="1" context="{'journal_id':parent.journal_id, 'partner_id':parent.partner_id}"
on_change="onchange_move_line_id(move_line_id)"
domain="[('account_id.type','in',('receivable','payable')), ('reconcile_id','=', False), ('partner_id','=',parent.partner_id)]"
/>
<field name="account_id" groups="base.group_extended" domain="[('type','=','receivable')]"/>
<field name="account_id" groups="base.group_extended" domain="[('type','=','receivable')]" invisible="1"/>
<field name="date_original" readonly="1"/>
<field name="date_due" readonly="1"/>
<field name="amount_original" readonly="1"/>
<field name="amount_unreconciled" sum="Open Balance" readonly="1"/>
<field name="amount" sum="Payment"/>
<field name="currency_id" readonly="1"/>
<field name="amount_original" readonly="1" invisible="1"/>
<field name="amount_unreconciled" readonly="1"/>
<field name="amount" on_change="onchange_amount(amount)"/>
<field name="amount_in_voucher_currency" readonly="1" groups="base.group_no_one"/>
<field name="voucher_currency_id" readonly="1" groups="base.group_no_one"/>
<field name="amount_in_company_currency" readonly="1" invisible="1"/>
<field name="company_currency_id" readonly="1" invisible="1"/>
</tree>
</field>
<field name="line_dr_ids" colspan="4" nolabel="1" attrs="{'invisible': [('pre_line','=',False)]}" default_get="{'journal_id':journal_id, 'partner_id':partner_id}" on_change="onchange_line_ids(line_dr_ids, line_cr_ids, amount)">
<field name="line_dr_ids" colspan="4" nolabel="1" attrs="{'invisible': [('pre_line','=',False)]}" default_get="{'journal_id':journal_id, 'partner_id':partner_id}" on_change="onchange_line_ids(line_dr_ids, line_cr_ids, amount, date, context)">
<tree string="Credits" editable="bottom">
<field name="move_line_id"/>
<field name="account_id" groups="base.group_extended" domain="[('type','=','receivable')]"/>
<field name="date_original"/>
<field name="amount_original"/>
<field name="amount" sum="Payment"/>
<field name="move_line_id" required="1" context="{'journal_id':parent.journal_id, 'partner_id':parent.partner_id}"
on_change="onchange_move_line_id(move_line_id)"
domain="[('account_id.type','in',('receivable','payable')), ('reconcile_id','=', False), ('partner_id','=',parent.partner_id)]"
/>
<field name="account_id" groups="base.group_extended" domain="[('type','=','receivable')]" invisible="1"/>
<field name="date_original" readonly="1"/>
<field name="date_due" readonly="1"/>
<field name="currency_id" readonly="1"/>
<field name="amount_original" readonly="1" invisible="1"/>
<field name="amount_unreconciled" readonly="1"/>
<field name="amount" on_change="onchange_amount(amount)"/>
<field name="amount_in_voucher_currency" readonly="1" groups="base.group_no_one"/>
<field name="voucher_currency_id" readonly="1" groups="base.group_no_one"/>
<field name="amount_in_company_currency" readonly="1" invisible="1"/>
<field name="company_currency_id" readonly="1" invisible="1"/>
</tree>
</field>
<group col="2" colspan="3">
@ -326,23 +407,25 @@
<field name="narration" colspan="2" nolabel="1"/>
</group>
<group col="2" colspan="1">
<group col="2" colspan="1">
<separator string="Payment Options" colspan="2"/>
<field name="payment_option" required="1"/>
<group col="4" colspan="1">
<separator string="Payment Options" colspan="4"/>
<field name="payment_option" required="1" colspan="4"/>
<field name="currency_rate_difference" attrs="{'invisible':[('payment_option','!=','with_writeoff')]}"/>
<field name="company_currency" attrs="{'invisible':[('payment_option','!=','with_writeoff')]}" nolabel="1"/><newline/>
<field name="writeoff_amount"
attrs="{'invisible':[('payment_option','!=','with_writeoff')]}"/>
<field name="currency_id2" nolabel="1" attrs="{'invisible':[('payment_option','!=','with_writeoff')]}"/><newline/>
<field name="writeoff_acc_id"
attrs="{'invisible':[('payment_option','!=','with_writeoff')], 'required':[('payment_option','=','with_writeoff')]}"
domain="[('type','=','other')]"/>
domain="[('type','=','other')]" colspan="4"/>
<field name="comment"
attrs="{'invisible':[('payment_option','!=','with_writeoff')]}"/>
attrs="{'invisible':[('payment_option','!=','with_writeoff')]}" colspan="4"/>
<field name="analytic_id"
attrs="{'invisible':[('payment_option','!=','with_writeoff')]}"
groups="analytic.group_analytic_accounting"/>
groups="analytic.group_analytic_accounting" colspan="4"/>
</group>
<separator string="Other Information" colspan="2"/>
<group col="4" colspan="1">
<field name="currency_id"/>
<field name="number"/>
</group>
</group>

View File

@ -83,7 +83,7 @@
<form string="Sales Receipt">
<group col="6" colspan="4">
<field name="partner_id" required="1" on_change="onchange_partner_id(partner_id, journal_id, amount, currency_id, type, date)" string="Customer"/>
<field name="date" on_change="onchange_date(partner_id, journal_id, amount, currency_id, type, date)"/>
<field name="date" on_change="onchange_date(partner_id, journal_id, amount, currency_id, type, date, context)"/>
<field name="journal_id" domain="[('type','in',['sale','sale_refund'])]" widget="selection" on_change="onchange_journal(journal_id, line_cr_ids, tax_id, partner_id)"/>
<field name="number"/>
<field name="name" colspan="2"/>
@ -209,7 +209,7 @@
<form string="Supplier Voucher">
<group col="6" colspan="4">
<field name="partner_id" domain="[('supplier','=',True)]" required="1" string="Supplier" on_change="onchange_partner_id(partner_id, journal_id, amount, currency_id, type, date)"/>
<field name="date" string="Bill Date" select="1" on_change="onchange_date(partner_id, journal_id, amount, currency_id, type, date)"/>
<field name="date" string="Bill Date" select="1" on_change="onchange_date(partner_id, journal_id, amount, currency_id, type, date, context)"/>
<field name="journal_id" domain="[('type','in',['purchase','purchase_refund'])]" widget="selection" select="1" on_change="onchange_journal(journal_id, line_dr_ids, tax_id, partner_id)"/>
<field name="number"/>
<field name="name" colspan="2"/>

View File

@ -75,7 +75,7 @@ class account_statement_from_invoice_lines(osv.osv_memory):
statement.currency.id, amount, context=ctx)
context.update({'move_line_ids': [line.id]})
result = voucher_obj.onchange_partner_id(cr, uid, [], partner_id=line.partner_id.id, journal_id=statement.journal_id.id, price=abs(amount), currency_id= statement.currency.id, ttype=(amount < 0 and 'payment' or 'receipt'), date=line_date, context=context)
result = voucher_obj.onchange_partner_id(cr, uid, [], partner_id=line.partner_id.id, journal_id=statement.journal_id.id, price=abs(amount), voucher_currency_id= statement.currency.id, ttype=(amount < 0 and 'payment' or 'receipt'), date=line_date, context=context)
voucher_res = { 'type':(amount < 0 and 'payment' or 'receipt'),
'name': line.name,
'partner_id': line.partner_id.id,

View File

@ -0,0 +1,110 @@
# English (United Kingdom) translation for openobject-addons
# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2011.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2011-01-03 16:56+0000\n"
"PO-Revision-Date: 2011-08-25 11:50+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: English (United Kingdom) <en_GB@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: 2011-08-26 04:33+0000\n"
"X-Generator: Launchpad (build 13779)\n"
#. module: analytic_journal_billing_rate
#: model:ir.module.module,description:analytic_journal_billing_rate.module_meta_information
msgid ""
"\n"
"\n"
" This module allows you to define what is the default invoicing rate for "
"a specific journal on a given account. This is mostly used when a user "
"encodes his timesheet: the values are retrieved and the fields are auto-"
"filled... but the possibility to change these values is still available.\n"
"\n"
" Obviously if no data has been recorded for the current account, the "
"default value is given as usual by the account data so that this module is "
"perfectly compatible with older configurations.\n"
"\n"
" "
msgstr ""
"\n"
"\n"
" This module allows you to define the default invoicing rate for a "
"specific journal on a given account. This is mostly used when a user encodes "
"their timesheet: the values are retrieved and the fields are auto-filled... "
"but the possibility to change these values is still available.\n"
"\n"
" Obviously if no data has been recorded for the current account, the "
"default value is given by the account data so that this module is perfectly "
"compatible with older configurations.\n"
"\n"
" "
#. module: analytic_journal_billing_rate
#: field:analytic_journal_rate_grid,journal_id:0
msgid "Analytic Journal"
msgstr "Analytic Journal"
#. module: analytic_journal_billing_rate
#: model:ir.model,name:analytic_journal_billing_rate.model_account_invoice
msgid "Invoice"
msgstr "Invoice"
#. module: analytic_journal_billing_rate
#: view:analytic_journal_rate_grid:0
msgid "Billing Rate per Journal for this Analytic Account"
msgstr "Billing Rate per Journal for this Analytic Account"
#. module: analytic_journal_billing_rate
#: field:analytic_journal_rate_grid,account_id:0
#: model:ir.model,name:analytic_journal_billing_rate.model_account_analytic_account
msgid "Analytic Account"
msgstr "Analytic Account"
#. module: analytic_journal_billing_rate
#: model:ir.model,name:analytic_journal_billing_rate.model_analytic_journal_rate_grid
msgid "Relation table between journals and billing rates"
msgstr "Relation table between journals and billing rates"
#. module: analytic_journal_billing_rate
#: field:account.analytic.account,journal_rate_ids:0
msgid "Invoicing Rate per Journal"
msgstr "Invoicing Rate per Journal"
#. module: analytic_journal_billing_rate
#: model:ir.module.module,shortdesc:analytic_journal_billing_rate.module_meta_information
msgid ""
"Analytic Journal Billing Rate, Define the default invoicing rate for a "
"specific journal"
msgstr ""
"Analytic Journal Billing Rate, Define the default invoicing rate for a "
"specific journal"
#. module: analytic_journal_billing_rate
#: constraint:account.analytic.account:0
msgid ""
"Error! The currency has to be the same as the currency of the selected "
"company"
msgstr ""
"Error! The currency has to be the same as that of the selected company"
#. module: analytic_journal_billing_rate
#: field:analytic_journal_rate_grid,rate_id:0
msgid "Invoicing Rate"
msgstr "Invoicing Rate"
#. module: analytic_journal_billing_rate
#: constraint:account.analytic.account:0
msgid "Error! You can not create recursive analytic accounts."
msgstr "Error! You can not create recursive analytic accounts."
#. module: analytic_journal_billing_rate
#: model:ir.model,name:analytic_journal_billing_rate.model_hr_analytic_timesheet
msgid "Timesheet Line"
msgstr "Timesheet Line"

View File

@ -0,0 +1,116 @@
# English (United Kingdom) translation for openobject-addons
# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2011.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2011-01-03 16:56+0000\n"
"PO-Revision-Date: 2011-08-25 17:43+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: English (United Kingdom) <en_GB@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: 2011-08-26 04:33+0000\n"
"X-Generator: Launchpad (build 13779)\n"
#. module: analytic_user_function
#: field:analytic_user_funct_grid,product_id:0
msgid "Product"
msgstr "Product"
#. module: analytic_user_function
#: code:addons/analytic_user_function/analytic_user_function.py:96
#: code:addons/analytic_user_function/analytic_user_function.py:131
#, python-format
msgid "Error !"
msgstr "Error !"
#. module: analytic_user_function
#: model:ir.model,name:analytic_user_function.model_hr_analytic_timesheet
msgid "Timesheet Line"
msgstr "Timesheet Line"
#. module: analytic_user_function
#: field:analytic_user_funct_grid,account_id:0
#: model:ir.model,name:analytic_user_function.model_account_analytic_account
msgid "Analytic Account"
msgstr "Analytic Account"
#. module: analytic_user_function
#: view:account.analytic.account:0
#: field:account.analytic.account,user_product_ids:0
msgid "Users/Products Rel."
msgstr "Users/Products Rel."
#. module: analytic_user_function
#: field:analytic_user_funct_grid,user_id:0
msgid "User"
msgstr "User"
#. module: analytic_user_function
#: constraint:account.analytic.account:0
msgid ""
"Error! The currency has to be the same as the currency of the selected "
"company"
msgstr ""
"Error! The currency has to be the same as that of the selected company"
#. module: analytic_user_function
#: code:addons/analytic_user_function/analytic_user_function.py:97
#: code:addons/analytic_user_function/analytic_user_function.py:132
#, python-format
msgid "There is no expense account define for this product: \"%s\" (id:%d)"
msgstr "There is no expense account define for this product: \"%s\" (id:%d)"
#. module: analytic_user_function
#: model:ir.model,name:analytic_user_function.model_analytic_user_funct_grid
msgid "Relation table between users and products on a analytic account"
msgstr "Relation table between users and products on a analytic account"
#. module: analytic_user_function
#: model:ir.module.module,description:analytic_user_function.module_meta_information
msgid ""
"\n"
"\n"
" This module allows you to define what is the default function of a "
"specific user on a given account. This is mostly used when a user encodes "
"his timesheet: the values are retrieved and the fields are auto-filled... "
"but the possibility to change these values is still available.\n"
"\n"
" Obviously if no data has been recorded for the current account, the "
"default value is given as usual by the employee data so that this module is "
"perfectly compatible with older configurations.\n"
"\n"
" "
msgstr ""
"\n"
"\n"
" This module allows you to define the default function of a specific user "
"on a given account. This is mostly used when a user encodes his timesheet: "
"the values are retrieved and the fields are auto-filled... but the "
"possibility to change these values is still available.\n"
"\n"
" Obviously if no data has been recorded for the current account, the "
"default value is given as usual by the employee data so that this module is "
"perfectly compatible with older configurations.\n"
"\n"
" "
#. module: analytic_user_function
#: model:ir.module.module,shortdesc:analytic_user_function.module_meta_information
msgid "Analytic User Function"
msgstr "Analytic User Function"
#. module: analytic_user_function
#: constraint:account.analytic.account:0
msgid "Error! You can not create recursive analytic accounts."
msgstr "Error! You can not create recursive analytic accounts."
#. module: analytic_user_function
#: view:analytic_user_funct_grid:0
msgid "User's Product for this Analytic Account"
msgstr "User's Product for this Analytic Account"

View File

@ -0,0 +1,145 @@
# English (United Kingdom) translation for openobject-addons
# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2011.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2011-01-11 11:14+0000\n"
"PO-Revision-Date: 2011-08-25 17:44+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: English (United Kingdom) <en_GB@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: 2011-08-26 04:33+0000\n"
"X-Generator: Launchpad (build 13779)\n"
#. module: association
#: field:profile.association.config.install_modules_wizard,wiki:0
msgid "Wiki"
msgstr "Wiki"
#. module: association
#: view:profile.association.config.install_modules_wizard:0
msgid "Event Management"
msgstr "Event Management"
#. module: association
#: field:profile.association.config.install_modules_wizard,project_gtd:0
msgid "Getting Things Done"
msgstr "Getting Things Done"
#. module: association
#: model:ir.module.module,description:association.module_meta_information
msgid "This module is to create Profile for Associates"
msgstr "This module is to create Profile for Associates"
#. module: association
#: field:profile.association.config.install_modules_wizard,progress:0
msgid "Configuration Progress"
msgstr "Configuration Progress"
#. module: association
#: view:profile.association.config.install_modules_wizard:0
msgid ""
"Here are specific applications related to the Association Profile you "
"selected."
msgstr ""
"Here are specific applications related to the Association Profile you "
"selected."
#. module: association
#: view:profile.association.config.install_modules_wizard:0
msgid "title"
msgstr "title"
#. module: association
#: help:profile.association.config.install_modules_wizard,event_project:0
msgid "Helps you to manage and organize your events."
msgstr "Helps you to manage and organise your events."
#. module: association
#: field:profile.association.config.install_modules_wizard,config_logo:0
msgid "Image"
msgstr "Image"
#. module: association
#: help:profile.association.config.install_modules_wizard,hr_expense:0
msgid ""
"Tracks and manages employee expenses, and can automatically re-invoice "
"clients if the expenses are project-related."
msgstr ""
"Tracks and manages employee expenses, and can automatically re-invoice "
"clients if the expenses are project-related."
#. module: association
#: help:profile.association.config.install_modules_wizard,project_gtd:0
msgid ""
"GTD is a methodology to efficiently organise yourself and your tasks. This "
"module fully integrates GTD principle with OpenERP's project management."
msgstr ""
"GTD is a methodology to efficiently organise yourself and your tasks. This "
"module fully integrates GTD principle with OpenERP's project management."
#. module: association
#: view:profile.association.config.install_modules_wizard:0
msgid "Resources Management"
msgstr "Resources Management"
#. module: association
#: model:ir.module.module,shortdesc:association.module_meta_information
msgid "Association profile"
msgstr "Association profile"
#. module: association
#: field:profile.association.config.install_modules_wizard,hr_expense:0
msgid "Expenses Tracking"
msgstr "Expenses Tracking"
#. module: association
#: model:ir.actions.act_window,name:association.action_config_install_module
#: view:profile.association.config.install_modules_wizard:0
msgid "Association Application Configuration"
msgstr "Association Application Configuration"
#. module: association
#: help:profile.association.config.install_modules_wizard,wiki:0
msgid ""
"Lets you create wiki pages and page groups in order to keep track of "
"business knowledge and share it with and between your employees."
msgstr ""
"Lets you create wiki pages and page groups to keep track of business "
"knowledge and share it with and between your employees."
#. module: association
#: help:profile.association.config.install_modules_wizard,project:0
msgid ""
"Helps you manage your projects and tasks by tracking them, generating "
"plannings, etc..."
msgstr ""
"Helps you manage your projects and tasks by tracking them, generating "
"plannings, etc..."
#. module: association
#: model:ir.model,name:association.model_profile_association_config_install_modules_wizard
msgid "profile.association.config.install_modules_wizard"
msgstr "profile.association.config.install_modules_wizard"
#. module: association
#: field:profile.association.config.install_modules_wizard,event_project:0
msgid "Events"
msgstr "Events"
#. module: association
#: view:profile.association.config.install_modules_wizard:0
#: field:profile.association.config.install_modules_wizard,project:0
msgid "Project Management"
msgstr "Project Management"
#. module: association
#: view:profile.association.config.install_modules_wizard:0
msgid "Configure"
msgstr "Configure"

View File

@ -30,8 +30,7 @@
Replaces cleartext passwords in the database with a secure hash
===============================================================
For your existing user base, the removal of the cleartext
passwords occurs the first time a user logs into the database,
after installing base_crypt.
passwords occurs immediately when you instal base_crypt.
All passwords will be replaced by a secure, salted, cryptographic
hash, preventing anyone from reading the original password in
@ -45,7 +44,7 @@ Security Warning
++++++++++++++++
Installing this module does not mean you can ignore other security measures,
as the password is still transmitted unencrypted on the network, unless you
are using a secure protocol such as XML-RPCS.
are using a secure protocol such as XML-RPCS or HTTPS.
It also does not protect the rest of the content of the database, which may
contain critical data. Appropriate security measures need to be implemented
by the system administrator in all areas, such as: protection of database

View File

@ -0,0 +1,86 @@
# English (United Kingdom) translation for openobject-addons
# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2011.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2011-01-11 11:14+0000\n"
"PO-Revision-Date: 2011-08-25 11:52+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: English (United Kingdom) <en_GB@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: 2011-08-26 04:33+0000\n"
"X-Generator: Launchpad (build 13779)\n"
#. module: base_crypt
#: sql_constraint:res.users:0
msgid "You can not have two users with the same login !"
msgstr "You can not have two users with the same login !"
#. module: base_crypt
#: model:ir.model,name:base_crypt.model_res_users
msgid "res.users"
msgstr "res.users"
#. module: base_crypt
#: constraint:res.users:0
msgid "The chosen company is not in the allowed companies for this user"
msgstr "The chosen company is not in the allowed companies for this user"
#. module: base_crypt
#: code:addons/base_crypt/crypt.py:132
#, python-format
msgid "Please specify the password !"
msgstr "Please specify the password !"
#. module: base_crypt
#: model:ir.module.module,shortdesc:base_crypt.module_meta_information
msgid "Base - Password Encryption"
msgstr "Base - Password Encryption"
#. module: base_crypt
#: code:addons/base_crypt/crypt.py:132
#, python-format
msgid "Error"
msgstr "Error"
#. module: base_crypt
#: model:ir.module.module,description:base_crypt.module_meta_information
msgid ""
"This module replaces the cleartext password in the database with a password "
"hash,\n"
"preventing anyone from reading the original password.\n"
"For your existing user base, the removal of the cleartext passwords occurs "
"the first time\n"
"a user logs into the database, after installing base_crypt.\n"
"After installing this module it won't be possible to recover a forgotten "
"password for your\n"
"users, the only solution is for an admin to set a new password.\n"
"\n"
"Note: installing this module does not mean you can ignore basic security "
"measures,\n"
"as the password is still transmitted unencrypted on the network (by the "
"client),\n"
"unless you are using a secure protocol such as XML-RPCS.\n"
" "
msgstr ""
"This module replaces the cleartext password in the database with a password "
"hash,\n"
"preventing anyone from reading the original password.\n"
"For your existing user base, the removal of the cleartext passwords occurs "
"the first time\n"
"a user logs into the database, after installing base_crypt.\n"
"After installing this module it is impossible to recover a forgotten user\n"
"password, the only solution is for an admin to set a new password.\n"
"\n"
"Note: installing this module does not mean you can ignore basic security "
"measures,\n"
"as the password is still transmitted unencrypted on the network (by the "
"client),\n"
"unless you are using a secure protocol such as XML-RPCS.\n"
" "

View File

@ -31,7 +31,7 @@ The ability to extract the correctly represented local accounts from IBAN accoun
""",
'author': 'OpenERP SA',
'website': 'http://www.openerp.com',
'depends': ['account'],
'depends': ['base'],
'init_xml': ['base_iban_data.xml'],
'update_xml': ['base_iban_view.xml'],
'installable': True,

View File

@ -0,0 +1,99 @@
# English (United Kingdom) translation for openobject-addons
# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2011.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2011-01-11 11:14+0000\n"
"PO-Revision-Date: 2011-08-25 17:41+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: English (United Kingdom) <en_GB@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: 2011-08-26 04:32+0000\n"
"X-Generator: Launchpad (build 13779)\n"
#. module: base_iban
#: model:ir.module.module,shortdesc:base_iban.module_meta_information
msgid "Create IBAN bank accounts"
msgstr "Create IBAN bank accounts"
#. module: base_iban
#: code:addons/base_iban/base_iban.py:120
#, python-format
msgid ""
"The IBAN does not seems to be correct. You should have entered something "
"like this %s"
msgstr ""
"The IBAN appears to be incorrect. You should have entered something like "
"this %s"
#. module: base_iban
#: model:res.partner.bank.type.field,name:base_iban.bank_zip_field
msgid "zip"
msgstr "zip"
#. module: base_iban
#: help:res.partner.bank,iban:0
msgid "International Bank Account Number"
msgstr "International Bank Account Number"
#. module: base_iban
#: model:ir.model,name:base_iban.model_res_partner_bank
msgid "Bank Accounts"
msgstr "Bank Accounts"
#. module: base_iban
#: model:res.partner.bank.type.field,name:base_iban.bank_country_field
msgid "country_id"
msgstr "country_id"
#. module: base_iban
#: model:res.partner.bank.type.field,name:base_iban.bank_swift_field
msgid "bic"
msgstr "bic"
#. module: base_iban
#: model:res.partner.bank.type.field,name:base_iban.bank_iban_field
msgid "iban"
msgstr "iban"
#. module: base_iban
#: code:addons/base_iban/base_iban.py:121
#, python-format
msgid "The IBAN is invalid, It should begin with the country code"
msgstr "The IBAN is invalid, It should begin with the country code"
#. module: base_iban
#: field:res.partner.bank,iban:0
msgid "IBAN"
msgstr "IBAN"
#. module: base_iban
#: model:res.partner.bank.type,name:base_iban.bank_iban
msgid "IBAN Account"
msgstr "IBAN Account"
#. module: base_iban
#: model:ir.module.module,description:base_iban.module_meta_information
msgid ""
"\n"
"This module installs the base for IBAN (International Bank Account Number) "
"bank accounts and checks for its validity.\n"
"\n"
" "
msgstr ""
"\n"
"This module installs the base for IBAN (International Bank Account Number) "
"bank accounts and checks for its validity.\n"
"\n"
" "
#. module: base_iban
#: model:res.partner.bank.type.field,name:base_iban.bank_acc_number_field
msgid "acc_number"
msgstr "acc_number"

View File

@ -14,7 +14,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2011-08-20 04:53+0000\n"
"X-Launchpad-Export-Date: 2011-08-23 05:05+0000\n"
"X-Generator: Launchpad (build 13697)\n"
#. module: base_module_quality

View File

@ -0,0 +1,32 @@
# Arabic translation for openobject-addons
# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2011.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2011-01-11 11:14+0000\n"
"PO-Revision-Date: 2011-08-23 01:58+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Arabic <ar@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: 2011-08-24 04:37+0000\n"
"X-Generator: Launchpad (build 13697)\n"
#. module: base_tools
#: model:ir.module.module,shortdesc:base_tools.module_meta_information
msgid "Common base for tools modules"
msgstr "قاعدة أساسية لأدوات البرامج"
#. module: base_tools
#: model:ir.module.module,description:base_tools.module_meta_information
msgid ""
"\n"
" "
msgstr ""
"\n"
" "

View File

@ -0,0 +1,32 @@
# English (United Kingdom) translation for openobject-addons
# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2011.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2011-01-11 11:14+0000\n"
"PO-Revision-Date: 2011-08-25 11:52+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: English (United Kingdom) <en_GB@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: 2011-08-26 04:33+0000\n"
"X-Generator: Launchpad (build 13779)\n"
#. module: base_tools
#: model:ir.module.module,shortdesc:base_tools.module_meta_information
msgid "Common base for tools modules"
msgstr "Common base for tools modules"
#. module: base_tools
#: model:ir.module.module,description:base_tools.module_meta_information
msgid ""
"\n"
" "
msgstr ""
"\n"
" "

View File

@ -0,0 +1,86 @@
# English (United Kingdom) translation for openobject-addons
# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2011.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2011-01-11 11:14+0000\n"
"PO-Revision-Date: 2011-08-25 17:34+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: English (United Kingdom) <en_GB@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: 2011-08-26 04:32+0000\n"
"X-Generator: Launchpad (build 13779)\n"
#. module: base_vat
#: code:addons/base_vat/base_vat.py:87
#, python-format
msgid ""
"The Vat does not seems to be correct. You should have entered something like "
"this %s"
msgstr ""
"The VAT does appear to be incorrect. You should have entered something like "
"this %s"
#. module: base_vat
#: model:ir.module.module,description:base_vat.module_meta_information
msgid ""
"\n"
" Enable the VAT Number for the partner. Check the validity of that VAT "
"Number.\n"
"\n"
" This module follows the methods stated at http://sima-pc.com/nif.php "
"for\n"
" checking the validity of VAT Number assigned to partners in European "
"countries.\n"
" "
msgstr ""
"\n"
" Enable the VAT Number for the partner. Check the validity of that VAT "
"Number.\n"
"\n"
" This module follows the methods stated at http://sima-pc.com/nif.php "
"for\n"
" checking the validity of VAT Number assigned to partners in European "
"countries.\n"
" "
#. module: base_vat
#: model:ir.module.module,shortdesc:base_vat.module_meta_information
msgid "Base VAT - To check VAT number validity"
msgstr "Base VAT - To check VAT number validity"
#. module: base_vat
#: constraint:res.partner:0
msgid "Error ! You can not create recursive associated members."
msgstr "Error ! You can not create recursive associated members."
#. module: base_vat
#: code:addons/base_vat/base_vat.py:88
#, python-format
msgid "The VAT is invalid, It should begin with the country code"
msgstr "The VAT is invalid, It should begin with the country code"
#. module: base_vat
#: help:res.partner,vat_subjected:0
msgid ""
"Check this box if the partner is subjected to the VAT. It will be used for "
"the VAT legal statement."
msgstr ""
"Check this box if the partner is subject to VAT. It will be used for the VAT "
"legal statement."
#. module: base_vat
#: model:ir.model,name:base_vat.model_res_partner
msgid "Partner"
msgstr "Partner"
#. module: base_vat
#: field:res.partner,vat_subjected:0
msgid "VAT Legal Statement"
msgstr "VAT Legal Statement"

View File

@ -6,9 +6,35 @@
<field name="name">Applications Tiles</field>
<field name="tag">board.home.applications</field>
</record>
<record id="action_res_widgets_display" model="ir.actions.client">
<field name="name">Homepage Widgets</field>
<record id="action_res_widgets_tweets" model="ir.actions.client">
<field name="name">Tweets Widget</field>
<field name="tag">board.home.widgets</field>
<field name="params" eval="{'widget_id': ref('base.openerp_favorites_twitter_widget')}"/>
</record>
<record id="action_res_widgets_events" model="ir.actions.client">
<field name="name">Events Widget</field>
<field name="tag">board.home.widgets</field>
<field name="params" eval="{'widget_id': ref('base.events_widget')}"/>
</record>
<record id="action_res_widgets_facebook" model="ir.actions.client">
<field name="name">Facebook Widget</field>
<field name="tag">board.home.widgets</field>
<field name="params" eval="{'widget_id': ref('base.facebook_widget')}"/>
</record>
<record id="action_res_widgets_note" model="ir.actions.client">
<field name="name">Note Widget</field>
<field name="tag">board.home.widgets</field>
<field name="params" eval="{'widget_id': ref('base.note_widget')}"/>
</record>
<record id="action_res_widgets_map" model="ir.actions.client">
<field name="name">Google Maps Widget</field>
<field name="tag">board.home.widgets</field>
<field name="params" eval="{'widget_id': ref('base.google_maps_widget')}"/>
</record>
<record id="action_res_widgets_currency_converter" model="ir.actions.client">
<field name="name">Currency Converter Widget</field>
<field name="tag">board.home.widgets</field>
<field name="params" eval="{'widget_id': ref('base.currency_converter_widget')}"/>
</record>
<record id="view_board_homepage" model="ir.ui.view">
<field name="name">Homepage Board</field>
@ -21,7 +47,8 @@
<action name="%(action_application_tiles)d"/>
</child1>
<child2>
<action name="%(action_res_widgets_display)d"/>
<action name="%(action_res_widgets_tweets)d"/>
<action name="%(action_res_widgets_events)d"/>
</child2>
</hpaned>
</form>
@ -110,7 +137,7 @@
<menuitem
action="action_view_board_list_form"
id="menu_view_board_form" parent="base.reporting_menu" groups="base.group_no_one" sequence="1"/>
id="menu_view_board_form" parent="base.reporting_menu" sequence="1"/>
<act_window context="{'view': active_id}" id="dashboard_open"
multi="True" name="Open Dashboard" res_model="board.board"

View File

@ -14,7 +14,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2011-08-20 04:53+0000\n"
"X-Launchpad-Export-Date: 2011-08-23 05:05+0000\n"
"X-Generator: Launchpad (build 13697)\n"
#. module: caldav

View File

@ -31,7 +31,7 @@ if True: # we need this indentation level ;)
"""
if context is None:
context = {}
self.pool.get('ir.model.access').check(cr, access_rights_uid or user, self._name, 'read', context=context)
self.pool.get('ir.model.access').check(cr, access_rights_uid or user, self._name, 'read', True)
query = self._where_calc(cr, user, args, context=context)
self._apply_ir_rules(cr, user, query, 'read', context=context)

View File

@ -0,0 +1,33 @@
# English (United Kingdom) translation for openobject-addons
# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2011.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2011-01-11 11:14+0000\n"
"PO-Revision-Date: 2011-08-25 11:53+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: English (United Kingdom) <en_GB@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: 2011-08-26 04:33+0000\n"
"X-Generator: Launchpad (build 13779)\n"
#. module: claim_from_delivery
#: model:ir.actions.act_window,name:claim_from_delivery.action_claim_from_delivery
msgid "Claim"
msgstr "Claim"
#. module: claim_from_delivery
#: model:ir.module.module,description:claim_from_delivery.module_meta_information
msgid "Create Claim from delivery order:\n"
msgstr "Create Claim from delivery order:\n"
#. module: claim_from_delivery
#: model:ir.module.module,shortdesc:claim_from_delivery.module_meta_information
msgid "Claim from delivery"
msgstr "Claim from delivery"

View File

@ -24,17 +24,11 @@ import crm_action_rule
import crm_segmentation
import crm_meeting
import crm_lead
import crm_opportunity
import crm_phonecall
import crm_installer
import report
import wizard
import res_partner
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -69,7 +69,6 @@ Creates a dashboard for CRM that includes:
'crm_meeting_data.xml',
'crm_lead_data.xml',
'crm_meeting_data.xml',
'crm_opportunity_data.xml',
'crm_phonecall_data.xml',
],
'update_xml': [
@ -103,9 +102,6 @@ Creates a dashboard for CRM that includes:
'crm_phonecall_view.xml',
'crm_phonecall_menu.xml',
'crm_opportunity_view.xml',
'crm_opportunity_menu.xml',
'report/crm_lead_report_view.xml',
'report/crm_phonecall_report_view.xml',
@ -121,7 +117,6 @@ Creates a dashboard for CRM that includes:
'crm_demo.xml',
'crm_lead_demo.xml',
'crm_meeting_demo.xml',
'crm_opportunity_demo.xml',
'crm_phonecall_demo.xml',
],
'test': [

View File

@ -44,17 +44,169 @@ AVAILABLE_PRIORITIES = [
('5', 'Lowest'),
]
class crm_case_channel(osv.osv):
_name = "crm.case.channel"
_description = "Channels"
_order = 'name'
_columns = {
'name': fields.char('Channel Name', size=64, required=True),
'active': fields.boolean('Active'),
}
_defaults = {
'active': lambda *a: 1,
}
class crm_case_stage(osv.osv):
""" Stage of case """
_name = "crm.case.stage"
_description = "Stage of case"
_rec_name = 'name'
_order = "sequence"
_columns = {
'name': fields.char('Stage Name', size=64, required=True, translate=True),
'sequence': fields.integer('Sequence', help="Used to order stages."),
'probability': fields.float('Probability (%)', required=True, help="This percentage depicts the default/average probability of the Case for this stage to be a success"),
'on_change': fields.boolean('Change Probability Automatically', help="Setting this stage will change the probability automatically on the opportunity."),
'requirements': fields.text('Requirements'),
'section_ids':fields.many2many('crm.case.section', 'section_stage_rel', 'stage_id', 'section_id', 'Sections'),
}
_defaults = {
'sequence': lambda *args: 1,
'probability': lambda *args: 0.0,
}
class crm_case_section(osv.osv):
"""Sales Team"""
_name = "crm.case.section"
_description = "Sales Teams"
_order = "complete_name"
def get_full_name(self, cr, uid, ids, field_name, arg, context=None):
return dict(self.name_get(cr, uid, ids, context=context))
_columns = {
'name': fields.char('Sales Team', size=64, required=True, translate=True),
'complete_name': fields.function(get_full_name, type='char', size=256, readonly=True, store=True),
'code': fields.char('Code', size=8),
'active': fields.boolean('Active', help="If the active field is set to "\
"true, it will allow you to hide the sales team without removing it."),
'allow_unlink': fields.boolean('Allow Delete', help="Allows to delete non draft cases"),
'change_responsible': fields.boolean('Reassign Escalated', help="When escalating to this team override the saleman with the team leader."),
'user_id': fields.many2one('res.users', 'Team Leader'),
'member_ids':fields.many2many('res.users', 'sale_member_rel', 'section_id', 'member_id', 'Team Members'),
'reply_to': fields.char('Reply-To', size=64, help="The email address put in the 'Reply-To' of all emails sent by OpenERP about cases in this sales team"),
'parent_id': fields.many2one('crm.case.section', 'Parent Team'),
'child_ids': fields.one2many('crm.case.section', 'parent_id', 'Child Teams'),
'resource_calendar_id': fields.many2one('resource.calendar', "Working Time", help="Used to compute open days"),
'note': fields.text('Description'),
'working_hours': fields.float('Working Hours', digits=(16,2 )),
'stage_ids': fields.many2many('crm.case.stage', 'section_stage_rel', 'section_id', 'stage_id', 'Stages'),
}
_defaults = {
'active': lambda *a: 1,
'allow_unlink': lambda *a: 1,
}
_sql_constraints = [
('code_uniq', 'unique (code)', 'The code of the sales team must be unique !')
]
def _check_recursion(self, cr, uid, ids, context=None):
"""
Checks for recursion level for sales team
@param self: The object pointer
@param cr: the current row, from the database cursor,
@param uid: the current users ID for security checks,
@param ids: List of Sales team ids
"""
level = 100
while len(ids):
cr.execute('select distinct parent_id from crm_case_section where id IN %s', (tuple(ids),))
ids = filter(None, map(lambda x: x[0], cr.fetchall()))
if not level:
return False
level -= 1
return True
_constraints = [
(_check_recursion, 'Error ! You cannot create recursive Sales team.', ['parent_id'])
]
def name_get(self, cr, uid, ids, context=None):
"""Overrides orm name_get method
@param self: The object pointer
@param cr: the current row, from the database cursor,
@param uid: the current users ID for security checks,
@param ids: List of sales team ids
"""
if context is None:
context = {}
if not isinstance(ids, list) :
ids = [ids]
res = []
if not ids:
return res
reads = self.read(cr, uid, ids, ['name', 'parent_id'], context)
for record in reads:
name = record['name']
if record['parent_id']:
name = record['parent_id'][1] + ' / ' + name
res.append((record['id'], name))
return res
class crm_case_categ(osv.osv):
""" Category of Case """
_name = "crm.case.categ"
_description = "Category of Case"
_columns = {
'name': fields.char('Name', size=64, required=True, translate=True),
'section_id': fields.many2one('crm.case.section', 'Sales Team'),
'object_id': fields.many2one('ir.model', 'Object Name'),
}
def _find_object_id(self, cr, uid, context=None):
"""Finds id for case object
@param self: The object pointer
@param cr: the current row, from the database cursor,
@param uid: the current users ID for security checks,
@param context: A standard dictionary for contextual values
"""
object_id = context and context.get('object_id', False) or False
ids = self.pool.get('ir.model').search(cr, uid, [('model', '=', object_id)])
return ids and ids[0]
_defaults = {
'object_id' : _find_object_id
}
class crm_case_resource_type(osv.osv):
""" Resource Type of case """
_name = "crm.case.resource.type"
_description = "Campaign"
_rec_name = "name"
_columns = {
'name': fields.char('Campaign Name', size=64, required=True, translate=True),
'section_id': fields.many2one('crm.case.section', 'Sales Team'),
}
class crm_base(object):
"""
Base classe for crm object,
Object that inherit from this class should have
date_open
date_closed
user_id
partner_id
partner_address_id
as field to be compatible with this class
""" Base utility mixin class for crm objects,
Object subclassing this should define colums:
date_open
date_closed
user_id
partner_id
partner_address_id
"""
def _get_default_partner_address(self, cr, uid, context=None):
"""Gives id of default address for current user
@ -77,7 +229,7 @@ class crm_base(object):
return False
user = self.pool.get('res.users').browse(cr, uid, uid, context=context)
return user.company_id.partner_id.id
def _get_default_email(self, cr, uid, context=None):
"""Gives default email address for current user
:param context: if portal in context is false return false anyway
@ -86,7 +238,7 @@ class crm_base(object):
return False
user = self.pool.get('res.users').browse(cr, uid, uid, context=context)
return user.user_email
def _get_default_user(self, cr, uid, context=None):
"""Gives current user id
:param context: if portal in context is false return false anyway
@ -100,7 +252,7 @@ class crm_base(object):
"""
user = self.pool.get('res.users').browse(cr, uid, uid, context=context)
return user.context_section_id.id or False
def onchange_partner_address_id(self, cr, uid, ids, add, email=False):
"""This function returns value of partner email based on Partner Address
@param ids: List of case IDs
@ -114,7 +266,7 @@ class crm_base(object):
return {'value': {'email_from': address.email, 'phone': address.phone}}
else:
return {'value': {'phone': address.phone}}
def onchange_partner_id(self, cr, uid, ids, part, email=False):
"""This function returns value of partner address based on partner
@param ids: List of case IDs
@ -127,11 +279,9 @@ class crm_base(object):
data = {'partner_address_id': addr['contact']}
data.update(self.onchange_partner_address_id(cr, uid, ids, addr['contact'])['value'])
return {'value': data}
def case_open(self, cr, uid, ids, *args):
"""Opens Case
@param ids: List of case Ids
"""
cases = self.browse(cr, uid, ids)
for case in cases:
@ -140,7 +290,6 @@ class crm_base(object):
data['user_id'] = uid
self.write(cr, uid, case.id, data)
self._action(cr, uid, cases, 'open')
return True
@ -150,12 +299,8 @@ class crm_base(object):
"""
cases = self.browse(cr, uid, ids)
cases[0].state # to fill the browse record cache
self.write(cr, uid, ids, {'state': 'done',
'date_closed': time.strftime('%Y-%m-%d %H:%M:%S'),
})
#
self.write(cr, uid, ids, {'state': 'done', 'date_closed': time.strftime('%Y-%m-%d %H:%M:%S'), })
# We use the cache of cases to keep the old case state
#
self._action(cr, uid, cases, 'done')
return True
@ -165,17 +310,13 @@ class crm_base(object):
"""
cases = self.browse(cr, uid, ids)
cases[0].state # to fill the browse record cache
self.write(cr, uid, ids, {'state': 'cancel',
'active': True})
self.write(cr, uid, ids, {'state': 'cancel', 'active': True})
# We use the cache of cases to keep the old case state
self._action(cr, uid, cases, 'cancel')
for case in cases:
message = _("The case '%s' has been cancelled.") % (case.name,)
self.log(cr, uid, case.id, message)
return True
def case_pending(self, cr, uid, ids, *args):
"""Marks case as pending
@param ids: List of case Ids
"""
cases = self.browse(cr, uid, ids)
cases[0].state # to fill the browse record cache
@ -185,7 +326,6 @@ class crm_base(object):
def case_reset(self, cr, uid, ids, *args):
"""Resets case as draft
@param ids: List of case Ids
"""
cases = self.browse(cr, uid, ids)
cases[0].state # to fill the browse record cache
@ -204,187 +344,69 @@ class crm_base(object):
return rule_obj._action(cr, uid, rule_ids, cases, scrit=scrit, context=context)
class crm_case(crm_base):
"""
A simple python class to be used for common functions
Object that inherit from this class should inherit from mailgate.thread
And need a stage_id field
And object that inherit (orm inheritance) from a class the overwrite copy
""" A simple python class to be used for common functions
Object that inherit from this class should inherit from mailgate.thread
And need a stage_id field
And object that inherit (orm inheritance) from a class the overwrite copy
"""
def _find_lost_stage(self, cr, uid, type, section_id):
return self._find_percent_stage(cr, uid, 0.0, type, section_id)
def stage_find(self, cr, uid, section_id, domain=[], order='sequence'):
domain = list(domain)
if section_id:
domain.append(('section_ids', '=', section_id))
stage_ids = self.pool.get('crm.case.stage').search(cr, uid, domain, order=order)
if stage_ids:
return stage_ids[0]
def _find_won_stage(self, cr, uid, type, section_id):
return self._find_percent_stage(cr, uid, 100.0, type, section_id)
def stage_set(self, cr, uid, ids, stage_id, context=None):
value = {}
if hasattr(self,'onchange_stage_id'):
value = self.onchange_stage_id(cr, uid, ids, stage_id)['value']
value['stage_id'] = stage_id
self.write(cr, uid, ids, value, context=context)
def _find_percent_stage(self, cr, uid, percent, type, section_id):
def stage_change(self, cr, uid, ids, op, order, context=None):
if context is None:
context = {}
for case in self.browse(cr, uid, ids, context=context):
seq = 0
if case.stage_id:
seq = case.stage_id.sequence
section_id = None
if case.section_id:
section_id = case.section_id.id
next_stage_id = self.stage_find(cr, uid, section_id, [('sequence',op,seq)],order)
if next_stage_id:
self.stage_set(cr, uid, [case.id], next_stage_id, context=context)
def stage_next(self, cr, uid, ids, context=None):
"""This function computes next stage for case from its current stage
using available stage for that case type
"""
Return the first stage with a probability == percent
self.stage_change(cr, uid, ids, '>','sequence', context)
def stage_previous(self, cr, uid, ids, context=None):
"""This function computes previous stage for case from its current
stage using available stage for that case type
"""
stage_pool = self.pool.get('crm.case.stage')
if section_id :
ids = stage_pool.search(cr, uid, [("probability", '=', percent), ("type", 'like', type), ("section_ids", 'in', [section_id])])
else :
ids = stage_pool.search(cr, uid, [("probability", '=', percent), ("type", 'like', type)])
if ids:
return ids[0]
return False
def _find_first_stage(self, cr, uid, type, section_id):
"""
return the first stage that has a sequence number equal or higher than sequence
"""
stage_pool = self.pool.get('crm.case.stage')
if section_id :
ids = stage_pool.search(cr, uid, [("sequence", '>', 0), ("type", 'like', type), ("section_ids", 'in', [section_id])])
else :
ids = stage_pool.search(cr, uid, [("sequence", '>', 0), ("type", 'like', type)])
if ids:
stages = stage_pool.browse(cr, uid, ids)
stage_min = stages[0]
for stage in stages:
if stage_min.sequence > stage.sequence:
stage_min = stage
return stage_min.id
else :
return False
def onchange_stage_id(self, cr, uid, ids, stage_id, context={}):
""" @param self: The object pointer
@param cr: the current row, from the database cursor,
@param uid: the current users ID for security checks,
@param ids: List of stages IDs
@stage_id: change state id on run time """
if not stage_id:
return {'value':{}}
stage = self.pool.get('crm.case.stage').browse(cr, uid, stage_id, context)
if not stage.on_change:
return {'value':{}}
return {'value':{'probability': stage.probability}}
self.stage_change(cr, uid, ids, '<', 'sequence desc', context)
def copy(self, cr, uid, id, default=None, context=None):
""" Overrides orm copy method.
"""
Overrides orm copy method.
@param self: the object pointer
@param cr: the current row, from the database cursor,
@param uid: the current users ID for security checks,
@param id: Id of mailgate thread
@param default: Dictionary of default values for copy.
@param context: A standard dictionary for contextual values
"""
if context is None:
context = {}
if default is None:
default = {}
default.update({
'message_ids': [],
})
default.update({ 'message_ids': [], })
if hasattr(self, '_columns'):
if self._columns.get('date_closed'):
default.update({
'date_closed': False,
})
default.update({ 'date_closed': False, })
if self._columns.get('date_open'):
default.update({
'date_open': False
})
default.update({ 'date_open': False })
return super(osv.osv, self).copy(cr, uid, id, default, context=context)
def _find_next_stage(self, cr, uid, stage_list, index, current_seq, stage_pool, context=None):
if index + 1 == len(stage_list):
return False
next_stage_id = stage_list[index + 1]
next_stage = stage_pool.browse(cr, uid, next_stage_id, context=context)
if not next_stage:
return False
next_seq = next_stage.sequence
if not current_seq :
current_seq = 0
if (abs(next_seq - current_seq)) >= 1:
return next_stage
else :
return self._find_next_stage(cr, uid, stage_list, index + 1, current_seq, stage_pool)
def stage_change(self, cr, uid, ids, context=None, order='sequence'):
if context is None:
context = {}
stage_pool = self.pool.get('crm.case.stage')
stage_type = context and context.get('stage_type','')
current_seq = False
next_stage_id = False
for case in self.browse(cr, uid, ids, context=context):
next_stage = False
value = {}
if case.section_id.id :
domain = [('type', '=', stage_type),('section_ids', '=', case.section_id.id)]
else :
domain = [('type', '=', stage_type)]
stages = stage_pool.search(cr, uid, domain, order=order)
current_seq = case.stage_id.sequence
index = -1
if case.stage_id and case.stage_id.id in stages:
index = stages.index(case.stage_id.id)
next_stage = self._find_next_stage(cr, uid, stages, index, current_seq, stage_pool, context=context)
if next_stage:
next_stage_id = next_stage.id
value.update({'stage_id': next_stage.id})
if next_stage.on_change:
value.update({'probability': next_stage.probability})
self.write(cr, uid, [case.id], value, context=context)
return next_stage_id #FIXME should return a list of all id
def stage_next(self, cr, uid, ids, context=None):
"""This function computes next stage for case from its current stage
using available stage for that case type
@param self: The object pointer
@param cr: the current row, from the database cursor,
@param uid: the current users ID for security checks,
@param ids: List of case IDs
@param context: A standard dictionary for contextual values"""
return self.stage_change(cr, uid, ids, context=context, order='sequence')
def stage_previous(self, cr, uid, ids, context=None):
"""This function computes previous stage for case from its current stage
using available stage for that case type
@param self: The object pointer
@param cr: the current row, from the database cursor,
@param uid: the current users ID for security checks,
@param ids: List of case IDs
@param context: A standard dictionary for contextual values"""
return self.stage_change(cr, uid, ids, context=context, order='sequence desc')
def _history(self, cr, uid, cases, keyword, history=False, subject=None, email=False, details=None, email_from=False, message_id=False, attach=[], context=None):
mailgate_pool = self.pool.get('mailgate.thread')
return mailgate_pool.history(cr, uid, cases, keyword, history=history,\
@ -395,17 +417,11 @@ class crm_case(crm_base):
def case_open(self, cr, uid, ids, *args):
"""Opens Case
@param self: The object pointer
@param cr: the current row, from the database cursor,
@param uid: the current users ID for security checks,
@param ids: List of case Ids
@param *args: Tuple Value for additional Params
"""
cases = self.browse(cr, uid, ids)
self._history(cr, uid, cases, _('Open'))
for case in cases:
data = {'state': 'open', 'active': True}
data = {'state': 'open', 'active': True }
if not case.user_id:
data['user_id'] = uid
self.write(cr, uid, case.id, data)
@ -414,11 +430,6 @@ class crm_case(crm_base):
def case_close(self, cr, uid, ids, *args):
"""Closes Case
@param self: The object pointer
@param cr: the current row, from the database cursor,
@param uid: the current users ID for security checks,
@param ids: List of case Ids
@param *args: Tuple Value for additional Params
"""
cases = self.browse(cr, uid, ids)
cases[0].state # to fill the browse record cache
@ -434,11 +445,6 @@ class crm_case(crm_base):
def case_escalate(self, cr, uid, ids, *args):
"""Escalates case to top level
@param self: The object pointer
@param cr: the current row, from the database cursor,
@param uid: the current users ID for security checks,
@param ids: List of case Ids
@param *args: Tuple Value for additional Params
"""
cases = self.browse(cr, uid, ids)
for case in cases:
@ -459,11 +465,6 @@ class crm_case(crm_base):
def case_cancel(self, cr, uid, ids, *args):
"""Cancels Case
@param self: The object pointer
@param cr: the current row, from the database cursor,
@param uid: the current users ID for security checks,
@param ids: List of case Ids
@param *args: Tuple Value for additional Params
"""
cases = self.browse(cr, uid, ids)
cases[0].state # to fill the browse record cache
@ -478,11 +479,6 @@ class crm_case(crm_base):
def case_pending(self, cr, uid, ids, *args):
"""Marks case as pending
@param self: The object pointer
@param cr: the current row, from the database cursor,
@param uid: the current users ID for security checks,
@param ids: List of case Ids
@param *args: Tuple Value for additional Params
"""
cases = self.browse(cr, uid, ids)
cases[0].state # to fill the browse record cache
@ -493,11 +489,6 @@ class crm_case(crm_base):
def case_reset(self, cr, uid, ids, *args):
"""Resets case as draft
@param self: The object pointer
@param cr: the current row, from the database cursor,
@param uid: the current users ID for security checks,
@param ids: List of case Ids
@param *args: Tuple Value for additional Params
"""
state = 'draft'
if 'crm.phonecall' in args:
@ -600,8 +591,6 @@ class crm_case(crm_base):
cases = self.browse(cr, uid, ids2, context=context)
return self._action(cr, uid, cases, False, context=context)
def format_body(self, body):
return self.pool.get('base.action.rule').format_body(body)
@ -621,189 +610,6 @@ class crm_case(crm_base):
res[case.id] = l
return res
class crm_case_stage(osv.osv):
""" Stage of case """
_name = "crm.case.stage"
_description = "Stage of case"
_rec_name = 'name'
_order = "sequence"
def _get_type_value(self, cr, user, context):
return [('lead','Lead'),('opportunity','Opportunity')]
_columns = {
'name': fields.char('Stage Name', size=64, required=True, translate=True),
'sequence': fields.integer('Sequence', help="Gives the sequence order when displaying a list of case stages."),
'probability': fields.float('Probability (%)', required=True, help="This percentage depicts the default/average probability of the Case for this stage to be a success"),
'on_change': fields.boolean('Change Probability Automatically', \
help="Change Probability on next and previous stages."),
'requirements': fields.text('Requirements'),
'type': fields.selection(_get_type_value, 'Type', required=True),
}
def _find_stage_type(self, cr, uid, context=None):
"""Finds type of stage according to object.
@param self: The object pointer
@param cr: the current row, from the database cursor,
@param uid: the current users ID for security checks,
@param context: A standard dictionary for contextual values
"""
type = context and context.get('type', '') or ''
return type
_defaults = {
'sequence': lambda *args: 1,
'probability': lambda *args: 0.0,
'type': _find_stage_type,
}
crm_case_stage()
class crm_case_section(osv.osv):
"""Sales Team"""
_name = "crm.case.section"
_description = "Sales Teams"
_order = "complete_name"
def get_full_name(self, cr, uid, ids, field_name, arg, context=None):
return dict(self.name_get(cr, uid, ids, context=context))
_columns = {
'name': fields.char('Sales Team', size=64, required=True, translate=True),
'complete_name': fields.function(get_full_name, type='char', size=256, readonly=True, store=True),
'code': fields.char('Code', size=8),
'active': fields.boolean('Active', help="If the active field is set to "\
"true, it will allow you to hide the sales team without removing it."),
'allow_unlink': fields.boolean('Allow Delete', help="Allows to delete non draft cases"),
'change_responsible': fields.boolean('Change Responsible', help="Thick this box if you want that on escalation, the responsible of this sale team automatically becomes responsible of the lead/opportunity escaladed"),
'user_id': fields.many2one('res.users', 'Responsible User'),
'member_ids':fields.many2many('res.users', 'sale_member_rel', 'section_id', 'member_id', 'Team Members'),
'reply_to': fields.char('Reply-To', size=64, help="The email address put in the 'Reply-To' of all emails sent by OpenERP about cases in this sales team"),
'parent_id': fields.many2one('crm.case.section', 'Parent Team'),
'child_ids': fields.one2many('crm.case.section', 'parent_id', 'Child Teams'),
'resource_calendar_id': fields.many2one('resource.calendar', "Working Time"),
'note': fields.text('Description'),
'working_hours': fields.float('Working Hours', digits=(16,2 )),
'stage_ids': fields.many2many('crm.case.stage', 'section_stage_rel', 'section_id', 'stage_id', 'Stages'),
}
_defaults = {
'active': lambda *a: 1,
'allow_unlink': lambda *a: 1,
}
_sql_constraints = [
('code_uniq', 'unique (code)', 'The code of the sales team must be unique !')
]
def _check_recursion(self, cr, uid, ids, context=None):
"""
Checks for recursion level for sales team
@param self: The object pointer
@param cr: the current row, from the database cursor,
@param uid: the current users ID for security checks,
@param ids: List of Sales team ids
"""
level = 100
while len(ids):
cr.execute('select distinct parent_id from crm_case_section where id IN %s', (tuple(ids),))
ids = filter(None, map(lambda x: x[0], cr.fetchall()))
if not level:
return False
level -= 1
return True
_constraints = [
(_check_recursion, 'Error ! You cannot create recursive Sales team.', ['parent_id'])
]
def name_get(self, cr, uid, ids, context=None):
"""Overrides orm name_get method
@param self: The object pointer
@param cr: the current row, from the database cursor,
@param uid: the current users ID for security checks,
@param ids: List of sales team ids
"""
if context is None:
context = {}
if not isinstance(ids, list) :
ids = [ids]
res = []
if not ids:
return res
reads = self.read(cr, uid, ids, ['name', 'parent_id'], context)
for record in reads:
name = record['name']
if record['parent_id']:
name = record['parent_id'][1] + ' / ' + name
res.append((record['id'], name))
return res
crm_case_section()
class crm_case_categ(osv.osv):
""" Category of Case """
_name = "crm.case.categ"
_description = "Category of Case"
_columns = {
'name': fields.char('Name', size=64, required=True, translate=True),
'section_id': fields.many2one('crm.case.section', 'Sales Team'),
'object_id': fields.many2one('ir.model', 'Object Name'),
}
def _find_object_id(self, cr, uid, context=None):
"""Finds id for case object
@param self: The object pointer
@param cr: the current row, from the database cursor,
@param uid: the current users ID for security checks,
@param context: A standard dictionary for contextual values
"""
object_id = context and context.get('object_id', False) or False
ids = self.pool.get('ir.model').search(cr, uid, [('model', '=', object_id)])
return ids and ids[0]
_defaults = {
'object_id' : _find_object_id
}
crm_case_categ()
class crm_case_stage(osv.osv):
_inherit = "crm.case.stage"
_columns = {
'section_ids':fields.many2many('crm.case.section', 'section_stage_rel', 'stage_id', 'section_id', 'Sections'),
}
crm_case_stage()
class crm_case_resource_type(osv.osv):
""" Resource Type of case """
_name = "crm.case.resource.type"
_description = "Campaign"
_rec_name = "name"
_columns = {
'name': fields.char('Campaign Name', size=64, required=True, translate=True),
'section_id': fields.many2one('crm.case.section', 'Sales Team'),
}
crm_case_resource_type()
def _links_get(self, cr, uid, context=None):
"""Gets links value for reference field
@param self: The object pointer
@ -830,13 +636,6 @@ class users(osv.osv):
if vals.get('context_section_id', False):
section_obj.write(cr, uid, [vals['context_section_id']], {'member_ids':[(4, res)]}, context)
return res
users()
class res_partner(osv.osv):
_inherit = 'res.partner'
_columns = {
'section_id': fields.many2one('crm.case.section', 'Sales Team'),
}
res_partner()

View File

@ -1,6 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data noupdate="1">
<record model="crm.case.channel">
<field name="name">website</field>
</record>
<record model="crm.case.channel">
<field name="name">phone</field>
</record>
<record model="crm.case.channel">
<field name="name">direct</field>
</record>
<record model="crm.case.channel">
<field name="name">e-mail</field>
</record>
<record model="crm.case.section" id="section_sales_department">
<field name="name">Sales Department</field>
<field name="code">Sales</field>

View File

@ -39,8 +39,9 @@ class crm_lead(crm_case, osv.osv):
""" CRM Lead Case """
_name = "crm.lead"
_description = "Lead/Opportunity"
_order = "date_action, priority, id desc"
_order = "priority,date_action,id desc"
_inherit = ['mailgate.thread','res.partner.address']
def _compute_day(self, cr, uid, ids, fields, args, context=None):
"""
@param cr: the current row, from the database cursor,
@ -124,7 +125,6 @@ class crm_lead(crm_case, osv.osv):
'partner_id': fields.many2one('res.partner', 'Partner', ondelete='set null',
select=True, help="Optional linked partner, usually after conversion of the lead"),
# From crm.case
'id': fields.integer('ID'),
'name': fields.char('Name', size=64, select=1),
'active': fields.boolean('Active', required=False),
@ -132,31 +132,26 @@ class crm_lead(crm_case, osv.osv):
'date_action_next': fields.datetime('Next Action', readonly=1),
'email_from': fields.char('Email', size=128, help="E-mail address of the contact", select=1),
'section_id': fields.many2one('crm.case.section', 'Sales Team', \
select=True, help='Sales team to which this case belongs to. Defines responsible user and e-mail address for the mail gateway.'),
select=True, help='When sending mails, the default email address is taken from the sales team.'),
'create_date': fields.datetime('Creation Date' , readonly=True),
'email_cc': fields.text('Global CC', size=252 , help="These email addresses will be added to the CC field of all inbound and outbound emails for this record before being sent. Separate multiple email addresses with a comma"),
'description': fields.text('Notes'),
'write_date': fields.datetime('Update Date' , readonly=True),
# Lead fields
'categ_id': fields.many2one('crm.case.categ', 'Category', \
domain="['|',('section_id','=',section_id),('section_id','=',False), ('object_id.model', '=', 'crm.lead')]"),
'type_id': fields.many2one('crm.case.resource.type', 'Campaign', \
domain="['|',('section_id','=',section_id),('section_id','=',False)]", help="From which campaign (seminar, marketing campaign, mass mailing, ...) did this contact come from?"),
'channel_id': fields.many2one('res.partner.canal', 'Channel', help="From which channel (mail, direct, phone, ...) did this contact reach you?"),
'channel_id': fields.many2one('crm.case.channel', 'Channel', help="Communication channel (mail, direct, phone, ...)"),
'contact_name': fields.char('Contact Name', size=64),
'partner_name': fields.char("Customer Name", size=64,help='The name of the future partner that will be created while converting the into opportunity', select=1),
'optin': fields.boolean('Opt-In', help="If opt-in is checked, this contact has accepted to receive emails."),
'optout': fields.boolean('Opt-Out', help="If opt-out is checked, this contact has refused to receive emails or unsubscribed to a campaign."),
'type':fields.selection([
('lead','Lead'),
('opportunity','Opportunity'),
],'Type', help="Type is used to separate Leads and Opportunities"),
'type':fields.selection([ ('lead','Lead'), ('opportunity','Opportunity'), ],'Type', help="Type is used to separate Leads and Opportunities"),
'priority': fields.selection(crm.AVAILABLE_PRIORITIES, 'Priority'),
'date_closed': fields.datetime('Closed', readonly=True),
'stage_id': fields.many2one('crm.case.stage', 'Stage', domain="[('type','=','lead')]"),
'user_id': fields.many2one('res.users', 'Salesman', select=1),
'stage_id': fields.many2one('crm.case.stage', 'Stage', domain="[('section_ids', '=', section_id)]"),
'user_id': fields.many2one('res.users', 'Salesman'),
'referred': fields.char('Referred By', size=64),
'date_open': fields.datetime('Opened', readonly=True),
'day_open': fields.function(_compute_day, string='Days to Open', \
@ -170,9 +165,21 @@ class crm_lead(crm_case, osv.osv):
\nIf the case needs to be reviewed then the state is set to \'Pending\'.'),
'message_ids': fields.one2many('mailgate.message', 'res_id', 'Messages', domain=[('model','=',_name)]),
'subjects': fields.function(_get_email_subject, fnct_search=_history_search, string='Subject of Email', type='char', size=64),
}
# Only used for type opportunity
'partner_address_id': fields.many2one('res.partner.address', 'Partner Contact', domain="[('partner_id','=',partner_id)]"),
'probability': fields.float('Probability (%)',group_operator="avg"),
'planned_revenue': fields.float('Expected Revenue'),
'ref': fields.reference('Reference', selection=crm._links_get, size=128),
'ref2': fields.reference('Reference 2', selection=crm._links_get, size=128),
'phone': fields.char("Phone", size=64),
'date_deadline': fields.date('Expected Closing'),
'date_action': fields.date('Next Action Date'),
'title_action': fields.char('Next Action', size=64),
'stage_id': fields.many2one('crm.case.stage', 'Stage', domain="[('section_ids', '=', section_id)]"),
}
_defaults = {
'active': lambda *a: 1,
'user_id': crm_case._get_default_user,
@ -185,82 +192,120 @@ class crm_lead(crm_case, osv.osv):
#'stage_id': _get_stage_id,
}
def onchange_partner_address_id(self, cr, uid, ids, add, email=False):
"""This function returns value of partner email based on Partner Address
@param self: The object pointer
@param cr: the current row, from the database cursor,
@param uid: the current users ID for security checks,
@param ids: List of case IDs
@param add: Id of Partner's address
@email: Partner's email ID
"""
if not add:
return {'value': {'email_from': False, 'country_id': False}}
address = self.pool.get('res.partner.address').browse(cr, uid, add)
return {'value': {'email_from': address.email, 'phone': address.phone, 'country_id': address.country_id.id}}
def case_open(self, cr, uid, ids, *args):
"""Overrides cancel for crm_case for setting Open Date
@param self: The object pointer
@param cr: the current row, from the database cursor,
@param uid: the current users ID for security checks,
@param ids: List of case's Ids
@param *args: Give Tuple Value
def on_change_optin(self, cr, uid, ids, optin):
return {'value':{'optin':optin,'optout':False}}
def on_change_optout(self, cr, uid, ids, optout):
return {'value':{'optout':optout,'optin':False}}
def onchange_stage_id(self, cr, uid, ids, stage_id, context={}):
if not stage_id:
return {'value':{}}
stage = self.pool.get('crm.case.stage').browse(cr, uid, stage_id, context)
if not stage.on_change:
return {'value':{}}
return {'value':{'probability': stage.probability}}
def stage_find_percent(self, cr, uid, percent, section_id):
""" Return the first stage with a probability == percent
"""
leads = self.browse(cr, uid, ids)
stage_pool = self.pool.get('crm.case.stage')
if section_id :
ids = stage_pool.search(cr, uid, [("probability", '=', percent), ("section_ids", 'in', [section_id])])
else :
ids = stage_pool.search(cr, uid, [("probability", '=', percent)])
if ids:
return ids[0]
return False
def stage_find_lost(self, cr, uid, section_id):
return self.stage_find_percent(cr, uid, 0.0, section_id)
for i in xrange(0, len(ids)):
if leads[i].state == 'draft':
value = {}
if not leads[i].stage_id :
stage_id = self._find_first_stage(cr, uid, leads[i].type, leads[i].section_id.id or False)
value.update({'stage_id' : stage_id})
value.update({'date_open': time.strftime('%Y-%m-%d %H:%M:%S')})
self.write(cr, uid, [ids[i]], value)
self.log_open( cr, uid, leads[i])
def stage_find_won(self, cr, uid, section_id):
return self.stage_find_percent(cr, uid, 100.0, section_id)
def case_open(self, cr, uid, ids, *args):
for l in self.browse(cr, uid, ids):
# When coming from draft override date and stage otherwise just set state
if l.state == 'draft':
if l.type == 'lead':
message = _("The lead '%s' has been opened.") % l.name
elif l.type == 'opportunity':
message = _("The opportunity '%s' has been opened.") % l.name
else:
message = _("The case '%s' has been opened.") % l.name
self.log(cr, uid, l.id, message)
value = {'date_open': time.strftime('%Y-%m-%d %H:%M:%S')}
self.write(cr, uid, [l.id], value)
if l.type == 'opportunity' and not l.stage_id:
stage_id = self.stage_find(cr, uid, l.section_id.id or False, [('sequence','>',0)])
if stage_id:
self.stage_set(cr, uid, [l.id], stage_id)
res = super(crm_lead, self).case_open(cr, uid, ids, *args)
return res
def log_open(self, cr, uid, case):
if case.type == 'lead':
message = _("The lead '%s' has been opened.") % case.name
elif case.type == 'opportunity':
message = _("The opportunity '%s' has been opened.") % case.name
else:
message = _("The case '%s' has been opened.") % case.name
self.log(cr, uid, case.id, message)
def case_close(self, cr, uid, ids, *args):
"""Overrides close for crm_case for setting close date
@param self: The object pointer
@param cr: the current row, from the database cursor,
@param uid: the current users ID for security checks,
@param ids: List of case Ids
@param *args: Tuple Value for additional Params
"""
res = super(crm_lead, self).case_close(cr, uid, ids, *args)
self.write(cr, uid, ids, {'date_closed': time.strftime('%Y-%m-%d %H:%M:%S')})
for case in self.browse(cr, uid, ids):
if case.type == 'lead':
message = _("The lead '%s' has been closed.") % case.name
elif case.type == 'opportunity':
message = _("The opportunity '%s' has been closed.") % case.name
else:
message = _("The case '%s' has been closed.") % case.name
self.log(cr, uid, case.id, message)
return res
def case_cancel(self, cr, uid, ids, *args):
"""Overrides cancel for crm_case for setting probability
"""
res = super(crm_lead, self).case_cancel(cr, uid, ids, args)
self.write(cr, uid, ids, {'probability' : 0.0})
return res
def case_reset(self, cr, uid, ids, *args):
"""Overrides reset as draft in order to set the stage field as empty
"""
res = super(crm_lead, self).case_reset(cr, uid, ids, *args)
self.write(cr, uid, ids, {'stage_id': False, 'probability': 0.0})
return res
def case_mark_lost(self, cr, uid, ids, *args):
"""Mark the case as lost: state = done and probability = 0%
"""
res = super(crm_lead, self).case_close(cr, uid, ids, *args)
self.write(cr, uid, ids, {'probability' : 0.0})
for l in self.browse(cr, uid, ids):
stage_id = self.stage_find_lost(cr, uid, l.section_id.id or False)
if stage_id:
self.stage_set(cr, uid, [l.id], stage_id)
message = _("The opportunity '%s' has been marked as lost.") % l.name
self.log(cr, uid, l.id, message)
return res
def case_mark_won(self, cr, uid, ids, *args):
"""Mark the case as lost: state = done and probability = 0%
"""
res = super(crm_lead, self).case_close(cr, uid, ids, *args)
self.write(cr, uid, ids, {'probability' : 100.0})
for l in self.browse(cr, uid, ids):
stage_id = self.stage_find_won(cr, uid, l.section_id.id or False)
if stage_id:
self.stage_set(cr, uid, [l.id], stage_id)
message = _("The opportunity '%s' has been been won.") % l.name
self.log(cr, uid, l.id, message)
return res
def convert_opportunity(self, cr, uid, ids, context=None):
""" Precomputation for converting lead to opportunity
@param cr: the current row, from the database cursor,
@param uid: the current users ID for security checks,
@param ids: List of closedays IDs
@param context: A standard dictionary for contextual values
@return: Value of action in dict
"""
if context is None:
context = {}
@ -290,57 +335,8 @@ class crm_lead(crm_case, osv.osv):
}
return value
def write(self, cr, uid, ids, vals, context=None):
if not context:
context = {}
if 'date_closed' in vals:
return super(crm_lead,self).write(cr, uid, ids, vals, context=context)
if 'stage_id' in vals and vals['stage_id']:
stage_obj = self.pool.get('crm.case.stage').browse(cr, uid, vals['stage_id'], context=context)
self.history(cr, uid, ids, _("Changed Stage to: %s") % stage_obj.name, details=_("Changed Stage to: %s") % stage_obj.name)
message=''
for case in self.browse(cr, uid, ids, context=context):
if case.type == 'lead' or context.get('stage_type',False)=='lead':
message = _("The stage of lead '%s' has been changed to '%s'.") % (case.name, stage_obj.name)
elif case.type == 'opportunity':
message = _("The stage of opportunity '%s' has been changed to '%s'.") % (case.name, stage_obj.name)
self.log(cr, uid, case.id, message)
return super(crm_lead,self).write(cr, uid, ids, vals, context)
def stage_next(self, cr, uid, ids, context=None):
stage = super(crm_lead, self).stage_next(cr, uid, ids, context=context)
if stage:
stage_obj = self.pool.get('crm.case.stage').browse(cr, uid, stage, context=context)
if stage_obj.on_change:
data = {'probability': stage_obj.probability}
self.write(cr, uid, ids, data)
return stage
def stage_previous(self, cr, uid, ids, context=None):
stage = super(crm_lead, self).stage_previous(cr, uid, ids, context=context)
if stage:
stage_obj = self.pool.get('crm.case.stage').browse(cr, uid, stage, context=context)
if stage_obj.on_change:
data = {'probability': stage_obj.probability}
self.write(cr, uid, ids, data)
return stage
def unlink(self, cr, uid, ids, context=None):
for lead in self.browse(cr, uid, ids, context):
if (not lead.section_id.allow_unlink) and (lead.state <> 'draft'):
raise osv.except_osv(_('Warning !'),
_('You can not delete this lead. You should better cancel it.'))
return super(crm_lead, self).unlink(cr, uid, ids, context)
def message_new(self, cr, uid, msg, context=None):
"""
Automatically calls when new email message arrives
@param self: The object pointer
@param cr: the current row, from the database cursor,
@param uid: the current users ID for security checks
""" Automatically calls when new email message arrives
"""
mailgate_pool = self.pool.get('email.server.tools')
@ -380,9 +376,6 @@ class crm_lead(crm_case, osv.osv):
def message_update(self, cr, uid, ids, vals={}, msg="", default_act='pending', context=None):
"""
@param self: The object pointer
@param cr: the current row, from the database cursor,
@param uid: the current users ID for security checks,
@param ids: List of update mails IDs
"""
if isinstance(ids, (str, int, long)):
@ -416,22 +409,82 @@ class crm_lead(crm_case, osv.osv):
return res
def msg_send(self, cr, uid, id, *args, **argv):
""" Send The Message
@param self: The object pointer
@param cr: the current row, from the database cursor,
@param uid: the current users ID for security checks,
@param ids: List of emails IDs
@param *args: Return Tuple Value
@param **args: Return Dictionary of Keyword Value
@param ids: List of emails IDs
"""
return True
def on_change_optin(self, cr, uid, ids, optin):
return {'value':{'optin':optin,'optout':False}}
def action_makeMeeting(self, cr, uid, ids, context=None):
"""
This opens Meeting's calendar view to schedule meeting on current Opportunity
@return : Dictionary value for created Meeting view
"""
value = {}
for opp in self.browse(cr, uid, ids, context=context):
data_obj = self.pool.get('ir.model.data')
# Get meeting views
result = data_obj._get_id(cr, uid, 'crm', 'view_crm_case_meetings_filter')
res = data_obj.read(cr, uid, result, ['res_id'])
id1 = data_obj._get_id(cr, uid, 'crm', 'crm_case_calendar_view_meet')
id2 = data_obj._get_id(cr, uid, 'crm', 'crm_case_form_view_meet')
id3 = data_obj._get_id(cr, uid, 'crm', 'crm_case_tree_view_meet')
if id1:
id1 = data_obj.browse(cr, uid, id1, context=context).res_id
if id2:
id2 = data_obj.browse(cr, uid, id2, context=context).res_id
if id3:
id3 = data_obj.browse(cr, uid, id3, context=context).res_id
context = {
'default_opportunity_id': opp.id,
'default_partner_id': opp.partner_id and opp.partner_id.id or False,
'default_user_id': uid,
'default_section_id': opp.section_id and opp.section_id.id or False,
'default_email_from': opp.email_from,
'default_state': 'open',
'default_name': opp.name
}
value = {
'name': _('Meetings'),
'context': context,
'view_type': 'form',
'view_mode': 'calendar,form,tree',
'res_model': 'crm.meeting',
'view_id': False,
'views': [(id1, 'calendar'), (id2, 'form'), (id3, 'tree')],
'type': 'ir.actions.act_window',
'search_view_id': res['res_id'],
'nodestroy': True
}
return value
def write(self, cr, uid, ids, vals, context=None):
if not context:
context = {}
if 'date_closed' in vals:
return super(crm_lead,self).write(cr, uid, ids, vals, context=context)
if 'stage_id' in vals and vals['stage_id']:
stage_obj = self.pool.get('crm.case.stage').browse(cr, uid, vals['stage_id'], context=context)
self.history(cr, uid, ids, _("Changed Stage to: %s") % stage_obj.name, details=_("Changed Stage to: %s") % stage_obj.name)
message=''
for case in self.browse(cr, uid, ids, context=context):
if case.type == 'lead' or context.get('stage_type',False)=='lead':
message = _("The stage of lead '%s' has been changed to '%s'.") % (case.name, stage_obj.name)
elif case.type == 'opportunity':
message = _("The stage of opportunity '%s' has been changed to '%s'.") % (case.name, stage_obj.name)
self.log(cr, uid, case.id, message)
return super(crm_lead,self).write(cr, uid, ids, vals, context)
def unlink(self, cr, uid, ids, context=None):
for lead in self.browse(cr, uid, ids, context):
if (not lead.section_id.allow_unlink) and (lead.state <> 'draft'):
raise osv.except_osv(_('Warning !'),
_('You can not delete this lead. You should better cancel it.'))
return super(crm_lead, self).unlink(cr, uid, ids, context)
def on_change_optout(self, cr, uid, ids, optout):
return {'value':{'optout':optout,'optin':False}}
crm_lead()

View File

@ -2,97 +2,119 @@
<openerp>
<data noupdate="1">
<record model="crm.case.stage" id="stage_lead6">
<!-- Crm stages -->
<record model="crm.case.stage" id="stage_lead6">
<field name="name">Lost</field>
<field eval="'0'" name="probability"/>
<field eval="'0'" name="sequence"/>
<field name="type">lead</field>
</record>
<!-- CASE STATUS(stage_id) -->
<record model="crm.case.stage" id="stage_lead1">
<field name="name">New</field>
<field eval="'10'" name="probability"/>
<field eval="'1'" name="sequence"/>
<field name="type">lead</field>
<field eval="'11'" name="sequence"/>
</record>
<record model="crm.case.stage" id="stage_lead2">
<field name="name">Qualification</field>
<field eval="'20'" name="probability"/>
<field eval="'2'" name="sequence"/>
<field name="type">lead</field>
<field eval="'12'" name="sequence"/>
</record>
<record model="crm.case.stage" id="stage_lead3">
<field name="name">Proposition</field>
<field eval="'40'" name="probability"/>
<field eval="'3'" name="sequence"/>
<field name="type">lead</field>
<field eval="'13'" name="sequence"/>
</record>
<record model="crm.case.stage" id="stage_lead4">
<field name="name">Negotiation</field>
<field eval="'60'" name="probability"/>
<field eval="'4'" name="sequence"/>
<field name="type">lead</field>
<field eval="'14'" name="sequence"/>
</record>
<record model="crm.case.stage" id="stage_lead5">
<field name="name">Won</field>
<field eval="'100'" name="probability"/>
<field eval="'5'" name="sequence"/>
<field eval="'15'" name="sequence"/>
<field eval="1" name="on_change"/>
<field name="type">lead</field>
</record>
<record model="crm.case.section" id="section_sales_department">
<field name="name">Sales Department</field>
<field name="code">Sales</field>
<field name="stage_ids" eval="[(4, ref('stage_lead1')), (4, ref('stage_lead2')), (4, ref('stage_lead3')), (4, ref('stage_lead4')), (4, ref('stage_lead5')), (4, ref('stage_lead6'))]"/>
</record>
<!-- CASE CATEGORY2(category2_id) -->
<!-- Crm campain -->
<record model="crm.case.resource.type" id="type_lead1">
<field name="name">Telesales</field>
<field name="section_id" ref="section_sales_department"/>
</record>
<record model="crm.case.resource.type" id="type_lead2">
<field name="name">Mail Campaign 1</field>
<field name="section_id" ref="section_sales_department"/>
</record>
<record model="crm.case.resource.type" id="type_lead3">
<field name="name">Mail Campaign 2</field>
<field name="section_id" ref="section_sales_department"/>
</record>
<record model="crm.case.resource.type" id="type_lead4">
<field name="name">Twitter Ads</field>
<field name="section_id" ref="section_sales_department"/>
</record>
<record model="crm.case.resource.type" id="type_lead5">
<field name="name">Google Adwords</field>
<field name="section_id" ref="section_sales_department"/>
</record>
<record model="crm.case.resource.type" id="type_lead6">
<field name="name">Google Adwords 2</field>
<field name="section_id" ref="section_sales_department"/>
</record>
<record model="crm.case.resource.type" id="type_lead7">
<field name="name">Television</field>
<field name="section_id" ref="section_sales_department"/>
</record>
<record model="crm.case.resource.type" id="type_lead8">
<field name="name">Newsletter</field>
<field name="section_id" ref="section_sales_department"/>
</record>
<!-- crm categories -->
<record model="crm.case.categ" id="categ_oppor1">
<field name="name">Interest in Computer</field>
<field name="section_id" ref="section_sales_department"/>
<field name="object_id" search="[('model','=','crm.lead')]" model="ir.model"/>
</record>
<record model="crm.case.categ" id="categ_oppor2">
<field name="name">Interest in Accessories</field>
<field name="section_id" ref="section_sales_department"/>
<field name="object_id" search="[('model','=','crm.lead')]" model="ir.model"/>
</record>
<record model="crm.case.categ" id="categ_oppor3">
<field name="name">Need Services</field>
<field name="section_id" ref="section_sales_department"/>
<field name="object_id" search="[('model','=','crm.lead')]" model="ir.model"/>
</record>
<record model="crm.case.categ" id="categ_oppor4">
<field name="name">Need Information</field>
<field name="section_id" ref="section_sales_department"/>
<field name="object_id" search="[('model','=','crm.lead')]" model="ir.model"/>
</record>
<record model="crm.case.categ" id="categ_oppor5">
<field name="name">Need a Website Design</field>
<field name="section_id" ref="section_sales_department"/>
<field name="object_id" search="[('model','=','crm.lead')]" model="ir.model"/>
</record>
<record model="crm.case.categ" id="categ_oppor6">
<field name="name">Potential Reseller</field>
<field name="section_id" ref="section_sales_department"/>
<field name="object_id" search="[('model','=','crm.lead')]" model="ir.model"/>
</record>
<record model="crm.case.categ" id="categ_oppor7">
<field name="name">Need Consulting</field>
<field name="section_id" ref="section_sales_department"/>
<field name="object_id" search="[('model','=','crm.lead')]" model="ir.model"/>
</record>
<record model="crm.case.categ" id="categ_oppor8">
<field name="name">Other</field>
<field name="section_id" ref="section_sales_department"/>
<field name="object_id" search="[('model','=','crm.lead')]" model="ir.model"/>
</record>
</data>
</openerp>

View File

@ -1,11 +1,7 @@
<?xml version="1.0"?>
<openerp>
<data noupdate="1">
<!--
((((((((((( Demo Cases )))))))))))
-->
<!--For Leads-->
<!-- Demo Leads -->
<record id="crm_case_itisatelesalescampaign0" model="crm.lead">
<field name="type_id" ref="crm.type_lead1"/>
<field eval="'3'" name="priority"/>
@ -37,7 +33,7 @@
<field eval="'Le Club SARL'" name="name"/>
<field eval="'(956) 293-2595'" name="phone"/>
</record>
<record id="crm_case_developingwebapplications0" model="crm.lead">
<field name="type_id" ref="crm.type_lead5"/>
<field eval="'2'" name="priority"/>
@ -186,26 +182,105 @@
<field eval="&quot;Partnership Offer&quot;" name="partner_name"/>
</record>
<!-- Call Function to Open the leads-->
<!-- Call Function to Open the leads-->
<function model="crm.lead" name="case_open">
<value eval="[ref('crm_case_itisatelesalescampaign0'), ref('crm_case_electonicgoodsdealer0'), ref('crm_case_company_partnership0'), ref('crm_case_webvisitor0'), ref('crm_case_business_card0')]"/>
</function>
<!-- Call Function to mark the lead as Pending-->
<function model="crm.lead" name="case_pending">
<value eval="[ref('crm_case_itdeveloper0')]"/>
</function>
<!-- Call Function to Close the leads-->
<function model="crm.lead" name="case_close">
<value eval="[ref('crm_case_vpoperations0'), ref('crm_case_developingwebapplications0'), ref('crm_case_webvisitor0')]"/>
</function>
<!-- Call Function to Cancel the leads-->
<function model="crm.lead" name="case_cancel">
<value eval="[ref('crm_case_mgroperations0'), ref('crm_case_imported_contact0')]"/>
</function>
<!-- Demo Opportunities -->
<record id="crm_case_construstazunits0" model="crm.lead">
<field eval="60" name="probability"/>
<field name="partner_address_id" ref="base.res_partner_address_zen"/>
<field eval="1" name="active"/>
<field name="type">opportunity</field>
<field name="type_id" ref="crm.type_lead1"/>
<field name="partner_id" ref="base.res_partner_3"/>
<field eval="&quot;3&quot;" name="priority"/>
<field name="user_id" ref="base.user_root"/>
<field eval="&quot;open&quot;" name="state"/>
<field eval="85000.0" name="planned_revenue"/>
<field name="section_id" ref="crm.section_sales_department"/>
<field name="categ_id" ref="crm.categ_oppor1"/>
<field name="stage_id" ref="crm.stage_lead3"/>
<field eval="&quot;CONS TRUST (AZ) 529701 - 1000 units&quot;" name="name"/>
</record>
<record id="crm_case_rdroundfundingunits0" model="crm.lead">
<field name="partner_address_id" ref="base.res_partner_address_15"/>
<field eval="1" name="active"/>
<field name="type">opportunity</field>
<field name="type_id" ref="crm.type_lead2"/>
<field name="partner_id" ref="base.res_partner_11"/>
<field eval="&quot;3&quot;" name="priority"/>
<field name="user_id" ref="base.user_root"/>
<field eval="&quot;draft&quot;" name="state"/>
<field eval="45000.0" name="planned_revenue"/>
<field eval="50" name="probability"/>
<field name="section_id" ref="crm.section_sales_department"/>
<field name="categ_id" ref="crm.categ_oppor5"/>
<field name="stage_id" ref="crm.stage_lead1"/>
<field eval="&quot;3rd Round Funding - 1000 units &quot;" name="name"/>
</record>
<record id="crm_case_mediapoleunits0" model="crm.lead">
<field eval="10" name="probability"/>
<field name="partner_address_id" ref="base.res_partner_address_3"/>
<field eval="1" name="active"/>
<field name="type">opportunity</field>
<field name="type_id" ref="crm.type_lead1"/>
<field name="partner_id" ref="base.res_partner_8"/>
<field eval="&quot;3&quot;" name="priority"/>
<field name="user_id" ref="base.user_root"/>
<field eval="&quot;pending&quot;" name="state"/>
<field eval="55000.0" name="planned_revenue"/>
<field eval="70" name="probability"/>
<field name="section_id" ref="crm.section_sales_department"/>
<field name="categ_id" ref="crm.categ_oppor7"/>
<field name="stage_id" ref="crm.stage_lead5"/>
<field eval="&quot;Mediapole - 5000 units&quot;" name="name"/>
<field eval="&quot;info@mycompany.net&quot;" name="email_from"/>
</record>
<record id="crm_case_abcfuelcounits0" model="crm.lead">
<field eval="40" name="probability"/>
<field name="partner_address_id" ref="base.res_partner_address_1"/>
<field eval="1" name="active"/>
<field name="type">opportunity</field>
<field name="type_id" ref="crm.type_lead1"/>
<field name="partner_id" ref="base.res_partner_9"/>
<field eval="&quot;3&quot;" name="priority"/>
<field name="user_id" ref="base.user_demo"/>
<field eval="&quot;open&quot;" name="state"/>
<field eval="45000.0" name="planned_revenue"/>
<field name="section_id" ref="crm.section_sales_department"/>
<field name="categ_id" ref="crm.categ_oppor5"/>
<field name="stage_id" ref="crm.stage_lead4"/>
<field eval="&quot;ABC FUEL CO 829264 - 1000 units &quot;" name="name"/>
<field eval="&quot;info@opensides.be&quot;" name="email_from"/>
</record>
<record id="crm_case_dirtminingltdunits0" model="crm.lead">
<field eval="80" name="probability"/>
<field name="partner_address_id" ref="base.res_partner_address_wong"/>
<field eval="1" name="active"/>
<field name="type">opportunity</field>
<field name="partner_id" ref="base.res_partner_maxtor"/>
<field eval="&quot;3&quot;" name="priority"/>
<field name="user_id" ref="base.user_root"/>
<field eval="&quot;done&quot;" name="state"/>
<field eval="42000.0" name="planned_revenue"/>
<field name="section_id" ref="crm.section_sales_department"/>
<field name="categ_id" ref="crm.categ_oppor2"/>
<field name="stage_id" ref="crm.stage_lead6"/>
<field eval="&quot;Dirt Mining Ltd 271742 - 1000 units&quot;" name="name"/>
</record>
</data>
</openerp>

View File

@ -35,5 +35,68 @@
id="menu_crm_case_categ0_act_leads"
action="crm_case_category_act_leads_all" sequence="1" />
<act_window
id="act_crm_opportunity_crm_phonecall_new"
name="Phone calls"
groups="base.group_extended"
res_model="crm.phonecall"
src_model="crm.lead"
view_mode="tree,calendar,form"
context="{'default_duration': 1.0 ,'default_opportunity_id': active_id,'default_partner_phone':phone}"
domain="[('opportunity_id', '=', active_id)]"
view_type="form"/>
<act_window
id="act_crm_opportunity_crm_meeting_new"
name="Meetings"
res_model="crm.meeting"
src_model="crm.lead"
view_mode="tree,form,calendar,"
context="{'default_duration': 4.0, 'default_opportunity_id': active_id}"
domain="[('opportunity_id', '=', active_id)]"
view_type="form"/>
<record model="ir.actions.act_window" id="crm_case_category_act_oppor11">
<field name="name">Opportunities</field>
<field name="res_model">crm.lead</field>
<field name="view_mode">tree,form,graph,calendar</field>
<field name="domain">[('type','=','opportunity')]</field>
<field name="context">{'search_default_user_id':uid,'search_default_current':1, 'search_default_section_id':section_id, 'stage_type': 'opportunity', 'default_type': 'opportunity'}</field>
<field name="view_id" ref="crm_case_tree_view_oppor"/>
<field name="search_view_id" ref="crm.view_crm_case_opportunities_filter"/>
<field name="help">With opportunities you can manage and keep track of your sales pipeline by creating specific customer- or prospect-related sales documents to follow up potential sales. Information such as expected revenue, opportunity stage, expected closing date, communication history and much more can be stored. Opportunities can be connected to the email gateway: new emails may create opportunities, each of them automatically gets the history of the conversation with the customer.
You and your team(s) will be able to plan meetings and phone calls from opportunities, convert them into quotations, manage related documents, track all customer related activities, and much more.</field>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_tree_view_oppor11">
<field name="sequence" eval="1"/>
<field name="view_mode">tree</field>
<field name="view_id" ref="crm_case_tree_view_oppor"/>
<field name="act_window_id" ref="crm_case_category_act_oppor11"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_form_view_oppor11">
<field name="sequence" eval="2"/>
<field name="view_mode">form</field>
<field name="view_id" ref="crm_case_form_view_oppor"/>
<field name="act_window_id" ref="crm_case_category_act_oppor11"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_graph_view_oppor11">
<field name="sequence" eval="4"/>
<field name="view_mode">graph</field>
<field name="view_id" ref="crm_case_graph_view_opportunity"/>
<field name="act_window_id" ref="crm_case_category_act_oppor11"/>
</record>
<menuitem id="base.menu_sales" name="Sales"
parent="base.menu_base_partner" sequence="1" />
<menuitem name="Opportunities" id="menu_crm_case_opp"
parent="base.menu_sales" action="crm_case_category_act_oppor11"
sequence="2" />
</data>
</openerp>

View File

@ -3,31 +3,23 @@
<data>
<!-- Stage Search view -->
<record id="crm_lead_stage_search" model="ir.ui.view">
<record id="crm_lead_stage_search" model="ir.ui.view">
<field name="name">Stage - Search</field>
<field name="model">crm.case.stage</field>
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Stage Search">
<filter icon="terp-personal" name="lead"
string="Lead" domain="[('type', '=', 'lead')]" context="{'type' : 'lead'}"/>
<filter icon="terp-personal+" name="opportunity"
string="Opportunity" domain="[('type', '=', 'opportunity')]" context="{'type' : 'opportunity'}"/>
<field name="name"/>
</search>
</field>
</record>
<!--Lead Stage Form view -->
<record id="crm_lead_stage_act" model="ir.actions.act_window">
<field name="name">Stages</field>
<field name="res_model">crm.case.stage</field>
<field name="view_type">form</field>
<field name="view_id" ref="crm.crm_case_stage_tree"/>
<field name="context">{'search_default_opportunity':1}</field>
<field name="search_view_id" ref="crm_lead_stage_search"/>
<field name="help">Add specific stages to leads and opportunities allowing your sales to better organise their sales pipeline. Stages will allow them to easily track how a specific lead or opportunity is positioned in the sales cycle.</field>
</record>
@ -74,7 +66,7 @@
<newline />
<field name="user_id" />
<field name="section_id" widget="selection" />
<field name="stage_id" domain="[('type','=','lead'),('section_ids', '=', section_id)]" />
<field name="stage_id" domain="[('section_ids', '=', section_id)]" />
<group col="2" colspan="1">
<button name="stage_previous" string=""
states="open,pending,draft" type="object"
@ -371,5 +363,311 @@
</search>
</field>
</record>
<!-- Opportunities Form View -->
<record model="ir.ui.view" id="crm_case_form_view_oppor">
<field name="name">Opportunities</field>
<field name="model">crm.lead</field>
<field name="type">form</field>
<field name="priority">10</field>
<field name="arch" type="xml">
<form string="Opportunities">
<group colspan="4" col="7">
<field name="name" required="1" string="Opportunity"/>
<label string="Stage:" align="1.0"/>
<group colspan="1" col="4">
<field name="stage_id" nolabel="1"
on_change="onchange_stage_id(stage_id)"
domain="[('section_ids', '=', section_id)]"/>
<button name="stage_previous"
states="draft,open,pending" type="object"
icon="gtk-go-back" string="" context="{'stage_type': 'opportunity'}"/>
<button name="stage_next" states="draft,open,pending"
type="object" icon="gtk-go-forward" string="" context="{'stage_type': 'opportunity'}"/>
</group>
<field name="user_id"/>
<button string="Schedule/Log Call"
name="%(opportunity2phonecall_act)d" icon="terp-call-start" type="action" groups="base.group_extended"/>
<field name="planned_revenue"/>
<field name="probability"/>
<field name="date_deadline"/>
<button name="action_makeMeeting" type="object"
string="Schedule Meeting" icon="gtk-redo" />
<newline/>
<field name="date_action"/>
<field name="title_action"/>
<field name="priority" string="Priority"/>
<newline/>
<field name="type" invisible="1"/>
</group>
<notebook colspan="4">
<page string="Opportunity">
<group col="4" colspan="2">
<separator colspan="4" string="Contacts"/>
<group colspan="2">
<field name="partner_id" select="1"
on_change="onchange_partner_id(partner_id, email_from)" string="Customer"
colspan="2" />
<button name="%(action_crm_lead2partner)d"
icon="terp-partner" type="action"
string="Create"
attrs="{'invisible':[('partner_id','!=',False)]}"/>
</group>
<field name="partner_address_id"
string="Contact"
on_change="onchange_partner_address_id(partner_address_id, email_from)"
colspan="1" />
<group col="3" colspan="2">
<field name="email_from" string="Email" />
<button string="Mail"
name="%(crm.action_crm_send_mail)d"
context="{'mail':'new', 'model': 'crm.lead'}"
icon="terp-mail-message-new" type="action" />
</group>
<field name="phone"/>
</group>
<group col="2" colspan="2">
<separator colspan="2" string="Categorization"/>
<field name="section_id" colspan="1" widget="selection"/>
<field name="categ_id" select="1"
string="Category" widget="selection"
domain="[('object_id.model', '=', 'crm.lead')]" />
</group>
<separator colspan="4" string="Details"/>
<field name="description" nolabel="1" colspan="4"/>
<separator colspan="4"/>
<group col="10" colspan="4">
<field name="state"/>
<button name="case_cancel" string="Cancel" states="draft" type="object" icon="gtk-cancel" />
<button name="case_mark_lost" string="Mark Lost" states="open,pending" type="object" icon="gtk-cancel" />
<button name="case_reset" string="Reset to Draft" states="done,cancel" type="object" icon="gtk-convert" />
<button name="case_open" string="Open" states="draft,pending" type="object" icon="gtk-go-forward" />
<button name="case_pending" string="Pending" states="draft,open" type="object" icon="gtk-media-pause" />
<button name="case_escalate" string="Escalate" states="open,pending" type="object" groups="base.group_extended" icon="gtk-go-up" />
<button name="case_mark_won" string="Mark Won" states="open,pending" type="object" icon="gtk-apply" />
</group>
</page>
<page string="Lead">
<group colspan="2" col="4">
<separator string="Contact" colspan="4" col="4"/>
<field name="partner_name" string="Customer Name" colspan="4"/>
<newline/>
<field domain="[('domain', '=', 'contact')]" name="title" widget="selection"/>
<field name="function" />
<field name="street" colspan="4"/>
<field name="street2" colspan="4"/>
<field name="zip"/>
<field name="city"/>
<field name="country_id"/>
<field name="state_id"/>
</group>
<group colspan="2" col="2">
<separator string="Communication" colspan="2"/>
<field name="fax"/>
<field name="mobile"/>
</group>
<group colspan="2" col="2">
<separator string="Categorization" colspan="2"/>
<field name="type_id" widget="selection" groups="base.group_extended"/>
<field name="channel_id" widget="selection"/>
</group>
<group colspan="2" col="2">
<separator string="Mailings" colspan="2"/>
<field name="optin" on_change="on_change_optin(optin)"/>
<field name="optout" on_change="on_change_optout(optout)"/>
</group>
</page>
<page string="Communication &amp; History" groups="base.group_extended">
<group colspan="4">
<field colspan="4" name="email_cc" string="Global CC" widget="char" size="512"/>
</group>
<field name="message_ids" colspan="4" nolabel="1" mode="tree,form">
<tree string="History">
<field name="display_text" string="History Information"/>
<field name="history" invisible="1"/>
<button
string="Reply" attrs="{'invisible': [('history', '!=', True)]}"
name="%(crm.action_crm_send_mail)d"
context="{'mail':'reply', 'model': 'crm.lead', 'include_original' : True}"
icon="terp-mail-replied" type="action" />
</tree>
<form string="History">
<group col="4" colspan="4">
<field name="email_from"/>
<field name="date"/>
<field name="email_to" size="512"/>
<field name="email_cc" size="512"/>
<field name="name" colspan="4" widget="char" attrs="{'invisible': [('history', '=', False)]}" size="512"/>
<field name="display_text" colspan="4" attrs="{'invisible': [('history', '=', True)]}"/>
<field name="history" invisible="1"/>
</group>
<notebook colspan="4">
<page string="Details">
<field name="description" colspan="4" nolabel="1"/>
<group attrs="{'invisible': [('history', '!=', True)]}">
<button colspan="4"
string="Reply"
name="%(crm.action_crm_send_mail)d"
context="{'mail':'reply', 'model': 'crm.lead', 'include_original' : True}"
icon="terp-mail-replied" type="action" />
</group>
</page>
<page string="Attachments">
<field name="attachment_ids" colspan="4" readonly="1" nolabel="1"/>
</page>
</notebook>
</form>
</field>
<button string="Add Internal Note"
name="%(crm.action_crm_add_note)d"
context="{'model': 'crm.lead' }"
icon="terp-document-new" type="action" />
<button string="Send New Email"
name="%(crm.action_crm_send_mail)d"
context="{'mail':'new', 'model': 'crm.lead'}"
icon="terp-mail-message-new" type="action" />
</page>
<page string="Extra Info" groups="base.group_extended">
<group col="2" colspan="2">
<separator string="Dates" colspan="2"/>
<field name="create_date"/>
<field name="write_date"/>
<field name="date_closed"/>
<field name="date_open"/>
</group>
<group col="2" colspan="2">
<separator string="Misc" colspan="2"/>
<field name="active"/>
<field name="day_open"/>
<field name="day_close"/>
<field name="referred"/>
</group>
<separator colspan="4" string="References"/>
<field name="ref"/>
<field name="ref2"/>
</page>
</notebook>
</form>
</field>
</record>
<!-- Opportunities Tree View -->
<record model="ir.ui.view" id="crm_case_tree_view_oppor">
<field name="name">Opportunities Tree</field>
<field name="model">crm.lead</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Opportunities" colors="blue:state=='pending' and not(date_deadline and (date_deadline &lt; current_date));gray:state in ('cancel', 'done');red:date_deadline and (date_deadline &lt; current_date)">
<field name="date_deadline" invisible="1"/>
<field name="create_date"/>
<field name="name" string="Opportunity"/>
<field name="partner_id" string="Customer"/>
<field name="country_id" invisible="context.get('invisible_country', True)" />
<field name="date_action"/>
<field name="title_action" />
<field name="channel_id" invisible="1"/>
<field name="type_id" invisible="1"/>
<field name="subjects" invisible="1"/>
<field name="stage_id"/>
<button name="stage_previous" string="Previous Stage" states="open,pending" type="object" icon="gtk-go-back" />
<button name="stage_next" string="Next Stage" states="open,pending" type="object" icon="gtk-go-forward" />
<field name="planned_revenue" sum="Expected Revenues"/>
<field name="probability" widget="progressbar" avg="Avg. of Probability"/>
<field name="section_id" invisible="context.get('invisible_section', True)" />
<field name="user_id"/>
<field name="priority" invisible="1"/>
<field name="categ_id" invisible="1"/>
<field name="state"/>
<button name="case_open" string="Open" states="draft,pending" type="object" icon="gtk-go-forward" />
<button name="case_pending" string="Pending" states="open,draft" type="object" icon="gtk-media-pause" />
<button name="case_mark_lost" string="Lost" states="open,pending" type="object" icon="gtk-cancel" />
<button name="case_mark_won" string="Won" states="open,pending" type="object" icon="gtk-apply" />
</tree>
</field>
</record>
<!-- Opportunities Search View -->
<record id="view_crm_case_opportunities_filter" model="ir.ui.view">
<field name="name">CRM - Opportunities Search</field>
<field name="model">crm.lead</field>
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Search Opportunities">
<filter icon="terp-check"
string="Current" help="Draft, Open and Pending Opportunities"
name="current"
domain="[('state','in',('draft','open','pending'))]"/>
<filter icon="terp-camera_test"
string="Open" help="Open Opportunities"
domain="[('state','=','open')]"/>
<filter icon="terp-gtk-media-pause"
string="Pending" help="Pending Opportunities"
domain="[('state','=','pending')]"/>
<separator orientation="vertical"/>
<field name="name" string="Opportunity"/>
<field name="partner_id" string="Customer / Email" filter_domain="['|','|',('partner_id','ilike',self),('partner_name','ilike',self),('email_from','ilike',self)]"/>
<field name="user_id">
<filter icon="terp-personal-"
domain="[('user_id','=', False)]"
help="Unassigned Opportunities" />
</field>
<field name="section_id"
context="{'invisible_section': False}"
widget="selection">
<filter icon="terp-personal+" groups="base.group_extended"
domain="['|', ('section_id', '=', context.get('section_id')), '|', ('section_id.user_id','=',uid), ('section_id.member_ids', 'in', [uid])]"
context="{'invisible_section': False}"
help="My Sales Team(s)" />
<filter icon="terp-personal+" groups="base.group_extended"
context="{'invisible_section': False}"
domain="[]"
help="Show Sales Team"/>
</field>
<newline/>
<group expand="0" string="Group By..." colspan="16">
<filter string="Salesman" icon="terp-personal" domain="[]" context="{'group_by':'user_id'}" />
<filter string="Team" help="Sales Team" icon="terp-personal+" domain="[]" context="{'group_by':'section_id'}"/>
<filter string="Customer" help="Partner" icon="terp-personal+" domain="[]" context="{'group_by':'partner_id'}"/>
<separator orientation="vertical" />
<filter string="Stage" icon="terp-stage" domain="[]" context="{'group_by':'stage_id'}" />
<filter string="Priority" icon="terp-rating-rated" domain="[]" context="{'group_by':'priority'}" />
<filter string="Category" icon="terp-stock_symbol-selection" domain="[]" context="{'group_by':'categ_id'}" />
<filter string="Campaign" icon="terp-gtk-jump-to-rtl" domain="[]" context="{'group_by':'type_id'}" groups="base.group_extended"/>
<filter string="Channel" icon="terp-call-start" domain="[]" context="{'group_by':'channel_id'}" />
<filter string="State" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
<separator orientation="vertical" />
<filter string="Creation" icon="terp-go-month" domain="[]" context="{'group_by':'create_date'}" />
<filter string="Exp.Closing" icon="terp-go-month" help="Expected Closing" domain="[]" context="{'group_by':'date_deadline'}" />
</group>
</search>
</field>
</record>
<!-- crm.lead Opportunities Graph View -->
<record model="ir.ui.view" id="crm_case_graph_view_opportunity">
<field name="name">CRM - Opportunity Graph</field>
<field name="model">crm.lead</field>
<field name="type">graph</field>
<field name="arch" type="xml">
<graph string="Opportunity by Categories" type="bar" orientation="horizontal">
<field name="categ_id"/>
<field name="planned_revenue" operator="+"/>
<field name="state" group="True"/>
</graph>
</field>
</record>
</data>
</openerp>

View File

@ -13,7 +13,7 @@
/>
<record model="ir.actions.act_window" id="crm_case_categ_meet_create_partner">
<field name="name">Create Partner For Meeting</field>
<field name="name">Schedule a Meeting</field>
<field name="context" eval="{'default_state':'draft'}"/>
</record>

View File

@ -1,223 +0,0 @@
#-*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
from osv import fields, osv
from tools.translate import _
import crm
AVAILABLE_STATES = [
('draft','Draft'),
('open','Open'),
('cancel', 'Lost'),
('done', 'Converted'),
('pending','Pending')
]
class crm_opportunity(osv.osv):
""" Opportunity Cases """
_order = "priority,date_action,id desc"
_inherit = 'crm.lead'
_columns = {
# From crm.case
'partner_address_id': fields.many2one('res.partner.address', 'Partner Contact', \
domain="[('partner_id','=',partner_id)]"),
# Opportunity fields
'probability': fields.float('Probability (%)',group_operator="avg"),
'planned_revenue': fields.float('Expected Revenue'),
'ref': fields.reference('Reference', selection=crm._links_get, size=128),
'ref2': fields.reference('Reference 2', selection=crm._links_get, size=128),
'phone': fields.char("Phone", size=64),
'date_deadline': fields.date('Expected Closing'),
'date_action': fields.date('Next Action Date'),
'title_action': fields.char('Next Action', size=64),
'stage_id': fields.many2one('crm.case.stage', 'Stage', domain="[('type','=','opportunity')]"),
}
def _case_close_generic(self, cr, uid, ids, find_stage, *args):
res = super(crm_opportunity, self).case_close(cr, uid, ids, *args)
for case in self.browse(cr, uid, ids):
#if the case is not an opportunity close won't change the stage
if not case.type == 'opportunity':
return res
value = {}
stage_id = find_stage(cr, uid, 'opportunity', case.section_id.id or False)
if stage_id:
stage_obj = self.pool.get('crm.case.stage').browse(cr, uid, stage_id)
value.update({'stage_id': stage_id})
if stage_obj.on_change:
value.update({'probability': stage_obj.probability})
#Done un crm.case
#value.update({'date_closed': time.strftime('%Y-%m-%d %H:%M:%S')})
self.write(cr, uid, ids, value)
return res
def case_close(self, cr, uid, ids, *args):
"""Overrides close for crm_case for setting probability and close date
@param self: The object pointer
@param cr: the current row, from the database cursor,
@param uid: the current users ID for security checks,
@param ids: List of case Ids
@param *args: Tuple Value for additional Params
"""
res = self._case_close_generic(cr, uid, ids, self._find_won_stage, *args)
for (id, name) in self.name_get(cr, uid, ids):
opp = self.browse(cr, uid, id)
if opp.type == 'opportunity':
message = _("The opportunity '%s' has been won.") % name
self.log(cr, uid, id, message)
return res
def case_mark_lost(self, cr, uid, ids, *args):
"""Mark the case as lost: state = done and probability = 0%
@param self: The object pointer
@param cr: the current row, from the database cursor,
@param uid: the current users ID for security checks,
@param ids: List of case Ids
@param *args: Tuple Value for additional Params
"""
res = self._case_close_generic(cr, uid, ids, self._find_lost_stage, *args)
for (id, name) in self.name_get(cr, uid, ids):
opp = self.browse(cr, uid, id)
if opp.type == 'opportunity':
message = _("The opportunity '%s' has been marked as lost.") % name
self.log(cr, uid, id, message)
return res
def case_cancel(self, cr, uid, ids, *args):
"""Overrides cancel for crm_case for setting probability
@param self: The object pointer
@param cr: the current row, from the database cursor,
@param uid: the current users ID for security checks,
@param ids: List of case Ids
@param *args: Tuple Value for additional Params
"""
res = super(crm_opportunity, self).case_cancel(cr, uid, ids, args)
self.write(cr, uid, ids, {'probability' : 0.0})
return res
def case_reset(self, cr, uid, ids, *args):
"""Overrides reset as draft in order to set the stage field as empty
@param self: The object pointer
@param cr: the current row, from the database cursor,
@param uid: the current users ID for security checks,
@param ids: List of case Ids
@param *args: Tuple Value for additional Params
"""
res = super(crm_opportunity, self).case_reset(cr, uid, ids, *args)
self.write(cr, uid, ids, {'stage_id': False, 'probability': 0.0})
return res
def case_open(self, cr, uid, ids, *args):
"""Overrides open for crm_case for setting Open Date
@param self: The object pointer
@param cr: the current row, from the database cursor,
@param uid: the current users ID for security checks,
@param ids: List of case's Ids
@param *args: Give Tuple Value
"""
res = super(crm_opportunity, self).case_open(cr, uid, ids, *args)
return res
def onchange_stage_id(self, cr, uid, ids, stage_id, context=None):
""" @param self: The object pointer
@param cr: the current row, from the database cursor,
@param uid: the current users ID for security checks,
@param ids: List of stages IDs
@stage_id: change state id on run time """
if not stage_id:
return {'value':{}}
stage = self.pool.get('crm.case.stage').browse(cr, uid, stage_id, context=context)
if not stage.on_change:
return {'value':{}}
return {'value':{'probability': stage.probability}}
_defaults = {
'company_id': lambda s,cr,uid,c: s.pool.get('res.company')._company_default_get(cr, uid, 'crm.lead', context=c),
'priority': crm.AVAILABLE_PRIORITIES[2][0],
}
def action_makeMeeting(self, cr, uid, ids, context=None):
"""
This opens Meeting's calendar view to schedule meeting on current Opportunity
@param self: The object pointer
@param cr: the current row, from the database cursor,
@param uid: the current users ID for security checks,
@param ids: List of Opportunity to Meeting IDs
@param context: A standard dictionary for contextual values
@return : Dictionary value for created Meeting view
"""
value = {}
for opp in self.browse(cr, uid, ids, context=context):
data_obj = self.pool.get('ir.model.data')
# Get meeting views
result = data_obj._get_id(cr, uid, 'crm', 'view_crm_case_meetings_filter')
res = data_obj.read(cr, uid, result, ['res_id'])
id1 = data_obj._get_id(cr, uid, 'crm', 'crm_case_calendar_view_meet')
id2 = data_obj._get_id(cr, uid, 'crm', 'crm_case_form_view_meet')
id3 = data_obj._get_id(cr, uid, 'crm', 'crm_case_tree_view_meet')
if id1:
id1 = data_obj.browse(cr, uid, id1, context=context).res_id
if id2:
id2 = data_obj.browse(cr, uid, id2, context=context).res_id
if id3:
id3 = data_obj.browse(cr, uid, id3, context=context).res_id
context = {
'default_opportunity_id': opp.id,
'default_partner_id': opp.partner_id and opp.partner_id.id or False,
'default_user_id': uid,
'default_section_id': opp.section_id and opp.section_id.id or False,
'default_email_from': opp.email_from,
'default_state': 'open',
'default_name': opp.name
}
value = {
'name': _('Meetings'),
'context': context,
'view_type': 'form',
'view_mode': 'calendar,form,tree',
'res_model': 'crm.meeting',
'view_id': False,
'views': [(id1, 'calendar'), (id2, 'form'), (id3, 'tree')],
'type': 'ir.actions.act_window',
'search_view_id': res['res_id'],
'nodestroy': True
}
return value
crm_opportunity()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -1,109 +0,0 @@
<?xml version="1.0"?>
<openerp>
<data noupdate="1">
<!-- CASE STATUS(stage_id) -->
<record model="crm.case.stage" id="stage_opportunity6">
<field name="name">Lost</field>
<field eval="'0'" name="probability"/>
<field eval="'0'" name="sequence"/>
<field name="type">opportunity</field>
</record>
<record model="crm.case.stage" id="stage_opportunity1">
<field name="name">New</field>
<field eval="'10'" name="probability"/>
<field eval="'1'" name="sequence"/>
<field name="type">opportunity</field>
</record>
<record model="crm.case.stage" id="stage_opportunity2">
<field name="name">Qualification</field>
<field eval="'20'" name="probability"/>
<field eval="'2'" name="sequence"/>
<field name="type">opportunity</field>
</record>
<record model="crm.case.stage" id="stage_opportunity3">
<field name="name">Proposition</field>
<field eval="'40'" name="probability"/>
<field eval="'3'" name="sequence"/>
<field name="type">opportunity</field>
</record>
<record model="crm.case.stage" id="stage_opportunity4">
<field name="name">Negotiation</field>
<field eval="'60'" name="probability"/>
<field eval="'4'" name="sequence"/>
<field name="type">opportunity</field>
</record>
<record model="crm.case.stage" id="stage_opportunity5">
<field name="name">Won</field>
<field eval="'100'" name="probability"/>
<field eval="'5'" name="sequence"/>
<field eval="1" name="on_change"/>
<field name="type">opportunity</field>
</record>
<record model="crm.case.section" id="section_sales_department">
<field name="name">Sales Department</field>
<field name="code">Sales</field>
<field name="stage_ids" eval="[(4, ref('stage_opportunity1')), (4, ref('stage_opportunity2')), (4, ref('stage_opportunity3')), (4, ref('stage_opportunity4')), (4, ref('stage_opportunity5')), (4, ref('stage_opportunity6'))]"/>
</record>
<!-- CASE CATEGORY(categ_id) -->
<record model="crm.case.categ" id="categ_oppor1">
<field name="name">Interest in Computer</field>
<field name="section_id" ref="section_sales_department"/>
<field name="object_id" search="[('model','=','crm.lead')]" model="ir.model"/>
</record>
<record model="crm.case.categ" id="categ_oppor2">
<field name="name">Interest in Accessories</field>
<field name="section_id" ref="section_sales_department"/>
<field name="object_id" search="[('model','=','crm.lead')]" model="ir.model"/>
</record>
<record model="crm.case.categ" id="categ_oppor3">
<field name="name">Need Services</field>
<field name="section_id" ref="section_sales_department"/>
<field name="object_id" search="[('model','=','crm.lead')]" model="ir.model"/>
</record>
<record model="crm.case.categ" id="categ_oppor4">
<field name="name">Need Information</field>
<field name="section_id" ref="section_sales_department"/>
<field name="object_id" search="[('model','=','crm.lead')]" model="ir.model"/>
</record>
<record model="crm.case.categ" id="categ_oppor5">
<field name="name">Need a Website Design</field>
<field name="section_id" ref="section_sales_department"/>
<field name="object_id" search="[('model','=','crm.lead')]" model="ir.model"/>
</record>
<record model="crm.case.categ" id="categ_oppor6">
<field name="name">Potential Reseller</field>
<field name="section_id" ref="section_sales_department"/>
<field name="object_id" search="[('model','=','crm.lead')]" model="ir.model"/>
</record>
<record model="crm.case.categ" id="categ_oppor7">
<field name="name">Need Consulting</field>
<field name="section_id" ref="section_sales_department"/>
<field name="object_id" search="[('model','=','crm.lead')]" model="ir.model"/>
</record>
<record model="crm.case.categ" id="categ_oppor8">
<field name="name">Other</field>
<field name="section_id" ref="section_sales_department"/>
<field name="object_id" search="[('model','=','crm.lead')]" model="ir.model"/>
</record>
<!-- Case Resource(type_id) -->
<record model="crm.case.resource.type" id="type_oppor1">
<field name="name">Campaign 2</field>
<field name="section_id" ref="section_sales_department"/>
</record>
<record model="crm.case.resource.type" id="type_oppor2">
<field name="name">Campaign 1</field>
<field name="section_id" ref="section_sales_department"/>
</record>
</data>
</openerp>

View File

@ -1,93 +0,0 @@
<?xml version="1.0"?>
<openerp>
<data noupdate="1">
<!--
((((((((((( Demo Cases )))))))))))
-->
<!--For Opportunity-->
<record id="crm_case_construstazunits0" model="crm.lead">
<field eval="60" name="probability"/>
<field name="partner_address_id" ref="base.res_partner_address_zen"/>
<field eval="1" name="active"/>
<field name="type">opportunity</field>
<field name="type_id" ref="crm.type_oppor1"/>
<field name="partner_id" ref="base.res_partner_3"/>
<field eval="&quot;3&quot;" name="priority"/>
<field name="user_id" ref="base.user_root"/>
<field eval="&quot;open&quot;" name="state"/>
<field eval="85000.0" name="planned_revenue"/>
<field name="section_id" ref="crm.section_sales_department"/>
<field name="categ_id" ref="crm.categ_oppor1"/>
<field name="stage_id" ref="crm.stage_opportunity3"/>
<field eval="&quot;CONS TRUST (AZ) 529701 - 1000 units&quot;" name="name"/>
</record>
<record id="crm_case_rdroundfundingunits0" model="crm.lead">
<field name="partner_address_id" ref="base.res_partner_address_15"/>
<field eval="1" name="active"/>
<field name="type">opportunity</field>
<field name="type_id" ref="crm.type_oppor2"/>
<field name="partner_id" ref="base.res_partner_11"/>
<field eval="&quot;3&quot;" name="priority"/>
<field name="user_id" ref="base.user_root"/>
<field eval="&quot;draft&quot;" name="state"/>
<field eval="45000.0" name="planned_revenue"/>
<field eval="50" name="probability"/>
<field name="section_id" ref="crm.section_sales_department"/>
<field name="categ_id" ref="crm.categ_oppor5"/>
<field name="stage_id" ref="crm.stage_opportunity1"/>
<field eval="&quot;3rd Round Funding - 1000 units &quot;" name="name"/>
</record>
<record id="crm_case_mediapoleunits0" model="crm.lead">
<field eval="10" name="probability"/>
<field name="partner_address_id" ref="base.res_partner_address_3"/>
<field eval="1" name="active"/>
<field name="type">opportunity</field>
<field name="type_id" ref="crm.type_oppor1"/>
<field name="partner_id" ref="base.res_partner_8"/>
<field eval="&quot;3&quot;" name="priority"/>
<field name="user_id" ref="base.user_root"/>
<field eval="&quot;pending&quot;" name="state"/>
<field eval="55000.0" name="planned_revenue"/>
<field eval="70" name="probability"/>
<field name="section_id" ref="crm.section_sales_department"/>
<field name="categ_id" ref="crm.categ_oppor7"/>
<field name="stage_id" ref="crm.stage_opportunity5"/>
<field eval="&quot;Mediapole - 5000 units&quot;" name="name"/>
<field eval="&quot;info@mycompany.net&quot;" name="email_from"/>
</record>
<record id="crm_case_abcfuelcounits0" model="crm.lead">
<field eval="40" name="probability"/>
<field name="partner_address_id" ref="base.res_partner_address_1"/>
<field eval="1" name="active"/>
<field name="type">opportunity</field>
<field name="type_id" ref="crm.type_oppor1"/>
<field name="partner_id" ref="base.res_partner_9"/>
<field eval="&quot;3&quot;" name="priority"/>
<field name="user_id" ref="base.user_demo"/>
<field eval="&quot;open&quot;" name="state"/>
<field eval="45000.0" name="planned_revenue"/>
<field name="section_id" ref="crm.section_sales_department"/>
<field name="categ_id" ref="crm.categ_oppor5"/>
<field name="stage_id" ref="crm.stage_opportunity4"/>
<field eval="&quot;ABC FUEL CO 829264 - 1000 units &quot;" name="name"/>
<field eval="&quot;info@opensides.be&quot;" name="email_from"/>
</record>
<record id="crm_case_dirtminingltdunits0" model="crm.lead">
<field eval="80" name="probability"/>
<field name="partner_address_id" ref="base.res_partner_address_wong"/>
<field eval="1" name="active"/>
<field name="type">opportunity</field>
<field name="partner_id" ref="base.res_partner_maxtor"/>
<field eval="&quot;3&quot;" name="priority"/>
<field name="user_id" ref="base.user_root"/>
<field eval="&quot;done&quot;" name="state"/>
<field eval="42000.0" name="planned_revenue"/>
<field name="section_id" ref="crm.section_sales_department"/>
<field name="categ_id" ref="crm.categ_oppor2"/>
<field name="stage_id" ref="crm.stage_opportunity6"/>
<field eval="&quot;Dirt Mining Ltd 271742 - 1000 units&quot;" name="name"/>
</record>
</data>
</openerp>

View File

@ -1,68 +0,0 @@
<?xml version="1.0"?>
<openerp>
<data>
<act_window
id="act_crm_opportunity_crm_phonecall_new"
name="Phone calls"
groups="base.group_extended"
res_model="crm.phonecall"
src_model="crm.lead"
view_mode="tree,calendar,form"
context="{'default_duration': 1.0 ,'default_opportunity_id': active_id,'default_partner_phone':phone}"
domain="[('opportunity_id', '=', active_id)]"
view_type="form"/>
<act_window
id="act_crm_opportunity_crm_meeting_new"
name="Meetings"
res_model="crm.meeting"
src_model="crm.lead"
view_mode="tree,form,calendar,"
context="{'default_duration': 4.0, 'default_opportunity_id': active_id}"
domain="[('opportunity_id', '=', active_id)]"
view_type="form"/>
<record model="ir.actions.act_window" id="crm_case_category_act_oppor11">
<field name="name">Opportunities</field>
<field name="res_model">crm.lead</field>
<field name="view_mode">tree,form,graph,calendar</field>
<field name="domain">[('type','=','opportunity')]</field>
<field name="context">{'search_default_user_id':uid,'search_default_current':1, 'search_default_section_id':section_id, 'stage_type': 'opportunity'}</field>
<field name="view_id" ref="crm_case_tree_view_oppor"/>
<field name="search_view_id" ref="crm.view_crm_case_opportunities_filter"/>
<field name="help">With opportunities you can manage and keep track of your sales pipeline by creating specific customer- or prospect-related sales documents to follow up potential sales. Information such as expected revenue, opportunity stage, expected closing date, communication history and much more can be stored. Opportunities can be connected to the email gateway: new emails may create opportunities, each of them automatically gets the history of the conversation with the customer.
You and your team(s) will be able to plan meetings and phone calls from opportunities, convert them into quotations, manage related documents, track all customer related activities, and much more.</field>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_tree_view_oppor11">
<field name="sequence" eval="1"/>
<field name="view_mode">tree</field>
<field name="view_id" ref="crm_case_tree_view_oppor"/>
<field name="act_window_id" ref="crm_case_category_act_oppor11"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_form_view_oppor11">
<field name="sequence" eval="2"/>
<field name="view_mode">form</field>
<field name="view_id" ref="crm_case_form_view_oppor"/>
<field name="act_window_id" ref="crm_case_category_act_oppor11"/>
</record>
<record model="ir.actions.act_window.view" id="action_crm_tag_graph_view_oppor11">
<field name="sequence" eval="4"/>
<field name="view_mode">graph</field>
<field name="view_id" ref="crm_case_graph_view_opportunity"/>
<field name="act_window_id" ref="crm_case_category_act_oppor11"/>
</record>
<menuitem id="base.menu_sales" name="Sales"
parent="base.menu_base_partner" sequence="1" />
<menuitem name="Opportunities" id="menu_crm_case_opp"
parent="base.menu_sales" action="crm_case_category_act_oppor11"
sequence="2" />
</data>
</openerp>

View File

@ -1,363 +0,0 @@
<?xml version="1.0"?>
<openerp>
<data>
<!-- Opportunities Form View -->
<record model="ir.ui.view" id="crm_case_form_view_oppor">
<field name="name">Opportunities</field>
<field name="model">crm.lead</field>
<field name="type">form</field>
<field name="priority">10</field>
<field name="arch" type="xml">
<form string="Opportunities">
<group colspan="4" col="7">
<field name="name" required="1" string="Opportunity"/>
<label string="Stage:" align="1.0"/>
<group colspan="1" col="4">
<field name="stage_id" nolabel="1"
on_change="onchange_stage_id(stage_id)"
domain="[('type','=','opportunity'),('section_ids', '=', section_id)]"/>
<button name="stage_previous"
states="draft,open,pending" type="object"
icon="gtk-go-back" string="" context="{'stage_type': 'opportunity'}"/>
<button name="stage_next" states="draft,open,pending"
type="object" icon="gtk-go-forward" string="" context="{'stage_type': 'opportunity'}"/>
</group>
<field name="user_id"/>
<button string="Schedule/Log Call"
name="%(opportunity2phonecall_act)d" icon="terp-call-start" type="action" groups="base.group_extended"/>
<field name="planned_revenue"/>
<field name="probability"/>
<field name="date_deadline"/>
<button name="action_makeMeeting" type="object"
string="Schedule Meeting" icon="gtk-redo" />
<newline/>
<field name="date_action"/>
<field name="title_action"/>
<field name="priority" string="Priority"/>
<newline/>
<field name="type" invisible="1"/>
</group>
<notebook colspan="4">
<page string="Opportunity">
<group col="4" colspan="2">
<separator colspan="4" string="Contacts"/>
<group colspan="2">
<field name="partner_id" select="1"
on_change="onchange_partner_id(partner_id, email_from)" string="Customer"
colspan="2" />
<button name="%(action_crm_lead2partner)d"
icon="terp-partner" type="action"
string="Create"
attrs="{'invisible':[('partner_id','!=',False)]}"/>
</group>
<field name="partner_address_id"
string="Contact"
on_change="onchange_partner_address_id(partner_address_id, email_from)"
colspan="1" />
<group col="3" colspan="2">
<field name="email_from" string="Email" />
<button string="Mail"
name="%(crm.action_crm_send_mail)d"
context="{'mail':'new', 'model': 'crm.lead'}"
icon="terp-mail-message-new" type="action" />
</group>
<field name="phone"/>
</group>
<group col="2" colspan="2">
<separator colspan="2" string="Categorization"/>
<field name="section_id" colspan="1" widget="selection"/>
<field name="categ_id" select="1"
string="Category" widget="selection"
domain="[('object_id.model', '=', 'crm.lead')]" />
</group>
<separator colspan="4" string="Details"/>
<field name="description" nolabel="1" colspan="4"/>
<separator colspan="4"/>
<group col="10" colspan="4">
<field name="state"/>
<button name="case_cancel" string="Cancel"
states="draft" type="object"
icon="gtk-cancel" />
<button name="case_mark_lost" string="Mark Lost"
states="open,pending" type="object"
icon="gtk-cancel" />
<button name="case_reset" string="Reset to Draft"
states="done,cancel" type="object"
icon="gtk-convert" />
<button name="case_open" string="Open"
states="draft,pending" type="object"
icon="gtk-go-forward" />
<button name="case_pending" string="Pending"
states="draft,open" type="object"
icon="gtk-media-pause" />
<button name="case_escalate" string="Escalate"
states="open,pending" type="object"
groups="base.group_extended"
icon="gtk-go-up" />
<button name="case_close" string="Mark Won"
states="open,pending" type="object"
icon="gtk-apply" />
</group>
</page>
<page string="Lead">
<group colspan="2" col="4">
<separator string="Contact" colspan="4" col="4"/>
<field name="partner_name" string="Customer Name" colspan="4"/>
<newline/>
<field domain="[('domain', '=', 'contact')]" name="title" widget="selection"/>
<field name="function" />
<field name="street" colspan="4"/>
<field name="street2" colspan="4"/>
<field name="zip"/>
<field name="city"/>
<field name="country_id"/>
<field name="state_id"/>
</group>
<group colspan="2" col="2">
<separator string="Communication" colspan="2"/>
<field name="fax"/>
<field name="mobile"/>
</group>
<group colspan="2" col="2">
<separator string="Categorization" colspan="2"/>
<field name="type_id" widget="selection" groups="base.group_extended"/>
<field name="channel_id" widget="selection"/>
</group>
<group colspan="2" col="2">
<separator string="Mailings" colspan="2"/>
<field name="optin" on_change="on_change_optin(optin)"/>
<field name="optout" on_change="on_change_optout(optout)"/>
</group>
</page>
<page string="Communication &amp; History" groups="base.group_extended">
<group colspan="4">
<field colspan="4" name="email_cc" string="Global CC" widget="char" size="512"/>
</group>
<field name="message_ids" colspan="4" nolabel="1" mode="tree,form">
<tree string="History">
<field name="display_text" string="History Information"/>
<field name="history" invisible="1"/>
<button
string="Reply" attrs="{'invisible': [('history', '!=', True)]}"
name="%(crm.action_crm_send_mail)d"
context="{'mail':'reply', 'model': 'crm.lead', 'include_original' : True}"
icon="terp-mail-replied" type="action" />
</tree>
<form string="History">
<group col="4" colspan="4">
<field name="email_from"/>
<field name="date"/>
<field name="email_to" size="512"/>
<field name="email_cc" size="512"/>
<field name="name" colspan="4" widget="char" attrs="{'invisible': [('history', '=', False)]}" size="512"/>
<field name="display_text" colspan="4" attrs="{'invisible': [('history', '=', True)]}"/>
<field name="history" invisible="1"/>
</group>
<notebook colspan="4">
<page string="Details">
<field name="description" colspan="4" nolabel="1"/>
<group attrs="{'invisible': [('history', '!=', True)]}">
<button colspan="4"
string="Reply"
name="%(crm.action_crm_send_mail)d"
context="{'mail':'reply', 'model': 'crm.lead', 'include_original' : True}"
icon="terp-mail-replied" type="action" />
</group>
</page>
<page string="Attachments">
<field name="attachment_ids" colspan="4" readonly="1" nolabel="1"/>
</page>
</notebook>
</form>
</field>
<button string="Add Internal Note"
name="%(crm.action_crm_add_note)d"
context="{'model': 'crm.lead' }"
icon="terp-document-new" type="action" />
<button string="Send New Email"
name="%(crm.action_crm_send_mail)d"
context="{'mail':'new', 'model': 'crm.lead'}"
icon="terp-mail-message-new" type="action" />
</page>
<page string="Extra Info" groups="base.group_extended">
<group col="2" colspan="2">
<separator string="Dates" colspan="2"/>
<field name="create_date"/>
<field name="write_date"/>
<field name="date_closed"/>
<field name="date_open"/>
</group>
<group col="2" colspan="2">
<separator string="Misc" colspan="2"/>
<field name="active"/>
<field name="day_open"/>
<field name="day_close"/>
<field name="referred"/>
</group>
<separator colspan="4" string="References"/>
<field name="ref"/>
<field name="ref2"/>
</page>
</notebook>
</form>
</field>
</record>
<!-- Opportunities Tree View -->
<record model="ir.ui.view" id="crm_case_tree_view_oppor">
<field name="name">Opportunities Tree</field>
<field name="model">crm.lead</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Opportunities" colors="blue:state=='pending' and not(date_deadline and (date_deadline &lt; current_date));gray:state in ('cancel', 'done');red:date_deadline and (date_deadline &lt; current_date)">
<field name="date_deadline" invisible="1"/>
<field name="create_date"/>
<field name="name" string="Opportunity"/>
<field name="partner_id" string="Customer"/>
<field name="country_id" invisible="context.get('invisible_country', True)" />
<field name="date_action"/>
<field name="title_action" />
<field name="stage_id"/>
<field name="channel_id" invisible="1"/>
<field name="type_id" invisible="1"/>
<field name="subjects" invisible="1"/>
<button name="stage_previous" string="Previous Stage"
states="open,pending" type="object" icon="gtk-go-back" />
<button name="stage_next" string="Next Stage"
states="open,pending" type="object"
icon="gtk-go-forward" />
<field name="planned_revenue" sum="Expected Revenues"/>
<field name="probability" widget="progressbar" avg="Avg. of Probability"/>
<field name="section_id"
invisible="context.get('invisible_section', True)" />
<field name="user_id"/>
<field name="priority" invisible="1"/>
<field name="categ_id" invisible="1"/>
<field name="state"/>
<button name="case_open" string="Open"
states="draft,pending" type="object"
icon="gtk-go-forward" />
<button name="case_pending" string="Pending"
states="open,draft" type="object"
icon="gtk-media-pause" />
<button name="case_close" string="Won"
states="open,draft,pending" type="object"
icon="gtk-apply" />
</tree>
</field>
</record>
<!-- Opportunities Graph View -->
<record model="ir.ui.view" id="crm_case_graph_view_opportunity">
<field name="name">CRM - Opportunity Graph</field>
<field name="model">crm.lead</field>
<field name="type">graph</field>
<field name="arch" type="xml">
<graph string="Opportunity by Categories" type="bar" orientation="horizontal">
<field name="categ_id"/>
<field name="planned_revenue" operator="+"/>
<field name="state" group="True"/>
</graph>
</field>
</record>
<!-- Opportunities Search View -->
<record id="view_crm_case_opportunities_filter" model="ir.ui.view">
<field name="name">CRM - Opportunities Search</field>
<field name="model">crm.lead</field>
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Search Opportunities">
<filter icon="terp-check"
string="Current" help="Draft, Open and Pending Opportunities"
name="current"
domain="[('state','in',('draft','open','pending'))]"/>
<filter icon="terp-camera_test"
string="Open" help="Open Opportunities"
domain="[('state','=','open')]"/>
<filter icon="terp-gtk-media-pause"
string="Pending" help="Pending Opportunities"
domain="[('state','=','pending')]"/>
<separator orientation="vertical"/>
<field name="name" string="Opportunity"/>
<field name="partner_id" string="Customer / Email" filter_domain="['|','|',('partner_id','ilike',self),('partner_name','ilike',self),('email_from','ilike',self)]"/>
<field name="user_id">
<filter icon="terp-personal-"
domain="[('user_id','=', False)]"
help="Unassigned Opportunities" />
</field>
<field name="section_id"
context="{'invisible_section': False}"
widget="selection">
<filter icon="terp-personal+" groups="base.group_extended"
domain="['|', ('section_id', '=', context.get('section_id')), '|', ('section_id.user_id','=',uid), ('section_id.member_ids', 'in', [uid])]"
context="{'invisible_section': False}"
help="My Sales Team(s)" />
<filter icon="terp-personal+" groups="base.group_extended"
context="{'invisible_section': False}"
domain="[]"
help="Show Sales Team"/>
</field>
<newline/>
<group expand="0" string="Group By..." colspan="16">
<filter string="Salesman" icon="terp-personal"
domain="[]" context="{'group_by':'user_id'}" />
<filter string="Team" help="Sales Team" icon="terp-personal+" domain="[]" context="{'group_by':'section_id'}"/>
<filter string="Customer" help="Partner" icon="terp-personal+" domain="[]" context="{'group_by':'partner_id'}"/>
<separator orientation="vertical" />
<filter string="Stage" icon="terp-stage" domain="[]"
context="{'group_by':'stage_id'}" />
<filter string="Priority" icon="terp-rating-rated" domain="[]"
context="{'group_by':'priority'}" />
<filter string="Category" icon="terp-stock_symbol-selection"
domain="[]" context="{'group_by':'categ_id'}" />
<filter string="Campaign" icon="terp-gtk-jump-to-rtl"
domain="[]" context="{'group_by':'type_id'}" groups="base.group_extended"/>
<filter string="Channel" icon="terp-call-start"
domain="[]" context="{'group_by':'channel_id'}" />
<filter string="State" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
<separator orientation="vertical" />
<filter string="Creation" icon="terp-go-month"
domain="[]" context="{'group_by':'create_date'}" />
<filter string="Exp.Closing"
icon="terp-go-month"
help="Expected Closing" domain="[]"
context="{'group_by':'date_deadline'}" />
</group>
</search>
</field>
</record>
<!-- Opportunities Graph View -->
<record model="ir.ui.view" id="crm_case_graph_view_opportunity">
<field name="name">CRM - Opportunity Graph</field>
<field name="model">crm.lead</field>
<field name="type">graph</field>
<field name="arch" type="xml">
<graph string="Opportunity by Categories" type="bar" orientation="horizontal">
<field name="categ_id"/>
<field name="planned_revenue" operator="+"/>
<field name="state" group="True"/>
</graph>
</field>
</record>
</data>
</openerp>

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