@@ -183,7 +183,7 @@ class account_cash_statement(osv.osv):
|
||||
('open','Open')], 'State', required=True, states={'confirm': [('readonly', True)]}, readonly="1"),
|
||||
'total_entry_encoding':fields.function(_get_sum_entry_encoding, method=True, store=True, string="Cash Transaction", help="Total cash transactions"),
|
||||
'closing_date':fields.datetime("Closed On"),
|
||||
'balance_end': fields.function(_end_balance, method=True, store=True, string='Balance', help="Closing balance based on Opening Balance and Transactions"),
|
||||
'balance_end': fields.function(_end_balance, method=True, store=True, string='Balance', help="Closing balance based on Starting Balance and Cash Transactions"),
|
||||
'balance_end_cash': fields.function(_balance_end_cash, method=True, store=True, string='Balance', help="Closing balance based on cashBox"),
|
||||
'starting_details_ids': fields.one2many('account.cashbox.line', 'starting_id', string='Opening Cashbox'),
|
||||
'ending_details_ids': fields.one2many('account.cashbox.line', 'ending_id', string='Closing Cashbox'),
|
||||
|
||||
@@ -674,6 +674,7 @@ class account_move_line(osv.osv):
|
||||
account_id = line['account_id']['id']
|
||||
partner_id = (line['partner_id'] and line['partner_id']['id']) or False
|
||||
writeoff = debit - credit
|
||||
|
||||
# Ifdate_p in context => take this date
|
||||
if context.has_key('date_p') and context['date_p']:
|
||||
date=context['date_p']
|
||||
|
||||
@@ -52,6 +52,8 @@
|
||||
<!-- writeoff_acc_id = --> <value eval="ref('cash')"/>
|
||||
<!-- writeoff_period_id = --> <value eval="ref('account.period_' + str(int(time.strftime('%m'))))"/>
|
||||
<!-- writeoff_journal_id = --> <value eval="ref('bank_journal')"/>
|
||||
<!-- context = --> <value eval="{}"/>
|
||||
<!-- name = --> <value eval="str('Payment from ASUStek')"/>
|
||||
</function>
|
||||
|
||||
<assert id="test_invoice_1" model="account.invoice" string="Test invoice 1 is now paid">
|
||||
|
||||
@@ -196,13 +196,33 @@
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="view_account_list" model="ir.ui.view">
|
||||
<field name="name">account.account.list</field>
|
||||
<field name="model">account.account</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="field_parent">child_id</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Chart of accounts" toolbar="1" colors="blue:type in ('view');black:type not in ('view')">
|
||||
<field name="code"/>
|
||||
<field name="name"/>
|
||||
<field name="user_type" invisible="1"/>
|
||||
<field name="debit"/>
|
||||
<field name="credit"/>
|
||||
<field name="balance"/>
|
||||
<field name="type"/>
|
||||
<field name="company_id" groups="base.group_multi_company"/>
|
||||
<field name="company_currency_id"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
<record id="action_account_form" model="ir.actions.act_window">
|
||||
<field name="name">Accounts</field>
|
||||
<field name="res_model">account.account</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form,graph</field>
|
||||
<field name="search_view_id" ref="view_account_search"/>
|
||||
<field name="view_id" ref="view_account_list"/>
|
||||
</record>
|
||||
<menuitem id="account_account_menu" name="Accounts" parent="menu_finance_accounting"/>
|
||||
<menuitem action="action_account_form" id="menu_action_account_form" parent="account_account_menu"/>
|
||||
@@ -216,14 +236,12 @@
|
||||
<tree string="Chart of accounts" toolbar="1" colors="blue:type in ('view');black:type not in ('view')">
|
||||
<field name="code"/>
|
||||
<field name="name"/>
|
||||
<field name="parent_id" invisible="1"/>
|
||||
<field name="user_type" invisible="1"/>
|
||||
<field name="debit"/>
|
||||
<field name="credit"/>
|
||||
<field name="balance"/>
|
||||
<field name="company_id" groups="base.group_multi_company"/>
|
||||
<field name="company_currency_id"/>
|
||||
<field name="type" invisible="1"/>
|
||||
<field name="type"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
@@ -237,10 +255,10 @@
|
||||
<!-- <menuitem action="action_account_tree" id="menu_action_account_tree" parent="account.account_account_menu"/>-->
|
||||
|
||||
<!--
|
||||
Journal
|
||||
Journal
|
||||
|
||||
Account Journal Columns
|
||||
-->
|
||||
Account Journal Columns
|
||||
-->
|
||||
|
||||
<record id="view_journal_column_form" model="ir.ui.view">
|
||||
<field name="name">account.journal.column.form</field>
|
||||
@@ -2300,7 +2318,6 @@
|
||||
<field name="journal_id" on_change="onchange_journal_id(journal_id)" domain="[('type','=','cash')]" select="1" />
|
||||
<field name="user_id" select="1" readonly="1"/>
|
||||
<field name="period_id" select="1"/>
|
||||
<!-- <field name="balance_end_real"/>-->
|
||||
</group>
|
||||
|
||||
<notebook colspan="4">
|
||||
|
||||
@@ -62,92 +62,218 @@
|
||||
<!--
|
||||
Chart of Account
|
||||
-->
|
||||
<record id="minimal_0" model="account.account">
|
||||
<field name="code">x 0</field>
|
||||
|
||||
<record id="chart0" model="account.account">
|
||||
<field name="code">X0</field>
|
||||
<field name="name">Chart For Automated Tests</field>
|
||||
<field eval="False" name="parent_id"/>
|
||||
<field eval="0" name="parent_id"/>
|
||||
<field name="type">view</field>
|
||||
<field name="note">
|
||||
This chart of account is used for automated testing purpose. It is installed
|
||||
only if you selected demo data during your database creation. Modules can
|
||||
do black box testing on entries on this chart of account, without modifying
|
||||
your own accounts.
|
||||
</field>
|
||||
<field name="user_type" ref="account_type_root"/>
|
||||
</record>
|
||||
<record id="a_recv" model="account.account">
|
||||
<field name="name">Main Receivable</field>
|
||||
<field name="code">x 40000</field>
|
||||
<field name="type">receivable</field>
|
||||
<field eval="ref('minimal_0')" name="parent_id"/>
|
||||
<field name="company_id" ref="base.main_company"/>
|
||||
<field eval="True" name="reconcile"/>
|
||||
<field name="user_type" ref="account_type_receivable"/>
|
||||
<field name="note">
|
||||
This chart of account is used for automated testing purpose. It is installed
|
||||
only if you selected demo data during your database creation. Modules can
|
||||
do black box testing on entries on this chart of account, without modifying
|
||||
your own chart of account.
|
||||
</field>
|
||||
|
||||
<!-- Balance Sheet -->
|
||||
|
||||
<record id="bal" model="account.account">
|
||||
<field name="code">X1</field>
|
||||
<field name="name">Balance Sheet - (test)</field>
|
||||
<field ref="chart0" name="parent_id"/>
|
||||
<field name="type">view</field>
|
||||
<field name="user_type" ref="account_type_root"/>
|
||||
</record>
|
||||
<record id="a_pay" model="account.account">
|
||||
<field name="name">Main Payable</field>
|
||||
<field name="code">x 44000</field>
|
||||
<field name="type">payable</field>
|
||||
<field eval="ref('minimal_0')" name="parent_id"/>
|
||||
<field name="company_id" ref="base.main_company"/>
|
||||
<field eval="True" name="reconcile"/>
|
||||
<field name="user_type" ref="account_type_payable"/>
|
||||
<field name="note">
|
||||
This chart of account is used for automated testing purpose. It is installed
|
||||
only if you selected demo data during your database creation. Modules can
|
||||
do black box testing on entries on this chart of account, without modifying
|
||||
your own chart of account.
|
||||
</field>
|
||||
|
||||
<record model="account.account" id="assets_view">
|
||||
<field name="name">Assets - (test)</field>
|
||||
<field name="code">X10</field>
|
||||
<field name="type">view</field>
|
||||
<field name="user_type" ref="account_type_asset"/>
|
||||
<field name="reconcile" eval="False"/>
|
||||
<field name="parent_id" ref="bal"/>
|
||||
</record>
|
||||
<record id="cash" model="account.account">
|
||||
<field name="name">Petty Cash</field>
|
||||
<field name="code">x 57000</field>
|
||||
<field name="type">other</field>
|
||||
<field eval="ref('minimal_0')" name="parent_id"/>
|
||||
<field name="company_id" ref="base.main_company"/>
|
||||
<field name="user_type" ref="account_type_cash_moves"/>
|
||||
<field name="note">
|
||||
This chart of account is used for automated testing purpose. It is installed
|
||||
only if you selected demo data during your database creation. Modules can
|
||||
do black box testing on entries on this chart of account, without modifying
|
||||
your own chart of account.
|
||||
</field>
|
||||
|
||||
<record model="account.account" id="liabilities_view">
|
||||
<field name="name">Liabilities - (test)</field>
|
||||
<field name="code">X11</field>
|
||||
<field name="type">view</field>
|
||||
<field name="user_type" ref="account_type_liability"/>
|
||||
<field name="reconcile" eval="False"/>
|
||||
<field name="parent_id" ref="bal"/>
|
||||
</record>
|
||||
<record id="a_expense" model="account.account">
|
||||
<field name="name">Products Purchase</field>
|
||||
<field name="code">x 60000</field>
|
||||
<field name="type">other</field>
|
||||
<field eval="ref('minimal_0')" name="parent_id"/>
|
||||
<field name="company_id" ref="base.main_company"/>
|
||||
<field name="user_type" ref="account_type_expense"/>
|
||||
<field name="note">
|
||||
This chart of account is used for automated testing purpose. It is installed
|
||||
only if you selected demo data during your database creation. Modules can
|
||||
do black box testing on entries on this chart of account, without modifying
|
||||
your own chart of account.
|
||||
</field>
|
||||
</record>
|
||||
<record id="a_sale" model="account.account">
|
||||
<field name="name">Products Sales</field>
|
||||
<field name="code">x 70000</field>
|
||||
<field name="type">other</field>
|
||||
<field eval="ref('minimal_0')" name="parent_id"/>
|
||||
<field name="company_id" ref="base.main_company"/>
|
||||
<field name="user_type" ref="account_type_income"/>
|
||||
<field name="note">
|
||||
This chart of account is used for automated testing purpose. It is installed
|
||||
only if you selected demo data during your database creation. Modules can
|
||||
do black box testing on entries on this chart of account, without modifying
|
||||
your own chart of account.
|
||||
</field>
|
||||
|
||||
<record id="fas" model="account.account">
|
||||
<field name="code">X100</field>
|
||||
<field name="name">Fixed Assets - (test)</field>
|
||||
<field ref="assets_view" name="parent_id"/>
|
||||
<field name="type">view</field>
|
||||
<field name="user_type" ref="account_type_asset"/>
|
||||
</record>
|
||||
|
||||
<record id="xfa" model="account.account">
|
||||
<field name="code">X1000</field>
|
||||
<field name="name">Fixed Asset Account - (test)</field>
|
||||
<field ref="fas" name="parent_id"/>
|
||||
<field name="type">other</field>
|
||||
<field name="user_type" ref="account_type_asset"/>
|
||||
</record>
|
||||
|
||||
<record id="nca" model="account.account">
|
||||
<field name="code">X101</field>
|
||||
<field name="name">Net Current Assets - (test)</field>
|
||||
<field ref="assets_view" name="parent_id"/>
|
||||
<field name="type">view</field>
|
||||
<field name="user_type" ref="account_type_asset"/>
|
||||
</record>
|
||||
|
||||
<record id="cas" model="account.account">
|
||||
<field name="code">X1100</field>
|
||||
<field name="name">Current Assets - (test)</field>
|
||||
<field ref="nca" name="parent_id"/>
|
||||
<field name="type">view</field>
|
||||
<field name="user_type" ref="account_type_asset"/>
|
||||
</record>
|
||||
|
||||
<record id="stk" model="account.account">
|
||||
<field name="code">X11001</field>
|
||||
<field name="name">Purchased Stocks - (test)</field>
|
||||
<field ref="cas" name="parent_id"/>
|
||||
<field name="type">other</field>
|
||||
<field name="user_type" ref="account_type_asset"/>
|
||||
</record>
|
||||
|
||||
<record id="a_recv" model="account.account">
|
||||
<field name="code">X11002</field>
|
||||
<field name="name">Debtors - (test)</field>
|
||||
<field ref="cas" name="parent_id"/>
|
||||
<field name="type">receivable</field>
|
||||
<field eval="True" name="reconcile"/>
|
||||
<field name="user_type" ref="account_type_receivable"/>
|
||||
</record>
|
||||
|
||||
<record id="ova" model="account.account">
|
||||
<field name="code">X11003</field>
|
||||
<field name="name">Output VAT - (test)</field>
|
||||
<field ref="cas" name="parent_id"/>
|
||||
<field name="type">other</field>
|
||||
<field name="user_type" ref="account_type_receivable"/>
|
||||
</record>
|
||||
|
||||
<record id="bnk" model="account.account">
|
||||
<field name="code">X11004</field>
|
||||
<field name="name">Bank Current Account - (test)</field>
|
||||
<field ref="cas" name="parent_id"/>
|
||||
<field name="type">other</field>
|
||||
<field name="user_type" ref="account_type_asset"/>
|
||||
</record>
|
||||
|
||||
<record id="cash" model="account.account">
|
||||
<field name="code">X11005</field>
|
||||
<field name="name">Cash - (test)</field>
|
||||
<field ref="cas" name="parent_id"/>
|
||||
<field name="type">other</field>
|
||||
<field name="user_type" ref="account_type_asset"/>
|
||||
</record>
|
||||
|
||||
<record id="cli" model="account.account">
|
||||
<field name="code">X110</field>
|
||||
<field name="name">Current Liabilities - (test)</field>
|
||||
<field ref="liabilities_view" name="parent_id"/>
|
||||
<field name="type">view</field>
|
||||
<field name="user_type" ref="account_type_liability"/>
|
||||
</record>
|
||||
|
||||
<record id="a_pay" model="account.account">
|
||||
<field name="code">X1111</field>
|
||||
<field name="name">Creditors - (test)</field>
|
||||
<field ref="cli" name="parent_id"/>
|
||||
<field name="type">payable</field>
|
||||
<field eval="True" name="reconcile"/>
|
||||
<field name="user_type" ref="account_type_payable"/>
|
||||
</record>
|
||||
|
||||
<record id="iva" model="account.account">
|
||||
<field name="code">X1112</field>
|
||||
<field name="name">Input VAT - (test)</field>
|
||||
<field ref="cli" name="parent_id"/>
|
||||
<field name="type">other</field>
|
||||
<field name="user_type" ref="account_type_payable"/>
|
||||
</record>
|
||||
|
||||
<!-- Profit and Loss -->
|
||||
|
||||
<record id="gpf" model="account.account">
|
||||
<field name="code">X2</field>
|
||||
<field name="name">Profit and Loss - (test)</field>
|
||||
<field ref="chart0" name="parent_id"/>
|
||||
<field name="type">view</field>
|
||||
<field name="user_type" ref="account_type_root"/>
|
||||
</record>
|
||||
|
||||
<record model="account.account" id="income_view">
|
||||
<field name="name">Income - (test)</field>
|
||||
<field name="code">X20</field>
|
||||
<field name="type">view</field>
|
||||
<field name="user_type" ref="account_type_income"/>
|
||||
<field name="reconcile" eval="False"/>
|
||||
<field name="parent_id" ref="gpf"/>
|
||||
</record>
|
||||
|
||||
<record model="account.account" id="expense_view">
|
||||
<field name="name">Expense - (test)</field>
|
||||
<field name="code">X21</field>
|
||||
<field name="type">view</field>
|
||||
<field name="user_type" ref="account_type_expense"/>
|
||||
<field name="reconcile" eval="False"/>
|
||||
<field name="parent_id" ref="gpf"/>
|
||||
</record>
|
||||
|
||||
<record id="rev" model="account.account">
|
||||
<field name="code">X200</field>
|
||||
<field name="name">Revenue - (test)</field>
|
||||
<field ref="income_view" name="parent_id"/>
|
||||
<field name="type">view</field>
|
||||
<field name="user_type" ref="account_type_income"/>
|
||||
</record>
|
||||
|
||||
<record id="a_sale" model="account.account">
|
||||
<field name="code">X2001</field>
|
||||
<field name="name">Product Sales - (test)</field>
|
||||
<field ref="rev" name="parent_id"/>
|
||||
<field name="type">other</field>
|
||||
<field name="user_type" ref="account_type_income"/>
|
||||
</record>
|
||||
|
||||
<record id="cos" model="account.account">
|
||||
<field name="code">X210</field>
|
||||
<field name="name">Cost of Sales - (test)</field>
|
||||
<field ref="expense_view" name="parent_id"/>
|
||||
<field name="type">view</field>
|
||||
<field name="user_type" ref="account_type_expense"/>
|
||||
</record>
|
||||
|
||||
<record id="cog" model="account.account">
|
||||
<field name="code">X2100</field>
|
||||
<field name="name">Cost of Goods Sold - (test)</field>
|
||||
<field ref="cos" name="parent_id"/>
|
||||
<field name="type">other</field>
|
||||
<field name="user_type" ref="account_type_expense"/>
|
||||
</record>
|
||||
|
||||
<record id="ovr" model="account.account">
|
||||
<field name="code">X211</field>
|
||||
<field name="name">Overheads - (test)</field>
|
||||
<field ref="expense_view" name="parent_id"/>
|
||||
<field name="type">view</field>
|
||||
<field name="user_type" ref="account_type_expense"/>
|
||||
</record>
|
||||
|
||||
<record id="a_expense" model="account.account">
|
||||
<field name="code">X2110</field>
|
||||
<field name="name">Expenses - (test)</field>
|
||||
<field ref="ovr" name="parent_id"/>
|
||||
<field name="type">other</field>
|
||||
<field name="user_type" ref="account_type_expense"/>
|
||||
</record>
|
||||
|
||||
|
||||
<!-- Properties -->
|
||||
<record forcecreate="True" id="property_account_receivable" model="ir.property">
|
||||
<field name="name">property_account_receivable</field>
|
||||
@@ -174,7 +300,7 @@ your own chart of account.
|
||||
-->
|
||||
|
||||
<record id="sales_journal" model="account.journal">
|
||||
<field name="name">x Sales Journal</field>
|
||||
<field name="name">Sales Journal - (test)</field>
|
||||
<field name="code">SAJ</field>
|
||||
<field name="type">sale</field>
|
||||
<field name="view_id" ref="account_sp_journal_view"/>
|
||||
@@ -185,7 +311,7 @@ your own chart of account.
|
||||
<field name="user_id" ref="base.user_root"/>
|
||||
</record>
|
||||
<record id="refund_sales_journal" model="account.journal">
|
||||
<field name="name">x Sales Credit Note Journal</field>
|
||||
<field name="name">Sales Credit Note Journal - (test)</field>
|
||||
<field name="code">SCNJ</field>
|
||||
<field name="type">sale_refund</field>
|
||||
<field name="view_id" ref="account_sp_refund_journal_view"/>
|
||||
@@ -196,7 +322,7 @@ your own chart of account.
|
||||
</record>
|
||||
|
||||
<record id="expenses_journal" model="account.journal">
|
||||
<field name="name">x Expenses Journal</field>
|
||||
<field name="name">Expenses Journal - (test)</field>
|
||||
<field name="code">EXJ</field>
|
||||
<field name="type">purchase</field>
|
||||
<field name="view_id" ref="account_sp_journal_view"/>
|
||||
@@ -207,7 +333,7 @@ your own chart of account.
|
||||
<field name="user_id" ref="base.user_root"/>
|
||||
</record>
|
||||
<record id="refund_expenses_journal" model="account.journal">
|
||||
<field name="name">x Expenses Credit Notes Journal</field>
|
||||
<field name="name">Expenses Credit Notes Journal - (test)</field>
|
||||
<field name="code">ECNJ</field>
|
||||
<field name="type">purchase_refund</field>
|
||||
<field name="view_id" ref="account_sp_refund_journal_view"/>
|
||||
@@ -218,7 +344,7 @@ your own chart of account.
|
||||
</record>
|
||||
|
||||
<record id="bank_journal" model="account.journal">
|
||||
<field name="name">x Bank Journal</field>
|
||||
<field name="name">Bank Journal - (test)</field>
|
||||
<field name="code">BNK</field>
|
||||
<field name="type">cash</field>
|
||||
<field name="view_id" ref="account_journal_bank_view"/>
|
||||
@@ -228,7 +354,7 @@ your own chart of account.
|
||||
<field name="user_id" ref="base.user_root"/>
|
||||
</record>
|
||||
<record id="check_journal" model="account.journal">
|
||||
<field name="name">x Checks Journal</field>
|
||||
<field name="name">Checks Journal - (test)</field>
|
||||
<field name="code">CHK</field>
|
||||
<field name="type">cash</field>
|
||||
<field name="view_id" ref="account_journal_bank_view"/>
|
||||
|
||||
+359
-219
File diff suppressed because it is too large
Load Diff
@@ -402,7 +402,7 @@
|
||||
<blockTable colWidths="62.0,62.0,22.0" style="Table_eclu_Taxes_Total">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9">Net Total:</para>
|
||||
<para style="terp_default_9">Net Total:</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ formatLang(o.amount_untaxed) ]]</para>
|
||||
@@ -418,7 +418,7 @@
|
||||
<blockTable colWidths="63.0,61.0,23.0" style="Table_Taxes_Total">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9">Taxes:</para>
|
||||
<para style="terp_default_9">Taxes:</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ formatLang(o.amount_tax) ]]</para>
|
||||
|
||||
@@ -33,7 +33,7 @@ class account_chart(osv.osv_memory):
|
||||
help = 'Keep empty for all open fiscal years'),
|
||||
'target_move': fields.selection([('all', 'All Entries'),
|
||||
('posted', 'All Posted Entries')], 'Target Moves', required = True),
|
||||
}
|
||||
}
|
||||
|
||||
def _get_fiscalyear(self, cr, uid, context=None):
|
||||
"""Return default Fiscalyear value"""
|
||||
|
||||
@@ -1,36 +1,34 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<record id="view_account_chart" model="ir.ui.view">
|
||||
<record id="view_account_chart" model="ir.ui.view">
|
||||
<field name="name">account.chart.form</field>
|
||||
<field name="model">account.chart</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Account charts">
|
||||
<group colspan="4" >
|
||||
<field name="fiscalyear"/>
|
||||
<label align="0.7" colspan="6" string="(If you do not select Fiscal year it will take all open fiscal years)"/>
|
||||
<field name="target_move"/>
|
||||
<field name="fiscalyear"/>
|
||||
<label align="0.7" colspan="6" string="(If you do not select Fiscal year it will take all open fiscal years)"/>
|
||||
<field name="target_move"/>
|
||||
</group>
|
||||
<separator string="" colspan="4" />
|
||||
<separator string="" colspan="4" />
|
||||
<group colspan="4" col="6">
|
||||
<label string ="" colspan="2"/>
|
||||
<button icon="gtk-cancel" special="cancel" string="Cancel" />
|
||||
<button icon="terp-gtk-go-back-rtl" string="Open Charts"
|
||||
name="account_chart_open_window" type="object" />
|
||||
<label string ="" colspan="2"/>
|
||||
<button icon="gtk-cancel" special="cancel" string="Cancel" />
|
||||
<button icon="terp-gtk-go-back-rtl" string="Open Charts" name="account_chart_open_window" type="object" />
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
</record>
|
||||
|
||||
<record id="action_account_chart" model="ir.actions.act_window">
|
||||
<field name="name">Chart of Accounts</field>
|
||||
<field name="res_model">account.chart</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="view_id" ref="view_account_chart"/>
|
||||
<field name="target">new</field>
|
||||
<field name="view_id" ref="view_account_chart"/>
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
|
||||
<menuitem icon="STOCK_INDENT" action="action_account_chart"
|
||||
|
||||
@@ -7,13 +7,13 @@ msgstr ""
|
||||
"Project-Id-Version: OpenERP Server 5.0.6\n"
|
||||
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
||||
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
|
||||
"PO-Revision-Date: 2010-04-10 04:39+0000\n"
|
||||
"Last-Translator: digitalsatori <Unknown>\n"
|
||||
"PO-Revision-Date: 2010-07-13 03:49+0000\n"
|
||||
"Last-Translator: Black Jack <onetimespeed@hotmail.com>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-06-22 04:10+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-07-13 03:49+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: account_analytic_analysis
|
||||
@@ -21,7 +21,7 @@ msgstr ""
|
||||
msgid ""
|
||||
"Number of hours that can be invoiced plus those that already have been "
|
||||
"invoiced."
|
||||
msgstr "小时数能加在已开的发票上"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_analytic_analysis
|
||||
#: model:ir.model,name:account_analytic_analysis.model_account_analytic_analysis_summary_user
|
||||
@@ -31,12 +31,12 @@ msgstr "用户的小时数合计"
|
||||
#. module: account_analytic_analysis
|
||||
#: field:account.analytic.account,last_invoice_date:0
|
||||
msgid "Last Invoice Date"
|
||||
msgstr "最近开票日期"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_analytic_analysis
|
||||
#: help:account.analytic.account,remaining_ca:0
|
||||
msgid "Computed using the formula: Max Invoice Price - Invoiced Amount."
|
||||
msgstr "计算公式为:最高发票价格 - 发票金额"
|
||||
msgstr "计算公式为:最高发票价格 - 已开票金额"
|
||||
|
||||
#. module: account_analytic_analysis
|
||||
#: help:account.analytic.account,remaining_hours:0
|
||||
@@ -44,25 +44,26 @@ msgid "Computed using the formula: Maximum Quantity - Hours Tot."
|
||||
msgstr "计算公式为:最大数量 - 小时合计"
|
||||
|
||||
#. module: account_analytic_analysis
|
||||
#: model:ir.actions.act_window,name:account_analytic_analysis.action_account_analytic_all
|
||||
#: model:ir.ui.menu,name:account_analytic_analysis.menu_action_account_analytic_all
|
||||
msgid "All Analytic Accounts"
|
||||
msgstr "所有辅助核算项目"
|
||||
msgstr "所有辅助核算项"
|
||||
|
||||
#. module: account_analytic_analysis
|
||||
#: model:ir.actions.act_window,name:account_analytic_analysis.action_account_analytic_managed_open
|
||||
#: model:ir.ui.menu,name:account_analytic_analysis.menu_analytic_account_to_valid_open
|
||||
msgid "My Current Accounts"
|
||||
msgstr "我的当前科目"
|
||||
msgstr "我的当前项"
|
||||
|
||||
#. module: account_analytic_analysis
|
||||
#: constraint:ir.ui.view:0
|
||||
msgid "Invalid XML for View Architecture!"
|
||||
msgstr "描述视图结构的XML文件无效"
|
||||
msgstr "无效XML视图结构!"
|
||||
|
||||
#. module: account_analytic_analysis
|
||||
#: help:account.analytic.account,last_invoice_date:0
|
||||
msgid "Date of the last invoice created for this analytic account."
|
||||
msgstr "这辅助核算项目的最近开票日期"
|
||||
msgstr "这辅助核算项的最近开票日期"
|
||||
|
||||
#. module: account_analytic_analysis
|
||||
#: field:account.analytic.account,ca_theorical:0
|
||||
@@ -83,13 +84,13 @@ msgstr "计算公式:理论收入 - 总费用"
|
||||
#: constraint:ir.model:0
|
||||
msgid ""
|
||||
"The Object name must start with x_ and not contain any special character !"
|
||||
msgstr "对象名必须要以X_开头并且不能含有特殊字符!"
|
||||
msgstr "对象名称必须以“x_”开头且不能包含任何特殊字符!"
|
||||
|
||||
#. module: account_analytic_analysis
|
||||
#: model:ir.actions.act_window,name:account_analytic_analysis.action_account_analytic_new
|
||||
#: model:ir.ui.menu,name:account_analytic_analysis.menu_action_account_analytic_new
|
||||
msgid "New Analytic Account"
|
||||
msgstr "新的分析科目"
|
||||
msgstr "新辅助核算项"
|
||||
|
||||
#. module: account_analytic_analysis
|
||||
#: field:account.analytic.account,theorical_margin:0
|
||||
@@ -105,29 +106,29 @@ msgstr "实际利润(%)"
|
||||
#: model:ir.actions.act_window,name:account_analytic_analysis.action_account_analytic_all_open
|
||||
#: model:ir.ui.menu,name:account_analytic_analysis.menu_action_account_analytic_all_open
|
||||
msgid "Current Analytic Accounts"
|
||||
msgstr "当前分析科目"
|
||||
msgstr "当前辅助核算项"
|
||||
|
||||
#. module: account_analytic_analysis
|
||||
#: help:account.analytic.account,last_worked_date:0
|
||||
msgid "Date of the latest work done on this account."
|
||||
msgstr "这科目的最近的工作完成日期"
|
||||
msgstr "这项的最近的工作完成日期"
|
||||
|
||||
#. module: account_analytic_analysis
|
||||
#: help:account.analytic.account,last_worked_invoiced_date:0
|
||||
msgid ""
|
||||
"If invoice from the costs, this is the date of the latest work or cost that "
|
||||
"have been invoiced."
|
||||
msgstr "如果是成本发票,最近工作或成本的时间已开出的发票"
|
||||
msgstr "如果发票来自费用, 这是最近工作日期或已开票的费用"
|
||||
|
||||
#. module: account_analytic_analysis
|
||||
#: model:ir.ui.menu,name:account_analytic_analysis.menu_invoicing
|
||||
msgid "Invoicing"
|
||||
msgstr "计价折扣"
|
||||
msgstr "开发票"
|
||||
|
||||
#. module: account_analytic_analysis
|
||||
#: field:account.analytic.account,last_worked_date:0
|
||||
msgid "Date of Last Cost/Work"
|
||||
msgstr "最近的成本/工作 日期"
|
||||
msgstr "费用或工作的最近日期"
|
||||
|
||||
#. module: account_analytic_analysis
|
||||
#: field:account.analytic.account,total_cost:0
|
||||
@@ -139,7 +140,7 @@ msgstr "总成本"
|
||||
msgid ""
|
||||
"Number of hours you spent on the analytic account (from timesheet). It "
|
||||
"computes on all journal of type 'general'."
|
||||
msgstr "你的小时数在辅助核算项目(根据时间表).它计算所有普通分类帐."
|
||||
msgstr "在辅助核算项你花费的小时数(根据时间表). 它在所有类型为普通的记录集合里计算."
|
||||
|
||||
#. module: account_analytic_analysis
|
||||
#: field:account.analytic.account,remaining_hours:0
|
||||
@@ -190,8 +191,8 @@ msgid ""
|
||||
"important data for project manager of services companies.\n"
|
||||
"Add menu to show relevant information for each manager."
|
||||
msgstr ""
|
||||
"修改核算到显示服务公司的项目管理主要时间\n"
|
||||
"添加菜单显示每个管理的有关信息"
|
||||
"修改辅助核算项到显示视图, 服务公司项目经理的重要数据\n"
|
||||
"添加菜单显示每个管理者的相关信息"
|
||||
|
||||
#. module: account_analytic_analysis
|
||||
#: field:account.analytic.account,hours_qtt_non_invoiced:0
|
||||
@@ -206,12 +207,12 @@ msgstr "总小时"
|
||||
#. module: account_analytic_analysis
|
||||
#: model:ir.ui.menu,name:account_analytic_analysis.menu_account
|
||||
msgid "Analytic Accounts"
|
||||
msgstr "核算项目"
|
||||
msgstr "辅助核算项"
|
||||
|
||||
#. module: account_analytic_analysis
|
||||
#: model:ir.module.module,shortdesc:account_analytic_analysis.module_meta_information
|
||||
msgid "report_account_analytic"
|
||||
msgstr "核算项目报表"
|
||||
msgstr "辅助核算项报表"
|
||||
|
||||
#. module: account_analytic_analysis
|
||||
#: field:account.analytic.account,ca_invoiced:0
|
||||
@@ -226,7 +227,7 @@ msgstr "财务项目管理"
|
||||
#. module: account_analytic_analysis
|
||||
#: field:account.analytic.account,last_worked_invoiced_date:0
|
||||
msgid "Date of Last Invoiced Cost"
|
||||
msgstr "最近的发票成本日期"
|
||||
msgstr "最近的已发票日期"
|
||||
|
||||
#. module: account_analytic_analysis
|
||||
#: field:account.analytic.account,ca_to_invoice:0
|
||||
@@ -237,7 +238,7 @@ msgstr "未开票金额"
|
||||
#: model:ir.actions.act_window,name:account_analytic_analysis.action_account_analytic_all_pending
|
||||
#: model:ir.ui.menu,name:account_analytic_analysis.menu_action_account_analytic_all_pending
|
||||
msgid "Pending Analytic Accounts"
|
||||
msgstr "未决的辅助核算项目"
|
||||
msgstr "未决的辅助核算项"
|
||||
|
||||
#. module: account_analytic_analysis
|
||||
#: field:account.analytic.account,hours_qtt_invoiced:0
|
||||
|
||||
@@ -428,15 +428,17 @@ class account_voucher_line(osv.osv):
|
||||
'type': lambda *a: 'cr'
|
||||
}
|
||||
|
||||
def onchange_partner(self, cr, uid, ids, partner_id, ttype ,type1):
|
||||
vals = {}
|
||||
def onchange_partner(self, cr, uid, ids, partner_id, ttype ,type1, currency):
|
||||
currency_pool = self.pool.get('res.currency')
|
||||
company = self.pool.get('res.users').browse(cr, uid, uid).company_id
|
||||
|
||||
vals = {
|
||||
'account_id': False,
|
||||
'type': False ,
|
||||
'amount': False
|
||||
}
|
||||
|
||||
if not partner_id:
|
||||
vals.update({
|
||||
'account_id': False,
|
||||
'type': False ,
|
||||
'amount': False
|
||||
})
|
||||
return {
|
||||
'value' : vals
|
||||
}
|
||||
@@ -466,6 +468,9 @@ class account_voucher_line(osv.osv):
|
||||
balance = partner.debit
|
||||
ttype = 'cr'
|
||||
|
||||
if company.currency_id != currency:
|
||||
balance = currency_pool.compute(cr, uid, company.currency_id.id, currency, balance)
|
||||
|
||||
vals.update({
|
||||
'account_id': account_id,
|
||||
'type': ttype,
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
<page string="Journal Entries">
|
||||
<field name="payment_ids" colspan="4" nolabel="1" height="250">
|
||||
<tree string="Voucher Lines" editable="top">
|
||||
<field name="partner_id" on_change="onchange_partner(partner_id,type,parent.type)"/>
|
||||
<field name="partner_id" on_change="onchange_partner(partner_id,type,parent.type, parent.currency_id)"/>
|
||||
<field name="account_id"/>
|
||||
<field name="name"/>
|
||||
<field name="type"/>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<field name="payment_ids" position="replace">
|
||||
<field name="voucher_line_ids" default_get="{'lines': voucher_line_ids}" colspan="4" nolabel="1" height="275">
|
||||
<tree string="Voucher Lines" editable="top">
|
||||
<field name="partner_id" on_change="onchange_partner(partner_id, type, parent.type)"/>
|
||||
<field name="partner_id" on_change="onchange_partner(partner_id,type,parent.type, parent.currency_id)"/>
|
||||
<field name="account_id" on_change="onchange_line_account(account_id, type, parent.type)"/>
|
||||
<field name="name"/>
|
||||
<field name="invoice_id" on_change="onchange_invoice_id(invoice_id, parent.currency_id)" domain="[('partner_id','=',partner_id),('state','=','open'),('residual','>',0.0)]"/>
|
||||
|
||||
@@ -105,8 +105,8 @@ the rule to mark CC(mail to any other person defined in actions)."),
|
||||
'act_mail_to_email': fields.char('Mail to these Emails', size=128, \
|
||||
help="Email-id of the persons whom mail is to be sent"),
|
||||
'act_mail_body': fields.text('Mail body', help="Content of mail"),
|
||||
'regex_name': fields.char('Regex on Resource Name', size=128, help="Regular expression for mathching name of the resource\
|
||||
\ne.g.: urgent.* will search for records having name starting with urgent\
|
||||
'regex_name': fields.char('Regex on Resource Name', size=128, help="Regular expression for matching name of the resource\
|
||||
\ne.g.: 'urgent.*' will search for records having name starting with the string 'urgent'\
|
||||
\nNote: This is case sensitive search."),
|
||||
'server_action_id': fields.many2one('ir.actions.server', 'Server Action', help="Describes the action name.\neg:on which object which action to be taken on basis of which condition"),
|
||||
'filter_id':fields.many2one('ir.filters', 'Filter', required=False),
|
||||
|
||||
@@ -383,7 +383,7 @@ property or property parameter."),
|
||||
'rsvp': True,
|
||||
'cutype': 'individual',
|
||||
}
|
||||
|
||||
|
||||
def copy(self, cr, uid, id, default=None, context=None):
|
||||
raise osv.except_osv(_('Warning!'), _('Can not Duplicate'))
|
||||
|
||||
@@ -419,10 +419,14 @@ property or property parameter."),
|
||||
event.add('location').value = event_obj.location
|
||||
if event_obj.rrule:
|
||||
event.add('rrule').value = event_obj.rrule
|
||||
if event_obj.user_id:
|
||||
if event_obj.user_id or event_obj.organizer_id:
|
||||
event_org = event.add('organizer')
|
||||
event_org.params['CN'] = [event_obj.user_id.name]
|
||||
event_org.value = 'MAILTO:' + (event_obj.user_id.user_email or event_obj.user_id.name)
|
||||
organizer = event_obj.organizer_id
|
||||
if not organizer:
|
||||
organizer = event_obj.user_id
|
||||
event_org.params['CN'] = [organizer.name]
|
||||
event_org.value = 'MAILTO:' + (organizer.user_email or organizer.name)
|
||||
|
||||
if event_obj.alarm_id:
|
||||
# computes alarm data
|
||||
valarm = event.add('valarm')
|
||||
@@ -455,14 +459,14 @@ property or property parameter."),
|
||||
attendee_add.value = 'MAILTO:' + (attendee.email or '')
|
||||
res = cal.serialize()
|
||||
return res
|
||||
|
||||
|
||||
def _send_mail(self, cr, uid, ids, mail_to, email_from=tools.config.get('email_from', False), context=None):
|
||||
"""
|
||||
Send mail for event invitation to event attendees.
|
||||
Send mail for event invitation to event attendees.
|
||||
@param cr: the current row, from the database cursor,
|
||||
@param uid: the current user’s ID for security checks,
|
||||
@param ids: List of attendee’s IDs.
|
||||
@param email_from: Email address for user sending the mail
|
||||
@param email_from: Email address for user sending the mail
|
||||
@param context: A standard dictionary for contextual values
|
||||
@return: True
|
||||
"""
|
||||
@@ -474,7 +478,7 @@ property or property parameter."),
|
||||
sign = att.sent_by_uid and att.sent_by_uid.signature or ''
|
||||
sign = '<br>'.join(sign and sign.split('\n') or [])
|
||||
res_obj = att.ref
|
||||
sub = '[%s Invitation][%d] %s' % (company, att.id, res_obj.name)
|
||||
sub = res_obj.name
|
||||
att_infos = []
|
||||
other_invitaion_ids = self.search(cr, uid, [('ref', '=', res_obj._name + ',' + str(res_obj.id))])
|
||||
for att2 in self.browse(cr, uid, other_invitaion_ids):
|
||||
@@ -495,12 +499,12 @@ property or property parameter."),
|
||||
if mail_to and email_from:
|
||||
attach = self.get_ics_file(cr, uid, res_obj, context=context)
|
||||
tools.email_send(
|
||||
email_from,
|
||||
mail_to,
|
||||
sub,
|
||||
body,
|
||||
attach=attach and [('invitation.ics', attach)] or None,
|
||||
subtype='html',
|
||||
email_from,
|
||||
mail_to,
|
||||
sub,
|
||||
body,
|
||||
attach=attach and [('invitation.ics', attach)] or None,
|
||||
subtype='html',
|
||||
reply_to=email_from
|
||||
)
|
||||
return True
|
||||
@@ -528,31 +532,28 @@ property or property parameter."),
|
||||
@param uid: the current user’s ID for security checks,
|
||||
@param ids: List of calendar attendee’s IDs
|
||||
@param *args: Get Tupple value
|
||||
@param context: A standard dictionary for contextual values
|
||||
@param context: A standard dictionary for contextual values
|
||||
"""
|
||||
return self.write(cr, uid, ids, {'state': 'tentative'}, context)
|
||||
|
||||
def do_accept(self, cr, uid, ids, context=None, *args):
|
||||
"""
|
||||
Update state of invitation as Accepted and
|
||||
Update state of invitation as Accepted and
|
||||
if the invited user is other then event user it will make a copy of this event for invited user
|
||||
@param cr: the current row, from the database cursor,
|
||||
@param uid: the current user’s ID for security checks,
|
||||
@param ids: List of calendar attendee’s IDs.
|
||||
@param context: A standard dictionary for contextual values
|
||||
@param context: A standard dictionary for contextual values
|
||||
@return: True
|
||||
"""
|
||||
if not context:
|
||||
context = {}
|
||||
|
||||
for vals in self.browse(cr, uid, ids, context=context):
|
||||
#user = vals.user_id
|
||||
#if user:
|
||||
# mod_obj = self.pool.get(vals.ref._name)
|
||||
# if vals.ref:
|
||||
# if vals.ref.user_id.id != user.id:
|
||||
# defaults = {'user_id': user.id}
|
||||
# new_event = mod_obj.copy(cr, uid, vals.ref.id, default=defaults, context=context)
|
||||
if vals.ref and vals.ref.user_id:
|
||||
mod_obj = self.pool.get(vals.ref._name)
|
||||
defaults = {'user_id': vals.user_id.id, 'organizer_id': vals.ref.user_id.id}
|
||||
new_event = mod_obj.copy(cr, uid, vals.ref.id, default=defaults, context=context)
|
||||
self.write(cr, uid, vals.id, {'state': 'accepted'}, context)
|
||||
|
||||
return True
|
||||
@@ -565,7 +566,8 @@ property or property parameter."),
|
||||
@param ids: List of calendar attendee’s IDs
|
||||
@param *args: Get Tupple value
|
||||
@param context: A standard dictionary for contextual values """
|
||||
|
||||
if not context:
|
||||
context = {}
|
||||
return self.write(cr, uid, ids, {'state': 'declined'}, context)
|
||||
|
||||
def create(self, cr, uid, vals, context=None):
|
||||
@@ -585,7 +587,6 @@ property or property parameter."),
|
||||
vals['cn'] = vals.get("cn")
|
||||
res = super(calendar_attendee, self).create(cr, uid, vals, context)
|
||||
return res
|
||||
|
||||
calendar_attendee()
|
||||
|
||||
class res_alarm(osv.osv):
|
||||
@@ -654,9 +655,9 @@ true, it will allow you to hide the event alarm information without removing it.
|
||||
alarm_ids = res_alarm_obj.search(cr, uid, domain, context=context)
|
||||
if not alarm_ids:
|
||||
val = {
|
||||
'trigger_duration': duration,
|
||||
'trigger_interval': interval,
|
||||
'trigger_occurs': occurs,
|
||||
'trigger_duration': duration,
|
||||
'trigger_interval': interval,
|
||||
'trigger_occurs': occurs,
|
||||
'trigger_related': related,
|
||||
'name': str(duration) + ' ' + str(interval) + ' ' + str(occurs)
|
||||
}
|
||||
@@ -724,35 +725,35 @@ class calendar_alarm(osv.osv):
|
||||
__attribute__ = {}
|
||||
|
||||
_columns = {
|
||||
'alarm_id': fields.many2one('res.alarm', 'Basic Alarm', ondelete='cascade'),
|
||||
'alarm_id': fields.many2one('res.alarm', 'Basic Alarm', ondelete='cascade'),
|
||||
'name': fields.char('Summary', size=124, help="""Contains the text to be \
|
||||
used as the message subject for email \
|
||||
or contains the text to be used for display"""),
|
||||
or contains the text to be used for display"""),
|
||||
'action': fields.selection([('audio', 'Audio'), ('display', 'Display'), \
|
||||
('procedure', 'Procedure'), ('email', 'Email') ], 'Action', \
|
||||
required=True, help="Defines the action to be invoked when an alarm is triggered"),
|
||||
required=True, help="Defines the action to be invoked when an alarm is triggered"),
|
||||
'description': fields.text('Description', help='Provides a more complete \
|
||||
description of the calendar component, than that \
|
||||
provided by the "SUMMARY" property'),
|
||||
provided by the "SUMMARY" property'),
|
||||
'attendee_ids': fields.many2many('calendar.attendee', 'alarm_attendee_rel', \
|
||||
'alarm_id', 'attendee_id', 'Attendees', readonly=True),
|
||||
'alarm_id', 'attendee_id', 'Attendees', readonly=True),
|
||||
'attach': fields.binary('Attachment', help="""* Points to a sound resource,\
|
||||
which is rendered when the alarm is triggered for audio,
|
||||
* File which is intended to be sent as message attachments for email,
|
||||
* Points to a procedure resource, which is invoked when\
|
||||
the alarm is triggered for procedure."""),
|
||||
'res_id': fields.integer('Resource ID'),
|
||||
'model_id': fields.many2one('ir.model', 'Model'),
|
||||
'user_id': fields.many2one('res.users', 'Owner'),
|
||||
'event_date': fields.datetime('Event Date'),
|
||||
'event_end_date': fields.datetime('Event End Date'),
|
||||
'trigger_date': fields.datetime('Trigger Date', readonly="True"),
|
||||
the alarm is triggered for procedure."""),
|
||||
'res_id': fields.integer('Resource ID'),
|
||||
'model_id': fields.many2one('ir.model', 'Model'),
|
||||
'user_id': fields.many2one('res.users', 'Owner'),
|
||||
'event_date': fields.datetime('Event Date'),
|
||||
'event_end_date': fields.datetime('Event End Date'),
|
||||
'trigger_date': fields.datetime('Trigger Date', readonly="True"),
|
||||
'state':fields.selection([
|
||||
('draft', 'Draft'),
|
||||
('run', 'Run'),
|
||||
('stop', 'Stop'),
|
||||
('done', 'Done'),
|
||||
], 'State', select=True, readonly=True),
|
||||
('draft', 'Draft'),
|
||||
('run', 'Run'),
|
||||
('stop', 'Stop'),
|
||||
('done', 'Done'),
|
||||
], 'State', select=True, readonly=True),
|
||||
}
|
||||
|
||||
_defaults = {
|
||||
@@ -801,7 +802,7 @@ class calendar_alarm(osv.osv):
|
||||
current_datetime = datetime.now()
|
||||
request_obj = self.pool.get('res.request')
|
||||
alarm_ids = self.search(cr, uid, [('state', '!=', 'done')], context=context)
|
||||
|
||||
|
||||
mail_to = []
|
||||
|
||||
for alarm in self.browse(cr, uid, alarm_ids, context=context):
|
||||
@@ -916,10 +917,10 @@ class calendar_event(osv.osv):
|
||||
return {}
|
||||
event = self.browse(cr, uid, ids, context=context)[0]
|
||||
value = {
|
||||
'duration': 24
|
||||
'duration': 24
|
||||
}
|
||||
return {'value': value}
|
||||
|
||||
|
||||
def onchange_dates(self, cr, uid, ids, start_date, duration=False, end_date=False, allday=False, context=None):
|
||||
"""Returns duration and/or end date based on values passed
|
||||
@param self: The object pointer
|
||||
@@ -1082,11 +1083,11 @@ class calendar_event(osv.osv):
|
||||
'duration': fields.float('Duration', states={'done': [('readonly', True)]}),
|
||||
'description': fields.text('Description', states={'done': [('readonly', True)]}),
|
||||
'class': fields.selection([('public', 'Public'), ('private', 'Private'), \
|
||||
('confidential', 'Confidential')], 'Mark as', states={'done': [('readonly', True)]}),
|
||||
'location': fields.char('Location', size=264, help="Location of Event", states={'done': [('readonly', True)]}),
|
||||
('confidential', 'Confidential')], 'Mark as', states={'done': [('readonly', True)]}),
|
||||
'location': fields.char('Location', size=264, help="Location of Event", states={'done': [('readonly', True)]}),
|
||||
'show_as': fields.selection([('free', 'Free'), ('busy', 'Busy')], \
|
||||
'Show as', states={'done': [('readonly', True)]}),
|
||||
'base_calendar_url': fields.char('Caldav URL', size=264),
|
||||
'base_calendar_url': fields.char('Caldav URL', size=264),
|
||||
'state': fields.selection([('tentative', 'Tentative'),
|
||||
('confirmed', 'Confirmed'),
|
||||
('cancelled', 'Cancelled')], 'State', readonly=True),
|
||||
@@ -1110,6 +1111,7 @@ e.g.: Every other month on the last Sunday of the month for 10 occurrences:\
|
||||
'vtimezone': fields.related('user_id', 'context_tz', type='char', size=24, \
|
||||
string='Timezone', store=True),
|
||||
'user_id': fields.many2one('res.users', 'Responsible', states={'done': [('readonly', True)]}),
|
||||
'organizer_id': fields.many2one('res.users', 'Organizer', states={'done': [('readonly', True)]}),
|
||||
'freq': fields.selection([('None', 'No Repeat'), \
|
||||
('secondly', 'Secondly'), \
|
||||
('minutely', 'Minutely'), \
|
||||
@@ -1136,25 +1138,27 @@ e.g.: Every other month on the last Sunday of the month for 10 occurrences:\
|
||||
('SU', 'Sunday')], 'Weekday'),
|
||||
'byday': fields.selection([('1', 'First'), ('2', 'Second'), \
|
||||
('3', 'Third'), ('4', 'Fourth'), \
|
||||
('5', 'Fifth'), ('-1', 'Last')], 'By day'),
|
||||
'month_list': fields.selection(months.items(), 'Month'),
|
||||
'end_date': fields.date('Repeat Until'),
|
||||
('5', 'Fifth'), ('-1', 'Last')], 'By day'),
|
||||
'month_list': fields.selection(months.items(), 'Month'),
|
||||
'end_date': fields.date('Repeat Until'),
|
||||
'attendee_ids': fields.many2many('calendar.attendee', 'event_attendee_rel', \
|
||||
'event_id', 'attendee_id', 'Attendees'),
|
||||
'allday': fields.boolean('All Day', states={'done': [('readonly', True)]}),
|
||||
'event_id', 'attendee_id', 'Attendees'),
|
||||
'allday': fields.boolean('All Day', states={'done': [('readonly', True)]}),
|
||||
'active': fields.boolean('Active', help="If the active field is set to \
|
||||
true, it will allow you to hide the event alarm information without removing it.")
|
||||
}
|
||||
|
||||
_defaults = {
|
||||
'state': 'tentative',
|
||||
'state': 'tentative',
|
||||
'class': 'public',
|
||||
'show_as': 'busy',
|
||||
'freq': 'None',
|
||||
'select1': 'date',
|
||||
'interval': 1,
|
||||
'active': 1,
|
||||
}
|
||||
'user_id': lambda self, cr, uid, ctx: uid,
|
||||
'organizer_id': lambda self, cr, uid, ctx: uid,
|
||||
}
|
||||
|
||||
def open_event(self, cr, uid, ids, context=None):
|
||||
"""
|
||||
@@ -1183,26 +1187,26 @@ true, it will allow you to hide the event alarm information without removing it.
|
||||
id4 = data_obj.browse(cr, uid, id4, context=context).res_id
|
||||
for id in ids:
|
||||
value = {
|
||||
'name': _('Event'),
|
||||
'view_type': 'form',
|
||||
'view_mode': 'form,tree',
|
||||
'res_model': 'calendar.event',
|
||||
'view_id': False,
|
||||
'views': [(id2, 'form'), (id3, 'tree'), (id4, 'calendar')],
|
||||
'type': 'ir.actions.act_window',
|
||||
'res_id': base_calendar_id2real_id(id),
|
||||
'name': _('Event'),
|
||||
'view_type': 'form',
|
||||
'view_mode': 'form,tree',
|
||||
'res_model': 'calendar.event',
|
||||
'view_id': False,
|
||||
'views': [(id2, 'form'), (id3, 'tree'), (id4, 'calendar')],
|
||||
'type': 'ir.actions.act_window',
|
||||
'res_id': base_calendar_id2real_id(id),
|
||||
'nodestroy': True
|
||||
}
|
||||
|
||||
return value
|
||||
|
||||
def modify_this(self, cr, uid, event_id, defaults, real_date, context=None, *args):
|
||||
"""Modifies only one event record out of virtual recurrent events
|
||||
"""Modifies only one event record out of virtual recurrent events
|
||||
and creates new event as a specific instance of a Recurring Event",
|
||||
@param self: The object pointer
|
||||
@param cr: the current row, from the database cursor,
|
||||
@param uid: the current user’s ID for security checks,
|
||||
@param event_id: Id of Recurring Event
|
||||
@param event_id: Id of Recurring Event
|
||||
@param real_date: Date of event recurrence that is being modified
|
||||
@param context: A standard dictionary for contextual values
|
||||
@param *args: Get Tupple Value
|
||||
@@ -1225,7 +1229,7 @@ true, it will allow you to hide the event alarm information without removing it.
|
||||
|
||||
def modify_all(self, cr, uid, event_ids, defaults, context=None, *args):
|
||||
"""
|
||||
Modifies the recurring event
|
||||
Modifies the recurring event
|
||||
@param cr: the current row, from the database cursor,
|
||||
@param uid: the current user’s ID for security checks,
|
||||
@param event_ids: List of crm meeting’s IDs.
|
||||
@@ -1252,7 +1256,7 @@ true, it will allow you to hide the event alarm information without removing it.
|
||||
|
||||
def get_recurrent_ids(self, cr, uid, select, base_start_date, base_until_date, limit=100):
|
||||
"""Gives virtual event ids for recurring events based on value of Recurrence Rule
|
||||
This method gives ids of dates that comes between start date and end date of calendar views
|
||||
This method gives ids of dates that comes between start date and end date of calendar views
|
||||
@param self: The object pointer
|
||||
@param cr: the current row, from the database cursor,
|
||||
@param uid: the current user’s ID for security checks,
|
||||
@@ -1418,8 +1422,7 @@ true, it will allow you to hide the event alarm information without removing it.
|
||||
until_date = arg[2]
|
||||
res = super(calendar_event, self).search(cr, uid, args_without_date, \
|
||||
offset, limit, order, context, count)
|
||||
#Search Event ID which are invitted
|
||||
|
||||
|
||||
return self.get_recurrent_ids(cr, uid, res, start_date, until_date, limit)
|
||||
|
||||
|
||||
@@ -1558,7 +1561,7 @@ true, it will allow you to hide the event alarm information without removing it.
|
||||
event_id = [int(event_id)]
|
||||
for record in self.read(cr, uid, event_id, ['date', 'rrule', 'exdate']):
|
||||
if record['rrule']:
|
||||
# Remove one of the recurrent event
|
||||
# Remove one of the recurrent event
|
||||
date_new = time.strftime("%Y-%m-%d %H:%M:%S", \
|
||||
time.strptime(date_new, "%Y%m%d%H%M%S"))
|
||||
exdate = (record['exdate'] and (record['exdate'] + ',') or '') + ''.join((re.compile('\d')).findall(date_new)) + 'Z'
|
||||
@@ -1584,7 +1587,7 @@ true, it will allow you to hide the event alarm information without removing it.
|
||||
alarm_obj = self.pool.get('res.alarm')
|
||||
alarm_obj.do_alarm_create(cr, uid, [res], self._name, 'date', context=context)
|
||||
return res
|
||||
|
||||
|
||||
def do_tentative(self, cr, uid, ids, context=None, *args):
|
||||
""" Makes event invitation as Tentative
|
||||
@param self: The object pointer
|
||||
@@ -1592,10 +1595,10 @@ true, it will allow you to hide the event alarm information without removing it.
|
||||
@param uid: the current user’s ID for security checks,
|
||||
@param ids: List of Event IDs
|
||||
@param *args: Get Tupple value
|
||||
@param context: A standard dictionary for contextual values
|
||||
@param context: A standard dictionary for contextual values
|
||||
"""
|
||||
return self.write(cr, uid, ids, {'state': 'tentative'}, context)
|
||||
|
||||
|
||||
def do_cancel(self, cr, uid, ids, context=None, *args):
|
||||
""" Makes event invitation as Tentative
|
||||
@param self: The object pointer
|
||||
@@ -1603,7 +1606,7 @@ true, it will allow you to hide the event alarm information without removing it.
|
||||
@param uid: the current user’s ID for security checks,
|
||||
@param ids: List of Event IDs
|
||||
@param *args: Get Tupple value
|
||||
@param context: A standard dictionary for contextual values
|
||||
@param context: A standard dictionary for contextual values
|
||||
"""
|
||||
return self.write(cr, uid, ids, {'state': 'cancelled'}, context)
|
||||
|
||||
@@ -1614,7 +1617,7 @@ true, it will allow you to hide the event alarm information without removing it.
|
||||
@param uid: the current user’s ID for security checks,
|
||||
@param ids: List of Event IDs
|
||||
@param *args: Get Tupple value
|
||||
@param context: A standard dictionary for contextual values
|
||||
@param context: A standard dictionary for contextual values
|
||||
"""
|
||||
return self.write(cr, uid, ids, {'state': 'confirmed'}, context)
|
||||
|
||||
@@ -1758,9 +1761,9 @@ class ir_model(osv.osv):
|
||||
|
||||
_inherit = 'ir.model'
|
||||
|
||||
def read(self, cr, uid, ids, fields=None, context=None,
|
||||
def read(self, cr, uid, ids, fields=None, context=None,
|
||||
load='_classic_read'):
|
||||
"""
|
||||
"""
|
||||
Overrides orm read method.
|
||||
@param self: The object pointer
|
||||
@param cr: the current row, from the database cursor,
|
||||
@@ -1807,7 +1810,7 @@ class res_users(osv.osv):
|
||||
_inherit = 'res.users'
|
||||
|
||||
def _get_user_avail(self, cr, uid, ids, context=None):
|
||||
"""
|
||||
"""
|
||||
Get User Availability
|
||||
@param self: The object pointer
|
||||
@param cr: the current row, from the database cursor,
|
||||
@@ -1838,7 +1841,7 @@ class res_users(osv.osv):
|
||||
return res
|
||||
|
||||
def _get_user_avail_fun(self, cr, uid, ids, name, args, context=None):
|
||||
"""
|
||||
"""
|
||||
Get User Availability Function
|
||||
@param self: The object pointer
|
||||
@param cr: the current row, from the database cursor,
|
||||
|
||||
@@ -180,7 +180,6 @@
|
||||
<form string="Contacts">
|
||||
<group colspan="4" col="4">
|
||||
<field name="sequence_partner"/>
|
||||
<field name="name"/>
|
||||
<field name="contact_id"/>
|
||||
<field name="function"/>
|
||||
</group>
|
||||
|
||||
@@ -36,11 +36,11 @@
|
||||
<field name="currency" widget="selection"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group colspan="2" groups="base.group_extended">
|
||||
<separator string="Report Information" colspan="4"/>
|
||||
<field name="rml_header1" colspan="5"/>
|
||||
<field name="rml_footer1" colspan="5"/>
|
||||
<field name="rml_footer2" colspan="5"/>
|
||||
<group colspan="2" groups="base.group_extended" >
|
||||
<!-- <separator string="Report Information" colspan="4" />-->
|
||||
<field name="rml_header1" colspan="5" invisible="1"/>
|
||||
<field name="rml_footer1" colspan="5" invisible="1"/>
|
||||
<field name="rml_footer2" colspan="5" invisible="1"/>
|
||||
|
||||
<separator colspan="4"
|
||||
string="Your Logo - Use a size of about 450x150 pixels."/>
|
||||
|
||||
@@ -88,7 +88,7 @@ class base_setup_company(osv.osv_memory):
|
||||
'city':fields.char('City', size=128),
|
||||
'state_id':fields.selection(_get_all_states, 'State'),
|
||||
'country_id':fields.selection(_get_all_countries, 'Country'),
|
||||
'email':fields.char('E-mail', size=64),
|
||||
'email':fields.char('E-mail', size=64, required=True),
|
||||
'phone':fields.char('Phone', size=64),
|
||||
'currency':fields.many2one('res.currency', 'Currency', required=True),
|
||||
'rml_header1':fields.char('Report Header', size=200,
|
||||
@@ -154,7 +154,7 @@ base_setup_company()
|
||||
|
||||
class res_currency(osv.osv):
|
||||
_inherit = 'res.currency'
|
||||
|
||||
|
||||
def name_get(self, cr, uid, ids, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
@@ -168,7 +168,7 @@ class res_currency(osv.osv):
|
||||
ids = [ids]
|
||||
reads = self.read(cr, uid, ids, ['name','code'], context, load='_classic_write')
|
||||
return [(x['id'], tools.ustr(x['name']) + ' (' + tools.ustr(x['code']) + ')') for x in reads]
|
||||
|
||||
|
||||
res_currency()
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0"?>
|
||||
<openerp>
|
||||
<data noupdate="1">
|
||||
|
||||
|
||||
<record model="document.directory" id="document.dir_calendars">
|
||||
<field name="name">Calendars</field>
|
||||
<field name="calendar_collection">True</field>
|
||||
@@ -14,6 +14,11 @@
|
||||
<field name="type">vevent</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_event_organizer">
|
||||
<field name="name">organizer</field>
|
||||
<field name="type">vevent</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_event_uid">
|
||||
<field name="name">uid</field>
|
||||
<field name="type">vevent</field>
|
||||
@@ -58,12 +63,12 @@
|
||||
<field name="name">valarm</field>
|
||||
<field name="type">vevent</field>
|
||||
</record>
|
||||
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_event_vtimezone">
|
||||
<field name="name">vtimezone</field>
|
||||
<field name="type">vevent</field>
|
||||
</record>
|
||||
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_event_priority">
|
||||
<field name="name">priority</field>
|
||||
<field name="type">vevent</field>
|
||||
@@ -181,12 +186,12 @@
|
||||
<field name="name">seq</field>
|
||||
<field name="type">vtodo</field>
|
||||
</record>
|
||||
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_todo_vtimezone">
|
||||
<field name="name">vtimezone</field>
|
||||
<field name="type">vtodo</field>
|
||||
</record>
|
||||
|
||||
|
||||
<record model="basic.calendar.attributes" id="field_todo_url">
|
||||
<field name="name">url</field>
|
||||
<field name="type">vtodo</field>
|
||||
|
||||
+33
-20
@@ -228,6 +228,8 @@ class CalDAV(object):
|
||||
|
||||
att_data = []
|
||||
for cal_data in child.getChildren():
|
||||
if cal_data.name.lower() == 'organizer':
|
||||
self.ical_set(cal_data.name.lower(), {'name':cal_data.params['CN']}, 'value')
|
||||
if cal_data.name.lower() == 'attendee':
|
||||
ctx = context.copy()
|
||||
if cal_children:
|
||||
@@ -266,7 +268,7 @@ class CalDAV(object):
|
||||
if not datas:
|
||||
return
|
||||
timezones = []
|
||||
for data in datas:
|
||||
for data in datas:
|
||||
tzval = None
|
||||
vevent = ical.add(name)
|
||||
for field in self.__attribute__.keys():
|
||||
@@ -307,6 +309,13 @@ class CalDAV(object):
|
||||
ical = tz_obj.export_cal(cr, uid, None, \
|
||||
data[map_field], ical, context=context)
|
||||
timezones.append(data[map_field])
|
||||
elif field == 'organizer' and data[map_field]:
|
||||
event_org = vevent.add('organizer')
|
||||
organizer_id = data[map_field][0]
|
||||
user_obj = self.pool.get('res.users')
|
||||
organizer = user_obj.browse(cr, uid, organizer_id, context=context)
|
||||
event_org.params['CN'] = [organizer.name]
|
||||
event_org.value = 'MAILTO:' + (organizer.user_email or organizer.name)
|
||||
elif data[map_field]:
|
||||
if map_type in ("char", "text"):
|
||||
if field in ('exdate'):
|
||||
@@ -414,7 +423,7 @@ class CalDAV(object):
|
||||
return res
|
||||
|
||||
class Calendar(CalDAV, osv.osv):
|
||||
_name = 'basic.calendar'
|
||||
_name = 'basic.calendar'
|
||||
_calname = 'calendar'
|
||||
|
||||
__attribute__ = {
|
||||
@@ -431,13 +440,13 @@ class Calendar(CalDAV, osv.osv):
|
||||
'vtimezone': None, # Use: O-n, Type: Collection of Timezone class
|
||||
}
|
||||
_columns = {
|
||||
'name': fields.char("Name", size=64),
|
||||
'name': fields.char("Name", size=64),
|
||||
'user_id': fields.many2one('res.users', 'Owner'),
|
||||
'collection_id': fields.many2one('document.directory', 'Collection', \
|
||||
required=True),
|
||||
'type': fields.selection([('vevent', 'Event'), ('vtodo', 'TODO')], \
|
||||
string="Type", size=64),
|
||||
'line_ids': fields.one2many('basic.calendar.lines', 'calendar_id', 'Calendar Lines'),
|
||||
'line_ids': fields.one2many('basic.calendar.lines', 'calendar_id', 'Calendar Lines'),
|
||||
'create_date': fields.datetime('Created Date'),
|
||||
'write_date': fields.datetime('Modifided Date'),
|
||||
}
|
||||
@@ -448,8 +457,8 @@ class Calendar(CalDAV, osv.osv):
|
||||
if not domain:
|
||||
domain = []
|
||||
res = []
|
||||
ctx_res_id = context.get('res_id', None)
|
||||
ctx_model = context.get('model', None)
|
||||
ctx_res_id = context.get('res_id', None)
|
||||
ctx_model = context.get('model', None)
|
||||
for cal in self.browse(cr, uid, ids):
|
||||
for line in cal.line_ids:
|
||||
if ctx_model and ctx_model != line.object_id.model:
|
||||
@@ -458,13 +467,13 @@ class Calendar(CalDAV, osv.osv):
|
||||
continue
|
||||
line_domain = eval(line.domain)
|
||||
line_domain += domain
|
||||
if ctx_res_id:
|
||||
if ctx_res_id:
|
||||
line_domain += [('id','=',ctx_res_id)]
|
||||
mod_obj = self.pool.get(line.object_id.model)
|
||||
data_ids = mod_obj.search(cr, uid, line_domain, context=context)
|
||||
data_ids = mod_obj.search(cr, uid, line_domain, context=context)
|
||||
for data in mod_obj.browse(cr, uid, data_ids, context):
|
||||
ctx = parent and parent.context or None
|
||||
node = res_node_calendar('%s' %data.id, parent, ctx, data, line.object_id.model, data.id)
|
||||
node = res_node_calendar('%s' %data.id, parent, ctx, data, line.object_id.model, data.id)
|
||||
res.append(node)
|
||||
return res
|
||||
|
||||
@@ -478,8 +487,8 @@ class Calendar(CalDAV, osv.osv):
|
||||
"""
|
||||
if not context:
|
||||
context = {}
|
||||
ctx_model = context.get('model', None)
|
||||
ctx_res_id = context.get('res_id', None)
|
||||
ctx_model = context.get('model', None)
|
||||
ctx_res_id = context.get('res_id', None)
|
||||
ical = vobject.iCalendar()
|
||||
for cal in self.browse(cr, uid, ids):
|
||||
for line in cal.line_ids:
|
||||
@@ -488,7 +497,7 @@ class Calendar(CalDAV, osv.osv):
|
||||
if line.name in ('valarm', 'attendee'):
|
||||
continue
|
||||
domain = eval(line.domain)
|
||||
if ctx_res_id:
|
||||
if ctx_res_id:
|
||||
domain += [('id','=',ctx_res_id)]
|
||||
mod_obj = self.pool.get(line.object_id.model)
|
||||
data_ids = mod_obj.search(cr, uid, domain, context=context)
|
||||
@@ -496,7 +505,7 @@ class Calendar(CalDAV, osv.osv):
|
||||
context.update({'model': line.object_id.model,
|
||||
'calendar_id': cal.id
|
||||
})
|
||||
self.__attribute__ = get_attribute_mapping(cr, uid, line.name, context)
|
||||
self.__attribute__ = get_attribute_mapping(cr, uid, line.name, context)
|
||||
self.create_ics(cr, uid, datas, line.name, ical, context=context)
|
||||
return ical.serialize()
|
||||
|
||||
@@ -511,16 +520,18 @@ class Calendar(CalDAV, osv.osv):
|
||||
|
||||
if not context:
|
||||
context = {}
|
||||
vals = []
|
||||
vals = []
|
||||
ical_data = base64.decodestring(content)
|
||||
parsedCal = vobject.readOne(ical_data)
|
||||
if not data_id:
|
||||
data_id = self.search(cr, uid, [])[0]
|
||||
data_id = self.search(cr, uid, [])[0]
|
||||
cal = self.browse(cr, uid, data_id, context=context)
|
||||
cal_children = {}
|
||||
count = 0
|
||||
for line in cal.line_ids:
|
||||
cal_children[line.name] = line.object_id.model
|
||||
objs = []
|
||||
checked = True
|
||||
for child in parsedCal.getChildren():
|
||||
if child.name.lower() in cal_children:
|
||||
context.update({'model': cal_children[child.name.lower()],
|
||||
@@ -528,12 +539,14 @@ class Calendar(CalDAV, osv.osv):
|
||||
})
|
||||
self.__attribute__ = get_attribute_mapping(cr, uid, child.name.lower(), context=context)
|
||||
val = self.parse_ics(cr, uid, child, cal_children=cal_children, context=context)
|
||||
val.update({'user_id': uid})
|
||||
vals.append(val)
|
||||
obj = self.pool.get(cal_children[child.name.lower()])
|
||||
if hasattr(obj, 'check_import'):
|
||||
obj.check_import(cr, uid, vals, context=context)
|
||||
else:
|
||||
objs.append(cal_children[child.name.lower()])
|
||||
for obj_name in list(set(objs)):
|
||||
obj = self.pool.get(obj_name)
|
||||
if hasattr(obj, 'check_import'):
|
||||
obj.check_import(cr, uid, vals, context=context)
|
||||
checked = True
|
||||
if not checked:
|
||||
self.check_import(cr, uid, vals, context=context)
|
||||
return {}
|
||||
Calendar()
|
||||
|
||||
@@ -29,21 +29,69 @@
|
||||
</graph>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="crm_case_my_open_oppor">
|
||||
<field name="name">My Open Opportunities</field>
|
||||
<field name="model">crm.lead</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Opportunities" colors="blue:state=='pending';grey:state in ('cancel', 'done');red:date_deadline and (date_deadline < current_date)">
|
||||
<field name="name" string="Opportunity"/>
|
||||
<field name="partner_id"/>
|
||||
<field name="stage_id"/>
|
||||
<button name="stage_previous" string="Previous Stage"
|
||||
states="open,pending" type="object" icon="gtk-go-back" />
|
||||
<button name="stage_next" string="Next Stage"
|
||||
states="open,pending" type="object"
|
||||
icon="gtk-go-forward" />
|
||||
<field name="planned_revenue" sum="Total of Planned Revenue"/>
|
||||
<field name="probability" widget="progressbar" avg="Avg. of Probability"/>
|
||||
<field name="date_deadline" invisible="1"/>
|
||||
<field name="state"/>
|
||||
<button name="case_open" string="Open"
|
||||
states="draft,pending" type="object"
|
||||
icon="gtk-go-forward" />
|
||||
<button name="case_pending" string="Pending"
|
||||
states="open,draft" type="object"
|
||||
icon="gtk-media-pause" />
|
||||
<button name="case_mark_lost" string="Lost"
|
||||
states="open,pending" type="object"
|
||||
icon="gtk-cancel" />
|
||||
<button name="case_close" string="Won"
|
||||
states="open,draft,pending" type="object"
|
||||
icon="gtk-apply" />
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.actions.act_window" id="act_my_oppor">
|
||||
<field name="name">My Open Opportunities</field>
|
||||
<field name="res_model">crm.lead</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="view_id" ref="crm.crm_case_tree_view_oppor"/>
|
||||
<field name="domain">[('user_id','=',uid),('state','=','open'), ('type', '=', 'opportunity')]</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.actions.act_window.view" id="act_my_oppor_tree_view">
|
||||
<field name="sequence" eval="1"/>
|
||||
<field name="view_mode">tree</field>
|
||||
<field name="view_id" ref="crm_case_my_open_oppor"/>
|
||||
<field name="act_window_id" ref="act_my_oppor"/>
|
||||
</record>
|
||||
|
||||
<record model="ir.actions.act_window.view" id="act_my_oppor_form_view">
|
||||
<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="act_my_oppor"/>
|
||||
</record>
|
||||
|
||||
<record model="ir.actions.act_window" id="act_my_meetings">
|
||||
<field name="res_model">crm.meeting</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="view_id" ref="crm.crm_case_tree_view_meet"/>
|
||||
<field name="domain">[('user_id','=',uid),('state','!=','cancel'),('date','ilike',time.strftime("%Y-%m"))]</field>
|
||||
<field name="domain">[('user_id','=',uid),('state','not in',('cancel','done'))]</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.actions.act_window" id="act_my_oppor_stage">
|
||||
@@ -59,7 +107,7 @@
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">graph,tree,form</field>
|
||||
<field name="view_id" ref="view_crm_opportunity_user_graph1"/>
|
||||
<field name="domain">['&', ('state', '=', 'done') , '&', ('create_date','>',(datetime.date.today()-datetime.timedelta(days=365)).strftime('%Y-%m-%d')), ('type', '=', 'opportunity')]</field>
|
||||
<field name="domain">['&', ('user_id', '=', uid),'&', ('state', '=', 'done') , '&', ('create_date','>',(datetime.date.today()-datetime.timedelta(days=365)).strftime('%Y-%m-%d')), ('type', '=', 'opportunity')]</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="board_crm_form">
|
||||
@@ -84,11 +132,11 @@
|
||||
</child1>
|
||||
<child2>
|
||||
<action
|
||||
string="Planned Revenues by Stage"
|
||||
string="My Planned Revenues by Stage"
|
||||
name="%(act_my_oppor_stage)d"
|
||||
colspan="4"/>
|
||||
<action
|
||||
string="Win/Lost Ratio for the Last Year"
|
||||
string="My Win/Lost Ratio for the Last Year"
|
||||
name="%(act_sales_pipeline)d"
|
||||
colspan="4"/>
|
||||
</child2>
|
||||
|
||||
+9
-5
@@ -124,7 +124,7 @@ class crm_case(object):
|
||||
stage_pool = self.pool.get('crm.case.stage')
|
||||
for case in self.browse(cr, uid, ids, context):
|
||||
if section in s:
|
||||
st = case.stage_id.id or False
|
||||
st = not context.get('force_domain', False) and case.stage_id.id or False
|
||||
if st in s[section]:
|
||||
data = {'stage_id': s[section][st]}
|
||||
stage = s[section][st]
|
||||
@@ -141,8 +141,12 @@ class crm_case(object):
|
||||
if not context:
|
||||
context = {}
|
||||
stage_obj = self.pool.get('crm.case.stage')
|
||||
sid = stage_obj.search(cr, uid, \
|
||||
[('object_id.model', '=', self._name)], context=context)
|
||||
tmp = self.read(cr, uid, ids, ['section_id'], context)[0]['section_id']
|
||||
section_id = tmp and tmp[0] or False
|
||||
domain = [('object_id.model', '=', self._name), ('section_id', '=', section_id)]
|
||||
if 'force_domain' in context and context['force_domain']:
|
||||
domain += context['force_domain']
|
||||
sid = stage_obj.search(cr, uid, domain, context=context)
|
||||
s = {}
|
||||
previous = {}
|
||||
section = self._name
|
||||
@@ -168,7 +172,7 @@ class crm_case(object):
|
||||
stage_pool = self.pool.get('crm.case.stage')
|
||||
for case in self.browse(cr, uid, ids, context):
|
||||
if section in s:
|
||||
st = case.stage_id.id or False
|
||||
st = not context.get('force_domain', False) and case.stage_id.id or False
|
||||
s[section] = dict([(v, k) for (k, v) in s[section].iteritems()])
|
||||
if st in s[section]:
|
||||
data = {'stage_id': s[section][st]}
|
||||
@@ -440,7 +444,7 @@ class crm_case_section(osv.osv):
|
||||
'active': fields.boolean('Active', help="If the active field is set to \
|
||||
true, it will allow you to hide the sales team without removing it."),
|
||||
'allow_unlink': fields.boolean('Allow Delete', help="Allows to delete non draft cases"),
|
||||
'change_responsible': fields.boolean('Change Responsible', help="Set responsible of this Sales team on escalation to this team"),
|
||||
'change_responsible': fields.boolean('Change Responsible', help="Thick this box if you want that on escalation, the responsible of this sale team automatically becomes responsible of the lead/opportunity escaladed"),
|
||||
'user_id': fields.many2one('res.users', 'Responsible User'),
|
||||
'member_ids':fields.many2many('res.users', 'sale_member_rel', 'section_id', 'member_id', 'Team Members'),
|
||||
'reply_to': fields.char('Reply-To', size=64, help="The email address put \
|
||||
|
||||
+10
-10
@@ -30,19 +30,19 @@ import tools
|
||||
class crm_installer(osv.osv_memory):
|
||||
_name = 'crm.installer'
|
||||
_inherit = 'res.config.installer'
|
||||
|
||||
|
||||
_columns = {
|
||||
'name': fields.char('Name', size=64),
|
||||
'crm_helpdesk': fields.boolean('Helpdesk', help="Manages an Helpdesk service."),
|
||||
'crm_fundraising': fields.boolean('Fundraising', help="This may help associations in their fund raising process and tracking."),
|
||||
'crm_claim': fields.boolean('Claims', help="Manages the supplier and customers claims, including your corrective or preventive actions."),
|
||||
'crm_caldav': fields.boolean('Calendar Synchronizing', help="Help you to synchronize the meetings with other calender clients(e.g.: Sunbird)."),
|
||||
'sale_crm': fields.boolean('Create Quotation from Opportunity', help="This module relates sale to opportunity cases in the CRM."),
|
||||
'name': fields.char('Name', size=64),
|
||||
'crm_helpdesk': fields.boolean('Helpdesk', help="Manages an Helpdesk service."),
|
||||
'crm_fundraising': fields.boolean('Fundraising', help="This may help associations in their fund raising process and tracking."),
|
||||
'crm_claim': fields.boolean('Claims', help="Manages the supplier and customers claims, including your corrective or preventive actions."),
|
||||
'crm_caldav': fields.boolean('Calendar Synchronizing', help="Help you to synchronize the meetings with other calender clients(e.g.: Sunbird)."),
|
||||
'sale_crm': fields.boolean('Opportunity to Quotation', help="This module relates sale to opportunity cases in the CRM."),
|
||||
'fetchmail': fields.boolean('Fetch Emails', help="Fetchmail Server."),
|
||||
'thunderbird': fields.boolean('Thunderbird', help="Thunderbird Interface."),
|
||||
'wiki_sale_faq': fields.boolean('Sale FAQ', help="Sale FAQ."),
|
||||
'thunderbird': fields.boolean('Thunderbird', help="Thunderbird Interface."),
|
||||
'wiki_sale_faq': fields.boolean('Sale FAQ', help="Sale FAQ."),
|
||||
}
|
||||
|
||||
|
||||
def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False, submenu=False):
|
||||
res = super(crm_installer, self).fields_view_get(cr, uid, view_id=view_id, view_type=view_type, context=context, toolbar=toolbar,submenu=False)
|
||||
#Checking sale module is installed or not
|
||||
|
||||
+12
-6
@@ -139,9 +139,7 @@ and users"),
|
||||
],'Type', help="Type is used to separate Leads and Opportunities"),
|
||||
'priority': fields.selection(crm.AVAILABLE_PRIORITIES, 'Priority'),
|
||||
'date_closed': fields.datetime('Closed', readonly=True),
|
||||
'stage_id': fields.many2one('crm.case.stage', 'Stage', \
|
||||
domain="[('section_id','=',section_id),\
|
||||
('object_id.model', '=', 'crm.lead')]"),
|
||||
'stage_id': fields.many2one('crm.case.stage', 'Stage'),
|
||||
'user_id': fields.many2one('res.users', 'Salesman',help='By Default Salesman is Administrator when create New User'),
|
||||
'referred': fields.char('Referred By', size=64),
|
||||
'date_open': fields.datetime('Opened', readonly=True),
|
||||
@@ -177,10 +175,18 @@ and users"),
|
||||
@param ids: List of case's Ids
|
||||
@param *args: Give Tuple Value
|
||||
"""
|
||||
old_state = self.read(cr, uid, ids, ['state'])[0]['state']
|
||||
res = super(crm_lead, self).case_open(cr, uid, ids, *args)
|
||||
self.write(cr, uid, ids, {'date_open': time.strftime('%Y-%m-%d %H:%M:%S')})
|
||||
if old_state == 'draft':
|
||||
stage_id = super(crm_lead, self).stage_next(cr, uid, ids, *args)
|
||||
if not stage_id:
|
||||
raise osv.except_osv(_('Warning !'), _('There is no stage defined for this Sale Team.'))
|
||||
value = self.onchange_stage_id(cr, uid, ids, stage_id, context={})['value']
|
||||
value.update({'date_open': time.strftime('%Y-%m-%d %H:%M:%S'), 'stage_id': stage_id})
|
||||
self.write(cr, uid, ids, value)
|
||||
|
||||
for (id, name) in self.name_get(cr, uid, ids):
|
||||
message = _('Lead ') + " '" + name + "' "+ _("is Open.")
|
||||
message = _('The Lead') + " '" + name + "' "+ _("has been written as Open.")
|
||||
self.log(cr, uid, id, message)
|
||||
return res
|
||||
|
||||
@@ -195,7 +201,7 @@ and users"),
|
||||
res = super(crm_lead, self).case_close(cr, uid, ids, args)
|
||||
self.write(cr, uid, ids, {'date_closed': time.strftime('%Y-%m-%d %H:%M:%S')})
|
||||
for (id, name) in self.name_get(cr, uid, ids):
|
||||
message = _('Lead ') + " '" + name + "' "+ _("is Closed.")
|
||||
message = _('The Lead') + " '" + name + "' "+ _("has been written as Closed.")
|
||||
self.log(cr, uid, id, message)
|
||||
return res
|
||||
|
||||
|
||||
@@ -53,8 +53,8 @@
|
||||
<newline />
|
||||
<field name="section_id" widget="selection" />
|
||||
<field name="user_id" />
|
||||
<field name="stage_id" widget="selection"
|
||||
domain="[('object_id.model', '=', 'crm.lead')]" />
|
||||
<field name="stage_id"
|
||||
domain="[('section_id','=',section_id), ('object_id.model', '=', 'crm.lead')]" />
|
||||
<group col="2" colspan="1">
|
||||
<button name="stage_previous" string="Previous"
|
||||
states="open,pending" type="object"
|
||||
@@ -223,7 +223,7 @@
|
||||
<field name="type_id" invisible="1"/>
|
||||
<field name="referred" invisible="1"/>
|
||||
|
||||
<field name="stage_id"/>
|
||||
<field name="stage_id" />
|
||||
<button name="stage_previous" string="Previous Stage"
|
||||
states="open,pending" type="object" icon="gtk-go-back" />
|
||||
<button name="stage_next" string="Next Stage"
|
||||
|
||||
@@ -107,6 +107,7 @@
|
||||
<group col="2" colspan="2">
|
||||
<separator colspan="2" string="Assignment"/>
|
||||
<field name="user_id" />
|
||||
<field name="organizer_id" groups="base.group_extended"/>
|
||||
<field name="section_id" widget="selection"
|
||||
groups="base.group_extended"/>
|
||||
</group><group col="2" colspan="2">
|
||||
@@ -154,7 +155,9 @@
|
||||
<field name="attendee_ids" colspan="4"
|
||||
nolabel="1" widget="one2many" mode="tree,form">
|
||||
<tree string="Invitation details" editable="top">
|
||||
<field name="email" />
|
||||
<field name="sent_by_uid" string="From"/>
|
||||
<field name="user_id" string="To"/>
|
||||
<field name="email" string="Mail TO"/>
|
||||
<field name="role" select="1" />
|
||||
<field name="state" />
|
||||
</tree>
|
||||
@@ -342,7 +345,7 @@
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
@@ -64,9 +64,15 @@ class crm_opportunity(osv.osv):
|
||||
@param *args: Tuple Value for additional Params
|
||||
"""
|
||||
res = super(crm_opportunity, self).case_close(cr, uid, ids, args)
|
||||
self.write(cr, uid, ids, {'probability' : 100.0, 'date_closed': time.strftime('%Y-%m-%d %H:%M:%S')})
|
||||
stage_id = super(crm_opportunity, self).stage_next(cr, uid, ids, context={'force_domain': [('probability', '=', 100)]})
|
||||
if not stage_id:
|
||||
raise osv.except_osv(_('Warning !'), _('There is no stage for won oppportunities defined for this Sale Team.'))
|
||||
value = self.onchange_stage_id(cr, uid, ids, stage_id, context={})['value']
|
||||
value.update({'date_closed': time.strftime('%Y-%m-%d %H:%M:%S'), 'stage_id': stage_id})
|
||||
|
||||
self.write(cr, uid, ids, value)
|
||||
for (id, name) in self.name_get(cr, uid, ids):
|
||||
message = _('Opportunity ') + " '" + name + "' "+ _("is Won.")
|
||||
message = _('The Opportunity') + " '" + name + "' "+ _("has been written as Won.")
|
||||
self.log(cr, uid, id, message)
|
||||
return res
|
||||
|
||||
@@ -78,9 +84,16 @@ class crm_opportunity(osv.osv):
|
||||
@param ids: List of case Ids
|
||||
@param *args: Tuple Value for additional Params
|
||||
"""
|
||||
res = self.write(cr, uid, ids, {'probability' : 0.0, 'state': 'done'})
|
||||
res = super(crm_opportunity, self).case_close(cr, uid, ids, args)
|
||||
stage_id = super(crm_opportunity, self).stage_next(cr, uid, ids, context={'force_domain': [('probability', '=', 0)]})
|
||||
if not stage_id:
|
||||
raise osv.except_osv(_('Warning !'), _('There is no stage for lost oppportunities defined for this Sale Team.'))
|
||||
value = self.onchange_stage_id(cr, uid, ids, stage_id, context={})['value']
|
||||
value.update({'date_closed': time.strftime('%Y-%m-%d %H:%M:%S'), 'stage_id': stage_id})
|
||||
|
||||
res = self.write(cr, uid, ids, value)
|
||||
for (id, name) in self.name_get(cr, uid, ids):
|
||||
message = _('Opportunity ') + " '" + name + "' "+ _("is Lost.")
|
||||
message = _('The Opportunity') + " '" + name + "' "+ _("has been written as Lost.")
|
||||
self.log(cr, uid, id, message)
|
||||
return res
|
||||
|
||||
@@ -95,9 +108,22 @@ class crm_opportunity(osv.osv):
|
||||
res = super(crm_opportunity, self).case_cancel(cr, uid, ids, args)
|
||||
self.write(cr, uid, ids, {'probability' : 0.0})
|
||||
return res
|
||||
|
||||
|
||||
def case_reset(self, cr, uid, ids, *args):
|
||||
"""Overrides reset as draft in order to set the stage field as empty
|
||||
@param self: The object pointer
|
||||
@param cr: the current row, from the database cursor,
|
||||
@param uid: the current user’s ID for security checks,
|
||||
@param ids: List of case Ids
|
||||
@param *args: Tuple Value for additional Params
|
||||
"""
|
||||
res = super(crm_opportunity, self).case_reset(cr, uid, ids, *args)
|
||||
self.write(cr, uid, ids, {'stage_id': False})
|
||||
return True
|
||||
|
||||
|
||||
def case_open(self, cr, uid, ids, *args):
|
||||
"""Overrides cancel for crm_case for setting Open Date
|
||||
"""Overrides open for crm_case for setting Open Date
|
||||
@param self: The object pointer
|
||||
@param cr: the current row, from the database cursor,
|
||||
@param uid: the current user’s ID for security checks,
|
||||
|
||||
@@ -14,8 +14,7 @@
|
||||
<group colspan="1" col="4">
|
||||
<field name="stage_id" nolabel="1"
|
||||
on_change="onchange_stage_id(stage_id)"
|
||||
widget="selection"
|
||||
domain="[('object_id.model', '=', 'crm.lead')]" />
|
||||
domain="[('section_id','=',section_id), ('object_id.model', '=', 'crm.lead')]" />
|
||||
<button name="stage_previous"
|
||||
states="open,pending" type="object"
|
||||
icon="gtk-go-back" string="" />
|
||||
|
||||
@@ -24,6 +24,7 @@ from osv import fields, osv
|
||||
from tools.translate import _
|
||||
import crm
|
||||
import time
|
||||
from datetime import datetime, timedelta
|
||||
|
||||
class crm_phonecall(osv.osv, crm_case):
|
||||
""" Phonecall Cases """
|
||||
@@ -65,7 +66,7 @@ class crm_phonecall(osv.osv, crm_case):
|
||||
('object_id.model', '=', 'crm.phonecall')]"),
|
||||
'date_open': fields.datetime('Opened', readonly=True),
|
||||
# phonecall fields
|
||||
'duration': fields.float('Duration'),
|
||||
'duration': fields.float('Duration', help="Duration in Minutes"),
|
||||
'categ_id': fields.many2one('crm.case.categ', 'Category', \
|
||||
domain="[('section_id','=',section_id),\
|
||||
('object_id.model', '=', 'crm.phonecall')]"),
|
||||
@@ -113,10 +114,29 @@ class crm_phonecall(osv.osv, crm_case):
|
||||
@param ids: List of case Ids
|
||||
@param *args: Tuple Value for additional Params
|
||||
"""
|
||||
res = super(crm_phonecall, self).case_close(cr, uid, ids, args)
|
||||
self.write(cr, uid, ids, {'date_closed': time.strftime('%Y-%m-%d %H:%M:%S')})
|
||||
for phone in self.browse(cr, uid, ids):
|
||||
phone_id= phone.id
|
||||
data = {'date_closed': time.strftime('%Y-%m-%d %H:%M:%S')}
|
||||
if phone.duration <=0:
|
||||
duration = datetime.now() - datetime.strptime(phone.date, '%Y-%m-%d %H:%M:%S')
|
||||
data.update({'duration': duration.seconds/float(60)})
|
||||
res = super(crm_phonecall, self).case_close(cr, uid, [phone_id], args)
|
||||
self.write(cr, uid, ids, data)
|
||||
return res
|
||||
|
||||
def case_reset(self, cr, uid, ids, *args):
|
||||
"""Resets case as draft
|
||||
@param self: The object pointer
|
||||
@param cr: the current row, from the database cursor,
|
||||
@param uid: the current user’s ID for security checks,
|
||||
@param ids: List of case Ids
|
||||
@param *args: Tuple Value for additional Params
|
||||
"""
|
||||
res = super(crm_phonecall, self).case_reset(cr, uid, ids, args)
|
||||
self.write(cr, uid, ids, {'duration': 0.0})
|
||||
return res
|
||||
|
||||
|
||||
def case_open(self, cr, uid, ids, *args):
|
||||
"""Overrides cancel for crm_case for setting Open Date
|
||||
@param self: The object pointer
|
||||
|
||||
@@ -374,7 +374,8 @@
|
||||
<page string="Current Activity" position="inside">
|
||||
<field name="context_section_id" completion="1"
|
||||
widget="selection"
|
||||
context="{'user_prefence':True}" />
|
||||
context="{'user_prefence':True}"
|
||||
readonly="0"/>
|
||||
</page>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -133,7 +133,7 @@
|
||||
<group expand="0" string="Extended options..." groups="base.group_extended">
|
||||
<field name="partner_id"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="stage_id" widget="selection" domain="[('object_id.model', '=', 'crm.lead')]"/>
|
||||
<field name="stage_id" widget="selection" domain="[('section_id','=',section_id), ('object_id.model', '=', 'crm.lead')]" />
|
||||
<field name="categ_id" widget="selection" domain="[('object_id.model', '=', 'crm.lead')]"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0"?>
|
||||
<openerp>
|
||||
<data noupdate="1">
|
||||
<data noupdate="1">
|
||||
|
||||
<!-- Event Attribute mapping for Calendar-->
|
||||
|
||||
@@ -22,13 +22,20 @@
|
||||
<field name="calendar_id" ref="caldav.basic_calendar1" />
|
||||
<field name="object_id" search="[('model','=','calendar.alarm')]" />
|
||||
</record>
|
||||
|
||||
|
||||
<record model="basic.calendar.lines" id="base_calendar.calendar_lines_attendee">
|
||||
<field name="name">attendee</field>
|
||||
<field name="calendar_id" ref="caldav.basic_calendar1" />
|
||||
<field name="object_id" search="[('model','=','calendar.attendee')]" />
|
||||
</record>
|
||||
|
||||
|
||||
<record model="basic.calendar.fields" id="map_event_0">
|
||||
<field name="name" ref="caldav.field_event_organizer"/>
|
||||
<field name="type_id" ref="base_calendar.calendar_lines_event" />
|
||||
<field name="field_id" search="[('name','=','organizer_id'),('model_id.model','=','calendar.event')]" />
|
||||
<field name="fn">field</field>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.fields" id="map_event_1">
|
||||
<field name="name" ref="caldav.field_event_uid"/>
|
||||
<field name="type_id" ref="base_calendar.calendar_lines_event" />
|
||||
@@ -42,7 +49,7 @@
|
||||
<field name="field_id" search="[('name','=','recurrent_id'),('model_id.model','=','calendar.event')]" />
|
||||
<field name="fn">field</field>
|
||||
</record>
|
||||
|
||||
|
||||
<record model="basic.calendar.fields" id="map_event_3">
|
||||
<field name="name" ref="caldav.field_event_vtimezone"/>
|
||||
<field name="type_id" ref="base_calendar.calendar_lines_event" />
|
||||
@@ -55,7 +62,7 @@
|
||||
<field name="type_id" ref="base_calendar.calendar_lines_event" />
|
||||
<field name="field_id" search="[('name','=','attendee_ids'),('model_id.model','=','crm.meeting')]" />
|
||||
<field name="fn">field</field>
|
||||
</record>
|
||||
</record>
|
||||
|
||||
<record model="basic.calendar.fields" id="map_event_5">
|
||||
<field name="name" ref="caldav.field_event_rrule"/>
|
||||
@@ -154,7 +161,7 @@
|
||||
<field name="type_id" ref="base_calendar.calendar_lines_event" />
|
||||
<field name="field_id" search="[('name','=','name'),('model_id.model','=','calendar.event')]" />
|
||||
<field name="fn">field</field>
|
||||
</record>
|
||||
</record>
|
||||
|
||||
|
||||
|
||||
@@ -313,7 +320,7 @@
|
||||
<field name="fn">field</field>
|
||||
</record>
|
||||
|
||||
|
||||
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
@@ -79,9 +79,7 @@ class crm_claim(osv.osv, crm.crm_case):
|
||||
'partner_name': fields.char("Employee's Name", size=64),
|
||||
'partner_mobile': fields.char('Mobile', size=32),
|
||||
'partner_phone': fields.char('Phone', size=32),
|
||||
'stage_id': fields.many2one ('crm.case.stage', 'Stage', \
|
||||
domain="[('section_id','=',section_id),\
|
||||
('object_id.model', '=', 'crm.claim')]"),
|
||||
'stage_id': fields.many2one ('crm.case.stage', 'Stage'),
|
||||
'probability': fields.float('Probability (%)'),
|
||||
'state': fields.selection(crm.AVAILABLE_STATES, 'State', size=16, readonly=True,
|
||||
help='The state is set to \'Draft\', when a case is created.\
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
</record>
|
||||
|
||||
<menuitem action="crm_claim_resource_act" name="Resource Type"
|
||||
id="menu_crm_claim_stage_act"
|
||||
id="menu_crm_claim_type_act"
|
||||
parent="menu_config_claim" />
|
||||
|
||||
<!-- Claims -->
|
||||
@@ -125,7 +125,9 @@
|
||||
<field name="section_id" widget="selection"/>
|
||||
<label string="Stage: " align="1.0"/>
|
||||
<group colspan="1" col="3">
|
||||
<field name="stage_id" select="1" nolabel="1"/>
|
||||
<field name="stage_id" nolabel="1"
|
||||
on_change="onchange_stage_id(stage_id)"
|
||||
domain="[('section_id','=',section_id), ('object_id.model', '=', 'crm.claim')]" />
|
||||
<button name="stage_previous" string="" type="object" icon="gtk-go-back" />
|
||||
<button icon="gtk-go-forward" string="" name="stage_next" type="object"/>
|
||||
</group>
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
'security/document_security.xml',
|
||||
'document_view.xml',
|
||||
'document_data.xml',
|
||||
'wizard/document_configuration_view.xml',
|
||||
# 'wizard/document_configuration_view.xml',
|
||||
'security/ir.model.access.csv',
|
||||
'report/document_report_view.xml',
|
||||
'board_document_view.xml',
|
||||
|
||||
@@ -45,8 +45,9 @@
|
||||
-
|
||||
Attach a pdf file in "My document"
|
||||
-
|
||||
!python {model: ir.attachment}: |
|
||||
!python {model: 'ir.attachment'}: |
|
||||
import tools
|
||||
import base64
|
||||
file = open(tools.config['addons_path'] + '/document/test/partner.pdf')
|
||||
id = self.write(cr, uid, [ref("document_1")], {'datas' : base64.encodestring(file.read())}, context)
|
||||
pdf_file = open(tools.config['addons_path'] + '/document/test/partner.pdf')
|
||||
self.write(cr, uid, [ref("document_1")], {'datas_fname': 'partner.pdf', 'datas' : base64.encodestring(pdf_file.read())}, context)
|
||||
|
||||
|
||||
+12
-11
@@ -53,21 +53,22 @@
|
||||
<field name="product_id" on_change="onchange_product(product_id)"/>
|
||||
</group>
|
||||
<notebook colspan="4">
|
||||
<page string="General">
|
||||
<page string="Event Information">
|
||||
<separator string="Description" colspan="4"/>
|
||||
<field name="unit_price"/>
|
||||
<field name="currency_id"/>
|
||||
<separator string="Speaker Information" colspan="4"/>
|
||||
<field name="main_speaker_id" domain="[('speaker','=',True)]"/>
|
||||
<field name="address_id"/>
|
||||
<field name="speaker_ids" domain="[('speaker','=',True)]" colspan="4"/>
|
||||
<field name="country_id" />
|
||||
<field name="speaker_confirmed"/>
|
||||
<field name="language"/>
|
||||
<separator string="Event description" colspan="4"/>
|
||||
<field name="parent_id" domain="[('parent_id','child_of','Event')]"/>
|
||||
<field name="active"/>
|
||||
<field name="register_min"/>
|
||||
<field name="register_max"/>
|
||||
<field name="parent_id" domain="[('parent_id','child_of','Event')]"/>
|
||||
<field name="active"/>
|
||||
<separator string="Location" colspan="4"/>
|
||||
<field name="country_id" />
|
||||
<field name="language"/>
|
||||
<field name="address_id"/>
|
||||
<separator string="Speaker Information" colspan="4"/>
|
||||
<field name="main_speaker_id" domain="[('speaker','=',True)]"/>
|
||||
<field name="speaker_confirmed"/>
|
||||
<field name="speaker_ids" domain="[('speaker','=',True)]" colspan="4"/>
|
||||
<newline/>
|
||||
<field name="state" select="1"/>
|
||||
<group col="4" colspan="2">
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
name="Human Resources"
|
||||
parent="base.dashboard"/>
|
||||
|
||||
|
||||
<!-- This board view will be complete by other hr_* modules-->
|
||||
<record id="board_hr_form" model="ir.ui.view">
|
||||
<field name="name">board.hr.form</field>
|
||||
<field name="model">board.board</field>
|
||||
|
||||
@@ -2,6 +2,43 @@
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<!-- Employee Category -->
|
||||
|
||||
<record id="category1" model="hr.employee.category">
|
||||
<field name="name">CEO</field>
|
||||
</record>
|
||||
|
||||
<record id="category2" model="hr.employee.category">
|
||||
<field name="name">CTO</field>
|
||||
<field name="parent_id" ref="category1"/>
|
||||
</record>
|
||||
|
||||
<record id="category3" model="hr.employee.category">
|
||||
<field name="name">Managers(Tech. Heads)</field>
|
||||
<field name="parent_id" ref="category2"/>
|
||||
</record>
|
||||
|
||||
<record id="category4" model="hr.employee.category">
|
||||
<field name="name">Project Managers</field>
|
||||
<field name="parent_id" ref="category3"/>
|
||||
</record>
|
||||
|
||||
<record id="category5" model="hr.employee.category">
|
||||
<field name="name">Sr. Executives(Team Leads)</field>
|
||||
<field name="parent_id" ref="category4"/>
|
||||
</record>
|
||||
|
||||
<record id="category6" model="hr.employee.category">
|
||||
<field name="name">Jr. Executives(Developers)</field>
|
||||
<field name="parent_id" ref="category5"/>
|
||||
</record>
|
||||
|
||||
<record id="category7" model="hr.employee.category">
|
||||
<field name="name">Trainee(Intership)</field>
|
||||
<field name="parent_id" ref="category6"/>
|
||||
</record>
|
||||
|
||||
|
||||
<!-- Example employee -->
|
||||
|
||||
<record id="employee1" model="hr.employee">
|
||||
@@ -9,6 +46,7 @@
|
||||
<field name="calendar_id" ref="resource.timesheet_group1"/>
|
||||
<!--<field name="regime">45</field>-->
|
||||
<field name="user_id" ref="base.user_root"/>
|
||||
<field name="category_id" ref="hr.category1"/>
|
||||
<!--<field name="holiday_max">25</field>-->
|
||||
</record>
|
||||
|
||||
|
||||
@@ -101,7 +101,7 @@
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<page string="Current Activity" position="inside">
|
||||
<field name="context_department_id" widget="selection" />
|
||||
<field name="context_department_id" widget="selection" readonly="0"/>
|
||||
</page>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
<separator string="Position" colspan="2"/>
|
||||
<field name="job_id" widget="selection"/>
|
||||
<field name="department_id" widget="selection"/>
|
||||
<field name="category_id" />
|
||||
<field name="category_id" widget="selection"/>
|
||||
<!--<separator string="Managers" colspan="2"/>
|
||||
<field name="parent_id" />
|
||||
<field name="coach_id" />-->
|
||||
@@ -88,6 +88,7 @@
|
||||
<field name="work_email"/>
|
||||
<field name="department_id"/>
|
||||
<field name="job_id"/>
|
||||
<field name="category_id"/>
|
||||
<field name="parent_id"/>
|
||||
<field name="coach_id" invisible="1" />
|
||||
</tree>
|
||||
@@ -102,7 +103,9 @@
|
||||
<search string="Employees">
|
||||
<filter icon="terp-personal-" domain="[('active','=',False)]" string="Unactive" groups="base.group_extended"/>
|
||||
<field name="name"/>
|
||||
<field name="department_id" widget="selection"/>
|
||||
<field name="department_id" widget="selection">
|
||||
<filter icon="terp-personal+" domain="[('department_id','=',context.get('department_id',False))]" help="My Departments Employee"/>
|
||||
</field>
|
||||
<field name="job_id" widget="selection"/>
|
||||
<field name="parent_id"/>
|
||||
<newline />
|
||||
|
||||
@@ -7,13 +7,13 @@ msgstr ""
|
||||
"Project-Id-Version: OpenERP Server 5.0.4\n"
|
||||
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
||||
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
|
||||
"PO-Revision-Date: 2010-05-10 13:18+0000\n"
|
||||
"Last-Translator: Angel Spy <melissadilara@yahoo.com>\n"
|
||||
"PO-Revision-Date: 2010-07-12 11:46+0000\n"
|
||||
"Last-Translator: adsiz_1029@hotmail.com <Unknown>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-06-22 04:15+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-07-13 03:49+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: hr
|
||||
|
||||
@@ -60,7 +60,7 @@ class hr_attendance(osv.osv):
|
||||
'day': fields.function(_day_compute, method=True, type='char', string='Day', store=True, select=1, size=32),
|
||||
}
|
||||
_defaults = {
|
||||
'name': time.strftime('%Y-%m-%d %H:%M:%S'),
|
||||
'name': lambda *a: time.strftime('%Y-%m-%d %H:%M:%S'), #Don't remove the lambda, if you remove it then the current time will not change
|
||||
'employee_id': _employee_get,
|
||||
}
|
||||
|
||||
@@ -119,6 +119,7 @@ class hr_employee(osv.osv):
|
||||
def attendance_action_change(self, cr, uid, ids, type='action', context=None, dt=False, *args):
|
||||
id = False
|
||||
warning_sign = 'sign'
|
||||
res = {}
|
||||
|
||||
#Special case when button calls this method :type=context
|
||||
if isinstance(type, dict):
|
||||
@@ -127,7 +128,6 @@ class hr_employee(osv.osv):
|
||||
warning_sign = "Sign In"
|
||||
elif type == 'sign_out':
|
||||
warning_sign = "Sign Out"
|
||||
|
||||
for emp in self.read(cr, uid, ids, ['id'], context=context):
|
||||
if not self._action_check(cr, uid, emp['id'], dt, context):
|
||||
raise osv.except_osv(_('Warning'), _('You tried to %s with a date anterior to another event !\nTry to contact the administrator to correct attendances.')%(warning_sign,))
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
|
||||
#
|
||||
@@ -15,12 +15,12 @@
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
import attendance_errors
|
||||
import bymonth
|
||||
import attendance_by_month
|
||||
import timesheet
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
+2
-1
@@ -40,12 +40,13 @@ def hour2str(h):
|
||||
class report_custom(report_rml):
|
||||
|
||||
def create_xml(self, cr, uid, ids, datas, context=None):
|
||||
obj_emp = pooler.get_pool(cr.dbname).get('hr.employee')
|
||||
if context is None:
|
||||
context = {}
|
||||
month = DateTime.DateTime(datas['form']['year'], datas['form']['month'], 1)
|
||||
user_xml = ['<month>%s</month>' % month2name[month.month], '<year>%s</year>' % month.year]
|
||||
for employee_id in ids:
|
||||
emp = pooler.get_pool(cr.dbname).get('hr.employee').read(cr, uid, [employee_id], ['name'])[0]
|
||||
emp = obj_emp.read(cr, uid, [employee_id], ['name'])[0]
|
||||
stop, days_xml = False, []
|
||||
user_repr = '''
|
||||
<user>
|
||||
@@ -37,6 +37,7 @@ def to_hour(h):
|
||||
class report_custom(report_rml):
|
||||
|
||||
def create_xml(self, cr, uid, ids, datas, context=None):
|
||||
obj_emp = pooler.get_pool(cr.dbname).get('hr.employee')
|
||||
start_date = DateTime.strptime(datas['form']['init_date'], '%Y-%m-%d')
|
||||
end_date = DateTime.strptime(datas['form']['end_date'], '%Y-%m-%d')
|
||||
first_monday = start_date - DateTime.RelativeDateTime(days=start_date.day_of_week)
|
||||
@@ -47,7 +48,7 @@ class report_custom(report_rml):
|
||||
user_xml = []
|
||||
|
||||
for employee_id in ids:
|
||||
emp = pooler.get_pool(cr.dbname).get('hr.employee').read(cr, uid, [employee_id], ['id', 'name'])[0]
|
||||
emp = obj_emp.read(cr, uid, [employee_id], ['id', 'name'])[0]
|
||||
monday, n_monday = first_monday, first_monday + one_week
|
||||
stop, week_xml = False, []
|
||||
user_repr = '''
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
</record>
|
||||
|
||||
<record id="action_hr_attendance_month" model="ir.actions.act_window">
|
||||
<field name="name">Print Timesheet by month</field>
|
||||
<field name="name">Print Attendance by month</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">hr.attendance.month</field>
|
||||
<field name="view_type">form</field>
|
||||
@@ -34,7 +34,7 @@
|
||||
<record model="ir.values" id="hr_attendance_month_values">
|
||||
<field name="model_id" ref="hr.model_hr_employee" />
|
||||
<field name="object" eval="1" />
|
||||
<field name="name">Print Timesheet by month</field>
|
||||
<field name="name">Print Attendance by month</field>
|
||||
<field name="key2">client_print_multi</field>
|
||||
<field name="value" eval="'ir.actions.act_window,' + str(ref('action_hr_attendance_month'))" />
|
||||
<field name="key">action</field>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<record id="view_hr_attendance_week" model="ir.ui.view">
|
||||
<!--<record id="view_hr_attendance_week" model="ir.ui.view">
|
||||
<field name="name">Attendance Report Week</field>
|
||||
<field name="model">hr.attendance.week</field>
|
||||
<field name="type">form</field>
|
||||
@@ -40,7 +40,7 @@
|
||||
<field name="value" eval="'ir.actions.act_window,' + str(ref('action_hr_attendance_week'))" />
|
||||
<field name="key">action</field>
|
||||
<field name="model">hr.employee</field>
|
||||
</record>
|
||||
</record> -->
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
@@ -69,10 +69,10 @@
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
|
||||
<menuitem action="action_hr_timesheet_my"
|
||||
<!--menuitem action="action_hr_timesheet_my"
|
||||
id="menu_hr_timesheet_my"
|
||||
parent="menu_hr_reporting_timesheet"
|
||||
groups="hr.group_hr_user" sequence="4" icon="STOCK_PRINT"/>
|
||||
groups="hr.group_hr_user" sequence="4" icon="STOCK_PRINT"/-->
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
@@ -718,9 +718,9 @@ class res_company(osv.osv):
|
||||
_inherit = 'res.company'
|
||||
_columns = {
|
||||
'timesheet_range': fields.selection(
|
||||
[('day','Day'),('week','Week'),('month','Month'),('year','Year')], 'Timeshet range'),
|
||||
'timesheet_max_difference': fields.float('Timesheet allowed difference',
|
||||
help="Allowed difference between the sign in/out and the timesheet " \
|
||||
[('day','Day'),('week','Week'),('month','Month'),('year','Year')], 'Timesheet range'),
|
||||
'timesheet_max_difference': fields.float('Timesheet allowed difference(Hours)',
|
||||
help="Allowed difference in hours between the sign in/out and the timesheet " \
|
||||
"computation for one sheet. Set this to 0 if you do not want any control."),
|
||||
}
|
||||
_defaults = {
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
</xpath>
|
||||
<xpath expr="//label[@string='description']"
|
||||
position="attributes">
|
||||
<attribute name="string">From this screen, you can select various OpenERP applications which will help employees store information, distribute it and share it with one another.</attribute>
|
||||
<attribute name="string">You can select various OpenERP applications which will help you and your employees to store and share information.</attribute>
|
||||
</xpath>
|
||||
<group colspan="8" position="replace">
|
||||
<group colspan="4">
|
||||
|
||||
@@ -62,14 +62,12 @@ class Tax_template(osv.osv_memory):
|
||||
}
|
||||
|
||||
def _on_change(self, cr, uid, id, tax, vals):
|
||||
if account:
|
||||
self.pool.get('account.tax.template').write(
|
||||
cr, uid, tax, vals=vals)
|
||||
if tax:
|
||||
self.pool.get('account.tax.template').write(cr, uid, tax, vals=vals)
|
||||
return {}
|
||||
|
||||
def on_change_collected(self, cr, uid, id, tax, account):
|
||||
return self._on_change(
|
||||
cr, uid, ids, tax, vals={'account_collected_id': account})
|
||||
def on_change_collected(self, cr, uid, ids, tax, account):
|
||||
return self._on_change(cr, uid, ids, tax, vals={'account_collected_id': account})
|
||||
|
||||
def on_change_paid(self, cr, uid, id, tax, account):
|
||||
return self._on_change(
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
</separator>
|
||||
<xpath expr="//label[@string='description']"
|
||||
position="attributes">
|
||||
<attribute name="string">After having installed the core manufacturing application, you can extend it with a few more depending on the needs of your organization</attribute>
|
||||
<attribute name="string">After having installed the core manufacturing application, you can extend it depending on the needs of your MRP's organization</attribute>
|
||||
</xpath>
|
||||
<xpath expr='//separator[@string="vsep"]' position='attributes'>
|
||||
<attribute name='string'></attribute>
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="action_view_task_tree" model="ir.actions.act_window">
|
||||
<field name="name">My Open Tasks</field>
|
||||
<field name="res_model">project.task</field>
|
||||
@@ -32,16 +32,16 @@
|
||||
<field name="domain">[('user_id','=',uid),('state','=','open')]</field>
|
||||
<field name="view_id" ref="view_task_tree"/>
|
||||
</record>
|
||||
|
||||
<record id="action_view_pending_task_tree" model="ir.actions.act_window">
|
||||
<field name="name">My Pending Tasks</field>
|
||||
|
||||
<record id="action_view_delegate_task_tree" model="ir.actions.act_window">
|
||||
<field name="name">My Delegated Tasks</field>
|
||||
<field name="res_model">project.task</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="domain">[('user_id','=',uid),('state','=','pending')]</field>
|
||||
<field name="view_id" ref="view_task_tree"/>
|
||||
<field name="domain">['|',('parent_ids.user_id','=',uid),('user_id','=',uid)]</field>
|
||||
<field name="view_id" ref="project.view_task_tree2"/>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="action_view_task_tree_deadline" model="ir.actions.act_window">
|
||||
<field name="name">My Task's Deadlines</field>
|
||||
<field name="res_model">project.task</field>
|
||||
@@ -87,7 +87,7 @@
|
||||
<hpaned>
|
||||
<child1>
|
||||
<action colspan="4" name="%(action_view_task_tree)d" string="My Open Tasks" width="510"/>
|
||||
<action colspan="4" name="%(action_view_pending_task_tree)d" string="My Pending Tasks" width="510"/>
|
||||
<action colspan="4" name="%(action_view_delegate_task_tree)d" string="My Delegated Tasks" width="510"/>
|
||||
</child1>
|
||||
<child2>
|
||||
<vpaned>
|
||||
@@ -95,7 +95,7 @@
|
||||
<action colspan="4" name="%(project.action_project_vs_remaining_hours_graph)d" string="Remaining Hours Per Project" />
|
||||
</child1>
|
||||
<child2>
|
||||
<action colspan="4" name="%(project.action_task_by_days_vs_planned_hours_graph)d" string="Planned Hours Per Day" />
|
||||
<action colspan="4" name="%(project.action_project_vs_planned_total_hours_graph)d" string="My Projects: Planned Vs Total Hours" />
|
||||
</child2>
|
||||
</vpaned>
|
||||
</child2>
|
||||
@@ -112,20 +112,20 @@
|
||||
<field name="usage">menu</field>
|
||||
<field name="view_id" ref="board_project_form"/>
|
||||
</record>
|
||||
|
||||
|
||||
<menuitem
|
||||
id="next_id_86"
|
||||
name="Dashboard"
|
||||
icon="terp-graph"
|
||||
sequence="0"
|
||||
parent="base.menu_project_report"/>
|
||||
|
||||
|
||||
<menuitem
|
||||
action="open_board_project"
|
||||
icon="terp-graph"
|
||||
id="menu_board_project"
|
||||
parent="next_id_86"
|
||||
sequence="1"/>
|
||||
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
|
||||
<record id="view_project_installer" model="ir.ui.view">
|
||||
<field name="name">project.installer.view</field>
|
||||
<field name="model">project.installer</field>
|
||||
@@ -18,7 +18,7 @@
|
||||
<attribute name='string'></attribute>
|
||||
</xpath>
|
||||
<xpath expr="//label[@string='description']" position="attributes">
|
||||
<attribute name="string">Various OpenERP applications are available to bring your project management to the next levels of control and flexibility.</attribute>
|
||||
<attribute name="string">Various OpenERP applications are available to manage your projects with different level of control and flexibility.</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//button[@string='Install Modules']" position="attributes">
|
||||
<attribute name="string">Configure</attribute>
|
||||
@@ -65,6 +65,6 @@
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
@@ -571,7 +571,7 @@
|
||||
<field eval="18" name="priority"/>
|
||||
<field name="arch" type="xml">
|
||||
<page string="Current Activity" position="inside">
|
||||
<field name="context_project_id" completion="1" context="{'user_prefence':True}" widget="selection"/>
|
||||
<field name="context_project_id" completion="1" context="{'user_prefence':True}" widget="selection" readonly="0"/>
|
||||
</page>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -122,27 +122,31 @@ class report_project_task_user(osv.osv):
|
||||
report_project_task_user()
|
||||
|
||||
#This class is generated for project deshboard purpose
|
||||
class project_vs_remaining_hours(osv.osv):
|
||||
_name = "project.vs.remaining.hours"
|
||||
_description = " Project vs Remaining hours"
|
||||
class project_vs_hours(osv.osv):
|
||||
_name = "project.vs.hours"
|
||||
_description = " Project vs hours"
|
||||
_auto = False
|
||||
_columns = {
|
||||
'project': fields.char('Project', size=128, required=True),
|
||||
'remaining_hours': fields.float('Remaining Hours', readonly=True),
|
||||
'planned_hours': fields.float('Planned Hours', readonly=True),
|
||||
'total_hours': fields.float('Total Hours', readonly=True),
|
||||
'state': fields.selection([('draft','Draft'),('open','Open'), ('pending','Pending'),('cancelled', 'Cancelled'),('close','Close'),('template', 'Template')], 'State', required=True, readonly=True)
|
||||
}
|
||||
_order = 'project desc'
|
||||
|
||||
def init(self, cr):
|
||||
tools.sql.drop_view_if_exists(cr, 'project_vs_remaining_hours')
|
||||
tools.sql.drop_view_if_exists(cr, 'project_vs_hours')
|
||||
cr.execute("""
|
||||
CREATE or REPLACE view project_vs_remaining_hours as (
|
||||
CREATE or REPLACE view project_vs_hours as (
|
||||
select
|
||||
min(pt.id) as id,
|
||||
aaa.user_id as uid,
|
||||
aaa.name as project,
|
||||
aaa.state,
|
||||
sum(pt.remaining_hours) as remaining_hours
|
||||
sum(pt.remaining_hours) as remaining_hours,
|
||||
sum(pt.planned_hours) as planned_hours,
|
||||
sum(pt.total_hours) as total_hours
|
||||
FROM project_project as pp,
|
||||
account_analytic_account as aaa,
|
||||
project_task as pt
|
||||
@@ -154,7 +158,9 @@ class project_vs_remaining_hours(osv.osv):
|
||||
pur.uid as uid,
|
||||
aaa.name as project,
|
||||
aaa.state,
|
||||
sum(pt.remaining_hours) as remaining_hours
|
||||
sum(pt.remaining_hours) as remaining_hours,
|
||||
sum(pt.planned_hours) as planned_hours,
|
||||
sum(pt.total_hours) as total_hours
|
||||
FROM project_project as pp,
|
||||
project_user_rel as pur,
|
||||
account_analytic_account as aaa,
|
||||
@@ -164,7 +170,7 @@ class project_vs_remaining_hours(osv.osv):
|
||||
)
|
||||
""")
|
||||
|
||||
project_vs_remaining_hours()
|
||||
project_vs_hours()
|
||||
|
||||
class task_by_days(osv.osv):
|
||||
_name = "task.by.days"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
|
||||
<menuitem id="base.menu_project_report" name="Reporting" parent="base.menu_main_pm" sequence="50"/>
|
||||
|
||||
<record id="view_task_project_user_tree" model="ir.ui.view">
|
||||
@@ -91,7 +91,7 @@
|
||||
<field name="project_id">
|
||||
<filter icon="terp-folder-blue"
|
||||
string="My Projects"
|
||||
help="My Projects" domain="[('project_id','=',uid)]"/>
|
||||
help="My Projects" domain="[('project_id','=',uid)]"/>
|
||||
</field>
|
||||
|
||||
<field name="user_id" widget="selection">
|
||||
@@ -151,7 +151,7 @@
|
||||
<!-- Views and action for project dashboard -->
|
||||
<record id="view_project_vs_remaining_hours_tree" model="ir.ui.view">
|
||||
<field name="name">project.vs.remaining.hour.tree</field>
|
||||
<field name="model">project.vs.remaining.hours</field>
|
||||
<field name="model">project.vs.hours</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Project and remaining hours" colors="pink:state=='draft';blue:state=='pending';black:state=='open';red:state=='cancelled';grey:state=='close';yellow:state=='template'">
|
||||
@@ -164,7 +164,7 @@
|
||||
|
||||
<record id="view_project_vs_remaining_hours_graph" model="ir.ui.view">
|
||||
<field name="name">project.vs.remaining.hour.graph</field>
|
||||
<field name="model">project.vs.remaining.hours</field>
|
||||
<field name="model">project.vs.hours</field>
|
||||
<field name="type">graph</field>
|
||||
<field name="arch" type="xml">
|
||||
<graph string="Project vs remaining hours" type="bar">
|
||||
@@ -177,13 +177,25 @@
|
||||
|
||||
<record id="action_project_vs_remaining_hours_graph" model="ir.actions.act_window">
|
||||
<field name="name">Project and remaining hours</field>
|
||||
<field name="res_model">project.vs.remaining.hours</field>
|
||||
<field name="res_model">project.vs.hours</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">graph,tree</field>
|
||||
<field name="domain">[('uid','=',uid)]</field>
|
||||
<field name="domain">[('uid','=',uid),('state','=','open')]</field>
|
||||
<field name="view_id" ref="view_project_vs_remaining_hours_graph"/>
|
||||
</record>
|
||||
|
||||
<record id="open_view_project_vs_remaining_hours_tree" model="ir.actions.act_window.view">
|
||||
<field eval="1" name="sequence"/>
|
||||
<field name="view_mode">tree</field>
|
||||
<field name="view_id" ref="view_project_vs_remaining_hours_tree"/>
|
||||
<field name="act_window_id" ref="action_project_vs_remaining_hours_graph"/>
|
||||
</record>
|
||||
<record id="open_view_project_vs_remaining_hours_graph" model="ir.actions.act_window.view">
|
||||
<field eval="2" name="sequence"/>
|
||||
<field name="view_mode">graph</field>
|
||||
<field name="view_id" ref="view_project_vs_remaining_hours_graph"/>
|
||||
<field name="act_window_id" ref="action_project_vs_remaining_hours_graph"/>
|
||||
</record>
|
||||
<!-- Views and action for project issue dashboard -->
|
||||
<record id="view_task_by_days_tree" model="ir.ui.view">
|
||||
<field name="name">task.by.days.tree</field>
|
||||
@@ -222,38 +234,51 @@
|
||||
</record>
|
||||
|
||||
<!-- Views and action for project dashboard -->
|
||||
<record id="view_task_by_days_vs_planned_hours_tree" model="ir.ui.view">
|
||||
<field name="name">task.by.days.vs.planned.hours.tree</field>
|
||||
<field name="model">report.project.task.user</field>
|
||||
<record id="view_project_vs_planned_total_hours_tree" model="ir.ui.view">
|
||||
<field name="name">project.vs.planned.total.hour.tree</field>
|
||||
<field name="model">project.vs.hours</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Task By Days vs Planned Hours" >
|
||||
<field name="day"/>
|
||||
<field name="hours_planned"/>
|
||||
<tree string="Project Vs Planned and Total Hours" colors="pink:state=='draft';blue:state=='pending';black:state=='open';red:state=='cancelled';grey:state=='close';yellow:state=='template'">
|
||||
<field name="project"/>
|
||||
<field name="planned_hours"/>
|
||||
<field name="total_hours"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_task_by_days_vs_planned_hours_graph" model="ir.ui.view">
|
||||
<field name="name">task.by.days.vs.planned.hours.graph</field>
|
||||
<field name="model">report.project.task.user</field>
|
||||
<record id="view_project_vs_planned_total_hours_graph" model="ir.ui.view">
|
||||
<field name="name">project.vs.planned.total.hour.graph</field>
|
||||
<field name="model">project.vs.hours</field>
|
||||
<field name="type">graph</field>
|
||||
<field name="arch" type="xml">
|
||||
<graph string="Task By Days vs Planned Hours" type="bar">
|
||||
<field name="day"/>
|
||||
<field name="hours_planned" operator="+"/>
|
||||
<field name="project_id" group="True"/>
|
||||
<graph string="Project Vs Planned and Total Hours" type="bar">
|
||||
<field name="project"/>
|
||||
<field name="planned_hours" operator="+"/>
|
||||
<field name="total_hours" operator="+"/>
|
||||
</graph>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_task_by_days_vs_planned_hours_graph" model="ir.actions.act_window">
|
||||
<field name="name">Task By Days vs Planned Hours</field>
|
||||
<field name="res_model">report.project.task.user</field>
|
||||
<record id="action_project_vs_planned_total_hours_graph" model="ir.actions.act_window">
|
||||
<field name="name">My projects: Planned Vs Total hours</field>
|
||||
<field name="res_model">project.vs.hours</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">graph,tree</field>
|
||||
<field name="view_id" ref="view_task_by_days_vs_planned_hours_graph"/>
|
||||
<field name="view_id" ref="view_project_vs_planned_total_hours_graph"/>
|
||||
</record>
|
||||
|
||||
<record id="open_view_project_vs_planned_total_hours_tree" model="ir.actions.act_window.view">
|
||||
<field eval="1" name="sequence"/>
|
||||
<field name="view_mode">tree</field>
|
||||
<field name="view_id" ref="view_project_vs_planned_total_hours_tree"/>
|
||||
<field name="act_window_id" ref="action_project_vs_planned_total_hours_graph"/>
|
||||
</record>
|
||||
<record id="open_view_project_vs_planned_total_hours_graph" model="ir.actions.act_window.view">
|
||||
<field eval="2" name="sequence"/>
|
||||
<field name="view_mode">graph</field>
|
||||
<field name="view_id" ref="view_project_vs_planned_total_hours_graph"/>
|
||||
<field name="act_window_id" ref="action_project_vs_planned_total_hours_graph"/>
|
||||
</record>
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
"access_project_task_work_manager","project.task.work.manager","model_project_task_work","project.group_project_manager",1,1,1,1
|
||||
"access_project_message","project.message","model_project_message","project.group_project_user",1,1,1,1
|
||||
"access_report_project_task_user","report.project.task.user","model_report_project_task_user","project.group_project_manager",1,0,0,0
|
||||
"access_project_vs_remaining_hours","project.vs.remaining.hours","model_project_vs_remaining_hours","project.group_project_user",1,1,1,1
|
||||
"access_project_vs_hours","project.vs.hours","model_project_vs_hours","project.group_project_user",1,1,1,1
|
||||
"access_task_by_days","task.by.days","model_task_by_days","project.group_project_user",1,1,1,1
|
||||
"access_partner_task user","base.res.partner user","base.model_res_partner","project.group_project_user",1,0,0,0
|
||||
"access_partner_task manager","base.res.partner manager","base.model_res_partner","project.group_project_manager",1,0,0,0
|
||||
|
||||
|
@@ -36,7 +36,7 @@
|
||||
<field name="name" >Tasks According to User and Project</field>
|
||||
<field name="model_id" ref="model_project_task"/>
|
||||
<field name="global" eval="True"/>
|
||||
<field name="domain_force">['|','|','|',('user_id','=',False),('user_id','=',user.id),('project_id.members','=',user.id),('project_id.user_id','=',user.id)]</field>
|
||||
<field name="domain_force">['|','|','|',('user_id','=',False),('user_id','=',user.id),('project_id.members','in', [user.id]),('project_id.user_id','=',user.id)]</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
|
||||
@@ -30,7 +30,13 @@ class project_task(osv.osv):
|
||||
'create_date': fields.datetime('Create Date'),
|
||||
'attendee_ids': fields.many2many('calendar.attendee', \
|
||||
'task_attendee_rel', 'task_id', 'attendee_id', 'Attendees'),
|
||||
}
|
||||
'state': fields.selection([('draft', 'Draft'),('open', 'In Progress'),('pending', 'Pending'), ('cancelled', 'Cancelled'), ('done', 'Done')], 'State', readonly=True, required=True,
|
||||
help='If the task is created the state is \'Draft\'.\n If the task is started, the state becomes \'In Progress\'.\n If review is needed the task is in \'Pending\' state.\
|
||||
\n If the task is over, the states is set to \'Done\'.'),
|
||||
}
|
||||
_defaults = {
|
||||
'state': 'draft',
|
||||
}
|
||||
|
||||
def import_cal(self, cr, uid, data, data_id=None, context=None):
|
||||
todo_obj = self.pool.get('basic.calendar.todo')
|
||||
@@ -43,7 +49,7 @@ class project_task(osv.osv):
|
||||
ids = []
|
||||
for val in vals:
|
||||
obj_tm = self.pool.get('res.users').browse(cr, uid, uid, context).company_id.project_time_mode_id
|
||||
if not val.has_key('planned_hours'):
|
||||
if not val.get('planned_hours', False):
|
||||
# 'Computes duration' in days
|
||||
plan = 0.0
|
||||
if val.get('date') and val.get('date_deadline'):
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<data noupdate="1">
|
||||
|
||||
<record model="basic.calendar" id="caldav.basic_calendar2">
|
||||
<field name="name">Todo</field>
|
||||
<field name="name">Tasks</field>
|
||||
<field name="collection_id" ref="document.dir_calendars"></field>
|
||||
<field name="type">vtodo</field>
|
||||
</record>
|
||||
|
||||
@@ -17,7 +17,9 @@
|
||||
<field name="attendee_ids" colspan="4"
|
||||
nolabel="1" widget="one2many" mode="tree,form">
|
||||
<tree string="Assignees details" editable="top">
|
||||
<field name="email" />
|
||||
<field name="sent_by_uid" string="From"/>
|
||||
<field name="user_id" string="To"/>
|
||||
<field name="email" string="Mail TO"/>
|
||||
<field name="role" select="1" />
|
||||
<field name="state" />
|
||||
</tree>
|
||||
|
||||
@@ -174,7 +174,7 @@ class project_task(osv.osv):
|
||||
tt = timebox_obj.browse(cr, uid, timebox_obj.search(cr,uid,[]))
|
||||
search_extended ='''<newline/><group col="%d" expand="0" string="%s" groups="project_gtd.group_project_getting">''' % (len(tt)+7,_('Getting Things Done'))
|
||||
search_extended += '''<filter domain="[('timebox_id','=', False)]" context="{'set_editable':True,'set_visible':True}" icon="gtk-new" string="%s"/>''' % (_('Inbox'),)
|
||||
search_extended += '''<filter domain="[('state', 'in', ('draft','open','pending'))]" context="{'set_editable':True,'set_visible':True}" icon="gtk-new" string="%s"/>''' % (_('All'),)
|
||||
search_extended += '''<filter domain="[('state', 'in', ('draft','open','pending'))]" context="{'set_editable':True,'set_visible':True}" icon="gtk-new" string="%s"/>''' % (_('Editable'),)
|
||||
search_extended += '''<separator orientation="vertical"/>'''
|
||||
for time in tt:
|
||||
if time.icon:
|
||||
|
||||
@@ -26,6 +26,7 @@ class purchase_installer(osv.osv_memory):
|
||||
|
||||
_columns = {
|
||||
'purchase_requisition':fields.boolean('Purchase Requisition',help="Manages your Purchase Requisition and allow you to easily keep track and manage all your purchase orders."),
|
||||
'purchase_analytic_plans': fields.boolean('Purchase Analytic Plans',help="Manages analytic distribution and purchase orders.")
|
||||
}
|
||||
purchase_installer()
|
||||
|
||||
|
||||
@@ -20,13 +20,14 @@
|
||||
</separator>
|
||||
<xpath expr="//label[@string='description']"
|
||||
position="attributes">
|
||||
<attribute name="string">After having installed the core purchase application, you can extend it with more modules on needs of your organization</attribute>
|
||||
<attribute name="string">In this page, you can extend your purchase system with purchase requisition facility and analytic distribution of purchase orders.</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//button[@string='Install Modules']" position="attributes">
|
||||
<attribute name="string">Configure</attribute>
|
||||
</xpath>
|
||||
<group colspan="8">
|
||||
<field name="purchase_requisition"/>
|
||||
<field name="purchase_analytic_plans"/>
|
||||
</group>
|
||||
</data>
|
||||
</field>
|
||||
|
||||
@@ -26,9 +26,17 @@ class report_designer_installer(osv.osv_memory):
|
||||
|
||||
_columns = {
|
||||
# Reporting
|
||||
'base_report_designer':fields.boolean('OpenOffice Report Designer'),
|
||||
'base_report_creator':fields.boolean('Query Builder'),
|
||||
'olap':fields.boolean('Business Intelligence Report'),
|
||||
'base_report_designer':fields.boolean('OpenOffice Report Designer',help="This module adds wizards to import/export .SXW report that "
|
||||
"you can modify in OpenOffice.Once you have modified it you can "
|
||||
"upload the report using the same wizard."),
|
||||
'base_report_creator':fields.boolean('Query Builder',help="his module allows you to create any statistic "
|
||||
"reports on several objects. It's a SQL query builder and browser for and users. "
|
||||
"After installation, it adds a menu to define custom report in the Dashboard menu."),
|
||||
'olap':fields.boolean('Business Intelligence Report',help="Olap module is used to install BI module in client. Olap provides Online "
|
||||
"Analytical Process with the mdx query. BI provides Cube Browsing and Cube Designing. "
|
||||
"After installation you will get Cube Browser and Cube Desinger in Reporting Menu. "
|
||||
"Cube Browser is used to generate the reports with table view (mdx view) of mdx query "
|
||||
"and Cube designer is used to make cubes in BI."),
|
||||
}
|
||||
report_designer_installer()
|
||||
|
||||
|
||||
+17
-6
@@ -233,7 +233,7 @@ class sale_order(osv.osv):
|
||||
|
||||
'incoterm': fields.selection(_incoterm_get, 'Incoterm', size=3, help="Incoterm which stands for 'International Commercial terms' implies its a series of sales terms which are used in the commercial transaction"),
|
||||
'picking_policy': fields.selection([('direct', 'Partial Delivery'), ('one', 'Complete Delivery')],
|
||||
'Picking Policy', required=True, help="""If you don't have enough stock available to deliver all at once, do you accept partial shipments or not?"""),
|
||||
'Picking Policy', required=True, readonly=True, states={'draft': [('readonly', False)]}, help="""If you don't have enough stock available to deliver all at once, do you accept partial shipments or not?"""),
|
||||
'order_policy': fields.selection([
|
||||
('prepaid', 'Payment Before Delivery'),
|
||||
('manual', 'Shipping & Manual Invoice'),
|
||||
@@ -785,8 +785,8 @@ class sale_order_line(osv.osv):
|
||||
res = {}
|
||||
context = context or {}
|
||||
for line in self.browse(cr, uid, ids, context=context):
|
||||
price = line.price_unit * line.product_uom_qty * (1 - (line.discount or 0.0) / 100.0)
|
||||
taxes = tax_obj.compute_all(cr, uid, line.tax_id, price, line.product_uom_qty)
|
||||
price = line.price_unit * (1 - (line.discount or 0.0) / 100.0)
|
||||
taxes = tax_obj.compute_all(cr, uid, line.tax_id, price, line.product_uom_qty, line.order_id.partner_invoice_id.id, line.product_id, line.order_id.partner_id)
|
||||
cur = line.order_id.pricelist_id.currency_id
|
||||
res[line.id] = cur_obj.round(cr, uid, cur, taxes['total'])
|
||||
return res
|
||||
@@ -828,7 +828,7 @@ class sale_order_line(osv.osv):
|
||||
'discount': fields.float('Discount (%)', digits=(16, 2), readonly=True, states={'draft':[('readonly',False)]}),
|
||||
'number_packages': fields.function(_number_packages, method=True, type='integer', string='Number Packages'),
|
||||
'notes': fields.text('Notes'),
|
||||
'th_weight': fields.float('Weight'),
|
||||
'th_weight': fields.float('Weight', readonly=True, states={'draft':[('readonly',False)]}),
|
||||
'state': fields.selection([('draft', 'Draft'),('confirmed', 'Confirmed'),('done', 'Done'),('cancel', 'Cancelled'),('exception', 'Exception')], 'State', required=True, readonly=True,
|
||||
help=' * The \'Draft\' state is set automatically when sale order in draft state. \
|
||||
\n* The \'Confirmed\' state is set automatically when sale order in confirm state. \
|
||||
@@ -837,7 +837,7 @@ class sale_order_line(osv.osv):
|
||||
\n* The \'Cancelled\' state is set automatically when user cancel sale order.'),
|
||||
'order_partner_id': fields.related('order_id', 'partner_id', type='many2one', relation='res.partner', string='Customer'),
|
||||
'salesman_id':fields.related('order_id', 'user_id', type='many2one', relation='res.users', string='Salesman'),
|
||||
'company_id': fields.related('order_id', 'company_id', type='many2one', relation='res.company', string='Company', store=True),
|
||||
'company_id': fields.related('order_id', 'company_id', type='many2one', relation='res.company', string='Company', store=True, readonly=True, states={'draft':[('readonly',False)]}),
|
||||
}
|
||||
_order = 'sequence, id'
|
||||
_defaults = {
|
||||
@@ -852,9 +852,17 @@ class sale_order_line(osv.osv):
|
||||
'product_packaging': False
|
||||
}
|
||||
|
||||
def create_sale_order_line_invoice(self, cr, uid, ids, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
context.update({'active_ids' : ids,'active_id' : ids})
|
||||
self.pool.get('sale.order.line.make.invoice').make_invoices(cr, uid, ids, context=context)
|
||||
return True
|
||||
|
||||
def invoice_line_create(self, cr, uid, ids, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
|
||||
def _get_line_qty(line):
|
||||
if (line.order_id.invoice_quantity=='order') or not line.procurement_id:
|
||||
if line.product_uos:
|
||||
@@ -919,7 +927,6 @@ class sale_order_line(osv.osv):
|
||||
|
||||
sales[line.order_id.id] = True
|
||||
create_ids.append(inv_id)
|
||||
|
||||
# Trigger workflow events
|
||||
wf_service = netsvc.LocalService("workflow")
|
||||
for sid in sales.keys():
|
||||
@@ -932,6 +939,10 @@ class sale_order_line(osv.osv):
|
||||
for line in self.browse(cr, uid, ids, context=context):
|
||||
if line.invoiced:
|
||||
raise osv.except_osv(_('Invalid action !'), _('You cannot cancel a sale order line that has already been invoiced !'))
|
||||
# if line.order_id.picking_ids:
|
||||
# raise osv.except_osv(
|
||||
# _('Could not cancel sale order line!'),
|
||||
# _('You must first cancel stock move attached to this sale order line.'))
|
||||
message = _('Sale order line') + " '" + line.name + "' "+_("is cancelled")
|
||||
self.log(cr, uid, id, message)
|
||||
return self.write(cr, uid, ids, {'state': 'cancel'})
|
||||
|
||||
+19
-14
@@ -165,10 +165,10 @@
|
||||
<field name="state"/>
|
||||
<field name="invoiced"/>
|
||||
<button colspan="1"
|
||||
name="%(action_view_sale_order_line_make_invoice)d"
|
||||
name="create_sale_order_line_invoice"
|
||||
states="confirmed"
|
||||
string="Make Invoice"
|
||||
type="action"
|
||||
string="Create Invoice"
|
||||
type="object"
|
||||
icon="terp-document-new" />
|
||||
</group>
|
||||
</page>
|
||||
@@ -396,20 +396,24 @@
|
||||
<field colspan="4" name="tax_id" domain="[('parent_id','=',False),('type_tax_use','<>','purchase')]" nolabel="1"/>
|
||||
<separator colspan="4" string="States"/>
|
||||
<field name="state"/>
|
||||
<button colspan="1"
|
||||
name="%(action_view_sale_order_line_make_invoice)d"
|
||||
string="Make Invoice"
|
||||
type="action"
|
||||
icon="terp-document-new" />
|
||||
<group col="2" colspan="2">
|
||||
<group col="3" colspan="2">
|
||||
<button colspan="1"
|
||||
name="create_sale_order_line_invoice"
|
||||
states="confirmed"
|
||||
string="Create Invoice"
|
||||
type="object"
|
||||
icon="terp-document-new"
|
||||
attrs="{'invisible': [('invoiced', '=', 1)]}"/>
|
||||
<button name="button_cancel"
|
||||
states="confirmed,exception"
|
||||
string="Cancel" type="object"
|
||||
icon="gtk-cancel"
|
||||
attrs="{'invisible': [('invoiced', '=', 1)]}" />
|
||||
<button name="button_done"
|
||||
states="confirmed,exception"
|
||||
string="Done" type="object"
|
||||
icon="gtk-jump-to" />
|
||||
<button name="button_cancel"
|
||||
states="confirmed,exception"
|
||||
string="Cancel" type="object"
|
||||
icon="gtk-cancel" />
|
||||
icon="gtk-jump-to"
|
||||
attrs="{'invisible': [('invoiced', '=', 0)]}"/>
|
||||
</group>
|
||||
</page>
|
||||
<!-- <page string="Properties" groups="base.group_extended">-->
|
||||
@@ -492,6 +496,7 @@
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form,graph</field>
|
||||
<field name="search_view_id" ref="view_sales_order_uninvoiced_line_filter" />
|
||||
<field name="context">{"search_default_uninvoiced":1}</field>
|
||||
<field name="filter" eval="True"/>
|
||||
</record>
|
||||
|
||||
|
||||
@@ -1,30 +1,39 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
<record id="view_sale_order_make_invoice" model="ir.ui.view">
|
||||
<record id="view_sale_order_make_invoice" model="ir.ui.view">
|
||||
<field name="name">Create invoices</field>
|
||||
<field name="model">sale.make.invoice</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Create invoices">
|
||||
<separator colspan="4" string="Do you really want to create the invoice(s) ?" />
|
||||
<field name="grouped"/>
|
||||
<newline/>
|
||||
<field name="invoice_date"/>
|
||||
<separator string="" colspan="6"/>
|
||||
<button special="cancel" string="Cancel" icon="gtk-cancel"/>
|
||||
<button name="make_invoices" string="Create Invoices" type="object" icon="gtk-ok"/>
|
||||
</form>
|
||||
<form string="Create invoices">
|
||||
<separator colspan="4" string="Do you really want to create the invoice(s) ?" />
|
||||
<field name="grouped"/>
|
||||
<newline/>
|
||||
<field name="invoice_date"/>
|
||||
<separator string="" colspan="6"/>
|
||||
<button special="cancel" string="Cancel" icon="gtk-cancel"/>
|
||||
<button name="make_invoices" string="Create Invoices" type="object" icon="gtk-ok"/>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
</record>
|
||||
|
||||
<act_window name="Make Invoices"
|
||||
res_model="sale.make.invoice"
|
||||
src_model="sale.order"
|
||||
view_mode="form"
|
||||
target="new"
|
||||
<record id="action_sale_order_make_invoice" model="ir.actions.act_window">
|
||||
<field name="name">Make Invoices</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">sale.make.invoice</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
|
||||
<act_window name="Make Invoices"
|
||||
res_model="sale.make.invoice"
|
||||
src_model="sale.order"
|
||||
view_mode="form"
|
||||
target="new"
|
||||
key2="client_action_multi"
|
||||
id="action_view_sale_order_make_invoice"/>
|
||||
id="action_view_sale_order_make_invoice"/>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
@@ -22,6 +22,8 @@
|
||||
from osv import fields, osv
|
||||
from tools.translate import _
|
||||
from mx.DateTime import now
|
||||
import time
|
||||
import decimal_precision as dp
|
||||
|
||||
class crm_make_sale(osv.osv_memory):
|
||||
""" Make sale order for crm """
|
||||
@@ -100,7 +102,6 @@ class crm_make_sale(osv.osv_memory):
|
||||
vals = {
|
||||
'origin': 'Opportunity:%s' % str(case.id),
|
||||
'section_id': case.section_id and case.section_id.id or False,
|
||||
'picking_policy': make.picking_policy,
|
||||
'shop_id': make.shop_id.id,
|
||||
'partner_id': partner_id,
|
||||
'pricelist_id': pricelist,
|
||||
@@ -119,14 +120,16 @@ class crm_make_sale(osv.osv_memory):
|
||||
if make.analytic_account.id:
|
||||
vals['project_id'] = make.analytic_account.id
|
||||
new_id = sale_obj.create(cr, uid, vals)
|
||||
for product_id in make.product_ids:
|
||||
for line in make.sale_order_line:
|
||||
value = sale_line_obj.product_id_change(cr, uid, [], pricelist,
|
||||
product_id.id, qty=1, partner_id=partner_id, fiscal_position=fpos)['value']
|
||||
value['product_id'] = product_id.id
|
||||
line.product_id.id, qty=1, partner_id=partner_id, fiscal_position=fpos)['value']
|
||||
value['product_id'] =line.product_id.id
|
||||
value['order_id'] = new_id
|
||||
value['tax_id'] = [(6,0,value['tax_id'])]
|
||||
value['tax_id'] = [(6,0,line['tax_id'])]
|
||||
value['product_uom_qty']=line.product_uom_qty
|
||||
value['discount']=line.discount
|
||||
value['product_uom']=line.product_uom.id
|
||||
sale_line_obj.create(cr, uid, value)
|
||||
|
||||
case_obj.write(cr, uid, [case.id], {'ref': 'sale.order,%s' % new_id})
|
||||
new_ids.append(new_id)
|
||||
message = _('Opportunity ') + " '" + case.name + "' "+ _("is converted to Sales Quotation.")
|
||||
@@ -163,10 +166,7 @@ class crm_make_sale(osv.osv_memory):
|
||||
_columns = {
|
||||
'shop_id': fields.many2one('sale.shop', 'Shop', required=True),
|
||||
'partner_id': fields.many2one('res.partner', 'Customer', required=True, help='Use this partner if there is no partner on the Opportunity'),
|
||||
'picking_policy': fields.selection([('direct','Partial Delivery'),
|
||||
('one','Complete Delivery')], 'Picking Policy', required=True),
|
||||
'product_ids': fields.many2many('product.product', 'product_sale_rel',\
|
||||
'sale_id', 'product_id', 'Products'),
|
||||
'sale_order_line': fields.one2many('sale.order.make.line', 'order_line', 'Product Line', readonly=True, states={'draft': [('readonly', False)]}),
|
||||
'analytic_account': fields.many2one('account.analytic.account', 'Analytic Account'),
|
||||
'close': fields.boolean('Close Case', help='Check this to close the case after having created the sale order.'),
|
||||
}
|
||||
@@ -174,6 +174,160 @@ class crm_make_sale(osv.osv_memory):
|
||||
'partner_id': _selectPartner,
|
||||
'close': 1
|
||||
}
|
||||
|
||||
|
||||
crm_make_sale()
|
||||
|
||||
class sale_order_make_line(osv.osv_memory):
|
||||
|
||||
|
||||
def product_id_change(self, cr, uid, ids, pricelist, product, qty=0,
|
||||
uom=False, qty_uos=0, uos=False, name='', partner_id=False,
|
||||
lang=False, update_tax=True, date_order=False, packaging=False, fiscal_position=False, flag=False):
|
||||
if not partner_id:
|
||||
raise osv.except_osv(_('No Customer Defined !'), _('You have to select a customer in the sale form !\nPlease set one customer before choosing a product.'))
|
||||
warning = {}
|
||||
product_uom_obj = self.pool.get('product.uom')
|
||||
partner_obj = self.pool.get('res.partner')
|
||||
product_obj = self.pool.get('product.product')
|
||||
if partner_id:
|
||||
lang = partner_obj.browse(cr, uid, partner_id).lang
|
||||
context = {'lang': lang, 'partner_id': partner_id}
|
||||
|
||||
if not product:
|
||||
return {'value': {'th_weight': 0, 'product_packaging': False,
|
||||
'product_uos_qty': qty}, 'domain': {'product_uom': [],
|
||||
'product_uos': []}}
|
||||
|
||||
if not date_order:
|
||||
date_order = time.strftime('%Y-%m-%d')
|
||||
|
||||
result = {}
|
||||
product_obj = product_obj.browse(cr, uid, product, context=context)
|
||||
if not packaging and product_obj.packaging:
|
||||
packaging = product_obj.packaging[0].id
|
||||
result['product_packaging'] = packaging
|
||||
|
||||
if packaging:
|
||||
default_uom = product_obj.uom_id and product_obj.uom_id.id
|
||||
pack = self.pool.get('product.packaging').browse(cr, uid, packaging, context=context)
|
||||
q = product_uom_obj._compute_qty(cr, uid, uom, pack.qty, default_uom)
|
||||
# qty = qty - qty % q + q
|
||||
if qty and (q and not (qty % q) == 0):
|
||||
ean = pack.ean
|
||||
qty_pack = pack.qty
|
||||
type_ul = pack.ul
|
||||
warn_msg = _("You selected a quantity of %d Units.\nBut it's not compatible with the selected packaging.\nHere is a proposition of quantities according to the packaging: ") % (qty)
|
||||
warn_msg = warn_msg + "\n\n" + _("EAN: ") + str(ean) + _(" Quantity: ") + str(qty_pack) + _(" Type of ul: ") + str(type_ul.name)
|
||||
warning = {
|
||||
'title': _('Picking Information !'),
|
||||
'message': warn_msg
|
||||
}
|
||||
result['product_uom_qty'] = qty
|
||||
|
||||
uom2 = False
|
||||
if uom:
|
||||
uom2 = product_uom_obj.browse(cr, uid, uom)
|
||||
if product_obj.uom_id.category_id.id != uom2.category_id.id:
|
||||
uom = False
|
||||
|
||||
if uos:
|
||||
if product_obj.uos_id:
|
||||
uos2 = product_uom_obj.browse(cr, uid, uos)
|
||||
if product_obj.uos_id.category_id.id != uos2.category_id.id:
|
||||
uos = False
|
||||
else:
|
||||
uos = False
|
||||
if product_obj.description_sale:
|
||||
result['notes'] = product_obj.description_sale
|
||||
fpos = fiscal_position and self.pool.get('account.fiscal.position').browse(cr, uid, fiscal_position) or False
|
||||
if update_tax: #The quantity only have changed
|
||||
result['delay'] = (product_obj.sale_delay or 0.0)
|
||||
partner = partner_obj.browse(cr, uid, partner_id)
|
||||
result['tax_id'] = self.pool.get('account.fiscal.position').map_tax(cr, uid, fpos, product_obj.taxes_id)
|
||||
result.update({'type': product_obj.procure_method})
|
||||
|
||||
if not flag:
|
||||
result['name'] = self.pool.get('product.product').name_get(cr, uid, [product_obj.id], context=context)[0][1]
|
||||
domain = {}
|
||||
if (not uom) and (not uos):
|
||||
result['product_uom'] = product_obj.uom_id.id
|
||||
if product_obj.uos_id:
|
||||
result['product_uos'] = product_obj.uos_id.id
|
||||
result['product_uos_qty'] = qty * product_obj.uos_coeff
|
||||
uos_category_id = product_obj.uos_id.category_id.id
|
||||
else:
|
||||
result['product_uos'] = False
|
||||
result['product_uos_qty'] = qty
|
||||
uos_category_id = False
|
||||
domain = {'product_uom':
|
||||
[('category_id', '=', product_obj.uom_id.category_id.id)],
|
||||
'product_uos':
|
||||
[('category_id', '=', uos_category_id)]}
|
||||
|
||||
elif uos and not uom: # only happens if uom is False
|
||||
result['product_uom'] = product_obj.uom_id and product_obj.uom_id.id
|
||||
result['product_uom_qty'] = qty_uos / product_obj.uos_coeff
|
||||
elif uom: # whether uos is set or not
|
||||
default_uom = product_obj.uom_id and product_obj.uom_id.id
|
||||
q = product_uom_obj._compute_qty(cr, uid, uom, qty, default_uom)
|
||||
if product_obj.uos_id:
|
||||
result['product_uos'] = product_obj.uos_id.id
|
||||
result['product_uos_qty'] = qty * product_obj.uos_coeff
|
||||
else:
|
||||
result['product_uos'] = False
|
||||
result['product_uos_qty'] = qty
|
||||
|
||||
if not uom2:
|
||||
uom2 = product_obj.uom_id
|
||||
return {'value': result, 'domain': domain, 'warning': warning}
|
||||
|
||||
def product_uom_change(self, cursor, user, ids, pricelist, product, qty=0,
|
||||
uom=False, qty_uos=0, uos=False, name='', partner_id=False,
|
||||
lang=False, update_tax=True, date_order=False):
|
||||
res = self.product_id_change(cursor, user, ids, pricelist, product,
|
||||
qty=qty, uom=uom, qty_uos=qty_uos, uos=uos, name=name,
|
||||
partner_id=partner_id, lang=lang, update_tax=update_tax,
|
||||
date_order=date_order)
|
||||
if 'product_uom' in res['value']:
|
||||
del res['value']['product_uom']
|
||||
if not uom:
|
||||
res['value']['price_unit'] = 0.0
|
||||
return res
|
||||
|
||||
_name = 'sale.order.make.line'
|
||||
_description = 'Sale Order Line'
|
||||
_columns = {
|
||||
'order_line': fields.many2one('crm.make.sale', 'Order Reference', required=True, ondelete='cascade', select=True, readonly=True, ),
|
||||
'order_id': fields.many2one('sale.order', 'Order Reference', required=True, ondelete='cascade', select=True, readonly=True, ),
|
||||
'name': fields.char('Description', size=256, required=True, select=True, readonly=True, ),
|
||||
'sequence': fields.integer('Sequence', help="Gives the sequence order when displaying a list of sale order lines."),
|
||||
'delay': fields.float('Delivery Lead Time', required=True, help="Number of days between the order confirmation the the shipping of the products to the customer", readonly=True, ),
|
||||
'product_id': fields.many2one('product.product', 'Product', domain=[('sale_ok', '=', True)], change_default=True),
|
||||
'procurement_id': fields.many2one('procurement.order', 'Procurement'),
|
||||
'price_unit': fields.float('Unit Price', required=True, digits_compute= dp.get_precision('Sale Price'), readonly=True, ),
|
||||
'tax_id': fields.many2many('account.tax', 'sale_order_tax', 'order_line_id', 'tax_id', 'Taxes', readonly=True, states={'draft':[('readonly',False)]}),
|
||||
'type': fields.selection([('make_to_stock', 'from stock'), ('make_to_order', 'on order')], 'Procurement Method', required=True, readonly=True, states={'draft':[('readonly',False)]}),
|
||||
'product_uom_qty': fields.float('Quantity (UoM)', digits=(16, 2), required=True, readonly=True, states={'draft':[('readonly',False)]}),
|
||||
'product_uom': fields.many2one('product.uom', 'Unit of Measure ', required=True, readonly=True, states={'draft':[('readonly',False)]}),
|
||||
'product_uos_qty': fields.float('Quantity (UoS)', readonly=True, states={'draft':[('readonly',False)]}),
|
||||
'product_uos': fields.many2one('product.uom', 'Product UoS'),
|
||||
'product_packaging': fields.many2one('product.packaging', 'Packaging'),
|
||||
'discount': fields.float('Discount (%)', digits=(16, 2), readonly=True, states={'draft':[('readonly',False)]}),
|
||||
'notes': fields.text('Notes'),
|
||||
}
|
||||
_order = 'sequence, id'
|
||||
_defaults = {
|
||||
'discount': 0.0,
|
||||
'delay': 0.0,
|
||||
'product_uom_qty': 1,
|
||||
'product_uos_qty': 1,
|
||||
'type': 'make_to_stock',
|
||||
'product_packaging': False
|
||||
}
|
||||
|
||||
sale_order_make_line()
|
||||
|
||||
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
@@ -9,21 +9,66 @@
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Create a Sale Order" >
|
||||
<group width="660" height="300">
|
||||
<group colspan="4">
|
||||
<field name="partner_id" required="1"/>
|
||||
<field name="shop_id" required="1" widget="selection"/>
|
||||
<field name="analytic_account"/>
|
||||
<field name="picking_policy"/>
|
||||
<field name="close" required="1"/>
|
||||
</group>
|
||||
<separator string="Products" colspan="4"/>
|
||||
<field name="product_ids" colspan="4" nolabel="1"/>
|
||||
</group>
|
||||
<field colspan="4" mode="tree,form,graph" name="sale_order_line" nolabel="1" widget="one2many_list">
|
||||
<form string="Sale Order Lines">
|
||||
<notebook>
|
||||
<page string="Order Line">
|
||||
<field colspan="4"
|
||||
context="partner_id=parent.partner_id,quantity=product_uom_qty,pricelist=parent.pricelist_id,shop=parent.shop_id,uom=product_uom"
|
||||
name="product_id"
|
||||
on_change="product_id_change(parent.pricelist_id,product_id,product_uom_qty,product_uom,product_uos_qty,product_uos,name,parent.partner_id, 'lang' in context and context['lang'], True, parent.date_order, product_packaging, parent.fiscal_position, False)"
|
||||
/>
|
||||
<field
|
||||
context="partner_id=parent.partner_id,quantity=product_uom_qty,pricelist=parent.pricelist_id,shop=parent.shop_id,uom=product_uom"
|
||||
name="product_uom_qty"
|
||||
on_change="product_id_change(parent.pricelist_id,product_id,product_uom_qty,product_uom,product_uos_qty,product_uos,name,parent.partner_id, 'lang' in context and context['lang'], False, parent.date_order, product_packaging, parent.fiscal_position, True)"
|
||||
/>
|
||||
<field groups="product.group_uos" name="product_uos_qty"/>
|
||||
<field name="product_uom"
|
||||
on_change="product_uom_change(parent.pricelist_id,product_id,product_uom_qty,product_uom,product_uos_qty,product_uos,name,parent.partner_id, 'lang' in context and context['lang'], False, parent.date_order)"/>
|
||||
<field
|
||||
name="product_packaging"
|
||||
context="partner_id=parent.partner_id,quantity=product_uom_qty,pricelist=parent.pricelist_id,shop=parent.shop_id,uom=product_uom"
|
||||
on_change="product_id_change(parent.pricelist_id,product_id,product_uom_qty,product_uom,product_uos_qty,product_uos,name,parent.partner_id, 'lang' in context and context['lang'], False, parent.date_order, product_packaging, parent.fiscal_position, False)"
|
||||
domain="[('product_id','=',product_id)]"
|
||||
groups="base.group_extended"/>
|
||||
|
||||
<field colspan="4" name="name"/>
|
||||
<field name="price_unit"/>
|
||||
<field name="discount"/>
|
||||
<field name="type" groups="base.group_extended"/>
|
||||
<field name="delay" groups="base.group_extended"/>
|
||||
<newline/>
|
||||
<separator colspan="5" string="Taxes"/>
|
||||
<field colspan="4" name="tax_id" nolabel="1" domain="[('parent_id','=',False),('type_tax_use','<>','purchase')]"/>
|
||||
</page>
|
||||
</notebook>
|
||||
</form>
|
||||
<tree string="Sales order lines">
|
||||
<field colspan="4" name="name"/>
|
||||
<field name="product_uom_qty" string="Qty"/>
|
||||
<field name="product_uom" string="UoM"/>
|
||||
<field name="discount"/>
|
||||
<field name="price_unit"/>
|
||||
</tree>
|
||||
</field>
|
||||
<newline/>
|
||||
|
||||
|
||||
<separator colspan="4"/>
|
||||
<group col="4" colspan="4">
|
||||
<label string="" colspan="2"/>
|
||||
<button special="cancel" string="_Close" icon="gtk-cancel"/>
|
||||
<button name="makeOrder" string="_Ok" type="object" icon='gtk-ok'/>
|
||||
</group>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -248,7 +248,7 @@ class scrum_product_backlog(osv.osv):
|
||||
'note' : fields.text('Note'),
|
||||
'active' : fields.boolean('Active', help="If Active field is set to true, it will allow you to hide the product backlog without removing it."),
|
||||
'project_id': fields.many2one('project.project', 'Project', required=True, domain=[('scrum','=',1)], help="If you have [?] in the project name, it means there are no analytic account linked to this project."),
|
||||
'user_id': fields.many2one('res.users', 'Responsible'),
|
||||
'user_id': fields.many2one('res.users', 'Author'),
|
||||
'sprint_id': fields.many2one('scrum.sprint', 'Sprint'),
|
||||
'sequence' : fields.integer('Sequence', help="Gives the sequence order when displaying a list of product backlog."),
|
||||
'tasks_id': fields.one2many('project.task', 'product_backlog_id', 'Tasks Details'),
|
||||
|
||||
@@ -134,7 +134,7 @@
|
||||
icon="terp-check"
|
||||
string="Current"
|
||||
name="current"
|
||||
domain="['|','&',('sprint_id.date_start','<=',time.strftime('%%Y-%%m-%%d')), ('sprint_id.date_stop','>=',time.strftime('%%Y-%%m-%%d')), ('state','in',['draft','open'])]"
|
||||
domain="['|','&',('sprint_id.date_start','<=',time.strftime('%%Y-%%m-%%d')), ('sprint_id.date_stop','>=',time.strftime('%%Y-%%m-%%d')), ('state','in',['draft','open','pending'])]"
|
||||
help="Current Backlogs"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter icon="terp-document-new" string="Draft" domain="[('state','=','draft')]" help="Draft Backlogs"/>
|
||||
@@ -156,7 +156,8 @@
|
||||
<filter icon="terp-project"
|
||||
string="My Backlogs"
|
||||
name="my_user_id"
|
||||
domain="[('user_id','=',uid)]"/>
|
||||
domain="[('user_id','=',uid)]"
|
||||
help="My Backlogs"/>
|
||||
</field>
|
||||
</group>
|
||||
<newline/>
|
||||
@@ -178,7 +179,7 @@
|
||||
<field name="name">Product Backlogs</field>
|
||||
<field name="res_model">scrum.product.backlog</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="context">{"search_default_user_id":uid, 'search_default_current': 1}</field>
|
||||
<field name="context">{'search_default_current': 1}</field>
|
||||
<field name="search_view_id" ref="view_scrum_product_backlog_search"/>
|
||||
</record>
|
||||
<menuitem
|
||||
|
||||
@@ -96,9 +96,8 @@ class scrum_backlog_merge(osv.osv_memory):
|
||||
|
||||
#To assing a new product backlog to merged tasks
|
||||
task_obj.write(cr, uid, task_lines, {'product_backlog_id': id_b})
|
||||
backlog_obj.write(cr, uid, context['active_ids'], {'state':'done'}, context=context)
|
||||
backlog_obj.unlink(cr, uid, context['active_ids'], context=context)
|
||||
return {}
|
||||
|
||||
scrum_backlog_merge()
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
@@ -7,21 +7,34 @@
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Merge Backlogs">
|
||||
<label colspan="4" string="This wizard merge backlogs and create one new backlog with draft state (Old backlogs state changed to Done). And it also merge old tasks from backlogs" />
|
||||
<separator string="Are you sure you want to merge these Backlogs?" colspan="4"/>
|
||||
<label colspan="4" string="This wizard merge backlogs and create one new backlog with draft state (Old backlogs Will be deleted). And it also merge old tasks from backlogs" />
|
||||
<separator colspan="4"/>
|
||||
<button colspan="2" special="cancel" string="Cancel" icon="gtk-cancel"/>
|
||||
<button colspan="2" default_focus="1" name="check_backlogs" string="Merge" type="object" icon="gtk-execute"/>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<act_window name="Merge Backlogs"
|
||||
res_model="scrum.backlog.merge"
|
||||
src_model="scrum.product.backlog"
|
||||
view_mode="form"
|
||||
target="new"
|
||||
key2="client_action_multi"
|
||||
id="action_scrum_backlog_merge"/>
|
||||
<record id="action_scrum_backlog_merge" model="ir.actions.act_window">
|
||||
<field name="name">Merge Backlogs</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">scrum.backlog.merge</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="target">new</field>
|
||||
<field name="view_id" ref="scrum_backlog_merge_view"/>
|
||||
</record>
|
||||
|
||||
<record model="ir.values" id="scrum_backlog_merge_values">
|
||||
<field name="model_id" ref="model_scrum_product_backlog" />
|
||||
<field name="object" eval="1" />
|
||||
<field name="name">Merge Backlogs</field>
|
||||
<field name="key2">client_action_multi</field>
|
||||
<field name="value" eval="'ir.actions.act_window,' + str(ref('action_scrum_backlog_merge'))" />
|
||||
<field name="key">action</field>
|
||||
<field name="model">scrum.product.backlog</field>
|
||||
</record>
|
||||
|
||||
<record id="scrum_merge_project_id_view" model="ir.ui.view">
|
||||
<field name="name">Merge Backlogs</field>
|
||||
@@ -29,11 +42,11 @@
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Merge Backlogs">
|
||||
<separator string="Select the Project" colspan="4"/>
|
||||
<field name="project_id"/>
|
||||
<separator colspan="4"/>
|
||||
<button special="cancel" string="Cancel" icon="gtk-cancel"/>
|
||||
<button name="do_merge" string="Merge Backlogs" type="object" icon="gtk-execute"/>
|
||||
<separator string="Select the project for merged backlogs" colspan="4"/>
|
||||
<field name="project_id"/>
|
||||
<separator colspan="4"/>
|
||||
<button special="cancel" string="Cancel" icon="gtk-cancel"/>
|
||||
<button name="do_merge" string="Merge Backlogs" type="object" icon="gtk-execute"/>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<field name="inherit_id" ref="product.product_search_form_view"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="pricelist_id" position="before">
|
||||
<field name="location_id" context="{'location': self}" domain="[]"/>
|
||||
<field name="location_id" context="{'location': self}"/>
|
||||
<separator orientation="vertical"/>
|
||||
</field>
|
||||
</field>
|
||||
|
||||
@@ -1377,7 +1377,7 @@ class stock_move(osv.osv):
|
||||
'picking_id': fields.many2one('stock.picking', 'Picking List', select=True),
|
||||
'note': fields.text('Notes'),
|
||||
'state': fields.selection([('draft', 'Draft'), ('waiting', 'Waiting'), ('confirmed', 'Confirmed'), ('assigned', 'Available'), ('done', 'Done'), ('cancel', 'Cancelled')], 'State', readonly=True, select=True,
|
||||
help='When the stock move is created it is in the \'Draft\' state.\n After that it is set to \'Confirmed\' state.\n If stock is available state is set to \'Avaiable\'.\n When the picking it done the state is \'Done\'.\
|
||||
help='When the stock move is created it is in the \'Draft\' state.\n After that it is set to \'Confirmed\' state.\n If stock is available state is set to \'Available\'.\n When the picking is done the state is \'Done\'.\
|
||||
\nThe state is \'Waiting\' if the move is waiting for another one.'),
|
||||
'price_unit': fields.float('Unit Price',
|
||||
digits_compute= dp.get_precision('Account')),
|
||||
|
||||
@@ -1508,8 +1508,8 @@
|
||||
<filter icon="terp-camera_test" string="Ready" name="ready" domain="[('state','=','assigned')]" help="Future stock moves that are ready"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="product_id"/>
|
||||
<field name="location_id" string="Location" domain="['|',('location_id','ilike',self),('location_dest_id','ilike',self)]"/>
|
||||
<field name="address_id" string="Partner" context="{'contact_display':'partner'}" domain="[('picking_id.address_id','ilike',self)]"/>
|
||||
<field name="location_id" string="Location" filter_domain="['|',('location_id','ilike',self),('location_dest_id','ilike',self)]"/>
|
||||
<field name="address_id" string="Partner" context="{'contact_display':'partner'}" filter_domain="[('picking_id.address_id','ilike',self)]"/>
|
||||
<field name="date_planned"/>
|
||||
</group>
|
||||
<newline/>
|
||||
@@ -1676,7 +1676,7 @@
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Extended options..." groups="base.group_extended">
|
||||
<field name="tracking_id" context="{'tracking': self}" domain="[]" />
|
||||
<field name="tracking_id" context="{'tracking': self}" filter_domain="[]" />
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
@@ -1969,4 +1969,4 @@
|
||||
parent="menu_warehouse_config" />
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
</openerp>
|
||||
|
||||
@@ -34,7 +34,7 @@ class survey_print(osv.osv_memory):
|
||||
('horizontal','Landscape(Horizontal)')], 'Orientation'),
|
||||
'paper_size' : fields.selection([('letter','Letter (8.5" x 11")'),\
|
||||
('legal','Legal (8.5" x 14")'),('a4','A4 (210mm x 297mm)')], 'Paper Size'),
|
||||
'page_number' : fields.boolean('Include Page Numvers'),
|
||||
'page_number' : fields.boolean('Include Page Number'),
|
||||
'without_pagebreak' : fields.boolean('Print Without Page Breaks'),
|
||||
}
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ class survey_print_answer(osv.osv_memory):
|
||||
'paper_size': fields.selection([('letter','Letter (8.5" x 11")'),\
|
||||
('legal','Legal (8.5" x 14")'),\
|
||||
('a4','A4 (210mm x 297mm)')], 'Paper Size'),
|
||||
'page_number': fields.boolean('Include Page Numvers'),
|
||||
'page_number': fields.boolean('Include Page Number'),
|
||||
'without_pagebreak': fields.boolean('Print Without Page Breaks')
|
||||
}
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@ class thunderbird_installer(osv.osv_memory):
|
||||
'thunderbird' : True,
|
||||
'name' : 'tiny_plugin-2.0.xpi',
|
||||
'pdf_name' : 'Installation Guide to OpenERP Thunderbid Plug-in.pdf',
|
||||
'description' : """ * Save the Thunderbird plugin. \n * Follows the following step to install Thunderbird plugin. \n -> 1.From Menu Bar of Thunderbird, open Tools > Add ons. \n -> 2. Click on install button and a browser window appears. \n -> 3. Select the plug-in(.xpi file) and click Ok. \n -> 4. Software installation window appears and within a short time “Install Now” button will be enabled -> 5. Click "Install Now". \n -> 6. Restart Thunderbird."""
|
||||
'description' : """ * Save the Thunderbird plugin. \n * Follows the step to install Thunderbird plugin. \n -> 1.From Menu Bar of Thunderbird, open Tools > Add ons. \n -> 2. Click on install button and a browser window appears. \n -> 3. Select the plug-in(.xpi file) and click Ok. \n -> 4. Software installation window appears and within a short time “Install Now” button will be enabled \n -> 5. Click "Install Now". \n -> 6. Restart Thunderbird."""
|
||||
}
|
||||
|
||||
thunderbird_installer()
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<attribute name="string">Thunderbird</attribute>
|
||||
</separator>
|
||||
<xpath expr="//label[@string='description']" position="attributes">
|
||||
<attribute name="string">This module allows you to archive an e-mail on one or more objects of OpenERP. You can attach an email to a partner, a task, an analytic account or any other object. You can also create a new object like a lead, a phone call, claim and many more.</attribute>
|
||||
<attribute name="string">This module allows you to archive an e-mail on one or more objects of OpenERP. You can attach an email to a partner, a task, an analytic account or any other object. You can also create a new document like a lead, a phone call, claim and many more.</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//button[@string='Install Modules']" position="attributes">
|
||||
<attribute name="string">Configure</attribute>
|
||||
|
||||
+20
-20
@@ -7,13 +7,13 @@ msgstr ""
|
||||
"Project-Id-Version: OpenERP Server 5.0.4\n"
|
||||
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
||||
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
|
||||
"PO-Revision-Date: 2010-05-10 17:37+0000\n"
|
||||
"Last-Translator: Nurettin Ayarcı <nurettinx@gmail.com>\n"
|
||||
"PO-Revision-Date: 2010-07-12 11:45+0000\n"
|
||||
"Last-Translator: adsiz_1029@hotmail.com <Unknown>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-06-22 04:17+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-07-13 03:49+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: wiki
|
||||
@@ -30,7 +30,7 @@ msgstr "Nesne adı x_ ile başlamalı ve özel karakter içermemelidir!"
|
||||
#. module: wiki
|
||||
#: model:ir.model,name:wiki.model_wiki_groups_link
|
||||
msgid "Wiki Groups Links"
|
||||
msgstr ""
|
||||
msgstr "Wiki Grupları Bağlantıları"
|
||||
|
||||
#. module: wiki
|
||||
#: field:wiki.wiki,create_uid:0
|
||||
@@ -45,7 +45,7 @@ msgstr ""
|
||||
#. module: wiki
|
||||
#: field:wiki.groups.link,action_id:0
|
||||
msgid "Menu"
|
||||
msgstr ""
|
||||
msgstr "Menü"
|
||||
|
||||
#. module: wiki
|
||||
#: field:wiki.groups,child_ids:0
|
||||
@@ -57,7 +57,7 @@ msgstr ""
|
||||
#: model:ir.actions.act_window,name:wiki.action_wiki
|
||||
#: model:ir.ui.menu,name:wiki.menu_action_wiki_wiki
|
||||
msgid "Wiki Pages"
|
||||
msgstr ""
|
||||
msgstr "Wiki Sayfaları"
|
||||
|
||||
#. module: wiki
|
||||
#: field:wiki.groups,section:0
|
||||
@@ -68,7 +68,7 @@ msgstr ""
|
||||
#: model:ir.model,name:wiki.model_wiki_wiki_history
|
||||
#: view:wiki.wiki.history:0
|
||||
msgid "Wiki History"
|
||||
msgstr ""
|
||||
msgstr "Wiki Geçmiş"
|
||||
|
||||
#. module: wiki
|
||||
#: field:wiki.wiki,minor_edit:0
|
||||
@@ -94,7 +94,7 @@ msgstr ""
|
||||
#: field:wiki.groups,name:0
|
||||
#: field:wiki.wiki,group_id:0
|
||||
msgid "Wiki Group"
|
||||
msgstr ""
|
||||
msgstr "Wiki Toplulugu"
|
||||
|
||||
#. module: wiki
|
||||
#: field:wiki.wiki,name:0
|
||||
@@ -114,7 +114,7 @@ msgstr ""
|
||||
#. module: wiki
|
||||
#: model:ir.module.module,shortdesc:wiki.module_meta_information
|
||||
msgid "Document Management - Wiki"
|
||||
msgstr ""
|
||||
msgstr "Belge Yönetimi - Wiki"
|
||||
|
||||
#. module: wiki
|
||||
#: view:wiki.groups:0
|
||||
@@ -124,7 +124,7 @@ msgstr "Menü Oluştur"
|
||||
#. module: wiki
|
||||
#: field:wiki.groups,notes:0
|
||||
msgid "Description"
|
||||
msgstr ""
|
||||
msgstr "Tanım"
|
||||
|
||||
#. module: wiki
|
||||
#: field:wiki.wiki,section:0
|
||||
@@ -144,12 +144,12 @@ msgstr ""
|
||||
#. module: wiki
|
||||
#: field:wiki.wiki,write_uid:0
|
||||
msgid "Last Author"
|
||||
msgstr ""
|
||||
msgstr "Son Yazar"
|
||||
|
||||
#. module: wiki
|
||||
#: model:ir.actions.act_window,name:wiki.act_view_diff
|
||||
msgid "Differences"
|
||||
msgstr ""
|
||||
msgstr "Degişiklikler"
|
||||
|
||||
#. module: wiki
|
||||
#: help:wiki.wiki,section:0
|
||||
@@ -169,12 +169,12 @@ msgstr ""
|
||||
#. module: wiki
|
||||
#: field:wiki.wiki.history,create_date:0
|
||||
msgid "Date"
|
||||
msgstr ""
|
||||
msgstr "Tarih"
|
||||
|
||||
#. module: wiki
|
||||
#: wizard_view:wiki.make.index,init:0
|
||||
msgid "Want to create a Index on Selected Pages ? "
|
||||
msgstr ""
|
||||
msgstr "Seçili sayfada dizin yaratmak istediginizden emin misiniz? "
|
||||
|
||||
#. module: wiki
|
||||
#: view:wiki.groups:0
|
||||
@@ -185,7 +185,7 @@ msgstr ""
|
||||
#: field:wiki.groups,home:0
|
||||
#: field:wiki.groups,page_ids:0
|
||||
msgid "Pages"
|
||||
msgstr ""
|
||||
msgstr "Sayfalar"
|
||||
|
||||
#. module: wiki
|
||||
#: constraint:ir.ui.view:0
|
||||
@@ -200,7 +200,7 @@ msgstr "Metin alanı"
|
||||
#. module: wiki
|
||||
#: wizard_field:wiki.create.menu,init,menu_parent_id:0
|
||||
msgid "Parent Menu"
|
||||
msgstr ""
|
||||
msgstr "Ana Menü"
|
||||
|
||||
#. module: wiki
|
||||
#: field:wiki.wiki,create_date:0
|
||||
@@ -210,7 +210,7 @@ msgstr ""
|
||||
#. module: wiki
|
||||
#: view:wiki.groups:0
|
||||
msgid "Notes"
|
||||
msgstr ""
|
||||
msgstr "Notlar"
|
||||
|
||||
#. module: wiki
|
||||
#: wizard_view:wiki.create.menu,init:0
|
||||
@@ -269,7 +269,7 @@ msgstr "Değişiklikler"
|
||||
#. module: wiki
|
||||
#: model:ir.actions.act_window,name:wiki.act_wiki_wiki_history
|
||||
msgid "History"
|
||||
msgstr ""
|
||||
msgstr "Geçmiş"
|
||||
|
||||
#. module: wiki
|
||||
#: model:ir.ui.menu,name:wiki.menu_document
|
||||
@@ -319,12 +319,12 @@ msgstr ""
|
||||
#. module: wiki
|
||||
#: field:wiki.wiki.history,write_uid:0
|
||||
msgid "Modify By"
|
||||
msgstr ""
|
||||
msgstr "Düzenleyen"
|
||||
|
||||
#. module: wiki
|
||||
#: field:wiki.wiki,toc:0
|
||||
msgid "Table of Contents"
|
||||
msgstr ""
|
||||
msgstr "İçerik Tablosu"
|
||||
|
||||
#. module: wiki
|
||||
#: wizard_button:wiki.create.menu,init,end:0
|
||||
|
||||
Reference in New Issue
Block a user