[MERGE] merge with latest trunk

bzr revid: rma@tinyerp.com-20130607044638-8m2dnk0kcjsda8ks
This commit is contained in:
Randhir Mayatra (OpenERP) 2013-06-07 10:16:38 +05:30
commit c3fd3ce311
191 changed files with 6516 additions and 1540 deletions

View File

@ -1034,9 +1034,15 @@ class account_period(osv.osv):
context = {}
ids = []
if name:
ids = self.search(cr, user, [('code','ilike',name)]+ args, limit=limit)
ids = self.search(cr, user,
[('code', 'ilike', name)] + args,
limit=limit,
context=context)
if not ids:
ids = self.search(cr, user, [('name',operator,name)]+ args, limit=limit)
ids = self.search(cr, user,
[('name', operator, name)] + args,
limit=limit,
context=context)
return self.name_get(cr, user, ids, context=context)
def write(self, cr, uid, ids, vals, context=None):
@ -1059,10 +1065,14 @@ class account_period(osv.osv):
raise osv.except_osv(_('Error!'), _('You should choose the periods that belong to the same company.'))
if period_date_start > period_date_stop:
raise osv.except_osv(_('Error!'), _('Start period should precede then end period.'))
# /!\ We do not include a criterion on the company_id field below, to allow producing consolidated reports
# on multiple companies. It will only work when start/end periods are selected and no fiscal year is chosen.
#for period from = january, we want to exclude the opening period (but it has same date_from, so we have to check if period_from is special or not to include that clause or not in the search).
if period_from.special:
return self.search(cr, uid, [('date_start', '>=', period_date_start), ('date_stop', '<=', period_date_stop), ('company_id', '=', company1_id)])
return self.search(cr, uid, [('date_start', '>=', period_date_start), ('date_stop', '<=', period_date_stop), ('company_id', '=', company1_id), ('special', '=', False)])
return self.search(cr, uid, [('date_start', '>=', period_date_start), ('date_stop', '<=', period_date_stop)])
return self.search(cr, uid, [('date_start', '>=', period_date_start), ('date_stop', '<=', period_date_stop), ('special', '=', False)])
class account_journal_period(osv.osv):
@ -1854,6 +1864,12 @@ class account_tax_code(osv.osv):
_order = 'code'
def get_precision_tax():
def change_digit_tax(cr):
res = openerp.registry(cr.dbname)['decimal.precision'].precision_get(cr, SUPERUSER_ID, 'Account')
return (16, res+3)
return change_digit_tax
class account_tax(osv.osv):
"""
A tax object.
@ -1874,12 +1890,6 @@ class account_tax(osv.osv):
default.update({'name': name + _(' (Copy)')})
return super(account_tax, self).copy_data(cr, uid, id, default=default, context=context)
def get_precision_tax():
def change_digit_tax(cr):
res = openerp.registry(cr.dbname)['decimal.precision'].precision_get(cr, SUPERUSER_ID, 'Account')
return (16, res+2)
return change_digit_tax
_name = 'account.tax'
_description = 'Tax'
_columns = {
@ -2795,7 +2805,7 @@ class account_tax_template(osv.osv):
'chart_template_id': fields.many2one('account.chart.template', 'Chart Template', required=True),
'name': fields.char('Tax Name', size=64, required=True),
'sequence': fields.integer('Sequence', required=True, help="The sequence field is used to order the taxes lines from lower sequences to higher ones. The order is important if you have a tax that has several tax children. In this case, the evaluation order is important."),
'amount': fields.float('Amount', required=True, digits=(14,4), help="For Tax Type percent enter % ratio between 0-1."),
'amount': fields.float('Amount', required=True, digits_compute=get_precision_tax(), help="For Tax Type percent enter % ratio between 0-1."),
'type': fields.selection( [('percent','Percent'), ('fixed','Fixed'), ('none','None'), ('code','Python Code'), ('balance','Balance')], 'Tax Type', required=True),
'applicable_type': fields.selection( [('true','True'), ('code','Python Code')], 'Applicable Type', required=True, help="If not applicable (computed through a Python code), the tax won't appear on the invoice."),
'domain':fields.char('Domain', size=32, help="This field is only used if you develop your own module allowing developers to create specific taxes in a custom domain."),

View File

@ -89,13 +89,43 @@ class account_invoice(osv.osv):
return [('none', _('Free Reference'))]
def _amount_residual(self, cr, uid, ids, name, args, context=None):
"""Function of the field residua. It computes the residual amount (balance) for each invoice"""
if context is None:
context = {}
ctx = context.copy()
result = {}
currency_obj = self.pool.get('res.currency')
for invoice in self.browse(cr, uid, ids, context=context):
nb_inv_in_partial_rec = max_invoice_id = 0
result[invoice.id] = 0.0
if invoice.move_id:
for m in invoice.move_id.line_id:
if m.account_id.type in ('receivable','payable'):
result[invoice.id] += m.amount_residual_currency
for aml in invoice.move_id.line_id:
if aml.account_id.type in ('receivable','payable'):
if aml.currency_id and aml.currency_id.id == invoice.currency_id.id:
result[invoice.id] += aml.amount_residual_currency
else:
ctx['date'] = aml.date
result[invoice.id] += currency_obj.compute(cr, uid, aml.company_id.currency_id.id, invoice.currency_id.id, aml.amount_residual, context=ctx)
if aml.reconcile_partial_id.line_partial_ids:
#we check if the invoice is partially reconciled and if there are other invoices
#involved in this partial reconciliation (and we sum these invoices)
for line in aml.reconcile_partial_id.line_partial_ids:
if line.invoice:
nb_inv_in_partial_rec += 1
#store the max invoice id as for this invoice we will make a balance instead of a simple division
max_invoice_id = max(max_invoice_id, line.invoice.id)
if nb_inv_in_partial_rec:
#if there are several invoices in a partial reconciliation, we split the residual by the number
#of invoice to have a sum of residual amounts that matches the partner balance
new_value = currency_obj.round(cr, uid, invoice.currency_id, result[invoice.id] / nb_inv_in_partial_rec)
if invoice.id == max_invoice_id:
#if it's the last the invoice of the bunch of invoices partially reconciled together, we make a
#balance to avoid rounding errors
result[invoice.id] = result[invoice.id] - ((nb_inv_in_partial_rec - 1) * new_value)
else:
result[invoice.id] = new_value
#prevent the residual amount on the invoice to be less than 0
result[invoice.id] = max(result[invoice.id], 0.0)
return result
@ -1460,6 +1490,7 @@ class account_invoice_line(osv.osv):
result = {}
res = self.pool.get('product.product').browse(cr, uid, product, context=context)
result['name'] = res.partner_ref
if type in ('out_invoice','out_refund'):
a = res.property_account_income.id
if not a:
@ -1474,19 +1505,21 @@ class account_invoice_line(osv.osv):
if type in ('out_invoice', 'out_refund'):
taxes = res.taxes_id and res.taxes_id or (a and self.pool.get('account.account').browse(cr, uid, a, context=context).tax_ids or False)
if res.description_sale:
result['name'] += '\n'+res.description_sale
else:
taxes = res.supplier_taxes_id and res.supplier_taxes_id or (a and self.pool.get('account.account').browse(cr, uid, a, context=context).tax_ids or False)
if res.description_purchase:
result['name'] += '\n'+res.description_purchase
tax_id = fpos_obj.map_tax(cr, uid, fpos, taxes)
if type in ('in_invoice', 'in_refund'):
result.update( {'price_unit': price_unit or res.standard_price,'invoice_line_tax_id': tax_id} )
else:
result.update({'price_unit': res.list_price, 'invoice_line_tax_id': tax_id})
result['name'] = res.partner_ref
result['uos_id'] = uom_id or res.uom_id.id
if res.description:
result['name'] += '\n'+res.description
domain = {'uos_id':[('category_id','=',res.uom_id.category_id.id)]}

View File

@ -197,7 +197,7 @@
<field name="name"/>
<field name="company_id" invisible="1"/>
<field name="account_id" groups="account.group_account_user"
domain="[('company_id', '=', parent.company_id), ('journal_id', '=', parent.journal_id), ('type', '!=', 'view')]"
domain="[('company_id', '=', parent.company_id), ('journal_id', '=', parent.journal_id), ('type', '=', 'other')]"
on_change="onchange_account_id(product_id, parent.partner_id, parent.type, parent.fiscal_position,account_id)"/>
<field name="account_analytic_id" groups="analytic.group_analytic_accounting"
domain="[('type','!=','view'), ('company_id', '=', parent.company_id)]"/>
@ -320,7 +320,7 @@
<group>
<field string="Customer" name="partner_id"
on_change="onchange_partner_id(type,partner_id,date_invoice,payment_term, partner_bank_id,company_id)"
groups="base.group_user" context="{'search_default_customer':1, 'show_address': 1}"
context="{'search_default_customer':1, 'show_address': 1}"
options='{"always_reload": True}'
domain="[('customer', '=', True)]"/>
<field name="fiscal_position" widget="selection" />
@ -353,7 +353,7 @@
<field name="name"/>
<field name="company_id" invisible="1"/>
<field name="account_id" groups="account.group_account_user"
domain="[('company_id', '=', parent.company_id), ('journal_id', '=', parent.journal_id), ('type', '!=', 'view')]"
domain="[('company_id', '=', parent.company_id), ('journal_id', '=', parent.journal_id), ('type', '=', 'other')]"
on_change="onchange_account_id(product_id, parent.partner_id, parent.type, parent.fiscal_position,account_id)"/>
<field name="account_analytic_id" groups="analytic.group_analytic_accounting"
domain="[('type','!=','view'), ('company_id', '=', parent.company_id)]"/>

View File

@ -907,9 +907,7 @@
<label for="type"/>
<div>
<field name="type"/>
<field name="amount" class="oe_inline"
attrs="{'invisible':[('type','in',('none', 'code', 'balance'))]}"/>
<label string="%%" attrs="{'invisible':[('type','&lt;&gt;','percent')]}"/>
<field name="amount" attrs="{'invisible':[('type','in',('none', 'code', 'balance'))]}"/>
</div>
<field name="python_compute" attrs="{'invisible':[('type','!=','code')],'required':[('type','=','code')]}"/>
<field name="python_compute_inv" attrs="{'invisible':[('type','!=','code')],'required':[('type','=','code')]}"/>

View File

@ -313,8 +313,8 @@
<field name="code">TSAJ</field>
<field name="type">sale</field>
<field name="sequence_id" ref="sequence_sale_journal"/>
<field model="account.account" name="default_credit_account_id" ref="a_sale"/>
<field model="account.account" name="default_debit_account_id" ref="a_sale"/>
<field name="default_credit_account_id" ref="a_sale"/>
<field name="default_debit_account_id" ref="a_sale"/>
<field name="analytic_journal_id" ref="cose_journal_sale"/>
<field name="user_id" ref="base.user_root"/>
</record>
@ -323,8 +323,8 @@
<field name="code">TSCNJ</field>
<field name="type">sale_refund</field>
<field name="sequence_id" ref="sequence_refund_sales_journal"/>
<field model="account.account" name="default_credit_account_id" ref="a_sale"/>
<field model="account.account" name="default_debit_account_id" ref="a_sale"/>
<field name="default_credit_account_id" ref="a_sale"/>
<field name="default_debit_account_id" ref="a_sale"/>
<field name="analytic_journal_id" ref="cose_journal_sale"/>
<field name="user_id" ref="base.user_root"/>
</record>
@ -334,8 +334,8 @@
<field name="code">TEXJ</field>
<field name="type">purchase</field>
<field name="sequence_id" ref="sequence_purchase_journal"/>
<field model="account.account" name="default_debit_account_id" ref="a_expense"/>
<field model="account.account" name="default_credit_account_id" ref="a_expense"/>
<field name="default_debit_account_id" ref="a_expense"/>
<field name="default_credit_account_id" ref="a_expense"/>
<field name="analytic_journal_id" ref="exp"/>
<field name="user_id" ref="base.user_root"/>
</record>
@ -344,8 +344,8 @@
<field name="code">TECNJ</field>
<field name="type">purchase_refund</field>
<field name="sequence_id" ref="sequence_refund_purchase_journal"/>
<field model="account.account" name="default_debit_account_id" ref="a_expense"/>
<field model="account.account" name="default_credit_account_id" ref="a_expense"/>
<field name="default_debit_account_id" ref="a_expense"/>
<field name="default_credit_account_id" ref="a_expense"/>
<field name="analytic_journal_id" ref="exp"/>
<field name="user_id" ref="base.user_root"/>
</record>
@ -355,8 +355,8 @@
<field name="code">TBNK</field>
<field name="type">bank</field>
<field name="sequence_id" ref="sequence_bank_journal"/>
<field model="account.account" name="default_debit_account_id" ref="bnk"/>
<field model="account.account" name="default_credit_account_id" ref="bnk"/>
<field name="default_debit_account_id" ref="bnk"/>
<field name="default_credit_account_id" ref="bnk"/>
<field name="analytic_journal_id" ref="sit"/>
<field name="user_id" ref="base.user_root"/>
</record>
@ -365,8 +365,8 @@
<field name="code">TCHK</field>
<field name="type">bank</field>
<field name="sequence_id" ref="sequence_check_journal"/>
<field model="account.account" name="default_debit_account_id" ref="cash"/>
<field model="account.account" name="default_credit_account_id" ref="cash"/>
<field name="default_debit_account_id" ref="cash"/>
<field name="default_credit_account_id" ref="cash"/>
<field name="analytic_journal_id" ref="sit"/>
<field name="user_id" ref="base.user_root"/>
</record>
@ -374,9 +374,9 @@
<field name="name">Cash Journal - (test)</field>
<field name="code">TCSH</field>
<field name="type">cash</field>
<field name="profit_account_id" model="account.account" ref="rsa" />
<field name="loss_account_id" model="account.account" ref="rsa" />
<field name="internal_account_id" model="account.account" ref="rsa" />
<field name="profit_account_id" ref="rsa" />
<field name="loss_account_id" ref="rsa" />
<field name="internal_account_id" ref="rsa" />
<field name="with_last_closing_balance" eval="True" />
<!--
Usually, cash payment methods requires a control at opening and closing.
@ -385,8 +385,8 @@
-->
<field name="cash_control" eval="False"/>
<field name="sequence_id" ref="sequence_cash_journal"/>
<field model="account.account" name="default_debit_account_id" ref="cash"/>
<field model="account.account" name="default_credit_account_id" ref="cash"/>
<field name="default_debit_account_id" ref="cash"/>
<field name="default_credit_account_id" ref="cash"/>
<field name="analytic_journal_id" ref="sit"/>
<field name="user_id" ref="base.user_root"/>
</record>
@ -403,8 +403,8 @@
<field name="code">TOEJ</field>
<field name="type">situation</field>
<field name="sequence_id" ref="sequence_opening_journal"/>
<field model="account.account" name="default_debit_account_id" ref="o_income"/>
<field model="account.account" name="default_credit_account_id" ref="o_expense"/>
<field name="default_debit_account_id" ref="o_income"/>
<field name="default_credit_account_id" ref="o_expense"/>
<field eval="True" name="centralisation"/>
<field name="user_id" ref="base.user_root"/>
</record>
@ -413,8 +413,8 @@
<field name="name">USD Bank Journal - (test)</field>
<field name="code">TUBK</field>
<field name="type">bank</field>
<field model="account.account" name="default_debit_account_id" ref="usd_bnk"/>
<field model="account.account" name="default_credit_account_id" ref="usd_bnk"/>
<field name="default_debit_account_id" ref="usd_bnk"/>
<field name="default_credit_account_id" ref="usd_bnk"/>
<field name="currency" ref="base.USD"/>
</record>
<!--

View File

@ -7,7 +7,6 @@
<a href="https://www.openerp.com/saas_master/demo?lang=en_US&module=account">
<img src="account_sc_00.png" alt="Online Demo">
</a>
<span class="oe_demo_play">&nbsp;</span>
<div class="oe_demo_footer oe_centeralign">Online Demo</div>
</div>
</div>

View File

@ -7,14 +7,14 @@ msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2012-12-21 17:04+0000\n"
"PO-Revision-Date: 2013-05-29 13:04+0000\n"
"PO-Revision-Date: 2013-06-05 13:02+0000\n"
"Last-Translator: Chertykov Denis <chertykov@gmail.com>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2013-05-30 05:45+0000\n"
"X-Generator: Launchpad (build 16652)\n"
"X-Launchpad-Export-Date: 2013-06-06 05:21+0000\n"
"X-Generator: Launchpad (build 16667)\n"
#. module: account
#: model:process.transition,name:account.process_transition_supplierreconcilepaid0
@ -465,7 +465,7 @@ msgstr "Шаблона плана счетов"
#. module: account
#: selection:account.invoice.refund,filter_refund:0
msgid "Modify: create refund, reconcile and create a new draft invoice"
msgstr ""
msgstr "Изменить: создать возврат, сверить и создать новый счет"
#. module: account
#: help:account.config.settings,tax_calculation_rounding_method:0
@ -704,6 +704,8 @@ msgid ""
"Invoice_${(object.number or '').replace('/','_')}_${object.state == 'draft' "
"and 'draft' or ''}"
msgstr ""
"Invoice_${(object.number or '').replace('/','_')}_${object.state == 'draft' "
"and 'draft' or ''}"
#. module: account
#: view:account.period:0
@ -731,6 +733,8 @@ msgstr "Период журнала"
msgid ""
"You cannot create more than one move per period on a centralized journal."
msgstr ""
"Вы не можете создать более одного движения за период в централизованном "
"журнале."
#. module: account
#: help:account.tax,account_analytic_paid_id:0
@ -911,6 +915,7 @@ msgid ""
"Print Report with the currency column if the currency differs from the "
"company currency."
msgstr ""
"Печать отчета с колонкой валюты, если валюта отличается от валюты компании."
#. module: account
#: report:account.analytic.account.quantity_cost_ledger:0
@ -950,6 +955,10 @@ msgid ""
" </p>\n"
" "
msgstr ""
"<p>\n"
" Элементы журнала не найдены.\n"
" </p>\n"
" "
#. module: account
#: code:addons/account/account.py:1639
@ -1039,7 +1048,7 @@ msgstr "Обязательства"
#: code:addons/account/account_invoice.py:867
#, python-format
msgid "Please define sequence on the journal related to this invoice."
msgstr ""
msgstr "Пожалуйста, определите нумерацию в журнале, связанном с этим счетом."
#. module: account
#: view:account.entries.report:0
@ -1517,6 +1526,9 @@ msgid ""
"And after getting confirmation from the bank it will be in 'Confirmed' "
"status."
msgstr ""
"Когда новый отчет создан - статус станет \"Черновик\".\n"
"После получения подтверждения из банка, статус измениться на \" "
"Подтверждено\"."
#. module: account
#: field:account.invoice.report,state:0
@ -1560,6 +1572,8 @@ msgid ""
"There is no default debit account defined \n"
"on journal \"%s\"."
msgstr ""
"Дебетовый счет по умолчанию не определен\n"
"в журнале \"%s\"."
#. module: account
#: view:account.tax:0
@ -1662,7 +1676,7 @@ msgstr ""
#. module: account
#: field:account.config.settings,company_footer:0
msgid "Bank accounts footer preview"
msgstr ""
msgstr "Просмотр нижнего колонтитула банковских счетов"
#. module: account
#: selection:account.account,type:0

View File

@ -68,7 +68,7 @@
name="%(account.action_invoice_tree)d"
context="{'search_default_partner_id': active_id,'default_partner_id': active_id}" groups="account.group_account_invoice"/>
<button type="action" string="Journal Items" name="%(account.action_account_moves_all_tree)d" groups="account.group_account_user"/>
<button type="action" string="Contracts/Analytic Accounts" name="%(account.action_open_partner_analytic_accounts)d"
<button type="action" string="Contracts" name="%(account.action_open_partner_analytic_accounts)d"
groups="analytic.group_analytic_accounting"/>
</xpath>
</field>

View File

@ -123,24 +123,24 @@
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Confirm statement&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;The accountant confirms the statement.&quot;&quot;&quot;" name="note"/>
<field model="process.node" name="target_node_id" ref="process_node_accountingstatemententries0"/>
<field model="process.node" name="source_node_id" ref="account.process_node_draftstatement0"/>
<field name="target_node_id" ref="process_node_accountingstatemententries0"/>
<field name="source_node_id" ref="account.process_node_draftstatement0"/>
</record>
<record id="process_transition_analyticinvoice0" model="process.transition">
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;From analytic accounts&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Analytic costs (timesheets, some purchased products, ...) come from analytic accounts. These generate draft invoices.&quot;&quot;&quot;" name="note"/>
<field model="process.node" name="target_node_id" ref="process_node_draftinvoices0"/>
<field model="process.node" name="source_node_id" ref="process_node_analytic0"/>
<field name="target_node_id" ref="process_node_draftinvoices0"/>
<field name="source_node_id" ref="process_node_analytic0"/>
</record>
<record id="process_transition_customerinvoice0" model="process.transition">
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Validation&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Draft invoices are checked, validated and printed.&quot;&quot;&quot;" name="note"/>
<field model="process.node" name="target_node_id" ref="process_node_invoiceinvoice0"/>
<field model="process.node" name="source_node_id" ref="process_node_draftinvoices0"/>
<field name="target_node_id" ref="process_node_invoiceinvoice0"/>
<field name="source_node_id" ref="process_node_draftinvoices0"/>
<field eval="[(6,0,[ref('account.pro2_to_open')])]" name="transition_ids"/>
</record>
@ -148,40 +148,40 @@
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Validation&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Accountant validates the accounting entries coming from the invoice.&quot;&quot;&quot;" name="note"/>
<field model="process.node" name="target_node_id" ref="process_node_accountingentries0"/>
<field model="process.node" name="source_node_id" ref="process_node_invoiceinvoice0"/>
<field name="target_node_id" ref="process_node_accountingentries0"/>
<field name="source_node_id" ref="process_node_invoiceinvoice0"/>
</record>
<record id="process_transition_entriesreconcile0" model="process.transition">
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Accounting entries&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Accounting entries are the first input of the reconciliation.&quot;&quot;&quot;" name="note"/>
<field model="process.node" name="target_node_id" ref="process_node_reconciliation0"/>
<field model="process.node" name="source_node_id" ref="process_node_accountingentries0"/>
<field name="target_node_id" ref="process_node_reconciliation0"/>
<field name="source_node_id" ref="process_node_accountingentries0"/>
</record>
<record id="process_transition_statemententries0" model="process.transition">
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Validation&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Manual or automatic creation of payment entries according to the statements&quot;&quot;&quot;" name="note"/>
<field model="process.node" name="target_node_id" ref="process_node_paymententries0"/>
<field model="process.node" name="source_node_id" ref="process_node_bankstatement0"/>
<field name="target_node_id" ref="process_node_paymententries0"/>
<field name="source_node_id" ref="process_node_bankstatement0"/>
</record>
<record id="process_transition_paymentreconcile0" model="process.transition">
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Payment entries&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Payment entries are the second input of the reconciliation.&quot;&quot;&quot;" name="note"/>
<field model="process.node" name="target_node_id" ref="process_node_reconciliation0"/>
<field model="process.node" name="source_node_id" ref="process_node_paymententries0"/>
<field name="target_node_id" ref="process_node_reconciliation0"/>
<field name="source_node_id" ref="process_node_paymententries0"/>
</record>
<record id="process_transition_reconcilepaid0" model="process.transition">
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Payment&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;As soon as the reconciliation is done, the invoice can be paid.&quot;&quot;&quot;" name="note"/>
<field model="process.node" name="target_node_id" ref="process_node_paidinvoice0"/>
<field model="process.node" name="source_node_id" ref="process_node_reconciliation0"/>
<field name="target_node_id" ref="process_node_paidinvoice0"/>
<field name="source_node_id" ref="process_node_reconciliation0"/>
</record>
<!--

View File

@ -68,8 +68,8 @@
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Automatic import of the bank statement&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Import of the statement in the system from an electronic file&quot;&quot;&quot;" name="note"/>
<field model="process.node" name="target_node_id" ref="process_node_draftstatement0"/>
<field model="process.node" name="source_node_id" ref="process_node_electronicfile0"/>
<field name="target_node_id" ref="process_node_draftstatement0"/>
<field name="source_node_id" ref="process_node_electronicfile0"/>
</record>
<record id="process_transition_invoicemanually0" model="process.transition">
@ -77,17 +77,17 @@
<field eval="&quot;&quot;&quot;Manual entry&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;A statement with manual entries becomes a draft statement.&quot;&quot;&quot;" name="note"/>
<field model="process.node" name="target_node_id" ref="process_node_draftstatement0"/>
<field model="process.node" name="source_node_id" ref="process_node_manually0"/>
<field name="target_node_id" ref="process_node_draftstatement0"/>
<field name="source_node_id" ref="process_node_manually0"/>
</record>
<record id="process_transition_invoiceimport0" model="process.transition">
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Import from invoice or payment&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Import of the statement in the system from a supplier or customer invoice&quot;&quot;&quot;" name="note"/>
<field model="process.node" name="target_node_id" ref="process_node_draftstatement0"/>
<field model="process.node" name="source_node_id" ref="process_node_importinvoice0"/>
<field name="target_node_id" ref="process_node_draftstatement0"/>
<field name="source_node_id" ref="process_node_importinvoice0"/>
</record>
</data>
</openerp>
</openerp>

View File

@ -111,16 +111,16 @@
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;From analytic accounts&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Analytic costs (timesheets, some purchased products, ...) come from analytic accounts. These generate draft supplier invoices.&quot;&quot;&quot;" name="note"/>
<field model="process.node" name="target_node_id" ref="process_node_supplierdraftinvoices0"/>
<field model="process.node" name="source_node_id" ref="process_node_analyticcost0"/>
<field name="target_node_id" ref="process_node_supplierdraftinvoices0"/>
<field name="source_node_id" ref="process_node_analyticcost0"/>
</record>
<record id="process_transition_suppliercustomerinvoice0" model="process.transition">
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Validation&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Draft invoices are validated. &quot;&quot;&quot;" name="note"/>
<field model="process.node" name="target_node_id" ref="process_node_supplierinvoiceinvoice0"/>
<field model="process.node" name="source_node_id" ref="process_node_supplierdraftinvoices0"/>
<field name="target_node_id" ref="process_node_supplierinvoiceinvoice0"/>
<field name="source_node_id" ref="process_node_supplierdraftinvoices0"/>
<field eval="[(6,0,[ref('account.pro2_to_open')])]" name="transition_ids"/>
</record>
@ -128,40 +128,40 @@
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Validation&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Accountant validates the accounting entries coming from the invoice. &quot;&quot;&quot;" name="note"/>
<field model="process.node" name="target_node_id" ref="process_node_supplieraccountingentries0"/>
<field model="process.node" name="source_node_id" ref="process_node_supplierinvoiceinvoice0"/>
<field name="target_node_id" ref="process_node_supplieraccountingentries0"/>
<field name="source_node_id" ref="process_node_supplierinvoiceinvoice0"/>
</record>
<record id="process_transition_supplierentriesreconcile0" model="process.transition">
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Accounting entries&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Accounting entries are an input of the reconciliation.&quot;&quot;&quot;" name="note"/>
<field model="process.node" name="target_node_id" ref="process_node_supplierreconciliation0"/>
<field model="process.node" name="source_node_id" ref="process_node_supplieraccountingentries0"/>
<field name="target_node_id" ref="process_node_supplierreconciliation0"/>
<field name="source_node_id" ref="process_node_supplieraccountingentries0"/>
</record>
<record id="process_transition_paymentorderbank0" model="process.transition">
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Payment entries&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;The payment order is sent to the bank.&quot;&quot;&quot;" name="note"/>
<field model="process.node" name="target_node_id" ref="process_node_supplierbankstatement0"/>
<field model="process.node" name="source_node_id" ref="process_node_supplierpaymentorder0"/>
<field name="target_node_id" ref="process_node_supplierbankstatement0"/>
<field name="source_node_id" ref="process_node_supplierpaymentorder0"/>
</record>
<record id="process_transition_paymentorderreconcilation0" model="process.transition">
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Validation&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Bank statements are entered in the system.&quot;&quot;&quot;" name="note"/>
<field model="process.node" name="target_node_id" ref="process_node_supplierreconciliation0"/>
<field model="process.node" name="source_node_id" ref="process_node_supplierbankstatement0"/>
<field name="target_node_id" ref="process_node_supplierreconciliation0"/>
<field name="source_node_id" ref="process_node_supplierbankstatement0"/>
</record>
<record id="process_transition_supplierreconcilepaid0" model="process.transition">
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;System payment&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;As soon as the reconciliation is done, the invoice's state turns to “done” (i.e. paid) in the system.&quot;&quot;&quot;" name="note"/>
<field model="process.node" name="target_node_id" ref="process_node_supplierpaidinvoice0"/>
<field model="process.node" name="source_node_id" ref="process_node_supplierreconciliation0"/>
<field name="target_node_id" ref="process_node_supplierpaidinvoice0"/>
<field name="source_node_id" ref="process_node_supplierreconciliation0"/>
</record>
</data>

View File

@ -11,11 +11,11 @@
<page string="Accounting" groups="account.group_account_invoice">
<group name="properties">
<group>
<field name="property_account_income" domain="[('type','&lt;&gt;','view'),('type','&lt;&gt;','consolidation')]" groups="account.group_account_user"/>
<field name="property_account_income" domain="[('type','=','other')]" groups="account.group_account_user"/>
<field name="taxes_id" colspan="2" attrs="{'readonly':[('sale_ok','=',0)]}" widget="many2many_tags"/>
</group>
<group>
<field name="property_account_expense" domain="[('type','&lt;&gt;','view'),('type','&lt;&gt;','consolidation')]" groups="account.group_account_user"/>
<field name="property_account_expense" domain="[('type','=','other')]" groups="account.group_account_user"/>
<field name="supplier_taxes_id" colspan="2" widget="many2many_tags"/>
</group>
</group>

View File

@ -68,6 +68,7 @@
<field name="parent_id" invisible="1"/>
<field name="type"/>
<field name="company_id" groups="base.group_multi_company"/>
<field name="template_id" invisible="1"/>
</tree>
</field>
</record>

View File

@ -99,42 +99,39 @@
<initialize>
<paraStyle name="all" alignment="justify"/>
</initialize>
<paraStyle name="Standard" fontName="Helvetica"/>
<paraStyle name="Text body" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="List" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="Table Contents" fontName="Helvetica" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="Table Heading" fontName="Helvetica" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="Caption" fontName="Helvetica" fontSize="10.0" leading="13" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="Index" fontName="Helvetica"/>
<paraStyle name="Heading" fontName="Helvetica" fontSize="15.0" leading="19" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="terp_header" fontName="Helvetica-Bold" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="terp_default_8" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="Footer" fontName="Helvetica"/>
<paraStyle name="Horizontal Line" fontName="Helvetica" fontSize="6.0" leading="8" spaceBefore="0.0" spaceAfter="14.0"/>
<paraStyle name="Heading 9" fontName="Helvetica-Bold" fontSize="75%" leading="NaN" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="terp_tblheader_General" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="terp_tblheader_Details" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="terp_default_Bold_8" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_tblheader_General_Centre" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="terp_tblheader_General_Right" fontName="Helvetica-Bold" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="terp_tblheader_Details_Centre" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="terp_tblheader_Details_Right" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="terp_default_Right_8" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Centre_8" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_header_Right" fontName="Helvetica-Bold" fontSize="15.0" leading="19" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="terp_header_Centre" fontName="Helvetica-Bold" fontSize="12.0" leading="15" alignment="CENTER" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="terp_default_address" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_9" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Bold_9" rightIndent="0.0" leftIndent="-3.0" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Centre_9" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Right_9" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Bold_Right_9" rightIndent="0.0" leftIndent="-3.0" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_2" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_White_2" rightIndent="0.0" leftIndent="0.0" fontName="Helvetica" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0" textColor="#ffffff"/>
<paraStyle name="terp_default_Note" rightIndent="0.0" leftIndent="9.0" fontName="Helvetica-Oblique" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="Table" fontName="Helvetica" fontSize="10.0" leading="13" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="User Index 10" rightIndent="0.0" leftIndent="127.0" fontName="Helvetica"/>
<paraStyle name="Preformatted Text" fontName="Helvetica" fontSize="10.0" leading="13" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="Standard"/>
<paraStyle name="Text body" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="List" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="Table Contents" spaceBefore="0.0" spaceAfter="6.0"/>
<paraStyle name="Caption" fontSize="10.0" leading="13" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="Index"/>
<paraStyle name="terp_header" fontSize="12.0" leading="15" alignment="LEFT" spaceBefore="12.0" spaceAfter="6.0"/>
<paraStyle name="terp_default_8" rightIndent="0.0" leftIndent="0.0" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="Footer"/>
<paraStyle name="Horizontal Line" fontSize="6.0" leading="8" spaceBefore="0.0" spaceAfter="14.0"/>
<paraStyle name="terp_tblheader_General" fontSize="8.0" leading="10" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="terp_tblheader_Details" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="terp_tblheader_General_Centre" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="terp_tblheader_General_Right" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="terp_tblheader_Details_Centre" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="terp_tblheader_Details_Right" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="terp_default_Right_8" rightIndent="0.0" leftIndent="0.0" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Centre_8" rightIndent="0.0" leftIndent="0.0" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_address" rightIndent="0.0" leftIndent="0.0" fontSize="10.0" leading="13" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_9" rightIndent="0.0" leftIndent="0.0" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Bold_9" rightIndent="0.0" leftIndent="-3.0" fontSize="9.0" leading="11" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Centre_9" rightIndent="0.0" leftIndent="0.0" fontSize="9.0" leading="11" alignment="CENTER" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Right_9" rightIndent="0.0" leftIndent="0.0" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_Bold_Right_9" rightIndent="0.0" leftIndent="-3.0" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_2" rightIndent="0.0" leftIndent="0.0" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0"/>
<paraStyle name="terp_default_White_2" rightIndent="0.0" leftIndent="0.0" fontSize="2.0" leading="3" alignment="LEFT" spaceBefore="0.0" spaceAfter="0.0" textColor="#ffffff"/>
<paraStyle name="Table" fontSize="10.0" leading="13" spaceBefore="6.0" spaceAfter="6.0"/>
<paraStyle name="User Index 10" rightIndent="0.0" leftIndent="127.0"/>
<paraStyle name="Preformatted Text" fontSize="10.0" leading="13" spaceBefore="0.0" spaceAfter="0.0"/>
<images/>
</stylesheet>
<story>
@ -144,12 +141,12 @@
<pto_header><!-- Must be after setLang() -->
<blockTable colWidths="202.0,87.0,71.0,57.0,42.0,71.0" style="Table7">
<tr>
<td> <para style="terp_tblheader_Details">Description</para> </td>
<td> <para style="terp_tblheader_Details_Centre">Taxes</para> </td>
<td> <para style="terp_tblheader_Details_Centre">Quantity</para> </td>
<td> <para style="terp_tblheader_Details_Right">Unit Price </para> </td>
<td> <para style="terp_tblheader_Details_Right">Disc.(%)</para> </td>
<td> <para style="terp_tblheader_Details_Right">Price</para> </td>
<td><para style="terp_tblheader_Details"><b>Description</b></para></td>
<td><para style="terp_tblheader_Details_Centre"><b>Taxes</b></para></td>
<td><para style="terp_tblheader_Details_Centre"><b>Quantity</b></para></td>
<td><para style="terp_tblheader_Details_Right"><b>Unit Price</b></para></td>
<td><para style="terp_tblheader_Details_Right"><b>Disc.(%)</b></para></td>
<td><para style="terp_tblheader_Details_Right"><b>Price</b></para></td>
</tr>
</blockTable>
</pto_header>
@ -172,29 +169,29 @@
</td>
</tr>
</blockTable>
<para style="terp_header">Invoice [[ ((o.type == 'out_invoice' and (o.state == 'open' or o.state == 'paid')) or removeParentNode('para')) and '' ]] [[ o.number ]]</para>
<para style="terp_header">PRO-FORMA [[ ((o.type == 'out_invoice' and o.state == 'proforma2') or removeParentNode('para')) and '' ]]</para>
<para style="terp_header">Draft Invoice [[ ((o.type == 'out_invoice' and o.state == 'draft') or removeParentNode('para')) and '' ]]</para>
<para style="terp_header">Cancelled Invoice [[ ((o.type == 'out_invoice' and o.state == 'cancel') or removeParentNode('para')) and '' ]] [[ o.number ]]</para>
<para style="terp_header">Refund [[ (o.type=='out_refund' or removeParentNode('para')) and '' ]] [[ o.number ]]</para>
<para style="terp_header">Supplier Refund [[ (o.type=='in_refund' or removeParentNode('para')) and '' ]] [[ o.number ]]</para>
<para style="terp_header">Supplier Invoice [[ (o.type=='in_invoice' or removeParentNode('para')) and '' ]] [[ o.number ]]</para>
<para style="terp_header"><b>Invoice [[ ((o.type == 'out_invoice' and (o.state == 'open' or o.state == 'paid')) or removeParentNode('para')) and '' ]] [[ o.number ]]</b></para>
<para style="terp_header"><b>PRO-FORMA [[ ((o.type == 'out_invoice' and o.state == 'proforma2') or removeParentNode('para')) and '' ]]</b></para>
<para style="terp_header"><b>Draft Invoice [[ ((o.type == 'out_invoice' and o.state == 'draft') or removeParentNode('para')) and '' ]]</b></para>
<para style="terp_header"><b>Cancelled Invoice [[ ((o.type == 'out_invoice' and o.state == 'cancel') or removeParentNode('para')) and '' ]] [[ o.number ]]</b></para>
<para style="terp_header"><b>Refund [[ (o.type=='out_refund' or removeParentNode('para')) and '' ]] [[ o.number ]]</b></para>
<para style="terp_header"><b>Supplier Refund [[ (o.type=='in_refund' or removeParentNode('para')) and '' ]] [[ o.number ]]</b></para>
<para style="terp_header"><b>Supplier Invoice [[ (o.type=='in_invoice' or removeParentNode('para')) and '' ]] [[ o.number ]]</b></para>
<para style="terp_default_8">
<font color="white"> </font>
</para>
<blockTable colWidths="132.50,132.50,132.50,132.50" style="Table_Invoice_General_Header">
<tr>
<td>
<para style="terp_tblheader_General_Centre">Description</para>
<para style="terp_tblheader_General_Centre"><b>Description</b></para>
</td>
<td>
<para style="terp_tblheader_General_Centre">Invoice Date</para>
</td>
<td>
<para style="terp_tblheader_General_Centre">Source</para>
<para style="terp_tblheader_General_Centre"><b>Invoice Date</b></para>
</td>
<td>
<para style="terp_tblheader_General_Centre">Customer Code</para>
<para style="terp_tblheader_General_Centre"><b>Source</b></para>
</td>
<td>
<para style="terp_tblheader_General_Centre"><b>Customer Code</b></para>
</td>
</tr>
</blockTable>
@ -220,22 +217,22 @@
<blockTable colWidths="185.0,70.0,80.0,60.0,50.0,85.0" style="Table7">
<tr>
<td>
<para style="terp_tblheader_General">Description</para>
<para style="terp_tblheader_General"><b>Description</b></para>
</td>
<td>
<para style="terp_tblheader_General_Centre">Taxes</para>
<para style="terp_tblheader_General_Centre"><b>Taxes</b></para>
</td>
<td>
<para style="terp_tblheader_General_Right">Quantity</para>
<para style="terp_tblheader_General_Right"><b>Quantity</b></para>
</td>
<td>
<para style="terp_tblheader_General_Right">Unit Price</para>
<para style="terp_tblheader_General_Right"><b>Unit Price</b></para>
</td>
<td>
<para style="terp_tblheader_General_Right">Disc.(%)</para>
<para style="terp_tblheader_General_Right"><b>Disc.(%)</b></para>
</td>
<td>
<para style="terp_tblheader_General_Right">Price</para>
<para style="terp_tblheader_General_Right"><b>Price</b></para>
</td>
</tr>
</blockTable>
@ -298,10 +295,10 @@
</para>
</td>
<td>
<para style="terp_tblheader_Details">Total:</para>
<para style="terp_tblheader_Details"><b>Total:</b></para>
</td>
<td>
<para style="terp_default_Bold_Right_9">[[ formatLang(o.amount_total, digits=get_digits(dp='Account'), currency_obj=o.currency_id) ]]</para>
<para style="terp_default_Bold_Right_9"><b>[[ formatLang(o.amount_total, digits=get_digits(dp='Account'), currency_obj=o.currency_id) ]]</b></para>
</td>
</tr>
</blockTable>
@ -311,13 +308,13 @@
<blockTable colWidths="205.0,71.0,71.0,183.0" style="Table9">
<tr>
<td>
<para style="terp_tblheader_Details">Tax [[ o.tax_line==[] and removeParentNode('blockTable') ]]</para>
<para style="terp_tblheader_Details"><b>Tax [[ o.tax_line==[] and removeParentNode('blockTable') ]]</b></para>
</td>
<td>
<para style="terp_tblheader_Details_Right">Base </para>
<para style="terp_tblheader_Details_Right"><b>Base </b></para>
</td>
<td>
<para style="terp_tblheader_Details_Right">Amount </para>
<para style="terp_tblheader_Details_Right"><b>Amount </b></para>
</td>
<td>
<para style="terp_default_8">
@ -361,7 +358,7 @@
<blockTable colWidths="120.0,410.0" style="Table1">
<tr>
<td>
<para style="terp_default_Bold_9">Fiscal Position Remark : </para>
<para style="terp_default_Bold_9"><b>Fiscal Position Remark : </b></para>
</td>
<td>
<para style="terp_default_9">[[ (o.fiscal_position and o.fiscal_position.note and format(o.fiscal_position.note)) or removeParentNode('blockTable') ]]</para>

View File

@ -22,7 +22,7 @@ class CashBox(osv.osv_memory):
records = self.pool[active_model].browse(cr, uid, active_ids, context=context)
return self._run(cr, uid, ids, records, context=None)
return self._run(cr, uid, ids, records, context=context)
def _run(self, cr, uid, ids, records, context=None):
for box in self.browse(cr, uid, ids, context=context):

View File

@ -7,14 +7,14 @@ msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev_rc3\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2012-12-21 17:04+0000\n"
"PO-Revision-Date: 2011-02-19 12:16+0000\n"
"PO-Revision-Date: 2013-05-31 07:35+0000\n"
"Last-Translator: Chertykov Denis <chertykov@gmail.com>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2013-03-16 05:25+0000\n"
"X-Generator: Launchpad (build 16532)\n"
"X-Launchpad-Export-Date: 2013-06-01 05:16+0000\n"
"X-Generator: Launchpad (build 16660)\n"
#. module: account_analytic_analysis
#: view:account.analytic.account:0
@ -73,7 +73,7 @@ msgstr ""
#. module: account_analytic_analysis
#: view:account.analytic.account:0
msgid "⇒ Invoice"
msgstr ""
msgstr "⇒ Счет"
#. module: account_analytic_analysis
#: field:account.analytic.account,ca_invoiced:0
@ -196,6 +196,8 @@ msgid ""
"{'required': [('type','=','contract')], 'invisible': [('type','in',['view', "
"'normal','template'])]}"
msgstr ""
"{'required': [('type','=','contract')], 'invisible': [('type','in',['view', "
"'normal','template'])]}"
#. module: account_analytic_analysis
#: field:account.analytic.account,real_margin_rate:0
@ -335,7 +337,7 @@ msgstr "Теоретическая выручка"
#. module: account_analytic_analysis
#: view:account.analytic.account:0
msgid "To Renew"
msgstr ""
msgstr "К продлению"
#. module: account_analytic_analysis
#: view:account.analytic.account:0
@ -431,7 +433,7 @@ msgstr ""
#. module: account_analytic_analysis
#: field:account.analytic.account,toinvoice_total:0
msgid "Total to Invoice"
msgstr ""
msgstr "Всего в счет"
#. module: account_analytic_analysis
#: view:account.analytic.account:0
@ -546,18 +548,18 @@ msgstr "Дата последней операции по этому счету.
#. module: account_analytic_analysis
#: model:ir.model,name:account_analytic_analysis.model_sale_config_settings
msgid "sale.config.settings"
msgstr ""
msgstr "sale.config.settings"
#. module: account_analytic_analysis
#: field:sale.config.settings,group_template_required:0
msgid "Mandatory use of templates."
msgstr ""
msgstr "Обязательное использование шаблонов."
#. module: account_analytic_analysis
#: model:ir.actions.act_window,name:account_analytic_analysis.template_of_contract_action
#: model:ir.ui.menu,name:account_analytic_analysis.menu_template_of_contract_action
msgid "Contract Template"
msgstr ""
msgstr "Шаблон контракта"
#. module: account_analytic_analysis
#: view:account.analytic.account:0
@ -612,7 +614,7 @@ msgstr ""
#. module: account_analytic_analysis
#: view:account.analytic.account:0
msgid "Total"
msgstr ""
msgstr "Итого"
#~ msgid "Hours summary by user"
#~ msgstr "Итого часов по пользователям"

View File

@ -4,7 +4,7 @@
<record id="analytic_default_comp_rule" model="ir.rule">
<field name="name">Analytic Default multi company rule</field>
<field model="ir.model" name="model_id" ref="model_account_analytic_default"/>
<field name="model_id" ref="model_account_analytic_default"/>
<field eval="True" name="global"/>
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
</record>

View File

@ -7,14 +7,14 @@ msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2012-12-21 17:05+0000\n"
"PO-Revision-Date: 2012-12-28 10:00+0000\n"
"PO-Revision-Date: 2013-05-31 07:41+0000\n"
"Last-Translator: Chertykov Denis <chertykov@gmail.com>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2013-03-16 05:26+0000\n"
"X-Generator: Launchpad (build 16532)\n"
"X-Launchpad-Export-Date: 2013-06-01 05:16+0000\n"
"X-Generator: Launchpad (build 16660)\n"
#. module: account_analytic_plans
#: field:account.analytic.plan.instance,account4_ids:0
@ -48,7 +48,7 @@ msgstr "Ставка (%)"
#: code:addons/account_analytic_plans/account_analytic_plans.py:234
#, python-format
msgid "The total should be between %s and %s."
msgstr ""
msgstr "Итог должен быть между %s и %s."
#. module: account_analytic_plans
#: view:account.analytic.plan:0
@ -131,7 +131,7 @@ msgstr "Не показывать пустые строки"
#: code:addons/account_analytic_plans/wizard/account_crossovered_analytic.py:61
#, python-format
msgid "There are no analytic lines related to account %s."
msgstr ""
msgstr "Нет позиций аналитики относящихся к счету %s."
#. module: account_analytic_plans
#: field:account.analytic.plan.instance,account3_ids:0
@ -315,7 +315,7 @@ msgstr "Журнал аналитики"
#: 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 ""
msgstr "Пожалуйста, введите имя и код перед сохранением модели."
#. module: account_analytic_plans
#: report:account.analytic.account.crossovered.analytic:0
@ -347,7 +347,7 @@ msgstr "Журнал"
#: code:addons/account_analytic_plans/account_analytic_plans.py:486
#, python-format
msgid "You have to define an analytic journal on the '%s' journal."
msgstr ""
msgstr "Вы должны определить журнал аналитики для журнала '%s'"
#. module: account_analytic_plans
#: code:addons/account_analytic_plans/account_analytic_plans.py:342
@ -375,7 +375,7 @@ msgstr "Позиция счета"
#: code:addons/account_analytic_plans/wizard/analytic_plan_create_model.py:41
#, python-format
msgid "There is no analytic plan defined."
msgstr ""
msgstr "Аналитический план счетов не определен."
#. module: account_analytic_plans
#: model:ir.model,name:account_analytic_plans.model_account_bank_statement
@ -402,7 +402,7 @@ msgstr "Разнесение аналитики"
#: code:addons/account_analytic_plans/account_analytic_plans.py:221
#, python-format
msgid "A model with this name and code already exists."
msgstr ""
msgstr "Модель с таким названием и кодом уже существует."
#. module: account_analytic_plans
#: help:account.analytic.plan.line,root_analytic_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: 2012-12-21 17:04+0000\n"
"PO-Revision-Date: 2011-07-12 12:04+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"PO-Revision-Date: 2013-05-31 08:06+0000\n"
"Last-Translator: Chertykov Denis <chertykov@gmail.com>\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: 2013-03-16 05:50+0000\n"
"X-Generator: Launchpad (build 16532)\n"
"X-Launchpad-Export-Date: 2013-06-01 05:16+0000\n"
"X-Generator: Launchpad (build 16660)\n"
#. module: account_asset
#: view:account.asset.asset:0
@ -148,7 +148,7 @@ msgstr ""
#. module: account_asset
#: help:account.asset.asset,method_period:0
msgid "The amount of time between two depreciations, in months"
msgstr ""
msgstr "Количество времени между амортизациями, в месяцах"
#. module: account_asset
#: field:account.asset.depreciation.line,depreciation_date:0
@ -160,7 +160,7 @@ msgstr "Дата амортизации"
#. module: account_asset
#: constraint:account.asset.asset:0
msgid "Error ! You cannot create recursive assets."
msgstr ""
msgstr "Ошибка! Нельзя создавать рекурсивные активы."
#. module: account_asset
#: field:asset.asset.report,posted_value:0
@ -205,7 +205,7 @@ msgstr "# позиций амортизации"
#. module: account_asset
#: field:account.asset.asset,method_period:0
msgid "Number of Months in a Period"
msgstr ""
msgstr "Количество месяцев в периоде"
#. module: account_asset
#: view:asset.asset.report:0
@ -234,7 +234,7 @@ msgstr "Счет активов"
#: model:ir.actions.act_window,name:account_asset.action_asset_depreciation_confirmation_wizard
#: model:ir.ui.menu,name:account_asset.menu_asset_depreciation_confirmation_wizard
msgid "Compute Assets"
msgstr ""
msgstr "Вычислить активы"
#. module: account_asset
#: field:account.asset.category,method_period:0
@ -265,12 +265,12 @@ msgstr "Изменить длительность"
#: help:account.asset.category,method_number:0
#: help:account.asset.history,method_number:0
msgid "The number of depreciations needed to depreciate your asset"
msgstr ""
msgstr "Количество амортизаций необходимых для обесценивания актива"
#. module: account_asset
#: view:account.asset.category:0
msgid "Analytic Information"
msgstr ""
msgstr "Аналитическая информация"
#. module: account_asset
#: field:account.asset.category,account_analytic_id:0
@ -293,7 +293,7 @@ msgstr ""
#. module: account_asset
#: field:account.asset.depreciation.line,remaining_value:0
msgid "Next Period Depreciation"
msgstr ""
msgstr "Следующий период амортизации"
#. module: account_asset
#: help:account.asset.history,method_period:0
@ -344,7 +344,7 @@ msgstr "Поиск категории актива"
#. module: account_asset
#: view:asset.modify:0
msgid "months"
msgstr ""
msgstr "месяцы"
#. module: account_asset
#: model:ir.model,name:account_asset.model_account_invoice_line
@ -372,7 +372,7 @@ msgstr ""
#: view:asset.depreciation.confirmation.wizard:0
#: view:asset.modify:0
msgid "or"
msgstr ""
msgstr "или"
#. module: account_asset
#: field:account.asset.asset,note:0
@ -406,7 +406,7 @@ msgstr ""
#. module: account_asset
#: view:asset.asset.report:0
msgid "Assets in running state"
msgstr ""
msgstr "Активы в рабочем состоянии"
#. module: account_asset
#: view:account.asset.asset:0
@ -427,7 +427,7 @@ msgstr ""
#: field:account.asset.asset,state:0
#: field:asset.asset.report,state:0
msgid "Status"
msgstr ""
msgstr "Статус"
#. module: account_asset
#: field:account.asset.asset,partner_id:0
@ -474,12 +474,12 @@ msgstr "Вычислить"
#. module: account_asset
#: view:account.asset.history:0
msgid "Asset History"
msgstr ""
msgstr "История актива"
#. module: account_asset
#: model:ir.model,name:account_asset.model_asset_depreciation_confirmation_wizard
msgid "asset.depreciation.confirmation.wizard"
msgstr ""
msgstr "asset.depreciation.confirmation.wizard"
#. module: account_asset
#: field:account.asset.asset,active:0
@ -505,7 +505,7 @@ msgstr "История"
#. module: account_asset
#: view:asset.depreciation.confirmation.wizard:0
msgid "Compute Asset"
msgstr ""
msgstr "Вычислить актив"
#. module: account_asset
#: field:asset.depreciation.confirmation.wizard,period_id:0
@ -521,7 +521,7 @@ msgstr "Общий"
#: field:account.asset.asset,prorata:0
#: field:account.asset.category,prorata:0
msgid "Prorata Temporis"
msgstr ""
msgstr "По истечении срока"
#. module: account_asset
#: model:ir.model,name:account_asset.model_account_invoice
@ -553,7 +553,7 @@ msgstr "Элементы журнала"
#. module: account_asset
#: view:asset.modify:0
msgid "Asset Durations to Modify"
msgstr ""
msgstr "Актив - интервал времени для изменения"
#. module: account_asset
#: field:account.asset.asset,purchase_date:0
@ -574,6 +574,8 @@ msgid ""
"Choose the period for which you want to automatically post the depreciation "
"lines of running assets"
msgstr ""
"Выберите период, за который вы хотите автоматически создавать записи "
"амортизации для актива"
#. module: account_asset
#: view:account.asset.asset:0
@ -588,12 +590,12 @@ msgstr "Метод амортизации"
#. module: account_asset
#: field:account.asset.depreciation.line,amount:0
msgid "Current Depreciation"
msgstr ""
msgstr "Текущая аммортизация"
#. module: account_asset
#: field:account.asset.asset,name:0
msgid "Asset Name"
msgstr ""
msgstr "Название актива"
#. module: account_asset
#: field:account.asset.category,open_asset:0
@ -618,7 +620,7 @@ msgstr "Журнал"
#. module: account_asset
#: field:account.asset.history,name:0
msgid "History name"
msgstr ""
msgstr "Название истории"
#. module: account_asset
#: field:account.asset.depreciation.line,depreciated_value:0
@ -657,7 +659,7 @@ msgstr ""
#. module: account_asset
#: field:account.asset.asset,purchase_value:0
msgid "Gross Value"
msgstr ""
msgstr "Валовая стоимость"
#. module: account_asset
#: field:account.asset.category,name:0
@ -703,12 +705,12 @@ msgstr ""
#. module: account_asset
#: field:account.asset.depreciation.line,sequence:0
msgid "Sequence"
msgstr ""
msgstr "Нумерация"
#. module: account_asset
#: help:account.asset.category,method_period:0
msgid "State here the time between 2 depreciations, in months"
msgstr ""
msgstr "Время между двумя амортизациями в месяцах"
#. module: account_asset
#: field:account.asset.history,date:0
@ -729,7 +731,7 @@ msgstr "Число амортизаций"
#. module: account_asset
#: view:account.asset.asset:0
msgid "Create Move"
msgstr ""
msgstr "Создать перемещение"
#. module: account_asset
#: view:account.asset.asset:0

View File

@ -8,14 +8,14 @@ msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2012-12-21 17:05+0000\n"
"PO-Revision-Date: 2012-12-11 13:00+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"PO-Revision-Date: 2013-06-03 07:47+0000\n"
"Last-Translator: Chertykov Denis <chertykov@gmail.com>\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: 2013-03-16 05:51+0000\n"
"X-Generator: Launchpad (build 16532)\n"
"X-Launchpad-Export-Date: 2013-06-04 05:20+0000\n"
"X-Generator: Launchpad (build 16660)\n"
#. module: account_check_writing
#: selection:res.company,check_layout:0
@ -25,13 +25,13 @@ msgstr ""
#. module: account_check_writing
#: report:account.print.check.top:0
msgid "Open Balance"
msgstr ""
msgstr "Открытый баланс"
#. module: account_check_writing
#: view:account.check.write:0
#: view:account.voucher:0
msgid "Print Check"
msgstr ""
msgstr "Напечатать чек"
#. module: account_check_writing
#: selection:res.company,check_layout:0
@ -82,7 +82,7 @@ msgstr "Описание"
#. module: account_check_writing
#: model:ir.model,name:account_check_writing.model_account_journal
msgid "Journal"
msgstr ""
msgstr "Журнал"
#. module: account_check_writing
#: model:ir.actions.act_window,name:account_check_writing.action_write_check
@ -95,14 +95,14 @@ msgstr ""
#: report:account.print.check.middle:0
#: report:account.print.check.top:0
msgid "Discount"
msgstr ""
msgstr "Скидка"
#. module: account_check_writing
#: report:account.print.check.bottom:0
#: report:account.print.check.middle:0
#: report:account.print.check.top:0
msgid "Original Amount"
msgstr ""
msgstr "Первоначальная сумма"
#. module: account_check_writing
#: field:res.company,check_layout:0
@ -119,7 +119,7 @@ msgstr ""
#: report:account.print.check.middle:0
#: report:account.print.check.top:0
msgid "Payment"
msgstr ""
msgstr "Платеж"
#. module: account_check_writing
#: field:account.journal,use_preprint_check:0
@ -153,7 +153,7 @@ msgstr ""
#: report:account.print.check.middle:0
#: report:account.print.check.top:0
msgid "Due Date"
msgstr ""
msgstr "Дата исполнения"
#. module: account_check_writing
#: model:ir.actions.report.xml,name:account_check_writing.account_print_check_middle
@ -163,13 +163,13 @@ msgstr ""
#. module: account_check_writing
#: model:ir.model,name:account_check_writing.model_res_company
msgid "Companies"
msgstr ""
msgstr "Компании"
#. module: account_check_writing
#: code:addons/account_check_writing/wizard/account_check_batch_printing.py:59
#, python-format
msgid "Error!"
msgstr ""
msgstr "Ошибка!"
#. module: account_check_writing
#: help:account.check.write,check_number:0
@ -202,12 +202,12 @@ msgstr ""
#. module: account_check_writing
#: view:account.check.write:0
msgid "or"
msgstr ""
msgstr "или"
#. module: account_check_writing
#: field:account.voucher,amount_in_word:0
msgid "Amount in Word"
msgstr ""
msgstr "Сумма прописью"
#. module: account_check_writing
#: model:ir.model,name:account_check_writing.model_account_check_write
@ -217,7 +217,7 @@ msgstr ""
#. module: account_check_writing
#: view:account.check.write:0
msgid "Cancel"
msgstr ""
msgstr "Отмена"
#. module: account_check_writing
#: field:account.check.write,check_number:0

View File

@ -9,11 +9,12 @@
<field name="model">res.partner</field>
<field name="priority" eval="20"/>
<field name="arch" type="xml">
<tree string="Customer Followup">
<tree string="Customer Followup" create="false" delete="false">
<field name="display_name"/>
<field name="payment_next_action_date"/>
<field name="payment_next_action"/>
<field name="user_id" invisible="1"/>
<field name="country_id" invisible="1"/>
<field name="parent_id" invisible="1"/>
<field name="payment_responsible_id"/>
<field name="payment_earliest_due_date"/>
@ -97,7 +98,7 @@
<button name="action_done" type="object" string="⇾ Mark as Done"
help="Click to mark the action as done." class="oe_link"
attrs="{'invisible':[('payment_next_action_date','=', False)]}"
groups="base.group_partner_manager"/>
groups="account.group_account_user"/>
<field name="payment_next_action" placeholder="Action to be taken e.g. Give a phonecall, Check if it's paid, ..."/>
</div>
</group>

View File

@ -7,14 +7,14 @@ msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2012-12-21 17:05+0000\n"
"PO-Revision-Date: 2011-11-11 15:21+0000\n"
"Last-Translator: Fabien (Open ERP) <fp@tinyerp.com>\n"
"PO-Revision-Date: 2013-05-31 10:28+0000\n"
"Last-Translator: Chertykov Denis <chertykov@gmail.com>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2013-03-16 05:11+0000\n"
"X-Generator: Launchpad (build 16532)\n"
"X-Launchpad-Export-Date: 2013-06-01 05:16+0000\n"
"X-Generator: Launchpad (build 16660)\n"
#. module: account_followup
#: model:email.template,subject:account_followup.email_template_account_followup_default
@ -22,7 +22,7 @@ msgstr ""
#: model:email.template,subject:account_followup.email_template_account_followup_level1
#: model:email.template,subject:account_followup.email_template_account_followup_level2
msgid "${user.company_id.name} Payment Reminder"
msgstr ""
msgstr "${user.company_id.name} напоминание о платеже"
#. module: account_followup
#: help:res.partner,latest_followup_level_id:0
@ -43,12 +43,12 @@ msgstr "Дальнейшие действия"
#. module: account_followup
#: view:account_followup.followup.line:0
msgid "%(date)s"
msgstr ""
msgstr "%(date)s"
#. module: account_followup
#: field:res.partner,payment_next_action_date:0
msgid "Next Action Date"
msgstr ""
msgstr "Дата следующего действия"
#. module: account_followup
#: view:account_followup.followup.line:0
@ -64,7 +64,7 @@ msgstr ""
#. module: account_followup
#: view:res.partner:0
msgid "⇾ Mark as Done"
msgstr ""
msgstr "⇾ отметить как сделанное"
#. module: account_followup
#: field:account_followup.followup.line,manual_action_note:0
@ -94,7 +94,7 @@ msgstr "Тема эл.письма"
#. module: account_followup
#: view:account_followup.followup.line:0
msgid "%(user_signature)s"
msgstr ""
msgstr "%(user_signature)s"
#. module: account_followup
#: view:account_followup.followup.line:0
@ -109,19 +109,19 @@ msgstr ""
#. module: account_followup
#: field:account_followup.print,email_body:0
msgid "Email Body"
msgstr ""
msgstr "Тело эл. письма"
#. module: account_followup
#: model:ir.actions.act_window,name:account_followup.action_account_followup_print
msgid "Send Follow-Ups"
msgstr ""
msgstr "Послать напоминания"
#. module: account_followup
#: report:account_followup.followup.print:0
#: code:addons/account_followup/account_followup.py:263
#, python-format
msgid "Amount"
msgstr ""
msgstr "Сумма"
#. module: account_followup
#: help:res.partner,payment_next_action:0
@ -133,7 +133,7 @@ msgstr ""
#. module: account_followup
#: view:res.partner:0
msgid "No Responsible"
msgstr ""
msgstr "Нет ответственного"
#. module: account_followup
#: model:account_followup.followup.line,description:account_followup.demo_followup_line2
@ -209,17 +209,17 @@ msgstr "Всего по дебету"
#. module: account_followup
#: field:res.partner,payment_next_action:0
msgid "Next Action"
msgstr ""
msgstr "Следующее действие"
#. module: account_followup
#: view:account_followup.followup.line:0
msgid ": Partner Name"
msgstr ""
msgstr ": Название партнера"
#. module: account_followup
#: field:account_followup.followup.line,manual_action_responsible_id:0
msgid "Assign a Responsible"
msgstr ""
msgstr "Назначить ответственного"
#. module: account_followup
#: view:account_followup.followup:0
@ -305,7 +305,7 @@ msgstr ""
#. module: account_followup
#: view:account_followup.followup.line:0
msgid "%(partner_name)s"
msgstr ""
msgstr "%(partner_name)s"
#. module: account_followup
#: model:email.template,body_html:account_followup.email_template_account_followup_level1
@ -377,7 +377,7 @@ msgstr "Определяет порядок вывода списка напом
#: code:addons/account_followup/wizard/account_followup_print.py:166
#, python-format
msgid " will be sent"
msgstr ""
msgstr " будет отправлен"
#. module: account_followup
#: view:account_followup.followup.line:0
@ -388,7 +388,7 @@ msgstr ""
#: view:account_followup.followup.line:0
#: field:account_followup.followup.line,send_letter:0
msgid "Send a Letter"
msgstr ""
msgstr "Отправить письмо"
#. module: account_followup
#: model:ir.actions.act_window,name:account_followup.action_account_followup_definition_form
@ -466,7 +466,7 @@ msgstr "Напечатанное сообщение"
#: code:addons/account_followup/wizard/account_followup_print.py:155
#, python-format
msgid "Anybody"
msgstr ""
msgstr "Кто угодно"
#. module: account_followup
#: help:account_followup.followup.line,send_email:0
@ -528,7 +528,7 @@ msgstr ""
#. module: account_followup
#: view:res.partner:0
msgid "Search Partner"
msgstr ""
msgstr "Поиск партнера"
#. module: account_followup
#: model:ir.ui.menu,name:account_followup.account_followup_print_menu
@ -554,7 +554,7 @@ msgstr ""
#. module: account_followup
#: view:account_followup.print:0
msgid "or"
msgstr ""
msgstr "или"
#. module: account_followup
#: view:res.partner:0

View File

@ -6,7 +6,7 @@
<field name="name">account_followup.stat.tree</field>
<field name="model">account_followup.stat</field>
<field name="arch" type="xml">
<tree string="Follow-up lines">
<tree string="Follow-up lines" create="false">
<field name="partner_id"/>
<field name="date_move"/>
<field name="date_move_last"/>

View File

@ -4,7 +4,7 @@
<record id="account_followup_comp_rule" model="ir.rule">
<field name="name">Account Follow-up multi company rule</field>
<field model="ir.model" name="model_id" ref="model_account_followup_followup"/>
<field name="model_id" ref="model_account_followup_followup"/>
<field eval="True" name="global"/>
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
</record>

View File

@ -15,21 +15,21 @@
<record id="payment_mode_comp_rule" model="ir.rule">
<field name="name">Payment Mode company rule</field>
<field model="ir.model" name="model_id" ref="model_payment_mode"/>
<field name="model_id" ref="model_payment_mode"/>
<field eval="True" name="global"/>
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
</record>
<record id="payment_order_comp_rule" model="ir.rule">
<field name="name">Payment order multi company rule</field>
<field model="ir.model" name="model_id" ref="model_payment_order"/>
<field name="model_id" ref="model_payment_order"/>
<field eval="True" name="global"/>
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
</record>
<record id="payment_line_comp_rule" model="ir.rule">
<field name="name">Payment line multi company rule</field>
<field model="ir.model" name="model_id" ref="model_payment_line"/>
<field name="model_id" ref="model_payment_line"/>
<field eval="True" name="global"/>
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
</record>

View File

@ -23,6 +23,7 @@ import time
from lxml import etree
from openerp.osv import fields, osv
from openerp.tools.translate import _
class payment_order_create(osv.osv_memory):
"""
@ -108,7 +109,7 @@ class payment_order_create(osv.osv_memory):
context.update({'line_ids': line_ids})
model_data_ids = mod_obj.search(cr, uid,[('model', '=', 'ir.ui.view'), ('name', '=', 'view_create_payment_order_lines')], context=context)
resource_id = mod_obj.read(cr, uid, model_data_ids, fields=['res_id'], context=context)[0]['res_id']
return {'name': ('Entrie Lines'),
return {'name': _('Entry Lines'),
'context': context,
'view_type': 'form',
'view_mode': 'form',

View File

@ -0,0 +1,241 @@
# Russian translation for openobject-addons
# Copyright (c) 2013 Rosetta Contributors and Canonical Ltd 2013
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2013.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2012-12-21 17:05+0000\n"
"PO-Revision-Date: 2013-06-05 07:09+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\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: 2013-06-06 05:21+0000\n"
"X-Generator: Launchpad (build 16667)\n"
#. module: account_test
#: view:accounting.assert.test:0
msgid ""
"Code should always set a variable named `result` with the result of your "
"test, that can be a list or\n"
"a dictionary. If `result` is an empty list, it means that the test was "
"succesful. Otherwise it will\n"
"try to translate and print what is inside `result`.\n"
"\n"
"If the result of your test is a dictionary, you can set a variable named "
"`column_order` to choose in\n"
"what order you want to print `result`'s content.\n"
"\n"
"Should you need them, you can also use the following variables into your "
"code:\n"
" * cr: cursor to the database\n"
" * uid: ID of the current user\n"
"\n"
"In any ways, the code must be legal python statements with correct "
"indentation (if needed).\n"
"\n"
"Example: \n"
" sql = '''SELECT id, name, ref, date\n"
" FROM account_move_line \n"
" WHERE account_id IN (SELECT id FROM account_account WHERE type "
"= 'view')\n"
" '''\n"
" cr.execute(sql)\n"
" result = cr.dictfetchall()"
msgstr ""
#. module: account_test
#: model:accounting.assert.test,name:account_test.account_test_02
msgid "Test 2: Opening a fiscal year"
msgstr "Проверка 2: Открытие фискального года"
#. module: account_test
#: model:accounting.assert.test,desc:account_test.account_test_05
msgid ""
"Check that reconciled invoice for Sales/Purchases has reconciled entries for "
"Payable and Receivable Accounts"
msgstr ""
#. module: account_test
#: model:accounting.assert.test,desc:account_test.account_test_03
msgid ""
"Check if movement lines are balanced and have the same date and period"
msgstr ""
#. module: account_test
#: field:accounting.assert.test,name:0
msgid "Test Name"
msgstr ""
#. module: account_test
#: report:account.test.assert.print:0
msgid "Accouting tests on"
msgstr ""
#. module: account_test
#: model:accounting.assert.test,name:account_test.account_test_01
msgid "Test 1: General balance"
msgstr "Проверка 1: Общий баланс"
#. module: account_test
#: model:accounting.assert.test,desc:account_test.account_test_06
msgid "Check that paid/reconciled invoices are not in 'Open' state"
msgstr ""
#. module: account_test
#: model:accounting.assert.test,desc:account_test.account_test_05_2
msgid ""
"Check that reconciled account moves, that define Payable and Receivable "
"accounts, are belonging to reconciled invoices"
msgstr ""
#. module: account_test
#: view:accounting.assert.test:0
msgid "Tests"
msgstr "Проверки"
#. module: account_test
#: field:accounting.assert.test,desc:0
msgid "Test Description"
msgstr "Описание проверки"
#. module: account_test
#: view:accounting.assert.test:0
msgid "Description"
msgstr "Описание"
#. module: account_test
#: model:accounting.assert.test,desc:account_test.account_test_06_1
msgid "Check that there's no move for any account with « View » account type"
msgstr ""
#. module: account_test
#: model:accounting.assert.test,name:account_test.account_test_08
msgid "Test 9 : Accounts and partners on account moves"
msgstr ""
#. module: account_test
#: model:ir.actions.act_window,name:account_test.action_accounting_assert
#: model:ir.actions.report.xml,name:account_test.account_assert_test_report
#: model:ir.ui.menu,name:account_test.menu_action_license
msgid "Accounting Tests"
msgstr ""
#. module: account_test
#: code:addons/account_test/report/account_test_report.py:74
#, python-format
msgid "The test was passed successfully"
msgstr "Проверка прошла успешно"
#. module: account_test
#: field:accounting.assert.test,active:0
msgid "Active"
msgstr ""
#. module: account_test
#: model:accounting.assert.test,name:account_test.account_test_06
msgid "Test 6 : Invoices status"
msgstr ""
#. module: account_test
#: model:ir.model,name:account_test.model_accounting_assert_test
msgid "accounting.assert.test"
msgstr "accounting.assert.test"
#. module: account_test
#: model:accounting.assert.test,name:account_test.account_test_05
msgid ""
"Test 5.1 : Payable and Receivable accountant lines of reconciled invoices"
msgstr ""
#. module: account_test
#: field:accounting.assert.test,code_exec:0
msgid "Python code"
msgstr "Код на Python"
#. module: account_test
#: model:accounting.assert.test,desc:account_test.account_test_07
msgid ""
"Check on bank statement that the Closing Balance = Starting Balance + sum of "
"statement lines"
msgstr ""
#. module: account_test
#: model:accounting.assert.test,name:account_test.account_test_07
msgid "Test 8 : Closing balance on bank statements"
msgstr ""
#. module: account_test
#: model:accounting.assert.test,name:account_test.account_test_03
msgid "Test 3: Movement lines"
msgstr ""
#. module: account_test
#: model:accounting.assert.test,name:account_test.account_test_05_2
msgid "Test 5.2 : Reconcilied invoices and Payable/Receivable accounts"
msgstr ""
#. module: account_test
#: view:accounting.assert.test:0
msgid "Expression"
msgstr ""
#. module: account_test
#: model:accounting.assert.test,name:account_test.account_test_04
msgid "Test 4: Totally reconciled mouvements"
msgstr ""
#. module: account_test
#: model:accounting.assert.test,desc:account_test.account_test_04
msgid "Check if the totally reconciled movements are balanced"
msgstr ""
#. module: account_test
#: field:accounting.assert.test,sequence:0
msgid "Sequence"
msgstr ""
#. module: account_test
#: model:accounting.assert.test,desc:account_test.account_test_02
msgid ""
"Check if the balance of the new opened fiscal year matches with last year's "
"balance"
msgstr ""
#. module: account_test
#: view:accounting.assert.test:0
msgid "Python Code"
msgstr "Код на Python"
#. module: account_test
#: model:ir.actions.act_window,help:account_test.action_accounting_assert
msgid ""
"<p class=\"oe_view_nocontent_create\">\n"
" Click to create Accounting Test.\n"
" </p>\n"
" "
msgstr ""
#. module: account_test
#: model:accounting.assert.test,desc:account_test.account_test_01
msgid "Check the balance: Debit sum = Credit sum"
msgstr "Проверяет баланс: сумма дебита = сумма кредита"
#. module: account_test
#: model:accounting.assert.test,desc:account_test.account_test_08
msgid "Check that general accounts and partners on account moves are active"
msgstr ""
#. module: account_test
#: model:accounting.assert.test,name:account_test.account_test_06_1
msgid "Test 7: « View  » account type"
msgstr ""
#. module: account_test
#: view:accounting.assert.test:0
msgid "Code Help"
msgstr ""

View File

@ -7,7 +7,6 @@
<a href="https://www.openerp.com/saas_master/demo?lang=en_US&module=account">
<img src="account_sc_00.png" alt="Online Demo">
</a>
<span class="oe_demo_play">&nbsp;</span>
<div class="oe_demo_footer oe_centeralign">Online Demo</div>
</div>
</div>

View File

@ -3,13 +3,13 @@
<data noupdate="1">
<record id="voucher_comp_rule" model="ir.rule">
<field name="name">Voucher multi-company</field>
<field model="ir.model" name="model_id" ref="model_account_voucher"/>
<field name="model_id" ref="model_account_voucher"/>
<field eval="True" name="global"/>
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
</record>
<record id="voucher_line_comp_rule" model="ir.rule">
<field name="name">Voucher Line multi-company</field>
<field model="ir.model" name="model_id" ref="model_account_voucher_line"/>
<field name="model_id" ref="model_account_voucher_line"/>
<field eval="True" name="global"/>
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
</record>

View File

@ -4,14 +4,14 @@
<record id="analytic_comp_rule" model="ir.rule">
<field name="name">Analytic multi company rule</field>
<field model="ir.model" name="model_id" ref="model_account_analytic_account"/>
<field name="model_id" ref="model_account_analytic_account"/>
<field eval="True" name="global"/>
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
</record>
<record id="analytic_line_comp_rule" model="ir.rule">
<field name="name">Analytic line multi company rule</field>
<field model="ir.model" name="model_id" ref="model_account_analytic_line"/>
<field name="model_id" ref="model_account_analytic_line"/>
<field eval="True" name="global"/>
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
</record>

View File

@ -23,6 +23,7 @@ import random
from urllib import urlencode
from urlparse import urljoin
from openerp.addons.base.ir.ir_mail_server import MailDeliveryException
from openerp.osv import osv, fields
from openerp.tools.misc import DEFAULT_SERVER_DATETIME_FORMAT
from openerp.tools.safe_eval import safe_eval
@ -55,19 +56,22 @@ class res_partner(osv.Model):
def _get_signup_url_for_action(self, cr, uid, ids, action='login', view_type=None, menu_id=None, res_id=None, model=None, context=None):
""" generate a signup url for the given partner ids and action, possibly overriding
the url state components (menu_id, id, view_type) """
if context is None:
context= {}
res = dict.fromkeys(ids, False)
base_url = self.pool.get('ir.config_parameter').get_param(cr, uid, 'web.base.url')
for partner in self.browse(cr, uid, ids, context):
# when required, make sure the partner has a valid signup token
if context and context.get('signup_valid') and not partner.user_ids:
if context.get('signup_valid') and not partner.user_ids:
self.signup_prepare(cr, uid, [partner.id], context=context)
partner.refresh()
# the parameters to encode for the query and fragment part of url
query = {'db': cr.dbname}
fragment = {'action': action, 'type': partner.signup_type}
signup_type = context.get('signup_force_type_in_url', partner.signup_type or '')
fragment = {'action': action, 'type': signup_type}
if partner.signup_token:
if partner.signup_token and signup_type:
fragment['token'] = partner.signup_token
elif partner.user_ids:
fragment['db'] = cr.dbname
@ -103,6 +107,9 @@ class res_partner(osv.Model):
def action_signup_prepare(self, cr, uid, ids, context=None):
return self.signup_prepare(cr, uid, ids, context=context)
def signup_cancel(self, cr, uid, ids, context=None):
return self.write(cr, uid, ids, {'signup_token': False, 'signup_type': False, 'signup_expiration': False}, context=context)
def signup_prepare(self, cr, uid, ids, signup_type="signup", expiration=False, context=None):
""" generate a new token for the partners with the given validity, if necessary
:param expiration: the expiration datetime of the token (string, optional)
@ -202,7 +209,7 @@ class res_users(osv.Model):
})
if partner.company_id:
values['company_id'] = partner.company_id.id
values['company_ids'] = [(6,0,[partner.company_id.id])]
values['company_ids'] = [(6, 0, [partner.company_id.id])]
self._signup_create_user(cr, uid, values, context=context)
else:
# no token, sign up an external user
@ -259,25 +266,26 @@ class res_users(osv.Model):
pass
if not bool(template):
template = self.pool.get('ir.model.data').get_object(cr, uid, 'auth_signup', 'reset_password_email')
mail_obj = self.pool.get('mail.mail')
assert template._name == 'email.template'
for user in self.browse(cr, uid, ids, context):
if not user.email:
raise osv.except_osv(_("Cannot send email: user has no email address."), user.name)
mail_id = self.pool.get('email.template').send_mail(cr, uid, template.id, user.id, True, context=context)
mail_state = mail_obj.read(cr, uid, mail_id, ['state'], context=context)
if mail_state and mail_state['state'] == 'exception':
raise self.pool.get('res.config.settings').get_config_warning(cr, _("Cannot send email: no outgoing email server configured.\nYou can configure it under %(menu:base_setup.menu_general_configuration)s."), context)
else:
return True
try:
self.pool.get('email.template').send_mail(cr, uid, template.id, user.id, force_send=True, raise_exception=True, context=context)
except Exception:
raise
def create(self, cr, uid, values, context=None):
if context is None:
context = {}
# overridden to automatically invite user to sign up
user_id = super(res_users, self).create(cr, uid, values, context=context)
user = self.browse(cr, uid, user_id, context=context)
if context and context.get('reset_password') and user.email:
ctx = dict(context, create_user=True)
self.action_reset_password(cr, uid, [user.id], context=ctx)
if user.email and not context.get('no_reset_password'):
context.update({'create_user': True})
try:
self.action_reset_password(cr, uid, [user.id], context=context)
except MailDeliveryException:
self.pool.get('res.partner').signup_cancel(cr, uid, [user.partner_id.id], context=context)
return user_id

View File

@ -31,9 +31,11 @@
<!-- add Reset Password button -->
<xpath expr="//div[@class='oe_right oe_button_box']//button" position="replace">
<button string="Send Reset Password Instructions"
class="oe_link"
type="object" name="action_reset_password"
attrs="{'invisible': [('state', '!=', 'active')]}"/>
<button string="Send an Invitation Email"
class="oe_link"
type="object" name="action_reset_password" context="{'create_user': 1}"
attrs="{'invisible': [('state', '!=', 'new')]}"/>
</xpath>

View File

@ -7,7 +7,7 @@ openerp.auth_signup = function(instance) {
var self = this;
this.signup_enabled = false;
this.reset_password_enabled = false;
return this._super().then(function() {
return this._super().always(function() {
// Switches the login box to the select mode whith mode == [default|signup|reset]
self.on('change:login_mode', self, function() {

View File

@ -50,6 +50,7 @@ class base_action_rule(osv.osv):
_name = 'base.action.rule'
_description = 'Action Rules'
_order = 'sequence'
_columns = {
'name': fields.char('Rule Name', size=64, required=True),
@ -61,7 +62,11 @@ class base_action_rule(osv.osv):
help="When unchecked, the rule is hidden and will not be executed."),
'sequence': fields.integer('Sequence',
help="Gives the sequence order when displaying a list of rules."),
'kind': fields.selection(
[('on_create', 'On Creation'), ('on_write', 'On Update'), ('on_time', 'Based on Timed Condition')],
string='When to Run'),
'trg_date_id': fields.many2one('ir.model.fields', string='Trigger Date',
help="When should the condition be triggered. If present, will be checked by the scheduler. If empty, will be checked at creation and update.",
domain="[('model_id', '=', model_id), ('ttype', 'in', ('date', 'datetime'))]"),
'trg_date_range': fields.integer('Delay after trigger date',
help="Delay after the trigger date." \
@ -78,10 +83,10 @@ class base_action_rule(osv.osv):
ondelete='restrict',
domain="[('model_id', '=', model_id.model)]",
help="If present, this condition must be satisfied before the update of the record."),
'filter_id': fields.many2one('ir.filters', string='After Update Filter',
'filter_id': fields.many2one('ir.filters', string='Filter',
ondelete='restrict',
domain="[('model_id', '=', model_id.model)]",
help="If present, this condition must be satisfied after the update of the record."),
help="If present, this condition must be satisfied before executing the action rule."),
'last_run': fields.datetime('Last Run', readonly=1),
}
@ -90,7 +95,15 @@ class base_action_rule(osv.osv):
'trg_date_range_type': 'day',
}
_order = 'sequence'
def onchange_kind(self, cr, uid, ids, kind, context=None):
clear_fields = []
if kind == 'on_create':
clear_fields = ['filter_pre_id', 'trg_date_id', 'trg_date_range', 'trg_date_range_type']
elif kind == 'on_write':
clear_fields = ['trg_date_id', 'trg_date_range', 'trg_date_range_type']
elif kind == 'on_time':
clear_fields = ['filter_pre_id']
return {'value': dict.fromkeys(clear_fields, False)}
def _filter(self, cr, uid, action, action_filter, record_ids, context=None):
""" filter the list record_ids that satisfy the action filter """
@ -105,14 +118,7 @@ class base_action_rule(osv.osv):
def _process(self, cr, uid, action, record_ids, context=None):
""" process the given action on the records """
# execute server actions
model = self.pool[action.model_id.model]
if action.server_action_ids:
server_action_ids = map(int, action.server_action_ids)
for record in model.browse(cr, uid, record_ids, context):
action_server_obj = self.pool.get('ir.actions.server')
ctx = dict(context, active_model=model._name, active_ids=[record.id], active_id=record.id)
action_server_obj.run(cr, uid, server_action_ids, context=ctx)
# modify records
values = {}
@ -127,13 +133,21 @@ class base_action_rule(osv.osv):
follower_ids = map(int, action.act_followers)
model.message_subscribe(cr, uid, record_ids, follower_ids, context=context)
# execute server actions
if action.server_action_ids:
server_action_ids = map(int, action.server_action_ids)
for record in model.browse(cr, uid, record_ids, context):
action_server_obj = self.pool.get('ir.actions.server')
ctx = dict(context, active_model=model._name, active_ids=[record.id], active_id=record.id)
action_server_obj.run(cr, uid, server_action_ids, context=ctx)
return True
def _wrap_create(self, old_create, model):
""" Return a wrapper around `old_create` calling both `old_create` and
`_process`, in that order.
"""
def wrapper(cr, uid, vals, context=None):
def create(cr, uid, vals, context=None):
# avoid loops or cascading actions
if context and context.get('action'):
return old_create(cr, uid, vals, context=context)
@ -141,8 +155,8 @@ class base_action_rule(osv.osv):
context = dict(context or {}, action=True)
new_id = old_create(cr, uid, vals, context=context)
# as it is a new record, we do not consider the actions that have a prefilter
action_dom = [('model', '=', model), ('trg_date_id', '=', False), ('filter_pre_id', '=', False)]
# retrieve the action rules to run on creation
action_dom = [('model', '=', model), ('kind', '=', 'on_create')]
action_ids = self.search(cr, uid, action_dom, context=context)
# check postconditions, and execute actions on the records that satisfy them
@ -151,13 +165,13 @@ class base_action_rule(osv.osv):
self._process(cr, uid, action, [new_id], context=context)
return new_id
return wrapper
return create
def _wrap_write(self, old_write, model):
""" Return a wrapper around `old_write` calling both `old_write` and
`_process`, in that order.
"""
def wrapper(cr, uid, ids, vals, context=None):
def write(cr, uid, ids, vals, context=None):
# avoid loops or cascading actions
if context and context.get('action'):
return old_write(cr, uid, ids, vals, context=context)
@ -165,8 +179,8 @@ class base_action_rule(osv.osv):
context = dict(context or {}, action=True)
ids = [ids] if isinstance(ids, (int, long, str)) else ids
# retrieve the action rules to possibly execute
action_dom = [('model', '=', model), ('trg_date_id', '=', False)]
# retrieve the action rules to run on update
action_dom = [('model', '=', model), ('kind', '=', 'on_write')]
action_ids = self.search(cr, uid, action_dom, context=context)
actions = self.browse(cr, uid, action_ids, context=context)
@ -185,7 +199,7 @@ class base_action_rule(osv.osv):
self._process(cr, uid, action, post_ids, context=context)
return True
return wrapper
return write
def _register_hook(self, cr, ids=None):
""" Wrap the methods `create` and `write` of the models specified by
@ -224,8 +238,8 @@ class base_action_rule(osv.osv):
def _check(self, cr, uid, automatic=False, use_new_cursor=False, context=None):
""" This Function is called by scheduler. """
context = context or {}
# retrieve all the action rules that have a trg_date_id and no precondition
action_dom = [('trg_date_id', '!=', False), ('filter_pre_id', '=', False)]
# retrieve all the action rules to run based on a timed condition
action_dom = [('kind', '=', 'on_time')]
action_ids = self.search(cr, uid, action_dom, context=context)
for action in self.browse(cr, uid, action_ids, context=context):
now = datetime.now()

View File

@ -26,24 +26,32 @@
<notebook>
<page string="Conditions">
<group>
<group name="filter" string="Filter Condition">
<field name="filter_pre_id" domain="[('model_id','=',model)]" context="{'default_model_id': model}"/>
<field name="filter_id" domain="[('model_id','=',model)]" context="{'default_model_id': model}"/>
</group>
<group name="timing" string="Timer">
<field name="trg_date_id"/>
<label for="trg_date_range" string="Delay After Trigger Date" attrs="{'invisible': [('trg_date_id','=',False)]}"/>
<div attrs="{'invisible': [('trg_date_id','=',False)]}">
<field name="trg_date_range" class="oe_inline"/>
<field name="trg_date_range_type" class="oe_inline" attrs="{'required': [('trg_date_id','!=',False)]}"/>
</div>
</group>
<field name="kind" required="1"
on_change="onchange_kind(kind)"/>
<field name="filter_pre_id"
domain="[('model_id','=',model), ('user_id', '=', False)]"
context="{'default_model_id': model}"
attrs="{'invisible': [('kind', '!=', 'on_write')]}"/>
<field name="filter_id"
domain="[('model_id','=',model), ('user_id', '=', False)]"
context="{'default_model_id': model}"/>
<field name="trg_date_id"
attrs="{'invisible': [('kind', '!=', 'on_time')], 'required': [('kind', '=', 'on_time')]}"/>
<label for="trg_date_range" string="Delay After Trigger Date"
attrs="{'invisible': [('trg_date_id','=',False)]}"/>
<div attrs="{'invisible': [('trg_date_id','=',False)]}">
<field name="trg_date_range" class="oe_inline"/>
<field name="trg_date_range_type" class="oe_inline" attrs="{'required': [('trg_date_id','!=',False)]}"/>
</div>
</group>
<p class="oe_grey">
<b>Select a filter or a timer as condition.</b><br/> An action rule is checked when you create or modify the "Related Document Model". The precondition filter is checked right before the modification while the postcondition filter is checked after the modification. A precondition filter will therefore not work during a creation.<br/>
<b>To create a new filter:</b><br/>
- Go to your "Related Document Model" page and set the filter parameters in the "Search" view (Example of filter based on Leads/Opportunities: Creation Date "is equal to" 01/01/2012)<br/>
- In this same "Search" view, select the menu "Save Current Filter", enter the name (Ex: Create the 01/01/2012) and add the option "Share with all users"<br/>
<p>
Select when the action must be run, and add filters and/or timing conditions.
<br/>
In order to create a new filter:
<ul>
<li>Go to your "Related Document Model" page and set the filter parameters in the "Search" view (Example of filter based on Leads/Opportunities: Creation Date "is equal to" 01/01/2012)</li>
<li>In this same "Search" view, select the menu "Save Current Filter", enter the name (Ex: Create the 01/01/2012) and add the option "Share with all users"</li>
</ul>
The filter must therefore be available in this page.
</p>
</page>
@ -76,6 +84,7 @@
<tree string="Action Rule">
<field name="sequence"/>
<field name="name"/>
<field name="kind"/>
<field name="filter_id"/>
</tree>
</field>

View File

@ -8,14 +8,14 @@ msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2012-12-21 17:05+0000\n"
"PO-Revision-Date: 2012-05-10 18:17+0000\n"
"Last-Translator: Raphael Collet (OpenERP) <Unknown>\n"
"PO-Revision-Date: 2013-05-31 10:23+0000\n"
"Last-Translator: Chertykov Denis <chertykov@gmail.com>\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: 2013-03-16 05:46+0000\n"
"X-Generator: Launchpad (build 16532)\n"
"X-Launchpad-Export-Date: 2013-06-01 05:16+0000\n"
"X-Generator: Launchpad (build 16660)\n"
#. module: base_action_rule
#: selection:base.action.rule.lead.test,state:0
@ -58,7 +58,7 @@ msgstr "Добавить подписчиков"
#. module: base_action_rule
#: field:base.action.rule,act_user_id:0
msgid "Set Responsible"
msgstr ""
msgstr "Указать ответственного"
#. module: base_action_rule
#: help:base.action.rule,trg_date_range:0
@ -71,7 +71,7 @@ msgstr ""
#. module: base_action_rule
#: model:ir.model,name:base_action_rule.model_base_action_rule_lead_test
msgid "base.action.rule.lead.test"
msgstr ""
msgstr "base.action.rule.lead.test"
#. module: base_action_rule
#: selection:base.action.rule.lead.test,state:0
@ -142,7 +142,7 @@ msgstr "Часы"
#. module: base_action_rule
#: view:base.action.rule:0
msgid "To create a new filter:"
msgstr ""
msgstr "Для создания нового фильтра:"
#. module: base_action_rule
#: field:base.action.rule,active:0
@ -167,7 +167,7 @@ msgstr ""
#. module: base_action_rule
#: view:base.action.rule:0
msgid "Filter Condition"
msgstr ""
msgstr "Условие фильтра"
#. module: base_action_rule
#: view:base.action.rule:0
@ -216,7 +216,7 @@ msgstr "Тип задержки"
#. module: base_action_rule
#: view:base.action.rule:0
msgid "Server actions to run"
msgstr ""
msgstr "Действия сервера для запуска"
#. module: base_action_rule
#: help:base.action.rule,active:0
@ -246,7 +246,7 @@ msgstr "Минуты"
#. module: base_action_rule
#: field:base.action.rule,model_id:0
msgid "Related Document Model"
msgstr ""
msgstr "Модель связанного документа"
#. module: base_action_rule
#: help:base.action.rule,filter_pre_id:0
@ -310,7 +310,7 @@ msgstr "Действия сервера"
#. module: base_action_rule
#: field:base.action.rule.lead.test,name:0
msgid "Subject"
msgstr ""
msgstr "Тема"
#~ msgid "Set State to"
#~ msgstr "Уснатовить состояние в"

View File

@ -19,8 +19,8 @@ class base_action_rule_test(common.TransactionCase):
'name': "Lead is in done state",
'is_default': False,
'model_id': 'base.action.rule.lead.test',
'domain' : "[('state','=','done')]",
}, context=context)
'domain': "[('state','=','done')]",
}, context=context)
def create_filter_draft(self, cr, uid, context=None):
filter_pool = self.registry('ir.filters')
@ -40,16 +40,16 @@ class base_action_rule_test(common.TransactionCase):
'user_id': self.admin,
}, context=context)
def create_rule(self, cr, uid, filter_id=False, filter_pre_id=False, context=None):
def create_rule(self, cr, uid, kind, filter_id=False, filter_pre_id=False, context=None):
"""
The "Rule 1" says that when a lead goes to the 'draft' state, the responsible for that lead changes to user "demo"
"""
return self.base_action_rule.create(cr,uid,{
'name' : "Rule 1",
'name': "Rule 1",
'model_id': self.registry('ir.model').search(cr, uid, [('model','=','base.action.rule.lead.test')], context=context)[0],
'active' : 1,
'filter_pre_id' : filter_pre_id,
'filter_id' : filter_id,
'kind': kind,
'filter_pre_id': filter_pre_id,
'filter_id': filter_id,
'act_user_id': self.demo,
}, context=context)
@ -64,7 +64,7 @@ class base_action_rule_test(common.TransactionCase):
"""
cr, uid = self.cr, self.uid
filter_draft = self.create_filter_draft(cr, uid)
self.create_rule(cr, uid, filter_pre_id=filter_draft)
self.create_rule(cr, uid, 'on_write', filter_pre_id=filter_draft)
new_lead_id = self.create_lead_test_1(cr, uid)
new_lead = self.model.browse(cr, uid, new_lead_id)
self.assertEquals(new_lead.state, 'draft')
@ -73,11 +73,11 @@ class base_action_rule_test(common.TransactionCase):
def test_01_check_to_state_draft_post(self):
"""
Check that a new record (with state = draft) changes its responsible when there is a postcondition filter which check that the state is draft.
Check that a new record changes its responsible when there is a postcondition filter which check that the state is draft.
"""
cr, uid = self.cr, self.uid
filter_draft = self.create_filter_draft(cr, uid)
self.create_rule(cr, uid, filter_id=filter_draft)
self.create_rule(cr, uid, 'on_create')
new_lead_id = self.create_lead_test_1(cr, uid)
new_lead = self.model.browse(cr, uid, new_lead_id)
self.assertEquals(new_lead.state, 'draft')
@ -95,7 +95,7 @@ class base_action_rule_test(common.TransactionCase):
cr, uid = self.cr, self.uid
filter_draft = self.create_filter_draft(cr, uid)
filter_done = self.create_filter_done(cr, uid)
self.create_rule(cr, uid, filter_pre_id=filter_draft, filter_id=filter_done)
self.create_rule(cr, uid, 'on_write', filter_pre_id=filter_draft, filter_id=filter_done)
new_lead_id = self.create_lead_test_1(cr, uid)
new_lead = self.model.browse(cr, uid, new_lead_id)
self.assertEquals(new_lead.state, 'draft')
@ -133,7 +133,7 @@ class base_action_rule_test(common.TransactionCase):
cr, uid = self.cr, self.uid
filter_draft = self.create_filter_draft(cr, uid)
filter_done = self.create_filter_done(cr, uid)
self.create_rule(cr, uid, filter_pre_id=filter_draft, filter_id=filter_done)
self.create_rule(cr, uid, 'on_write', filter_pre_id=filter_draft, filter_id=filter_done)
new_lead_id = self.create_lead_test_1(cr, uid)
new_lead = self.model.browse(cr, uid, new_lead_id)
self.assertEquals(new_lead.state, 'draft')

View File

@ -8,14 +8,14 @@ msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2012-12-21 17:05+0000\n"
"PO-Revision-Date: 2012-12-28 10:04+0000\n"
"PO-Revision-Date: 2013-06-05 07:16+0000\n"
"Last-Translator: Chertykov Denis <chertykov@gmail.com>\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: 2013-03-16 05:52+0000\n"
"X-Generator: Launchpad (build 16532)\n"
"X-Launchpad-Export-Date: 2013-06-06 05:21+0000\n"
"X-Generator: Launchpad (build 16667)\n"
#. module: base_status
#: code:addons/base_status/base_state.py:107
@ -27,13 +27,13 @@ msgstr "Ошибка !"
#: code:addons/base_status/base_state.py:166
#, python-format
msgid "%s has been <b>opened</b>."
msgstr ""
msgstr "%s было <b>открыто</b>."
#. module: base_status
#: code:addons/base_status/base_state.py:199
#, python-format
msgid "%s has been <b>renewed</b>."
msgstr ""
msgstr "%s было <b>обновлено</b>."
#. module: base_status
#: code:addons/base_status/base_stage.py:210
@ -55,13 +55,13 @@ msgstr ""
#: code:addons/base_status/base_state.py:193
#, python-format
msgid "%s is now <b>pending</b>."
msgstr ""
msgstr "%s сейчас <b>в ожидании</b>."
#. module: base_status
#: code:addons/base_status/base_state.py:187
#, python-format
msgid "%s has been <b>canceled</b>."
msgstr ""
msgstr "%s было <b>отменено</b>."
#. module: base_status
#: code:addons/base_status/base_stage.py:210
@ -70,9 +70,11 @@ msgid ""
"You are already at the top level of your sales-team category.\n"
"Therefore you cannot escalate furthermore."
msgstr ""
"Вы уже на высшем уровне категории вашей команды продаж.\n"
"Поэтому вы не можете обострить."
#. module: base_status
#: code:addons/base_status/base_state.py:181
#, python-format
msgid "%s has been <b>closed</b>."
msgstr ""
msgstr "%s было <b>закрыто</b>."

View File

@ -83,6 +83,8 @@ class res_partner(osv.osv):
Check the VAT number depending of the country.
http://sima-pc.com/nif.php
'''
if not ustr(country_code).encode('utf-8').isalpha():
return False
check_func_name = 'check_vat_' + country_code
check_func = getattr(self, check_func_name, None) or \
getattr(vatnumber, check_func_name, None)

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: 2012-12-21 17:05+0000\n"
"PO-Revision-Date: 2013-05-27 12:19+0000\n"
"PO-Revision-Date: 2013-06-05 07:11+0000\n"
"Last-Translator: Chertykov Denis <chertykov@gmail.com>\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: 2013-05-28 05:17+0000\n"
"X-Generator: Launchpad (build 16640)\n"
"X-Launchpad-Export-Date: 2013-06-06 05:21+0000\n"
"X-Generator: Launchpad (build 16667)\n"
#. module: claim_from_delivery
#: view:stock.picking.out:0
msgid "Claims"
msgstr ""
msgstr "Рекламации"
#. module: claim_from_delivery
#: model:res.request.link,name:claim_from_delivery.request_link_claim_from_delivery
@ -30,7 +30,7 @@ msgstr "Заказ доставки"
#. module: claim_from_delivery
#: model:ir.actions.act_window,name:claim_from_delivery.action_claim_from_delivery
msgid "Claim From Delivery"
msgstr ""
msgstr "Рекламация по доставке"
#~ msgid "Claim from delivery"
#~ msgstr "Претензия из доставки"

View File

@ -81,8 +81,6 @@ Dashboard for CRM will include:
'crm_lead_view.xml',
'crm_lead_menu.xml',
'crm_case_section_view.xml',
'crm_meeting_menu.xml',
'crm_phonecall_view.xml',
@ -98,6 +96,8 @@ Dashboard for CRM will include:
'res_config_view.xml',
'base_partner_merge_view.xml',
'crm_case_section_view.xml',
],
'demo': [
'crm_demo.xml',
@ -121,7 +121,8 @@ Dashboard for CRM will include:
'static/src/css/crm.css'
],
'js': [
'static/src/js/crm.js'
'static/lib/sparkline/jquery.sparkline.js',
'static/src/js/crm_case_section.js',
],
'installable': True,
'application': True,

View File

@ -264,7 +264,7 @@ class MergePartnerAutomatic(osv.TransientModel):
values = dict()
for column, field in columns.iteritems():
if field._type not in ('many2many', 'one2many', 'function'):
if field._type not in ('many2many', 'one2many') and not isinstance(field, fields.function):
for item in itertools.chain(src_partners, [dst_partner]):
if item[column]:
values[column] = write_serializer(column, item[column])

View File

@ -19,13 +19,12 @@
#
##############################################################################
import base64
import time
from lxml import etree
from datetime import date, datetime
from dateutil import relativedelta
from openerp import tools
from openerp.osv import fields
from openerp.osv import osv
from openerp import tools
from openerp.tools.translate import _
MAX_LEVEL = 15
AVAILABLE_STATES = [
@ -106,10 +105,57 @@ class crm_case_section(osv.osv):
_inherit = "mail.thread"
_description = "Sales Teams"
_order = "complete_name"
# number of periods for lead/opportunities/... tracking in salesteam kanban dashboard/kanban view
_period_number = 5
def get_full_name(self, cr, uid, ids, field_name, arg, context=None):
return dict(self.name_get(cr, uid, ids, context=context))
def __get_bar_values(self, cr, uid, obj, domain, read_fields, value_field, groupby_field, context=None):
""" Generic method to generate data for bar chart values using SparklineBarWidget.
This method performs obj.read_group(cr, uid, domain, read_fields, groupby_field).
:param obj: the target model (i.e. crm_lead)
:param domain: the domain applied to the read_group
:param list read_fields: the list of fields to read in the read_group
:param str value_field: the field used to compute the value of the bar slice
:param str groupby_field: the fields used to group
:return list section_result: a list of dicts: [
{ 'value': (int) bar_column_value,
'tootip': (str) bar_column_tooltip,
}
]
"""
month_begin = date.today().replace(day=1)
section_result = [{
'value': 0,
'tooltip': (month_begin + relativedelta.relativedelta(months=-i)).strftime('%B'),
} for i in range(self._period_number - 1, -1, -1)]
group_obj = obj.read_group(cr, uid, domain, read_fields, groupby_field, context=context)
for group in group_obj:
group_begin_date = datetime.strptime(group['__domain'][0][2], tools.DEFAULT_SERVER_DATE_FORMAT)
month_delta = relativedelta.relativedelta(month_begin, group_begin_date)
section_result[self._period_number - (month_delta.months + 1)] = {'value': group.get(value_field, 0), 'tooltip': group_begin_date.strftime('%B')}
return section_result
def _get_opportunities_data(self, cr, uid, ids, field_name, arg, context=None):
""" Get opportunities-related data for salesteam kanban view
monthly_open_leads: number of open lead during the last months
monthly_planned_revenue: planned revenu of opportunities during the last months
"""
obj = self.pool.get('crm.lead')
res = dict.fromkeys(ids, False)
month_begin = date.today().replace(day=1)
groupby_begin = (month_begin + relativedelta.relativedelta(months=-4)).strftime(tools.DEFAULT_SERVER_DATE_FORMAT)
for id in ids:
res[id] = dict()
lead_domain = [('type', '=', 'lead'), ('section_id', '=', id), ('create_date', '>=', groupby_begin)]
res[id]['monthly_open_leads'] = self.__get_bar_values(cr, uid, obj, lead_domain, ['create_date'], 'create_date_count', 'create_date', context=context)
opp_domain = [('type', '=', 'opportunity'), ('section_id', '=', id), ('create_date', '>=', groupby_begin)]
res[id]['monthly_planned_revenue'] = self.__get_bar_values(cr, uid, obj, opp_domain, ['planned_revenue', 'create_date'], 'planned_revenue', 'create_date', context=context)
return res
_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),
@ -129,15 +175,16 @@ class crm_case_section(osv.osv):
'alias_id': fields.many2one('mail.alias', 'Alias', ondelete="cascade", required=True,
help="The email address associated with this team. New emails received will automatically "
"create new leads assigned to the team."),
'open_lead_ids': fields.one2many('crm.lead', 'section_id',
string='Open Leads', readonly=True,
domain=['&', ('type', '!=', 'opportunity'), ('state', 'not in', ['done', 'cancel'])]),
'open_opportunity_ids': fields.one2many('crm.lead', 'section_id',
string='Open Opportunities', readonly=True,
domain=['&', '|', ('type', '=', 'opportunity'), ('type', '=', 'both'), ('state', 'not in', ['done', 'cancel'])]),
'color': fields.integer('Color Index'),
'use_leads': fields.boolean('Leads',
help="This enables the management of leads in the sales team. Otherwise the sales team manages only opportunities."),
help="The first contact you get with a potential customer is a lead you qualify before converting it into a real business opportunity. Check this box to manage leads in this sales team."),
'monthly_open_leads': fields.function(_get_opportunities_data,
type="string", readonly=True, multi='_get_opportunities_data',
string='Open Leads per Month'),
'monthly_planned_revenue': fields.function(_get_opportunities_data,
type="string", readonly=True, multi='_get_opportunities_data',
string='Planned Revenue per Month')
}
def _get_stage_common(self, cr, uid, context):

View File

@ -26,6 +26,7 @@ Description: [[object.description]]
<field name="name">Set Auto Reminder on leads which are not open since 5 days.</field>
<field name="model_id" ref="model_crm_lead"/>
<field name="sequence">1</field>
<field name="kind">on_time</field>
<field name="filter_id" ref="filter_draft_lead"/>
<field name="trg_date_id" ref="field_crm_lead_create_date"/>
<field name="trg_date_range">5</field>
@ -54,12 +55,10 @@ object.write({'section_id': sales_team.id})
<field name="name">Set Auto Followers on leads which are urgent and come from USA.</field>
<field name="model_id" ref="model_crm_lead"/>
<field name="sequence">2</field>
<field name="kind">on_create</field>
<field name="filter_id" ref="filter_usa_lead"/>
<field name="act_followers" eval="[(6,0,[ref('base.res_partner_4'), ref('base.res_partner_5'), ref('base.res_partner_6')])]"/>
<field name="act_user_id" ref="base.user_root"/>
<field name="trg_date_id" ref="field_crm_lead_create_date"/>
<field name="trg_date_range">0</field>
<field name="trg_date_range_type">minutes</field>
<field name="act_followers" eval="[(6,0,[ref('base.res_partner_4'), ref('base.res_partner_5'), ref('base.res_partner_6')])]"/>
<field name="server_action_ids" eval="[(6,0,[ref('action_set_team_sales_department')])]"/>
</record>
</data>

View File

@ -78,12 +78,12 @@
<field name="note"/>
<field name="alias_id"/>
<field name="color"/>
<field name="open_lead_ids"/>
<field name="open_opportunity_ids"/>
<field name="monthly_open_leads"/>
<field name="monthly_planned_revenue"/>
<templates>
<t t-name="kanban-box">
<div t-attf-class="oe_kanban_color_#{kanban_getcolor(record.color.raw_value)} oe_kanban_card oe_kanban_project oe_kanban_global_click oe_kanban_crm_salesteams">
<div class="oe_dropdown_toggle oe_dropdown_kanban" groups="base.group_user">
<div t-attf-class="oe_kanban_color_#{kanban_getcolor(record.color.raw_value)} oe_kanban_card oe_kanban_global_click oe_kanban_crm_salesteams">
<div class="oe_dropdown_toggle oe_dropdown_kanban" groups="base.group_sale_manager">
<span class="oe_e">í</span>
<ul class="oe_dropdown_menu">
<li t-if="widget.view.is_action_enabled('edit')"><a type="edit">Sales Teams Settings</a></li>
@ -92,25 +92,19 @@
</ul>
</div>
<div class="oe_kanban_content">
<h4><field name="name"/></h4>
<div class="oe_kanban_alias" t-if="record.use_leads.raw_value and record.alias_id.value">
<span class="oe_e">%%</span><small><field name="alias_id"/></small>
<h4 class="oe_center"><field name="name"/></h4>
<div class="oe_kanban_alias oe_center" t-if="record.use_leads.raw_value and record.alias_id.value">
<small><span class="oe_e" style="float: none;">%%</span><t t-raw="record.alias_id.raw_value[1]"/></small>
</div>
<div class="oe_items_list">
<a t-if="record.use_leads.raw_value" name="%(crm_case_form_view_salesteams_lead)d" type="action">
<t t-raw="record.open_lead_ids.raw_value.length"/>
<t t-if="record.open_lead_ids.raw_value.length &gt;= 2">Leads</t>
<t t-if="record.open_lead_ids.raw_value.length &lt; 2">Lead</t></a>
<a name="%(crm_case_form_view_salesteams_opportunity)d" type="action">
<t t-raw="record.open_opportunity_ids.raw_value.length"/>
<t t-if="record.open_opportunity_ids.raw_value.length &gt;= 2">Opportunities</t>
<t t-if="record.open_opportunity_ids.raw_value.length &lt; 2">Opportunity</t></a>
</div>
<div class="oe_avatars">
<img t-if="record.user_id.raw_value" t-att-src="kanban_image('res.users', 'image_small', record.user_id.raw_value)" t-att-data-member_id="record.user_id.raw_value"/>
<t t-foreach="record.member_ids.raw_value.slice(0,11)" t-as="member">
<img t-att-src="kanban_image('res.users', 'image_small', member)" t-att-data-member_id="member"/>
</t>
<div class="oe_salesteams_leads" t-if="record.use_leads.raw_value">
<a name="%(crm_case_form_view_salesteams_lead)d" type="action">Leads</a>
<a name="%(action_report_crm_lead)d" type="action" class="oe_sparkline_bar_link"><field name="monthly_open_leads" widget="sparkline_bar">Open Leads per Month<br/>Click to see a detailed analysis of leads.</field></a>
</div>
<div class="oe_salesteams_opportunities">
<a name="%(crm_case_form_view_salesteams_opportunity)d" type="action">Opportunities</a>
<a name="%(action_report_crm_opportunity)d" type="action"><field name="monthly_planned_revenue" widget="sparkline_bar">Planned Revenue per Month<br/>Click to see a detailed analysis of opportunities.</field></a>
</div>
</div>
</div>
</div>
@ -120,6 +114,27 @@
</field>
</record>
<!-- Case Sections Search view -->
<record id="crm_case_section_salesteams_search" model="ir.ui.view">
<field name="name">Case Sections - Search</field>
<field name="model">crm.case.section</field>
<field name="arch" type="xml">
<search string="Salesteams Search">
<field name="name"/>
<field name="parent_id"/>
<field name="user_id"/>
<field name="note"/>
<field name="code"/>
<filter name="personal" string="My Salesteams" domain="['|', ('member_ids', '=', uid), ('user_id', '=', uid)]"/>
<group expand="0" string="Group By...">
<filter string="Team Leader" domain="[]" context="{'group_by':'user_id'}"/>
<filter string="Parent Sales Teams" domain="[]" context="{'group_by':'parent_id'}"/>
</group>
</search>
</field>
</record>
<!-- Case Sections Action -->
<record id="crm_case_section_salesteams_act" model="ir.actions.act_window">
@ -127,6 +142,7 @@
<field name="res_model">crm.case.section</field>
<field name="view_type">form</field>
<field name="view_mode">kanban,tree,form</field>
<field name="context">{'search_default_personal': True}</field>
<field name="view_id" ref="crm_case_section_salesteams_view_kanban"/>
<field name="help" type="html">
<p class="oe_view_nocontent_create">
@ -148,9 +164,9 @@
<form string="Sales Team" version="7.0">
<sheet>
<div class="oe_title">
<label for="name" class="oe_edit_only" string="Project Name"/>
<label for="name" class="oe_edit_only" string="Sales team"/>
<h1>
<field name="name" string="Project Name"/>
<field name="name" string="Salesteam"/>
</h1>
<div name="group_alias"
attrs="{'invisible': [('alias_domain', '=', False)]}">
@ -168,25 +184,18 @@
</div>
</div>
<group>
<group>
<field name="parent_id"/>
<field name="resource_calendar_id"/>
<field name="active"/>
</group>
<group>
<field name="user_id"/>
<field name="code"/>
</group>
<group colspan="4" attrs="{'invisible': [('use_leads', '=', False)]}">
<group>
<field name="parent_id"/>
<field name="change_responsible"/>
<field name="active"/>
</group>
</group>
<notebook colspan="4">
<page string="Sales Team">
<group>
<field name="change_responsible"/>
</group>
<separator string="Team Members"/>
<page string="Team Members">
<field name="member_ids" widget="many2many_kanban">
<kanban quick_create="false" create="true">
<field name="name"/>

View File

@ -27,9 +27,10 @@
</record>
<record model="crm.case.section" id="section_sales_department">
<field name="name">Sales</field>
<field name="code">Sales</field>
<field name="name">Direct Sales</field>
<field name="code">DM</field>
<field name="use_leads">True</field>
<field name="alias_name">info</field>
<field name="member_ids" eval="[(4, ref('base.user_root'))]"/>
</record>

View File

@ -7,27 +7,13 @@
</record>
<record model="crm.case.section" id="crm_case_section_1">
<field name="name">Sales Marketing Department</field>
<field name="code">SMD</field>
<field name="parent_id" ref="crm.section_sales_department"/>
<field name="name">Indirect Sales</field>
<field name="code">IM</field>
</record>
<record model="crm.case.section" id="crm_case_section_2">
<field name="name">Support Department</field>
<field name="name">Marketing</field>
<field name="code">SPD</field>
<field name="parent_id" ref="crm.section_sales_department"/>
</record>
<record model="crm.case.section" id="crm_case_section_3">
<field name="name">Direct Marketing</field>
<field name="code">DM</field>
<field name="parent_id" ref="crm.section_sales_department"/>
</record>
<record model="crm.case.section" id="crm_case_section_4">
<field name="name">Online Support</field>
<field name="code">OS</field>
<field name="parent_id" ref="crm.crm_case_section_2"/>
</record>
<record model="crm.segmentation" id="crm_segmentation0">

View File

@ -77,12 +77,12 @@ class crm_lead(base_stage, format_address, osv.osv):
_track = {
'state': {
'crm.mt_lead_create': lambda self, cr, uid, obj, ctx=None: obj['state'] == 'new',
'crm.mt_lead_create': lambda self, cr, uid, obj, ctx=None: obj['state'] in ['new', 'draft'],
'crm.mt_lead_won': lambda self, cr, uid, obj, ctx=None: obj['state'] == 'done',
'crm.mt_lead_lost': lambda self, cr, uid, obj, ctx=None: obj['state'] == 'cancel',
},
'stage_id': {
'crm.mt_lead_stage': lambda self, cr, uid, obj, ctx=None: obj['state'] not in ['new', 'cancel', 'done'],
'crm.mt_lead_stage': lambda self, cr, uid, obj, ctx=None: obj['state'] not in ['new', 'draft', 'cancel', 'done'],
},
}
@ -103,7 +103,9 @@ class crm_lead(base_stage, format_address, osv.osv):
if vals.get('type'):
ctx['default_type'] = vals['type']
vals['stage_id'] = self._get_default_stage_id(cr, uid, context=ctx)
return super(crm_lead, self).create(cr, uid, vals, context=context)
# context: no_log, because subtype already handle this
create_context = dict(context, mail_create_nolog=True)
return super(crm_lead, self).create(cr, uid, vals, context=create_context)
def _get_default_section_id(self, cr, uid, context=None):
""" Gives default section by checking if present in the context """
@ -367,8 +369,8 @@ class crm_lead(base_stage, format_address, osv.osv):
def on_change_user(self, cr, uid, ids, user_id, context=None):
""" When changing the user, also set a section_id or restrict section id
to the ones user_id is member of. """
section_id = False
if user_id:
section_id = self._get_default_section_id(cr, uid, context=context) or False
if user_id and not section_id:
section_ids = self.pool.get('crm.case.section').search(cr, uid, ['|', ('user_id', '=', user_id), ('member_ids', '=', user_id)], context=context)
if section_ids:
section_id = section_ids[0]
@ -678,8 +680,9 @@ class crm_lead(base_stage, format_address, osv.osv):
merged_data['stage_id'] = section_stage_ids and section_stage_ids[0] or False
# Write merged data into first opportunity
self.write(cr, uid, [highest.id], merged_data, context=context)
# Delete tail opportunities
self.unlink(cr, uid, [x.id for x in tail_opportunities], context=context)
# Delete tail opportunities
# We use the SUPERUSER to avoid access rights issues because as the user had the rights to see the records it should be safe to do so
self.unlink(cr, SUPERUSER_ID, [x.id for x in tail_opportunities], context=context)
return highest.id

View File

@ -20,7 +20,7 @@
<field name="categ_ids" eval="[(6, 0, [categ_oppor6])]"/>
<field name="channel_id" ref="crm_case_channel_email"/>
<field name="priority">1</field>
<field name="section_id" ref="crm_case_section_4"/>
<field name="section_id" ref="crm_case_section_2"/>
<field name="user_id" ref="base.user_root"/>
<field name="stage_id" ref="stage_lead1"/>
<field name="description">Hello,
@ -44,7 +44,7 @@ Can you send me the details ?</field>
<field name="categ_ids" eval="[(6, 0, [categ_oppor2])]"/>
<field name="channel_id" ref="crm_case_channel_website"/>
<field name="priority">4</field>
<field name="section_id" ref="crm_case_section_3"/>
<field name="section_id" ref="crm_case_section_2"/>
<field name="user_id" ref="base.user_root"/>
<field name="stage_id" ref="stage_lead1"/>
<field eval="1" name="active"/>
@ -63,7 +63,7 @@ Can you send me the details ?</field>
<field name="categ_ids" eval="[(6, 0, [categ_oppor4])]"/>
<field name="channel_id" ref=""/>
<field name="priority">2</field>
<field name="section_id" ref="crm_case_section_2"/>
<field name="section_id" ref="crm_case_section_1"/>
<field name="user_id" ref="base.user_demo"/>
<field name="stage_id" ref="stage_lead2"/>
<field eval="1" name="active"/>
@ -82,7 +82,7 @@ Can you send me the details ?</field>
<field name="categ_ids" eval="[(6, 0, [categ_oppor5])]"/>
<field name="channel_id" ref=""/>
<field name="priority">3</field>
<field name="section_id" ref="crm_case_section_2"/>
<field name="section_id" ref="crm_case_section_1"/>
<field name="user_id" ref=""/>
<field name="stage_id" ref="stage_lead7"/>
<field eval="1" name="active"/>
@ -133,7 +133,7 @@ Contact: +1 813 494 5005</field>
<field name="categ_ids" eval="[(6, 0, [categ_oppor3,categ_oppor4])]"/>
<field name="channel_id" ref=""/>
<field name="priority">3</field>
<field name="section_id" ref="crm_case_section_4"/>
<field name="section_id" ref="crm_case_section_2"/>
<field name="user_id" ref="base.user_root"/>
<field name="stage_id" ref="stage_lead1"/>
<field eval="1" name="active"/>
@ -152,7 +152,7 @@ Contact: +1 813 494 5005</field>
<field name="categ_ids" eval="[(6, 0, [categ_oppor4])]"/>
<field name="channel_id" ref=""/>
<field name="priority">5</field>
<field name="section_id" ref="crm_case_section_4"/>
<field name="section_id" ref="crm_case_section_2"/>
<field name="user_id" ref="base.user_demo"/>
<field name="stage_id" ref="stage_lead7"/>
<field eval="1" name="active"/>
@ -197,6 +197,9 @@ Contact: +1 813 494 5005</field>
<field name="stage_id" ref="stage_lead1"/>
<field eval="1" name="active"/>
</record>
<record id="crm_case_9" model="crm.lead">
<field name="create_date" eval="(DateTime.today() - relativedelta(months=1)).strftime('%Y-%m-%d %H:%M')"/>
</record>
<record id="crm_case_10" model="crm.lead">
<field name="type">lead</field>
@ -211,7 +214,7 @@ Contact: +1 813 494 5005</field>
<field name="categ_ids" eval="[(6, 0, [categ_oppor1])]"/>
<field name="channel_id" ref="crm_case_channel_email"/>
<field name="priority">2</field>
<field name="section_id" ref="crm_case_section_3"/>
<field name="section_id" ref="crm_case_section_2"/>
<field name="user_id" ref=""/>
<field name="stage_id" ref="stage_lead1"/>
<field name="description">Hi,
@ -235,7 +238,7 @@ Andrew</field>
<field name="categ_ids" eval="[(6, 0, [categ_oppor7])]"/>
<field name="channel_id" ref="crm_case_channel_direct"/>
<field name="priority">3</field>
<field name="section_id" ref="crm_case_section_2"/>
<field name="section_id" ref="crm_case_section_1"/>
<field name="user_id" ref="base.user_demo"/>
<field name="stage_id" ref="stage_lead1"/>
<field eval="1" name="active"/>
@ -291,7 +294,7 @@ Andrew</field>
<field eval="time.strftime('%Y-%m-25')" name="date_deadline"/>
<field eval="time.strftime('%Y-%m-12')" name="date_action"/>
<field name="title_action">Meeting for pricing information.</field>
<field name="section_id" ref="crm_case_section_3"/>
<field name="section_id" ref="section_sales_department"/>
<field name="user_id" ref="base.user_root"/>
<field name="stage_id" ref="crm.stage_lead3"/>
<field eval="1" name="active"/>
@ -317,7 +320,7 @@ Andrew</field>
<field eval="time.strftime('%Y-%m-23')" name="date_deadline"/>
<field eval="time.strftime('%Y-%m-10')" name="date_action"/>
<field name="title_action">Send Catalogue by Email</field>
<field name="section_id" ref="crm_case_section_4"/>
<field name="section_id" ref="section_sales_department"/>
<field name="user_id" ref="base.user_demo"/>
<field name="stage_id" ref="crm.stage_lead3"/>
<field eval="1" name="active"/>
@ -326,7 +329,7 @@ Andrew</field>
<record id="crm_case_15" model="crm.lead">
<field name="type">opportunity</field>
<field name="name">Plan to buy RedHat servers</field>
<field eval="35000" name="planned_revenue"/>
<field eval="25000" name="planned_revenue"/>
<field eval="30.0" name="probability"/>
<field name="street">69 rue de Chimay</field>
<field name="country_id" ref="base.be"/>
@ -339,10 +342,11 @@ Andrew</field>
<field eval="time.strftime('%Y-%m-12')" name="date_deadline"/>
<field eval="time.strftime('%Y-%m-10')" name="date_action"/>
<field name="title_action">Call to ask system requirement</field>
<field name="section_id" ref="crm_case_section_3"/>
<field name="section_id" ref="section_sales_department"/>
<field name="user_id" ref="base.user_demo"/>
<field name="stage_id" ref="crm.stage_lead4"/>
<field name="stage_id" ref="crm.stage_lead6"/>
<field eval="1" name="active"/>
<field name="date_closed" eval="(DateTime.today() - relativedelta(months=2)).strftime('%Y-%m-%d %H:%M')"/>
</record>
<record id="crm_case_16" model="crm.lead">
@ -367,6 +371,7 @@ Andrew</field>
<field name="user_id" ref="base.user_demo"/>
<field name="stage_id" ref="crm.stage_lead6"/>
<field eval="1" name="active"/>
<field name="date_closed" eval="(DateTime.today() - relativedelta(hours=1)).strftime('%Y-%m-%d %H:%M')"/>
</record>
<record id="crm_case_17" model="crm.lead">
@ -388,10 +393,11 @@ Andrew</field>
<field eval="time.strftime('%Y-%m-8')" name="date_deadline"/>
<field eval="time.strftime('%Y-%m-3')" name="date_action"/>
<field name="title_action">Send price list regarding our interventions</field>
<field name="section_id" ref="crm_case_section_2"/>
<field name="section_id" ref="crm_case_section_1"/>
<field name="user_id" ref="base.user_demo"/>
<field name="stage_id" ref="crm.stage_lead3"/>
<field name="stage_id" ref="crm.stage_lead6"/>
<field eval="1" name="active"/>
<field name="date_closed" eval="(DateTime.today() - relativedelta(hours=1)).strftime('%Y-%m-%d %H:%M')"/>
</record>
<record id="crm_case_18" model="crm.lead">
@ -412,7 +418,7 @@ Andrew</field>
<field eval="time.strftime('%Y-%m-13')" name="date_deadline"/>
<field eval="time.strftime('%Y-%m-4')" name="date_action"/>
<field name="title_action">Call to define real needs about training</field>
<field name="section_id" ref="crm_case_section_2"/>
<field name="section_id" ref="crm_case_section_1"/>
<field name="user_id" ref="base.user_demo"/>
<field name="stage_id" ref="crm.stage_lead3"/>
<field eval="1" name="active"/>
@ -438,8 +444,9 @@ Andrew</field>
<field name="title_action">Ask for the good receprion of the proposition</field>
<field name="section_id" ref="crm_case_section_1"/>
<field name="user_id" ref="base.user_root"/>
<field name="stage_id" ref="crm.stage_lead4"/>
<field name="stage_id" ref="crm.stage_lead6"/>
<field eval="1" name="active"/>
<field name="date_closed" eval="(DateTime.today() - relativedelta(months=3)).strftime('%Y-%m-%d %H:%M')"/>
</record>
<record id="crm_case_20" model="crm.lead">
@ -468,10 +475,11 @@ Andrew</field>
<field name="categ_ids" eval="[(6, 0, [categ_oppor7])]"/>
<field name="channel_id" ref="crm_case_channel_phone"/>
<field name="priority">3</field>
<field name="section_id" ref="crm_case_section_4"/>
<field name="section_id" ref="crm_case_section_2"/>
<field name="user_id" ref="base.user_root"/>
<field name="stage_id" ref="crm.stage_lead8"/>
<field name="stage_id" ref="crm.stage_lead6"/>
<field eval="1" name="active"/>
<field name="date_closed" eval="(DateTime.today() - relativedelta(months=1)).strftime('%Y-%m-%d %H:%M')"/>
</record>
<record id="crm_case_22" model="crm.lead">
@ -486,7 +494,7 @@ Andrew</field>
<field name="categ_ids" eval="[(6, 0, [categ_oppor3])]"/>
<field name="channel_id" ref="crm_case_channel_email"/>
<field name="priority">3</field>
<field name="section_id" ref="crm_case_section_4"/>
<field name="section_id" ref="crm_case_section_2"/>
<field name="user_id" ref="base.user_root"/>
<field name="stage_id" ref="crm.stage_lead8"/>
<field eval="1" name="active"/>
@ -504,14 +512,15 @@ Andrew</field>
<field name="priority">5</field>
<field name="section_id" ref="section_sales_department"/>
<field name="user_id" ref="base.user_demo"/>
<field name="stage_id" ref="crm.stage_lead5"/>
<field name="stage_id" ref="crm.stage_lead6"/>
<field eval="1" name="active"/>
<field name="date_closed" eval="(DateTime.today() - relativedelta(hours=1)).strftime('%Y-%m-%d %H:%M')"/>
</record>
<record id="crm_case_24" model="crm.lead">
<field name="type">opportunity</field>
<field name="name">Need 20 Days of Consultancy</field>
<field eval="5025" name="planned_revenue"/>
<field eval="6025" name="planned_revenue"/>
<field eval="90.0" name="probability"/>
<field name="email_from">info@mycompany.net</field>
<field name="country_id" ref="base.pe"/>
@ -525,6 +534,7 @@ Andrew</field>
<field name="user_id" ref="base.user_root"/>
<field name="stage_id" ref="crm.stage_lead6"/>
<field eval="1" name="active"/>
<field name="date_closed" eval="(DateTime.today() - relativedelta(month=1)).strftime('%Y-%m-%d %H:%M')"/>
</record>
<record id="crm_case_25" model="crm.lead">
@ -544,7 +554,7 @@ Andrew</field>
<field name="categ_ids" eval="[(6, 0, [categ_oppor4])]"/>
<field name="priority">2</field>
<field name="title_action">Conf call with technical service</field>
<field name="section_id" ref="crm_case_section_2"/>
<field name="section_id" ref="crm_case_section_1"/>
<field name="user_id" ref="base.user_root"/>
<field name="stage_id" ref="crm.stage_lead4"/>
<field eval="1" name="active"/>
@ -569,10 +579,11 @@ Andrew</field>
<field eval="time.strftime('%Y-%m-23')" name="date_deadline"/>
<field eval="time.strftime('%Y-%m-10')" name="date_action"/>
<field name="title_action">Send Catalogue by Email</field>
<field name="section_id" ref="crm_case_section_4"/>
<field name="section_id" ref="crm_case_section_2"/>
<field name="user_id" ref="base.user_demo"/>
<field name="stage_id" ref="crm.stage_lead3"/>
<field name="stage_id" ref="crm.stage_lead6"/>
<field eval="1" name="active"/>
<field name="date_closed" eval="(DateTime.today() - relativedelta(hours=1)).strftime('%Y-%m-%d %H:%M')"/>
</record>
<!-- Unsubscribe Admin from case15, subscribe Demo -->

View File

@ -157,7 +157,8 @@
<label for="section_id" groups="base.group_multi_salesteams"/>
<div groups="base.group_multi_salesteams">
<field name="section_id"/>
<button name="case_escalate" string="Escalate" type="object"
<button name="case_escalate" string="Escalate"
type="object" class="oe_link"
attrs="{'invisible': ['|', ('section_id','=',False), ('state', 'not in', ['draft','open','pending'])]}"/>
</div>
<field name="type" invisible="1"/>
@ -343,7 +344,7 @@
help="Leads that are assigned to me"/>
<filter string="Assigned to My Team(s)"
domain="[('section_id.member_ids', 'in', [uid])]" context="{'invisible_section': False}"
help="Leads that are assigned to any sales teams I am member of"/>
help="Leads that are assigned to any sales teams I am member of" groups="base.group_multi_salesteams"/>
<separator />
<filter string="Available for mass mailing"
name='not_opt_out' domain="[('opt_out', '=', False)]"
@ -351,7 +352,7 @@
<separator />
<group expand="0" string="Group By...">
<filter string="Salesperson" domain="[]" context="{'group_by':'user_id'}"/>
<filter string="Team" domain="[]" context="{'group_by':'section_id'}"/>
<filter string="Team" domain="[]" context="{'group_by':'section_id'}" groups="base.group_multi_salesteams"/>
<filter string="Stage" domain="[]" context="{'group_by':'stage_id'}"/>
<filter string="Customer" help="Partner" domain="[]" context="{'group_by':'partner_id'}"/>
<filter string="Country" domain="[]" context="{'group_by':'country_id'}"/>
@ -362,7 +363,7 @@
</group>
<group string="Display">
<filter string="Show Countries" context="{'invisible_country': False}" help="Show Countries"/>
<filter string="Show Sales Team" context="{'invisible_section': False}" domain="[]" help="Show Sales Team"/>
<filter string="Show Sales Team" context="{'invisible_section': False}" domain="[]" help="Show Sales Team" groups="base.group_multi_salesteams"/>
</group>
</search>
</field>
@ -556,7 +557,7 @@
<filter string="Lost" name="lost" domain="[('state','=','cancel')]"/>
<filter string="Unassigned" name="unassigned" domain="[('user_id','=', False)]" help="No salesperson"/>
<filter string="Unread Messages" name="message_unread" domain="[('message_unread','=',True)]" help="Unread messages"/>
<filter string="Mine" name="assigned_to_me"
<filter string="My Opportunities" name="assigned_to_me"
domain="[('user_id','=',uid)]" context="{'invisible_section': False}"
help="Opportunities that are assigned to me"/>
<filter string="Assigned to My Team(s)"
@ -577,7 +578,7 @@
<filter string="Creation" domain="[]" context="{'group_by':'create_date'}"/>
</group>
<group string="Display">
<filter string="Show Sales Team" context="{'invisible_section': False}" domain="[]" help="Show Sales Team"/>
<filter string="Show Sales Team" context="{'invisible_section': False}" domain="[]" help="Show Sales Team" groups="base.group_multi_salesteams"/>
<filter string="Show Countries" context="{'invisible_country': False}" help="Show Countries"/>
</group>
</search>

View File

@ -37,7 +37,7 @@
<field name="name">Ask for convenient time of meeting</field>
<field name="state">open</field>
<field name="partner_phone">+1 786 525 0724</field>
<field name="section_id" ref="crm.crm_case_section_3"/>
<field name="section_id" ref="crm.crm_case_section_2"/>
<field eval="1" name="active"/>
<field name="categ_id" ref="crm.categ_phone2"/>
<field eval="5.0" name="duration"/>
@ -50,7 +50,7 @@
<field name="state">done</field>
<field name="partner_phone">(077) 582-4035</field>
<field name="partner_mobile">(077) 341-3591</field>
<field name="section_id" ref="crm.crm_case_section_4"/>
<field name="section_id" ref="crm.crm_case_section_2"/>
<field eval="1" name="active"/>
<field name="categ_id" ref="crm.categ_phone1"/>
<field eval="5.45" name="duration"/>
@ -74,7 +74,7 @@
<field name="name">Proposal for discount offer</field>
<field name="state">open</field>
<field name="partner_phone">+34 230 953 485</field>
<field name="section_id" ref="crm.crm_case_section_3"/>
<field name="section_id" ref="crm.crm_case_section_2"/>
<field eval="time.strftime('%Y-%m-28 14:15:30')" name="date"/>
<field name="categ_id" ref="crm.categ_phone2"/>
<field eval="8.56" name="duration"/>

View File

@ -101,7 +101,7 @@
<field name="type"/>
<field name="on_change"/>
<field name="sequence"/>
<field name="case_default"/>
<field name="case_default" groups="base.group_multi_salesteams"/>
<field name="fold"/>
</group>
<separator string="Requirements"/>

View File

@ -9,7 +9,6 @@
<a href="https://www.openerp.com/saas_master/demo?lang=en_US&module=crm">
<img src="crm_sc_01.png">
</a>
<span class="oe_demo_play">&nbsp;</span>
<div class="oe_demo_footer oe_centeralign">Online Demo</div>
</div>
</div>

View File

@ -60,24 +60,24 @@
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Prospect Opportunity&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Creating business opportunities from Leads&quot;&quot;&quot;" name="note"/>
<field model="process.node" name="target_node_id" ref="process_node_opportunities0"/>
<field model="process.node" name="source_node_id" ref="process_node_leads0"/>
<field name="target_node_id" ref="process_node_opportunities0"/>
<field name="source_node_id" ref="process_node_leads0"/>
</record>
<record id="process_transition_leadpartner0" model="process.transition">
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Prospect Partner&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Prospect is converting to business partner&quot;&quot;&quot;" name="note"/>
<field model="process.node" name="target_node_id" ref="process_node_partner0"/>
<field model="process.node" name="source_node_id" ref="process_node_leads0"/>
<field name="target_node_id" ref="process_node_partner0"/>
<field name="source_node_id" ref="process_node_leads0"/>
</record>
<record id="process_transition_opportunitymeeting0" model="process.transition">
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Opportunity Meeting&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Normal or phone meeting for opportunity&quot;&quot;&quot;" name="note"/>
<field model="process.node" name="target_node_id" ref="process_node_meeting0"/>
<field model="process.node" name="source_node_id" ref="process_node_opportunities0"/>
<field name="target_node_id" ref="process_node_meeting0"/>
<field name="source_node_id" ref="process_node_opportunities0"/>
</record>
</data>

View File

@ -75,7 +75,7 @@
<filter icon="terp-dialog-close" string="Closed" domain="[('state','=','done')]" help="Leads/Opportunities which are in done state"/>
<separator/>
<filter string="My Sales Team(s)" icon="terp-personal+" context="{'invisible_section': False}" domain="[('section_id.user_id','=',uid)]"
help="Leads/Opportunities that are assigned to one of the sale teams I manage"/>
help="Leads/Opportunities that are assigned to one of the sale teams I manage" groups="base.group_multi_salesteams"/>
<separator/>
<filter icon="terp-personal" string="My Case(s)" help="Leads/Opportunities that are assigned to me" domain="[('user_id','=',uid)]"/>
<field name="section_id" context="{'invisible_section': False}"

View File

@ -57,7 +57,7 @@
help="Phone calls which are in pending state"/>
<separator/>
<filter string="My Sales Team(s)" icon="terp-personal+" context="{'invisible_section': False}" domain="[('section_id.user_id','=',uid)]"
help="Phone calls that are assigned to one of the sale teams I manage"/>
help="Phone calls that are assigned to one of the sale teams I manage" groups="base.group_multi_salesteams"/>
<separator/>
<filter icon="terp-personal" string="My Phone Calls" help="Phone Calls that are assigned to me" domain="[('user_id','=',uid)]" />
<field name="section_id" string="Sales Team" context="{'invisible_section': False}"

View File

@ -22,9 +22,9 @@
</div>
</div>
</group>
<separator string="Sales Teams Configuration"/>
<separator string="Sales Teams"/>
<group>
<label for="id" string="Use Sales Teams"/>
<label for="id" string="Manage Sales Teams"/>
<div>
<field name="group_multi_salesteams" class="oe_inline"/>
<label for="group_multi_salesteams"/>

View File

@ -12,7 +12,7 @@ access_crm_phonecall_manager,crm.phonecall.manager,model_crm_phonecall,base.grou
access_crm_case_categ,crm.case.categ,model_crm_case_categ,base.group_user,1,0,0,0
access_crm_lead,crm.lead,model_crm_lead,base.group_sale_salesman,1,1,1,0
access_crm_phonecall,crm.phonecall,model_crm_phonecall,base.group_sale_salesman,1,1,1,0
access_crm_case_section_user,crm.case.section.user,model_crm_case_section,base.group_sale_salesman,1,1,1,0
access_crm_case_section_user,crm.case.section.user,model_crm_case_section,base.group_sale_salesman,1,0,0,0
access_crm_case_section_manager,crm.case.section.manager,model_crm_case_section,base.group_sale_manager,1,1,1,1
access_crm_case_stage,crm.case.stage,model_crm_case_stage,,1,0,0,0
access_crm_case_stage_manager,crm.case.stage,model_crm_case_stage,base.group_sale_manager,1,1,1,1

1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
12 access_crm_case_categ crm.case.categ model_crm_case_categ base.group_user 1 0 0 0
13 access_crm_lead crm.lead model_crm_lead base.group_sale_salesman 1 1 1 0
14 access_crm_phonecall crm.phonecall model_crm_phonecall base.group_sale_salesman 1 1 1 0
15 access_crm_case_section_user crm.case.section.user model_crm_case_section base.group_sale_salesman 1 1 0 1 0 0
16 access_crm_case_section_manager crm.case.section.manager model_crm_case_section base.group_sale_manager 1 1 1 1
17 access_crm_case_stage crm.case.stage model_crm_case_stage 1 0 0 0
18 access_crm_case_stage_manager crm.case.stage model_crm_case_stage base.group_sale_manager 1 1 1 1

File diff suppressed because it is too large Load Diff

View File

@ -20,15 +20,27 @@
}
.openerp .oe_kanban_view .oe_kanban_crm_salesteams .oe_items_list {
margin: 10px 0;
position: relative;
margin: 10px;
}
.openerp .oe_kanban_view .oe_kanban_crm_salesteams .oe_items_list a {
width: 110px;
.openerp .oe_kanban_view .oe_kanban_crm_salesteams .oe_items_list div {
width: 160px;
height: 22px;
margin: 0 !important;
position: relative;
display: inline-block;
}
.openerp .oe_kanban_view .oe_kanban_crm_salesteams .oe_items_list a:hover {
text-decoration: underline !important;
}
.openerp .oe_kanban_view .oe_kanban_crm_salesteams .oe_items_list div a:nth-child(2n) {
position: absolute;
left: 90px;
top: 0;
}
.openerp .oe_kanban_view .oe_kanban_crm_salesteams .oe_items_list div:nth-child(2n) a:nth-child(2n) {
left: 110px;
}
.openerp .oe_kanban_view .oe_kanban_crm_salesteams .oe_center {
text-align: center;
margin: 3px 0;
@ -40,3 +52,13 @@
.openerp .oe_kanban_view .oe_kanban_crm_salesteams .oe_center .oe_subsum {
font-size: 10px;
}
.openerp .oe_kanban_view .oe_justgage {
color: black;
display: inline-block;
}
.openerp .oe_kanban_view .oe_sparkline_bar {
height: 20px;
width: 36px;
}

View File

@ -1,11 +0,0 @@
openerp.crm = function(openerp) {
openerp.web_kanban.KanbanRecord.include({
on_card_clicked: function() {
if (this.view.dataset.model === 'crm.case.section') {
this.$('.oe_kanban_crm_salesteams_list a').first().click();
} else {
this._super.apply(this, arguments);
}
},
});
};

View File

@ -0,0 +1,34 @@
openerp.crm = function(openerp) {
openerp.web_kanban.KanbanRecord.include({
on_card_clicked: function() {
if (this.view.dataset.model === 'crm.case.section') {
this.$('.oe_kanban_crm_salesteams_list a').first().click();
} else {
this._super.apply(this, arguments);
}
},
});
openerp.crm.SparklineBarWidget = openerp.web_kanban.AbstractField.extend({
className: "oe_sparkline_bar",
start: function() {
var self = this;
var title = this.$node.html();
setTimeout(function () {
var value = _.pluck(self.field.value, 'value');
var tooltips = _.pluck(self.field.value, 'tooltip');
self.$el.sparkline(value, {
type: 'bar',
barWidth: 5,
tooltipFormat: '{{offset:offset}} {{value}}',
tooltipValueLookups: {
'offset': tooltips
},
});
self.$el.tipsy({'delayIn': 0, 'html': true, 'title': function(){return title}, 'gravity': 'n'});
}, 0);
},
});
openerp.web_kanban.fields_registry.add("sparkline_bar", "openerp.crm.SparklineBarWidget");
};

View File

@ -1,7 +1,9 @@
-
I cancel unqualified lead.
I set a new sale team (with Marketing at parent) and I cancel unqualified lead .
-
!python {model: crm.lead}: |
section_id = self.pool.get('crm.case.section').create(cr, uid, {'name': "Phone Marketing", 'parent_id': ref("crm.crm_case_section_2")})
self.write(cr, uid, [ref("crm_case_1")], {'section_id': section_id})
self.case_cancel(cr, uid, [ref("crm_case_1")])
-
I check cancelled lead.
@ -42,4 +44,4 @@
I check the lead is correctly escalated to the parent team.
-
!assert {model: crm.lead, id: crm.crm_case_1, string: Escalate lead to parent team}:
- section_id.name == "Support Department"
- section_id.name == "Marketing"

View File

@ -55,7 +55,7 @@
<filter icon="terp-camera_test" string="Open" domain="[('state','=','open')]"/>
<filter icon="terp-gtk-media-pause" string="Pending" domain="[('state','=','pending')]"/>
<separator/>
<filter string="My Sales Team(s)" icon="terp-personal+" context="{'invisible_section': False}" domain="[('section_id.user_id','=',uid)]" help="My Sales Team(s)" />
<filter string="My Sales Team(s)" icon="terp-personal+" context="{'invisible_section': False}" domain="[('section_id.user_id','=',uid)]" help="My Sales Team(s)" groups="base.group_multi_salesteams"/>
<separator/>
<filter string="My Company" icon="terp-go-home" context="{'invisible_section': False}" domain="[('section_id.user_id.company_id','=',uid)]" help="My company"/>
<separator/>
@ -78,7 +78,7 @@
</group>
<group expand="1" string="Group By...">
<filter string="Salesperson" name="Salesperson" icon="terp-personal" domain="[]" context="{'group_by':'user_id'}" />
<filter string="Sales Team" icon="terp-personal+" domain="[]" context="{'group_by':'section_id'}" />
<filter string="Sales Team" icon="terp-personal+" domain="[]" context="{'group_by':'section_id'}" groups="base.group_multi_salesteams"/>
<filter string="Partner" name="partner" icon="terp-partner" domain="[]" context="{'group_by':'partner_id'}" />
<filter string="Stage" icon="terp-stage" domain="[]" context="{'group_by':'stage_id'}" />
<filter string="Priority" icon="terp-rating-rated" domain="[]" context="{'group_by':'priority'}" />

View File

@ -151,14 +151,14 @@
<filter icon="terp-gtk-media-pause" string="Pending" domain="[('state','=','pending')]" help="All pending Helpdesk Request" />
<separator/>
<filter string="Assigned to Me or My Sales Team(s)" icon="terp-personal+" domain="['|', ('section_id.user_id','=',uid), ('section_id.member_ids', 'in', [uid])]"
help="Helpdesk requests that are assigned to me or to one of the sale teams I manage" />
help="Helpdesk requests that are assigned to me or to one of the sale teams I manage" groups="base.group_multi_salesteams"/>
<field name="partner_id" filter_domain="[('partner_id','child_of',self)]"/>
<field name="user_id"/>
<field name="section_id" string="Sales Team" groups="base.group_multi_salesteams"/>
<group expand="0" string="Group By...">
<filter string="Partner" icon="terp-partner" domain="[]" help="Partner" context="{'group_by':'partner_id'}" />
<filter string="Responsible" icon="terp-personal" domain="[]" help="Responsible User" context="{'group_by':'user_id'}" />
<filter string="Sales Team" icon="terp-personal+" domain="[]" help="Sales Team" context="{'group_by':'section_id'}" />
<filter string="Sales Team" icon="terp-personal+" domain="[]" help="Sales Team" context="{'group_by':'section_id'}" groups="base.group_multi_salesteams"/>
<filter string="Priority" icon="terp-rating-rated" domain="[]" context="{'group_by':'priority'}" />
<filter string="Status" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}" />
<filter string="Date" icon="terp-go-month" domain="[]" help="Request Date" context="{'group_by':'date'}" />

View File

@ -56,7 +56,7 @@
<separator/>
<filter icon="terp-personal" string="My Case(s)" help="My Case(s)" domain="[('user_id','=',uid)]" />
<separator/>
<filter string="My Sales Team(s)" icon="terp-personal+" context="{'invisible_section': False}" domain="[('section_id.user_id','=',uid)]" help="My Sales Team(s)" />
<filter string="My Sales Team(s)" icon="terp-personal+" context="{'invisible_section': False}" domain="[('section_id.user_id','=',uid)]" help="My Sales Team(s)" groups="base.group_multi_salesteams"/>
<separator/>
<filter string="My Company" icon="terp-go-home" context="{'invisible_section': False}" domain="[('section_id.user_id.company_id','=',uid)]" help="My company"/>
<field name="user_id" string="Salesperson"/>
@ -71,7 +71,7 @@
</group>
<group expand="1" string="Group By...">
<filter string="Salesperson" icon="terp-personal" domain="[]" context="{'group_by':'user_id'}"/>
<filter string="Sales Team" icon="terp-personal+" domain="[]" context="{'group_by':'section_id'}" />
<filter string="Sales Team" icon="terp-personal+" domain="[]" context="{'group_by':'section_id'}" groups="base.group_multi_salesteams"/>
<filter string="Partner" icon="terp-partner" domain="[]" context="{'group_by':'partner_id'}" />
<filter string="Channel" icon="terp-call-start" domain="[]" context="{'group_by':'channel_id'}" />
<filter string="Status" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}" />

View File

@ -3,7 +3,7 @@ Date: Tue, 25 Oct 2011 13:41:17 +0530
From: Mr. John Right <info@customer.com>
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.14) Gecko/20110223 Lightning/1.0b2 Thunderbird/3.1.8
MIME-Version: 1.0
To: info@my.com
To: _helpdesk@my.com
Subject: Where is download link of user manual of your product ?
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit

View File

@ -124,6 +124,7 @@ class crm_lead_forward_to_partner(osv.TransientModel):
lead_ids = context and context.get('active_ids', []) or []
value = self.default_get(cr, uid, ['body', 'email_to', 'email_cc', 'subject', 'history_mode'], context=context)
value.pop('composition_mode')
self.pool.get('crm.lead').message_subscribe(cr, uid, lead_ids, [partner.id for partner in wizard.partner_ids], context=context)
self.write(cr, uid, ids, value, context=context)
return self.send_mail(cr, uid, ids, context=context)

View File

@ -26,6 +26,7 @@
<tree string="Document Page">
<field name="name"/>
<field name="parent_id"/>
<field name="create_uid" invisible="1"/>
<field name="write_uid"/>
<field name="write_date"/>
</tree>

View File

@ -1,4 +1,3 @@
<?xml version="1.0"?>
<openerp>
<data noupdate="1">
<!--This file contains a typical setup of a WebDAV folders' structure,
@ -25,7 +24,7 @@
<field eval="0" name="ressource_tree"/>
<field name="user_id" eval="False"/>
<field name="company_id" ref="base.main_company"/>
<field model="document.directory" name="parent_id" ref="document_directory_principals0"/>
<field name="parent_id" ref="document_directory_principals0"/>
<field name="type">directory</field>
<field eval="[(6,0,[])]" name="group_ids"/>
<field name="name">groups</field>
@ -36,7 +35,7 @@
<field eval="1" name="resource_find_all"/>
<field eval="0" name="ressource_tree"/>
<field name="company_id" ref="base.main_company"/>
<field model="document.directory" name="parent_id" ref="document_directory_principals0"/>
<field name="parent_id" ref="document_directory_principals0"/>
<field name="type">directory</field>
<field eval="[(6,0,[])]" name="group_ids"/>
<field name="name">resources</field>
@ -48,7 +47,7 @@
<field name="user_id" eval="False"/>
<field name="resource_field" ref="base.field_res_users_login"/>
<field name="company_id" ref="base.main_company"/>
<field model="document.directory" name="parent_id" ref="document_directory_principals0"/>
<field name="parent_id" ref="document_directory_principals0"/>
<field name="type">ressource</field>
<field name="ressource_type_id" ref="base.model_res_users"/>
<field eval="[(6,0,[])]" name="group_ids"/>
@ -61,7 +60,7 @@
<field name="user_id" eval="False"/>
<field name="resource_field" ref="base.field_res_users_login"/>
<field name="company_id" ref="base.main_company"/>
<field model="document.directory" name="parent_id" ref="document_directory_principals0"/>
<field name="parent_id" ref="document_directory_principals0"/>
<field name="type">ressource</field>
<field name="ressource_type_id" ref="base.model_res_users"/>
<field eval="[(6,0,[])]" name="group_ids"/>
@ -72,7 +71,7 @@
<field eval="1" name="resource_find_all"/>
<field eval="0" name="ressource_tree"/>
<field name="company_id" ref="base.main_company"/>
<field model="document.directory" name="parent_id" ref="document_directory_principals0"/>
<field name="parent_id" ref="document_directory_principals0"/>
<field name="type">directory</field>
<field eval="[(6,0,[])]" name="group_ids"/>
<field name="name">locations</field>
@ -91,4 +90,4 @@
</record>
</data>
</openerp>
</openerp>

View File

@ -358,7 +358,7 @@ class email_template(osv.osv):
values['attachment_ids'] = attachment_ids
return values
def send_mail(self, cr, uid, template_id, res_id, force_send=False, context=None):
def send_mail(self, cr, uid, template_id, res_id, force_send=False, raise_exception=False, context=None):
"""Generates a new mail message for the given template and record,
and schedules it for delivery through the ``mail`` module's scheduler.
@ -400,7 +400,7 @@ class email_template(osv.osv):
mail_mail.write(cr, uid, msg_id, {'attachment_ids': [(6, 0, attachment_ids)]}, context=context)
if force_send:
mail_mail.send(cr, uid, [msg_id], context=context)
mail_mail.send(cr, uid, [msg_id], raise_exception=raise_exception, context=context)
return msg_id
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -8,14 +8,14 @@ msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2012-12-21 17:05+0000\n"
"PO-Revision-Date: 2013-05-30 13:33+0000\n"
"PO-Revision-Date: 2013-06-05 07:10+0000\n"
"Last-Translator: Chertykov Denis <chertykov@gmail.com>\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: 2013-05-31 05:38+0000\n"
"X-Generator: Launchpad (build 16660)\n"
"X-Launchpad-Export-Date: 2013-06-06 05:21+0000\n"
"X-Generator: Launchpad (build 16667)\n"
#. module: email_template
#: field:email.template,email_from:0
@ -254,7 +254,7 @@ msgstr "Просмотр"
#. module: email_template
#: view:email_template.preview:0
msgid "Using sample document"
msgstr ""
msgstr "Используя образец документа"
#. module: email_template
#: view:email.template:0

View File

@ -1,3 +1,2 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_fetchmail_server,fetchmail.server,model_fetchmail_server,,1,0,0,0
access_fetchmail_server,fetchmail.server,model_fetchmail_server,base.group_system,1,1,1,1

1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
access_fetchmail_server fetchmail.server model_fetchmail_server 1 0 0 0
2 access_fetchmail_server fetchmail.server model_fetchmail_server base.group_system 1 1 1 1

View File

@ -8,14 +8,14 @@ msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2012-12-21 17:06+0000\n"
"PO-Revision-Date: 2013-01-06 11:09+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"PO-Revision-Date: 2013-06-03 05:25+0000\n"
"Last-Translator: Armin GREGOR <armin.gregor@gmail.com>\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: 2013-03-16 05:52+0000\n"
"X-Generator: Launchpad (build 16532)\n"
"X-Launchpad-Export-Date: 2013-06-04 05:20+0000\n"
"X-Generator: Launchpad (build 16660)\n"
#. module: fleet
#: selection:fleet.vehicle,fuel_type:0
@ -35,7 +35,7 @@ msgstr "Ersatz Kälteklimakompressor"
#. module: fleet
#: help:fleet.vehicle,vin_sn:0
msgid "Unique number written on the vehicle motor (VIN/SN number)"
msgstr "Eindeutige Fahrzeug-Identifizierungsnummer (FIN)"
msgstr "Fahrgestellnummer"
#. module: fleet
#: selection:fleet.service.type,category:0
@ -157,7 +157,7 @@ msgstr "Batterie Inspektion"
#. module: fleet
#: field:fleet.vehicle,company_id:0
msgid "Company"
msgstr "Unternehmen"
msgstr "Firma"
#. module: fleet
#: view:fleet.vehicle.log.contract:0
@ -324,7 +324,7 @@ msgstr "Ersatz Luftfilter"
#. module: fleet
#: model:ir.model,name:fleet.model_fleet_vehicle_tag
msgid "fleet.vehicle.tag"
msgstr ""
msgstr "fleet.vehicle.tag"
#. module: fleet
#: view:fleet.vehicle:0
@ -339,7 +339,7 @@ msgstr "Bezeichnung des zu erneuernden Vertrags"
#. module: fleet
#: model:fleet.vehicle.tag,name:fleet.vehicle_tag_senior
msgid "Senior"
msgstr ""
msgstr "Senior"
#. module: fleet
#: help:fleet.vehicle.log.contract,state:0
@ -490,6 +490,8 @@ msgid ""
"$('.oe_picture').load(function() { if($(this).width() > $(this).height()) { "
"$(this).addClass('oe_employee_picture_wide') } });"
msgstr ""
"$('.oe_picture').load(function() { if($(this).width() > $(this).height()) { "
"$(this).addClass('oe_employee_picture_wide') } });"
#. module: fleet
#: view:board.board:0
@ -737,7 +739,7 @@ msgstr "Aktueller Fahrzeugzustand"
#. module: fleet
#: selection:fleet.vehicle,transmission:0
msgid "Manual"
msgstr "Betriebsanleitung"
msgstr "Handbuch"
#. module: fleet
#: model:fleet.service.type,name:fleet.type_service_52
@ -917,7 +919,7 @@ msgstr "Kaufdatum des Fahrzeugs"
#. module: fleet
#: view:fleet.vehicle.model:0
msgid "Models"
msgstr "Modell"
msgstr "Modelle"
#. module: fleet
#: view:fleet.vehicle.log.contract:0
@ -1055,7 +1057,7 @@ msgstr "Kraftstoffart"
#. module: fleet
#: model:fleet.service.type,name:fleet.type_service_22
msgid "Fuel Injector Replacement"
msgstr "Ersatz Einfüllstutzen"
msgstr "Ersatz Einspritzdüse"
#. module: fleet
#: model:ir.actions.act_window,name:fleet.fleet_vehicle_state_act
@ -1101,7 +1103,7 @@ msgstr "Datum Vertragsbeginn"
#. module: fleet
#: selection:fleet.vehicle,fuel_type:0
msgid "Electric"
msgstr "Elektrisch"
msgstr "Elektrik"
#. module: fleet
#: field:fleet.vehicle,tag_ids:0
@ -1174,7 +1176,7 @@ msgstr "Ersatz Lichtmaschine"
#. module: fleet
#: model:fleet.service.type,name:fleet.type_service_3
msgid "A/C Diagnosis"
msgstr "Diagnose Batterie"
msgstr "Diagnose Klimaanlage"
#. module: fleet
#: model:fleet.service.type,name:fleet.type_service_23
@ -1199,7 +1201,7 @@ msgstr "Ersatz Wärmepumpe"
#. module: fleet
#: view:fleet.vehicle:0
msgid "show all the costs for this vehicle"
msgstr "gesamte Kostenübersicht der Fahrzeuge"
msgstr "gesamte Kostenübersicht des Fahrzeugs"
#. module: fleet
#: view:fleet.vehicle.odometer:0
@ -1534,7 +1536,7 @@ msgstr "Achsvermessung"
#. module: fleet
#: model:fleet.vehicle.tag,name:fleet.vehicle_tag_purchased
msgid "Purchased"
msgstr "Ersatzteil"
msgstr "Eingekauft"
#. module: fleet
#: model:ir.actions.act_window,help:fleet.fleet_vehicle_odometer_act
@ -1747,7 +1749,7 @@ msgstr "Preis"
#: field:fleet.vehicle.cost,odometer:0
#: field:fleet.vehicle.odometer,value:0
msgid "Odometer Value"
msgstr "Tachostand"
msgstr "Kilometerstand"
#. module: fleet
#: view:fleet.vehicle:0
@ -1805,7 +1807,7 @@ msgstr "Schreiben Sie hier alle erforderlichen Zusatzinformationen auf."
#. module: fleet
#: model:fleet.service.type,name:fleet.type_service_29
msgid "Ignition Coil Replacement"
msgstr "Ersatz Zündkerzen"
msgstr "Ersatz Zündspule"
#. module: fleet
#: model:fleet.service.type,name:fleet.type_service_service_16
@ -1815,7 +1817,7 @@ msgstr "Optionen"
#. module: fleet
#: model:fleet.service.type,name:fleet.type_contract_repairing
msgid "Repairing"
msgstr "Reparieren"
msgstr "Wird repariert"
#. module: fleet
#: model:ir.actions.act_window,name:fleet.action_fleet_reporting_costs
@ -1853,7 +1855,7 @@ msgstr "Getriebe"
#. module: fleet
#: field:fleet.vehicle,vin_sn:0
msgid "Chassis Number"
msgstr "Fahrzeuqinformationsnummer"
msgstr "Fahrgestellnummer"
#. module: fleet
#: help:fleet.vehicle,color:0
@ -2009,7 +2011,7 @@ msgstr "Reifenwechsel"
#. module: fleet
#: model:fleet.service.type,name:fleet.type_service_42
msgid "Starter Replacement"
msgstr "Erstinspektion"
msgstr "Ersatz Anlasser"
#. module: fleet
#: view:fleet.vehicle.cost:0

View File

@ -0,0 +1,188 @@
# Lingala translation for openobject-addons
# Copyright (c) 2013 Rosetta Contributors and Canonical Ltd 2013
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2013.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2012-12-21 17:05+0000\n"
"PO-Revision-Date: 2013-06-05 13:00+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Lingala <ln@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: 2013-06-06 05:21+0000\n"
"X-Generator: Launchpad (build 16667)\n"
#. module: google_docs
#: code:addons/google_docs/google_docs.py:167
#, python-format
msgid "Key Error!"
msgstr ""
#. module: google_docs
#: view:google.docs.config:0
msgid ""
"for a presentation (slide show) document with url like "
"`https://docs.google.com/a/openerp.com/presentation/d/123456789/edit#slide=id"
".p`, the ID is `presentation:123456789`"
msgstr ""
#. module: google_docs
#: view:google.docs.config:0
msgid ""
"for a text document with url like "
"`https://docs.google.com/a/openerp.com/document/d/123456789/edit`, the ID is "
"`document:123456789`"
msgstr ""
#. module: google_docs
#: field:google.docs.config,gdocs_resource_id:0
msgid "Google Resource ID to Use as Template"
msgstr ""
#. module: google_docs
#: view:google.docs.config:0
msgid ""
"for a drawing document with url like "
"`https://docs.google.com/a/openerp.com/drawings/d/123456789/edit`, the ID is "
"`drawings:123456789`"
msgstr ""
#. module: google_docs
#. openerp-web
#: code:addons/google_docs/static/src/xml/gdocs.xml:6
#, python-format
msgid "Add Google Doc..."
msgstr ""
#. module: google_docs
#: view:google.docs.config:0
msgid ""
"This is the id of the template document, on google side. You can find it "
"thanks to its URL:"
msgstr ""
#. module: google_docs
#: model:ir.model,name:google_docs.model_google_docs_config
msgid "Google Docs templates config"
msgstr ""
#. module: google_docs
#. openerp-web
#: code:addons/google_docs/static/src/js/gdocs.js:25
#, python-format
msgid ""
"The user google credentials are not set yet. Contact your administrator for "
"help."
msgstr ""
#. module: google_docs
#: view:google.docs.config:0
msgid ""
"for a spreadsheet document with url like "
"`https://docs.google.com/a/openerp.com/spreadsheet/ccc?key=123456789#gid=0`, "
"the ID is `spreadsheet:123456789`"
msgstr ""
#. module: google_docs
#: code:addons/google_docs/google_docs.py:129
#, python-format
msgid ""
"Your resource id is not correct. You can find the id in the google docs URL."
msgstr ""
#. module: google_docs
#: code:addons/google_docs/google_docs.py:153
#, python-format
msgid "Creating google docs may only be done by one at a time."
msgstr ""
#. module: google_docs
#: code:addons/google_docs/google_docs.py:83
#: code:addons/google_docs/google_docs.py:129
#: code:addons/google_docs/google_docs.py:153
#, python-format
msgid "Google Docs Error!"
msgstr ""
#. module: google_docs
#: code:addons/google_docs/google_docs.py:83
#, python-format
msgid "Check your google configuration in Users/Users/Synchronization tab."
msgstr ""
#. module: google_docs
#: model:ir.ui.menu,name:google_docs.menu_gdocs_config
msgid "Google Docs configuration"
msgstr ""
#. module: google_docs
#: model:ir.actions.act_window,name:google_docs.action_google_docs_users_config
#: model:ir.ui.menu,name:google_docs.menu_gdocs_model_config
msgid "Models configuration"
msgstr ""
#. module: google_docs
#: field:google.docs.config,model_id:0
msgid "Model"
msgstr ""
#. module: google_docs
#. openerp-web
#: code:addons/google_docs/static/src/js/gdocs.js:28
#, python-format
msgid "User Google credentials are not yet set."
msgstr ""
#. module: google_docs
#: code:addons/google_docs/google_docs.py:167
#, python-format
msgid "Your Google Doc Name Pattern's key does not found in object."
msgstr ""
#. module: google_docs
#: help:google.docs.config,name_template:0
msgid ""
"Choose how the new google docs will be named, on google side. Eg. "
"gdoc_%(field_name)s"
msgstr ""
#. module: google_docs
#: view:google.docs.config:0
msgid "Google Docs Configuration"
msgstr ""
#. module: google_docs
#: help:google.docs.config,gdocs_resource_id:0
msgid ""
"\n"
"This is the id of the template document, on google side. You can find it "
"thanks to its URL: \n"
"*for a text document with url like "
"`https://docs.google.com/a/openerp.com/document/d/123456789/edit`, the ID is "
"`document:123456789`\n"
"*for a spreadsheet document with url like "
"`https://docs.google.com/a/openerp.com/spreadsheet/ccc?key=123456789#gid=0`, "
"the ID is `spreadsheet:123456789`\n"
"*for a presentation (slide show) document with url like "
"`https://docs.google.com/a/openerp.com/presentation/d/123456789/edit#slide=id"
".p`, the ID is `presentation:123456789`\n"
"*for a drawing document with url like "
"`https://docs.google.com/a/openerp.com/drawings/d/123456789/edit`, the ID is "
"`drawings:123456789`\n"
"...\n"
msgstr ""
#. module: google_docs
#: model:ir.model,name:google_docs.model_ir_attachment
msgid "ir.attachment"
msgstr ""
#. module: google_docs
#: field:google.docs.config,name_template:0
msgid "Google Doc Name Pattern"
msgstr ""

View File

@ -7,7 +7,6 @@
<a href="https://www.openerp.com/saas_master/demo?lang=en_US&module=hr">
<img src="hr_kanban.png">
</a>
<span class="oe_demo_play">&nbsp;</span>
<div class="oe_demo_footer oe_centeralign">Online Demo</div>
</div>
</div>

View File

@ -54,17 +54,17 @@
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Link a user to an employee&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;The Related user field on the Employee form allows to link the OpenERP user (and her rights) to the employee.&quot;&quot;&quot;" name="note"/>
<field model="process.node" name="target_node_id" ref="process_node_openerpuser0"/>
<field model="process.node" name="source_node_id" ref="process_node_employee0"/>
<field name="target_node_id" ref="process_node_openerpuser0"/>
<field name="source_node_id" ref="process_node_employee0"/>
</record>
<record id="process_transition_contactofemployee0" model="process.transition">
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Link the employee to information&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;In the Employee form, there are different kind of information like Contact information.&quot;&quot;&quot;" name="note"/>
<field model="process.node" name="target_node_id" ref="process_node_employeecontact0"/>
<field model="process.node" name="source_node_id" ref="process_node_employee0"/>
<field name="target_node_id" ref="process_node_employeecontact0"/>
<field name="source_node_id" ref="process_node_employee0"/>
</record>
</data>
</openerp>
</openerp>

View File

@ -25,13 +25,13 @@
<record id="hr_dept_comp_rule" model="ir.rule">
<field name="name">Department multi company rule</field>
<field model="ir.model" name="model_id" ref="model_hr_department"/>
<field name="model_id" ref="model_hr_department"/>
<field eval="True" name="global"/>
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
</record>
<record id="hr_job_comp_rule" model="ir.rule">
<field name="name">Job multi company rule</field>
<field model="ir.model" name="model_id" ref="model_hr_job"/>
<field name="model_id" ref="model_hr_job"/>
<field eval="True" name="global"/>
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
</record>

View File

@ -9,13 +9,13 @@
<record id="property_rule_attendace_manager" model="ir.rule">
<field name="name">Manager Attendance</field>
<field model="ir.model" name="model_id" ref="model_hr_attendance"/>
<field name="model_id" ref="model_hr_attendance"/>
<field name="domain_force">[(1,'=',1)]</field>
<field name="groups" eval="[(4,ref('base.group_hr_manager')), (4,ref('base.group_hr_user'))]"/>
</record>
<record id="property_rule_attendace_employee" model="ir.rule">
<field name="name">Employee Attendance</field>
<field model="ir.model" name="model_id" ref="model_hr_attendance"/>
<field name="model_id" ref="model_hr_attendance"/>
<field name="domain_force">[('employee_id.user_id','=',user.id)]</field>
<field name="groups" eval="[(4,ref('base.group_user'))]"/>
</record>

View File

@ -31,14 +31,14 @@
<record id="hr_evaluation_plan_comp_rule" model="ir.rule">
<field name="name">Evaluation Plan multi company rule</field>
<field model="ir.model" name="model_id" ref="model_hr_evaluation_plan"/>
<field name="model_id" ref="model_hr_evaluation_plan"/>
<field eval="True" name="global"/>
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
</record>
<record id="hr_evaluation_plan_phase_comp_rule" model="ir.rule">
<field name="name">Evaluation Plan Phase multi company rule</field>
<field model="ir.model" name="model_id" ref="model_hr_evaluation_plan_phase"/>
<field name="model_id" ref="model_hr_evaluation_plan_phase"/>
<field eval="True" name="global"/>
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
</record>

View File

@ -57,10 +57,7 @@ class hr_expense_expense(osv.osv):
def _get_currency(self, cr, uid, context=None):
user = self.pool.get('res.users').browse(cr, uid, [uid], context=context)[0]
if user.company_id:
return user.company_id.currency_id.id
else:
return self.pool.get('res.currency').search(cr, uid, [('rate','=',1.0)], context=context)[0]
return user.company_id.currency_id.id
_name = "hr.expense.expense"
_inherit = ['mail.thread']
@ -99,11 +96,13 @@ class hr_expense_expense(osv.osv):
('cancelled', 'Refused'),
('confirm', 'Waiting Approval'),
('accepted', 'Approved'),
('done', 'Done'),
('done', 'Waiting Payment'),
('paid', 'Paid'),
],
'Status', readonly=True, track_visibility='onchange',
help='When the expense request is created the status is \'Draft\'.\n It is confirmed by the user and request is sent to admin, the status is \'Waiting Confirmation\'.\
\nIf the admin accepts it, the status is \'Accepted\'.\n If a receipt is made for the expense request, the status is \'Done\'.'),
\nIf the admin accepts it, the status is \'Accepted\'.\n If the accounting entries are made for the expense request, the status is \'Waiting Payment\'.'),
}
_defaults = {
'company_id': lambda s, cr, uid, c: s.pool.get('res.company')._company_default_get(cr, uid, 'hr.employee', context=c),
@ -114,6 +113,12 @@ class hr_expense_expense(osv.osv):
'currency_id': _get_currency,
}
def copy(self, cr, uid, id, default=None, context=None):
if default is None:
default = {}
default.update(account_move_id=False)
return super(hr_expense_expense, self).copy(cr, uid, id, default=default, context=context)
def unlink(self, cr, uid, ids, context=None):
for rec in self.browse(cr, uid, ids, context=context):
if rec.state != 'draft':
@ -282,7 +287,6 @@ class hr_expense_expense(osv.osv):
tax_code_found= False
#Calculate tax according to default tax on product
taxes = []
#Taken from product_id_onchange in account.invoice
if line.product_id:
@ -319,8 +323,11 @@ class hr_expense_expense(osv.osv):
tax_code_found = True
res[-1]['tax_code_id'] = tax_code_id
res[-1]['tax_amount'] = cur_obj.compute(cr, uid, exp.currency_id.id, company_currency, tax_amount, context={'date': exp.date_confirm})
#Will create the tax here as we don't have the access
##
is_price_include = tax_obj.read(cr,uid,tax['id'],['price_include'],context)['price_include']
if is_price_include:
## We need to deduce the price for the tax
res[-1]['price'] = res[-1]['price'] - (tax['amount'] * tax['base_sign'] or 0.0)
assoc_tax = {
'type':'tax',
'name':tax['name'],
@ -449,4 +456,26 @@ class hr_expense_line(osv.osv):
return res
class account_move_line(osv.osv):
_inherit = "account.move.line"
def reconcile(self, cr, uid, ids, type='auto', writeoff_acc_id=False, writeoff_period_id=False, writeoff_journal_id=False, context=None):
res = super(account_move_line, self).reconcile(cr, uid, ids, type=type, writeoff_acc_id=writeoff_acc_id, writeoff_period_id=writeoff_period_id, writeoff_journal_id=writeoff_journal_id, context=context)
#when making a full reconciliation of account move lines 'ids', we may need to recompute the state of some hr.expense
account_move_ids = [aml.move_id.id for aml in self.browse(cr, uid, ids, context=context)]
expense_obj = self.pool.get('hr.expense.expense')
currency_obj = self.pool.get('res.currency')
if account_move_ids:
expense_ids = expense_obj.search(cr, uid, [('account_move_id', 'in', account_move_ids)], context=context)
for expense in expense_obj.browse(cr, uid, expense_ids, context=context):
if expense.state == 'done':
#making the postulate it has to be set paid, then trying to invalidate it
new_status_is_paid = True
for aml in expense.account_move_id.line_id:
if aml.account_id.type == 'payable' and not currency_obj.is_zero(cr, uid, expense.company_id.currency_id, aml.amount_residual):
new_status_is_paid = False
if new_status_is_paid:
expense_obj.write(cr, uid, [expense.id], {'state': 'paid'}, context=context)
return res
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -68,7 +68,7 @@
<button name="draft" states="confirm,cancelled" string="Set to Draft" type="workflow" groups="base.group_hr_user" />
<button name="done" states="accepted" string="Generate Accounting Entries" type="workflow" groups="account.group_account_invoice" class="oe_highlight"/>
<button name="action_view_move" states="done" string="Open Accounting Entries" type="object" groups="account.group_account_invoice"/>
<field name="state" widget="statusbar" statusbar_visible="draft,confirm,accepted,done" statusbar_colors='{"confirm":"blue","cancelled":"red"}'/>
<field name="state" widget="statusbar" statusbar_visible="draft,confirm,accepted,done,paid" statusbar_colors='{"confirm":"blue","cancelled":"red"}'/>
</header>
<sheet>
<group>

View File

@ -101,48 +101,48 @@
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Confirm expense&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Expense is confirmed.&quot;&quot;&quot;" name="note"/>
<field model="process.node" name="target_node_id" ref="process_node_confirmedexpenses0"/>
<field model="process.node" name="source_node_id" ref="process_node_draftexpenses0"/>
<field name="target_node_id" ref="process_node_confirmedexpenses0"/>
<field name="source_node_id" ref="process_node_draftexpenses0"/>
</record>
<record id="process_transition_refuseexpense0" model="process.transition">
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Refuse expense&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Expense is refused.&quot;&quot;&quot;" name="note"/>
<field model="process.node" name="target_node_id" ref="process_node_refused0"/>
<field model="process.node" name="source_node_id" ref="process_node_confirmedexpenses0"/>
<field name="target_node_id" ref="process_node_refused0"/>
<field name="source_node_id" ref="process_node_confirmedexpenses0"/>
</record>
<record id="process_transition_approveexpense0" model="process.transition">
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Approve expense&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Expense is approved.&quot;&quot;&quot;" name="note"/>
<field model="process.node" name="target_node_id" ref="process_node_approved0"/>
<field model="process.node" name="source_node_id" ref="process_node_confirmedexpenses0"/>
<field name="target_node_id" ref="process_node_approved0"/>
<field name="source_node_id" ref="process_node_confirmedexpenses0"/>
</record>
<record id="process_transition_approveinvoice0" model="process.transition">
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Supplier Invoice&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Creates supplier invoice.&quot;&quot;&quot;" name="note"/>
<field model="process.node" name="target_node_id" ref="process_node_supplierinvoice0"/>
<field model="process.node" name="source_node_id" ref="process_node_approved0"/>
<field name="target_node_id" ref="process_node_supplierinvoice0"/>
<field name="source_node_id" ref="process_node_approved0"/>
</record>
<record id="process_transition_reimburseexpense0" model="process.transition">
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Reimburse expense&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;After creating invoice, reimburse expenses&quot;&quot;&quot;" name="note"/>
<field model="process.node" name="target_node_id" ref="process_node_reimbursement0"/>
<field model="process.node" name="source_node_id" ref="process_node_supplierinvoice0"/>
<field name="target_node_id" ref="process_node_reimbursement0"/>
<field name="source_node_id" ref="process_node_supplierinvoice0"/>
</record>
<record id="process_transition_reimbursereinvoice0" model="process.transition">
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Reinvoice&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Create Customer invoice&quot;&quot;&quot;" name="note"/>
<field model="process.node" name="target_node_id" ref="process_node_reinvoicing0"/>
<field model="process.node" name="source_node_id" ref="process_node_reimbursement0"/>
<field name="target_node_id" ref="process_node_reinvoicing0"/>
<field name="source_node_id" ref="process_node_reimbursement0"/>
</record>
<!--
@ -178,4 +178,4 @@
</record>
</data>
</openerp>
</openerp>

View File

@ -4,19 +4,19 @@
<record id="property_rule_expense_manager" model="ir.rule">
<field name="name">Manager Expense</field>
<field model="ir.model" name="model_id" ref="model_hr_expense_expense"/>
<field name="model_id" ref="model_hr_expense_expense"/>
<field name="domain_force">[(1,'=',1)]</field>
<field name="groups" eval="[(4,ref('base.group_hr_manager')), (4,ref('base.group_hr_user'))]"/>
</record>
<record id="property_rule_expense_employee" model="ir.rule">
<field name="name">Employee Expense</field>
<field model="ir.model" name="model_id" ref="model_hr_expense_expense"/>
<field name="model_id" ref="model_hr_expense_expense"/>
<field name="domain_force">[('employee_id.user_id','=',user.id)]</field>
<field name="groups" eval="[(4,ref('base.group_user'))]"/>
</record>
<record id="hr_expense_comp_rule" model="ir.rule">
<field name="name">Expense multi company rule</field>
<field model="ir.model" name="model_id" ref="model_hr_expense_expense"/>
<field name="model_id" ref="model_hr_expense_expense"/>
<field eval="True" name="global"/>
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
</record>

View File

@ -40,8 +40,8 @@
<field name="name">Leave Request</field>
<field name="model">hr.holidays</field>
<field name="arch" type="xml">
<calendar string="Leave Request" color="user_id" date_start="date_from" date_stop="date_to">
<field name="user_id"/>
<calendar string="Leave Request" color="employee_id" date_start="date_from" date_stop="date_to">
<field name="employee_id"/>
<field name="holiday_status_id"/>
</calendar>
</field>

View File

@ -100,48 +100,48 @@
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Employee Declaration&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Document for employee&quot;&quot;&quot;" name="note"/>
<field model="process.node" name="target_node_id" ref="process_node_legaldeclaration0"/>
<field model="process.node" name="source_node_id" ref="hr.process_node_employee0"/>
<field name="target_node_id" ref="process_node_legaldeclaration0"/>
<field name="source_node_id" ref="hr.process_node_employee0"/>
</record>
<record id="process_transition_holidaysdefrequest0" model="process.transition">
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Holidays def Request&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;If holidays available, employee can take it and fill it.&quot;&quot;&quot;" name="note"/>
<field model="process.node" name="target_node_id" ref="process_node_holidaysrequest0"/>
<field model="process.node" name="source_node_id" ref="process_node_holidaysdefinition0"/>
<field name="target_node_id" ref="process_node_holidaysrequest0"/>
<field name="source_node_id" ref="process_node_holidaysdefinition0"/>
</record>
<record id="process_transition_refusedrequest0" model="process.transition">
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Refused Request&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Request is refused.&quot;&quot;&quot;" name="note"/>
<field model="process.node" name="target_node_id" ref="process_node_refused0"/>
<field model="process.node" name="source_node_id" ref="process_node_holidaysrequest0" />
<field name="target_node_id" ref="process_node_refused0"/>
<field name="source_node_id" ref="process_node_holidaysrequest0" />
</record>
<record id="process_transition_approvedrequest0" model="process.transition">
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Approved Request&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Request is approved.&quot;&quot;&quot;" name="note"/>
<field model="process.node" name="target_node_id" ref="process_node_approved0"/>
<field model="process.node" name="source_node_id" ref="process_node_holidaysrequest0"/>
<field name="target_node_id" ref="process_node_approved0"/>
<field name="source_node_id" ref="process_node_holidaysrequest0"/>
</record>
<record id="process_transition_setholiday0" model="process.transition">
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Set Holiday&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Holiday is set in the calendar.&quot;&quot;&quot;" name="note"/>
<field model="process.node" name="target_node_id" ref="process_node_calendar0"/>
<field model="process.node" name="source_node_id" ref="process_node_approved0"/>
<field name="target_node_id" ref="process_node_calendar0"/>
<field name="source_node_id" ref="process_node_approved0"/>
</record>
<record id="process_transition_employeeholidays0" model="process.transition">
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Employee Holidays&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Employee get holidays&quot;&quot;&quot;" name="note"/>
<field model="process.node" name="target_node_id" ref="process_node_holidays0"/>
<field model="process.node" name="source_node_id" ref="process_node_legaldeclaration0"/>
<field name="target_node_id" ref="process_node_holidays0"/>
<field name="source_node_id" ref="process_node_legaldeclaration0"/>
</record>
<!--
@ -170,4 +170,4 @@
</record>
</data>
</openerp>
</openerp>

View File

@ -3,14 +3,14 @@
<data>
<record id="property_rule_holidays_employee" model="ir.rule">
<field name="name">Employee Holidays</field>
<field model="ir.model" name="model_id" ref="model_hr_holidays"/>
<field name="model_id" ref="model_hr_holidays"/>
<field name="domain_force">[('employee_id.user_id','=',user.id)]</field>
<field name="groups" eval="[(4,ref('base.group_user'))]"/>
</record>
<record id="property_rule_holidays_officer" model="ir.rule">
<field name="name">Holidays Officer</field>
<field model="ir.model" name="model_id" ref="model_hr_holidays"/>
<field name="model_id" ref="model_hr_holidays"/>
<field name="domain_force">[(1,'=',1)]</field>
<field name="groups" eval="[(4,ref('base.group_hr_user'))]"/>
</record>

View File

@ -8,10 +8,10 @@
<record id="property_rule_employee_payslip" model="ir.rule">
<field name="name">Employee Payslip</field>
<field model="ir.model" name="model_id" ref="model_hr_payslip"/>
<field name="model_id" ref="model_hr_payslip"/>
<field name="domain_force">['|', ('employee_id.user_id', '=', user.id), ('employee_id.department_id.manager_id.user_id', '=', user.id)]</field>
<field name="groups" eval="[(4,ref('base.group_hr_user'))]"/>
</record>
</data>
</openerp>
</openerp>

View File

@ -4,7 +4,7 @@
<record id="hr_applicant_comp_rule" model="ir.rule">
<field name="name">Applicant multi company rule</field>
<field model="ir.model" name="model_id" ref="model_hr_applicant"/>
<field name="model_id" ref="model_hr_applicant"/>
<field eval="True" name="global"/>
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
</record>

View File

@ -34,7 +34,7 @@
<field name="product_uom_id" ref="product.product_uom_hour"/>
<field name="account_id" ref="account.analytic_administratif"></field>
<field eval="-60.00" name="amount"/>
<field name="general_account_id" model="account.account" ref="account.a_expense"/>
<field name="general_account_id" ref="account.a_expense"/>
<field name="journal_id" ref="analytic_journal"/>
</record>
@ -47,7 +47,7 @@
<field name="product_uom_id" ref="product.product_uom_hour"/>
<field name="account_id" ref="account.analytic_administratif"></field>
<field eval="-30.00" name="amount"/>
<field name="general_account_id" model="account.account" ref="account.a_expense"/>
<field name="general_account_id" ref="account.a_expense"/>
<field name="journal_id" ref="analytic_journal"/>
</record>
@ -60,7 +60,7 @@
<field name="product_uom_id" ref="product.product_uom_hour"/>
<field name="account_id" ref="account.analytic_administratif"></field>
<field eval="-90.00" name="amount"/>
<field name="general_account_id" model="account.account" ref="account.a_expense"/>
<field name="general_account_id" ref="account.a_expense"/>
<field name="journal_id" ref="analytic_journal"/>
</record>
@ -73,7 +73,7 @@
<field name="product_uom_id" ref="product.product_uom_hour"/>
<field name="account_id" ref="account.analytic_administratif"></field>
<field eval="-30.00" name="amount"/>
<field name="general_account_id" model="account.account" ref="account.a_expense"/>
<field name="general_account_id" ref="account.a_expense"/>
<field name="journal_id" ref="analytic_journal"/>
</record>
@ -86,7 +86,7 @@
<field name="product_uom_id" ref="product.product_uom_hour"/>
<field name="account_id" ref="account.analytic_administratif"></field>
<field eval="-30.00" name="amount"/>
<field name="general_account_id" model="account.account" ref="account.a_expense"/>
<field name="general_account_id" ref="account.a_expense"/>
<field name="journal_id" ref="analytic_journal"/>
</record>

View File

@ -4,14 +4,14 @@
<record id="property_rule_timesheet_manager" model="ir.rule">
<field name="name">Manager HR Analytic Timesheet</field>
<field model="ir.model" name="model_id" ref="model_hr_analytic_timesheet"/>
<field name="model_id" ref="model_hr_analytic_timesheet"/>
<field name="domain_force">[(1,'=',1)]</field>
<field name="groups" eval="[(4,ref('base.group_hr_manager')), (4,ref('base.group_hr_user'))]"/>
</record>
<record id="property_rule_timesheet_employee" model="ir.rule">
<field name="name">Employee HR Analytic Timesheet</field>
<field model="ir.model" name="model_id" ref="model_hr_analytic_timesheet"/>
<field name="model_id" ref="model_hr_analytic_timesheet"/>
<field name="domain_force">[('user_id', '=', user.id)]</field>
<field name="groups" eval="[(4,ref('base.group_user'))]"/>
</record>

View File

@ -100,24 +100,24 @@
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Sign in/out&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;The employee signs in and signs out.&quot;&quot;&quot;" name="note"/>
<field model="process.node" name="target_node_id" ref="process_node_drafttimesheetsheet0"/>
<field model="process.node" name="source_node_id" ref="process_node_attendance0"/>
<field name="target_node_id" ref="process_node_drafttimesheetsheet0"/>
<field name="source_node_id" ref="process_node_attendance0"/>
</record>
<record id="process_transition_timesheetdraft0" model="process.transition">
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Service&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;The timesheet line represents the time spent by the employee on a specific service provided.&quot;&quot;&quot;" name="note"/>
<field model="process.node" name="target_node_id" ref="process_node_drafttimesheetsheet0"/>
<field model="process.node" name="source_node_id" ref="process_node_timesheet0"/>
<field name="target_node_id" ref="process_node_drafttimesheetsheet0"/>
<field name="source_node_id" ref="process_node_timesheet0"/>
</record>
<record id="process_transition_confirmtimesheet0" model="process.transition">
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Confirmation&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;The employee periodically confirms his own timesheets.&quot;&quot;&quot;" name="note"/>
<field model="process.node" name="target_node_id" ref="process_node_confirmedtimesheet0"/>
<field model="process.node" name="source_node_id" ref="process_node_drafttimesheetsheet0"/>
<field name="target_node_id" ref="process_node_confirmedtimesheet0"/>
<field name="source_node_id" ref="process_node_drafttimesheetsheet0"/>
<field eval="[(6,0,[ref('hr_timesheet_sheet.t1')])]" name="transition_ids"/>
</record>
@ -125,24 +125,24 @@
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Validation&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;The project manager validates the timesheets.&quot;&quot;&quot;" name="note"/>
<field model="process.node" name="target_node_id" ref="process_node_validatedtimesheet0"/>
<field model="process.node" name="source_node_id" ref="process_node_confirmedtimesheet0"/>
<field name="target_node_id" ref="process_node_validatedtimesheet0"/>
<field name="source_node_id" ref="process_node_confirmedtimesheet0"/>
</record>
<record id="process_transition_invoiceontimesheet0" model="process.transition">
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Billing&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;The invoice is created based on the timesheet.&quot;&quot;&quot;" name="note"/>
<field model="process.node" name="target_node_id" ref="process_node_invoiceonwork0"/>
<field model="process.node" name="source_node_id" ref="process_node_confirmedtimesheet0"/>
<field name="target_node_id" ref="process_node_invoiceonwork0"/>
<field name="source_node_id" ref="process_node_confirmedtimesheet0"/>
</record>
<record id="process_transition_tasktimesheet0" model="process.transition">
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Task timesheet&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Moves task entry into the timesheet line&quot;&quot;&quot;" name="note"/>
<field model="process.node" name="target_node_id" ref="process_node_timesheet0"/>
<field model="process.node" name="source_node_id" ref="process_node_workontask0"/>
<field name="target_node_id" ref="process_node_timesheet0"/>
<field name="source_node_id" ref="process_node_workontask0"/>
</record>
<!--

View File

@ -163,24 +163,42 @@ openerp.hr_timesheet_sheet = function(instance) {
this.dfm = undefined;
}
},
is_valid_value:function(value){
var split_value = value.split(":");
var valid_value = true;
if (split_value.length > 2)
return false;
_.detect(split_value,function(num){
if(isNaN(num)){
valid_value = false;
}
});
return valid_value;
},
display_data: function() {
var self = this;
self.$el.html(QWeb.render("hr_timesheet_sheet.WeeklyTimesheet", {widget: self}));
_.each(self.accounts, function(account) {
_.each(_.range(account.days.length), function(day_count) {
if (!self.get('effective_readonly')) {
self.get_box(account, day_count).val(self.sum_box(account, day_count)).change(function() {
var num = Number($(this).val());
self.get_box(account, day_count).val(self.sum_box(account, day_count, true)).change(function() {
var num = $(this).val();
if (self.is_valid_value(num)){
num = (num == 0)?0:Number(self.parse_client(num));
}
if (isNaN(num)) {
$(this).val(self.sum_box(account, day_count));
$(this).val(self.sum_box(account, day_count, true));
} else {
account.days[day_count].lines[0].unit_amount += num - self.sum_box(account, day_count);
self.display_totals();
self.sync();
if(!isNaN($(this).val())){
$(this).val(self.sum_box(account, day_count, true));
}
}
});
} else {
self.get_box(account, day_count).html(self.sum_box(account, day_count));
self.get_box(account, day_count).html(self.sum_box(account, day_count, true));
}
});
});
@ -247,12 +265,12 @@ openerp.hr_timesheet_sheet = function(instance) {
get_super_total: function() {
return this.$('.oe_timesheet_weekly_supertotal');
},
sum_box: function(account, day_count) {
sum_box: function(account, day_count, show_value_in_hour) {
var line_total = 0;
_.each(account.days[day_count].lines, function(line) {
line_total += line.unit_amount;
});
return line_total;
return (show_value_in_hour && line_total != 0)?this.format_client(line_total):line_total;
},
display_totals: function() {
var self = this;
@ -266,12 +284,12 @@ openerp.hr_timesheet_sheet = function(instance) {
day_tots[day_count] += sum;
super_tot += sum;
});
self.get_total(account).html(acc_tot);
self.get_total(account).html(self.format_client(acc_tot));
});
_.each(_.range(self.dates.length), function(day_count) {
self.get_day_total(day_count).html(day_tots[day_count]);
self.get_day_total(day_count).html(self.format_client(day_tots[day_count]));
});
self.get_super_total().html(super_tot);
self.get_super_total().html(self.format_client(super_tot));
},
sync: function() {
var self = this;
@ -279,6 +297,14 @@ openerp.hr_timesheet_sheet = function(instance) {
self.set({sheets: this.generate_o2m_value()});
self.setting = false;
},
//converts hour value to float
parse_client: function(value) {
return instance.web.parse_value(value, { type:"float_time" });
},
//converts float value to hour
format_client:function(value){
return instance.web.format_value(value, { type:"float_time" });
},
generate_o2m_value: function() {
var self = this;
var ops = [];

View File

@ -90,79 +90,6 @@ POLL_TIMER = 30
DISCONNECTION_TIMER = POLL_TIMER + 5
WATCHER_ERROR_DELAY = 10
if openerp.evented:
import gevent
import gevent.event
class ImWatcher(object):
watchers = {}
@staticmethod
def get_watcher(db_name):
if not ImWatcher.watchers.get(db_name):
ImWatcher(db_name)
return ImWatcher.watchers[db_name]
def __init__(self, db_name):
self.db_name = db_name
ImWatcher.watchers[db_name] = self
self.waiting = 0
self.wait_id = 0
self.users = {}
self.users_watch = {}
gevent.spawn(self.loop)
def loop(self):
_logger.info("Begin watching on channel im_channel for database " + self.db_name)
stop = False
while not stop:
try:
registry = openerp.modules.registry.RegistryManager.get(self.db_name)
with registry.cursor() as cr:
listen_channel(cr, "im_channel", self.handle_message, self.check_stop)
stop = True
except:
# if something crash, we wait some time then try again
_logger.exception("Exception during watcher activity")
time.sleep(WATCHER_ERROR_DELAY)
_logger.info("End watching on channel im_channel for database " + self.db_name)
del ImWatcher.watchers[self.db_name]
def handle_message(self, message):
if message["type"] == "message":
for waiter in self.users.get(message["receiver"], {}).values():
waiter.set()
else: #type status
for waiter in self.users_watch.get(message["user"], {}).values():
waiter.set()
def check_stop(self):
return self.waiting == 0
def _get_wait_id(self):
self.wait_id += 1
return self.wait_id
def stop(self, user_id, watch_users, timeout=None):
wait_id = self._get_wait_id()
event = gevent.event.Event()
self.waiting += 1
self.users.setdefault(user_id, {})[wait_id] = event
for watch in watch_users:
self.users_watch.setdefault(watch, {})[wait_id] = event
try:
event.wait(timeout)
finally:
for watch in watch_users:
del self.users_watch[watch][wait_id]
if len(self.users_watch[watch]) == 0:
del self.users_watch[watch]
del self.users[user_id][wait_id]
if len(self.users[user_id]) == 0:
del self.users[user_id]
self.waiting -= 1
class LongPollingController(openerp.addons.web.http.Controller):
_cp_path = '/longpolling/im'
@ -171,6 +98,7 @@ class LongPollingController(openerp.addons.web.http.Controller):
assert_uuid(uuid)
if not openerp.evented:
raise Exception("Not usable in a server not running gevent")
from openerp.addons.im.watcher import ImWatcher
if db is not None:
req.session._db = db
req.session._uid = uid

View File

@ -1,3 +1,3 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_im_message,im.message,model_im_message,base.group_user,1,0,1,0
access_im_user,im.user,model_im_user,base.group_user,1,1,1,0
access_im_user,im.user,model_im_user,,1,1,1,0
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
2 access_im_message im.message model_im_message base.group_user 1 0 1 0
3 access_im_user im.user model_im_user base.group_user 1 1 1 0

Binary file not shown.

Binary file not shown.

View File

@ -284,6 +284,10 @@ openerp.im = function(instance) {
return this.activated;
},
create_ting: function() {
if (typeof(Audio) === "undefined") {
this.ting = {play: function() {}};
return;
}
var kitten = jQuery.param !== undefined && jQuery.deparam(jQuery.param.querystring()).kitten !== undefined;
this.ting = new Audio(instance.webclient.session.origin + "/im/static/src/audio/" + (kitten ? "purr" : "Ting") +
(new Audio().canPlayType("audio/ogg; codecs=vorbis") ? ".ogg" : ".mp3"));
@ -408,6 +412,9 @@ openerp.im = function(instance) {
return;
}
var mes = this.$("input").val();
if (! mes.trim()) {
return;
}
this.$("input").val("");
var send_it = _.bind(function() {
var model = new instance.web.Model("im.message");

84
addons/im/watcher.py Normal file
View File

@ -0,0 +1,84 @@
import openerp
import openerp.tools.config
import openerp.modules.registry
from openerp.tools.misc import DEFAULT_SERVER_DATETIME_FORMAT
import datetime
from openerp.osv import osv, fields
import time
import logging
import json
import select
import gevent
import gevent.event
from openerp.addons.im.im import *
_logger = logging.getLogger(__name__)
class ImWatcher(object):
watchers = {}
@staticmethod
def get_watcher(db_name):
if not ImWatcher.watchers.get(db_name):
ImWatcher(db_name)
return ImWatcher.watchers[db_name]
def __init__(self, db_name):
self.db_name = db_name
ImWatcher.watchers[db_name] = self
self.waiting = 0
self.wait_id = 0
self.users = {}
self.users_watch = {}
gevent.spawn(self.loop)
def loop(self):
_logger.info("Begin watching on channel im_channel for database " + self.db_name)
stop = False
while not stop:
try:
registry = openerp.modules.registry.RegistryManager.get(self.db_name)
with registry.cursor() as cr:
listen_channel(cr, "im_channel", self.handle_message, self.check_stop)
stop = True
except:
# if something crash, we wait some time then try again
_logger.exception("Exception during watcher activity")
time.sleep(WATCHER_ERROR_DELAY)
_logger.info("End watching on channel im_channel for database " + self.db_name)
del ImWatcher.watchers[self.db_name]
def handle_message(self, message):
if message["type"] == "message":
for waiter in self.users.get(message["receiver"], {}).values():
waiter.set()
else: #type status
for waiter in self.users_watch.get(message["user"], {}).values():
waiter.set()
def check_stop(self):
return self.waiting == 0
def _get_wait_id(self):
self.wait_id += 1
return self.wait_id
def stop(self, user_id, watch_users, timeout=None):
wait_id = self._get_wait_id()
event = gevent.event.Event()
self.waiting += 1
self.users.setdefault(user_id, {})[wait_id] = event
for watch in watch_users:
self.users_watch.setdefault(watch, {})[wait_id] = event
try:
event.wait(timeout)
finally:
for watch in watch_users:
del self.users_watch[watch][wait_id]
if len(self.users_watch[watch]) == 0:
del self.users_watch[watch]
del self.users[user_id][wait_id]
if len(self.users[user_id]) == 0:
del self.users[user_id]
self.waiting -= 1

View File

@ -2,5 +2,7 @@ id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_ls_chann1,im_livechat.channel,model_im_livechat_channel,,1,0,0,0
access_ls_chann2,im_livechat.channel,model_im_livechat_channel,group_im_livechat,1,1,1,0
access_ls_chann3,im_livechat.channel,model_im_livechat_channel,group_im_livechat_manager,1,1,1,1
access_ls_message_portal,im_livechat.im.message.portal,im.model_im_message,portal.group_portal,0,0,0,0
access_im_user_portal,im_livechat.im.user.portal,im.model_im_user,portal.group_portal,1,0,0,0
access_ls_message,im_livechat.im.message,im.model_im_message,portal.group_anonymous,0,0,0,0
access_im_user,im_livechat.im.user,im.model_im_user,portal.group_anonymous,1,0,0,0
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
2 access_ls_chann1 im_livechat.channel model_im_livechat_channel 1 0 0 0
3 access_ls_chann2 im_livechat.channel model_im_livechat_channel group_im_livechat 1 1 1 0
4 access_ls_chann3 im_livechat.channel model_im_livechat_channel group_im_livechat_manager 1 1 1 1
5 access_ls_message_portal im_livechat.im.message.portal im.model_im_message portal.group_portal 0 0 0 0
6 access_im_user_portal im_livechat.im.user.portal im.model_im_user portal.group_portal 1 0 0 0
7 access_ls_message im_livechat.im.message im.model_im_message portal.group_anonymous 0 0 0 0
8 access_im_user im_livechat.im.user im.model_im_user portal.group_anonymous 1 0 0 0

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