[MERGE]: Merged with lp:openobject-addons
bzr revid: atp@tinyerp.com-20120706060327-9obeef705ve1w7z2
This commit is contained in:
commit
b3b06e4587
|
@ -13,8 +13,7 @@
|
|||
<attribute name="string">Continue</attribute>
|
||||
</button>
|
||||
<separator string="title" position="replace">
|
||||
<group string="Select an Accounting Setup">
|
||||
<label colspan="2" string="This will automatically configure your taxes and accounts."/>
|
||||
<group>
|
||||
<field name="charts"/>
|
||||
</group>
|
||||
<group string="Configure your Fiscal Year" groups="account.group_account_user">
|
||||
|
|
|
@ -161,6 +161,7 @@
|
|||
<field name="state" widget="statusbar" statusbar_visible="draft,open,paid" statusbar_colors='{"proforma":"blue","proforma2":"blue"}'/>
|
||||
</header>
|
||||
<sheet string="Supplier Invoice">
|
||||
<div class="oe_title">
|
||||
<h1>
|
||||
<label string="Draft Invoice " attrs="{'invisible': [('state','not in',('draft',))]}"/>
|
||||
<label string="Pro Forma Invoice " attrs="{'invisible': [('state','not in',('proforma','proforma2'))]}"/>
|
||||
|
@ -174,17 +175,18 @@
|
|||
on_change="onchange_partner_id(type,partner_id,date_invoice,payment_term, partner_bank_id,company_id)"
|
||||
context="{'default_customer': 0, 'search_default_supplier': 1, 'default_supplier': 1}"
|
||||
domain="[('supplier', '=', True)]"/>
|
||||
</h2>
|
||||
</h2>
|
||||
</div>
|
||||
<group>
|
||||
<group>
|
||||
<field name="date_invoice"/>
|
||||
<field name="date_due"/>
|
||||
<field domain="[('partner_id', '=', partner_id)]" name="partner_bank_id" on_change="onchange_partner_bank(partner_bank_id)"/>
|
||||
<label for="reference"/>
|
||||
<div>
|
||||
<field name="date_invoice"/>
|
||||
<field name="date_due"/>
|
||||
<field domain="[('partner_id', '=', partner_id)]" name="partner_bank_id" on_change="onchange_partner_bank(partner_bank_id)"/>
|
||||
<label for="reference"/>
|
||||
<div>
|
||||
<field name="reference_type"/>
|
||||
<field name="reference" placeholder="Payment Reference"/>
|
||||
</div>
|
||||
</div>
|
||||
</group>
|
||||
<group>
|
||||
<field name="fiscal_position" widget="selection"/>
|
||||
|
@ -206,10 +208,11 @@
|
|||
<field domain="[('type','<>','view'), ('company_id', '=', parent.company_id), ('parent_id', '!=', False)]" name="account_analytic_id" groups="analytic.group_analytic_accounting"/>
|
||||
<field name="quantity"/>
|
||||
<field name="price_unit"/>
|
||||
<!-- Removed if subtotal is set -->
|
||||
<field name="price_subtotal"/>
|
||||
<field invisible="True" name="name"/>
|
||||
<field invisible="True" name="uos_id"/>
|
||||
<field domain="[('company_id', '=', parent.company_id), ('journal_id', '=', parent.journal_id), ('type', '<>', 'view')]" name="account_id" on_change="onchange_account_id(product_id,parent.partner_id,parent.type,parent.fiscal_position,account_id)" invisible="1"/>
|
||||
<!-- Removed if subtotal is set -->
|
||||
<field name="name" invisible="1"/>
|
||||
<field name="uos_id" invisible="1"/>
|
||||
</tree>
|
||||
</field>
|
||||
<group>
|
||||
|
@ -272,7 +275,7 @@
|
|||
</notebook>
|
||||
</sheet>
|
||||
<footer>
|
||||
<field name="message_ids" widget="ThreadView"/>
|
||||
<field name="message_ids" widget="mail_thread"/>
|
||||
</footer>
|
||||
</form>
|
||||
</field>
|
||||
|
@ -406,7 +409,7 @@
|
|||
</notebook>
|
||||
</sheet>
|
||||
<footer>
|
||||
<field name="message_ids" colspan="4" widget="ThreadView" nolabel="1"/>
|
||||
<field name="message_ids" colspan="4" widget="mail_thread" nolabel="1"/>
|
||||
</footer>
|
||||
</form>
|
||||
</field>
|
||||
|
|
|
@ -2373,12 +2373,11 @@
|
|||
<group string="res_config_contents" position="replace">
|
||||
<field name="only_one_chart_template" invisible="1"/>
|
||||
<field name="complete_tax_set" invisible="1"/>
|
||||
<p>This will automatically configure your chart of accounts, bank accounts, taxes and journals according to the selected template.</p>
|
||||
<div groups="base.group_multi_company">
|
||||
<label for="company_id"/>
|
||||
<field name="company_id" widget="selection"/> <!-- we assume that this wizard will be run only by administrators and as this field may cause problem if hidden (because of the default company of the user removed from the selection because already configured), we simply choosed to remove the group "multi company" of it -->
|
||||
</div>
|
||||
<group string="Set Your Accounting Options">
|
||||
<group>
|
||||
<div attrs="{'invisible': [('only_one_chart_template','=',True)]}">
|
||||
<label for="chart_template_id"/>
|
||||
<field name="chart_template_id" widget="selection" on_change="onchange_chart_template_id(chart_template_id)" domain="[('visible','=', True)]"/>
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -8,14 +8,14 @@ msgstr ""
|
|||
"Project-Id-Version: openobject-addons\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2012-02-08 00:35+0000\n"
|
||||
"PO-Revision-Date: 2012-06-20 16:18+0000\n"
|
||||
"Last-Translator: Raphael Collet (OpenERP) <Unknown>\n"
|
||||
"PO-Revision-Date: 2012-07-06 02:41+0000\n"
|
||||
"Last-Translator: Akira Hiyama <Unknown>\n"
|
||||
"Language-Team: Japanese <ja@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2012-06-22 04:38+0000\n"
|
||||
"X-Generator: Launchpad (build 15461)\n"
|
||||
"X-Launchpad-Export-Date: 2012-07-06 04:58+0000\n"
|
||||
"X-Generator: Launchpad (build 15558)\n"
|
||||
|
||||
#. module: account
|
||||
#: view:account.invoice.report:0
|
||||
|
@ -4942,7 +4942,7 @@ msgstr "会計表"
|
|||
#. module: account
|
||||
#: field:account.journal.column,name:0
|
||||
msgid "Column Name"
|
||||
msgstr "カラム名"
|
||||
msgstr "列名"
|
||||
|
||||
#. module: account
|
||||
#: view:account.general.journal:0
|
||||
|
|
|
@ -51,12 +51,12 @@
|
|||
<field name="type">form</field>
|
||||
<field name="inherit_id" ref="product.product_category_form_view"/>
|
||||
<field name="arch" type="xml">
|
||||
<form position="inside">
|
||||
<group string="Accounting Properties">
|
||||
<data>
|
||||
<xpath expr="/form/sheet//group[@name='account_property']" position="inside">
|
||||
<field name="property_account_income_categ" domain="[('type','<>','view'),('type','<>','consolidation')]"/>
|
||||
<field name="property_account_expense_categ" domain="[('type','<>','view'),('type','<>','consolidation')]"/>
|
||||
</group>
|
||||
</form>
|
||||
</xpath>
|
||||
</data>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
|
|
@ -77,7 +77,7 @@
|
|||
<menuitem id="base.menu_sales" name="Sales"
|
||||
parent="base.menu_base_partner"
|
||||
sequence="1"/>
|
||||
<menuitem action="action_account_analytic_overdue_all" id="menu_action_account_analytic_overdue_all" sequence="6" parent="base.menu_sales"/>
|
||||
<menuitem action="action_account_analytic_overdue_all" id="menu_action_account_analytic_overdue_all" sequence="7" parent="base.menu_sales"/>
|
||||
|
||||
|
||||
</data>
|
||||
|
|
|
@ -34,12 +34,11 @@
|
|||
<field name="type">form</field>
|
||||
<field name="inherit_id" ref="product.product_category_form_view"/>
|
||||
<field name="arch" type="xml">
|
||||
<form position="inside">
|
||||
<group>
|
||||
<separator string="Accounting Property" colspan="2"/>
|
||||
<data>
|
||||
<xpath expr="/form/sheet//group[@name='account_property']" position="inside">
|
||||
<field name="property_account_creditor_price_difference_categ" domain="[('type','<>','view'),('type','<>','consolidation')]"/>
|
||||
</group>
|
||||
</form>
|
||||
</xpath>
|
||||
</data>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
|
|
@ -8,14 +8,14 @@ msgstr ""
|
|||
"Project-Id-Version: openobject-addons\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2012-02-08 00:35+0000\n"
|
||||
"PO-Revision-Date: 2012-04-25 10:49+0000\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"PO-Revision-Date: 2012-07-03 09:17+0000\n"
|
||||
"Last-Translator: Anders Wallenquist <anders.wallenquist@vertel.se>\n"
|
||||
"Language-Team: Swedish <sv@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2012-04-26 04:41+0000\n"
|
||||
"X-Generator: Launchpad (build 15149)\n"
|
||||
"X-Launchpad-Export-Date: 2012-07-04 04:39+0000\n"
|
||||
"X-Generator: Launchpad (build 15544)\n"
|
||||
|
||||
#. module: account_bank_statement_extensions
|
||||
#: view:account.bank.statement.line:0
|
||||
|
@ -42,7 +42,7 @@ msgstr "CODA"
|
|||
#. module: account_bank_statement_extensions
|
||||
#: field:account.bank.statement.line.global,parent_id:0
|
||||
msgid "Parent Code"
|
||||
msgstr "Förälderns kod"
|
||||
msgstr "Överliggande kod"
|
||||
|
||||
#. module: account_bank_statement_extensions
|
||||
#: view:account.bank.statement.line:0
|
||||
|
@ -54,7 +54,7 @@ msgstr "Debet"
|
|||
#: model:ir.actions.act_window,name:account_bank_statement_extensions.action_cancel_statement_line
|
||||
#: model:ir.model,name:account_bank_statement_extensions.model_cancel_statement_line
|
||||
msgid "Cancel selected statement lines"
|
||||
msgstr ""
|
||||
msgstr "Avbryt valda utdragsrader"
|
||||
|
||||
#. module: account_bank_statement_extensions
|
||||
#: constraint:res.partner.bank:0
|
||||
|
@ -118,6 +118,8 @@ msgid ""
|
|||
"Delete operation not allowed ! Please go to the associated bank "
|
||||
"statement in order to delete and/or modify this bank statement line"
|
||||
msgstr ""
|
||||
"Radering inte tillåten ! Vänligen använd associerat bankuttdrag för att "
|
||||
"radera och/eller ändra utdragsrader"
|
||||
|
||||
#. module: account_bank_statement_extensions
|
||||
#: field:account.bank.statement.line.global,type:0
|
||||
|
@ -134,27 +136,27 @@ msgstr "Journal"
|
|||
#. module: account_bank_statement_extensions
|
||||
#: view:account.bank.statement.line:0
|
||||
msgid "Confirmed Statement Lines."
|
||||
msgstr ""
|
||||
msgstr "Bekräfta utdragsrader"
|
||||
|
||||
#. module: account_bank_statement_extensions
|
||||
#: view:account.bank.statement.line:0
|
||||
msgid "Credit Transactions."
|
||||
msgstr ""
|
||||
msgstr "Kredittransaktioner"
|
||||
|
||||
#. module: account_bank_statement_extensions
|
||||
#: model:ir.actions.act_window,help:account_bank_statement_extensions.action_cancel_statement_line
|
||||
msgid "cancel selected statement lines."
|
||||
msgstr ""
|
||||
msgstr "avbryt valda utdragsrader."
|
||||
|
||||
#. module: account_bank_statement_extensions
|
||||
#: field:account.bank.statement.line,counterparty_number:0
|
||||
msgid "Counterparty Number"
|
||||
msgstr ""
|
||||
msgstr "Motpartens nummer"
|
||||
|
||||
#. module: account_bank_statement_extensions
|
||||
#: view:account.bank.statement.line.global:0
|
||||
msgid "Transactions"
|
||||
msgstr ""
|
||||
msgstr "Transaktioner"
|
||||
|
||||
#. module: account_bank_statement_extensions
|
||||
#: code:addons/account_bank_statement_extensions/account_bank_statement.py:130
|
||||
|
@ -200,6 +202,9 @@ msgid ""
|
|||
"Please define BIC/Swift code on bank for bank type IBAN Account to make "
|
||||
"valid payments"
|
||||
msgstr ""
|
||||
"\n"
|
||||
"Vänligen ange BIC/Swift-kod på bank för banktyp IBAN-konto för korrekta "
|
||||
"utbetalningar"
|
||||
|
||||
#. module: account_bank_statement_extensions
|
||||
#: field:account.bank.statement.line,val_date:0
|
||||
|
@ -214,7 +219,7 @@ msgstr "Bekräfta valda rader från kontoutdraget."
|
|||
#. module: account_bank_statement_extensions
|
||||
#: view:cancel.statement.line:0
|
||||
msgid "Are you sure you want to cancel the selected Bank Statement lines ?"
|
||||
msgstr ""
|
||||
msgstr "Är du säker på att du vill avbryta valda bankutdragsrader ?"
|
||||
|
||||
#. module: account_bank_statement_extensions
|
||||
#: report:bank.statement.balance.report:0
|
||||
|
@ -234,42 +239,42 @@ msgstr "Anteckningar"
|
|||
#. module: account_bank_statement_extensions
|
||||
#: selection:account.bank.statement.line.global,type:0
|
||||
msgid "Manual"
|
||||
msgstr ""
|
||||
msgstr "Manuell"
|
||||
|
||||
#. module: account_bank_statement_extensions
|
||||
#: view:account.bank.statement.line:0
|
||||
msgid "Credit"
|
||||
msgstr ""
|
||||
msgstr "Kredit"
|
||||
|
||||
#. module: account_bank_statement_extensions
|
||||
#: field:account.bank.statement.line.global,amount:0
|
||||
msgid "Amount"
|
||||
msgstr ""
|
||||
msgstr "Belopp"
|
||||
|
||||
#. module: account_bank_statement_extensions
|
||||
#: view:account.bank.statement.line:0
|
||||
msgid "Fin.Account"
|
||||
msgstr ""
|
||||
msgstr "Fin.konto"
|
||||
|
||||
#. module: account_bank_statement_extensions
|
||||
#: field:account.bank.statement.line,counterparty_currency:0
|
||||
msgid "Counterparty Currency"
|
||||
msgstr ""
|
||||
msgstr "Motpartsvaluta"
|
||||
|
||||
#. module: account_bank_statement_extensions
|
||||
#: field:account.bank.statement.line,counterparty_bic:0
|
||||
msgid "Counterparty BIC"
|
||||
msgstr ""
|
||||
msgstr "Motpartens BIC"
|
||||
|
||||
#. module: account_bank_statement_extensions
|
||||
#: field:account.bank.statement.line.global,child_ids:0
|
||||
msgid "Child Codes"
|
||||
msgstr ""
|
||||
msgstr "Barnkoder"
|
||||
|
||||
#. module: account_bank_statement_extensions
|
||||
#: view:confirm.statement.line:0
|
||||
msgid "Are you sure you want to confirm the selected Bank Statement lines ?"
|
||||
msgstr ""
|
||||
msgstr "Är du säker på att du vill bekräfta valda bankutdragsrader?"
|
||||
|
||||
#. module: account_bank_statement_extensions
|
||||
#: constraint:account.bank.statement.line:0
|
||||
|
@ -277,6 +282,7 @@ msgid ""
|
|||
"The amount of the voucher must be the same amount as the one on the "
|
||||
"statement line"
|
||||
msgstr ""
|
||||
"Beloppet på bokföringsordern måste överenstämma med beloppet på kontoutdraget"
|
||||
|
||||
#. module: account_bank_statement_extensions
|
||||
#: help:account.bank.statement.line,globalisation_id:0
|
||||
|
@ -284,91 +290,92 @@ msgid ""
|
|||
"Code to identify transactions belonging to the same globalisation level "
|
||||
"within a batch payment"
|
||||
msgstr ""
|
||||
"Kod för att identifiera transaktioner som tillhör samma batchbetalning"
|
||||
|
||||
#. module: account_bank_statement_extensions
|
||||
#: view:account.bank.statement.line:0
|
||||
msgid "Draft Statement Lines."
|
||||
msgstr ""
|
||||
msgstr "Preleminära utdragsrader."
|
||||
|
||||
#. module: account_bank_statement_extensions
|
||||
#: view:account.bank.statement.line:0
|
||||
msgid "Glob. Am."
|
||||
msgstr ""
|
||||
msgstr "Glob. Am."
|
||||
|
||||
#. module: account_bank_statement_extensions
|
||||
#: model:ir.model,name:account_bank_statement_extensions.model_account_bank_statement_line
|
||||
msgid "Bank Statement Line"
|
||||
msgstr ""
|
||||
msgstr "Kontoutdragsrad"
|
||||
|
||||
#. module: account_bank_statement_extensions
|
||||
#: field:account.bank.statement.line.global,code:0
|
||||
msgid "Code"
|
||||
msgstr ""
|
||||
msgstr "Kod"
|
||||
|
||||
#. module: account_bank_statement_extensions
|
||||
#: field:account.bank.statement.line,counterparty_name:0
|
||||
msgid "Counterparty Name"
|
||||
msgstr ""
|
||||
msgstr "Motpartsnamn"
|
||||
|
||||
#. module: account_bank_statement_extensions
|
||||
#: field:account.bank.statement.line.global,name:0
|
||||
msgid "Communication"
|
||||
msgstr ""
|
||||
msgstr "Kommunikation"
|
||||
|
||||
#. module: account_bank_statement_extensions
|
||||
#: model:ir.model,name:account_bank_statement_extensions.model_res_partner_bank
|
||||
msgid "Bank Accounts"
|
||||
msgstr ""
|
||||
msgstr "Bankkonton"
|
||||
|
||||
#. module: account_bank_statement_extensions
|
||||
#: constraint:account.bank.statement:0
|
||||
msgid "The journal and period chosen have to belong to the same company."
|
||||
msgstr ""
|
||||
msgstr "Journalen och perioden måste tillhöra samma bolag."
|
||||
|
||||
#. module: account_bank_statement_extensions
|
||||
#: model:ir.model,name:account_bank_statement_extensions.model_account_bank_statement
|
||||
msgid "Bank Statement"
|
||||
msgstr ""
|
||||
msgstr "Bankkontoutdrag"
|
||||
|
||||
#. module: account_bank_statement_extensions
|
||||
#: view:account.bank.statement.line:0
|
||||
msgid "Statement Line"
|
||||
msgstr ""
|
||||
msgstr "Utdragsrad"
|
||||
|
||||
#. module: account_bank_statement_extensions
|
||||
#: sql_constraint:account.bank.statement.line.global:0
|
||||
msgid "The code must be unique !"
|
||||
msgstr ""
|
||||
msgstr "Koden måste vara unik !"
|
||||
|
||||
#. module: account_bank_statement_extensions
|
||||
#: field:account.bank.statement.line.global,bank_statement_line_ids:0
|
||||
#: model:ir.actions.act_window,name:account_bank_statement_extensions.action_bank_statement_line
|
||||
#: model:ir.ui.menu,name:account_bank_statement_extensions.bank_statement_line
|
||||
msgid "Bank Statement Lines"
|
||||
msgstr ""
|
||||
msgstr "Bankutdragsrad"
|
||||
|
||||
#. module: account_bank_statement_extensions
|
||||
#: view:account.bank.statement.line.global:0
|
||||
msgid "Child Batch Payments"
|
||||
msgstr ""
|
||||
msgstr "Barnbatchbetalningar"
|
||||
|
||||
#. module: account_bank_statement_extensions
|
||||
#: view:cancel.statement.line:0
|
||||
#: view:confirm.statement.line:0
|
||||
msgid "Cancel"
|
||||
msgstr ""
|
||||
msgstr "Avbryt"
|
||||
|
||||
#. module: account_bank_statement_extensions
|
||||
#: view:account.bank.statement.line:0
|
||||
msgid "Statement Lines"
|
||||
msgstr ""
|
||||
msgstr "Utdragsrader"
|
||||
|
||||
#. module: account_bank_statement_extensions
|
||||
#: view:account.bank.statement.line:0
|
||||
msgid "Total Amount"
|
||||
msgstr ""
|
||||
msgstr "Totalsumma"
|
||||
|
||||
#. module: account_bank_statement_extensions
|
||||
#: field:account.bank.statement.line,globalisation_id:0
|
||||
msgid "Globalisation ID"
|
||||
msgstr ""
|
||||
msgstr "Globalt ID"
|
||||
|
|
|
@ -127,7 +127,7 @@
|
|||
</notebook>
|
||||
</sheet>
|
||||
<footer>
|
||||
<field name="message_ids" widget="ThreadView"/>
|
||||
<field name="message_ids" widget="mail_thread"/>
|
||||
</footer>
|
||||
</form>
|
||||
</field>
|
||||
|
|
|
@ -271,7 +271,7 @@
|
|||
</notebook>
|
||||
</sheet>
|
||||
<footer>
|
||||
<field name="message_ids" widget="ThreadView"/>
|
||||
<field name="message_ids" widget="mail_thread"/>
|
||||
</footer>
|
||||
</form>
|
||||
</field>
|
||||
|
@ -443,7 +443,7 @@
|
|||
</notebook>
|
||||
</sheet>
|
||||
<footer>
|
||||
<field name="message_ids" widget="ThreadView"/>
|
||||
<field name="message_ids" widget="mail_thread"/>
|
||||
</footer>
|
||||
|
||||
</form>
|
||||
|
|
|
@ -172,7 +172,7 @@
|
|||
</notebook>
|
||||
</sheet>
|
||||
<footer>
|
||||
<field name="message_ids" widget="ThreadView"/>
|
||||
<field name="message_ids" widget="mail_thread"/>
|
||||
</footer>
|
||||
</form>
|
||||
</field>
|
||||
|
@ -318,7 +318,7 @@
|
|||
</notebook>
|
||||
</sheet>
|
||||
<footer>
|
||||
<field name="message_ids" widget="ThreadView"/>
|
||||
<field name="message_ids" widget="mail_thread"/>
|
||||
</footer>
|
||||
</form>
|
||||
</field>
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
</notebook>
|
||||
</sheet>
|
||||
<footer>
|
||||
<field name="message_ids" widget="ThreadView"/>
|
||||
<field name="message_ids" widget="mail_thread"/>
|
||||
</footer>
|
||||
</form>
|
||||
</field>
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
{
|
||||
'name': 'Projects Management: hr_expense link',
|
||||
'version': '1.1',
|
||||
'category': 'Sales Management',
|
||||
'category': 'Hidden',
|
||||
'description': """
|
||||
This module is for modifying project view to show some data related to the hr_expense module.
|
||||
======================================================================================================
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
{
|
||||
'name': 'Contracts Management: hr_expense link',
|
||||
'version': '1.1',
|
||||
'category': 'Sales Management',
|
||||
'category': 'Hidden',
|
||||
'description': """
|
||||
This module is for modifying account analytic view to show some data related to the hr_expense module.
|
||||
======================================================================================================
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
"name" : "Contract On Project",
|
||||
"version": "1.1",
|
||||
"author" : "OpenERP SA",
|
||||
'category': 'Hidden',
|
||||
"website" : "http://www.openerp.com",
|
||||
"depends" : ["project", "account_analytic_analysis"],
|
||||
"description": """
|
||||
|
|
|
@ -8,14 +8,14 @@ msgstr ""
|
|||
"Project-Id-Version: openobject-addons\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2012-02-08 00:36+0000\n"
|
||||
"PO-Revision-Date: 2012-05-10 18:05+0000\n"
|
||||
"Last-Translator: Raphael Collet (OpenERP) <Unknown>\n"
|
||||
"PO-Revision-Date: 2012-07-02 15:02+0000\n"
|
||||
"Last-Translator: Erwin <Unknown>\n"
|
||||
"Language-Team: Dutch <nl@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2012-06-28 04:39+0000\n"
|
||||
"X-Generator: Launchpad (build 15505)\n"
|
||||
"X-Launchpad-Export-Date: 2012-07-03 05:36+0000\n"
|
||||
"X-Generator: Launchpad (build 15531)\n"
|
||||
|
||||
#. module: base_action_rule
|
||||
#: help:base.action.rule,act_mail_to_user:0
|
||||
|
@ -337,7 +337,7 @@ msgstr "Actief"
|
|||
#: code:addons/base_action_rule/base_action_rule.py:329
|
||||
#, python-format
|
||||
msgid "No Email ID Found for your Company address!"
|
||||
msgstr ""
|
||||
msgstr "Geen e-mail id gevonden voor uw bedrijfsadres!"
|
||||
|
||||
#. module: base_action_rule
|
||||
#: field:base.action.rule,act_remind_user:0
|
||||
|
|
|
@ -45,10 +45,10 @@
|
|||
</group>
|
||||
</group>
|
||||
<group>
|
||||
<group string="Delegrated From">
|
||||
<group string="Delegated From">
|
||||
<field name="parent_ids" readonly="1" nolabel="1" />
|
||||
</group>
|
||||
<group string="Delegrated To" >
|
||||
<group string="Delegated To" >
|
||||
<field name="child_ids" readonly="1" nolabel="1" />
|
||||
</group>
|
||||
</group>
|
||||
|
|
|
@ -7,13 +7,36 @@
|
|||
<field name="model">caldav.browse</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Browse Caldav" >
|
||||
<group colspan="4" width="700" height="500">
|
||||
<separator string="Browse Caldav" colspan="4"/>
|
||||
<field name="url" colspan="4" />
|
||||
<separator string="Description" colspan="4"/>
|
||||
<field name="description" colspan="4" nolabel="1"/>
|
||||
</group>
|
||||
<form string="Browse Caldav" version="7.0">
|
||||
<header>
|
||||
<button special="cancel" string="_Close" icon="gtk-close"/>
|
||||
</header>
|
||||
<sheet>
|
||||
<group>
|
||||
<separator string="Browse Caldav" colspan="4"/>
|
||||
<field name="url" colspan="2" />
|
||||
<separator string="Help" colspan="4"/>
|
||||
<group colspan="4"><div>
|
||||
1. Webdav server that provides remote access to calendar<br/>
|
||||
2. Synchronisation of calendar using WebDAV<br/>
|
||||
3. Customize calendar event and todo attribute with any of OpenERP model<br/>
|
||||
4. Provides iCal Import/Export functionality
|
||||
<br/></div></group>
|
||||
<group colspan="4"><div>
|
||||
To access Calendars using CalDAV clients, point them to:
|
||||
http://<i>HOSTNAME</i>:<i>PORT</i>/webdav/<i>DATABASE_NAME</i>/calendars/users/<i>USERNAME</i>/c</div></group>
|
||||
<group colspan="4"><div>
|
||||
To access OpenERP Calendar using WebCal to remote site use the URL like:
|
||||
http://<i>HOSTNAME</i>:<i>PORT</i>/webdav/<i>DATABASE_NAME</i>/Calendars/<i>CALENDAR_NAME</i>.ics</div></group>
|
||||
<group colspan="4"><div>
|
||||
<i>
|
||||
HOSTNAME: Host on which OpenERP server(With webdav) is running<br/>
|
||||
PORT : Port on which OpenERP server is running (By Default : 8069)<br/>
|
||||
DATABASE_NAME: Name of database on which OpenERP Calendar is created</i>
|
||||
</div></group>
|
||||
|
||||
</group>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
@ -29,12 +52,11 @@
|
|||
or
|
||||
<button string="Cancel" class="oe_link" special="cancel"/>
|
||||
</header>
|
||||
<label string="Configure your openerp hostname. For example : " colspan="4"></label>
|
||||
<newline/>
|
||||
<label string="database.my.openerp.com or companyserver.com" colspan="4"/>
|
||||
<newline/>
|
||||
<separator colspan="4"/>
|
||||
<field name="host_name" colspan="4" width="250" />
|
||||
<sheet>
|
||||
<group>
|
||||
<field name="host_name" colspan="2" width="250" placeholder="For example : database.my.openerp.com or companyserver.com"/>
|
||||
</group>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
@ -50,11 +72,14 @@
|
|||
or
|
||||
<button string="Cancel" class="oe_link" special="cancel"/>
|
||||
</header>
|
||||
<separator string="" colspan="4"/>
|
||||
<field name="service" colspan="4" width="250" readonly="1"/>
|
||||
<field name="collection" colspan="4" width="250" invisible="1" />
|
||||
<field name="calendar" colspan="4" width="250" domain="[('collection_id','=', collection)]" readonly="1"/>
|
||||
<field name="device" colspan="4" width="250" />
|
||||
<sheet>
|
||||
<group>
|
||||
<field name="service" readonly="1"/>
|
||||
<field name="collection" invisible="1" />
|
||||
<field name="calendar" domain="[('collection_id','=', collection)]" readonly="1"/>
|
||||
<field name="device"/>
|
||||
</group>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
|
|
@ -273,14 +273,6 @@ class crm_lead(base_stage, osv.osv):
|
|||
'color': 0,
|
||||
}
|
||||
|
||||
def get_needaction_user_ids(self, cr, uid, ids, context=None):
|
||||
result = dict.fromkeys(ids, [])
|
||||
for obj in self.browse(cr, uid, ids, context=context):
|
||||
# salesman must perform an action when in draft mode
|
||||
if obj.state == 'draft' and obj.user_id:
|
||||
result[obj.id] = [obj.user_id.id]
|
||||
return result
|
||||
|
||||
def create(self, cr, uid, vals, context=None):
|
||||
obj_id = super(crm_lead, self).create(cr, uid, vals, context)
|
||||
self.create_send_note(cr, uid, [obj_id], context=context)
|
||||
|
@ -770,64 +762,6 @@ class crm_lead(base_stage, osv.osv):
|
|||
'type': 'ir.actions.act_window',
|
||||
}
|
||||
|
||||
|
||||
def message_new(self, cr, uid, msg, custom_values=None, context=None):
|
||||
"""Automatically calls when new email message arrives"""
|
||||
res_id = super(crm_lead, self).message_new(cr, uid, msg, custom_values=custom_values, context=context)
|
||||
subject = msg.get('subject') or _("No Subject")
|
||||
body = msg.get('body_text')
|
||||
|
||||
msg_from = msg.get('from')
|
||||
priority = msg.get('priority')
|
||||
vals = {
|
||||
'name': subject,
|
||||
'email_from': msg_from,
|
||||
'email_cc': msg.get('cc'),
|
||||
'description': body,
|
||||
'user_id': False,
|
||||
}
|
||||
if priority:
|
||||
vals['priority'] = priority
|
||||
vals.update(self.message_partner_by_email(cr, uid, msg.get('from', False)))
|
||||
self.write(cr, uid, [res_id], vals, context)
|
||||
return res_id
|
||||
|
||||
def message_update(self, cr, uid, ids, msg, vals=None, default_act='pending', context=None):
|
||||
if isinstance(ids, (str, int, long)):
|
||||
ids = [ids]
|
||||
if vals == None:
|
||||
vals = {}
|
||||
super(crm_lead, self).message_update(cr, uid, ids, msg, context=context)
|
||||
|
||||
if msg.get('priority') in dict(crm.AVAILABLE_PRIORITIES):
|
||||
vals['priority'] = msg.get('priority')
|
||||
maps = {
|
||||
'cost':'planned_cost',
|
||||
'revenue': 'planned_revenue',
|
||||
'probability':'probability'
|
||||
}
|
||||
vls = {}
|
||||
for line in msg['body_text'].split('\n'):
|
||||
line = line.strip()
|
||||
res = tools.misc.command_re.match(line)
|
||||
if res and maps.get(res.group(1).lower()):
|
||||
key = maps.get(res.group(1).lower())
|
||||
vls[key] = res.group(2).lower()
|
||||
vals.update(vls)
|
||||
|
||||
# Unfortunately the API is based on lists
|
||||
# but we want to update the state based on the
|
||||
# previous state, so we have to loop:
|
||||
for case in self.browse(cr, uid, ids, context=context):
|
||||
values = dict(vals)
|
||||
if case.state in CRM_LEAD_PENDING_STATES:
|
||||
#re-open
|
||||
values.update(state=crm.AVAILABLE_STATES[1][0])
|
||||
if not case.date_open:
|
||||
values['date_open'] = time.strftime(tools.DEFAULT_SERVER_DATETIME_FORMAT)
|
||||
res = self.write(cr, uid, [case.id], values, context=context)
|
||||
return res
|
||||
|
||||
def action_makeMeeting(self, cr, uid, ids, context=None):
|
||||
"""
|
||||
This opens Meeting's calendar view to schedule meeting on current Opportunity
|
||||
|
@ -882,19 +816,66 @@ class crm_lead(base_stage, osv.osv):
|
|||
if stage.on_change:
|
||||
vals['probability'] = stage.probability
|
||||
return super(crm_lead,self).write(cr, uid, ids, vals, context)
|
||||
|
||||
|
||||
# ----------------------------------------
|
||||
# Mail Gateway
|
||||
# ----------------------------------------
|
||||
|
||||
def message_new(self, cr, uid, msg, custom_values=None, context=None):
|
||||
""" Overrides mail_thread message_new that is called by the mailgateway
|
||||
through message_process.
|
||||
This override updates the document according to the email.
|
||||
"""
|
||||
if custom_values is None: custom_values = {}
|
||||
custom_values.update({
|
||||
'name': msg.get('subject') or _("No Subject"),
|
||||
'description': msg.get('body_text'),
|
||||
'email_from': msg.get('from'),
|
||||
'email_cc': msg.get('cc'),
|
||||
'user_id': False,
|
||||
})
|
||||
if msg.get('priority') in dict(crm.AVAILABLE_PRIORITIES):
|
||||
custom_values['priority'] = msg.get('priority')
|
||||
custom_values.update(self.message_partner_by_email(cr, uid, msg.get('from', False), context=context))
|
||||
return super(crm_lead, self).message_new(cr, uid, msg, custom_values=custom_values, context=context)
|
||||
|
||||
def message_update(self, cr, uid, ids, msg, update_vals=None, context=None):
|
||||
""" Overrides mail_thread message_update that is called by the mailgateway
|
||||
through message_process.
|
||||
This method updates the document according to the email.
|
||||
"""
|
||||
if isinstance(ids, (str, int, long)):
|
||||
ids = [ids]
|
||||
if update_vals is None: update_vals = {}
|
||||
|
||||
if msg.get('priority') in dict(crm.AVAILABLE_PRIORITIES):
|
||||
vals['priority'] = msg.get('priority')
|
||||
maps = {
|
||||
'cost':'planned_cost',
|
||||
'revenue': 'planned_revenue',
|
||||
'probability':'probability',
|
||||
}
|
||||
for line in msg.get('body_text', '').split('\n'):
|
||||
line = line.strip()
|
||||
res = tools.misc.command_re.match(line)
|
||||
if res and maps.get(res.group(1).lower()):
|
||||
key = maps.get(res.group(1).lower())
|
||||
vals[key] = res.group(2).lower()
|
||||
|
||||
return super(crm_lead, self).message_update(cr, uid, ids, msg, update_vals=update_vals, context=context)
|
||||
|
||||
# ----------------------------------------
|
||||
# OpenChatter methods and notifications
|
||||
# ----------------------------------------
|
||||
|
||||
def message_get_subscribers(self, cr, uid, ids, context=None):
|
||||
sub_ids = self.message_get_subscribers_ids(cr, uid, ids, context=context)
|
||||
# add salesman to the subscribers
|
||||
""" Override to add the salesman. """
|
||||
user_ids = super(crm_lead, self).message_get_subscribers(cr, uid, ids, context=context)
|
||||
for obj in self.browse(cr, uid, ids, context=context):
|
||||
if obj.user_id:
|
||||
sub_ids.append(obj.user_id.id)
|
||||
return self.pool.get('res.users').read(cr, uid, sub_ids, context=context)
|
||||
|
||||
if obj.user_id and not obj.user_id.id in user_ids:
|
||||
user_ids.append(obj.user_id.id)
|
||||
return user_ids
|
||||
|
||||
def stage_set_send_note(self, cr, uid, ids, stage_id, context=None):
|
||||
""" Override of the (void) default notification method. """
|
||||
stage_name = self.pool.get('crm.case.stage').name_get(cr, uid, [stage_id], context=context)[0][1]
|
||||
|
|
|
@ -1,7 +1,10 @@
|
|||
<?xml version="1.0"?>
|
||||
<openerp>
|
||||
<data>
|
||||
<!-- Demo Leads -->
|
||||
<data noupdate="1">
|
||||
<!--
|
||||
Demo Leads
|
||||
-->
|
||||
|
||||
<record id="crm_case_itisatelesalescampaign0" model="crm.lead">
|
||||
<field name="type_id" ref="crm.type_lead1"/>
|
||||
<field eval="'3'" name="priority"/>
|
||||
|
@ -21,7 +24,6 @@
|
|||
<field eval="'Plan to Attend a Training'" name="name"/>
|
||||
<field eval="'0033 769 703-274'" name="phone"/>
|
||||
</record>
|
||||
|
||||
<record id="crm_case_electonicgoodsdealer0" model="crm.lead">
|
||||
<field name="type_id" ref="crm.type_lead7"/>
|
||||
<field eval="'4'" name="priority"/>
|
||||
|
@ -76,7 +78,6 @@
|
|||
<field eval="'(514) 698-4118'" name="phone"/>
|
||||
<field eval="'hmc@thgascompany.com'" name="email_from"/>
|
||||
</record>
|
||||
|
||||
<record id="crm_case_itdeveloper0" model="crm.lead">
|
||||
<field name="type_id" ref="crm.type_lead4"/>
|
||||
<field eval="'3'" name="priority"/>
|
||||
|
@ -96,7 +97,6 @@
|
|||
<field eval="'(855) 924-4364'" name="phone"/>
|
||||
<field eval="'helle@stonageit.be'" name="email_from"/>
|
||||
</record>
|
||||
|
||||
<record id="crm_case_mgroperations0" model="crm.lead">
|
||||
<field eval="1" name="active"/>
|
||||
<field name="type_id" ref="crm.type_lead3"/>
|
||||
|
@ -209,10 +209,21 @@
|
|||
|
||||
<!-- Call Function to Cancel the leads (set as Dead) -->
|
||||
<function model="crm.lead" name="case_cancel"
|
||||
eval="[ref('crm_case_company_partnership0'), ref('crm_case_vpoperations0'), ref('crm_case_developingwebapplications0'), ref('crm_case_webvisitor0')], {'install_mode': True}"
|
||||
eval="[ ref('crm_case_company_partnership0'), ref('crm_case_vpoperations0'),
|
||||
ref('crm_case_developingwebapplications0'), ref('crm_case_webvisitor0')],
|
||||
{'install_mode': True}"
|
||||
/>
|
||||
<!-- Call Function to set the leads as Unread -->
|
||||
<function model="crm.lead" name="message_mark_as_unread"
|
||||
eval="[ ref('crm_case_itisatelesalescampaign0'), ref('crm_case_electonicgoodsdealer0'),
|
||||
ref('crm_case_itdeveloper0'), ref('crm_case_employee0')], {}"
|
||||
/>
|
||||
|
||||
<!-- Demo Opportunities -->
|
||||
|
||||
<!--
|
||||
Demo Opportunities
|
||||
-->
|
||||
|
||||
<record id="crm_case_construstazunits0" model="crm.lead">
|
||||
<field eval="60" name="probability"/>
|
||||
<field eval="1" name="active"/>
|
||||
|
@ -398,7 +409,7 @@
|
|||
<field name="section_id" ref="crm.section_sales_department"/>
|
||||
<field name="categ_id" ref="crm.categ_oppor5"/>
|
||||
<field name="stage_id" ref="crm.stage_lead5"/>
|
||||
<field eval="'Need new design for my website'" name="name"/>
|
||||
<field eval="'Need a new design for my website'" name="name"/>
|
||||
<field eval="time.strftime('%Y-05-01')" name="date_action"/>
|
||||
<field eval="time.strftime('%Y-06-30')" name="date_deadline"/>
|
||||
<field eval="'info@opensides.be'" name="email_from"/>
|
||||
|
@ -469,7 +480,7 @@
|
|||
<field name="section_id" ref="crm.section_sales_department"/>
|
||||
<field name="categ_id" ref="crm.categ_oppor1"/>
|
||||
<field name="stage_id" ref="crm.stage_lead4"/>
|
||||
<field eval="'Need customize the solution'" name="name"/>
|
||||
<field eval="'Need to customize the solution'" name="name"/>
|
||||
<field eval="'Conf call with technical service'" name="title_action"/>
|
||||
<field name="partner_name">Thymbra</field>
|
||||
<field name="street">Palermo, Capital Federal</field>
|
||||
|
@ -522,5 +533,12 @@
|
|||
<field name="stage_id" ref="crm.stage_lead1"/>
|
||||
<field eval="'Need more info about your pc2'" name="name"/>
|
||||
</record>
|
||||
|
||||
<!-- Call Function to set the opportunities as Unread -->
|
||||
<function model="crm.lead" name="message_mark_as_unread"
|
||||
eval="[ ref('crm_case_rdroundfundingunits25'), ref('crm_case_unifliege'),
|
||||
ref('crm_case_ericdubois4'), ref('crm_case_abcfuelcounits0')], {}"
|
||||
/>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -2,6 +2,43 @@
|
|||
<openerp>
|
||||
<data>
|
||||
|
||||
<!-- Read/Unread actions -->
|
||||
<record id="actions_server_crm_lead_unread" model="ir.actions.server">
|
||||
<field name="name">Mark unread</field>
|
||||
<field name="condition">True</field>
|
||||
<field name="type">ir.actions.server</field>
|
||||
<field name="model_id" ref="model_crm_lead"/>
|
||||
<field name="state">code</field>
|
||||
<field name="code">self.message_check_and_set_unread(cr, uid, context.get('active_ids'), context=context)</field>
|
||||
</record>
|
||||
<record id="action_crm_lead_unread" model="ir.values">
|
||||
<field name="name">action_crm_lead_unread</field>
|
||||
<field name="action_id" ref="actions_server_crm_lead_unread"/>
|
||||
<field name="value" eval="'ir.actions.server,' + str(ref('actions_server_crm_lead_unread'))" />
|
||||
<field name="key">action</field>
|
||||
<field name="model_id" ref="model_crm_lead" />
|
||||
<field name="model">crm.lead</field>
|
||||
<field name="key2">client_action_multi</field>
|
||||
</record>
|
||||
|
||||
<record id="actions_server_crm_lead_read" model="ir.actions.server">
|
||||
<field name="name">Mark read</field>
|
||||
<field name="condition">True</field>
|
||||
<field name="type">ir.actions.server</field>
|
||||
<field name="model_id" ref="model_crm_lead"/>
|
||||
<field name="state">code</field>
|
||||
<field name="code">self.message_check_and_set_read(cr, uid, context.get('active_ids'), context=context)</field>
|
||||
</record>
|
||||
<record id="action_crm_lead_read" model="ir.values">
|
||||
<field name="name">action_crm_lead_read</field>
|
||||
<field name="action_id" ref="actions_server_crm_lead_read"/>
|
||||
<field name="value" eval="'ir.actions.server,' + str(ref('actions_server_crm_lead_read'))" />
|
||||
<field name="key">action</field>
|
||||
<field name="model_id" ref="model_crm_lead" />
|
||||
<field name="model">crm.lead</field>
|
||||
<field name="key2">client_action_multi</field>
|
||||
</record>
|
||||
|
||||
<!--
|
||||
CRM CASE STAGE
|
||||
-->
|
||||
|
@ -134,10 +171,13 @@
|
|||
</div>
|
||||
</group>
|
||||
<group>
|
||||
<field name="contact_name" />
|
||||
<label for="contact_name" />
|
||||
<div>
|
||||
<field name="contact_name" class="oe_inline"/>,
|
||||
<field name="title" placeholder="Title" domain="[('domain', '=', 'contact')]" class="oe_inline"/>
|
||||
</div>
|
||||
<field name="email_from" widget="email"/>
|
||||
<field name="function" />
|
||||
<field domain="[('domain', '=', 'contact')]" name="title"/>
|
||||
<field name="phone"/>
|
||||
<field name="mobile"/>
|
||||
<field name="fax"/>
|
||||
|
@ -172,9 +212,9 @@
|
|||
</page>
|
||||
</notebook>
|
||||
</sheet>
|
||||
<div class="oe_bottom">
|
||||
<field name="message_ids" widget="ThreadView"/>
|
||||
</div>
|
||||
<footer>
|
||||
<field name="message_ids" widget="mail_thread"/>
|
||||
</footer>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
@ -185,8 +225,7 @@
|
|||
<field name="model">crm.lead</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Leads" fonts="bold:needaction_pending==True" colors="blue:state=='pending';grey:state in ('cancel', 'done')">
|
||||
<field name="needaction_pending" invisible="1"/>
|
||||
<tree string="Leads" fonts="bold:needaction_pending==True" colors="grey:state in ('cancel', 'done')">
|
||||
<field name="date_deadline" invisible="1"/>
|
||||
<field name="create_date" groups="base.group_no_one"/>
|
||||
<field name="name"/>
|
||||
|
@ -202,6 +241,7 @@
|
|||
<field name="referred" invisible="1"/>
|
||||
<field name="channel_id" invisible="1"/>
|
||||
<field name="subjects" invisible="1"/>
|
||||
<field name="needaction_pending" invisible="1"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
@ -235,6 +275,8 @@
|
|||
<field name="user_email"/>
|
||||
<field name="user_id"/>
|
||||
<field name="partner_address_email"/>
|
||||
<field name="message_summary"/>
|
||||
<field name="needaction_pending"/>
|
||||
<templates>
|
||||
<t t-name="lead_details">
|
||||
<ul class="oe_kanban_tooltip">
|
||||
|
@ -247,7 +289,7 @@
|
|||
<t t-name="kanban-box">
|
||||
<div t-attf-class="oe_kanban_color_#{kanban_getcolor(record.color.raw_value)} oe_kanban_card oe_kanban_global_click">
|
||||
<div class="oe_dropdown_toggle oe_dropdown_kanban">
|
||||
<span class="oe_e">i</span>
|
||||
<span class="oe_e">í</span>
|
||||
<ul class="oe_dropdown_menu">
|
||||
<li><a type="edit" >Edit...</a></li>
|
||||
<li><a type="delete">Delete</a></li>
|
||||
|
@ -269,18 +311,14 @@
|
|||
<field name="partner_id"/>
|
||||
</div>
|
||||
<div style="padding-left: 0.5em">
|
||||
<i>
|
||||
<t t-if="record.date_deadline.raw_value and record.date_deadline.raw_value lt (new Date())" t-set="red">oe_kanban_text_red</t>
|
||||
<span t-attf-class="#{red || ''}">
|
||||
<field name="date_action"/>
|
||||
</span>
|
||||
<t t-if="record.date_action.raw_value"> : </t>
|
||||
<field name="title_action"/>
|
||||
</i>
|
||||
<t t-if="record.date_deadline.raw_value and record.date_deadline.raw_value lt (new Date())" t-set="red">oe_kanban_text_red</t>
|
||||
<span t-attf-class="#{red || ''}"><field name="date_action"/></span>
|
||||
<t t-if="record.date_action.raw_value"> : </t>
|
||||
<field name="title_action"/>
|
||||
</div>
|
||||
<div class="oe_right">
|
||||
<a t-if="record.priority.raw_value == 1" icon="star-on" type="object" name="set_normal_priority"/>
|
||||
<a t-if="record.priority.raw_value != 1" icon="star-off" type="object" name="set_high_priority" style="opacity:0.7; filter:alpha(opacity=70);"/>
|
||||
<a t-if="record.priority.raw_value == 1" type="object" name="set_normal_priority" class="oe_e oe_star_on">7</a>
|
||||
<a t-if="record.priority.raw_value != 1" type="object" name="set_high_priority" class="oe_e oe_star_off">7</a>
|
||||
<!--
|
||||
<t t-if="record.date_deadline.raw_value and record.date_deadline.raw_value lt (new Date())" t-set="red">oe_kaban_status_red</t>
|
||||
<span t-attf-class="oe_kanban_status #{red}"> </span>
|
||||
|
@ -288,6 +326,8 @@
|
|||
<img t-att-src="kanban_image('res.users', 'avatar', record.user_id.raw_value[0])" t-att-title="record.user_id.value" width="24" height="24" class="oe_kanban_avatar"/>
|
||||
</div>
|
||||
<div class="oe_kanban_footer_left">
|
||||
<t t-if="record.needaction_pending.raw_value"><span class="oe_kanban_mail_new">New</span></t>
|
||||
<t t-raw="record.message_summary.raw_value"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="oe_clear"></div>
|
||||
|
@ -313,6 +353,10 @@
|
|||
<field name="type">search</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Search Leads">
|
||||
<filter icon="terp-mail-message-new"
|
||||
string="Inbox" help="Unread messages"
|
||||
name="needaction_pending"
|
||||
domain="[('needaction_pending','=',True)]"/>
|
||||
<field name="name" string="Lead / Customer" filter_domain="['|','|',('partner_name','ilike',self),('email_from','ilike',self),('name','ilike',self)]"/>
|
||||
<!-- subjects is not set as store=True so, it is placed outside filter_domain-->
|
||||
<field name="subjects"/>
|
||||
|
@ -327,10 +371,6 @@
|
|||
string="Open"
|
||||
name="open"
|
||||
domain="[('state','=','open')]"/>
|
||||
<filter icon="terp-gtk-media-pause"
|
||||
string="Pending"
|
||||
name="pending"
|
||||
domain="[('state','=','pending')]"/>
|
||||
<filter string="Unassigned Leads"
|
||||
icon="terp-personal-"
|
||||
domain="[('user_id','=', False)]"
|
||||
|
@ -424,11 +464,10 @@
|
|||
<div class="oe_title">
|
||||
<label for="name" class="oe_edit_only"/>
|
||||
<h1><field name="name"/></h1>
|
||||
|
||||
<label for="planned_revenue" class="oe_edit_only"/>
|
||||
<h2>
|
||||
<field name="planned_revenue" class="oe_inline"/>
|
||||
<field name="company_currency" class="oe_edit_only oe_inline"/> at
|
||||
<field name="company_currency" class="oe_inline"/> at
|
||||
<field name="probability" class="oe_inline"/> %% success rate
|
||||
</h2>
|
||||
</div>
|
||||
|
@ -491,9 +530,12 @@
|
|||
</group>
|
||||
|
||||
<group>
|
||||
<field name="contact_name" />
|
||||
<label for="contact_name" />
|
||||
<div>
|
||||
<field name="contact_name" class="oe_inline"/>,
|
||||
<field name="title" placeholder="Title" domain="[('domain', '=', 'contact')]" class="oe_inline"/>
|
||||
</div>
|
||||
<field name="function" />
|
||||
<field domain="[('domain', '=', 'contact')]" name="title"/>
|
||||
<field name="mobile"/>
|
||||
<field name="fax"/>
|
||||
</group>
|
||||
|
@ -523,7 +565,7 @@
|
|||
</notebook>
|
||||
</sheet>
|
||||
<footer>
|
||||
<field name="message_ids" widget="ThreadView"/>
|
||||
<field name="message_ids" widget="mail_thread"/>
|
||||
</footer>
|
||||
</form>
|
||||
</field>
|
||||
|
@ -535,8 +577,7 @@
|
|||
<field name="model">crm.lead</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Opportunities" fonts="bold:needaction_pending==True" colors="blue:state=='pending' and not(date_deadline and (date_deadline < current_date));gray:state in ('cancel', 'done');red:date_deadline and (date_deadline < current_date)">
|
||||
<field name="needaction_pending" invisible="1"/>
|
||||
<tree string="Opportunities" fonts="bold:needaction_pending==True" colors="gray:state in ('cancel', 'done');red:date_deadline and (date_deadline < current_date)">
|
||||
<field name="date_deadline" invisible="1"/>
|
||||
<field name="create_date" groups="base.group_no_one"/>
|
||||
<field name="name" string="Opportunity"/>
|
||||
|
@ -555,6 +596,7 @@
|
|||
<field name="priority" invisible="1"/>
|
||||
<field name="categ_id" invisible="1"/>
|
||||
<field name="state" groups="base.group_no_one"/>
|
||||
<field name="needaction_pending" invisible="1"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
@ -567,21 +609,21 @@
|
|||
<field name="type">search</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Search Opportunities">
|
||||
<filter icon="terp-mail-message-new"
|
||||
string="Inbox" help="Unread messages"
|
||||
name="needaction_pending"
|
||||
domain="[('needaction_pending','=',True)]"/>
|
||||
<field name="name" string="Opportunity / Customer"
|
||||
filter_domain="['|','|','|',('partner_id','ilike',self),('partner_name','ilike',self),('email_from','ilike',self),('name', 'ilike', self)]"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter icon="terp-check"
|
||||
string="New" help="New Opportunities"
|
||||
string="New" help="New Opportunities"
|
||||
name="new"
|
||||
domain="[('state','=','draft')]"/>
|
||||
<filter icon="terp-camera_test"
|
||||
string="Open" help="Open Opportunities"
|
||||
string="Open" help="Open Opportunities"
|
||||
name="open"
|
||||
domain="[('state','=','open')]"/>
|
||||
<filter icon="terp-gtk-media-pause"
|
||||
string="Pending" help="Pending Opportunities"
|
||||
name="pending"
|
||||
domain="[('state','=','pending')]"/>
|
||||
<filter string="Unassigned Opportunities"
|
||||
icon="terp-personal-"
|
||||
domain="[('user_id','=', False)]"
|
||||
|
|
|
@ -76,13 +76,6 @@ class crm_meeting(base_state, osv.Model):
|
|||
self.create_send_note(cr, uid, [obj_id], context=context)
|
||||
return obj_id
|
||||
|
||||
def get_needaction_user_ids(self, cr, uid, ids, context=None):
|
||||
result = dict.fromkeys(ids, [])
|
||||
for obj in self.browse(cr, uid, ids, context=context):
|
||||
if (obj.state == 'draft' and obj.user_id):
|
||||
result[obj.id] = [obj.user_id.id]
|
||||
return result
|
||||
|
||||
def case_open(self, cr, uid, ids, context=None):
|
||||
""" Confirms meeting """
|
||||
res = super(crm_meeting, self).case_open(cr, uid, ids, context)
|
||||
|
|
|
@ -83,7 +83,7 @@
|
|||
|
||||
<menuitem name="Meetings" id="menu_crm_case_categ_meet"
|
||||
action="crm_case_categ_meet" parent="base.menu_sales"
|
||||
sequence="7" />
|
||||
sequence="8" />
|
||||
|
||||
<record id="action_view_attendee_form" model="ir.actions.act_window">
|
||||
<field name="name">Meeting Invitations</field>
|
||||
|
|
|
@ -2,6 +2,43 @@
|
|||
<openerp>
|
||||
<data>
|
||||
|
||||
<!-- Read/Unread actions -->
|
||||
<record id="actions_server_crm_meeting_unread" model="ir.actions.server">
|
||||
<field name="name">Mark unread</field>
|
||||
<field name="condition">True</field>
|
||||
<field name="type">ir.actions.server</field>
|
||||
<field name="model_id" ref="model_crm_meeting"/>
|
||||
<field name="state">code</field>
|
||||
<field name="code">self.message_check_and_set_unread(cr, uid, context.get('active_ids'), context=context)</field>
|
||||
</record>
|
||||
<record id="action_crm_meeting_unread" model="ir.values">
|
||||
<field name="name">action_crm_meeting_unread</field>
|
||||
<field name="action_id" ref="actions_server_crm_meeting_unread"/>
|
||||
<field name="value" eval="'ir.actions.server,' + str(ref('actions_server_crm_meeting_unread'))" />
|
||||
<field name="key">action</field>
|
||||
<field name="model_id" ref="model_crm_meeting" />
|
||||
<field name="model">crm.meeting</field>
|
||||
<field name="key2">client_action_multi</field>
|
||||
</record>
|
||||
|
||||
<record id="actions_server_crm_meeting_read" model="ir.actions.server">
|
||||
<field name="name">Mark read</field>
|
||||
<field name="condition">True</field>
|
||||
<field name="type">ir.actions.server</field>
|
||||
<field name="model_id" ref="model_crm_meeting"/>
|
||||
<field name="state">code</field>
|
||||
<field name="code">self.message_check_and_set_read(cr, uid, context.get('active_ids'), context=context)</field>
|
||||
</record>
|
||||
<record id="action_crm_meeting_read" model="ir.values">
|
||||
<field name="name">action_crm_meeting_read</field>
|
||||
<field name="action_id" ref="actions_server_crm_meeting_read"/>
|
||||
<field name="value" eval="'ir.actions.server,' + str(ref('actions_server_crm_meeting_read'))" />
|
||||
<field name="key">action</field>
|
||||
<field name="model_id" ref="model_crm_meeting" />
|
||||
<field name="model">crm.meeting</field>
|
||||
<field name="key2">client_action_multi</field>
|
||||
</record>
|
||||
|
||||
<!-- CRM Meetings Categories Form View -->
|
||||
|
||||
<record id="crm_meeting_categ_action" model="ir.actions.act_window">
|
||||
|
@ -47,24 +84,26 @@
|
|||
<h1>
|
||||
<field name="name"/>
|
||||
</h1>
|
||||
<h2>
|
||||
At <field name="location" class="oe_inline" />
|
||||
</h2>
|
||||
</div>
|
||||
<h2>
|
||||
<label for="duration" string="Duration" />
|
||||
<field name="duration" widget="float_time"
|
||||
on_change="onchange_dates(date,duration,False,allday)"
|
||||
class="oe_inline"/> from
|
||||
<field name="date"
|
||||
string="Start Date"
|
||||
required="1"
|
||||
class="oe_edit_only oe_inline"/> to
|
||||
<field name="date_deadline"
|
||||
string="End Date" required="1"
|
||||
on_change="onchange_dates(date,False,date_deadline)"
|
||||
class="oe_inline"/>
|
||||
</h2>
|
||||
<group>
|
||||
<h2>
|
||||
<label for="date" string="Starting at"/>
|
||||
<field name="date" required="1" class="oe_inline"/>
|
||||
<label string="in" class="oe_inline" attrs="{'invisible': [('location', '=', False)]}"/> <field name="location" placeholder="Specify the location here" class="oe_inline"/>
|
||||
</h2>
|
||||
</group>
|
||||
<group>
|
||||
<h2>
|
||||
<label for="duration" string="Duration" />
|
||||
<field name="duration" widget="float_time"
|
||||
on_change="onchange_dates(date,duration,False,allday)"
|
||||
class="oe_inline"/> (
|
||||
<field name="date_deadline"
|
||||
string="End Date" required="1"
|
||||
on_change="onchange_dates(date,False,date_deadline)"
|
||||
class="oe_inline"/> )
|
||||
</h2>
|
||||
</group>
|
||||
<group colspan="4" col="4">
|
||||
<group colspan="2">
|
||||
<field name="user_id" />
|
||||
|
@ -219,7 +258,7 @@
|
|||
</notebook>
|
||||
</sheet>
|
||||
<footer>
|
||||
<field name="message_ids" widget="ThreadView"/>
|
||||
<field name="message_ids" widget="mail_thread"/>
|
||||
</footer>
|
||||
</form>
|
||||
</field>
|
||||
|
@ -234,7 +273,6 @@
|
|||
<field name="arch" type="xml">
|
||||
<tree string="Meetings" fonts="bold:needaction_pending==True"
|
||||
colors="red:state=='open';black:state in ('draft', 'cancel','done','pending')">
|
||||
<field name="needaction_pending" invisible="1"/>
|
||||
<field name="name" string="Subject" />
|
||||
<field name="user_id"/>
|
||||
<field name="date"/>
|
||||
|
@ -243,6 +281,7 @@
|
|||
<field name="partner_id" string="Partner" />
|
||||
<field name="location" />
|
||||
<field name="categ_id"/>
|
||||
<field name="needaction_pending" invisible="1"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
@ -284,6 +323,11 @@
|
|||
<field name="arch" type="xml">
|
||||
<search string="Search Meetings">
|
||||
<group>
|
||||
<filter icon="terp-mail-message-new"
|
||||
string="Inbox" help="Unread messages"
|
||||
name="needaction_pending"
|
||||
domain="[('needaction_pending','=',True)]"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="name" string="Meeting / Partner"
|
||||
filter_domain="['|',('name','ilike',self),('partner_id','ilike', self)]"/>
|
||||
<separator orientation="vertical"/>
|
||||
|
|
|
@ -288,14 +288,6 @@ class crm_phonecall(base_state, osv.osv):
|
|||
# ----------------------------------------
|
||||
# OpenChatter
|
||||
# ----------------------------------------
|
||||
|
||||
def get_needaction_user_ids(self, cr, uid, ids, context=None):
|
||||
result = dict.fromkeys(ids)
|
||||
for obj in self.browse(cr, uid, ids, context=context):
|
||||
result[obj.id] = []
|
||||
if (obj.state == 'draft' and obj.user_id):
|
||||
result[obj.id] = [obj.user_id.id]
|
||||
return result
|
||||
|
||||
def case_get_note_msg_prefix(self, cr, uid, id, context=None):
|
||||
return 'Phonecall'
|
||||
|
|
|
@ -2,8 +2,44 @@
|
|||
<openerp>
|
||||
<data>
|
||||
|
||||
<!-- Phonecall Categories Form View -->
|
||||
<!-- Read/Unread actions -->
|
||||
<record id="actions_server_crm_phonecall_unread" model="ir.actions.server">
|
||||
<field name="name">Mark unread</field>
|
||||
<field name="condition">True</field>
|
||||
<field name="type">ir.actions.server</field>
|
||||
<field name="model_id" ref="model_crm_phonecall"/>
|
||||
<field name="state">code</field>
|
||||
<field name="code">self.message_check_and_set_unread(cr, uid, context.get('active_ids'), context=context)</field>
|
||||
</record>
|
||||
<record id="action_crm_phonecall_unread" model="ir.values">
|
||||
<field name="name">action_crm_phonecall_unread</field>
|
||||
<field name="action_id" ref="actions_server_crm_phonecall_unread"/>
|
||||
<field name="value" eval="'ir.actions.server,' + str(ref('actions_server_crm_phonecall_unread'))" />
|
||||
<field name="key">action</field>
|
||||
<field name="model_id" ref="model_crm_phonecall" />
|
||||
<field name="model">crm.phonecall</field>
|
||||
<field name="key2">client_action_multi</field>
|
||||
</record>
|
||||
|
||||
<record id="actions_server_crm_phonecall_read" model="ir.actions.server">
|
||||
<field name="name">Mark read</field>
|
||||
<field name="condition">True</field>
|
||||
<field name="type">ir.actions.server</field>
|
||||
<field name="model_id" ref="model_crm_phonecall"/>
|
||||
<field name="state">code</field>
|
||||
<field name="code">self.message_check_and_set_read(cr, uid, context.get('active_ids'), context=context)</field>
|
||||
</record>
|
||||
<record id="action_crm_phonecall_read" model="ir.values">
|
||||
<field name="name">action_crm_phonecall_read</field>
|
||||
<field name="action_id" ref="actions_server_crm_phonecall_read"/>
|
||||
<field name="value" eval="'ir.actions.server,' + str(ref('actions_server_crm_phonecall_read'))" />
|
||||
<field name="key">action</field>
|
||||
<field name="model_id" ref="model_crm_phonecall" />
|
||||
<field name="model">crm.phonecall</field>
|
||||
<field name="key2">client_action_multi</field>
|
||||
</record>
|
||||
|
||||
<!-- Phonecall Categories Form View -->
|
||||
<record id="crm_phonecall_categ_action" model="ir.actions.act_window">
|
||||
<field name="name">Phonecall Categories</field>
|
||||
<field name="res_model">crm.case.categ</field>
|
||||
|
@ -34,6 +70,7 @@
|
|||
<field name="categ_id" invisible="1"/>
|
||||
<field name="create_date" invisible="1"/>
|
||||
<field name="opportunity_id" invisible="1"/>
|
||||
<field name="needaction_pending" invisible="1"/>
|
||||
<button string="Convert to Opportunity"
|
||||
name="%(phonecall2opportunity_act)d"
|
||||
states="open,pending"
|
||||
|
@ -109,7 +146,7 @@
|
|||
<field name="description" placeholder="Description..." />
|
||||
</sheet>
|
||||
<footer>
|
||||
<field name="message_ids" widget="ThreadView"/>
|
||||
<field name="message_ids" widget="mail_thread"/>
|
||||
</footer>
|
||||
</form>
|
||||
</field>
|
||||
|
@ -123,7 +160,6 @@
|
|||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Phone Calls" fonts="bold:needaction_pending==True" editable="top">
|
||||
<field name="needaction_pending" invisible="1"/>
|
||||
<field name="date"/>
|
||||
<field name="name"/>
|
||||
<field name="partner_id"
|
||||
|
@ -138,6 +174,7 @@
|
|||
<field name="state" invisible="1"/>
|
||||
<field name="create_date" invisible="1"/>
|
||||
<field name="opportunity_id" invisible="1"/>
|
||||
<field name="needaction_pending" invisible="1"/>
|
||||
<button string="Schedule Other Call"
|
||||
icon="terp-call-start"
|
||||
name="%(phonecall_to_phonecall_act)d"
|
||||
|
@ -154,7 +191,7 @@
|
|||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Phonecalls Calendar View -->
|
||||
<!-- Phonecalls Calendar View -->
|
||||
|
||||
<record model="ir.ui.view" id="crm_case_phone_calendar_view">
|
||||
<field name="name">CRM - Phone Calls Calendar</field>
|
||||
|
@ -169,14 +206,18 @@
|
|||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Phonecalls Search View -->
|
||||
|
||||
<!-- Phonecalls Search View -->
|
||||
<record id="view_crm_case_phonecalls_filter" model="ir.ui.view">
|
||||
<field name="name">CRM - Phone Calls Search</field>
|
||||
<field name="model">crm.phonecall</field>
|
||||
<field name="type">search</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Search Phonecalls">
|
||||
<filter icon="terp-mail-message-new"
|
||||
string="Inbox" help="Unread messages"
|
||||
name="needaction_pending"
|
||||
domain="[('needaction_pending','=',True)]"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="name" string="Phonecalls"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="date"/>
|
||||
|
|
|
@ -81,11 +81,16 @@
|
|||
<notebook colspan="4">
|
||||
<page string="Sales Team">
|
||||
<group col="4">
|
||||
<field name="reply_to"/>
|
||||
<field name="allow_unlink"/>
|
||||
<field name="change_responsible"/>
|
||||
<field name="member_ids"/>
|
||||
<group>
|
||||
<field name="reply_to"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="change_responsible"/>
|
||||
<field name="allow_unlink"/>
|
||||
</group>
|
||||
</group>
|
||||
<separator string="Team Members"/>
|
||||
<field name="member_ids"/>
|
||||
</page>
|
||||
<page string="Stages">
|
||||
<separator string="Select Stages for this Sales Team"/>
|
||||
|
|
|
@ -8,19 +8,19 @@ msgstr ""
|
|||
"Project-Id-Version: openobject-addons\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2012-02-08 01:37+0100\n"
|
||||
"PO-Revision-Date: 2012-06-11 07:49+0000\n"
|
||||
"Last-Translator: Tomomi Mengelberg <tomomi.mengelberg@aquasys.co.jp>\n"
|
||||
"PO-Revision-Date: 2012-07-06 04:15+0000\n"
|
||||
"Last-Translator: Akira Hiyama <Unknown>\n"
|
||||
"Language-Team: Japanese <ja@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2012-06-12 04:55+0000\n"
|
||||
"X-Generator: Launchpad (build 15389)\n"
|
||||
"X-Launchpad-Export-Date: 2012-07-06 04:58+0000\n"
|
||||
"X-Generator: Launchpad (build 15558)\n"
|
||||
|
||||
#. module: crm
|
||||
#: view:crm.lead.report:0
|
||||
msgid "# Leads"
|
||||
msgstr "# リード"
|
||||
msgstr "リード番号"
|
||||
|
||||
#. module: crm
|
||||
#: view:crm.lead:0 selection:crm.lead,type:0 view:crm.lead.report:0
|
||||
|
@ -36,12 +36,12 @@ msgstr "必要なサービス"
|
|||
#. module: crm
|
||||
#: selection:crm.meeting,rrule_type:0
|
||||
msgid "Monthly"
|
||||
msgstr "毎月"
|
||||
msgstr "月次"
|
||||
|
||||
#. module: crm
|
||||
#: model:ir.model,name:crm.model_crm_case_stage
|
||||
msgid "Stage of case"
|
||||
msgstr "お問い合わせ対応状況"
|
||||
msgstr "案件のステージ"
|
||||
|
||||
#. module: crm
|
||||
#: view:crm.meeting:0
|
||||
|
@ -82,7 +82,7 @@ msgstr " "
|
|||
#. module: crm
|
||||
#: view:crm.lead.report:0 field:crm.phonecall.report,delay_close:0
|
||||
msgid "Delay to close"
|
||||
msgstr ""
|
||||
msgstr "閉鎖の遅延"
|
||||
|
||||
#. module: crm
|
||||
#: view:crm.lead:0
|
||||
|
@ -114,13 +114,13 @@ msgstr "日"
|
|||
#. module: crm
|
||||
#: sql_constraint:crm.case.section:0
|
||||
msgid "The code of the sales team must be unique !"
|
||||
msgstr ""
|
||||
msgstr "営業チームのコードは固有である必要があります。"
|
||||
|
||||
#. module: crm
|
||||
#: code:addons/crm/crm_lead.py:553
|
||||
#, python-format
|
||||
msgid "Lead '%s' has been converted to an opportunity."
|
||||
msgstr ""
|
||||
msgstr "リード %s はオポチュニティに変換されました。"
|
||||
|
||||
#. module: crm
|
||||
#: code:addons/crm/crm_lead.py:294
|
||||
|
|
|
@ -45,25 +45,57 @@
|
|||
</field>
|
||||
</record>
|
||||
|
||||
<act_window
|
||||
id="crm_meeting_partner"
|
||||
name="Meetings"
|
||||
res_model="crm.meeting"
|
||||
src_model="res.partner"
|
||||
view_mode="calendar,tree,form,gantt"
|
||||
context="{'search_default_partner_id': [active_id],'default_partner_id': active_id}"
|
||||
/>
|
||||
<act_window
|
||||
id="act_res_partner_2_opportunity"
|
||||
name="Opportunities"
|
||||
res_model="crm.lead"
|
||||
src_model="res.partner"
|
||||
view_mode="kanban,tree,form,graph,calendar"
|
||||
domain="[('type','=','opportunity')]"
|
||||
context="{'search_default_partner_id': [active_id],'default_partner_id': active_id}"
|
||||
/>
|
||||
<!-- open meetings related to given partner -->
|
||||
<record id="crm_meeting_partner" model="ir.actions.act_window">
|
||||
<field name="name">Meetings</field>
|
||||
<field name="src_model">res.partner</field>
|
||||
<field name="res_model">crm.meeting</field>
|
||||
<field name="view_mode">calendar,tree,form,gantt</field>
|
||||
<field name="context">{'search_default_partner_id': active_id}</field>
|
||||
</record>
|
||||
|
||||
<!-- Partner kanban view inherte -->
|
||||
<!-- open opportunities related to given partner -->
|
||||
<record model="ir.actions.act_window" id="relate_partner_opportunities">
|
||||
<field name="name">Opportunities</field>
|
||||
<field name="res_model">crm.lead</field>
|
||||
<field name="view_mode">kanban,tree,form,graph,calendar</field>
|
||||
<field name="domain">[('type','=','opportunity')]</field>
|
||||
<field name="context">{'search_default_partner_id': active_id,
|
||||
'stage_type': 'opportunity', 'default_type': 'opportunity'}</field>
|
||||
<field name="view_id" eval="False"/>
|
||||
<field name="search_view_id" ref="crm.view_crm_case_opportunities_filter"/>
|
||||
<field name="help">
|
||||
With opportunities you can manage and keep track of your sales pipeline by creating specific customer- or prospect-related sales documents to follow up potential sales. Information such as expected revenue, opportunity stage, expected closing date, communication history and much more can be stored. Opportunities can be connected to the email gateway: new emails may create opportunities, each of them automatically gets the history of the conversation with the customer.
|
||||
|
||||
You and your team(s) will be able to plan meetings and phone calls from opportunities, convert them into quotations, manage related documents, track all customer related activities, and much more.
|
||||
</field>
|
||||
</record>
|
||||
<record model="ir.actions.act_window.view" id="relate_partner_opportunities_kanban">
|
||||
<field name="sequence" eval="0"/>
|
||||
<field name="view_mode">kanban</field>
|
||||
<field name="view_id" ref="crm_case_kanban_view_leads"/>
|
||||
<field name="act_window_id" ref="relate_partner_opportunities"/>
|
||||
</record>
|
||||
<record model="ir.actions.act_window.view" id="relate_partner_opportunities_tree">
|
||||
<field name="sequence" eval="1"/>
|
||||
<field name="view_mode">tree</field>
|
||||
<field name="view_id" ref="crm_case_tree_view_oppor"/>
|
||||
<field name="act_window_id" ref="relate_partner_opportunities"/>
|
||||
</record>
|
||||
<record model="ir.actions.act_window.view" id="relate_partner_opportunities_form">
|
||||
<field name="sequence" eval="2"/>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="view_id" ref="crm_case_form_view_oppor"/>
|
||||
<field name="act_window_id" ref="relate_partner_opportunities"/>
|
||||
</record>
|
||||
<record model="ir.actions.act_window.view" id="relate_partner_opportunities_graph">
|
||||
<field name="sequence" eval="4"/>
|
||||
<field name="view_mode">graph</field>
|
||||
<field name="view_id" ref="crm_case_graph_view_opportunity"/>
|
||||
<field name="act_window_id" ref="relate_partner_opportunities"/>
|
||||
</record>
|
||||
|
||||
<!-- Partner kanban view inherte -->
|
||||
<record model="ir.ui.view" id="crm_lead_partner_kanban_view">
|
||||
<field name="name">res.partner.kanban.inherit</field>
|
||||
<field name="model">res.partner</field>
|
||||
|
@ -74,13 +106,13 @@
|
|||
<field name="opportunity_count"/>
|
||||
<field name="meeting_count"/>
|
||||
</field>
|
||||
<xpath expr="//h4[@class='oe_partner_heading']" position="after">
|
||||
<a name="%(act_res_partner_2_opportunity)d" type="action">
|
||||
<t t-if="record.opportunity_count.value"><t t-esc="record.opportunity_count.value"/> Opportunities</t>
|
||||
</a>
|
||||
<a name="%(crm_meeting_partner)d" type="action">
|
||||
<t t-if="record.meeting_count.value"><t t-esc="record.meeting_count.value"/> Meetings</t>
|
||||
</a>
|
||||
<xpath expr="//h4[@class='oe_partner_heading']" position="after">
|
||||
<a name="%(relate_partner_opportunities)d" type="action">
|
||||
<t t-if="record.opportunity_count.value"><t t-esc="record.opportunity_count.value"/> Opportunities</t>
|
||||
</a>
|
||||
<a name="%(crm_meeting_partner)d" type="action">
|
||||
<t t-if="record.meeting_count.value"><t t-esc="record.meeting_count.value"/> Meetings</t>
|
||||
</a>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
@ -96,13 +128,12 @@
|
|||
<button type="action"
|
||||
string="Schedule a Meeting"
|
||||
name="%(crm.crm_case_categ_meet_create_partner)d"
|
||||
context="{'default_partner_id': [active_id], 'default_duration': 4.0}"/>
|
||||
context="{'search_default_partner_id': active_id, 'default_duration': 4.0}"/>
|
||||
<button type="action" string="Schedule a Call"
|
||||
name="%(crm.crm_case_categ_phone_create_partner)d"
|
||||
context="{'search_default_partner_id': [active_id], 'default_duration': 1.0}" />
|
||||
context="{'search_default_partner_id': active_id, 'default_duration': 1.0}" />
|
||||
<button type="action" string="Opportunities"
|
||||
context="{'search_default_partner_id': [active_id]}"
|
||||
name="%(crm.action_view_crm_partner2opportunity)d" />
|
||||
name="%(crm.crm_case_category_act_oppor11)d" context="{'search_default_partner_id': active_id}"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
|
|
@ -17,15 +17,12 @@
|
|||
<button string="Cancel" class="oe_link" special="cancel" />
|
||||
</header>
|
||||
<group col="4">
|
||||
<separator string="Schedule/Log a Call" colspan="4"/>
|
||||
<field name="action"/>
|
||||
<separator string="Call Details" colspan="4"/>
|
||||
<field name="name"/>
|
||||
<field name="date" string="Planned Date" attrs="{'invisible': [('action','=','log')]}"/>
|
||||
<field name="partner_id" readonly="True"/>
|
||||
<field name="user_id" />
|
||||
<field name="section_id"/>
|
||||
<field name="categ_id" string="Type" widget="selection" domain="[('object_id.model', '=', 'crm.phonecall')]"/>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<openerp>
|
||||
<data>
|
||||
<record id="action_caldav_browse" model="ir.actions.act_window">
|
||||
<field name="name">Caldav Browse</field>
|
||||
<field name="name">Synchronize Your Meetings</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">user.preference</field>
|
||||
<field name="view_id" ref="caldav.host_prefernce_form"/>
|
||||
|
|
|
@ -183,59 +183,53 @@ class crm_claim(base_stage, osv.osv):
|
|||
}
|
||||
address = self.pool.get('res.partner').browse(cr, uid, part)
|
||||
return {'value': {'email_from': address.email, 'partner_phone': address.phone}}
|
||||
|
||||
def message_new(self, cr, uid, msg, custom_values=None, context=None):
|
||||
"""Automatically called when new email message arrives"""
|
||||
res_id = super(crm_claim,self).message_new(cr, uid, msg, custom_values=custom_values, context=context)
|
||||
subject = msg.get('subject')
|
||||
body = msg.get('body_text')
|
||||
msg_from = msg.get('from')
|
||||
priority = msg.get('priority')
|
||||
vals = {
|
||||
'name': subject,
|
||||
'email_from': msg_from,
|
||||
'email_cc': msg.get('cc'),
|
||||
'description': body,
|
||||
'user_id': False,
|
||||
}
|
||||
if priority:
|
||||
vals['priority'] = priority
|
||||
vals.update(self.message_partner_by_email(cr, uid, msg.get('from', False)))
|
||||
self.write(cr, uid, [res_id], vals, context=context)
|
||||
return res_id
|
||||
|
||||
def message_update(self, cr, uid, ids, msg, vals={}, default_act='pending', context=None):
|
||||
# -------------------------------------------------------
|
||||
# Mail gateway
|
||||
# -------------------------------------------------------
|
||||
|
||||
def message_new(self, cr, uid, msg, custom_values=None, context=None):
|
||||
""" Overrides mail_thread message_new that is called by the mailgateway
|
||||
through message_process.
|
||||
This override updates the document according to the email.
|
||||
"""
|
||||
if custom_values is None: custom_values = {}
|
||||
custom_values.update({
|
||||
'name': msg.get('subject') or _("No Subject"),
|
||||
'description': msg.get('body_text'),
|
||||
'email_from': msg.get('from'),
|
||||
'email_cc': msg.get('cc'),
|
||||
})
|
||||
if msg.get('priority'):
|
||||
custom_values['priority'] = msg.get('priority')
|
||||
custom_values.update(self.message_partner_by_email(cr, uid, msg.get('from'), context=context))
|
||||
return super(crm_claim,self).message_new(cr, uid, msg, custom_values=custom_values, context=context)
|
||||
|
||||
def message_update(self, cr, uid, ids, msg, update_vals=None, context=None):
|
||||
""" Overrides mail_thread message_update that is called by the mailgateway
|
||||
through message_process.
|
||||
This method updates the document according to the email.
|
||||
"""
|
||||
if isinstance(ids, (str, int, long)):
|
||||
ids = [ids]
|
||||
|
||||
res_id = super(crm_claim,self).message_update(cr, uid, ids, msg, context=context)
|
||||
if update_vals is None: update_vals = {}
|
||||
|
||||
if msg.get('priority') in dict(crm.AVAILABLE_PRIORITIES):
|
||||
vals['priority'] = msg.get('priority')
|
||||
update_vals['priority'] = msg.get('priority')
|
||||
|
||||
maps = {
|
||||
'cost':'planned_cost',
|
||||
'revenue': 'planned_revenue',
|
||||
'probability':'probability'
|
||||
}
|
||||
vls = {}
|
||||
for line in msg['body_text'].split('\n'):
|
||||
line = line.strip()
|
||||
res = tools.misc.command_re.match(line)
|
||||
if res and maps.get(res.group(1).lower()):
|
||||
key = maps.get(res.group(1).lower())
|
||||
vls[key] = res.group(2).lower()
|
||||
vals.update(vls)
|
||||
update_vals[key] = res.group(2).lower()
|
||||
|
||||
# Unfortunately the API is based on lists
|
||||
# but we want to update the state based on the
|
||||
# previous state, so we have to loop:
|
||||
for case in self.browse(cr, uid, ids, context=context):
|
||||
values = dict(vals)
|
||||
if case.state in CRM_CLAIM_PENDING_STATES:
|
||||
values.update(state=crm.AVAILABLE_STATES[1][0]) #re-open
|
||||
res = self.write(cr, uid, [case.id], values, context=context)
|
||||
return res
|
||||
return super(crm_claim,self).message_update(cr, uid, ids, msg, update_vals=update_vals, context=context)
|
||||
|
||||
# ---------------------------------------------------
|
||||
# OpenChatter methods and notifications
|
||||
|
|
|
@ -168,9 +168,9 @@
|
|||
</notebook>
|
||||
</group>
|
||||
</sheet>
|
||||
<div class="oe_sheet_width">
|
||||
<field name="message_ids" colspan="4" widget="ThreadView" nolabel="1"/>
|
||||
</div>
|
||||
<footer>
|
||||
<field name="message_ids" colspan="4" widget="mail_thread" nolabel="1"/>
|
||||
</footer>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
|
|
@ -8,14 +8,14 @@ msgstr ""
|
|||
"Project-Id-Version: openobject-addons\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2012-02-08 00:36+0000\n"
|
||||
"PO-Revision-Date: 2012-06-09 18:59+0000\n"
|
||||
"PO-Revision-Date: 2012-07-06 04:04+0000\n"
|
||||
"Last-Translator: Akira Hiyama <Unknown>\n"
|
||||
"Language-Team: Japanese <ja@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2012-06-10 04:37+0000\n"
|
||||
"X-Generator: Launchpad (build 15376)\n"
|
||||
"X-Launchpad-Export-Date: 2012-07-06 04:58+0000\n"
|
||||
"X-Generator: Launchpad (build 15558)\n"
|
||||
|
||||
#. module: crm_claim
|
||||
#: field:crm.claim.report,nbr:0
|
||||
|
@ -249,7 +249,7 @@ msgstr "次のアクション"
|
|||
#. module: crm_claim
|
||||
#: view:crm.claim.report:0
|
||||
msgid "My Sales Team(s)"
|
||||
msgstr "私の販売チーム"
|
||||
msgstr "私の営業チーム"
|
||||
|
||||
#. module: crm_claim
|
||||
#: model:crm.case.stage,name:crm_claim.stage_claim3
|
||||
|
@ -670,7 +670,7 @@ msgstr "クレームを検索する"
|
|||
#: field:crm.claim,section_id:0
|
||||
#: view:crm.claim.report:0
|
||||
msgid "Sales Team"
|
||||
msgstr "販売チーム"
|
||||
msgstr "営業チーム"
|
||||
|
||||
#. module: crm_claim
|
||||
#: selection:crm.claim.report,month:0
|
||||
|
|
|
@ -127,21 +127,26 @@ class crm_fundraising(base_stage, osv.osv):
|
|||
self.create_send_note(cr, uid, [obj_id], context=context)
|
||||
return obj_id
|
||||
|
||||
# -------------------------------------------------------
|
||||
# Mail gateway
|
||||
# -------------------------------------------------------
|
||||
|
||||
def message_new(self, cr, uid, msg, custom_values=None, context=None):
|
||||
"""Automatically called when new email message arrives"""
|
||||
res_id = super(crm_fundraising,self).message_new(cr, uid, msg, custom_values=custom_values, context=context)
|
||||
vals = {
|
||||
'name': msg.get('subject'),
|
||||
""" Overrides mail_thread message_new that is called by the mailgateway
|
||||
through message_process.
|
||||
This override also updates the document according to the email.
|
||||
"""
|
||||
if custom_values is None: custom_values = {}
|
||||
custom_values.update({
|
||||
'name': msg.get('subject') or _("No Subject"),
|
||||
'description': msg.get('body_text'),
|
||||
'email_from': msg.get('from'),
|
||||
'email_cc': msg.get('cc'),
|
||||
'description': msg.get('body_text'),
|
||||
}
|
||||
priority = msg.get('priority')
|
||||
if priority:
|
||||
vals['priority'] = priority
|
||||
vals.update(self.message_partner_by_email(cr, uid, msg.get('from')))
|
||||
self.write(cr, uid, [res_id], vals, context=context)
|
||||
return res_id
|
||||
})
|
||||
if msg.get('priority'):
|
||||
custom_values['priority'] = priority
|
||||
custom_values.update(self.message_partner_by_email(cr, uid, msg.get('from'), context=context))
|
||||
return super(crm_fundraising,self).message_new(cr, uid, msg, custom_values=custom_values, context=context)
|
||||
|
||||
# ---------------------------------------------------
|
||||
# OpenChatter methods and notifications
|
||||
|
|
|
@ -72,38 +72,48 @@
|
|||
<field name="state" widget="statusbar" nolabel="1" statusbar_visible="draft,open,done" statusbar_colors='{"pending":"blue"}'/>
|
||||
</header>
|
||||
<sheet string="Funds Form">
|
||||
<group col="4">
|
||||
<field name="name" string="Name"/>
|
||||
<field name="section_id" colspan="1" widget="selection"/>
|
||||
<field name="user_id" string="Responsible"/>
|
||||
<field name="date"/>
|
||||
<field name="categ_id" widget="selection" domain="[('object_id.model', '=', 'crm.fundraising')]"/>
|
||||
<field name="type_id" string="Payment Mode" widget="selection"/>
|
||||
<label for="name" class="oe_edit_only"/>
|
||||
<h1>
|
||||
<field name="name"/>
|
||||
</h1>
|
||||
<label for="categ_id" class="oe_edit_only"/>
|
||||
<h2>
|
||||
<field name="categ_id" widget="selection" domain="[('object_id.model', '=', 'crm.fundraising')]" class="oe_inline"/>
|
||||
</h2>
|
||||
<group>
|
||||
<group>
|
||||
<field name="user_id" string="Responsible"/>
|
||||
<field name="section_id" colspan="1" widget="selection"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="date"/>
|
||||
<field name="type_id" string="Payment Mode" widget="selection"/>
|
||||
<field name="priority" string="Priority"/>
|
||||
</group>
|
||||
</group>
|
||||
<notebook>
|
||||
<page string="Funds">
|
||||
<group>
|
||||
<group string="Communication">
|
||||
<group>
|
||||
<field name="partner_id"
|
||||
on_change="onchange_partner_id(partner_id, email_from)"
|
||||
/>
|
||||
<field name="email_from"/>
|
||||
</group>
|
||||
<group string="Estimates">
|
||||
<group>
|
||||
<field name="planned_cost"/>
|
||||
<field name="planned_revenue"/>
|
||||
<field name="probability"/>
|
||||
</group>
|
||||
</group>
|
||||
<separator colspan="4" string="Notes"/>
|
||||
<field name="description"/>
|
||||
<field name="description" placeholder="Add a note..."/>
|
||||
</page>
|
||||
<page string="Extra Info">
|
||||
<group>
|
||||
<group string="Misc">
|
||||
<field name="active"/>
|
||||
<field name="id"/>
|
||||
<field name="priority" string="Priority"/>
|
||||
</group>
|
||||
<group groups="base.group_no_one" string="Dates">
|
||||
<field name="create_date"/>
|
||||
|
@ -119,7 +129,7 @@
|
|||
</notebook>
|
||||
</sheet>
|
||||
<footer>
|
||||
<field name="message_ids" colspan="4" widget="ThreadView" nolabel="1"/>
|
||||
<field name="message_ids" colspan="4" widget="mail_thread" nolabel="1"/>
|
||||
</footer>
|
||||
</form>
|
||||
</field>
|
||||
|
|
|
@ -8,14 +8,14 @@ msgstr ""
|
|||
"Project-Id-Version: openobject-addons\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2012-02-08 00:36+0000\n"
|
||||
"PO-Revision-Date: 2012-06-09 19:04+0000\n"
|
||||
"PO-Revision-Date: 2012-07-06 04:05+0000\n"
|
||||
"Last-Translator: Akira Hiyama <Unknown>\n"
|
||||
"Language-Team: Japanese <ja@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2012-06-10 04:37+0000\n"
|
||||
"X-Generator: Launchpad (build 15376)\n"
|
||||
"X-Launchpad-Export-Date: 2012-07-06 04:58+0000\n"
|
||||
"X-Generator: Launchpad (build 15558)\n"
|
||||
|
||||
#. module: crm_fundraising
|
||||
#: field:crm.fundraising,planned_revenue:0
|
||||
|
@ -236,7 +236,7 @@ msgstr "最低"
|
|||
#: view:crm.fundraising:0
|
||||
#: view:crm.fundraising.report:0
|
||||
msgid "My Sales Team(s)"
|
||||
msgstr "私の販売チーム"
|
||||
msgstr "私の営業チーム"
|
||||
|
||||
#. module: crm_fundraising
|
||||
#: field:crm.fundraising,create_date:0
|
||||
|
@ -626,7 +626,7 @@ msgstr "責任者"
|
|||
msgid ""
|
||||
"Sales team to which Case belongs to. Define Responsible user and Email "
|
||||
"account for mail gateway."
|
||||
msgstr "案件が割当てられた販売チーム。担当ユーザとEメール・アカウントを指定します。"
|
||||
msgstr "案件が割当てられた営業チーム。担当ユーザとEメール・アカウントを指定します。"
|
||||
|
||||
#. module: crm_fundraising
|
||||
#: model:ir.model,name:crm_fundraising.model_crm_fundraising_report
|
||||
|
@ -763,7 +763,7 @@ msgstr "高い"
|
|||
#: field:crm.fundraising,section_id:0
|
||||
#: view:crm.fundraising.report:0
|
||||
msgid "Sales Team"
|
||||
msgstr "販売チーム"
|
||||
msgstr "営業チーム"
|
||||
|
||||
#. module: crm_fundraising
|
||||
#: field:crm.fundraising.report,create_date:0
|
||||
|
|
|
@ -95,55 +95,51 @@ class crm_helpdesk(base_state, osv.osv):
|
|||
self.create_send_note(cr, uid, [obj_id], context=context)
|
||||
return obj_id
|
||||
|
||||
def message_new(self, cr, uid, msg_dict, custom_values=None, context=None):
|
||||
"""Automatically called when new email message arrives"""
|
||||
res_id = super(crm_helpdesk,self).message_new(cr, uid, msg_dict, custom_values=custom_values, context=context)
|
||||
subject = msg_dict.get('subject') or _("No Subject")
|
||||
body = msg_dict.get('body_text')
|
||||
msg_from = msg_dict.get('from')
|
||||
vals = {
|
||||
'name': subject,
|
||||
'email_from': msg_from,
|
||||
'email_cc': msg_dict.get('cc'),
|
||||
'description': body,
|
||||
'user_id': False,
|
||||
}
|
||||
vals.update(self.message_partner_by_email(cr, uid, msg_from))
|
||||
self.write(cr, uid, [res_id], vals, context)
|
||||
return res_id
|
||||
# -------------------------------------------------------
|
||||
# Mail gateway
|
||||
# -------------------------------------------------------
|
||||
|
||||
def message_update(self, cr, uid, ids, msg, vals={}, default_act='pending', context=None):
|
||||
def message_new(self, cr, uid, msg, custom_values=None, context=None):
|
||||
""" Overrides mail_thread message_new that is called by the mailgateway
|
||||
through message_process.
|
||||
This override updates the document according to the email.
|
||||
"""
|
||||
if custom_values is None: custom_values = {}
|
||||
custom_values.update({
|
||||
'name': msg.get('subject') or _("No Subject"),
|
||||
'description': msg.get('body_text'),
|
||||
'email_from': msg.get('from'),
|
||||
'email_cc': msg.get('cc'),
|
||||
'user_id': False,
|
||||
})
|
||||
custom_values.update(self.message_partner_by_email(cr, uid, msg.get('from'), context=context))
|
||||
return super(crm_helpdesk,self).message_new(cr, uid, msg, custom_values=custom_values, context=context)
|
||||
|
||||
def message_update(self, cr, uid, ids, msg, update_vals=None, context=None):
|
||||
""" Overrides mail_thread message_update that is called by the mailgateway
|
||||
through message_process.
|
||||
This method updates the document according to the email.
|
||||
"""
|
||||
if isinstance(ids, (str, int, long)):
|
||||
ids = [ids]
|
||||
|
||||
super(crm_helpdesk,self).message_update(cr, uid, ids, msg, context=context)
|
||||
if update_vals is None: update_vals = {}
|
||||
|
||||
if msg.get('priority') in dict(crm.AVAILABLE_PRIORITIES):
|
||||
vals['priority'] = msg.get('priority')
|
||||
update_vals['priority'] = msg.get('priority')
|
||||
|
||||
maps = {
|
||||
'cost':'planned_cost',
|
||||
'revenue': 'planned_revenue',
|
||||
'probability':'probability'
|
||||
}
|
||||
vls = {}
|
||||
for line in msg['body_text'].split('\n'):
|
||||
line = line.strip()
|
||||
res = tools.misc.command_re.match(line)
|
||||
if res and maps.get(res.group(1).lower()):
|
||||
key = maps.get(res.group(1).lower())
|
||||
vls[key] = res.group(2).lower()
|
||||
vals.update(vls)
|
||||
update_vals[key] = res.group(2).lower()
|
||||
|
||||
# Unfortunately the API is based on lists
|
||||
# but we want to update the state based on the
|
||||
# previous state, so we have to loop:
|
||||
for case in self.browse(cr, uid, ids, context=context):
|
||||
values = dict(vals)
|
||||
if case.state in CRM_HELPDESK_STATES:
|
||||
values.update(state=crm.AVAILABLE_STATES[1][0]) #re-open
|
||||
res = self.write(cr, uid, [case.id], values, context=context)
|
||||
return res
|
||||
return super(crm_helpdesk,self).message_update(cr, uid, ids, msg, update_vals=update_vals, context=context)
|
||||
|
||||
# ******************************
|
||||
# OpenChatter
|
||||
|
|
|
@ -100,7 +100,7 @@
|
|||
</notebook>
|
||||
</sheet>
|
||||
<footer>
|
||||
<field name="message_ids" widget="ThreadView"/>
|
||||
<field name="message_ids" widget="mail_thread"/>
|
||||
</footer>
|
||||
</form>
|
||||
</field>
|
||||
|
|
|
@ -8,14 +8,14 @@ msgstr ""
|
|||
"Project-Id-Version: openobject-addons\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2012-02-08 00:36+0000\n"
|
||||
"PO-Revision-Date: 2012-05-28 19:12+0000\n"
|
||||
"Last-Translator: Masaki Yamaya <Unknown>\n"
|
||||
"PO-Revision-Date: 2012-07-06 04:05+0000\n"
|
||||
"Last-Translator: Akira Hiyama <Unknown>\n"
|
||||
"Language-Team: Japanese <ja@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2012-05-29 04:46+0000\n"
|
||||
"X-Generator: Launchpad (build 15316)\n"
|
||||
"X-Launchpad-Export-Date: 2012-07-06 04:58+0000\n"
|
||||
"X-Generator: Launchpad (build 15558)\n"
|
||||
|
||||
#. module: crm_helpdesk
|
||||
#: field:crm.helpdesk.report,delay_close:0
|
||||
|
@ -207,7 +207,7 @@ msgstr "Eメールの数"
|
|||
#: view:crm.helpdesk:0
|
||||
#: view:crm.helpdesk.report:0
|
||||
msgid "My Sales Team(s)"
|
||||
msgstr "私の販売チーム"
|
||||
msgstr "私の営業チーム"
|
||||
|
||||
#. module: crm_helpdesk
|
||||
#: field:crm.helpdesk,create_date:0
|
||||
|
@ -533,7 +533,7 @@ msgstr "催促を送る"
|
|||
msgid ""
|
||||
"Sales team to which Case belongs to. Define "
|
||||
"Responsible user and Email account for mail gateway."
|
||||
msgstr "事象を割り当てる販売チーム。メールゲートウェイにと担当ユーザとEメールアカウントを作って下さい。"
|
||||
msgstr "事象を割り当てる営業チーム。メールゲートウェイにと担当ユーザとEメールアカウントを作って下さい。"
|
||||
|
||||
#. module: crm_helpdesk
|
||||
#: view:crm.helpdesk:0
|
||||
|
@ -708,7 +708,7 @@ msgstr "高い"
|
|||
#: field:crm.helpdesk,section_id:0
|
||||
#: view:crm.helpdesk.report:0
|
||||
msgid "Sales Team"
|
||||
msgstr "販売チーム"
|
||||
msgstr "営業チーム"
|
||||
|
||||
#. module: crm_helpdesk
|
||||
#: field:crm.helpdesk,date_action_last:0
|
||||
|
|
|
@ -8,14 +8,14 @@ msgstr ""
|
|||
"Project-Id-Version: openobject-addons\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2012-02-08 00:36+0000\n"
|
||||
"PO-Revision-Date: 2012-05-25 04:47+0000\n"
|
||||
"PO-Revision-Date: 2012-07-06 04:06+0000\n"
|
||||
"Last-Translator: Akira Hiyama <Unknown>\n"
|
||||
"Language-Team: Japanese <ja@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2012-06-28 04:40+0000\n"
|
||||
"X-Generator: Launchpad (build 15505)\n"
|
||||
"X-Launchpad-Export-Date: 2012-07-06 04:58+0000\n"
|
||||
"X-Generator: Launchpad (build 15558)\n"
|
||||
|
||||
#. module: crm_partner_assign
|
||||
#: field:crm.lead.forward.to.partner,send_to:0
|
||||
|
@ -858,7 +858,7 @@ msgstr "高"
|
|||
#: field:crm.lead.report.assign,section_id:0
|
||||
#: field:crm.partner.report.assign,section_id:0
|
||||
msgid "Sales Team"
|
||||
msgstr "販売チーム"
|
||||
msgstr "営業チーム"
|
||||
|
||||
#. module: crm_partner_assign
|
||||
#: field:crm.lead.report.assign,create_date:0
|
||||
|
|
|
@ -8,14 +8,14 @@ msgstr ""
|
|||
"Project-Id-Version: openobject-addons\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2012-02-08 00:36+0000\n"
|
||||
"PO-Revision-Date: 2012-05-10 18:04+0000\n"
|
||||
"Last-Translator: Raphael Collet (OpenERP) <Unknown>\n"
|
||||
"PO-Revision-Date: 2012-07-06 04:06+0000\n"
|
||||
"Last-Translator: Akira Hiyama <Unknown>\n"
|
||||
"Language-Team: Japanese <ja@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2012-05-11 05:04+0000\n"
|
||||
"X-Generator: Launchpad (build 15225)\n"
|
||||
"X-Launchpad-Export-Date: 2012-07-06 04:58+0000\n"
|
||||
"X-Generator: Launchpad (build 15558)\n"
|
||||
|
||||
#. module: crm_profiling
|
||||
#: view:crm_profiling.questionnaire:0
|
||||
|
@ -30,7 +30,7 @@ msgid ""
|
|||
"segmentation tool allows you to automatically assign a partner to a category "
|
||||
"according to his answers to the different questionnaires."
|
||||
msgstr ""
|
||||
"特定のトピックに関連した質問票を作成して、それを使って販売チームが適切な質問をするように指導できます。区分ツールを使って、質問に対する回答に応じて、パート"
|
||||
"特定のトピックに関連した質問票を作成して、それを使って営業チームが適切な質問をするように指導できます。区分ツールを使って、質問に対する回答に応じて、パート"
|
||||
"ナを自動的に区分することができます。"
|
||||
|
||||
#. module: crm_profiling
|
||||
|
|
|
@ -58,7 +58,7 @@
|
|||
id="menu_crm_todo"
|
||||
parent="base.menu_sales"
|
||||
action="crm_todo_action"
|
||||
sequence="5"/>
|
||||
sequence="6"/>
|
||||
|
||||
|
||||
</data>
|
||||
|
|
|
@ -257,13 +257,15 @@
|
|||
<field name="inherit_id" ref="sale.view_order_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//group[@name='sale_total']" position="after">
|
||||
<group>
|
||||
<group width="50%%">
|
||||
<label for="carrier_id"/>
|
||||
<div>
|
||||
<field name="carrier_id" context="{'order_id':active_id or False}" class="oe_inline"/>
|
||||
<button name="delivery_set" states="draft" string="Add to Sale Order" type="object"/>
|
||||
<button name="delivery_set" states="draft" string="Charge in Sale Order" type="object"
|
||||
attrs="{'invisible':[('carrier_id','=',False)]}"/>
|
||||
</div>
|
||||
<label string="If you do not 'Add to Sale Order', the delivery charges will be added based on the delivery order."/>
|
||||
<label string="If you do not 'Add to Sale Order', the delivery charges will be added based on the delivery order(s)." colspan="2"
|
||||
attrs="{'invisible':[('carrier_id','=',False)]}"/>
|
||||
</group>
|
||||
</xpath>
|
||||
</field>
|
||||
|
|
|
@ -8,19 +8,19 @@ msgstr ""
|
|||
"Project-Id-Version: openobject-addons\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2012-02-08 01:37+0100\n"
|
||||
"PO-Revision-Date: 2012-04-06 00:12+0000\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"PO-Revision-Date: 2012-07-06 02:21+0000\n"
|
||||
"Last-Translator: Ahmad Khayyat <Unknown>\n"
|
||||
"Language-Team: Arabic <ar@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2012-04-07 04:56+0000\n"
|
||||
"X-Generator: Launchpad (build 15060)\n"
|
||||
"X-Launchpad-Export-Date: 2012-07-06 04:58+0000\n"
|
||||
"X-Generator: Launchpad (build 15558)\n"
|
||||
|
||||
#. module: edi
|
||||
#: sql_constraint:res.currency:0
|
||||
msgid "The currency code must be unique per company!"
|
||||
msgstr ""
|
||||
msgstr "يجب أن يكون رمز العملة فريداً للشركة!"
|
||||
|
||||
#. module: edi
|
||||
#: model:ir.model,name:edi.model_res_partner_address
|
||||
|
@ -30,12 +30,12 @@ msgstr "عناوين الشريك"
|
|||
#. module: edi
|
||||
#: sql_constraint:res.company:0
|
||||
msgid "The company name must be unique !"
|
||||
msgstr "اسم الشركة يجب أن يكون فريداً !"
|
||||
msgstr "يجب أن يكون اسم الشركة فريداً !"
|
||||
|
||||
#. module: edi
|
||||
#: constraint:res.partner:0
|
||||
msgid "Error ! You cannot create recursive associated members."
|
||||
msgstr ""
|
||||
msgstr "خطأ ! لا يمكنك إنشاء أعضاء مرتبطين و متداخلين."
|
||||
|
||||
#. module: edi
|
||||
#: field:edi.document,name:0
|
||||
|
@ -111,12 +111,12 @@ msgstr "مستند"
|
|||
#. openerp-web
|
||||
#: /home/odo/repositories/addons/trunk/edi/static/src/xml/edi.xml:23
|
||||
msgid "View/Print"
|
||||
msgstr ""
|
||||
msgstr "عرض/طباعة"
|
||||
|
||||
#. openerp-web
|
||||
#: /home/odo/repositories/addons/trunk/edi/static/src/xml/edi.xml:28
|
||||
msgid "Import this document"
|
||||
msgstr ""
|
||||
msgstr "إستيراد هذه الوثيقة"
|
||||
|
||||
#. openerp-web
|
||||
#: /home/odo/repositories/addons/trunk/edi/static/src/xml/edi.xml:33
|
||||
|
@ -126,7 +126,7 @@ msgstr ""
|
|||
#. openerp-web
|
||||
#: /home/odo/repositories/addons/trunk/edi/static/src/xml/edi.xml:36
|
||||
msgid "OpenERP instance address:"
|
||||
msgstr "عنوان مثال أوبنيرب:"
|
||||
msgstr "عنوان نسخة أوبن إي آر بي:"
|
||||
|
||||
#. openerp-web
|
||||
#: /home/odo/repositories/addons/trunk/edi/static/src/xml/edi.xml:39
|
||||
|
@ -177,7 +177,7 @@ msgstr ""
|
|||
#. openerp-web
|
||||
#: /home/odo/repositories/addons/trunk/edi/static/src/xml/edi.xml:60
|
||||
msgid "OpenERP documentation"
|
||||
msgstr "وثائق أوبنيرب"
|
||||
msgstr "توثيق أوبن إي آر بي"
|
||||
|
||||
#. openerp-web
|
||||
#: /home/odo/repositories/addons/trunk/edi/static/src/xml/edi.xml:61
|
||||
|
@ -202,12 +202,12 @@ msgstr "تحميل"
|
|||
#. openerp-web
|
||||
#: /home/odo/repositories/addons/trunk/edi/static/src/xml/edi.xml:87
|
||||
msgid "Powered by"
|
||||
msgstr "مدعوم من kifcaliph و"
|
||||
msgstr "يتم تشغيل هذا التطبيق بواسطة"
|
||||
|
||||
#. openerp-web
|
||||
#: /home/odo/repositories/addons/trunk/edi/static/src/xml/edi.xml:87
|
||||
msgid "OpenERP"
|
||||
msgstr "أوبنيرب"
|
||||
msgstr "أوبن إي آر بي"
|
||||
|
||||
#. openerp-web
|
||||
#: /home/odo/repositories/addons/trunk/edi/static/src/xml/edi_account.xml:34
|
||||
|
|
|
@ -8,14 +8,14 @@ msgstr ""
|
|||
"Project-Id-Version: openobject-addons\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2012-02-08 00:36+0000\n"
|
||||
"PO-Revision-Date: 2012-05-10 18:29+0000\n"
|
||||
"Last-Translator: Raphael Collet (OpenERP) <Unknown>\n"
|
||||
"PO-Revision-Date: 2012-07-02 15:02+0000\n"
|
||||
"Last-Translator: Erwin <Unknown>\n"
|
||||
"Language-Team: Dutch <nl@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2012-06-28 04:39+0000\n"
|
||||
"X-Generator: Launchpad (build 15505)\n"
|
||||
"X-Launchpad-Export-Date: 2012-07-03 05:36+0000\n"
|
||||
"X-Generator: Launchpad (build 15531)\n"
|
||||
|
||||
#. module: email_template
|
||||
#: field:email.template,subtype:0
|
||||
|
@ -192,7 +192,7 @@ msgstr ""
|
|||
#. module: email_template
|
||||
#: model:ir.model,name:email_template.model_mail_compose_message
|
||||
msgid "Email composition wizard"
|
||||
msgstr ""
|
||||
msgstr "E-mail samenstellen wizard"
|
||||
|
||||
#. module: email_template
|
||||
#: view:email.template:0
|
||||
|
|
|
@ -271,13 +271,6 @@ class event_event(osv.osv):
|
|||
# OpenChatter methods and notifications
|
||||
# ----------------------------------------
|
||||
|
||||
def get_needaction_user_ids(self, cr, uid, ids, context=None):
|
||||
result = dict.fromkeys(ids, [])
|
||||
for obj in self.browse(cr, uid, ids, context=context):
|
||||
if obj.state == 'draft' and obj.user_id:
|
||||
result[obj.id] = [obj.user_id.id]
|
||||
return result
|
||||
|
||||
def create_send_note(self, cr, uid, ids, context=None):
|
||||
message = _("Event has been <b>created</b>.")
|
||||
self.message_append_note(cr, uid, ids, body=message, context=context)
|
||||
|
@ -451,13 +444,6 @@ class event_registration(osv.osv):
|
|||
# OpenChatter methods and notifications
|
||||
# ----------------------------------------
|
||||
|
||||
def get_needaction_user_ids(self, cr, uid, ids, context=None):
|
||||
result = dict.fromkeys(ids, [])
|
||||
for obj in self.browse(cr, uid, ids, context=context):
|
||||
if obj.state == 'draft' and obj.user_id:
|
||||
result[obj.id] = [obj.user_id.id]
|
||||
return result
|
||||
|
||||
def create_send_note(self, cr, uid, ids, context=None):
|
||||
message = _("Registration has been <b>created</b>.")
|
||||
self.message_append_note(cr, uid, ids, body=message, context=context)
|
||||
|
|
|
@ -47,6 +47,43 @@
|
|||
|
||||
<!-- Events Organisation/CONFIGURATION/EVENTS -->
|
||||
|
||||
<!-- Event Read/Unread actions -->
|
||||
<record id="actions_server_event_event_unread" model="ir.actions.server">
|
||||
<field name="name">Mark unread</field>
|
||||
<field name="condition">True</field>
|
||||
<field name="type">ir.actions.server</field>
|
||||
<field name="model_id" ref="model_event_event"/>
|
||||
<field name="state">code</field>
|
||||
<field name="code">self.message_check_and_set_unread(cr, uid, context.get('active_ids'), context=context)</field>
|
||||
</record>
|
||||
<record id="action_event_event_unread" model="ir.values">
|
||||
<field name="name">action_event_event_unread</field>
|
||||
<field name="action_id" ref="actions_server_event_event_unread"/>
|
||||
<field name="value" eval="'ir.actions.server,' + str(ref('actions_server_event_event_unread'))" />
|
||||
<field name="key">action</field>
|
||||
<field name="model_id" ref="model_event_event" />
|
||||
<field name="model">event.event</field>
|
||||
<field name="key2">client_action_multi</field>
|
||||
</record>
|
||||
|
||||
<record id="actions_server_event_event_read" model="ir.actions.server">
|
||||
<field name="name">Mark read</field>
|
||||
<field name="condition">True</field>
|
||||
<field name="type">ir.actions.server</field>
|
||||
<field name="model_id" ref="model_event_event"/>
|
||||
<field name="state">code</field>
|
||||
<field name="code">self.message_check_and_set_read(cr, uid, context.get('active_ids'), context=context)</field>
|
||||
</record>
|
||||
<record id="action_event_event_read" model="ir.values">
|
||||
<field name="name">action_event_event_read</field>
|
||||
<field name="action_id" ref="actions_server_event_event_read"/>
|
||||
<field name="value" eval="'ir.actions.server,' + str(ref('actions_server_event_event_read'))" />
|
||||
<field name="key">action</field>
|
||||
<field name="model_id" ref="model_event_event" />
|
||||
<field name="model">event.event</field>
|
||||
<field name="key2">client_action_multi</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="view_event_form">
|
||||
<field name="name">Events</field>
|
||||
<field name="model">event.event</field>
|
||||
|
@ -130,9 +167,9 @@
|
|||
</page>
|
||||
</notebook>
|
||||
</sheet>
|
||||
<div class="oe_sheet_width">
|
||||
<field name="message_ids" colspan="4" widget="ThreadView" nolabel="1"/>
|
||||
</div>
|
||||
<footer>
|
||||
<field name="message_ids" colspan="4" widget="mail_thread" nolabel="1"/>
|
||||
</footer>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
@ -144,7 +181,7 @@
|
|||
<field name="model">event.event</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Events" colors="red:(register_min and register_min>register_current) or (register_max and register_max<register_current);grey:state=='cancel'">
|
||||
<tree string="Events" fonts="bold:needaction_pending==True" colors="red:(register_min and register_min>register_current) or (register_max and register_max<register_current);grey:state=='cancel'">
|
||||
<field name="name" string="Name"/>
|
||||
<field name="type"/>
|
||||
<field name="date_begin"/>
|
||||
|
@ -155,6 +192,7 @@
|
|||
<field name="main_speaker_id" groups="base.extended"/>
|
||||
<field name="user_id"/>
|
||||
<field name="state"/>
|
||||
<field name="needaction_pending" invisible="1"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
@ -264,6 +302,11 @@
|
|||
<field name="type">search</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Events">
|
||||
<filter icon="terp-mail-message-new"
|
||||
string="Inbox" help="Unread messages"
|
||||
name="needaction_pending"
|
||||
domain="[('needaction_pending','=',True)]"/>
|
||||
<separator orientation="vertical"/>
|
||||
<group>
|
||||
<field name="name" string="Events"/>
|
||||
<separator orientation="vertical"/>
|
||||
|
@ -330,12 +373,49 @@
|
|||
|
||||
<!-- EVENTS/REGISTRATIONS/EVENTS -->
|
||||
|
||||
<!-- Registration Read/Unread actions -->
|
||||
<record id="actions_server_event_registration_unread" model="ir.actions.server">
|
||||
<field name="name">Mark unread</field>
|
||||
<field name="condition">True</field>
|
||||
<field name="type">ir.actions.server</field>
|
||||
<field name="model_id" ref="model_event_registration"/>
|
||||
<field name="state">code</field>
|
||||
<field name="code">self.message_check_and_set_unread(cr, uid, context.get('active_ids'), context=context)</field>
|
||||
</record>
|
||||
<record id="action_event_registration_unread" model="ir.values">
|
||||
<field name="name">action_event_registration_unread</field>
|
||||
<field name="action_id" ref="actions_server_event_registration_unread"/>
|
||||
<field name="value" eval="'ir.actions.server,' + str(ref('actions_server_event_registration_unread'))" />
|
||||
<field name="key">action</field>
|
||||
<field name="model_id" ref="model_event_registration" />
|
||||
<field name="model">event.registration</field>
|
||||
<field name="key2">client_action_multi</field>
|
||||
</record>
|
||||
|
||||
<record id="actions_server_event_registration_read" model="ir.actions.server">
|
||||
<field name="name">Mark read</field>
|
||||
<field name="condition">True</field>
|
||||
<field name="type">ir.actions.server</field>
|
||||
<field name="model_id" ref="model_event_registration"/>
|
||||
<field name="state">code</field>
|
||||
<field name="code">self.message_check_and_set_read(cr, uid, context.get('active_ids'), context=context)</field>
|
||||
</record>
|
||||
<record id="action_event_registration_read" model="ir.values">
|
||||
<field name="name">action_event_registration_read</field>
|
||||
<field name="action_id" ref="actions_server_event_registration_read"/>
|
||||
<field name="value" eval="'ir.actions.server,' + str(ref('actions_server_event_registration_read'))" />
|
||||
<field name="key">action</field>
|
||||
<field name="model_id" ref="model_event_registration" />
|
||||
<field name="model">event.registration</field>
|
||||
<field name="key2">client_action_multi</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="view_event_registration_tree">
|
||||
<field name="name">event.registration.tree</field>
|
||||
<field name="model">event.registration</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Registration" >
|
||||
<tree string="Registration" fonts="bold:needaction_pending==True">
|
||||
<field name="create_date"/>
|
||||
<field name="partner_id"/>
|
||||
<field name="name"/>
|
||||
|
@ -345,6 +425,7 @@
|
|||
<field name="user_id"/>
|
||||
<field name="origin"/>
|
||||
<field name="state"/>
|
||||
<field name="needaction_pending" invisible="1"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
@ -387,19 +468,6 @@
|
|||
</group>
|
||||
</page>
|
||||
<page string="Emails">
|
||||
<!--
|
||||
<field name="message_ids" colspan="4" nolabel="1" mode="tree">
|
||||
<tree string="History">
|
||||
<field name="display_text" string="History Information"/>
|
||||
<field name="reply_to" invisible="1"/>
|
||||
<button
|
||||
string="Reply" attrs="{'invisible': [('reply_to', '=', False)]}"
|
||||
name="%(mail.action_email_compose_message_wizard)d"
|
||||
context="{'mail.compose.message.mode':'reply', 'message_id':active_id}"
|
||||
icon="terp-mail-replied" type="action" />
|
||||
</tree>
|
||||
</field>
|
||||
-->
|
||||
<button string="Send New Email"
|
||||
name="%(mail.action_email_compose_message_wizard)d"
|
||||
icon="terp-mail-message-new" context= '{"default_email_to":email}' type="action"/>
|
||||
|
@ -407,9 +475,9 @@
|
|||
|
||||
</notebook>
|
||||
</sheet>
|
||||
<div class="oe_sheet_width">
|
||||
<field name="message_ids" colspan="4" widget="ThreadView" nolabel="1"/>
|
||||
</div>
|
||||
<footer>
|
||||
<field name="message_ids" colspan="4" widget="mail_thread" nolabel="1"/>
|
||||
</footer>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
@ -449,6 +517,11 @@
|
|||
<field name="arch" type="xml">
|
||||
<search string="Event Registration">
|
||||
<group>
|
||||
<filter icon="terp-mail-message-new"
|
||||
string="Inbox" help="Unread messages"
|
||||
name="needaction_pending"
|
||||
domain="[('needaction_pending','=',True)]"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="name" string="Participant"
|
||||
filter_domain="['|','|','|',('name','ilike',self),('partner_id','ilike',self),('email','ilike',self),('origin','ilike',self)]"/>
|
||||
<separator orientation="vertical"/>
|
||||
|
|
|
@ -151,7 +151,7 @@ openerp_mailgate.py -u %(uid)d -p PASSWORD -o %(model)s -d %(dbname)s --host=HOS
|
|||
connection = server.connect()
|
||||
server.write({'state':'done'})
|
||||
except Exception, e:
|
||||
logger.exception("Failed to connect to %s server %s", server.type, server.name)
|
||||
_logger.exception("Failed to connect to %s server %s", server.type, server.name)
|
||||
raise osv.except_osv(_("Connection test failed!"), _("Here is what we got instead:\n %s") % tools.ustr(e))
|
||||
finally:
|
||||
try:
|
||||
|
@ -177,7 +177,7 @@ openerp_mailgate.py -u %(uid)d -p PASSWORD -o %(model)s -d %(dbname)s --host=HOS
|
|||
mail_thread = self.pool.get('mail.thread')
|
||||
action_pool = self.pool.get('ir.actions.server')
|
||||
for server in self.browse(cr, uid, ids, context=context):
|
||||
logger.info('start checking for new emails on %s server %s', server.type, server.name)
|
||||
_logger.info('start checking for new emails on %s server %s', server.type, server.name)
|
||||
context.update({'fetchmail_server_id': server.id, 'server_type': server.type})
|
||||
count = 0
|
||||
imap_server = False
|
||||
|
@ -198,9 +198,9 @@ openerp_mailgate.py -u %(uid)d -p PASSWORD -o %(model)s -d %(dbname)s --host=HOS
|
|||
imap_server.store(num, '+FLAGS', '\\Seen')
|
||||
cr.commit()
|
||||
count += 1
|
||||
logger.info("fetched/processed %s email(s) on %s server %s", count, server.type, server.name)
|
||||
_logger.info("fetched/processed %s email(s) on %s server %s", count, server.type, server.name)
|
||||
except Exception, e:
|
||||
logger.exception("Failed to fetch mail from %s server %s", server.type, server.name)
|
||||
_logger.exception("Failed to fetch mail from %s server %s", server.type, server.name)
|
||||
finally:
|
||||
if imap_server:
|
||||
imap_server.close()
|
||||
|
@ -222,9 +222,9 @@ openerp_mailgate.py -u %(uid)d -p PASSWORD -o %(model)s -d %(dbname)s --host=HOS
|
|||
action_pool.run(cr, uid, [server.action_id.id], {'active_id': res_id, 'active_ids':[res_id]})
|
||||
pop_server.dele(num)
|
||||
cr.commit()
|
||||
logger.info("fetched/processed %s email(s) on %s server %s", numMsgs, server.type, server.name)
|
||||
_logger.info("fetched/processed %s email(s) on %s server %s", numMsgs, server.type, server.name)
|
||||
except Exception, e:
|
||||
logger.exception("Failed to fetch mail from %s server %s", server.type, server.name)
|
||||
_logger.exception("Failed to fetch mail from %s server %s", server.type, server.name)
|
||||
finally:
|
||||
if pop_server:
|
||||
pop_server.quit()
|
||||
|
|
|
@ -43,12 +43,12 @@ You can manage:
|
|||
'update_xml': [
|
||||
'security/hr_security.xml',
|
||||
'security/ir.model.access.csv',
|
||||
'board_hr_view.xml',
|
||||
'hr_view.xml',
|
||||
'hr_department_view.xml',
|
||||
'process/hr_process.xml',
|
||||
'hr_installer.xml',
|
||||
'hr_data.xml',
|
||||
'board_hr_view.xml',
|
||||
'res_config_view.xml',
|
||||
],
|
||||
'demo_xml': [
|
||||
|
|
|
@ -13,12 +13,14 @@
|
|||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="department" version="7.0">
|
||||
<group col="4">
|
||||
<field name="name"/>
|
||||
<field name="parent_id"/>
|
||||
<field name="manager_id"/>
|
||||
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
|
||||
</group>
|
||||
<sheet>
|
||||
<group col="4">
|
||||
<field name="name"/>
|
||||
<field name="manager_id"/>
|
||||
<field name="parent_id"/>
|
||||
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
|
||||
</group>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
<menuitem id="menu_hr_main" parent="menu_hr_root" name="Human Resources" sequence="0"/>
|
||||
<menuitem id="menu_hr_configuration" name="Configuration" parent="hr.menu_hr_root" groups="base.group_hr_manager" sequence="50"/>
|
||||
<menuitem id="menu_hr_management" name="Human Resources" parent="hr.menu_hr_configuration" sequence="25"/>
|
||||
<menuitem id="menu_hr_reporting_timesheet" name="Reports"
|
||||
parent="menu_hr_reporting" sequence="6" />
|
||||
|
||||
<!--Employee form view -->
|
||||
<record id="view_employee_form" model="ir.ui.view">
|
||||
|
@ -18,60 +20,64 @@
|
|||
<field name="arch" type="xml">
|
||||
<form string="Employee" version="7.0">
|
||||
<sheet>
|
||||
<div class="oe_right oe_button_box">
|
||||
<!-- Put here related buttons -->
|
||||
</div>
|
||||
<field class="oe_right" name="photo" widget='image' on_change="onchange_photo(photo)"/>
|
||||
<div class="oe_title">
|
||||
<label for="name" class="oe_edit_only"/>
|
||||
<h1><field name="name"/></h1>
|
||||
|
||||
<label for="company_id" class="oe_edit_only" groups="base.group_multi_company"/>
|
||||
<h2><field name="company_id" widget="selection" on_change="onchange_company(company_id)" groups="base.group_multi_company"/></h2>
|
||||
|
||||
<label for="department_id" class="oe_edit_only"/>
|
||||
<h2><field name="department_id" on_change="onchange_department_id(department_id)"/></h2>
|
||||
</div>
|
||||
<notebook>
|
||||
<page string="Personal Information">
|
||||
<group>
|
||||
<group string="General">
|
||||
<field name="user_id" on_change="onchange_user(user_id)"/>
|
||||
<field name="active"/>
|
||||
<field name="parent_id"/>
|
||||
<field name="photo" widget='image' class="oe_right" on_change="onchange_photo(photo)"/>
|
||||
<div class="oe_right oe_button_box" name="button_box">
|
||||
<!-- Put here related buttons -->
|
||||
</div>
|
||||
<div class="oe_title">
|
||||
<label for="name" class="oe_edit_only"/>
|
||||
<h1>
|
||||
<field name="name" class="oe_inline"/>
|
||||
<label class="oe_inline" string="," attrs="{'invisible': [('job_id', '=', False)]}"/>
|
||||
<field class="oe_inline" name="job_id" domain="[('state','!=','old')]" context="{'form_view_ref': 'hr.view_hr_job_employee_form'}"/>
|
||||
<label class="oe_inline" string="at" attrs="{'invisible': [('company_id', '=', False)]}" groups="base.group_multi_company"/>
|
||||
<field class="oe_inline" name="company_id" groups="base.group_multi_company" on_change="onchange_company(company_id)"/>
|
||||
</h1>
|
||||
<label for="department_id" class="oe_edit_only"/>
|
||||
<h2><field name="department_id" on_change="onchange_department_id(department_id)"/></h2>
|
||||
<label for="category_ids" class="oe_edit_only"/>
|
||||
<h3><field name="category_ids" widget="many2many_tags"/></h3>
|
||||
</div>
|
||||
<group colspan="4" col="4">
|
||||
<field name="work_email" widget="email" />
|
||||
<field name="work_phone"/>
|
||||
<field name="address_id" on_change="onchange_address_id(address_id)" />
|
||||
<field name="mobile_phone"/>
|
||||
</group>
|
||||
<notebook>
|
||||
<page string="Information">
|
||||
<group>
|
||||
<group>
|
||||
<field name="user_id" on_change="onchange_user(user_id)"/>
|
||||
<field name="parent_id" />
|
||||
<field name="coach_id"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="identification_id" groups="base.group_hr_user"/>
|
||||
<field name="passport_id" groups="base.group_hr_user"/>
|
||||
<field name="otherid" groups="base.group_hr_user"/>
|
||||
</group>
|
||||
<group name="active_group">
|
||||
<field name="active"/>
|
||||
</group>
|
||||
</group>
|
||||
<group groups="base.group_hr_user" string="Social IDs">
|
||||
<field name="identification_id"/>
|
||||
<field name="passport_id"/>
|
||||
<field name="otherid"/>
|
||||
<field name="notes" placeholder="Other Information ..." colspan="4"/>
|
||||
</page>
|
||||
<page string="Personal Information" groups="base.group_hr_user">
|
||||
<group col="4">
|
||||
<group>
|
||||
<field name="country_id"/>
|
||||
<field name="bank_account_id"/>
|
||||
<field name="address_home_id"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="gender"/>
|
||||
<field name="marital"/>
|
||||
<field name="birthday"/>
|
||||
</group>
|
||||
</group>
|
||||
<group groups="base.group_hr_user" string="Status">
|
||||
<field name="gender"/>
|
||||
<field name="marital"/>
|
||||
<field name="country_id"/>
|
||||
<field name="birthday"/>
|
||||
</group>
|
||||
<group string="Contact Information">
|
||||
<field name="address_home_id"/>
|
||||
<field name="address_id" on_change="onchange_address_id(address_id)"/>
|
||||
<field name="work_phone"/>
|
||||
<field name="mobile_phone"/>
|
||||
<field name="work_email" widget="email"/>
|
||||
<field name="work_location"/>
|
||||
</group>
|
||||
<group string="Job Information">
|
||||
<field name="job_id" domain="[('state','!=','old')]" context="{'form_view_ref': 'hr.view_hr_job_employee_form'}"/>
|
||||
<field name="coach_id"/>
|
||||
</group>
|
||||
</group>
|
||||
</page>
|
||||
<page string="Categories" groups="base.group_hr_user">
|
||||
<field name="category_ids" widget="many2many_tags"/>
|
||||
</page>
|
||||
<page string="Notes" groups="base.group_hr_user">
|
||||
<field name="notes"/>
|
||||
</page>
|
||||
</notebook>
|
||||
</page>
|
||||
</notebook>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
|
@ -357,16 +363,25 @@
|
|||
<field name="state" widget="statusbar" statusbar_visible="recruit,open"/>
|
||||
</header>
|
||||
<sheet>
|
||||
<label for="name" class="oe_edit_only"/>
|
||||
<h1>
|
||||
<field name="name" class="oe_inline"/>
|
||||
<label class="oe_inline" string="(" attrs="{'invisible': [('department_id', '=', False)]}"/>
|
||||
<field name="department_id" class="oe_inline"/>
|
||||
<label class="oe_inline" string=")" attrs="{'invisible': [('department_id', '=', False)]}"/>
|
||||
</h1>
|
||||
<label for="employee_ids" class="oe_edit_only"/>
|
||||
<h2>
|
||||
<field name="employee_ids" widget="many2many_tags" mode="tree,form"/>
|
||||
</h2>
|
||||
<group>
|
||||
<group>
|
||||
<field name="name"/>
|
||||
<field name="department_id"/>
|
||||
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="no_of_recruitment" on_change="on_change_expected_employee(no_of_recruitment,no_of_employee)"/>
|
||||
<field name="no_of_employee"/>
|
||||
<field name="expected_employees"/>
|
||||
<field name="no_of_recruitment" on_change="on_change_expected_employee(no_of_recruitment,no_of_employee)"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
|
||||
</group>
|
||||
</group>
|
||||
<notebook>
|
||||
|
@ -376,9 +391,6 @@
|
|||
<label for="requirements"/>
|
||||
<field name="requirements"/>
|
||||
</page>
|
||||
<page string="Employees" groups="base.group_user">
|
||||
<field name="employee_ids" widget="many2many" mode="tree,form"/>
|
||||
</page>
|
||||
</notebook>
|
||||
</sheet>
|
||||
</form>
|
||||
|
|
|
@ -133,12 +133,13 @@
|
|||
<field name="type">form</field>
|
||||
<field name="inherit_id" ref="hr.view_employee_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="coach_id" position="after">
|
||||
<group colspan="2">
|
||||
<field name="state"/>
|
||||
<button name="attendance_action_change" states="present" string="Sign Out" type="object" icon="gtk-go-forward" context="{'type':'sign_out'}" groups="base.group_hr_user"/>
|
||||
<button name="attendance_action_change" states="absent" string="Sign In" type="object" icon="gtk-go-back" context="{'type':'sign_in'}" groups="base.group_hr_user"/>
|
||||
</group>
|
||||
<field name="active" position="before">
|
||||
<label for="state"/>
|
||||
<div>
|
||||
<field name="state" class="oe_inline"/>
|
||||
<button class="oe_inline oe_right" name="attendance_action_change" states="present" string="Sign Out" type="object" icon="gtk-go-forward" context="{'type':'sign_out'}" groups="base.group_hr_user"/>
|
||||
<button class="oe_inline oe_right" name="attendance_action_change" states="absent" string="Sign In" type="object" icon="gtk-go-back" context="{'type':'sign_in'}" groups="base.group_hr_user"/>
|
||||
</div>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
|
|
@ -44,7 +44,7 @@ class hr_employee(osv.osv):
|
|||
'place_of_birth': fields.char('Place of Birth', size=30),
|
||||
'children': fields.integer('Number of Children'),
|
||||
'vehicle': fields.char('Company Vehicle', size=64),
|
||||
'vehicle_distance': fields.integer('Home-Work Distance', help="In kilometers"),
|
||||
'vehicle_distance': fields.integer('Home-Work Dist.', help="In kilometers"),
|
||||
'contract_ids': fields.one2many('hr.contract', 'employee_id', 'Contracts'),
|
||||
'contract_id':fields.function(_get_latest_contract, string='Contract', type='many2one', relation="hr.contract", help='Latest contract of the employee'),
|
||||
}
|
||||
|
|
|
@ -8,30 +8,32 @@
|
|||
<field name="model">hr.employee</field>
|
||||
<field name="inherit_id" ref="hr.view_employee_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<page string="Personal Information" position="after">
|
||||
<page string="Miscellaneous" groups="base.group_hr_user">
|
||||
<group colspan="2" col="2">
|
||||
<separator string="Personal Info" colspan="2"/>
|
||||
<field name="bank_account_id"/>
|
||||
<field name="place_of_birth"/>
|
||||
<data>
|
||||
<xpath expr="//field[@name='parent_id']" position="before">
|
||||
<field name="manager"/>
|
||||
</xpath>
|
||||
<xpath expr="//group[@name='active_group']" position="before">
|
||||
<group>
|
||||
<field name="vehicle"/>
|
||||
<field name="vehicle_distance"/>
|
||||
</group>
|
||||
</xpath>
|
||||
<field name="active" position="before">
|
||||
<field name="medic_exam" string="Medical Exam"/>
|
||||
</field>
|
||||
<field name="birthday" position="before">
|
||||
<field name="children"/>
|
||||
</group>
|
||||
<group colspan="2" col="2">
|
||||
<separator string="Job Info" colspan="2"/>
|
||||
<field name="manager" />
|
||||
<field name="vehicle" />
|
||||
<field name="vehicle_distance" />
|
||||
</group>
|
||||
<group colspan="2" col="2">
|
||||
<separator string="Others Info" colspan="2"/>
|
||||
<field name="medic_exam" />
|
||||
</group>
|
||||
</page>
|
||||
</page>
|
||||
</field>
|
||||
<field name="birthday" position="after">
|
||||
<field name="place_of_birth"/>
|
||||
</field>
|
||||
<field name="bank_account_id" position="replace">
|
||||
<field name="bank_account_id" context="{'display_partner':True, 'partner_id':partner_id}"/>
|
||||
</field>
|
||||
</data>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="hr_contract_view_search" model="ir.ui.view">
|
||||
<field name="name">hr.contract.view.search</field>
|
||||
<field name="model">hr.contract</field>
|
||||
|
@ -67,34 +69,45 @@
|
|||
<field name="arch" type="xml">
|
||||
<form string="Contract" version="7.0">
|
||||
<sheet>
|
||||
<group col="4">
|
||||
<field name="name" />
|
||||
<field name="employee_id" />
|
||||
<field name="job_id"/>
|
||||
<field name="wage"/>
|
||||
<field name="type_id"/>
|
||||
</group>
|
||||
<div class="oe_title">
|
||||
<h1>
|
||||
<field name="name" class="oe_inline"/>, <field name="employee_id" class="oe_inline"/>
|
||||
</h1>
|
||||
<h2>
|
||||
<div>
|
||||
<label for="job_id" class="oe_edit_only"/>
|
||||
<field name="job_id"/>
|
||||
</div>
|
||||
<div>
|
||||
<label for="type_id" class="oe_edit_only"/>
|
||||
<field name="type_id"/>
|
||||
</div>
|
||||
</h2>
|
||||
</div>
|
||||
<notebook>
|
||||
<page string="Information" name="information">
|
||||
<group>
|
||||
<group name="left_column" string="Duration">
|
||||
<field name="date_start" />
|
||||
<field name="date_end" />
|
||||
<group name="salary_and_advantages" string="Salary and Advantages">
|
||||
<field name="wage"/>
|
||||
<field name="advantages" nolabel="1" placeholder="Advantages..." colspan="2"/>
|
||||
</group>
|
||||
<group name="duration_group" string="Duration">
|
||||
<label for="trial_date_start" string="Trial Period Duration"/>
|
||||
<div>
|
||||
<field name="trial_date_start" class="oe_inline"/> - <field name="trial_date_end" class="oe_inline"/>
|
||||
</div>
|
||||
<label for="date_start" string="Duration"/>
|
||||
<div>
|
||||
<field name="date_start" class="oe_inline"/> - <field name="date_end" class="oe_inline"/>
|
||||
</div>
|
||||
<field name="working_hours"/>
|
||||
</group>
|
||||
<group string="Trial Period">
|
||||
<field name="trial_date_start" />
|
||||
<field name="trial_date_end" />
|
||||
</group>
|
||||
<group name="right_column" string="Advantages">
|
||||
<field name="advantages" nolabel="1" colspan="2"/>
|
||||
</group>
|
||||
</group>
|
||||
<separator string="Notes"/>
|
||||
<field name="notes"/>
|
||||
</page>
|
||||
<page string="Work Permit">
|
||||
<group string="Valid for">
|
||||
<group col="4">
|
||||
<field name="visa_no"/>
|
||||
<field name="permit_no"/>
|
||||
<field name="visa_expire"/>
|
||||
|
|
|
@ -28,11 +28,15 @@
|
|||
<field name="arch" type="xml">
|
||||
<form string="Appraisal Plan" version="7.0">
|
||||
<group col="4">
|
||||
<field name="name"/>
|
||||
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
|
||||
<field name="month_first"/>
|
||||
<field name="month_next"/>
|
||||
<field name="active"/>
|
||||
<group>
|
||||
<field name="name"/>
|
||||
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
|
||||
<field name="active"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="month_first"/>
|
||||
<field name="month_next"/>
|
||||
</group>
|
||||
</group>
|
||||
<notebook>
|
||||
<page string="Appraisal Phases">
|
||||
|
@ -133,10 +137,12 @@
|
|||
<field name="model">hr.employee</field>
|
||||
<field name="inherit_id" ref="hr.view_employee_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<page string="Notes" position="before">
|
||||
<page string="Personal Information" position="after">
|
||||
<page string="Appraisal" groups="base.group_hr_user">
|
||||
<field name="evaluation_plan_id" on_change="onchange_evaluation_plan_id(evaluation_plan_id, evaluation_date)"/>
|
||||
<field name="evaluation_date"/>
|
||||
<group col="4">
|
||||
<field name="evaluation_plan_id" on_change="onchange_evaluation_plan_id(evaluation_plan_id, evaluation_date)"/>
|
||||
<field name="evaluation_date"/>
|
||||
</group>
|
||||
</page>
|
||||
</page>
|
||||
</field>
|
||||
|
@ -157,49 +163,50 @@
|
|||
<field name="state" widget="statusbar" statusbar_visible="draft,progress,wait,done" statusbar_colors='{"progress":"blue"}'/>
|
||||
</header>
|
||||
<sheet>
|
||||
<label for="employee_id" class="oe_edit_only"/>
|
||||
<h1><field name="employee_id" on_change="onchange_employee_id(employee_id)" class="oe_inline"/>, <field name="date" class="oe_inline"/></h1>
|
||||
<label for="plan_id" class="oe_edit_only"/>
|
||||
<h2><field name="plan_id"/></h2>
|
||||
<group>
|
||||
<group string="Appraisal Data">
|
||||
<field name="employee_id" on_change="onchange_employee_id(employee_id)"/>
|
||||
<field name="plan_id"/>
|
||||
<field name="date"/>
|
||||
</group>
|
||||
<group attrs="{'invisible':['|', ('state','=','draft'), ('state', '=', 'wait')]}" string="Ending Summary">
|
||||
<group colspan="4" attrs="{'invisible':['|', ('state','=','draft'), ('state', '=', 'wait')]}">
|
||||
<field name="rating" attrs="{'readonly':[('state','<>','progress')]}"/>
|
||||
<field name="date_close" readonly="1"/>
|
||||
</group>
|
||||
</group>
|
||||
<notebook>
|
||||
<page string="Appraisal" attrs="{'invisible':[('state','=','draft')]}">
|
||||
<field name="survey_request_ids">
|
||||
<form string="Interview Appraisal" version="7.0">
|
||||
<group col="4">
|
||||
<group string="Appraisal Forms" attrs="{'invisible':[('state','=','draft')]}">
|
||||
<field nolabel="1" name="survey_request_ids">
|
||||
<form string="Interview Appraisal" version="7.0">
|
||||
<div class="oe_right oe_button_box">
|
||||
<button name="%(survey.action_view_survey_question_message)d" string="Answer Survey" type="action" states="waiting_answer,done,cancel" icon="gtk-execute" context="{'survey_id': survey_id, 'response_id': [response], 'response_no':0, 'active' : response,'request' : True, 'object' : 'hr.evaluation.interview', 'cur_id' : active_id}" attrs="{'readonly':[('survey_id','=',False)]}"/>
|
||||
<button name="%(survey.survey_browse_response)d" string="Print Interview" type="action" states="done" icon="gtk-print" context="{'survey_id': survey_id, 'response_id' : [response], 'response_no':0,}" attrs="{'readonly':[('response','=',False)]}" />
|
||||
</div>
|
||||
<group>
|
||||
<group>
|
||||
<field name="survey_id"/>
|
||||
<div colspan="2">
|
||||
<button name="%(survey.action_view_survey_question_message)d" string="Answer Survey" type="action" states="waiting_answer,done,cancel" icon="gtk-execute" context="{'survey_id': survey_id, 'response_id': [response], 'response_no':0, 'active' : response,'request' : True, 'object' : 'hr.evaluation.interview', 'cur_id' : active_id}" attrs="{'readonly':[('survey_id','=',False)]}"/>
|
||||
<button name="%(survey.survey_browse_response)d" string="Print Interview" type="action" states="done" icon="gtk-print" context="{'survey_id': survey_id, 'response_id' : [response], 'response_no':0,}" attrs="{'readonly':[('response','=',False)]}" />
|
||||
</div>
|
||||
<field name="date_deadline"/>
|
||||
<field name="response" readonly="1"/>
|
||||
<field name="user_to_review_id"/>
|
||||
<field name="user_id" string="Interviewer"/>
|
||||
</group>
|
||||
<group col="4" string="Status">
|
||||
<field name="state"/>
|
||||
<div>
|
||||
<button string="Done" name="survey_req_done" states="waiting_answer" type="object" icon="gtk-jump-to" />
|
||||
</div>
|
||||
<group>
|
||||
<field name="date_deadline"/>
|
||||
<field name="response" readonly="1"/>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</page>
|
||||
<page string="Internal Notes" attrs="{'invisible':[('state','=','draft')]}">
|
||||
<field name="note_action"
|
||||
groups="base.group_hr_manager"/>
|
||||
</page>
|
||||
<page string="Public Notes" attrs="{'invisible':[('state','=','draft')]}">
|
||||
<field name="note_summary"/>
|
||||
</page>
|
||||
</notebook>
|
||||
</group>
|
||||
<group col="4" string="Status" invisible="1">
|
||||
<field name="state"/>
|
||||
<div>
|
||||
<button string="Done" name="survey_req_done" states="waiting_answer" type="object" icon="gtk-jump-to" />
|
||||
</div>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</group>
|
||||
<group string="Internal Notes" attrs="{'invisible':[('state','=','draft')]}">
|
||||
<field nolabel="1" name="note_action"
|
||||
groups="base.group_hr_manager" placeholder="Appraisal Summary..."/>
|
||||
</group>
|
||||
<group string="Public Notes" attrs="{'invisible':[('state','=','draft')]}">
|
||||
<field nolabel="1" name="note_summary" placeholder="Action Plan..."/>
|
||||
</group>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
|
@ -279,13 +286,17 @@
|
|||
<field name="state" widget="statusbar" statusbar_visible="waiting_answer,done"/>
|
||||
</header>
|
||||
<sheet>
|
||||
<group col="4">
|
||||
<field name="user_to_review_id"/>
|
||||
<field name="user_id" string="Interviewer"/>
|
||||
<field name="date_deadline"/>
|
||||
<field name="survey_id"/>
|
||||
<field name="evaluation_id"/>
|
||||
<field name="response" readonly="1"/>
|
||||
<group>
|
||||
<group>
|
||||
<field name="survey_id"/>
|
||||
<field name="user_to_review_id"/>
|
||||
<field name="user_id" string="Interviewer"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="date_deadline"/>
|
||||
<field name="response" readonly="1"/>
|
||||
<field name="evaluation_id" string="Appraisal Plan"/>
|
||||
</group>
|
||||
</group>
|
||||
</sheet>
|
||||
</form>
|
||||
|
|
|
@ -90,7 +90,7 @@
|
|||
<field name="search_view_id" ref="view_evaluation_report_search"/>
|
||||
</record>
|
||||
|
||||
<menuitem action="action_evaluation_report_all" id="menu_evaluation_report_all" parent="hr.menu_hr_reporting" sequence="3" groups="base.group_hr_manager"/>
|
||||
<menuitem action="action_evaluation_report_all" id="menu_evaluation_report_all" parent="hr.menu_hr_reporting" sequence="2" groups="base.group_hr_manager"/>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -56,12 +56,12 @@ class hr_expense_expense(osv.osv):
|
|||
return self.pool.get('res.currency').search(cr, uid, [('rate','=',1.0)], context=context)[0]
|
||||
|
||||
_name = "hr.expense.expense"
|
||||
_inherit = ['mail.thread']
|
||||
_description = "Expense"
|
||||
_order = "id desc"
|
||||
_columns = {
|
||||
'name': fields.char('Description', size=128, required=True),
|
||||
'id': fields.integer('Sheet ID', readonly=True),
|
||||
'ref': fields.char('Reference', size=32),
|
||||
'date': fields.date('Date', select=True),
|
||||
'journal_id': fields.many2one('account.journal', 'Force Journal', help = "The journal used when the expense is invoiced"),
|
||||
'employee_id': fields.many2one('hr.employee', "Employee", required=True),
|
||||
|
|
|
@ -49,7 +49,6 @@
|
|||
<field name="employee_id"/>
|
||||
<field name="date"/>
|
||||
<field name="department_id"/>
|
||||
<field name="ref"/>
|
||||
<field name="name"/>
|
||||
<field name="amount"/>
|
||||
<field name="state"/>
|
||||
|
@ -74,38 +73,44 @@
|
|||
<field name="state" widget="statusbar" statusbar_visible="draft,confirm,accepted" statusbar_colors='{"confirm":"blue","cancelled":"red"}'/>
|
||||
</header>
|
||||
<sheet>
|
||||
<group col="4">
|
||||
<field name="employee_id" on_change="onchange_employee_id(employee_id)"/>
|
||||
<field name="name"/>
|
||||
<field name="ref"/>
|
||||
<field name="date"/>
|
||||
<field name="currency_id"/>
|
||||
<field name="department_id"/>
|
||||
<field name="company_id" groups="base.group_multi_company"/>
|
||||
<group>
|
||||
<group>
|
||||
<field name="employee_id" on_change="onchange_employee_id(employee_id)"/>
|
||||
<field name="date"/>
|
||||
<field name="department_id"/>
|
||||
<field name="company_id" groups="base.group_multi_company"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="name"/>
|
||||
<field name="user_valid"/>
|
||||
<field name="currency_id"/>
|
||||
</group>
|
||||
</group>
|
||||
<notebook>
|
||||
<page string="Description">
|
||||
<field name="line_ids" context="{'currency_id': currency_id}">
|
||||
<form string="Expense Lines" version="7.0">
|
||||
<group col="6" colspan="4">
|
||||
<field name="product_id" on_change="onchange_product_id(product_id, uom_id, parent.employee_id, context)" context="{'default_hr_expense_ok':1}"/>
|
||||
<field name="name" colspan="4"/>
|
||||
<newline/>
|
||||
<field name="unit_amount"/>
|
||||
<field name="unit_quantity"/>
|
||||
<field name="uom_id" on_change="onchange_product_id(product_id, uom_id, parent.employee_id, context)"/>
|
||||
</group>
|
||||
<group colspan="2" col="2" groups="analytic.group_analytic_accounting">
|
||||
<separator string="Customer Project" colspan="2"/>
|
||||
<field domain="[('type','in',['normal','contract'])]" name="analytic_account"/>
|
||||
</group>
|
||||
<group colspan="2" col="2">
|
||||
<separator string="References" colspan="2"/>
|
||||
<field name="date_value" />
|
||||
<field name="ref"/>
|
||||
<group>
|
||||
<group>
|
||||
<field name="product_id" on_change="onchange_product_id(product_id, uom_id, parent.employee_id, context)" context="{'default_hr_expense_ok':1}"/>
|
||||
<field name="name"/>
|
||||
<field name="ref"/>
|
||||
<field domain="[('type','=','normal')]" name="analytic_account" groups="analytic.group_analytic_accounting"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="unit_amount"/>
|
||||
<label for="unit_quantity"/>
|
||||
<div>
|
||||
<field name="unit_quantity" class="oe_inline"/>
|
||||
<field name="uom_id" on_change="onchange_product_id(product_id, uom_id, parent.employee_id, context)" class="oe_inline"/>
|
||||
</div>
|
||||
<field name="date_value" />
|
||||
</group>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
<separator string="Notes"/>
|
||||
<field name="note" placeholder="Free Notes"/>
|
||||
</page>
|
||||
<page string="Other Info">
|
||||
<group>
|
||||
|
@ -113,17 +118,13 @@
|
|||
<field name="journal_id"/>
|
||||
<field name="invoice_id" context="{'type':'in_invoice', 'journal_type': 'purchase'}"/>
|
||||
</group>
|
||||
<group groups="base.group_no_one" string="Validation">
|
||||
<field name="date_confirm" readonly="1"/>
|
||||
<field name="date_valid" readonly="1"/>
|
||||
<field name="user_valid"/>
|
||||
</group>
|
||||
</group>
|
||||
<separator string="Notes"/>
|
||||
<field name="note"/>
|
||||
</page>
|
||||
</notebook>
|
||||
</sheet>
|
||||
<footer>
|
||||
<field name="message_ids" widget="mail_thread"/>
|
||||
</footer>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
|
|
@ -160,7 +160,7 @@
|
|||
<para style="terp_tblheader_General_Centre">Date</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_General_Centre">Reference</para>
|
||||
<para style="terp_tblheader_General_Centre">Description</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_General_Centre">Validated By</para>
|
||||
|
@ -176,7 +176,7 @@
|
|||
<para style="terp_default_Centre_8">[[ formatLang(o.date,date=True) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Centre_8">[[ o.ref ]]</para>
|
||||
<para style="terp_default_Centre_8">[[ o.name ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Centre_8">[[ o.user_valid.name ]]</para>
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree colors="blue:state == 'draft';black:state in ('confirm','accepted','invoiced','paid');gray:state == 'cancelled'" string="Expenses Analysis">
|
||||
<field name="date" invisible="1"/>
|
||||
<field name="employee_id" invisible="1"/>
|
||||
<field name="user_id" invisible="1"/>
|
||||
<field name="year" invisible="1"/>
|
||||
|
@ -105,7 +104,7 @@
|
|||
<field name="search_view_id" ref="view_hr_expense_report_search"/>
|
||||
</record>
|
||||
|
||||
<menuitem action="action_hr_expense_report_all" id="menu_hr_expense_report_all" parent="hr.menu_hr_reporting" sequence="2"/>
|
||||
<menuitem action="action_hr_expense_report_all" id="menu_hr_expense_report_all" parent="hr.menu_hr_reporting" sequence="1"/>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -58,7 +58,6 @@ Note that:
|
|||
'hr_holidays_workflow.xml',
|
||||
'hr_holidays_view.xml',
|
||||
'hr_holidays_data.xml',
|
||||
'hr_holidays_wizard.xml',
|
||||
'hr_holidays_report.xml',
|
||||
'report/hr_holidays_report_view.xml',
|
||||
'report/available_holidays_view.xml',
|
||||
|
|
|
@ -359,7 +359,7 @@ class hr_holidays(osv.osv):
|
|||
# -----------------------------
|
||||
|
||||
def get_needaction_user_ids(self, cr, uid, ids, context=None):
|
||||
result = dict.fromkeys(ids, [])
|
||||
result = super(hr_holidays, self).get_needaction_user_ids(cr, uid, ids, context=context)
|
||||
for obj in self.browse(cr, uid, ids, context=context):
|
||||
if obj.state == 'confirm' and obj.employee_id.parent_id:
|
||||
result[obj.id] = [obj.employee_id.parent_id.user_id.id]
|
||||
|
@ -371,14 +371,16 @@ class hr_holidays(osv.osv):
|
|||
hr_manager_group = self.pool.get('res.groups').read(cr, uid, [obj_id], ['users'], context=context)[0]
|
||||
result[obj.id] = hr_manager_group['users']
|
||||
return result
|
||||
|
||||
|
||||
def message_get_subscribers(self, cr, uid, ids, context=None):
|
||||
sub_ids = self.message_get_subscribers_ids(cr, uid, ids, context=context);
|
||||
# add the employee and its manager if specified to the subscribed users
|
||||
""" Override to add employee and its manager. """
|
||||
user_ids = super(hr_holidays, self).message_get_subscribers(cr, uid, ids, context=context)
|
||||
for obj in self.browse(cr, uid, ids, context=context):
|
||||
if obj.employee_id.parent_id:
|
||||
sub_ids.append(obj.employee_id.parent_id.user_id.id)
|
||||
return self.pool.get('res.users').read(cr, uid, sub_ids, context=context)
|
||||
if obj.user_id and not obj.user_id.id in user_ids:
|
||||
user_ids.append(obj.user_id.id)
|
||||
if obj.employee_id.parent_id and not obj.employee_id.parent_id.user_id.id in user_ids:
|
||||
user_ids.append(obj.employee_id.parent_id.user_id.id)
|
||||
return user_ids
|
||||
|
||||
def create_notificate(self, cr, uid, ids, context=None):
|
||||
for obj in self.browse(cr, uid, ids, context=context):
|
||||
|
|
|
@ -1,6 +1,43 @@
|
|||
<openerp>
|
||||
<data>
|
||||
|
||||
<!-- Hr holidays Read/Unread actions -->
|
||||
<record id="actions_server_holidays_unread" model="ir.actions.server">
|
||||
<field name="name">Mark unread</field>
|
||||
<field name="condition">True</field>
|
||||
<field name="type">ir.actions.server</field>
|
||||
<field name="model_id" ref="model_hr_holidays"/>
|
||||
<field name="state">code</field>
|
||||
<field name="code">self.message_check_and_set_unread(cr, uid, context.get('active_ids'), context=context)</field>
|
||||
</record>
|
||||
<record id="action_holidays_unread" model="ir.values">
|
||||
<field name="name">action_holidays_unread</field>
|
||||
<field name="action_id" ref="actions_server_holidays_unread"/>
|
||||
<field name="value" eval="'ir.actions.server,' + str(ref('actions_server_holidays_unread'))" />
|
||||
<field name="key">action</field>
|
||||
<field name="model_id" ref="model_hr_holidays" />
|
||||
<field name="model">hr.holidays</field>
|
||||
<field name="key2">client_action_multi</field>
|
||||
</record>
|
||||
|
||||
<record id="actions_server_holidays_read" model="ir.actions.server">
|
||||
<field name="name">Mark read</field>
|
||||
<field name="condition">True</field>
|
||||
<field name="type">ir.actions.server</field>
|
||||
<field name="model_id" ref="model_hr_holidays"/>
|
||||
<field name="state">code</field>
|
||||
<field name="code">self.message_check_and_set_read(cr, uid, context.get('active_ids'), context=context)</field>
|
||||
</record>
|
||||
<record id="action_holidays_read" model="ir.values">
|
||||
<field name="name">action_holidays_read</field>
|
||||
<field name="action_id" ref="actions_server_holidays_read"/>
|
||||
<field name="value" eval="'ir.actions.server,' + str(ref('actions_server_holidays_read'))" />
|
||||
<field name="key">action</field>
|
||||
<field name="model_id" ref="model_hr_holidays" />
|
||||
<field name="model">hr.holidays</field>
|
||||
<field name="key2">client_action_multi</field>
|
||||
</record>
|
||||
|
||||
<record id="view_hr_holidays_filter" model="ir.ui.view">
|
||||
<field name="name">hr.holidays.filter</field>
|
||||
<field name="model">hr.holidays</field>
|
||||
|
@ -10,6 +47,11 @@
|
|||
<group>
|
||||
<field name="date_from"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter icon="terp-mail-message-new"
|
||||
string="Inbox" help="Unread messages"
|
||||
name="needaction_pending"
|
||||
domain="[('needaction_pending','=',True)]"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="My Leaves" icon="terp-personal" name="my_leaves" domain="[('employee_id.user_id','=', uid)]" help="My Leaves"/>
|
||||
<filter string="My Department Leaves" icon="terp-personal+" help="My Department Leaves" domain="[('department_id.manager_id','=',uid)]"/>
|
||||
<filter icon="terp-check" domain="[('state','=','draft')]" string="To Confirm"/>
|
||||
|
@ -68,35 +110,45 @@
|
|||
<field name="state" widget="statusbar" statusbar_visible="draft,confirm,validate" statusbar_colors='{"confirm":"blue","validate1":"blue","refuse":"red"}'/>
|
||||
</header>
|
||||
<sheet string="Leave Request">
|
||||
<group col="8" colspan="4">
|
||||
<field name="name" attrs="{'readonly':[('state','!=','draft'),('state','!=','confirm')]}"/>
|
||||
<field name="holiday_type" on_change="onchange_type(holiday_type)" attrs="{'readonly':[('state','!=','draft')]}" width="130" string="Mode" groups="base.group_hr_user"/>
|
||||
<group attrs="{'invisible':[('holiday_type','=','employee')]}">
|
||||
<field name="category_id" attrs="{'required':[('holiday_type','=','category')], 'readonly':[('state','!=','draft'), ('state','!=','confirm')]}"/>
|
||||
<group>
|
||||
<group>
|
||||
<field name="name" attrs="{'readonly':[('state','!=','draft'),('state','!=','confirm')]}"/>
|
||||
<field name="holiday_type" on_change="onchange_type(holiday_type)" attrs="{'readonly':[('state','!=','draft')]}" width="130" string="Mode" groups="base.group_hr_user"/>
|
||||
<field name="employee_id" attrs="{'required':[('holiday_type','=','employee')],'invisible':[('holiday_type','=','category')]}" groups="base.group_hr_user"/>
|
||||
<field name="category_id" attrs="{'required':[('holiday_type','=','category')], 'invisible':[('holiday_type','=','employee')], 'readonly':[('state','!=','draft'), ('state','!=','confirm')]}"/>
|
||||
<field name="department_id" attrs="{'readonly':[('holiday_type','=','category')]}" groups="base.group_hr_user"/>
|
||||
</group>
|
||||
<group attrs="{'invisible':[('holiday_type','=','category')]}">
|
||||
<field name="employee_id" attrs="{'required':[('holiday_type','=','employee')]}" groups="base.group_hr_user"/>
|
||||
<group>
|
||||
<field name="holiday_status_id" on_change="onchange_sec_id(holiday_status_id)" context="{'employee_id':employee_id}"/>
|
||||
<label for="number_of_days_temp" string="Duration"/>
|
||||
<div>
|
||||
<field name="date_from" on_change="onchange_date_from(date_to, date_from)" required="1" class="oe_inline"/> -
|
||||
<field name="date_to" on_change="onchange_date_from(date_to, date_from)" required="1" class="oe_inline"/>
|
||||
<div>
|
||||
<field name="number_of_days_temp" class="oe_inline"/> days
|
||||
</div>
|
||||
</div>
|
||||
</group>
|
||||
</group>
|
||||
<notebook colspan="4">
|
||||
<page string="General">
|
||||
<field name="holiday_status_id" on_change="onchange_sec_id(holiday_status_id)" context="{'employee_id':employee_id}"/>
|
||||
<field name="department_id" attrs="{'readonly':[('holiday_type','=','category')]}" groups="base.group_hr_user"/>
|
||||
<field name="date_from" on_change="onchange_date_from(date_to, date_from)" required="1"/>
|
||||
<field name="date_to" on_change="onchange_date_from(date_to, date_from)" required="1"/>
|
||||
<field name="number_of_days_temp"/>
|
||||
<field name="double_validation" invisible="1"/>
|
||||
<group>
|
||||
<group>
|
||||
<field name="manager_id" groups="base.group_no_one"/>
|
||||
<field name="double_validation" invisible="1"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="manager_id2" attrs="{'invisible':[('double_validation', '!=', True)]}" groups="base.group_no_one"/>
|
||||
</group>
|
||||
</group>
|
||||
<newline/>
|
||||
<field name="manager_id" groups="base.group_no_one"/>
|
||||
<field name="manager_id2" attrs="{'invisible':[('double_validation', '!=', True)]}" groups="base.group_no_one"/>
|
||||
<separator string="Reasons" colspan="4"/>
|
||||
<field name="notes" nolabel="1" colspan="4"/>
|
||||
<field name="notes" nolabel="1" colspan="4" placeholder="Add a reason..."/>
|
||||
</page>
|
||||
</notebook>
|
||||
</sheet>
|
||||
<div class="oe_sheet_width">
|
||||
<field name="message_ids" colspan="4" widget="ThreadView" nolabel="1"/>
|
||||
</div>
|
||||
<footer>
|
||||
<field name="message_ids" colspan="4" widget="mail_thread" nolabel="1"/>
|
||||
</footer>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
@ -117,31 +169,34 @@
|
|||
<field name="state" widget="statusbar" statusbar_visible="draft,confirm,validate" statusbar_colors='{"confirm":"blue","validate1":"blue","refuse":"red"}'/>
|
||||
</header>
|
||||
<sheet>
|
||||
<group>
|
||||
<field name="name"/>
|
||||
<field name="holiday_type" on_change="onchange_type(holiday_type)" attrs="{'readonly':[('state','!=','draft')]}" string="Allocation Mode" groups="base.group_hr_manager"/>
|
||||
<field name="employee_id" attrs="{'required':[('holiday_type','=','employee')], 'invisible':[('holiday_type','=','category')]}"/>
|
||||
<field name="category_id" attrs="{'required':[('holiday_type','=','category')], 'readonly':[('state','!=','draft')], 'invisible':[('holiday_type','=','employee')]}"/>
|
||||
</group>
|
||||
<notebook>
|
||||
<page string="General">
|
||||
<group col="4">
|
||||
<field name="holiday_status_id" on_change="onchange_sec_id(holiday_status_id)" context="{'employee_id':employee_id}"/>
|
||||
<group>
|
||||
<group>
|
||||
<field name="name"/>
|
||||
<field name="holiday_type" on_change="onchange_type(holiday_type)" attrs="{'readonly':[('state','!=','draft')]}" string="Allocation Mode" groups="base.group_hr_manager"/>
|
||||
<field name="employee_id" attrs="{'required':[('holiday_type','=','employee')], 'invisible':[('holiday_type','=','category')]}"/>
|
||||
<field name="category_id" attrs="{'required':[('holiday_type','=','category')], 'readonly':[('state','!=','draft')], 'invisible':[('holiday_type','=','employee')]}"/>
|
||||
<field name="department_id" attrs="{'readonly':['|', ('holiday_type','=','category'), ('state','not in' ,('draft', 'confirm'))]}"/>
|
||||
<field name="number_of_days_temp"/>
|
||||
<field name="double_validation" invisible="1"/>
|
||||
<field name="manager_id"/>
|
||||
<field name="manager_id2" attrs="{'invisible':[('double_validation', '!=', True)]}"/>
|
||||
</group>
|
||||
<separator string="Reasons"/>
|
||||
<field name="notes"/>
|
||||
</page>
|
||||
</notebook>
|
||||
</sheet>
|
||||
<div class="oe_sheet_width">
|
||||
<field name="message_ids" colspan="4" widget="ThreadView" nolabel="1"/>
|
||||
</div>
|
||||
</form>
|
||||
<group>
|
||||
<field name="holiday_status_id" on_change="onchange_sec_id(holiday_status_id)" context="{'employee_id':employee_id}"/>
|
||||
<field name="number_of_days_temp"/>
|
||||
</group>
|
||||
</group>
|
||||
<notebook>
|
||||
<page string="General">
|
||||
<group col="4">
|
||||
<field name="double_validation" invisible="1"/>
|
||||
<field name="manager_id"/>
|
||||
<field name="manager_id2" attrs="{'invisible':[('double_validation', '!=', True)]}"/>
|
||||
</group>
|
||||
<field name="notes" placeholder="Add a reason..."/>
|
||||
</page>
|
||||
</notebook>
|
||||
</sheet>
|
||||
<footer>
|
||||
<field name="message_ids" colspan="4" widget="mail_thread" nolabel="1"/>
|
||||
</footer>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
@ -300,7 +355,7 @@
|
|||
<record model="ir.actions.act_window.view" id="action_request_approve_holidays_form">
|
||||
<field name="sequence" eval="2"/>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="view_id" ref="allocation_leave_new"/>
|
||||
<field name="view_id" ref="edit_holiday_new"/>
|
||||
<field name="act_window_id" ref="request_approve_holidays"/>
|
||||
</record>
|
||||
|
||||
|
@ -367,8 +422,7 @@
|
|||
<form string="Leave Type" version="7.0">
|
||||
<group col="4">
|
||||
<field name="name"/>
|
||||
<field name="color_name"/>
|
||||
<field name="categ_id" widget="selection"/>
|
||||
<field name="categ_id"/>
|
||||
</group>
|
||||
<notebook>
|
||||
<page string="Details">
|
||||
|
@ -378,6 +432,7 @@
|
|||
<field name="limit"/>
|
||||
</group>
|
||||
<group name="second" string="Misc">
|
||||
<field name="color_name"/>
|
||||
<field name="active"/>
|
||||
</group>
|
||||
</group>
|
||||
|
@ -487,8 +542,13 @@
|
|||
<field name="type">form</field>
|
||||
<field name="inherit_id" ref="hr.view_employee_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="coach_id" position="after">
|
||||
<field name="remaining_leaves"/>
|
||||
<field name="active" position="before">
|
||||
<label for="remaining_leaves"/>
|
||||
<div>
|
||||
<field name="remaining_leaves" class="oe_inline"/>
|
||||
<label/>
|
||||
<button name="%(act_hr_employee_holiday_request)d" string="Leaves" type="action" class="oe_inline oe_right"/>
|
||||
</div>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
|
|
@ -1,10 +0,0 @@
|
|||
<?xml version="1.0" ?>
|
||||
<openerp>
|
||||
<data>
|
||||
<menuitem
|
||||
id="menu_hr_reporting_holidays"
|
||||
name="Leaves"
|
||||
parent="hr.menu_hr_reporting"
|
||||
sequence="6"/>
|
||||
</data>
|
||||
</openerp>
|
|
@ -17,7 +17,7 @@
|
|||
name="Leaves Analysis"
|
||||
id="menu_hr_available_holidays_report_tree"
|
||||
action="action_hr_available_holidays_report"
|
||||
parent="menu_hr_reporting_holidays"/>
|
||||
parent="hr.menu_hr_reporting" sequence="5" />
|
||||
|
||||
|
||||
</data>
|
||||
|
|
|
@ -9,9 +9,8 @@
|
|||
<field name="arch" type="xml">
|
||||
<form string="Leaves by Department" version="7.0">
|
||||
<header>
|
||||
<button name="print_report" string="Print" type="object" class="oe_highlight"/>
|
||||
or
|
||||
<button string="Cancel" class="oe_link" special="cancel" />
|
||||
<button name="print_report" string="Print" type="object" class="oe_highlight"/> or
|
||||
<button string="Cancel" special="cancel" class="oe_link"/>
|
||||
</header>
|
||||
<group>
|
||||
<field name="date_from" />
|
||||
|
@ -33,7 +32,7 @@
|
|||
|
||||
<menuitem
|
||||
name="Leaves by Department"
|
||||
parent="menu_hr_reporting_holidays"
|
||||
parent="hr.menu_hr_reporting_timesheet"
|
||||
action="action_hr_holidays_summary_dept"
|
||||
id="menu_account_central_journal"
|
||||
icon="STOCK_PRINT"/>
|
||||
|
|
|
@ -7,36 +7,6 @@
|
|||
<menuitem id="menu_hr_root_payroll" parent="hr.menu_hr_root" name="Payroll" sequence="30"/>
|
||||
<menuitem id="menu_hr_payroll_reporting" parent="hr.menu_hr_reporting" name="Payroll" groups="base.group_hr_manager"/>
|
||||
|
||||
<!-- Employee View -->
|
||||
<record id="hr_contract.hr_hr_employee_view_form2" model="ir.ui.view">
|
||||
<field name="name">hr.hr.employee.view.form2</field>
|
||||
<field name="model">hr.employee</field>
|
||||
<field name="inherit_id" ref="hr.view_employee_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<data>
|
||||
<xpath expr="//page[@string='Personal Information']" position="after">
|
||||
<page string="Miscellaneous" groups="base.group_hr_user">
|
||||
<group colspan="2" col="2">
|
||||
<separator string="Personal Info" colspan="2"/>
|
||||
<field name="bank_account_id" context="{'display_partner':True, 'partner_id':partner_id}"/>
|
||||
<field name="place_of_birth"/>
|
||||
<field name="children"/>
|
||||
<!-- <field name="basic" invisible="0"/> -->
|
||||
</group>
|
||||
<group colspan="2" col="2">
|
||||
<separator string="Job Info" colspan="2"/>
|
||||
<field name="manager" />
|
||||
<field name="vehicle" />
|
||||
<field name="vehicle_distance" />
|
||||
<field name="medic_exam" string="Medical Examination"/>
|
||||
</group>
|
||||
</page>
|
||||
</xpath>
|
||||
</data>
|
||||
</field>
|
||||
</record>
|
||||
<!-- End Employee View -->
|
||||
|
||||
<!-- Contract View -->
|
||||
<record id="hr_contract_form_inherit" model="ir.ui.view">
|
||||
<field name="name">hr.contract.view.form.inherit</field>
|
||||
|
@ -45,8 +15,7 @@
|
|||
<field name="inherit_id" ref="hr_contract.hr_contract_view_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<data>
|
||||
<xpath expr="//group[@name='right_column']" position="before">
|
||||
<separator string="Payslip Info" colspan="2"/>
|
||||
<xpath expr="//field[@name='wage']" position="after">
|
||||
<field name="struct_id" required="1"/>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='working_hours']" position="after">
|
||||
|
@ -105,7 +74,7 @@
|
|||
<field name="model">hr.payroll.structure</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Employee Function">
|
||||
<form string="Employee Function" version="7.0">
|
||||
<group col="4">
|
||||
<field name="name"/>
|
||||
<field name="code"/>
|
||||
|
@ -249,6 +218,12 @@
|
|||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<act_window name="Payslip Computation Details"
|
||||
context="{'default_slip_id': active_id,'search_default_slip_id': active_id}"
|
||||
res_model="hr.payslip.line"
|
||||
src_model="hr.payslip"
|
||||
id="act_payslip_lines"/>
|
||||
|
||||
<record id="view_hr_payslip_form" model="ir.ui.view">
|
||||
<field name="name">hr.payslip.form</field>
|
||||
|
@ -265,13 +240,18 @@
|
|||
<field name="state" widget="statusbar" statusbar_visible="draft,confirm"/>
|
||||
</header>
|
||||
<sheet>
|
||||
<label for="employee_id" class="oe_edit_only"/>
|
||||
<h1><field name="employee_id" on_change="onchange_employee_id(date_from, date_to, employee_id, contract_id)"/></h1>
|
||||
<label for="date_from" class="oe_edit_only" string="Period"/>
|
||||
<h2>
|
||||
from <field name="date_from" on_change="onchange_employee_id(date_from, date_to, employee_id, contract_id)"/>
|
||||
to <field name="date_to"/>
|
||||
</h2>
|
||||
<div class="oe_right oe_button_box">
|
||||
<button name="%(act_payslip_lines)d" string="Payslip Computation Details" type="action"/>
|
||||
</div>
|
||||
<div class="oe_title">
|
||||
<label for="employee_id" class="oe_edit_only"/>
|
||||
<h1><field name="employee_id" on_change="onchange_employee_id(date_from, date_to, employee_id, contract_id)"/></h1>
|
||||
<label for="date_from" class="oe_edit_only" string="Period"/>
|
||||
<h2>
|
||||
From <field name="date_from" on_change="onchange_employee_id(date_from, date_to, employee_id, contract_id)"/>
|
||||
to <field name="date_to"/>
|
||||
</h2>
|
||||
</div>
|
||||
<group col="4">
|
||||
<field name="contract_id" domain="[('employee_id','=',employee_id)]" on_change="onchange_contract_id(date_from, date_to, employee_id, contract_id)"/>
|
||||
<field name="number"/>
|
||||
|
@ -281,6 +261,7 @@
|
|||
</group>
|
||||
<notebook>
|
||||
<page string="Worked Days & Inputs">
|
||||
<separator string="Worked Days"/>
|
||||
<field name="worked_days_line_ids">
|
||||
<tree string="Worked Days" editable="bottom">
|
||||
<field name="name"/>
|
||||
|
@ -302,6 +283,7 @@
|
|||
</group>
|
||||
</form>
|
||||
</field>
|
||||
<separator string="Other Inputs"/>
|
||||
<field name="input_line_ids" colspan="4" nolabel="1">
|
||||
<tree string="Input Data" editable="bottom">
|
||||
<field name="name"/>
|
||||
|
@ -360,14 +342,18 @@
|
|||
</field>
|
||||
</page>
|
||||
<page string="Other Information">
|
||||
<group col="2" string="Other Information">
|
||||
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
|
||||
<field name="payslip_run_id" domain="[('state','=','draft')]"/>
|
||||
<field name="paid" readonly="1"/>
|
||||
</group>
|
||||
<group string="Notes">
|
||||
<field name="note"/>
|
||||
<group>
|
||||
<group string="Miscellaneous">
|
||||
<field name="company_id" groups="base.group_multi_company"/>
|
||||
<field name="payslip_run_id" domain="[('state','=','draft')]"/>
|
||||
</group>
|
||||
<group name="accounting" string="Accounting">
|
||||
<field name="paid" readonly="1"/>
|
||||
</group>
|
||||
</group>
|
||||
<div colspan="4">
|
||||
<field name="note" Placeholder="Add an internal note..."/>
|
||||
</div>
|
||||
</page>
|
||||
</notebook>
|
||||
</sheet>
|
||||
|
@ -413,7 +399,27 @@
|
|||
<field name="search_view_id" ref="view_hr_payslip_filter"/>
|
||||
</record>
|
||||
<menuitem action="action_view_hr_payslip_form" id="menu_department_tree" parent="menu_hr_root_payroll"/>
|
||||
<act_window name="Payslips"
|
||||
context="{'search_default_employee_id': [active_id], 'default_employee_id': active_id}"
|
||||
res_model="hr.payslip"
|
||||
src_model="hr.employee"
|
||||
view_id ="view_hr_payslip_tree"
|
||||
id="act_hr_employee_payslip_list"
|
||||
groups="base.group_hr_manager"/>
|
||||
|
||||
<!-- Employee View -->
|
||||
<record id="payroll_hr_employee_view_form" model="ir.ui.view">
|
||||
<field name="name">payroll.hr.employee.view.form</field>
|
||||
<field name="model">hr.employee</field>
|
||||
<field name="inherit_id" ref="hr.view_employee_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<data>
|
||||
<xpath expr="//div[@name='button_box']" position="inside">
|
||||
<button name="%(act_hr_employee_payslip_list)d" string="Payslips" type="action"/>
|
||||
</xpath>
|
||||
</data>
|
||||
</field>
|
||||
</record>
|
||||
<!-- Salary Category-->
|
||||
<record id="hr_salary_rule_category_form" model="ir.ui.view">
|
||||
<field name="name">hr.salary.rule.category.form</field>
|
||||
|
@ -730,12 +736,20 @@
|
|||
<field name="state" widget="statusbar"/>
|
||||
</header>
|
||||
<sheet>
|
||||
<group col="4">
|
||||
<label for="name" class="oe_edit_only"/>
|
||||
<h1>
|
||||
<field name="name"/>
|
||||
<field name="credit_note"/>
|
||||
<field name="date_start"/>
|
||||
</h1>
|
||||
<h2>
|
||||
Period from
|
||||
<field name="date_start"/>
|
||||
to
|
||||
<field name="date_end"/>
|
||||
</h2>
|
||||
<group col="4">
|
||||
<field name="credit_note"/>
|
||||
</group>
|
||||
<separator string="Payslips"/>
|
||||
<field name="slip_ids"/>
|
||||
</sheet>
|
||||
</form>
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
<openerp>
|
||||
<data>
|
||||
|
||||
|
||||
|
||||
<record model="ir.ui.view" id="view_hr_payslip_inherit_form">
|
||||
<field name="name">hr.payslip.inherit.form</field>
|
||||
<field name="model">hr.payslip</field>
|
||||
|
@ -27,10 +25,12 @@
|
|||
<field name="arch" type="xml">
|
||||
<xpath expr="/form/notebook/page[@string='Child Rules']" position="after">
|
||||
<page string="Accounting">
|
||||
<field name="account_debit" />
|
||||
<field name="account_credit"/>
|
||||
<field name="analytic_account_id" groups="analytic.group_analytic_accounting"/>
|
||||
<field name="account_tax_id"/>
|
||||
<group colspan="4">
|
||||
<field name="account_debit" />
|
||||
<field name="account_credit"/>
|
||||
<field name="analytic_account_id" groups="analytic.group_analytic_accounting"/>
|
||||
<field name="account_tax_id"/>
|
||||
</group>
|
||||
</page>
|
||||
</xpath>
|
||||
</field>
|
||||
|
@ -44,14 +44,15 @@
|
|||
<field name="type">form</field>
|
||||
<field name="inherit_id" ref="hr_contract.hr_contract_view_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='advantages']" position="after">
|
||||
<separator colspan="4" string="Accounting"/>
|
||||
<field name="analytic_account_id" groups="analytic.group_analytic_accounting"/>
|
||||
<field name="journal_id"/>
|
||||
<xpath expr="//group[@name='duration_group']" position="after">
|
||||
<group string="Accounting">
|
||||
<field name="analytic_account_id" groups="analytic.group_analytic_accounting"/>
|
||||
<field name="journal_id"/>
|
||||
</group>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
<!-- Payslip Run View -->
|
||||
|
||||
<record id="hr_payslip_run_search_inherit" model="ir.ui.view">
|
||||
|
@ -85,12 +86,11 @@
|
|||
<field name="type">form</field>
|
||||
<field name="inherit_id" ref="hr_payroll.hr_payslip_run_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="date_end" position="after">
|
||||
<newline/>
|
||||
<field name="credit_note" position="before">
|
||||
<field name="journal_id"/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -181,7 +181,7 @@ class hr_applicant(base_stage, osv.Model):
|
|||
return res
|
||||
|
||||
_columns = {
|
||||
'name': fields.char('Name', size=128, required=True),
|
||||
'name': fields.char('Subject', size=128, required=True),
|
||||
'active': fields.boolean('Active', help="If the active field is set to false, it will allow you to hide the case without removing it."),
|
||||
'description': fields.text('Description'),
|
||||
'email_from': fields.char('Email', size=128, help="These people will receive email."),
|
||||
|
@ -213,7 +213,7 @@ class hr_applicant(base_stage, osv.Model):
|
|||
'salary_expected_extra': fields.char('Expected Salary Extra', size=100, help="Salary Expected by Applicant, extra advantages"),
|
||||
'salary_proposed': fields.float('Proposed Salary', help="Salary Proposed by the Organisation"),
|
||||
'salary_expected': fields.float('Expected Salary', help="Salary Expected by Applicant"),
|
||||
'availability': fields.integer('Availability (Days)'),
|
||||
'availability': fields.integer('Availability'),
|
||||
'partner_name': fields.char("Applicant's Name", size=64),
|
||||
'partner_phone': fields.char('Phone', size=32),
|
||||
'partner_mobile': fields.char('Mobile', size=32),
|
||||
|
@ -357,54 +357,53 @@ class hr_applicant(base_stage, osv.Model):
|
|||
return value
|
||||
|
||||
def message_new(self, cr, uid, msg, custom_values=None, context=None):
|
||||
"""Automatically called when new email message arrives"""
|
||||
res_id = super(hr_applicant,self).message_new(cr, uid, msg, custom_values=custom_values, context=context)
|
||||
subject = msg.get('subject') or _("No Subject")
|
||||
body = msg.get('body_text')
|
||||
msg_from = msg.get('from')
|
||||
priority = msg.get('priority')
|
||||
vals = {
|
||||
'name': subject,
|
||||
'email_from': msg_from,
|
||||
""" Overrides mail_thread message_new that is called by the mailgateway
|
||||
through message_process.
|
||||
This override updates the document according to the email.
|
||||
"""
|
||||
if custom_values is None: custom_values = {}
|
||||
custom_values.update({
|
||||
'name': msg.get('subject') or _("No Subject"),
|
||||
'description': msg.get('body_text'),
|
||||
'email_from': msg.get('from'),
|
||||
'email_cc': msg.get('cc'),
|
||||
'description': body,
|
||||
'user_id': False,
|
||||
}
|
||||
if priority:
|
||||
vals['priority'] = priority
|
||||
vals.update(self.message_partner_by_email(cr, uid, msg.get('from', False)))
|
||||
self.write(cr, uid, [res_id], vals, context)
|
||||
return res_id
|
||||
})
|
||||
if msg.get('priority'):
|
||||
custom_values['priority'] = msg.get('priority')
|
||||
custom_values.update(self.message_partner_by_email(cr, uid, msg.get('from', False), context=context))
|
||||
return super(hr_applicant,self).message_new(cr, uid, msg, custom_values=custom_values, context=context)
|
||||
|
||||
def message_update(self, cr, uid, ids, msg, vals=None, default_act='pending', context=None):
|
||||
def message_update(self, cr, uid, ids, msg, update_vals=None, context=None):
|
||||
""" Override mail_thread message_update that is called by the mailgateway
|
||||
through message_process.
|
||||
This method updates the document according to the email.
|
||||
"""
|
||||
if isinstance(ids, (str, int, long)):
|
||||
ids = [ids]
|
||||
if vals is None:
|
||||
vals = {}
|
||||
msg_from = msg['from']
|
||||
vals.update({
|
||||
'description': msg['body_text']
|
||||
if update_vals is None: vals = {}
|
||||
|
||||
update_vals.update({
|
||||
'description': msg.get('body'),
|
||||
'email_from': msg.get('from'),
|
||||
'email_cc': msg.get('cc'),
|
||||
})
|
||||
if msg.get('priority', False):
|
||||
vals['priority'] = msg.get('priority')
|
||||
if msg.get('priority'):
|
||||
update_vals['priority'] = msg.get('priority')
|
||||
|
||||
maps = {
|
||||
'cost':'planned_cost',
|
||||
'cost': 'planned_cost',
|
||||
'revenue': 'planned_revenue',
|
||||
'probability':'probability'
|
||||
'probability': 'probability',
|
||||
}
|
||||
vls = { }
|
||||
for line in msg['body_text'].split('\n'):
|
||||
for line in msg.get('body_text', '').split('\n'):
|
||||
line = line.strip()
|
||||
res = tools.misc.command_re.match(line)
|
||||
if res and maps.get(res.group(1).lower(), False):
|
||||
key = maps.get(res.group(1).lower())
|
||||
vls[key] = res.group(2).lower()
|
||||
update_vals[key] = res.group(2).lower()
|
||||
|
||||
vals.update(vls)
|
||||
res = self.write(cr, uid, ids, vals, context=context)
|
||||
self.message_append_dict(cr, uid, ids, msg, context=context)
|
||||
return res
|
||||
return super(hr_applicant, self).message_update(cr, uids, ids, update_vals=update_vals, context=context)
|
||||
|
||||
def create(self, cr, uid, vals, context=None):
|
||||
obj_id = super(hr_applicant, self).create(cr, uid, vals, context=context)
|
||||
|
@ -493,20 +492,14 @@ class hr_applicant(base_stage, osv.Model):
|
|||
# -------------------------------------------------------
|
||||
# OpenChatter methods and notifications
|
||||
# -------------------------------------------------------
|
||||
|
||||
def message_get_subscribers(self, cr, uid, ids, context=None):
|
||||
sub_ids = self.message_get_subscribers_ids(cr, uid, ids, context=context);
|
||||
for obj in self.browse(cr, uid, ids, context=context):
|
||||
if obj.user_id:
|
||||
sub_ids.append(obj.user_id.id)
|
||||
return self.pool.get('res.users').read(cr, uid, sub_ids, context=context)
|
||||
|
||||
def get_needaction_user_ids(self, cr, uid, ids, context=None):
|
||||
result = dict.fromkeys(ids, [])
|
||||
def message_get_subscribers(self, cr, uid, ids, context=None):
|
||||
""" Override to add responsible user. """
|
||||
user_ids = super(hr_applicant, self).message_get_subscribers(cr, uid, ids, context=context)
|
||||
for obj in self.browse(cr, uid, ids, context=context):
|
||||
if obj.state == 'draft' and obj.user_id:
|
||||
result[obj.id] = [obj.user_id.id]
|
||||
return result
|
||||
if obj.user_id and not obj.user_id.id in user_ids:
|
||||
user_ids.append(obj.user_id.id)
|
||||
return user_ids
|
||||
|
||||
def stage_set_send_note(self, cr, uid, ids, stage_id, context=None):
|
||||
""" Override of the (void) default notification method. """
|
||||
|
|
|
@ -45,6 +45,43 @@
|
|||
# Jobs
|
||||
# ------------------------------------------------------
|
||||
|
||||
<!-- Applicant Read/Unread actions -->
|
||||
<record id="actions_server_applicant_unread" model="ir.actions.server">
|
||||
<field name="name">Mark unread</field>
|
||||
<field name="condition">True</field>
|
||||
<field name="type">ir.actions.server</field>
|
||||
<field name="model_id" ref="model_hr_applicant"/>
|
||||
<field name="state">code</field>
|
||||
<field name="code">self.message_check_and_set_unread(cr, uid, context.get('active_ids'), context=context)</field>
|
||||
</record>
|
||||
<record id="action_applicant_unread" model="ir.values">
|
||||
<field name="name">action_project_unread</field>
|
||||
<field name="action_id" ref="actions_server_applicant_unread"/>
|
||||
<field name="value" eval="'ir.actions.server,' + str(ref('actions_server_applicant_unread'))" />
|
||||
<field name="key">action</field>
|
||||
<field name="model_id" ref="model_hr_applicant" />
|
||||
<field name="model">hr.applicant</field>
|
||||
<field name="key2">client_action_multi</field>
|
||||
</record>
|
||||
|
||||
<record id="actions_server_applicant_read" model="ir.actions.server">
|
||||
<field name="name">Mark read</field>
|
||||
<field name="condition">True</field>
|
||||
<field name="type">ir.actions.server</field>
|
||||
<field name="model_id" ref="model_hr_applicant"/>
|
||||
<field name="state">code</field>
|
||||
<field name="code">self.message_check_and_set_read(cr, uid, context.get('active_ids'), context=context)</field>
|
||||
</record>
|
||||
<record id="action_applicant_read" model="ir.values">
|
||||
<field name="name">action_project_read</field>
|
||||
<field name="action_id" ref="actions_server_applicant_read"/>
|
||||
<field name="value" eval="'ir.actions.server,' + str(ref('actions_server_applicant_read'))" />
|
||||
<field name="key">action</field>
|
||||
<field name="model_id" ref="model_hr_applicant" />
|
||||
<field name="model">hr.applicant</field>
|
||||
<field name="key2">client_action_multi</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="crm_case_tree_view_job">
|
||||
<field name="name">Applicants</field>
|
||||
<field name="model">hr.applicant</field>
|
||||
|
@ -113,61 +150,61 @@
|
|||
<label for="name" class="oe_edit_only"/>
|
||||
<h1><field name="name"/></h1>
|
||||
<label for="partner_name" class="oe_edit_only"/>
|
||||
<h2><field name="partner_name"/></h2>
|
||||
<field name="type_id" placeholder="Degree"/>
|
||||
<h2>
|
||||
<field name="partner_name" class="oe_inline"/>
|
||||
</h2>
|
||||
</div>
|
||||
|
||||
<group>
|
||||
<group>
|
||||
<field name="user_id"/>
|
||||
<field name="title_action"/>
|
||||
<field name="date_action"/>
|
||||
<group string="Contact Details">
|
||||
<field name="partner_id"
|
||||
on_change="onchange_partner_id(partner_id, email_from)"/>
|
||||
<field name="email_from" widget="email"/>
|
||||
<field name="partner_phone"/>
|
||||
<field name="partner_mobile"/>
|
||||
<field name="type_id" placeholder="Degree"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="job_id" on_change="onchange_job(job_id)"/>
|
||||
<field name="priority" string="Appreciation"/>
|
||||
<group string="Application Followup">
|
||||
<field name="user_id"/>
|
||||
<label for="title_action"/>
|
||||
<div>
|
||||
<field name="date_action"/> -
|
||||
<field name="title_action" class="oe_inline" placeholder="Call for proposal"/>
|
||||
</div>
|
||||
<field name="priority"/>
|
||||
<field name="state" invisible="1"/>
|
||||
</group>
|
||||
<group string="Job">
|
||||
<field name="survey" invisible="1"/>
|
||||
<field name="response" invisible="1"/>
|
||||
<field name="department_id" widget="selection" on_change="onchange_department_id(department_id)"/>
|
||||
<field name="state" groups="base.group_no_one"/>
|
||||
<field name="job_id" on_change="onchange_job(job_id)"/>
|
||||
<field name="department_id" on_change="onchange_department_id(department_id)"/>
|
||||
<label for="availability"/>
|
||||
<div>
|
||||
<field name="availability" class="oe_inline"/> <label string="Day(s)" class="oe_inline"/>
|
||||
</div>
|
||||
</group>
|
||||
<group string="Contract">
|
||||
<label for="salary_expected"/>
|
||||
<div>
|
||||
<field name="salary_expected" class="oe_inline"/>,
|
||||
<field name="salary_expected_extra" class="oe_inline" placeholder="Extra advantages..."/>
|
||||
</div>
|
||||
<label for="salary_proposed"/>
|
||||
<div>
|
||||
<field name="salary_proposed" class="oe_inline"/>,
|
||||
<field name="salary_proposed_extra" class="oe_inline" placeholder="Extra advantages..."/>
|
||||
</div>
|
||||
</group>
|
||||
<group string="Reference">
|
||||
<field name="source_id"/>
|
||||
<field name="reference"/>
|
||||
</group>
|
||||
</group>
|
||||
<notebook>
|
||||
<page string="Application">
|
||||
<group>
|
||||
<group string="Contact">
|
||||
<label for="partner_id"/>
|
||||
<div>
|
||||
<field name="partner_id" class="oe_inline"
|
||||
on_change="onchange_partner_id(partner_id, email_from)"/>
|
||||
<button class="oe_inline"
|
||||
string="Create" help="Create a new contact for this applicant" icon="gtk-index"
|
||||
name="%(action_hr_recruitment_partner_create)d" type="action"
|
||||
attrs="{'invisible':[('partner_id','!=',False)]}"/>
|
||||
</div>
|
||||
<field name="email_from" widget="email"/>
|
||||
<field name="partner_phone"/>
|
||||
<field name="partner_mobile"/>
|
||||
</group>
|
||||
<group string="Reference">
|
||||
<field name="source_id"/>
|
||||
<field name="reference"/>
|
||||
</group>
|
||||
<group string="Contract">
|
||||
<field name="salary_expected"/>
|
||||
<field name="salary_expected_extra"/>
|
||||
<field name="salary_proposed"/>
|
||||
<field name="salary_proposed_extra"/>
|
||||
<field name="availability"/>
|
||||
</group>
|
||||
</group>
|
||||
<separator string="Details"/>
|
||||
<field name="description"/>
|
||||
</page>
|
||||
</notebook>
|
||||
<separator string="Application Summary"/>
|
||||
<field name="description" placeholder="Feedback of interviews..."/>
|
||||
</sheet>
|
||||
<footer>
|
||||
<field name="message_ids" widget="ThreadView"/>
|
||||
<field name="message_ids" widget="mail_thread"/>
|
||||
</footer>
|
||||
</form>
|
||||
</field>
|
||||
|
@ -192,6 +229,12 @@
|
|||
<field name="type">search</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Search Jobs">
|
||||
<filter icon="terp-mail-message-new"
|
||||
string="Inbox" help="Unread messages"
|
||||
name="needaction_pending"
|
||||
domain="[('needaction_pending','=',True)]"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter icon="terp-document-new" string="New" name="filter_new"/>
|
||||
<field name="partner_name" filter_domain="['|','|',('name','ilike',self),('partner_name','ilike',self),('email_from','ilike',self)]" string="Subject / Applicant"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter icon="terp-document-new" string="New"
|
||||
|
@ -328,15 +371,15 @@
|
|||
<field name="type">form</field>
|
||||
<field name="inherit_id" ref="hr.view_hr_job_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="expected_employees" version="7.0" position="after">
|
||||
<label for="survey_id" />
|
||||
<div>
|
||||
<field name="survey_id" class="oe_inline"/>
|
||||
<button class="oe_inline"
|
||||
string="Interview" icon="gtk-print"
|
||||
name="action_print_survey" type="object"
|
||||
attrs="{'invisible':[('survey_id','=',False)]}"/>
|
||||
</div>
|
||||
<field name="no_of_recruitment" version="7.0" position="after">
|
||||
<label for="survey_id" />
|
||||
<div>
|
||||
<field name="survey_id" class="oe_inline"/>
|
||||
<button class="oe_inline"
|
||||
string="Interview" icon="gtk-print"
|
||||
name="action_print_survey" type="object"
|
||||
attrs="{'invisible':[('survey_id','=',False)]}"/>
|
||||
</div>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
|
|
@ -114,7 +114,7 @@
|
|||
<field name="context">{'search_default_year':1,'search_default_month':1,'search_default_department':1,'group_by_no_leaf':1,'group_by':[]}</field>
|
||||
<field name="search_view_id" ref="view_hr_recruitment_report_search"/>
|
||||
</record>
|
||||
<menuitem action="action_hr_recruitment_report_all" id="menu_hr_recruitment_report_all" parent="hr.menu_hr_reporting" sequence="1"/>
|
||||
<menuitem action="action_hr_recruitment_report_all" id="menu_hr_recruitment_report_all" parent="hr.menu_hr_reporting" sequence="0"/>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -1,11 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
<menuitem
|
||||
id="menu_hr_reporting_timesheet"
|
||||
name="Timesheet"
|
||||
parent="hr.menu_hr_reporting"
|
||||
sequence="5" />
|
||||
<report auto="False" id="report_user_timesheet" menu="False" model="hr.employee" name="hr.analytical.timesheet" string="Employee timesheet" xsl="hr_timesheet/report/user_timesheet.xsl"/>
|
||||
|
||||
<report auto="False" id="report_users_timesheet" menu="False" model="hr.employee" name="hr.analytical.timesheet_users" string="Employees Timesheet" xsl="hr_timesheet/report/users_timesheet.xsl"/>
|
||||
|
|
|
@ -26,29 +26,38 @@
|
|||
<field name="model">hr.analytic.timesheet</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Timesheet Lines">
|
||||
<group col="4">
|
||||
<field name="name" colspan="4"/>
|
||||
<field name="user_id" on_change="on_change_user_id(user_id)" required="1"/>
|
||||
<field name="date" on_change="on_change_date(date)"/>
|
||||
<form string="Timesheet Lines" version="7.0">
|
||||
<sheet>
|
||||
<group>
|
||||
<group>
|
||||
<field name="name"/>
|
||||
<field name="user_id" on_change="on_change_user_id(user_id)" required="1"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="date" on_change="on_change_date(date)"/>
|
||||
</group>
|
||||
</group>
|
||||
<notebook>
|
||||
<page string="Information">
|
||||
<group>
|
||||
<group string="Product">
|
||||
<field name="product_id" on_change="on_change_unit_amount(product_id, unit_amount, False, product_uom_id,journal_id)" required="1" domain="[('type','=','service')]"/>
|
||||
<field name="product_uom_id" on_change="on_change_unit_amount(product_id, unit_amount, False, product_uom_id,journal_id)"/>
|
||||
<field name="unit_amount" on_change="on_change_unit_amount(product_id, unit_amount, False, product_uom_id,journal_id)" widget="float_time"/>
|
||||
</group>
|
||||
<group string="Accounting">
|
||||
<field domain="[('type','=','normal'),('state', '<>', 'close'),('parent_id','!=',False)]" name="account_id"/>
|
||||
<field name="amount"/>
|
||||
<field name="general_account_id"/>
|
||||
<field name="journal_id"/>
|
||||
</group>
|
||||
<group>
|
||||
<group string="Product">
|
||||
<field name="product_id" on_change="on_change_unit_amount(product_id, unit_amount, False, product_uom_id,journal_id)" required="1" domain="[('type','=','service')]"/>
|
||||
<label string="Quantity" for="unit_amount"/>
|
||||
<div>
|
||||
<field name="unit_amount" on_change="on_change_unit_amount(product_id, unit_amount, False, product_uom_id,journal_id)" class="oe_inline"/>
|
||||
<field name="product_uom_id" on_change="on_change_unit_amount(product_id, unit_amount, False, product_uom_id,journal_id)" class="oe_inline"/>
|
||||
</div>
|
||||
</group>
|
||||
<group string="Accounting">
|
||||
<field domain="[('type','=','normal'),('state', '<>', 'close'),('parent_id','!=',False)]" name="account_id" select="1"/>
|
||||
<field name="amount"/>
|
||||
<field name="general_account_id"/>
|
||||
<field name="journal_id"/>
|
||||
</group>
|
||||
</group>
|
||||
</page>
|
||||
</notebook>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
@ -112,10 +121,14 @@
|
|||
<field name="model">hr.employee</field>
|
||||
<field name="inherit_id" ref="hr.view_employee_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<page string="Categories" position="after">
|
||||
<page string="Personal Information" position="after">
|
||||
<page string="Timesheets" groups="base.group_hr_user">
|
||||
<field name="product_id" domain="[('type','=','service')]"/>
|
||||
<field name="journal_id" widget="selection"/>
|
||||
<group>
|
||||
<group col="2">
|
||||
<field name="product_id" domain="[('type','=','service')]"/>
|
||||
<field name="journal_id"/>
|
||||
</group>
|
||||
</group>
|
||||
</page>
|
||||
</page>
|
||||
</field>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
ctx.update({'model': 'hr.employee','active_ids': []})
|
||||
data_dict = {'month': time.gmtime()[1], 'year': time.gmtime()[0], 'employee_id' : ref('hr.employee_fp')}
|
||||
from tools import test_reports
|
||||
test_reports.try_report_action(cr, uid, 'action_hr_timesheet_my',wiz_data=data_dict, context=ctx, our_module='hr_timesheet')
|
||||
test_reports.try_report_action(cr, uid, 'action_hr_timesheet_employee',wiz_data=data_dict, context=ctx, our_module='hr_timesheet')
|
||||
|
||||
-
|
||||
Print the HR Timesheet By Employee report through the wizard
|
||||
|
@ -18,4 +18,4 @@
|
|||
ctx.update({'model': 'hr.employee','active_ids': []})
|
||||
data_dict = {'month': time.gmtime()[1], 'year': time.gmtime()[0], 'employee_ids' : [(6,0,[ref('hr.employee_fp'),ref('hr.employee_qdp'),ref('hr.employee_al')])]}
|
||||
from tools import test_reports
|
||||
test_reports.try_report_action(cr, uid, 'action_hr_timesheet_users',wiz_data=data_dict, context=ctx, our_module='hr_timesheet')
|
||||
test_reports.try_report_action(cr, uid, 'action_hr_timesheet_users',wiz_data=data_dict, context=ctx, our_module='hr_timesheet')
|
||||
|
|
|
@ -34,39 +34,8 @@
|
|||
|
||||
<menuitem action="action_hr_timesheet_employee"
|
||||
id="menu_hr_timesheet_employee"
|
||||
parent="menu_hr_reporting_timesheet"
|
||||
parent="hr.menu_hr_reporting"
|
||||
sequence="2" icon="STOCK_PRINT"/>
|
||||
|
||||
|
||||
<!-- Print My Timesheet -->
|
||||
<record id="view_hr_timesheet_my" model="ir.ui.view">
|
||||
<field name="name">hr.analytical.timesheet.my.form</field>
|
||||
<field name="model">hr.analytical.timesheet.employee</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Print My Timesheet" version="7.0">
|
||||
<header>
|
||||
<button string="Print" name="print_report" type="object" class="oe_highlight"/>
|
||||
or
|
||||
<button string="Cancel" class="oe_link" special="cancel" />
|
||||
</header>
|
||||
<group colspan="4">
|
||||
<separator string="This wizard will print monthly timesheet" colspan="4"/>
|
||||
<field name="month"/>
|
||||
<field name="year"/>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_hr_timesheet_my" model="ir.actions.act_window">
|
||||
<field name="name">My Timesheet</field>
|
||||
<field name="res_model">hr.analytical.timesheet.employee</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="view_id" ref="view_hr_timesheet_my"/>
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -10,18 +10,21 @@
|
|||
<field name="arch" type="xml">
|
||||
<form string="Monthly Employees Timesheet" version="7.0">
|
||||
<header>
|
||||
<button string="Print" name="print_report" type="object" class="oe_highlight"/>
|
||||
or
|
||||
<button string="Cancel" class="oe_link" special="cancel" />
|
||||
<button string="Print" name="print_report" type="object" class="oe_highlight"/> or
|
||||
<button string="Cancel" class="oe_link" special="cancel"/>
|
||||
</header>
|
||||
<group height="260" width="460">
|
||||
<group colspan="4">
|
||||
<field name="month"/>
|
||||
<field name="year"/>
|
||||
<separator string="Employees" colspan="4"/>
|
||||
<field name="employee_ids" colspan="4" nolabel="1"/>
|
||||
<sheet>
|
||||
<group>
|
||||
<label for="month" string="Period"/>
|
||||
<div>
|
||||
<field name="month" class="oe_inline"/>
|
||||
<field name="year" class="oe_inline"/>
|
||||
</div>
|
||||
</group>
|
||||
</group>
|
||||
<group string="Employees">
|
||||
<field name="employee_ids" nolabel="1"/>
|
||||
</group>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
@ -37,9 +40,8 @@
|
|||
|
||||
<menuitem action="action_hr_timesheet_users"
|
||||
id="menu_hr_timesheet_users"
|
||||
parent="menu_hr_reporting_timesheet"
|
||||
groups="base.group_hr_manager" sequence="3" icon="STOCK_PRINT"/>
|
||||
|
||||
parent="hr.menu_hr_reporting_timesheet"
|
||||
groups="base.group_hr_manager" sequence="2" icon="STOCK_PRINT"/>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -7,23 +7,27 @@
|
|||
<field name="model">hr.timesheet.analytic.profit</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Timesheet Profit" version="7.0">
|
||||
<header>
|
||||
<button name="print_report" string="Print" type="object" class="oe_highlight"/>
|
||||
or
|
||||
<button string="Cancel" class="oe_link" special="cancel" />
|
||||
</header>
|
||||
<group height="420" width="370">
|
||||
<group col="4" colspan="4">
|
||||
<field name="date_from"/>
|
||||
<field name="date_to"/>
|
||||
<separator string="Journals" colspan="4"/>
|
||||
<field name="journal_ids" colspan="4" nolabel="1"/>
|
||||
<separator string="Users" colspan="4"/>
|
||||
<field name="employee_ids" colspan="4" nolabel="1"/>
|
||||
</group>
|
||||
</group>
|
||||
</form>
|
||||
<form string="Timesheet Profit" version="7.0">
|
||||
<header>
|
||||
<button name="print_report" string="Print" colspan="1" type="object" class="oe_highlight"/> or
|
||||
<button special="cancel" string="Cancel" class="oe_link"/>
|
||||
</header>
|
||||
<sheet>
|
||||
<group>
|
||||
<label for="date_from" string="Duration" />
|
||||
<div>
|
||||
<field name="date_from" nolabel="1" class="oe_inline" />
|
||||
- <field name="date_to" nolabel="1" class="oe_inline"/>
|
||||
</div>
|
||||
</group>
|
||||
<group>
|
||||
<separator string="Journals" colspan="4"/>
|
||||
<field name="journal_ids" colspan="4" nolabel="1"/>
|
||||
<separator string="Users" colspan="4"/>
|
||||
<field name="employee_ids" colspan="4" nolabel="1"/>
|
||||
</group>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
@ -38,7 +42,7 @@
|
|||
|
||||
<menuitem action="action_hr_timesheet_analytic_profit"
|
||||
id="menu_hr_timesheet_analytic_profit"
|
||||
parent="hr_timesheet.menu_hr_reporting_timesheet" icon="STOCK_PRINT"/>
|
||||
parent="hr.menu_hr_reporting_timesheet" sequence="3" icon="STOCK_PRINT"/>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -62,39 +62,50 @@
|
|||
<label for="employee_id" class="oe_edit_only"/>
|
||||
<h1><field name="employee_id" on_change="onchange_employee_id(employee_id)"/></h1>
|
||||
<label for="date_from" class="oe_edit_only" string="Timesheet Period"/>
|
||||
<h2>
|
||||
From <field name="date_from"/>
|
||||
to <field name="date_to"/>
|
||||
</h2>
|
||||
<group col="4">
|
||||
<field name="name"/>
|
||||
<field name="department_id"/>
|
||||
<field name="company_id" groups="base.group_multi_company"/>
|
||||
<field name="user_id" invisible="1"/>
|
||||
<h2>From <field name="date_from"/> to <field name="date_to"/></h2>
|
||||
<group>
|
||||
<group>
|
||||
<field name="name"/>
|
||||
<field name="department_id"/>
|
||||
<field name="company_id" groups="base.group_multi_company"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="total_attendance" widget="float_time"/>
|
||||
<field name="total_timesheet" widget="float_time"/>
|
||||
<field name="total_difference" widget="float_time"/>
|
||||
<field name="user_id" invisible="1"/>
|
||||
</group>
|
||||
</group>
|
||||
<notebook>
|
||||
<page string="Daily">
|
||||
<group col="6" colspan="4">
|
||||
<button name="button_dummy" string="Go to:" type="object" icon="terp-gtk-jump-to-ltr"/>
|
||||
<field name="date_current" nolabel="1"/>
|
||||
<label string=""/>
|
||||
<button icon="terp-gtk-go-back-ltr" name="date_previous" string="" type="object"/>
|
||||
<button name="date_today" string="Today" type="object" icon="terp-go-today"/>
|
||||
<button icon="terp-gtk-go-back-rtl" name="date_next" string="" type="object"/>
|
||||
<group>
|
||||
<div>
|
||||
<button name="button_dummy" class="oe_inline" string="Go to" type="object" icon="terp-gtk-jump-to-ltr"/> :
|
||||
<field name="date_current" class="oe_inline"/>
|
||||
</div>
|
||||
<div align="right">
|
||||
<button class="oe_inline" icon="terp-gtk-go-back-ltr" name="date_previous" string="" type="object"/>
|
||||
<button class="oe_inline" name="date_today" string="Today" type="object" icon="terp-go-today"/>
|
||||
<button class="oe_inline" icon="terp-gtk-go-back-rtl" name="date_next" string="" type="object"/>
|
||||
</div>
|
||||
</group>
|
||||
|
||||
<field colspan="3" context="{'name':date_current,'user_id':user_id}" height="100" name="attendances_ids" nolabel="1">
|
||||
<tree string="Attendances" editable="bottom">
|
||||
<field name="name"/>
|
||||
<field name="action"/>
|
||||
<field invisible="1" name="employee_id"/>
|
||||
</tree>
|
||||
</field>
|
||||
<group col="4" colspan="1">
|
||||
<group colspan="4" col="3">
|
||||
<field context="{'name':date_current,'user_id':user_id}" name="attendances_ids" nolabel="1">
|
||||
<tree string="Attendances" editable="bottom">
|
||||
<field name="name"/>
|
||||
<field name="action"/>
|
||||
<field invisible="1" name="employee_id"/>
|
||||
</tree>
|
||||
</field>
|
||||
<group>
|
||||
<div align="right">
|
||||
<button name="sign_in" string="Sign In" type="object" icon="terp-gtk-jump-to-ltr"/>
|
||||
<button name="sign_out" string="Sign Out" type="object" icon="terp-gtk-jump-to-rtl"/>
|
||||
</div>
|
||||
</group>
|
||||
</group>
|
||||
<group col="4">
|
||||
<field name="state_attendance"/>
|
||||
<button name="sign_in" string="Sign In" type="object" icon="terp-gtk-jump-to-ltr"/>
|
||||
<button name="sign_out" string="Sign Out" type="object" icon="terp-gtk-jump-to-rtl"/>
|
||||
<field name="total_attendance_day" widget="float_time" colspan="4"/>
|
||||
</group>
|
||||
<field colspan="4" context="{'date':date_current,'user_id':user_id}" domain="[('name','=',date_current)]" name="timesheet_ids" nolabel="1">
|
||||
<tree editable="top" string="Timesheet Lines">
|
||||
|
@ -124,8 +135,6 @@
|
|||
<field name="user_id" required="1"/>
|
||||
</form>
|
||||
</field>
|
||||
<field name="total_difference_day" widget="float_time"/>
|
||||
<field name="total_timesheet_day" widget="float_time"/>
|
||||
</page>
|
||||
<page string="Summary">
|
||||
<field colspan="4" name="period_ids" nolabel="1">
|
||||
|
@ -136,11 +145,6 @@
|
|||
<field name="total_difference" widget="float_time"/>
|
||||
</tree>
|
||||
</field>
|
||||
<group colspan="4" col="6">
|
||||
<field name="total_attendance" widget="float_time"/>
|
||||
<field name="total_timesheet" widget="float_time"/>
|
||||
<field name="total_difference" widget="float_time"/>
|
||||
</group>
|
||||
</page>
|
||||
</notebook>
|
||||
</sheet>
|
||||
|
@ -227,7 +231,7 @@
|
|||
<field name="type">form</field>
|
||||
<field name="inherit_id" ref="hr_timesheet.hr_timesheet_line_search"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="user_id" position="before">
|
||||
<field name="date" position="before">
|
||||
<field name="sheet_id"/>
|
||||
</field>
|
||||
</field>
|
||||
|
@ -349,6 +353,17 @@
|
|||
<act_window
|
||||
context="{'search_default_employee_id': [active_id], 'default_employee_id': active_id}"
|
||||
id="act_hr_employee_2_hr_timesheet" name="Timesheets" res_model="hr_timesheet_sheet.sheet" src_model="hr.employee"/>
|
||||
|
||||
<record id="hr_timesheet_sheet_employee_extd_form" model="ir.ui.view">
|
||||
<field name="name">hr.timesheet.sheet.employee.extd_form</field>
|
||||
<field name="model">hr.employee</field>
|
||||
<field name="inherit_id" ref="hr_timesheet.hr_timesheet_employee_extd_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//div[@name='button_box']" position="inside">
|
||||
<button name="%(act_hr_employee_2_hr_timesheet)d" string="Timesheets" type="action"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -82,6 +82,6 @@
|
|||
<menuitem
|
||||
action="action_hr_timesheet_report_stat_all"
|
||||
id="menu_hr_timesheet_report_all"
|
||||
parent="hr_timesheet.menu_hr_reporting_timesheet" sequence="0"/>
|
||||
parent="hr.menu_hr_reporting" sequence="3"/>
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -110,6 +110,6 @@
|
|||
<field name="search_view_id" ref="view_timesheet_report_search"/>
|
||||
</record>
|
||||
<menuitem action="action_timesheet_report_stat_all" id="menu_timesheet_report_all"
|
||||
parent="hr_timesheet.menu_hr_reporting_timesheet" sequence="1" groups="base.group_hr_manager"/>
|
||||
parent="hr.menu_hr_reporting" sequence="4" groups="base.group_hr_manager"/>
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -78,7 +78,7 @@
|
|||
<h2><field name="category_ids"/></h2>
|
||||
<field name="description"/>
|
||||
<footer>
|
||||
<field name="message_ids" widget="ThreadView"/>
|
||||
<field name="message_ids" widget="mail_thread"/>
|
||||
</footer>
|
||||
</form>
|
||||
</field>
|
||||
|
|
|
@ -949,7 +949,7 @@ class import_sugarcrm(osv.osv):
|
|||
'user' : fields.boolean('User', help="Check this box to import sugarCRM Users into OpenERP users, warning if a user with the same login exist in OpenERP, user information will be erase by sugarCRM user information", readonly=True),
|
||||
'opportunity': fields.boolean('Leads & Opp', help="Check this box to import sugarCRM Leads and Opportunities into OpenERP Leads and Opportunities"),
|
||||
'contact': fields.boolean('Contacts', help="Check this box to import sugarCRM Contacts into OpenERP addresses"),
|
||||
'account': fields.boolean('Accounts', help="Check this box to import sugarCRM Accounts into OpenERP partners"),
|
||||
'account': fields.boolean('Partner/Account', help="Check this box to import sugarCRM Accounts into OpenERP partners"),
|
||||
'employee': fields.boolean('Employee', help="Check this box to import sugarCRM Employees into OpenERP employees"),
|
||||
'meeting': fields.boolean('Meetings', help="Check this box to import sugarCRM Meetings and Tasks into OpenERP meetings"),
|
||||
'call': fields.boolean('Calls', help="Check this box to import sugarCRM Calls into OpenERP calls"),
|
||||
|
|
|
@ -9,76 +9,58 @@
|
|||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Import Data From SugarCRM" version="7.0">
|
||||
<header>
|
||||
<button name="import_from_scheduler_all" string="_Schedule Recurrent Imports" type="object" class="oe_highlight" />
|
||||
or
|
||||
<button name="import_all" string="_Import" type="object" class="oe_highlight" />
|
||||
or
|
||||
<button string="Cancel" class="oe_link" special="cancel" />
|
||||
</header>
|
||||
<group col="8" >
|
||||
<group colspan="2" col="2" width="200">
|
||||
<label colspan="2" string="Import your data from SugarCRM :"/>
|
||||
<label colspan="2" string="" />
|
||||
<label colspan="2" string="Use the SugarSoap API URL (read tooltip) and a full access SugarCRM login."/>
|
||||
<label colspan="2" string="" />
|
||||
<label colspan="2" string="Choose data you want to import. Click 'Import' to get data manually or 'Schedule Reccurent Imports' to get recurrently and automatically data."/>
|
||||
<label colspan="2" string="" />
|
||||
<label colspan="2" string="If you make recurrent or ponctual import, data already in OpenERP will be updated by SugarCRM data."/>
|
||||
<label colspan="2" string="" />
|
||||
<label colspan="2" string="Do not forget the email address to be notified of the success of the import."/>
|
||||
<label colspan="2" />
|
||||
<label colspan="2" string="Online documentation:"/>
|
||||
<label colspan="2" string="(Coming Soon)"/>
|
||||
<label colspan="2" string=""/>
|
||||
</group>
|
||||
<separator string="" orientation="vertical" colspan="1" rowspan="24" />
|
||||
<group colspan="5">
|
||||
<separator string="Login Information" colspan="4"/>
|
||||
<field name="url" colspan="4" widget="url"/>
|
||||
<field name="username" colspan="4"/>
|
||||
<field name="password" password="True" colspan="4"/>
|
||||
<header>
|
||||
<button name="import_all" string="_Import"
|
||||
type="object" class="oe_highlight"/>
|
||||
<button name="import_from_scheduler_all" string="_Schedule Recurrent Imports"
|
||||
type="object" class="oe_highlight" />
|
||||
<button special="cancel" string="_Cancel" class="oe_link"/>
|
||||
</header>
|
||||
<sheet>
|
||||
<group col="8" >
|
||||
<group colspan="5">
|
||||
<separator string="Login Information" colspan="4"/>
|
||||
<field name="url" colspan="2" widget="url"/>
|
||||
<field name="username" colspan="2"/>
|
||||
<field name="password" password="True" colspan="2"/>
|
||||
|
||||
<group colspan="4">
|
||||
<group colspan="1" col="2">
|
||||
<separator string="Address Book" colspan="2"/>
|
||||
<field name="user" />
|
||||
<field name= "account" />
|
||||
<field name= "contact" />
|
||||
</group>
|
||||
<group colspan="1" col="2">
|
||||
<separator string="CRM" colspan="2"/>
|
||||
<field name="opportunity" />
|
||||
<field name= "call" />
|
||||
<field name= "meeting" />
|
||||
<field name= "claim" />
|
||||
</group>
|
||||
<group colspan="1" col="2">
|
||||
<separator string="Project" colspan="2"/>
|
||||
<field name= "project" />
|
||||
<field name= "project_task" />
|
||||
<field name= "bug"/>
|
||||
</group>
|
||||
<group colspan="1" col="2">
|
||||
<separator string="HR" colspan="2"/>
|
||||
<field name="employee" />
|
||||
<separator string="Document" colspan="2"/>
|
||||
<field name="email_history"/>
|
||||
<field name= "document" />
|
||||
<group colspan="4">
|
||||
<separator string="Data to Import" colspan="4"/>
|
||||
<group colspan="1" col="2">
|
||||
<field name="user" />
|
||||
<field name= "account" />
|
||||
<field name= "contact" />
|
||||
</group>
|
||||
<group colspan="1" col="2">
|
||||
<field name="opportunity" />
|
||||
<field name= "call" />
|
||||
<field name= "meeting" />
|
||||
<field name= "claim" />
|
||||
</group>
|
||||
<group colspan="1" col="2">
|
||||
<field name= "project" />
|
||||
<field name= "project_task" />
|
||||
<field name= "bug"/>
|
||||
</group>
|
||||
<group colspan="1" col="2">
|
||||
<field name="employee" />
|
||||
<field name="email_history"/>
|
||||
<field name= "document" />
|
||||
</group>
|
||||
</group>
|
||||
|
||||
<group colspan="4">
|
||||
<separator string="Email Notification When Import is Finished" colspan="2"/>
|
||||
<field name="email_from" widget="email" string="Email Address to Notify" colspan="2"/>
|
||||
</group>
|
||||
|
||||
<group colspan="4" groups="base.group_no_one">
|
||||
<separator string="Multi Instance Management" colspan="4"/>
|
||||
<field name="instance_name" colspan="2"/>
|
||||
</group>
|
||||
</group>
|
||||
|
||||
<group colspan="4">
|
||||
<separator string="Email Notification When Import is Finished" colspan="4"/>
|
||||
<field name="email_from" widget="email" string="Email Address to Notify" colspan="4"/>
|
||||
</group>
|
||||
|
||||
<group colspan="4" groups="base.group_no_one">
|
||||
<separator string="Multi Instance Management" colspan="4"/>
|
||||
<field name="instance_name" colspan="4"/>
|
||||
</group>
|
||||
</group>
|
||||
</group>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
|
|
@ -9,23 +9,17 @@
|
|||
<field name="inherit_id" ref="hr_contract.hr_contract_view_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<data>
|
||||
<xpath expr="//page[@name='information']/group/group[@name='right_column']" position="before">
|
||||
<xpath expr="//field[@name='struct_id']" position="after">
|
||||
<field name="travel_reimbursement_amount"/>
|
||||
<field name="car_company_amount"/>
|
||||
<field name="car_employee_deduction"/>
|
||||
<field name="misc_onss_deduction"/>
|
||||
<field name="meal_voucher_amount"/>
|
||||
<field name="meal_voucher_employee_deduction"/>
|
||||
<field name="misc_advantage_amount"/>
|
||||
<separator string="Miscellaneous" colspan="2"/>
|
||||
<field name="additional_net_amount"/>
|
||||
<field name="retained_net_amount"/>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='trial_date_end']" position="after">
|
||||
<group colspan="2" col="2">
|
||||
<separator string="by Worker" colspan="2"/>
|
||||
<field name="insurance_employee_deduction"/>
|
||||
<field name="meal_voucher_employee_deduction"/>
|
||||
<field name="car_employee_deduction"/>
|
||||
</group>
|
||||
<field name="insurance_employee_deduction"/>
|
||||
</xpath>
|
||||
</data>
|
||||
</field>
|
||||
|
|
|
@ -23,6 +23,7 @@ import mail_message
|
|||
import mail_thread
|
||||
import mail_group
|
||||
import mail_subscription
|
||||
import ir_needaction
|
||||
import res_users
|
||||
import res_partner
|
||||
import report
|
||||
|
|
|
@ -86,6 +86,7 @@ The main features are:
|
|||
'static/src/css/mail_group.css',
|
||||
],
|
||||
'js': [
|
||||
'static/lib/jquery.expander/jquery.expander.js',
|
||||
'static/src/js/mail.js',
|
||||
],
|
||||
'qweb': [
|
||||
|
|
|
@ -10,3 +10,4 @@ Mail Module documentation topics
|
|||
mail_openchatter_howto
|
||||
mail_needaction_howto
|
||||
mail_partner
|
||||
mail_state
|
||||
|
|
|
@ -38,7 +38,7 @@ Make your module inheriting from the ``mail.thread`` class.
|
|||
# inherit from mail.thread allows the use of OpenChatter
|
||||
_inherit = ['mail.thread']
|
||||
|
||||
Use the thread viewer widget inside your form view by using the ThreadView widget on the message_ids field inherited from mail.thread.
|
||||
Use the thread viewer widget inside your form view by using the mail_thread widget on the message_ids field inherited from mail.thread.
|
||||
|
||||
::
|
||||
|
||||
|
@ -50,7 +50,7 @@ Use the thread viewer widget inside your form view by using the ThreadView widge
|
|||
<field name="arch" type="xml">
|
||||
<form>
|
||||
[...]
|
||||
<field name="message_ids" colspan="4" widget="ThreadView" nolabel="1"/>
|
||||
<field name="message_ids" colspan="4" widget="mail_thread" nolabel="1"/>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
@ -131,7 +131,7 @@ The drawback of this method is that it is no longer possible to those subscriber
|
|||
Messages display management
|
||||
++++++++++++++++++++++++++++
|
||||
|
||||
By default, the ThreadView widget shows all messages related to the current document beside the document, in the History and comments section. However, you may want to display other messages in the widget. For example, the OpenChatter on res.users model shows
|
||||
By default, the mail_thread widget shows all messages related to the current document beside the document, in the History and comments section. However, you may want to display other messages in the widget. For example, the OpenChatter on res.users model shows
|
||||
|
||||
- messages related to the user, as usual (messages with ``model = res.users, res_id = current_document_id``)
|
||||
- messages directly pushed to this user (containing @login)
|
||||
|
|
|
@ -0,0 +1,28 @@
|
|||
.. _mail_state:
|
||||
|
||||
message_state
|
||||
=============
|
||||
|
||||
``message_state`` is a boolean field that states whether the document
|
||||
has unread messages. In previous versions, some documents were going
|
||||
back to ``pending`` state when receiving an email through the mail
|
||||
gateway. Now the state related to messages differs from the state or
|
||||
stage of the document itself.
|
||||
|
||||
message_state and need action mechanism
|
||||
+++++++++++++++++++++++++++++++++++++++
|
||||
|
||||
The ``mail`` module introduces a default behavior for the need_action
|
||||
mechanism [REF].
|
||||
|
||||
::
|
||||
|
||||
def get_needaction_user_ids(self, cr, uid, ids, context=None):
|
||||
""" Returns the user_ids that have to perform an action
|
||||
:return: dict { record_id: [user_ids], }
|
||||
"""
|
||||
result = super(ir_needaction_mixin, self).get_needaction_user_ids(cr, uid, ids, context=context)
|
||||
for obj in self.browse(cr, uid, ids, context=context):
|
||||
if obj.message_state == False and obj.user_id:
|
||||
result[obj.id].append(obj.user_id.id)
|
||||
return result
|
|
@ -0,0 +1,46 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2012-today OpenERP SA (<http://www.openerp.com>)
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
from osv import osv
|
||||
|
||||
class ir_needaction_mixin(osv.Model):
|
||||
""" Update of ir.needaction_mixin class
|
||||
- override the get_needaction_user_ids method to define the default
|
||||
mail gateway need_action: when the object is unread, the object
|
||||
responsible has an action to perform.
|
||||
"""
|
||||
_name = 'ir.needaction_mixin'
|
||||
_inherit = ['ir.needaction_mixin']
|
||||
|
||||
def get_needaction_user_ids(self, cr, uid, ids, context=None):
|
||||
""" Returns the user_ids that have to perform an action. It the
|
||||
document mail state is unread (False), return object.user_id.id
|
||||
as need_action uid.
|
||||
:return: dict { record_id: [user_ids], }
|
||||
"""
|
||||
result = super(ir_needaction_mixin, self).get_needaction_user_ids(cr, uid, ids, context=context)
|
||||
for obj in self.browse(cr, uid, ids, context=context):
|
||||
if obj.message_state == False and obj.user_id:
|
||||
result[obj.id].append(obj.user_id.id)
|
||||
return result
|
||||
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
|
@ -87,7 +87,7 @@ class mail_group(osv.osv):
|
|||
result = dict.fromkeys(ids)
|
||||
for id in ids:
|
||||
result[id] = {}
|
||||
result[id]['member_ids'] = self.message_get_subscribers_ids(cr, uid, [id], context=context)
|
||||
result[id]['member_ids'] = self.message_get_subscribers(cr, uid, [id], context=context)
|
||||
result[id]['member_count'] = len(result[id]['member_ids'])
|
||||
result[id]['is_subscriber'] = uid in result[id]['member_ids']
|
||||
return result
|
||||
|
|
|
@ -51,28 +51,30 @@
|
|||
<field name="priority" eval="10"/>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Group Form" version="7.0">
|
||||
<div style="padding: 8px">
|
||||
<div class="oe_right">
|
||||
<field name="photo" widget='image' on_change="onchange_photo(photo)"/>
|
||||
</div>
|
||||
<div class="oe_title">
|
||||
<div class="oe_edit_only">
|
||||
<label for="name"/>
|
||||
</div>
|
||||
<h1><field name="name"/></h1>
|
||||
<div class="oe_edit_only">
|
||||
<label for="responsible_id"/>
|
||||
</div>
|
||||
<field name="responsible_id" class="oe_inline"/>
|
||||
<div class="oe_edit_only">
|
||||
<label for="public"/>
|
||||
<field name="public" class="oe_inline"/>
|
||||
</div>
|
||||
<field name="description" colspan="4" nolabel="1"/>
|
||||
</div>
|
||||
</div>
|
||||
<footer>
|
||||
<field name="message_ids" colspan="4" widget="ThreadView" options='{"thread_level": 1}'/>
|
||||
<sheet class="openerp_mail_group_sheet">
|
||||
<group colspan="4" col="8">
|
||||
<group colspan="1" col="2">
|
||||
<field name="photo" widget='image' nolabel="1" on_change="onchange_photo(photo)"/>
|
||||
</group>
|
||||
<group colspan="7" col="6">
|
||||
<div class="oe_edit_only">
|
||||
<label for="name"/>
|
||||
</div>
|
||||
<h2><field name="name" colspan="4"/></h2>
|
||||
<newline/>
|
||||
<group colspan="4" col="4">
|
||||
<field name="description" colspan="4" nolabel="1"/>
|
||||
</group>
|
||||
<group colspan="2" col="2" class="oe_edit_only">
|
||||
<field name="responsible_id" colspan="2"/>
|
||||
<field name="public" colspan="2"/>
|
||||
</group>
|
||||
</group>
|
||||
</group>
|
||||
</sheet>
|
||||
<footer class="openerp_mail_group_footer">
|
||||
<field name="message_ids" widget="mail_thread"
|
||||
options='{"thread_level": 1}'/>
|
||||
</footer>
|
||||
</form>
|
||||
</field>
|
||||
|
|
|
@ -96,11 +96,24 @@ class mail_message_common(osv.osv_memory):
|
|||
continue
|
||||
result[message.id] = self.pool.get(message.model).name_get(cr, uid, [message.res_id], context=context)[0][1]
|
||||
return result
|
||||
|
||||
|
||||
def name_get(self, cr, uid, ids, context=None):
|
||||
res = []
|
||||
for message in self.browse(cr, uid, ids, context=context):
|
||||
name = ''
|
||||
if message.subject:
|
||||
name = '%s: ' % (message.subject)
|
||||
if message.body_text:
|
||||
name = '%s%s ' % (name, message.body_text[0:20])
|
||||
if message.date:
|
||||
name = '%s(%s)' % (name, message.date)
|
||||
res.append((message.id, name))
|
||||
return res
|
||||
|
||||
_name = 'mail.message.common'
|
||||
_rec_name = 'subject'
|
||||
_columns = {
|
||||
'subject': fields.char('Subject', size=512, required=True),
|
||||
'subject': fields.char('Subject', size=512),
|
||||
'model': fields.char('Related Document Model', size=128, select=1),
|
||||
'res_id': fields.integer('Related Document ID', select=1),
|
||||
'record_name': fields.function(get_record_name, type='string', string='Message Record Name',
|
||||
|
|
|
@ -34,7 +34,7 @@ import xmlrpclib
|
|||
|
||||
_logger = logging.getLogger(__name__)
|
||||
|
||||
class mail_thread(osv.osv):
|
||||
class mail_thread(osv.Model):
|
||||
'''Mixin model, meant to be inherited by any model that needs to
|
||||
act as a discussion topic on which messages can be attached.
|
||||
Public methods are prefixed with ``message_`` in order to avoid
|
||||
|
@ -62,10 +62,15 @@ class mail_thread(osv.osv):
|
|||
_name = 'mail.thread'
|
||||
_description = 'Email Thread'
|
||||
|
||||
def _get_message_ids(self, cr, uid, ids, name, arg, context=None):
|
||||
def _get_message_ids(self, cr, uid, ids, name, args, context=None):
|
||||
res = {}
|
||||
for id in ids:
|
||||
res[id] = self.message_load_ids(cr, uid, [id], context=context)
|
||||
message_ids = self.message_load_ids(cr, uid, [id], context=context)
|
||||
subscriber_ids = self.message_get_subscribers(cr, uid, [id], context=context)
|
||||
res[id] = {
|
||||
'message_ids': message_ids,
|
||||
'message_summary': "<span>Msg: %d</span> . <span>Fol: %d</span>" % (len(message_ids), len(subscriber_ids)),
|
||||
}
|
||||
return res
|
||||
|
||||
def _search_message_ids(self, cr, uid, obj, name, args, context=None):
|
||||
|
@ -73,10 +78,23 @@ class mail_thread(osv.osv):
|
|||
msg_ids = msg_obj.search(cr, uid, ['&', ('res_id', 'in', args[0][2]), ('model', '=', self._name)], context=context)
|
||||
return [('id', 'in', msg_ids)]
|
||||
|
||||
# OpenChatter: message_ids is a dummy field that should not be used
|
||||
_columns = {
|
||||
'message_ids': fields.function(_get_message_ids, method=True, fnct_search=_search_message_ids,
|
||||
type='one2many', obj='mail.message', string='Temp messages', _fields_id = 'res_id'),
|
||||
'message_ids': fields.function(_get_message_ids, method=True,
|
||||
fnct_search=_search_message_ids,
|
||||
type='one2many', obj='mail.message', _fields_id = 'res_id',
|
||||
string='Temp messages', multi="_get_message_ids",
|
||||
help="Functional field holding messages related to the current document."),
|
||||
'message_state': fields.boolean('Read',
|
||||
help="When checked, new messages require your attention."),
|
||||
'message_summary': fields.function(_get_message_ids, method=True,
|
||||
type='text', string='Summary', multi="_get_message_ids",
|
||||
help="Holds the Chatter summary (number of messages, ...). "\
|
||||
"This summary is directly in html format in order to "\
|
||||
"be inserted in kanban views."),
|
||||
}
|
||||
|
||||
_defaults = {
|
||||
'message_state': True,
|
||||
}
|
||||
|
||||
#------------------------------------------------------
|
||||
|
@ -84,10 +102,11 @@ class mail_thread(osv.osv):
|
|||
#------------------------------------------------------
|
||||
|
||||
def create(self, cr, uid, vals, context=None):
|
||||
"""Automatically subscribe the creator"""
|
||||
thread_id = super(mail_thread, self).create(cr, uid, vals, context=context);
|
||||
self.message_subscribe(cr, uid, [thread_id], [uid], context=context)
|
||||
return thread_id;
|
||||
"""Automatically subscribe the creator """
|
||||
thread_id = super(mail_thread, self).create(cr, uid, vals, context=context)
|
||||
if thread_id:
|
||||
self.message_subscribe(cr, uid, [thread_id], [uid], context=context)
|
||||
return thread_id
|
||||
|
||||
def write(self, cr, uid, ids, vals, context=None):
|
||||
"""Automatically subscribe the writer"""
|
||||
|
@ -106,8 +125,6 @@ class mail_thread(osv.osv):
|
|||
a foreign key with a 'cascade' ondelete attribute.
|
||||
Notifications will be deleted with messages
|
||||
"""
|
||||
if context is None:
|
||||
context = {}
|
||||
subscr_obj = self.pool.get('mail.subscription')
|
||||
msg_obj = self.pool.get('mail.message')
|
||||
# delete subscriptions
|
||||
|
@ -120,17 +137,18 @@ class mail_thread(osv.osv):
|
|||
return super(mail_thread, self).unlink(cr, uid, ids, context=context)
|
||||
|
||||
#------------------------------------------------------
|
||||
# Generic message api
|
||||
# mail.message wrappers and tools
|
||||
#------------------------------------------------------
|
||||
|
||||
def message_create(self, cr, uid, thread_id, vals, context=None):
|
||||
"""OpenSocial: wrapper of mail.message create method
|
||||
""" OpenChatter: wrapper of mail.message create method
|
||||
- creates the mail.message
|
||||
- automatically subscribe the message writer
|
||||
- push the message to subscribed users
|
||||
"""
|
||||
if context is None:
|
||||
context = {}
|
||||
|
||||
message_obj = self.pool.get('mail.message')
|
||||
subscription_obj = self.pool.get('mail.subscription')
|
||||
notification_obj = self.pool.get('mail.notification')
|
||||
|
@ -167,7 +185,10 @@ class mail_thread(osv.osv):
|
|||
|
||||
# create message
|
||||
msg_id = message_obj.create(cr, uid, vals, context=context)
|
||||
|
||||
|
||||
# Set as unread if writer is not the document responsible
|
||||
self.message_create_set_unread(cr, uid, [thread_id], context=context)
|
||||
|
||||
# special: if install mode, do not push demo data
|
||||
if context.get('install_mode', False):
|
||||
return True
|
||||
|
@ -186,7 +207,7 @@ class mail_thread(osv.osv):
|
|||
body = new_msg_vals.get('body_html', '') if new_msg_vals.get('subtype', 'plain') == 'html' else new_msg_vals.get('body_text', '')
|
||||
for thread_id in thread_ids:
|
||||
# add subscribers
|
||||
notif_user_ids += [user['id'] for user in self.message_get_subscribers(cr, uid, [thread_id], context=context)]
|
||||
notif_user_ids += self.message_get_subscribers(cr, uid, [thread_id], context=context)
|
||||
# add users requested via parsing message (@login)
|
||||
notif_user_ids += self.message_parse_users(cr, uid, [thread_id], body, context=context)
|
||||
# add users requested to perform an action (need_action mechanism)
|
||||
|
@ -214,6 +235,10 @@ class mail_thread(osv.osv):
|
|||
user_ids = self.pool.get('res.users').search(cr, uid, [('login', 'in', login_lst)], context=context)
|
||||
return user_ids
|
||||
|
||||
#------------------------------------------------------
|
||||
# Generic message api
|
||||
#------------------------------------------------------
|
||||
|
||||
def message_capable_models(self, cr, uid, context=None):
|
||||
ret_dict = {}
|
||||
for model_name in self.pool.obj_list():
|
||||
|
@ -376,7 +401,6 @@ class mail_thread(osv.osv):
|
|||
original = msg_dict.get('original'),
|
||||
context = context)
|
||||
|
||||
# Message loading
|
||||
def _message_add_ancestor_ids(self, cr, uid, ids, child_ids, root_ids, context=None):
|
||||
""" Given message child_ids
|
||||
Find their ancestors until root ids"""
|
||||
|
@ -420,6 +444,9 @@ class mail_thread(osv.osv):
|
|||
msg_ids = self.message_load_ids(cr, uid, ids, limit, offset, domain, ascent, root_ids, context=context)
|
||||
msgs = self.pool.get('mail.message').read(cr, uid, msg_ids, [], context=context)
|
||||
|
||||
# Set as read
|
||||
self.message_check_and_set_read(cr, uid, ids, context=context)
|
||||
|
||||
""" Retrieve all attachments names """
|
||||
map_id_to_name = {}
|
||||
|
||||
|
@ -474,7 +501,7 @@ class mail_thread(osv.osv):
|
|||
return msgs
|
||||
|
||||
#------------------------------------------------------
|
||||
# Email specific
|
||||
# Mail gateway
|
||||
#------------------------------------------------------
|
||||
# message_process will call either message_new or message_update.
|
||||
|
||||
|
@ -549,7 +576,7 @@ class mail_thread(osv.osv):
|
|||
if res_id:
|
||||
res_id = res_id.group(1)
|
||||
if res_id:
|
||||
res_id = int(res_id)
|
||||
res_id = res_id
|
||||
if model_pool.exists(cr, uid, res_id):
|
||||
if hasattr(model_pool, 'message_update'):
|
||||
model_pool.message_update(cr, uid, [res_id], msg, {}, context=context)
|
||||
|
@ -558,7 +585,7 @@ class mail_thread(osv.osv):
|
|||
res_id = False
|
||||
if not res_id:
|
||||
res_id = create_record(msg)
|
||||
#To forward the email to other followers
|
||||
# To forward the email to other followers
|
||||
self.message_forward(cr, uid, model, [res_id], msg_txt, context=context)
|
||||
return res_id
|
||||
|
||||
|
@ -594,29 +621,34 @@ class mail_thread(osv.osv):
|
|||
fields = model_pool.fields_get(cr, uid, context=context)
|
||||
data = model_pool.default_get(cr, uid, fields, context=context)
|
||||
if 'name' in fields and not data.get('name'):
|
||||
data['name'] = msg_dict.get('from','')
|
||||
data['name'] = msg_dict.get('from', '')
|
||||
if custom_values and isinstance(custom_values, dict):
|
||||
data.update(custom_values)
|
||||
res_id = model_pool.create(cr, uid, data, context=context)
|
||||
self.message_append_dict(cr, uid, [res_id], msg_dict, context=context)
|
||||
return res_id
|
||||
|
||||
def message_update(self, cr, uid, ids, msg_dict, vals={}, default_act=None, context=None):
|
||||
"""Called by ``message_process`` when a new message is received
|
||||
for an existing thread. The default behavior is to create a
|
||||
new mail.message in the given thread (by calling
|
||||
``message_append_dict``)
|
||||
Additional behavior may be implemented by overriding this
|
||||
method.
|
||||
def message_update(self, cr, uid, ids, msg_dict, update_vals=None, context=None):
|
||||
""" Called by ``message_process`` when a new message is received
|
||||
for an existing thread. The default behavior is to create a
|
||||
new mail.message in the given thread (by calling
|
||||
``message_append_dict``)
|
||||
Additional behavior may be implemented by overriding this
|
||||
method.
|
||||
|
||||
:param dict msg_dict: a map containing the email details and
|
||||
:param dict msg_dict: a map containing the email details and
|
||||
attachments. See ``message_process`` and
|
||||
``mail.message.parse()`` for details.
|
||||
:param dict context: if a ``thread_model`` value is present
|
||||
:param dict vals: a dict containing values to update records
|
||||
given their ids; if the dict is None or is
|
||||
void, no write operation is performed.
|
||||
:param dict context: if a ``thread_model`` value is present
|
||||
in the context, its value will be used
|
||||
to determine the model of the thread to
|
||||
update (instead of the current model).
|
||||
"""
|
||||
if update_vals:
|
||||
self.write(cr, uid, ids, update_vals, context=context)
|
||||
return self.message_append_dict(cr, uid, ids, msg_dict, context=context)
|
||||
|
||||
def message_thread_followers(self, cr, uid, ids, context=None):
|
||||
|
@ -746,13 +778,8 @@ class mail_thread(osv.osv):
|
|||
self.message_append_note(cr, uid, [id], 'res.log', message, context=context)
|
||||
|
||||
def message_append_note(self, cr, uid, ids, subject=None, body=None, parent_id=False, type='notification', subtype='html', context=None):
|
||||
if subject is None:
|
||||
if type == 'notification':
|
||||
subject = _('System notification')
|
||||
elif type == 'comment' and not parent_id:
|
||||
subject = _('Comment')
|
||||
elif type == 'comment' and parent_id:
|
||||
subject = _('Reply')
|
||||
if type in ['notification', 'reply']:
|
||||
subject = None
|
||||
if subtype == 'html':
|
||||
body_html = body
|
||||
body_text = body
|
||||
|
@ -765,51 +792,77 @@ class mail_thread(osv.osv):
|
|||
# Subscription mechanism
|
||||
#------------------------------------------------------
|
||||
|
||||
def message_get_subscribers_ids(self, cr, uid, ids, context=None):
|
||||
def message_get_subscribers(self, cr, uid, ids, context=None):
|
||||
""" Returns the current document followers. Basically this method
|
||||
checks in mail.subscription for entries with matching res_model,
|
||||
res_id.
|
||||
|
||||
:param get_ids: if set to True, return the ids of users; if set
|
||||
to False, returns the result of a read in res.users
|
||||
"""
|
||||
subscr_obj = self.pool.get('mail.subscription')
|
||||
subscr_ids = subscr_obj.search(cr, uid, ['&', ('res_model', '=', self._name), ('res_id', 'in', ids)], context=context)
|
||||
subs = subscr_obj.read(cr, uid, subscr_ids, context=context)
|
||||
return [sub['user_id'][0] for sub in subs]
|
||||
return [sub['user_id'][0] for sub in subscr_obj.read(cr, uid, subscr_ids, ['user_id'], context=context)]
|
||||
|
||||
def message_get_subscribers(self, cr, uid, ids, context=None):
|
||||
user_ids = self.message_get_subscribers_ids(cr, uid, ids, context=context)
|
||||
users = self.pool.get('res.users').read(cr, uid, user_ids, fields=['id', 'name', 'avatar'], context=context)
|
||||
return users
|
||||
def message_read_subscribers(self, cr, uid, ids, fields=['id', 'name', 'avatar'], context=None):
|
||||
""" Returns the current document followers as a read result. Used
|
||||
mainly for Chatter having only one method to call to have
|
||||
details about users.
|
||||
"""
|
||||
user_ids = self.message_get_subscribers(cr, uid, ids, context=context)
|
||||
return self.pool.get('res.users').read(cr, uid, user_ids, fields=fields, context=context)
|
||||
|
||||
def message_is_subscriber(self, cr, uid, ids, user_id = None, context=None):
|
||||
users = self.message_get_subscribers(cr, uid, ids, context=context)
|
||||
""" Check if uid or user_id (if set) is a subscriber to the current
|
||||
document.
|
||||
|
||||
:param user_id: if set, check is done on user_id; if not set
|
||||
check is done on uid
|
||||
"""
|
||||
sub_user_id = uid if user_id is None else user_id
|
||||
if sub_user_id in [user['id'] for user in users]:
|
||||
if sub_user_id in self.message_get_subscribers(cr, uid, ids, context=context):
|
||||
return True
|
||||
return False
|
||||
|
||||
def message_subscribe(self, cr, uid, ids, user_ids = None, context=None):
|
||||
""" Subscribe the user (or user_ids) to the current document.
|
||||
|
||||
:param user_ids: a list of user_ids; if not set, subscribe
|
||||
uid instead
|
||||
"""
|
||||
subscription_obj = self.pool.get('mail.subscription')
|
||||
to_subscribe_uids = [uid] if user_ids is None else user_ids
|
||||
create_ids = []
|
||||
for id in ids:
|
||||
already_subscribed_user_ids = self.message_get_subscribers(cr, uid, [id], context=context)
|
||||
for user_id in to_subscribe_uids:
|
||||
if self.message_is_subscriber(cr, uid, [id], user_id=user_id, context=context): continue
|
||||
if user_id in already_subscribed_user_ids: continue
|
||||
create_ids.append(subscription_obj.create(cr, uid, {'res_model': self._name, 'res_id': id, 'user_id': user_id}, context=context))
|
||||
return create_ids
|
||||
|
||||
def message_unsubscribe(self, cr, uid, ids, user_ids = None, context=None):
|
||||
if not user_ids and not uid in self.message_get_subscribers_ids(cr, uid, ids, context=context):
|
||||
""" Unsubscribe the user (or user_ids) from the current document.
|
||||
|
||||
:param user_ids: a list of user_ids; if not set, subscribe
|
||||
uid instead
|
||||
"""
|
||||
# Trying to unsubscribe somebody not in subscribers: returns False
|
||||
# if special management is needed; allows to know that an automatically
|
||||
# subscribed user tries to unsubscribe and allows to warn him
|
||||
mail_thread_model = self.pool.get('mail.thread')
|
||||
if not user_ids and not uid in mail_thread_model.message_get_subscribers(cr, uid, ids, context=context):
|
||||
return False
|
||||
subscription_obj = self.pool.get('mail.subscription')
|
||||
to_unsubscribe_uids = [uid] if user_ids is None else user_ids
|
||||
to_delete_sub_ids = subscription_obj.search(cr, uid,
|
||||
['&', '&', ('res_model', '=', self._name), ('res_id', 'in', ids), ('user_id', 'in', to_unsubscribe_uids)], context=context)
|
||||
subscription_obj.unlink(cr, uid, to_delete_sub_ids, context=context)
|
||||
return True
|
||||
return subscription_obj.unlink(cr, uid, to_delete_sub_ids, context=context)
|
||||
|
||||
#------------------------------------------------------
|
||||
# Notification API
|
||||
#------------------------------------------------------
|
||||
|
||||
def message_remove_pushed_notifications(self, cr, uid, ids, msg_ids, remove_childs=True, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
notif_obj = self.pool.get('mail.notification')
|
||||
msg_obj = self.pool.get('mail.message')
|
||||
if remove_childs:
|
||||
|
@ -819,4 +872,37 @@ class mail_thread(osv.osv):
|
|||
to_del_notif_ids = notif_obj.search(cr, uid, ['&', ('user_id', '=', uid), ('message_id', 'in', notif_msg_ids)], context=context)
|
||||
return notif_obj.unlink(cr, uid, to_del_notif_ids, context=context)
|
||||
|
||||
#------------------------------------------------------
|
||||
# Thread_state
|
||||
#------------------------------------------------------
|
||||
|
||||
def message_create_set_unread(self, cr, uid, ids, context=None):
|
||||
""" When creating a new message, set as unread if uid is not the
|
||||
object responsible. """
|
||||
for obj in self.browse(cr, uid, ids, context=context):
|
||||
if obj.message_state and hasattr(obj, 'user_id') and (not obj.user_id or obj.user_id.id != uid):
|
||||
self.message_mark_as_unread(cr, uid, [obj.id], context=context)
|
||||
|
||||
def message_check_and_set_unread(self, cr, uid, ids, context=None):
|
||||
""" Set unread if uid is the object responsible or if the object has
|
||||
no responsible. """
|
||||
for obj in self.browse(cr, uid, ids, context=context):
|
||||
if obj.message_state and hasattr(obj, 'user_id') and (not obj.user_id or obj.user_id.id == uid):
|
||||
self.message_mark_as_unread(cr, uid, [obj.id], context=context)
|
||||
|
||||
def message_mark_as_unread(self, cr, uid, ids, context=None):
|
||||
""" Set as unread. """
|
||||
return self.write(cr, uid, ids, {'message_state': False}, context=context)
|
||||
|
||||
def message_check_and_set_read(self, cr, uid, ids, context=None):
|
||||
""" Set read if uid is the object responsible. """
|
||||
for obj in self.browse(cr, uid, ids, context=context):
|
||||
if not obj.message_state and hasattr(obj, 'user_id') and obj.user_id and obj.user_id.id == uid:
|
||||
self.message_mark_as_read(cr, uid, [obj.id], context=context)
|
||||
|
||||
def message_mark_as_read(self, cr, uid, ids, context=None):
|
||||
""" Set as read. """
|
||||
return self.write(cr, uid, ids, {'message_state': True}, context=context)
|
||||
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<field name="arch" type="xml">
|
||||
<xpath expr="//sheet" position="after">
|
||||
<footer>
|
||||
<field name="message_ids" widget="ThreadView"
|
||||
<field name="message_ids" widget="mail_thread"
|
||||
options='{"thread_level": 1}'/>
|
||||
</footer>
|
||||
</xpath>
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
</field>
|
||||
<xpath expr="/form/sheet" position="after">
|
||||
<div class="oe_bottom">
|
||||
<field name="message_ids" colspan="4" widget="ThreadView" nolabel="1"/>
|
||||
<field name="message_ids" colspan="4" widget="mail_thread" nolabel="1"/>
|
||||
</div>
|
||||
</xpath>
|
||||
</data>
|
||||
|
|
|
@ -0,0 +1,385 @@
|
|||
/*!
|
||||
* jQuery Expander Plugin v1.4.2
|
||||
*
|
||||
* Date: Fri Mar 16 14:29:56 2012 EDT
|
||||
* Requires: jQuery v1.3+
|
||||
*
|
||||
* Copyright 2011, Karl Swedberg
|
||||
* Dual licensed under the MIT and GPL licenses (just like jQuery):
|
||||
* http://www.opensource.org/licenses/mit-license.php
|
||||
* http://www.gnu.org/licenses/gpl.html
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
(function($) {
|
||||
$.expander = {
|
||||
version: '1.4.2',
|
||||
defaults: {
|
||||
// the number of characters at which the contents will be sliced into two parts.
|
||||
slicePoint: 100,
|
||||
|
||||
// whether to keep the last word of the summary whole (true) or let it slice in the middle of a word (false)
|
||||
preserveWords: true,
|
||||
|
||||
// a threshold of sorts for whether to initially hide/collapse part of the element's contents.
|
||||
// If after slicing the contents in two there are fewer words in the second part than
|
||||
// the value set by widow, we won't bother hiding/collapsing anything.
|
||||
widow: 4,
|
||||
|
||||
// text displayed in a link instead of the hidden part of the element.
|
||||
// clicking this will expand/show the hidden/collapsed text
|
||||
expandText: 'read more',
|
||||
expandPrefix: '… ',
|
||||
|
||||
expandAfterSummary: false,
|
||||
|
||||
// class names for summary element and detail element
|
||||
summaryClass: 'summary',
|
||||
detailClass: 'details',
|
||||
|
||||
// class names for <span> around "read-more" link and "read-less" link
|
||||
moreClass: 'read-more',
|
||||
lessClass: 'read-less',
|
||||
|
||||
// number of milliseconds after text has been expanded at which to collapse the text again.
|
||||
// when 0, no auto-collapsing
|
||||
collapseTimer: 0,
|
||||
|
||||
// effects for expanding and collapsing
|
||||
expandEffect: 'fadeIn',
|
||||
expandSpeed: 250,
|
||||
collapseEffect: 'fadeOut',
|
||||
collapseSpeed: 200,
|
||||
|
||||
// allow the user to re-collapse the expanded text.
|
||||
userCollapse: true,
|
||||
|
||||
// text to use for the link to re-collapse the text
|
||||
userCollapseText: 'read less',
|
||||
userCollapsePrefix: ' ',
|
||||
|
||||
|
||||
// all callback functions have the this keyword mapped to the element in the jQuery set when .expander() is called
|
||||
|
||||
onSlice: null, // function() {}
|
||||
beforeExpand: null, // function() {},
|
||||
afterExpand: null, // function() {},
|
||||
onCollapse: null // function(byUser) {}
|
||||
}
|
||||
};
|
||||
|
||||
$.fn.expander = function(options) {
|
||||
var meth = 'init';
|
||||
|
||||
if (typeof options == 'string') {
|
||||
meth = options;
|
||||
options = {};
|
||||
}
|
||||
|
||||
var opts = $.extend({}, $.expander.defaults, options),
|
||||
rSelfClose = /^<(?:area|br|col|embed|hr|img|input|link|meta|param).*>$/i,
|
||||
rAmpWordEnd = opts.wordEnd || /(&(?:[^;]+;)?|[a-zA-Z\u00C0-\u0100]+)$/,
|
||||
rOpenCloseTag = /<\/?(\w+)[^>]*>/g,
|
||||
rOpenTag = /<(\w+)[^>]*>/g,
|
||||
rCloseTag = /<\/(\w+)>/g,
|
||||
rLastCloseTag = /(<\/[^>]+>)\s*$/,
|
||||
rTagPlus = /^<[^>]+>.?/,
|
||||
delayedCollapse;
|
||||
|
||||
var methods = {
|
||||
init: function() {
|
||||
this.each(function() {
|
||||
var i, l, tmp, newChar, summTagless, summOpens, summCloses,
|
||||
lastCloseTag, detailText, detailTagless,
|
||||
$thisDetails, $readMore,
|
||||
openTagsForDetails = [],
|
||||
closeTagsForsummaryText = [],
|
||||
defined = {},
|
||||
thisEl = this,
|
||||
$this = $(this),
|
||||
$summEl = $([]),
|
||||
o = $.meta ? $.extend({}, opts, $this.data()) : opts,
|
||||
hasDetails = !!$this.find('.' + o.detailClass).length,
|
||||
hasBlocks = !!$this.find('*').filter(function() {
|
||||
var display = $(this).css('display');
|
||||
return (/^block|table|list/).test(display);
|
||||
}).length,
|
||||
el = hasBlocks ? 'div' : 'span',
|
||||
detailSelector = el + '.' + o.detailClass,
|
||||
moreSelector = 'span.' + o.moreClass,
|
||||
expandSpeed = o.expandSpeed || 0,
|
||||
allHtml = $.trim( $this.html() ),
|
||||
allText = $.trim( $this.text() ),
|
||||
summaryText = allHtml.slice(0, o.slicePoint);
|
||||
|
||||
// bail out if we've already set up the expander on this element
|
||||
if ( $.data(this, 'expander') ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$.data(this, 'expander', true);
|
||||
|
||||
// determine which callback functions are defined
|
||||
$.each(['onSlice','beforeExpand', 'afterExpand', 'onCollapse'], function(index, val) {
|
||||
defined[val] = $.isFunction(o[val]);
|
||||
});
|
||||
|
||||
// back up if we're in the middle of a tag or word
|
||||
summaryText = backup(summaryText);
|
||||
|
||||
// summary text sans tags length
|
||||
summTagless = summaryText.replace(rOpenCloseTag, '').length;
|
||||
|
||||
// add more characters to the summary, one for each character in the tags
|
||||
while (summTagless < o.slicePoint) {
|
||||
newChar = allHtml.charAt(summaryText.length);
|
||||
if (newChar == '<') {
|
||||
newChar = allHtml.slice(summaryText.length).match(rTagPlus)[0];
|
||||
}
|
||||
summaryText += newChar;
|
||||
summTagless++;
|
||||
}
|
||||
|
||||
summaryText = backup(summaryText, o.preserveWords);
|
||||
|
||||
// separate open tags from close tags and clean up the lists
|
||||
summOpens = summaryText.match(rOpenTag) || [];
|
||||
summCloses = summaryText.match(rCloseTag) || [];
|
||||
|
||||
// filter out self-closing tags
|
||||
tmp = [];
|
||||
$.each(summOpens, function(index, val) {
|
||||
if ( !rSelfClose.test(val) ) {
|
||||
tmp.push(val);
|
||||
}
|
||||
});
|
||||
summOpens = tmp;
|
||||
|
||||
// strip close tags to just the tag name
|
||||
l = summCloses.length;
|
||||
for (i = 0; i < l; i++) {
|
||||
summCloses[i] = summCloses[i].replace(rCloseTag, '$1');
|
||||
}
|
||||
|
||||
// tags that start in summary and end in detail need:
|
||||
// a). close tag at end of summary
|
||||
// b). open tag at beginning of detail
|
||||
$.each(summOpens, function(index, val) {
|
||||
var thisTagName = val.replace(rOpenTag, '$1');
|
||||
var closePosition = $.inArray(thisTagName, summCloses);
|
||||
if (closePosition === -1) {
|
||||
openTagsForDetails.push(val);
|
||||
closeTagsForsummaryText.push('</' + thisTagName + '>');
|
||||
|
||||
} else {
|
||||
summCloses.splice(closePosition, 1);
|
||||
}
|
||||
});
|
||||
|
||||
// reverse the order of the close tags for the summary so they line up right
|
||||
closeTagsForsummaryText.reverse();
|
||||
|
||||
// create necessary summary and detail elements if they don't already exist
|
||||
if ( !hasDetails ) {
|
||||
|
||||
// end script if there is no detail text or if detail has fewer words than widow option
|
||||
detailText = allHtml.slice(summaryText.length);
|
||||
detailTagless = $.trim( detailText.replace(rOpenCloseTag, '') );
|
||||
|
||||
if ( detailTagless === '' || detailTagless.split(/\s+/).length < o.widow ) {
|
||||
return;
|
||||
}
|
||||
// otherwise, continue...
|
||||
lastCloseTag = closeTagsForsummaryText.pop() || '';
|
||||
summaryText += closeTagsForsummaryText.join('');
|
||||
detailText = openTagsForDetails.join('') + detailText;
|
||||
|
||||
} else {
|
||||
// assume that even if there are details, we still need readMore/readLess/summary elements
|
||||
// (we already bailed out earlier when readMore el was found)
|
||||
// but we need to create els differently
|
||||
|
||||
// remove the detail from the rest of the content
|
||||
detailText = $this.find(detailSelector).remove().html();
|
||||
|
||||
// The summary is what's left
|
||||
summaryText = $this.html();
|
||||
|
||||
// allHtml is the summary and detail combined (this is needed when content has block-level elements)
|
||||
allHtml = summaryText + detailText;
|
||||
|
||||
lastCloseTag = '';
|
||||
}
|
||||
o.moreLabel = $this.find(moreSelector).length ? '' : buildMoreLabel(o);
|
||||
|
||||
if (hasBlocks) {
|
||||
detailText = allHtml;
|
||||
}
|
||||
summaryText += lastCloseTag;
|
||||
|
||||
// onSlice callback
|
||||
o.summary = summaryText;
|
||||
o.details = detailText;
|
||||
o.lastCloseTag = lastCloseTag;
|
||||
|
||||
if (defined.onSlice) {
|
||||
// user can choose to return a modified options object
|
||||
// one last chance for user to change the options. sneaky, huh?
|
||||
// but could be tricky so use at your own risk.
|
||||
tmp = o.onSlice.call(thisEl, o);
|
||||
|
||||
// so, if the returned value from the onSlice function is an object with a details property, we'll use that!
|
||||
o = tmp && tmp.details ? tmp : o;
|
||||
}
|
||||
|
||||
// build the html with summary and detail and use it to replace old contents
|
||||
var html = buildHTML(o, hasBlocks);
|
||||
|
||||
$this.html( html );
|
||||
|
||||
// set up details and summary for expanding/collapsing
|
||||
$thisDetails = $this.find(detailSelector);
|
||||
$readMore = $this.find(moreSelector);
|
||||
$thisDetails.hide();
|
||||
$readMore.find('a').unbind('click.expander').bind('click.expander', expand);
|
||||
|
||||
$summEl = $this.find('div.' + o.summaryClass);
|
||||
|
||||
if ( o.userCollapse && !$this.find('span.' + o.lessClass).length ) {
|
||||
$this
|
||||
.find(detailSelector)
|
||||
.append('<span class="' + o.lessClass + '">' + o.userCollapsePrefix + '<a href="#">' + o.userCollapseText + '</a></span>');
|
||||
}
|
||||
|
||||
$this
|
||||
.find('span.' + o.lessClass + ' a')
|
||||
.unbind('click.expander')
|
||||
.bind('click.expander', function(event) {
|
||||
event.preventDefault();
|
||||
clearTimeout(delayedCollapse);
|
||||
var $detailsCollapsed = $(this).closest(detailSelector);
|
||||
reCollapse(o, $detailsCollapsed);
|
||||
if (defined.onCollapse) {
|
||||
o.onCollapse.call(thisEl, true);
|
||||
}
|
||||
});
|
||||
|
||||
function expand(event) {
|
||||
event.preventDefault();
|
||||
$readMore.hide();
|
||||
$summEl.hide();
|
||||
if (defined.beforeExpand) {
|
||||
o.beforeExpand.call(thisEl);
|
||||
}
|
||||
|
||||
$thisDetails.stop(false, true)[o.expandEffect](expandSpeed, function() {
|
||||
$thisDetails.css({zoom: ''});
|
||||
if (defined.afterExpand) {o.afterExpand.call(thisEl);}
|
||||
delayCollapse(o, $thisDetails, thisEl);
|
||||
});
|
||||
}
|
||||
|
||||
}); // this.each
|
||||
},
|
||||
destroy: function() {
|
||||
if ( !this.data('expander') ) {
|
||||
return;
|
||||
}
|
||||
this.removeData('expander');
|
||||
this.each(function() {
|
||||
var $this = $(this),
|
||||
o = $.meta ? $.extend({}, opts, $this.data()) : opts,
|
||||
details = $this.find('.' + o.detailClass).contents();
|
||||
|
||||
$this.find('.' + o.moreClass).remove();
|
||||
$this.find('.' + o.summaryClass).remove();
|
||||
$this.find('.' + o.detailClass).after(details).remove();
|
||||
$this.find('.' + o.lessClass).remove();
|
||||
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
// run the methods (almost always "init")
|
||||
if ( methods[meth] ) {
|
||||
methods[ meth ].call(this);
|
||||
}
|
||||
|
||||
// utility functions
|
||||
function buildHTML(o, blocks) {
|
||||
var el = 'span',
|
||||
summary = o.summary;
|
||||
if ( blocks ) {
|
||||
el = 'div';
|
||||
// if summary ends with a close tag, tuck the moreLabel inside it
|
||||
if ( rLastCloseTag.test(summary) && !o.expandAfterSummary) {
|
||||
summary = summary.replace(rLastCloseTag, o.moreLabel + '$1');
|
||||
} else {
|
||||
// otherwise (e.g. if ends with self-closing tag) just add moreLabel after summary
|
||||
// fixes #19
|
||||
summary += o.moreLabel;
|
||||
}
|
||||
|
||||
// and wrap it in a div
|
||||
summary = '<div class="' + o.summaryClass + '">' + summary + '</div>';
|
||||
} else {
|
||||
summary += o.moreLabel;
|
||||
}
|
||||
|
||||
return [
|
||||
summary,
|
||||
'<',
|
||||
el + ' class="' + o.detailClass + '"',
|
||||
'>',
|
||||
o.details,
|
||||
'</' + el + '>'
|
||||
].join('');
|
||||
}
|
||||
|
||||
function buildMoreLabel(o) {
|
||||
var ret = '<span class="' + o.moreClass + '">' + o.expandPrefix;
|
||||
ret += '<a href="#">' + o.expandText + '</a></span>';
|
||||
return ret;
|
||||
}
|
||||
|
||||
function backup(txt, preserveWords) {
|
||||
if ( txt.lastIndexOf('<') > txt.lastIndexOf('>') ) {
|
||||
txt = txt.slice( 0, txt.lastIndexOf('<') );
|
||||
}
|
||||
if (preserveWords) {
|
||||
txt = txt.replace(rAmpWordEnd,'');
|
||||
}
|
||||
|
||||
return $.trim(txt);
|
||||
}
|
||||
|
||||
function reCollapse(o, el) {
|
||||
el.stop(true, true)[o.collapseEffect](o.collapseSpeed, function() {
|
||||
var prevMore = el.prev('span.' + o.moreClass).show();
|
||||
if (!prevMore.length) {
|
||||
el.parent().children('div.' + o.summaryClass).show()
|
||||
.find('span.' + o.moreClass).show();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function delayCollapse(option, $collapseEl, thisEl) {
|
||||
if (option.collapseTimer) {
|
||||
delayedCollapse = setTimeout(function() {
|
||||
reCollapse(option, $collapseEl);
|
||||
if ( $.isFunction(option.onCollapse) ) {
|
||||
option.onCollapse.call(thisEl, false);
|
||||
}
|
||||
}, option.collapseTimer);
|
||||
}
|
||||
}
|
||||
|
||||
return this;
|
||||
};
|
||||
|
||||
// plugin defaults
|
||||
$.fn.expander.defaults = $.expander.defaults;
|
||||
})(jQuery);
|
|
@ -314,8 +314,8 @@
|
|||
text-align: justify;
|
||||
}
|
||||
|
||||
.openerp .oe_mail_msg_tail {
|
||||
display: none;
|
||||
.openerp .oe_mail_msg_body span.oe_mail_msg_tail {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
/* Read more/less link */
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue