bzr revid: pso@tinyerp.com-20101006062253-geu0k0llv46m3bzj
This commit is contained in:
pso
2010-10-06 11:52:53 +05:30
126 changed files with 1207 additions and 1308 deletions
-1
View File
@@ -120,7 +120,6 @@ module named account_voucher.
'project/analytic_account_demo.xml',
'demo/account_minimal.xml',
'account_unit_test.xml',
'board_account_demo.xml',
],
'test': [
'test/account_customer_invoice.yml',
+4 -1
View File
@@ -75,6 +75,9 @@ class account_analytic_line(osv.osv):
unit=False, journal_id=False, context=None):
if context==None:
context={}
if not journal_id:
j_ids = self.pool.get('account.analytic.journal').search(cr, uid, [('type','=','purchase')])
j_id = j_ids and j_ids[0] or False
if not journal_id or not prod_id:
return {}
product_obj = self.pool.get('product.product')
@@ -86,7 +89,7 @@ class account_analytic_line(osv.osv):
result = 0.0
is_purchase = False
if j_id.type == 'purchase':
if j_id.type <> 'sale':
a = prod.product_tmpl_id.property_account_expense.id
if not a:
a = prod.categ_id.property_account_expense_categ.id
-13
View File
@@ -1,13 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data noupdate="1">
<!--
Administrator shortcut
Demo user startup menu
-->
<record id="base.user_root" model="res.users">
<field name="action_id" ref="open_board_account"/>
</record>
</data>
</openerp>
+2 -2
View File
@@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2010-10-03 09:42+0000\n"
"PO-Revision-Date: 2010-10-04 06:51+0000\n"
"Last-Translator: Chertykov Denis <chertykov@gmail.com>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-10-04 04:57+0000\n"
"X-Launchpad-Export-Date: 2010-10-05 04:57+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account
@@ -122,7 +122,6 @@
-->
<record id="process_transition_confirmstatementfromdraft0" model="process.transition">
<field eval="[(6,0,[])]" name="role_ids"/>
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Confirm statement&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;The accountant confirms the statement.&quot;&quot;&quot;" name="note"/>
@@ -131,7 +130,6 @@
</record>
<record id="process_transition_analyticinvoice0" model="process.transition">
<field eval="[(6,0,[])]" name="role_ids"/>
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;From analytic accounts&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Analytic costs (timesheets, some purchased products, ...) come from analytic accounts. These generate draft invoices.&quot;&quot;&quot;" name="note"/>
@@ -140,7 +138,6 @@
</record>
<record id="process_transition_customerinvoice0" model="process.transition">
<field eval="[(6,0,[])]" name="role_ids"/>
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Validation&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Draft invoices are checked, validated and printed.&quot;&quot;&quot;" name="note"/>
@@ -150,7 +147,6 @@
</record>
<record id="process_transition_validentries0" model="process.transition">
<field eval="[(6,0,[])]" name="role_ids"/>
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Validation&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Accountant validates the accounting entries coming from the invoice.&quot;&quot;&quot;" name="note"/>
@@ -159,7 +155,6 @@
</record>
<record id="process_transition_entriesreconcile0" model="process.transition">
<field eval="[(6,0,[])]" name="role_ids"/>
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Accounting entries&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Accounting entries are the first input of the reconciliation.&quot;&quot;&quot;" name="note"/>
@@ -168,7 +163,6 @@
</record>
<record id="process_transition_statemententries0" model="process.transition">
<field eval="[(6,0,[])]" name="role_ids"/>
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Validation&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Manual or automatic creation of payment entries according to the statements&quot;&quot;&quot;" name="note"/>
@@ -177,7 +171,6 @@
</record>
<record id="process_transition_paymentreconcile0" model="process.transition">
<field eval="[(6,0,[])]" name="role_ids"/>
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Payment entries&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Payment entries are the second input of the reconciliation.&quot;&quot;&quot;" name="note"/>
@@ -186,7 +179,6 @@
</record>
<record id="process_transition_reconcilepaid0" model="process.transition">
<field eval="[(6,0,[])]" name="role_ids"/>
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Payment&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;As soon as the reconciliation is done, the invoice can be paid.&quot;&quot;&quot;" name="note"/>
@@ -65,7 +65,6 @@
-->
<record id="process_transition_filestatement0" model="process.transition">
<field eval="[(6,0,[])]" name="role_ids"/>
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Automatic import of the bank statement&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Import of the statement in the system from an electronic file&quot;&quot;&quot;" name="note"/>
@@ -74,7 +73,6 @@
</record>
<record id="process_transition_invoicemanually0" model="process.transition">
<field eval="[(6,0,[])]" name="role_ids"/>
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Manual entry&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;A statement with manual entries becomes a draft statement.&quot;&quot;&quot;" name="note"/>
@@ -84,7 +82,6 @@
</record>
<record id="process_transition_invoiceimport0" model="process.transition">
<field eval="[(6,0,[])]" name="role_ids"/>
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Import from invoice or payment&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Import of the statement in the system from a supplier or customer invoice&quot;&quot;&quot;" name="note"/>
@@ -1,21 +1,21 @@
<?xml version="1.0" ?>
<openerp>
<data>
<!--
Process
<!--
Process
-->
<record id="process_process_supplierinvoiceprocess0" model="process.process">
<field eval="1" name="active"/>
<field name="model_id" ref="account.model_account_invoice"/>
<field eval="&quot;&quot;&quot;Supplier Invoice&quot;&quot;&quot;" name="name"/>
</record>
<!--
<!--
Process Node
-->
<record id="process_node_analyticcost0" model="process.node">
<field name="menu_id" ref="account.account_analytic_def_account"/>
<field name="model_id" ref="analytic.model_account_analytic_account"/>
@@ -26,7 +26,7 @@
<field eval="&quot;&quot;&quot;object.state in ('draft', 'open', 'pending', 'close')&quot;&quot;&quot;" name="model_states"/>
<field eval="1" name="flow_start"/>
</record>
<record id="process_node_supplierdraftinvoices0" model="process.node">
<field name="menu_id" ref="account.menu_action_invoice_tree2"/>
<field name="model_id" ref="account.model_account_invoice"/>
@@ -37,7 +37,7 @@
<field eval="&quot;&quot;&quot;object.state=='draft'&quot;&quot;&quot;" name="model_states"/>
<field eval="0" name="flow_start"/>
</record>
<record id="process_node_supplierinvoiceinvoice0" model="process.node">
<field name="menu_id" ref="account.menu_finance_payables"/>
<field name="model_id" ref="account.model_account_invoice"/>
@@ -48,7 +48,7 @@
<field eval="&quot;&quot;&quot;object.state=='draft'&quot;&quot;&quot;" name="model_states"/>
<field eval="0" name="flow_start"/>
</record>
<record id="process_node_supplierbankstatement0" model="process.node">
<field name="menu_id" ref="account.menu_bank_statement_tree"/>
<field name="model_id" ref="account.model_account_bank_statement"/>
@@ -60,7 +60,7 @@
<field eval="&quot;&quot;&quot;object.state=='draft'&quot;&quot;&quot;" name="model_states"/>
<field eval="0" name="flow_start"/>
</record>
<record id="process_node_supplieraccountingentries0" model="process.node">
<field name="menu_id" ref="account.menu_action_move_journal_line_form"/>
<field name="model_id" ref="account.model_account_move"/>
@@ -70,7 +70,7 @@
<field name="process_id" ref="process_process_supplierinvoiceprocess0"/>
<field eval="0" name="flow_start"/>
</record>
<record id="process_node_supplierpaymentorder0" model="process.node">
<field name="menu_id" ref="account.menu_eaction_account_moves_all"/>
<field name="model_id" ref="account.model_account_move_line"/>
@@ -81,7 +81,7 @@
<field eval="&quot;&quot;&quot;object.state=='draft'&quot;&quot;&quot;" name="model_states"/>
<field eval="1" name="flow_start"/>
</record>
<record id="process_node_supplierreconciliation0" model="process.node">
<field name="menu_id" ref="account.menu_eaction_account_moves_all"/>
<field name="model_id" ref="account.model_account_move_reconcile"/>
@@ -92,7 +92,7 @@
<field eval="&quot;&quot;&quot;object.state=='valid'&quot;&quot;&quot;" name="model_states"/>
<field eval="0" name="flow_start"/>
</record>
<record id="process_node_supplierpaidinvoice0" model="process.node">
<field name="menu_id" ref="account.menu_action_invoice_tree1"/>
<field name="model_id" ref="account.model_account_invoice"/>
@@ -103,22 +103,20 @@
<field eval="&quot;&quot;&quot;object.state=='paid'&quot;&quot;&quot;" name="model_states"/>
<field eval="0" name="flow_start"/>
</record>
<!--
<!--
Process Transition
-->
<record id="process_transition_supplieranalyticcost0" model="process.transition">
<field eval="[(6,0,[])]" name="role_ids"/>
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;From analytic accounts&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Analytic costs (timesheets, some purchased products, ...) come from analytic accounts. These generate draft supplier invoices.&quot;&quot;&quot;" name="note"/>
<field model="process.node" name="target_node_id" ref="process_node_supplierdraftinvoices0"/>
<field model="process.node" name="source_node_id" ref="process_node_analyticcost0"/>
</record>
<record id="process_transition_suppliercustomerinvoice0" model="process.transition">
<field eval="[(6,0,[])]" name="role_ids"/>
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Validation&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Draft invoices are validated. &quot;&quot;&quot;" name="note"/>
@@ -126,51 +124,46 @@
<field model="process.node" name="source_node_id" ref="process_node_supplierdraftinvoices0"/>
<field eval="[(6,0,[ref('account.pro2_to_open')])]" name="transition_ids"/>
</record>
<record id="process_transition_suppliervalidentries0" model="process.transition">
<field eval="[(6,0,[])]" name="role_ids"/>
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Validation&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Accountant validates the accounting entries coming from the invoice. &quot;&quot;&quot;" name="note"/>
<field model="process.node" name="target_node_id" ref="process_node_supplieraccountingentries0"/>
<field model="process.node" name="source_node_id" ref="process_node_supplierinvoiceinvoice0"/>
</record>
<record id="process_transition_supplierentriesreconcile0" model="process.transition">
<field eval="[(6,0,[])]" name="role_ids"/>
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Accounting entries&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Accounting entries are an input of the reconciliation.&quot;&quot;&quot;" name="note"/>
<field model="process.node" name="target_node_id" ref="process_node_supplierreconciliation0"/>
<field model="process.node" name="source_node_id" ref="process_node_supplieraccountingentries0"/>
</record>
<record id="process_transition_paymentorderbank0" model="process.transition">
<field eval="[(6,0,[])]" name="role_ids"/>
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Payment entries&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;The payment order is sent to the bank.&quot;&quot;&quot;" name="note"/>
<field model="process.node" name="target_node_id" ref="process_node_supplierbankstatement0"/>
<field model="process.node" name="source_node_id" ref="process_node_supplierpaymentorder0"/>
</record>
<record id="process_transition_paymentorderreconcilation0" model="process.transition">
<field eval="[(6,0,[])]" name="role_ids"/>
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Validation&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Bank statements are entered in the system.&quot;&quot;&quot;" name="note"/>
<field model="process.node" name="target_node_id" ref="process_node_supplierreconciliation0"/>
<field model="process.node" name="source_node_id" ref="process_node_supplierbankstatement0"/>
</record>
<record id="process_transition_supplierreconcilepaid0" model="process.transition">
<field eval="[(6,0,[])]" name="role_ids"/>
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;System payment&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;As soon as the reconciliation is done, the invoice's state turns to “done” (i.e. paid) in the system.&quot;&quot;&quot;" name="note"/>
<field model="process.node" name="target_node_id" ref="process_node_supplierpaidinvoice0"/>
<field model="process.node" name="source_node_id" ref="process_node_supplierreconciliation0"/>
</record>
</data>
</openerp>
+2 -2
View File
@@ -28,8 +28,8 @@ from osv import osv
class account_analytic_journal(osv.osv):
_name = 'account.analytic.journal'
_columns = {
'name' : fields.char('Journal name', size=64, required=True),
'code' : fields.char('Journal code', size=8),
'name' : fields.char('Journal Name', size=64, required=True),
'code' : fields.char('Journal Code', size=8),
'active' : fields.boolean('Active', help="If the active field is set to true, it will allow you to hide the analytic journal without removing it."),
'type': fields.selection([('sale','Sale'), ('purchase','Purchase'), ('cash','Cash'), ('general','General'), ('situation','Situation')], 'Type', size=32, required=True, help="Gives the type of the analytic journal. When it needs for a document (eg: an invoice) to create analytic entries, OpenERP will look for a matching journal of the same type."),
'line_ids' : fields.one2many('account.analytic.line', 'journal_id', 'Lines'),
+22 -23
View File
@@ -172,19 +172,16 @@
<field name="type">tree</field>
<field name="arch" type="xml">
<tree editable="top" string="Analytic Entries">
<field name="date" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id)"/>
<field name="date"/>
<field name="ref" invisible="context.get('to_invoice', False)"/>
<field name="name"/>
<field name="journal_id"/>
<field name="unit_amount" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id)" sum="Total quantity"/>
<field name="product_id" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id, journal_id)"/>
<field domain="[('type','=','normal')]" name="account_id" groups="base.group_extended"/>
<field invisible="True" name="product_uom_id" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id)"/>
<field name="amount" sum="Total amount"/>
<field name="general_account_id"/>
<field name="ref"/>
<field name="currency_id" />
<field name="amount_currency" />
<field name="company_id" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id)" groups="base.group_multi_company"/>
<field name="journal_id" invisible="context.get('to_invoice', False)"/>
<field name="amount" sum="Total" invisible="context.get('to_invoice', False)"/>
<field name="product_id" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id, journal_id)" invisible="not context.get('to_invoice', False)"/>
<field name="unit_amount" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id)" sum="Total Quantity" invisible="not context.get('to_invoice', False)"/>
<field name="product_uom_id" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id)" invisible="not context.get('to_invoice', False)"/>
<field domain="[('type','=','normal')]" name="account_id"/>
<field name="general_account_id" invisible="context.get('to_invoice', False)"/>
</tree>
</field>
</record>
@@ -195,22 +192,24 @@
<field name="arch" type="xml">
<search string="Search Analytic Lines">
<group col='6' colspan='4'>
<filter string="Sales" domain="[('journal_id.type','=','sale')]" icon="terp-sale" help="Analytic Journal Items related to a sale journal."/>
<filter string="Purchases" domain="[('journal_id.type','=','purchase')]" icon="terp-purchase" help="Analytic Journal Items related to a purchase journal."/>
<filter name="sales" string="Sales" domain="[('journal_id.type','=','sale')]" icon="terp-sale" help="Analytic Journal Items related to a sale journal."/>
<filter name="purchases" string="Purchases" domain="[('journal_id.type','=','purchase')]" icon="terp-purchase" help="Analytic Journal Items related to a purchase journal."/>
<filter name="others" string="Others" domain="[('journal_id.type','in',('cash','general','situation')]" icon="terp-folder-orange"/>
<separator orientation="vertical"/>
<filter icon="terp-go-today" string="Overdue Accounts" domain="[('account_id.date','&lt;',time.strftime('%%Y-%%m-%%d'))]" help="Analytic Journal Items related to accounts having a past deadline."/>
<separator orientation="vertical"/>
<field name="date" select="1"/>
<field name="name" select="1"/>
<field name="account_id" select="1"/>
<field name="user_id" widget="selection"/>
<field name="date"/>
<field name="name"/>
<field name="account_id"/>
<field name="user_id">
<filter string="My Entries" domain="[('user_id','=',uid)]" icon="terp-personal"/>
</field>
</group>
<newline/>
<group string="Group By..." expand="0">
<filter string="Analytic Account" context="{'group_by':'account_id'}" groups="base.group_extended" icon="terp-folder-blue"/>
<filter string="Analytic Journal" context="{'group_by':'journal_id'}" icon="terp-folder-orange"/>
<filter string="Account" context="{'group_by':'account_id'}" groups="base.group_extended" icon="terp-folder-blue"/>
<filter string="Journal" context="{'group_by':'journal_id'}" icon="terp-folder-orange"/>
<filter string="User" context="{'group_by':'user_id'}" icon="terp-personal"/>
<separator orientation="vertical"/>
<filter string="General Account" context="{'group_by':'general_account_id'}" icon="terp-folder-green"/>
<filter string="Fin.Account" context="{'group_by':'general_account_id'}" icon="terp-folder-green"/>
<separator orientation="vertical"/>
<filter string="Product" context="{'group_by':'product_id'}" icon="terp-accessories-archiver"/>
</group>
+1 -3
View File
@@ -21,12 +21,10 @@
from report import report_sxw
import xml.dom.minidom
import os, time
import time
import osv
import re
import tools
import pooler
import re
import sys
@@ -23,6 +23,8 @@ from osv import osv, fields
from osv.orm import intersect
import tools.sql
from tools.translate import _
from decimal_precision import decimal_precision as dp
class account_analytic_account(osv.osv):
_name = "account.analytic.account"
@@ -66,6 +68,8 @@ class account_analytic_account(osv.osv):
and invoice_id is not null \
GROUP BY account_analytic_line.account_id;", (parent_ids,))
for account_id, sum in cr.fetchall():
if account_id not in res:
res[account_id] = {}
res[account_id][f] = sum
for account in accounts:
for child in account.child_ids:
@@ -102,6 +106,8 @@ class account_analytic_account(osv.osv):
and account_analytic_journal.type in ('purchase','general') \
GROUP BY account_analytic_account.id;""", (parent_ids,))
for account_id, sum in cr.fetchall():
if account_id not in res:
res[account_id] = {}
res[account_id][f] = round(sum, dp)
for account in accounts:
@@ -142,6 +148,8 @@ class account_analytic_account(osv.osv):
and invoice_id is null \
GROUP BY account_analytic_line.account_id" ,(parent_ids,))
for account_id, lwd in cr.fetchall():
if account_id not in res:
res[account_id] = {}
res[account_id][f] = lwd
for account in accounts:
for child in account.child_ids:
@@ -161,6 +169,8 @@ class account_analytic_account(osv.osv):
AND to_invoice IS NOT NULL \
GROUP BY account_analytic_line.account_id;",(parent_ids,))
for account_id, sua in cr.fetchall():
if account_id not in res:
res[account_id] = {}
res[account_id][f] = round(sua, dp)
for account in accounts:
for child in account.child_ids:
@@ -181,10 +191,14 @@ class account_analytic_account(osv.osv):
GROUP BY account_analytic_line.account_id",(parent_ids,))
ff = cr.fetchall()
for account_id, hq in ff:
if account_id not in res:
res[account_id] = {}
res[account_id][f] = round(hq, dp)
for account in accounts:
for child in account.child_ids:
if account.id != child.id:
if account.id not in res:
res[account.id] = {f: 0.0}
res[account.id][f] += res.get(child.id, {}).get(f, 0.0)
for id in ids:
res[id][f] = round(res[id][f], dp)
@@ -223,6 +237,8 @@ class account_analytic_account(osv.osv):
res2.setdefault(account.id, 0.0)
for child in account.child_ids:
if account.id != child.id:
if account.id not in res:
res[account.id] = {f: 0.0}
res[account.id][f] += res.get(child.id, {}).get(f, 0.0)
res[account.id][f] += res2.get(child.id, 0.0)
@@ -337,22 +353,47 @@ class account_analytic_account(osv.osv):
return res
_columns ={
'ca_invoiced': fields.function(_ca_invoiced_calc, method=True, type='float', string='Invoiced Amount', help="Total customer invoiced amount for this account."),
'total_cost': fields.function(_total_cost_calc, method=True, type='float', string='Total Costs', help="Total of costs for this account. It includes real costs (from invoices) and indirect costs, like time spent on timesheets."),
'ca_to_invoice': fields.function(_analysis_all, method=True, multi='analytic_analysis', type='float', string='Uninvoiced Amount', help="If invoice from analytic account, the remaining amount you can invoice to the customer based on the total costs."),
'ca_theorical': fields.function(_analysis_all, method=True, multi='analytic_analysis', type='float', string='Theorical Revenue', help="Based on the costs you had on the project, what would have been the revenue if all these costs have been invoiced at the normal sale price provided by the pricelist."),
'hours_quantity': fields.function(_analysis_all, method=True, multi='analytic_analysis', type='float', string='Hours Tot', help="Number of hours you spent on the analytic account (from timesheet). It computes on all journal of type 'general'."),
'last_invoice_date': fields.function(_analysis_all, method=True, multi='analytic_analysis', type='date', string='Last Invoice Date', help="Date of the last invoice created for this analytic account."),
'last_worked_invoiced_date': fields.function(_analysis_all, method=True, multi='analytic_analysis', type='date', string='Date of Last Invoiced Cost', help="If invoice from the costs, this is the date of the latest work or cost that have been invoiced."),
'last_worked_date': fields.function(_analysis_all, method=True, multi='analytic_analysis', type='date', string='Date of Last Cost/Work', help="Date of the latest work done on this account."),
'hours_qtt_non_invoiced': fields.function(_analysis_all, method=True, multi='analytic_analysis', type='float', string='Uninvoiced Hours', help="Number of hours (from journal of type 'general') that can be invoiced if you invoice based on analytic account."),
'hours_qtt_invoiced': fields.function(_hours_qtt_invoiced_calc, method=True, type='float', string='Invoiced Hours', help="Number of hours that can be invoiced plus those that already have been invoiced."),
'remaining_hours': fields.function(_remaining_hours_calc, method=True, type='float', string='Remaining Hours', help="Computed using the formula: Maximum Quantity - Hours Tot."),
'remaining_ca': fields.function(_remaining_ca_calc, method=True, type='float', string='Remaining Revenue', help="Computed using the formula: Max Invoice Price - Invoiced Amount."),
'revenue_per_hour': fields.function(_revenue_per_hour_calc, method=True, type='float', string='Revenue per Hours (real)', help="Computed using the formula: Invoiced Amount / Hours Tot."),
'real_margin': fields.function(_real_margin_calc, method=True, type='float', string='Real Margin', help="Computed using the formula: Invoiced Amount - Total Costs."),
'theorical_margin': fields.function(_theorical_margin_calc, method=True, type='float', string='Theorical Margin', help="Computed using the formula: Theorial Revenue - Total Costs"),
'real_margin_rate': fields.function(_real_margin_rate_calc, method=True, type='float', string='Real Margin Rate (%)', help="Computes using the formula: (Real Margin / Total Costs) * 100."),
'ca_invoiced': fields.function(_ca_invoiced_calc, method=True, type='float', string='Invoiced Amount',
help="Total customer invoiced amount for this account.",
digits_compute=dp.get_precision('Account')),
'total_cost': fields.function(_total_cost_calc, method=True, type='float', string='Total Costs',
help="Total of costs for this account. It includes real costs (from invoices) and indirect costs, like time spent on timesheets.",
digits_compute=dp.get_precision('Account')),
'ca_to_invoice': fields.function(_analysis_all, method=True, multi='analytic_analysis', type='float', string='Uninvoiced Amount',
help="If invoice from analytic account, the remaining amount you can invoice to the customer based on the total costs.",
digits_compute=dp.get_precision('Account')),
'ca_theorical': fields.function(_analysis_all, method=True, multi='analytic_analysis', type='float', string='Theorical Revenue',
help="Based on the costs you had on the project, what would have been the revenue if all these costs have been invoiced at the normal sale price provided by the pricelist.",
digits_compute=dp.get_precision('Account')),
'hours_quantity': fields.function(_analysis_all, method=True, multi='analytic_analysis', type='float', string='Hours Tot',
help="Number of hours you spent on the analytic account (from timesheet). It computes on all journal of type 'general'."),
'last_invoice_date': fields.function(_analysis_all, method=True, multi='analytic_analysis', type='date', string='Last Invoice Date',
help="Date of the last invoice created for this analytic account."),
'last_worked_invoiced_date': fields.function(_analysis_all, method=True, multi='analytic_analysis', type='date', string='Date of Last Invoiced Cost',
help="If invoice from the costs, this is the date of the latest work or cost that have been invoiced."),
'last_worked_date': fields.function(_analysis_all, method=True, multi='analytic_analysis', type='date', string='Date of Last Cost/Work',
help="Date of the latest work done on this account."),
'hours_qtt_non_invoiced': fields.function(_analysis_all, method=True, multi='analytic_analysis', type='float', string='Uninvoiced Hours',
help="Number of hours (from journal of type 'general') that can be invoiced if you invoice based on analytic account."),
'hours_qtt_invoiced': fields.function(_hours_qtt_invoiced_calc, method=True, type='float', string='Invoiced Hours',
help="Number of hours that can be invoiced plus those that already have been invoiced."),
'remaining_hours': fields.function(_remaining_hours_calc, method=True, type='float', string='Remaining Hours',
help="Computed using the formula: Maximum Quantity - Hours Tot."),
'remaining_ca': fields.function(_remaining_ca_calc, method=True, type='float', string='Remaining Revenue',
help="Computed using the formula: Max Invoice Price - Invoiced Amount.",
digits_compute=dp.get_precision('Account')),
'revenue_per_hour': fields.function(_revenue_per_hour_calc, method=True, type='float', string='Revenue per Hours (real)',
help="Computed using the formula: Invoiced Amount / Hours Tot.",
digits_compute=dp.get_precision('Account')),
'real_margin': fields.function(_real_margin_calc, method=True, type='float', string='Real Margin',
help="Computed using the formula: Invoiced Amount - Total Costs.",
digits_compute=dp.get_precision('Account')),
'theorical_margin': fields.function(_theorical_margin_calc, method=True, type='float', string='Theorical Margin',
help="Computed using the formula: Theorial Revenue - Total Costs",
digits_compute=dp.get_precision('Account')),
'real_margin_rate': fields.function(_real_margin_rate_calc, method=True, type='float', string='Real Margin Rate (%)',
help="Computes using the formula: (Real Margin / Total Costs) * 100.",
digits_compute=dp.get_precision('Account')),
'month_ids': fields.function(_analysis_all, method=True, multi='analytic_analysis', type='many2many', relation='account_analytic_analysis.summary.month', string='Month'),
'user_ids': fields.function(_analysis_all, method=True, multi='analytic_analysis', type="many2many", relation='account_analytic_analysis.summary.user', string='User'),
}
@@ -65,28 +65,24 @@
<field name="act_from" ref="act_confirm" />
<field name="act_to" ref="act_validate" />
<field name="signal">validate</field>
<field name="role_id" ref="crossovered_budget_role"/>
</record>
<record model="workflow.transition" id="t3">
<field name="act_from" ref="act_confirm" />
<field name="act_to" ref="act_cancel" />
<field name="signal">cancel</field>
<field name="role_id" ref="crossovered_budget_role"/>
</record>
<record model="workflow.transition" id="t4">
<field name="act_from" ref="act_validate" />
<field name="act_to" ref="act_cancel" />
<field name="signal">cancel</field>
<field name="role_id" ref="crossovered_budget_role"/>
</record>
<record model="workflow.transition" id="t5">
<field name="act_from" ref="act_validate" />
<field name="act_to" ref="act_done" />
<field name="signal">done</field>
<field name="role_id" ref="crossovered_budget_role"/>
</record>
<record model="workflow.transition" id="t6">
@@ -130,19 +130,22 @@ class account_invoice_line(osv.osv):
default['state'] = self.browse(cr, uid, id).state
return super(account_invoice_line, self).copy_data(cr, uid, id, default, context)
def _fnct(self, cr, uid, id, name, args, context=None):
def _fnct(self, cr, uid, ids, name, args, context=None):
res = {}
for m in self.browse(cr, uid, id):
if m.state != 'article':
if m.state == 'line':
res[m.id] = '-----------------------------------------'
elif m.state == 'break':
res[m.id] = 'PAGE BREAK'
lines = self.browse(cr, uid, ids)
account_ids = [line.account_id.id for line in lines]
account_names = dict(self.pool.get('account.account').name_get(cr, uid, account_ids, context=context))
for line in lines:
if line.state != 'article':
if line.state == 'line':
res[line.id] = '-----------------------------------------'
elif line.state == 'break':
res[line.id] = 'PAGE BREAK'
else:
res[m.id] = ' '
res[line.id] = ' '
else:
[(temp)] = self.pool.get('account.account').name_get(cr, uid, [m.account_id.id], context=context)
res[m.id] = temp[1]
res[line.id] = account_names.get(line.account_id.id, '')
return res
_name = "account.invoice.line"
@@ -205,4 +208,4 @@ class account_invoice(osv.osv):
account_invoice()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+2 -2
View File
@@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2010-08-02 22:08+0000\n"
"PO-Revision-Date: 2010-10-04 16:08+0000\n"
"Last-Translator: Pedro_Maschio <pedro.bicudo@tgtconsult.com.br>\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-09-29 05:07+0000\n"
"X-Launchpad-Export-Date: 2010-10-05 04:57+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_payment
@@ -114,7 +114,7 @@ class account_payment_populate_statement(osv.osv_memory):
'voucher_id': voucher_id,
}, context=context)
line_obj.write(cr, uid, [line.id], {'bank_statement_line_id': st_line_id})
line_obj.write(cr, uid, [line.id], {'bank_statement_line_id': st_line_id})
return {'type': 'ir.actions.act_window_close'}
account_payment_populate_statement()
+2 -1
View File
@@ -25,6 +25,7 @@ import operator
from osv import fields, osv
import decimal_precision as dp
class account_analytic_account(osv.osv):
_name = 'account.analytic.account'
_description = 'Analytic Account'
@@ -272,7 +273,7 @@ class account_analytic_line(osv.osv):
_columns = {
'name' : fields.char('Description', size=256, required=True),
'date' : fields.date('Date', required=True, select=1),
'amount' : fields.float('Amount', required=True, help='Calculated by multiplying the quantity and the price given in the Product\'s cost price. Always expressed in the company main currency.'),
'amount' : fields.float('Amount', required=True, help='Calculated by multiplying the quantity and the price given in the Product\'s cost price. Always expressed in the company main currency.', digits_compute=dp.get_precision('Account')),
'unit_amount' : fields.float('Quantity', help='Specifies the amount of quantity to count.'),
'account_id' : fields.many2one('account.analytic.account', 'Analytic Account', required=True, ondelete='cascade', select=True),
'user_id' : fields.many2one('res.users', 'User'),
@@ -99,7 +99,7 @@ class hr_analytic_timesheet(osv.osv):
(r.product_id.name, r.product_id.id,))
# Compute based on pricetype
amount_unit = self.on_change_unit_amount(cr, uid, ids,
r.product_id.id, unit_amount, r.product_id.uom_id.id)['value']['amount']
r.product_id.id, unit_amount, False, r.product_id.uom_id.id)['value']['amount']
amount = unit_amount * amount_unit
res ['value']['amount']= - round(amount, 2)
@@ -134,7 +134,7 @@ class hr_analytic_timesheet(osv.osv):
(r.product_id.name, r.product_id.id,))
# Compute based on pricetype
amount_unit = self.on_change_unit_amount(cr, uid, ids,
r.product_id.id, unit_amount, r.product_id.uom_id.id)['value']['amount']
r.product_id.id, unit_amount, False, r.product_id.uom_id.id)['value']['amount']
amount = unit_amount * amount_unit
res ['value']['amount']= - round(amount, 2)
+1 -1
View File
@@ -724,7 +724,7 @@ true, it will allow you to hide the event alarm information without removing it.
if alarm_ids:
alarm_obj.unlink(cr, uid, alarm_ids)
cr.execute('Update %s set base_calendar_alarm_id=NULL, alarm_id=NULL\
where id=%%d' % model_obj._table,(datas.id,))
where id=%%s' % model_obj._table,(datas.id,))
return True
res_alarm()
+3 -1
View File
@@ -163,7 +163,8 @@
<!-- Invitation menu -->
<menuitem id="menu_attendee_invitations"
name="Event Invitations" parent="base.menu_calendar_configuration"
parent="base.menu_calendar_configuration"
groups="base.group_extended"
sequence="10" action="action_view_attendee_form" />
<!-- ALARM FORM VIEW-->
@@ -496,6 +497,7 @@
<menuitem id="menu_events"
name="Events" parent="base.menu_calendar_configuration"
groups="base.group_extended"
sequence="5" action="action_view_event" />
</data>
+3 -3
View File
@@ -8,13 +8,13 @@ msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2010-08-19 12:50+0000\n"
"PO-Revision-Date: 2010-10-03 20:01+0000\n"
"Last-Translator: Wouter Schrijvers <Unknown>\n"
"PO-Revision-Date: 2010-10-04 06:49+0000\n"
"Last-Translator: OpenERP Administrators <Unknown>\n"
"Language-Team: Dutch <nl@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-10-04 04:57+0000\n"
"X-Launchpad-Export-Date: 2010-10-05 04:57+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: base_calendar
@@ -60,7 +60,6 @@
-->
<record id="process_transition_contacttofunction0" model="process.transition">
<field eval="[(6,0,[])]" name="role_ids"/>
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Contact to function&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Defines contacts and functions.&quot;&quot;&quot;" name="note"/>
@@ -69,7 +68,6 @@
</record>
<record id="process_transition_functiontoaddress0" model="process.transition">
<field eval="[(6,0,[])]" name="role_ids"/>
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Function to address&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Define functions and address.&quot;&quot;&quot;" name="note"/>
@@ -78,7 +76,6 @@
</record>
<record id="process_transition_partnertoaddress0" model="process.transition">
<field eval="[(6,0,[])]" name="role_ids"/>
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Partner to address&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Define partners and their addresses.&quot;&quot;&quot;" name="note"/>
+2 -2
View File
@@ -3,8 +3,8 @@
<data>
<!--
Default bank account description
-->
Default bank account description
-->
<record id="bank_iban" model="res.partner.bank.type">
<field name="name">IBAN Account</field>
<field name="code">iban</field>
+4 -5
View File
@@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2009-12-07 16:48+0000\n"
"PO-Revision-Date: 2010-10-04 16:07+0000\n"
"Last-Translator: Pedro_Maschio <pedro.bicudo@tgtconsult.com.br>\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-09-29 05:11+0000\n"
"X-Launchpad-Export-Date: 2010-10-05 04:57+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: board
@@ -21,8 +21,7 @@ msgstr ""
msgid ""
"The Object name must start with x_ and not contain any special character !"
msgstr ""
"O nome do objeto precisa iniciar com x_ e não conter nenhum caracter "
"especial!"
"O nome do objeto deve começar com x_ e não conter caracteres especiais!"
#. module: board
#: model:ir.model,name:board.model_board_board
@@ -110,7 +109,7 @@ msgstr "Criar menu para painel"
#. module: board
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
msgstr "Invalido XML para Arquitetura da View"
msgstr "XML inválido para Arquitetura da View!"
#. module: board
#: wizard_field:board.board.menu.create,init,menu_parent_id:0
+1 -1
View File
@@ -716,7 +716,7 @@ class basic_calendar_line(osv.osv):
"""
cr.execute("SELECT COUNT(id) FROM basic_calendar_lines \
WHERE name='%s' AND calendar_id=%s",
WHERE name=%s AND calendar_id=%s",
(vals.get('name'), vals.get('calendar_id')))
res = cr.fetchone()
if res:
-1
View File
@@ -119,7 +119,6 @@ Create dashboard for CRM that includes:
'crm_meeting_demo.xml',
'crm_opportunity_demo.xml',
'crm_phonecall_demo.xml',
'board_crm_demo.xml',
],
'test': [
'test/test_crm_lead.yml',
-14
View File
@@ -1,14 +0,0 @@
<?xml version="1.0"?>
<openerp>
<data noupdate="1">
<!--
Administrator shortcut
Demo user startup menu
-->
<record model="res.users" id="base.user_root">
<field name="action_id" ref="open_board_crm"/>
</record>
</data>
</openerp>
+2 -1
View File
@@ -33,9 +33,10 @@
</record>
<record model="crm.case.stage" id="stage_lead5">
<field name="name">Win</field>
<field name="name">Won</field>
<field eval="'100'" name="probability"/>
<field eval="'5'" name="sequence"/>
<field eval="1" name="on_change"/>
<field name="object_id" search="[('model','=','crm.lead')]" model="ir.model"/>
</record>
+2 -1
View File
@@ -13,7 +13,8 @@
<field name="context">{'object_id':'crm.meeting'}</field>
</record>
<menuitem action="crm_meeting_categ_action" name="Categories of Meeting"
<menuitem action="crm_meeting_categ_action"
groups="base.group_extended"
id="menu_crm_case_meeting-act" parent="base.menu_calendar_configuration" sequence="1"/>
<!-- CRM Meetings Form View -->
+5 -4
View File
@@ -85,10 +85,11 @@ class crm_opportunity(osv.osv):
"""
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 opportunities 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})
value = {}
if stage_id:
value = self.onchange_stage_id(cr, uid, ids, stage_id, context={}).get('value', {})
value['stage_id'] = stage_id
value.update({'date_closed': time.strftime('%Y-%m-%d %H:%M:%S')})
res = self.write(cr, uid, ids, value)
for (id, name) in self.name_get(cr, uid, ids):
+7 -15
View File
@@ -14,14 +14,14 @@
<label string="Stage:" align="1.0"/>
<group colspan="1" col="4">
<field name="stage_id" nolabel="1"
widget="selection"
on_change="onchange_stage_id(stage_id)"
domain="[('object_id.model', '=', 'crm.lead')]"
readonly="1" />
domain="[('object_id.model', '=', 'crm.lead')]"/>
<button name="stage_previous"
states="open,pending" type="object"
icon="gtk-go-back" string="" />
<button name="stage_next" states="open,pending"
type="object" icon="gtk-go-forward" string="" />
states="draft,open,pending" type="object"
icon="gtk-go-back" string="" />
<button name="stage_next" states="draft,open,pending"
type="object" icon="gtk-go-forward" string="" />
</group>
<field name="user_id"/>
@@ -88,7 +88,7 @@
groups="base.group_extended"
icon="gtk-go-up" />
<button name="case_cancel" string="Cancel"
states="draft,open,pending" type="object"
states="draft" type="object"
icon="gtk-close" />
<button name="case_mark_lost" string="Mark Lost"
states="open,pending" type="object"
@@ -283,14 +283,6 @@
string="Pending" help="Pending Opportunities"
domain="[('state','=','pending')]"/>
<separator orientation="vertical"/>
<filter icon="terp-go-today" string="Today"
domain="[('create_date','&lt;', time.strftime('%%Y-%%m-%%d 23:59:59')), ('create_date','&gt;=', time.strftime('%%Y-%%m-%%d 00:00:00'))]"
help="Todays' Opportunities" />
<filter icon="terp-go-week" string="7 Days"
help="Opportunities created during last 7 days"
domain="[('create_date','&lt;', time.strftime('%%Y-%%m-%%d 23:59:59')),('create_date','&gt;=',(datetime.date.today()-datetime.timedelta(days=7)).strftime('%%Y-%%m-%%d 00:00:00'))]"
/>
<separator orientation="vertical"/>
<field name="name" string="Opportunity"/>
<field name="partner_id"/>
<field name="user_id">
+1
View File
@@ -202,6 +202,7 @@
<menuitem action="crm_case_resource_type_act"
id="menu_crm_case_resource_type_act" sequence="4"
groups="base.group_extended"
parent="base.menu_sale_config_sales" />
<record id="crm_case_section_act_tree" model="ir.actions.act_window">
+361 -379
View File
File diff suppressed because it is too large Load Diff
@@ -57,7 +57,6 @@
-->
<record id="process_transition_leadopportunity0" model="process.transition">
<field eval="[(6,0,[])]" name="role_ids"/>
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Prospect Opportunity&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Creating business opportunities from Leads&quot;&quot;&quot;" name="note"/>
@@ -66,7 +65,6 @@
</record>
<record id="process_transition_leadpartner0" model="process.transition">
<field eval="[(6,0,[])]" name="role_ids"/>
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Prospect Partner&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Prospect is converting to business partner&quot;&quot;&quot;" name="note"/>
@@ -75,7 +73,6 @@
</record>
<record id="process_transition_opportunitymeeting0" model="process.transition">
<field eval="[(6,0,[])]" name="role_ids"/>
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Opportunity Meeting&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Normal or phone meeting for opportunity&quot;&quot;&quot;" name="note"/>
+3 -3
View File
@@ -8,13 +8,13 @@ msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2010-08-20 05:24+0000\n"
"PO-Revision-Date: 2010-10-03 20:06+0000\n"
"Last-Translator: Wouter Schrijvers <Unknown>\n"
"PO-Revision-Date: 2010-10-04 06:52+0000\n"
"Last-Translator: OpenERP Administrators <Unknown>\n"
"Language-Team: Dutch <nl@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-10-04 04:57+0000\n"
"X-Launchpad-Export-Date: 2010-10-05 04:57+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: decimal_precision
+29 -33
View File
@@ -331,38 +331,34 @@ This is useful for CRM leads for example"),
default.update({'name':new_name})
return super(email_template, self).copy(cr, uid, id, default, context)
def compute_pl(self,
model_object_field,
sub_model_object_field,
null_value, template_language='mako'):
def build_expression(self, field_name, sub_field_name, null_value, template_language='mako'):
"""
Returns the expression based on data provided
@param model_object_field: First level field
@param sub_model_object_field: Second level drilled down field (M2O)
@param null_value: What has to be returned if the value is empty
@param template_language: The language used for templating
Returns a template expression based on data provided
@param field_name: field name
@param sub_field_name: sub field name (M2O)
@param null_value: default value if the target value is empty
@param template_language: name of template engine
@return: computed expression
"""
#Configure for MAKO
copy_val = ''
expression = ''
if template_language == 'mako':
if model_object_field:
copy_val = "${object." + model_object_field
if sub_model_object_field:
copy_val += "." + sub_model_object_field
if null_value:
copy_val += " or '" + null_value + "'"
if model_object_field:
copy_val += "}"
if field_name:
expression = "${object." + field_name
if sub_field_name:
expression += "." + sub_field_name
if null_value:
expression += " or '''%s'''" % null_value
expression += "}"
elif template_language == 'django':
if model_object_field:
copy_val = "{{object." + model_object_field
if sub_model_object_field:
copy_val += "." + sub_model_object_field
if null_value:
copy_val = copy_val + '|default:"' + null_value + '"'
copy_val = copy_val + "}}"
return copy_val
if field_name:
expression = "{{object." + field_name
if sub_field_name:
expression += "." + sub_field_name
if null_value:
expression += "|default: '''%s'''" % null_value
expression += "}}"
return expression
def onchange_model_object_field(self, cr, uid, ids, model_object_field, template_language, context=None):
if not model_object_field:
@@ -374,7 +370,7 @@ This is useful for CRM leads for example"),
res_ids = self.pool.get('ir.model').search(cr, uid, [('model', '=', field_obj.relation)], context=context)
if res_ids:
result['sub_object'] = res_ids[0]
result['copyvalue'] = self.compute_pl(False,
result['copyvalue'] = self.build_expression(False,
False,
False,
template_language)
@@ -383,7 +379,7 @@ This is useful for CRM leads for example"),
else:
#Its a simple field... just compute placeholder
result['sub_object'] = False
result['copyvalue'] = self.compute_pl(field_obj.name,
result['copyvalue'] = self.build_expression(field_obj.name,
False,
False,
template_language
@@ -402,7 +398,7 @@ This is useful for CRM leads for example"),
sub_field_obj = self.pool.get('ir.model.fields').browse(cr, uid, sub_model_object_field, context)
if res_ids:
result['sub_object'] = res_ids[0]
result['copyvalue'] = self.compute_pl(field_obj.name,
result['copyvalue'] = self.build_expression(field_obj.name,
sub_field_obj.name,
False,
template_language
@@ -412,7 +408,7 @@ This is useful for CRM leads for example"),
else:
#Its a simple field... just compute placeholder
result['sub_object'] = False
result['copyvalue'] = self.compute_pl(field_obj.name,
result['copyvalue'] = self.build_expression(field_obj.name,
False,
False,
template_language
@@ -431,7 +427,7 @@ This is useful for CRM leads for example"),
sub_field_obj = self.pool.get('ir.model.fields').browse(cr, uid, sub_model_object_field, context)
if res_ids:
result['sub_object'] = res_ids[0]
result['copyvalue'] = self.compute_pl(field_obj.name,
result['copyvalue'] = self.build_expression(field_obj.name,
sub_field_obj.name,
null_value,
template_language
@@ -441,7 +437,7 @@ This is useful for CRM leads for example"),
else:
#Its a simple field... just compute placeholder
result['sub_object'] = False
result['copyvalue'] = self.compute_pl(field_obj.name,
result['copyvalue'] = self.build_expression(field_obj.name,
False,
null_value,
template_language
@@ -47,26 +47,22 @@
<field name="act_from" ref="act_draft"/>
<field name="act_to" ref="act_approved"/>
<field name="signal">button_approval</field>
<field name="role_id" ref="PE_ADMIN"/>
</record>
<record id="trans_approved_suspended" model="workflow.transition">
<field name="act_from" ref="act_approved"/>
<field name="act_to" ref="act_suspended"/>
<field name="signal">button_suspended</field>
<field name="role_id" ref="PE_ADMIN"/>
</record>
<record id="trans_suspended_reapproved" model="workflow.transition">
<field name="act_from" ref="act_suspended"/>
<field name="act_to" ref="act_draft"/>
<field name="signal">get_reapprove</field>
<field name="role_id" ref="PE_ADMIN"/>
</record>
<record id="trans_suspended_dummy" model="workflow.transition">
<field name="act_from" ref="act_suspended"/>
<field name="act_to" ref="act_dummy"/>
<field name="signal">get_never</field>
<field name="role_id" ref="PE_ADMIN"/>
</record>
</data>
</openerp>
+1 -1
View File
@@ -53,7 +53,7 @@
'board_association_view.xml',
'res_partner_view.xml',
],
'demo_xml': ['event_demo.xml', 'board_association_demo.xml'],
'demo_xml': ['event_demo.xml'],
'test': ['test/test_event.yml'],
'installable': True,
'active': False,
-10
View File
@@ -1,10 +0,0 @@
<?xml version="1.0"?>
<openerp>
<data noupdate="1">
<record model="res.users" id="base.user_root">
<field name="action_id" ref="open_board_associations_manager"/>
</record>
</data>
</openerp>
+5 -4
View File
@@ -28,6 +28,7 @@ import time
import tools
import decimal_precision as dp
class event_type(osv.osv):
""" Event Type """
_name = 'event.type'
@@ -225,7 +226,7 @@ class event_event(osv.osv):
'product_id': fields.many2one('product.product', 'Product', required=True, readonly=True, states={'draft': [('readonly', False)]}, help="The invoices of this event registration will be created with this Product. Thus it allows you to set the default label and the accounting info you want by default on these invoices."),
'note': fields.text('Notes', help="Description or Summary of Event", readonly=False, states={'done': [('readonly', True)]}),
'pricelist_id': fields.many2one('product.pricelist', 'Pricelist', readonly=True, states={'draft': [('readonly', False)]}, help="Pricelist version for current event."),
'unit_price': fields.related('product_id', 'list_price', type='float', string='Registration Cost', readonly=True, states={'draft':[('readonly',False)]}, help="This will be the default price used as registration cost when invoicing this event. Note that you can specify for each registration a specific amount if you want to"),
'unit_price': fields.related('product_id', 'list_price', type='float', string='Registration Cost', readonly=True, states={'draft':[('readonly',False)]}, help="This will be the default price used as registration cost when invoicing this event. Note that you can specify for each registration a specific amount if you want to", digits_compute=dp.get_precision('Sale Price')),
'main_speaker_id': fields.many2one('res.partner','Main Speaker', readonly=False, states={'done': [('readonly', True)]}, help="Speaker who are giving speech on event."),
'speaker_ids':fields.many2many('res.partner', 'event_speaker_rel', 'speaker_id', 'partner_id', 'Other Speakers', readonly=False, states={'done': [('readonly', True)]}),
'address_id': fields.many2one('res.partner.address','Location Address', readonly=False, states={'done': [('readonly', True)]}),
@@ -302,12 +303,12 @@ class event_registration(osv.osv):
'name': fields.char('Summary', size=124, readonly=True, states={'draft': [('readonly', False)]}),
'email_cc': fields.text('CC', size=252 , readonly=False, states={'done': [('readonly', True)]}, help="These email addresses will be added to the CC field of all inbound and outbound emails for this record before being sent. Separate multiple email addresses with a comma"),
'nb_register': fields.integer('Quantity', required=True, readonly=True, states={'draft': [('readonly', False)]}, help="Number of Registrations or Tickets"),
'event_id': fields.many2one('event.event', 'Event Related', required=True, readonly=True, states={'draft': [('readonly', False)]}),
'event_id': fields.many2one('event.event', 'Event', required=True, readonly=True, states={'draft': [('readonly', False)]}),
'partner_id': fields.many2one('res.partner', 'Partner', states={'done': [('readonly', True)]}),
"partner_invoice_id": fields.many2one('res.partner', 'Partner Invoiced', readonly=True, states={'draft': [('readonly', False)]}),
"contact_id": fields.many2one('res.partner.contact', 'Partner Contact', readonly=False, states={'done': [('readonly', True)]}), #TODO: filter only the contacts that have a function into the selected partner_id
"unit_price": fields.float('Unit Price', required=True, digits_compute= dp.get_precision('Event Price'), readonly=True, states={'draft': [('readonly', False)]}),
'price_subtotal': fields.function(_amount_line, method=True, string='Subtotal', digits_compute= dp.get_precision('Event Price')),
"unit_price": fields.float('Unit Price', required=True, digits_compute=dp.get_precision('Sale Price'), readonly=True, states={'draft': [('readonly', False)]}),
'price_subtotal': fields.function(_amount_line, method=True, string='Subtotal', digits_compute=dp.get_precision('Sale Price')),
"badge_ids": fields.one2many('event.registration.badge', 'registration_id', 'Badges', readonly=False, states={'done': [('readonly', True)]}),
"event_product": fields.char("Invoice Name", size=128, readonly=True, states={'draft': [('readonly', False)]}),
"tobe_invoiced": fields.boolean("To be Invoiced", readonly=True, states={'draft': [('readonly', False)]}),
+25 -26
View File
@@ -219,27 +219,27 @@
<field name="arch" type="xml">
<search string="Events">
<group col="10" colspan="4">
<filter icon="terp-check" string="Current" name="draft" domain="[('state','in',('draft', 'confirm'))]" help="Current Events"/>
<filter icon="terp-camera_test" string="Open" domain="[('state','=','confirm')]" help="Open Events"/>
<filter icon="terp-check" string="Current" name="draft" domain="[('state','in',('draft', 'confirm'))]" help="Events in draft or confirmed state"/>
<filter icon="terp-camera_test" string="Confirmed" domain="[('state','=','confirm')]" help="Confirmed events"/>
<separator orientation="vertical"/>
<field name="name" string="Event" select="1"/>
<field name="state" select="1"/>
<field name="name" select="1"/>
<field name="user_id" widget="selection">
<filter icon="terp-personal"
string="My Events"
help="My Events"
domain="[('user_id','=',uid)]"/>
<filter icon="terp-personal"
string="My Events"
help="My Events"
domain="[('user_id','=',uid)]"/>
</field>
<field name="date_begin" select="1"/>
<field name="state" select="1"/>
</group>
<newline/>
<group expand="0" string="Group By..." colspan="4" col="12">
<filter string="Responsible" icon="terp-personal" context="{'group_by': 'user_id'}"/>
<separator orientation="vertical"/>
<filter string="Event Type" icon="terp-crm" context="{'group_by':'type'}"/>
<filter string="state" icon="terp-stock_effects-object-colorize" context="{'group_by':'state'}"/>
<separator orientation="vertical"/>
<filter string="Responsible" icon="terp-personal" context="{'group_by': 'user_id'}"/>
<separator orientation="vertical"/>
<filter string="Creation" icon="terp-go-month"
<filter string="Beginning Date" icon="terp-go-month"
domain="[]" context="{'group_by':'date_begin'}"/>
</group>
</search>
@@ -287,11 +287,11 @@
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Registration">
<field name="date" string="Date"/>
<field name="event_id"/>
<field name="partner_id"/>
<field name="event_id"/>
<field name="nb_register"/>
<field name="price_subtotal"/>
<field name="price_subtotal" sum="Total"/>
<field name="user_id"/>
<field name="state"/>
<button name="button_reg_close" string="Close Registration" states="open" type="object" icon="gtk-close"/>
<button name="check_confirm" string="Confirm Registration" states="draft" type="object" icon="gtk-apply"/>
@@ -335,9 +335,9 @@
<separator string="" colspan="4"/>
<group col="8" colspan="4">
<field name="state" select="1" colspan="2"/>
<button name="button_reg_cancel" string="Cancel Registration" states="draft,open" type="object" icon="gtk-cancel"/>
<button name="button_reg_close" string="Close Registration" states="open" type="object" icon="gtk-close"/>
<button name="check_confirm" string="Confirm Registration" states="draft" type="object" icon="gtk-apply"/>
<button name="button_reg_cancel" string="Cancel Registration" states="draft,open" type="object" icon="gtk-cancel"/>
</group>
</page>
<page string="Extra Info">
@@ -460,27 +460,26 @@
<field name="arch" type="xml">
<search string="Event Registration">
<group col="12" colspan="4">
<filter icon="terp-check" string="Current" name="draft" domain="[('state','in',('draft', 'open'))]" help="Current Registrations"/>
<filter icon="terp-camera_test" string="Open" domain="[('state','=','open')]" help="Open Registrations"/>
<filter icon="terp-check" string="Current" name="draft" domain="[('state','in',('draft', 'open'))]" help="Registrations in unconfirmed or confirmed state"/>
<filter icon="terp-camera_test" string="Confirmed" domain="[('state','=','open')]" help="Confirmed registrations"/>
<separator orientation="vertical"/>
<field name="partner_id" />
<field name="event_id" widget="selection"/>
<field name="state" select="1"/>
<field name="user_id" widget="selection">
<filter icon="terp-personal"
string="My Registration"
help="My Registration"
domain="[('user_id','=',uid)]"/>
<filter icon="terp-personal"
string="My Registrations"
help="My Registrations"
domain="[('user_id','=',uid)]"/>
</field>
<field name="state" select="1"/>
</group>
<newline/>
<group expand="0" string="Group By...">
<filter string="Responsible" icon="terp-personal" domain="[]" context="{'group_by':'user_id'}"/>
<filter string="Partner" icon="terp-partner" domain="[]" context="{'group_by':'partner_id'}"/>
<separator orientation="vertical"/>
<filter string="Event" icon="terp-crm" domain="[]" context="{'group_by':'event_id'}"/>
<filter string="State" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
<separator orientation="vertical"/>
<filter string="Partner" icon="terp-personal" domain="[]" context="{'group_by':'partner_id'}"/>
<filter string="Responsible" icon="terp-personal" domain="[]" context="{'group_by':'user_id'}"/>
</group>
</search>
</field>
@@ -24,6 +24,7 @@ import netsvc
import tools
from osv import fields, osv
from tools.translate import _
from decimal_precision import decimal_precision as dp
class partner_event_registration(osv.osv_memory):
@@ -36,7 +37,7 @@ class partner_event_registration(osv.osv_memory):
_columns = {
'event_id': fields.many2one('event.event', 'Event'),
'event_type': fields.many2one('event.type', 'Type', readonly=True),
'unit_price': fields.float('Registration Cost'),
'unit_price': fields.float('Registration Cost', digits_compute=dp.get_precision('Sale Price')),
'start_date': fields.datetime('Start date', required=True, help="Beginning Date of Event", readonly=True),
'end_date': fields.datetime('Closing date', required=True, help="Closing Date of Event", readonly=True),
'nb_register': fields.integer('Number of Registration'),
+1 -1
View File
@@ -27,8 +27,8 @@
<field name="hr_recruitment"/>
<field name="hr_timesheet_sheet"/>
<field name="hr_contract"/>
<field name="hr_evaluation"/>
<field name="hr_attendance"/>
<field name="hr_evaluation" groups="base.group_extended"/>
<field name="hr_payroll" groups="base.group_extended"/>
<field name="hr_payroll_account" groups="base.group_extended"/>
</group>
+4 -4
View File
@@ -7,13 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2010-09-09 07:17+0000\n"
"Last-Translator: adsiz_1029@hotmail.com <Unknown>\n"
"PO-Revision-Date: 2010-10-04 19:23+0000\n"
"Last-Translator: Engin BAHADIR <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-09-29 05:12+0000\n"
"X-Launchpad-Export-Date: 2010-10-05 04:57+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: hr
@@ -253,7 +253,7 @@ msgstr "Personel Kategorisi"
#. module: hr
#: selection:hr.timesheet,dayofweek:0
msgid "Tuesday"
msgstr "Sali"
msgstr "Salı"
#. module: hr
#: model:ir.model,name:hr.model_hr_department
+1 -2
View File
@@ -51,8 +51,7 @@ class hr_installer(osv.osv_memory):
_defaults = {
'hr_holidays': True,
'hr_expense': True,
}
}
hr_installer()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
-2
View File
@@ -51,7 +51,6 @@
-->
<record id="process_transition_employeeuser0" model="process.transition">
<field eval="[(6,0,[])]" name="role_ids"/>
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Link a user to an employee&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;The field Relate'd user in the Employee form allows to link the OpenERP user (and his rights and role) to the employee.&quot;&quot;&quot;" name="note"/>
@@ -60,7 +59,6 @@
</record>
<record id="process_transition_contactofemployee0" model="process.transition">
<field eval="[(6,0,[])]" name="role_ids"/>
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Link the employee to information&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;In the Employee form, there are different kind of information like Contact information.&quot;&quot;&quot;" name="note"/>
+5 -5
View File
@@ -8,13 +8,13 @@ msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2009-11-25 12:18+0000\n"
"PO-Revision-Date: 2010-09-29 11:34+0000\n"
"Last-Translator: ub121 <ubs121@gmail.com>\n"
"PO-Revision-Date: 2010-10-05 01:35+0000\n"
"Last-Translator: sugi <Unknown>\n"
"Language-Team: Mongolian <mn@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-09-30 04:43+0000\n"
"X-Launchpad-Export-Date: 2010-10-05 04:57+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: hr_evaluation
@@ -115,12 +115,12 @@ msgstr "Байдал"
#. module: hr_evaluation
#: view:hr_evaluation.type:0
msgid "Apply to categories"
msgstr ""
msgstr "Хүсэлт гаргах зэрэглэл"
#. module: hr_evaluation
#: model:ir.module.module,description:hr_evaluation.module_meta_information
msgid "Ability to create employees evaluation."
msgstr ""
msgstr "Ажилтны үнэлгээ үүсгэх боломж"
#. module: hr_evaluation
#: field:hr_evaluation.quote,name:0
@@ -75,14 +75,12 @@
<field name="act_from" ref="act_confirm"/>
<field name="act_to" ref="act_accepted"/>
<field name="signal">validate</field>
<field name="role_id" ref="HR"/>
</record>
<record id="t4" model="workflow.transition">
<field name="act_from" ref="act_confirm"/>
<field name="act_to" ref="act_refused"/>
<field name="signal">refuse</field>
<field name="role_id" ref="HR"/>
</record>
<record id="t5" model="workflow.transition">
@@ -95,21 +93,18 @@
<field name="act_from" ref="act_accepted"/>
<field name="act_to" ref="act_refused"/>
<field name="signal">refuse</field>
<field name="role_id" ref="HR"/>
</record>
<record id="t7" model="workflow.transition">
<field name="act_from" ref="act_confirm"/>
<field name="act_to" ref="act_draft"/>
<field name="signal">draft</field>
<field name="role_id" ref="HR"/>
</record>
<record id="t8" model="workflow.transition">
<field name="act_from" ref="act_accepted"/>
<field name="act_to" ref="act_invoice"/>
<field name="signal">invoice</field>
<field name="role_id" ref="HR_INV"/>
</record>
<record id="t9" model="workflow.transition">
@@ -128,7 +123,6 @@
<field name="act_from" ref="act_refused"/>
<field name="act_to" ref="act_draft"/>
<field name="signal">draft</field>
<field name="role_id" ref="HR"/>
</record>
</data>
+4 -4
View File
@@ -8,13 +8,13 @@ msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2010-09-29 08:47+0000\n"
"Last-Translator: OpenERP Administrators <Unknown>\n"
"PO-Revision-Date: 2010-10-05 01:41+0000\n"
"Last-Translator: sugi <Unknown>\n"
"Language-Team: Mongolian <mn@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-09-30 04:43+0000\n"
"X-Launchpad-Export-Date: 2010-10-05 04:57+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: hr_expense
@@ -144,7 +144,7 @@ msgstr "Батлах"
#. module: hr_expense
#: model:process.node,note:hr_expense.process_node_supplierinvoice0
msgid "The accoutant validates the sheet"
msgstr ""
msgstr "Нягтлан энэ шийтийг батална."
#. module: hr_expense
#: field:hr.expense.line,analytic_account:0
@@ -1,21 +1,21 @@
<?xml version="1.0" ?>
<openerp>
<data>
<!--
Process
-->
<record id="process_process_expenseprocess0" model="process.process">
<field eval="1" name="active"/>
<field name="model_id" ref="model_hr_expense_expense"/>
<field eval="&quot;&quot;&quot;Expense&quot;&quot;&quot;" name="name"/>
</record>
<!--
Process Node
-->
<record id="process_node_draftexpenses0" model="process.node">
<field name="menu_id" ref="menu_expense_all"/>
<field name="model_id" ref="model_hr_expense_expense"/>
@@ -26,7 +26,7 @@
<field eval="&quot;&quot;&quot;object.state=='draft'&quot;&quot;&quot;" name="model_states"/>
<field eval="1" name="flow_start"/>
</record>
<record id="process_node_confirmedexpenses0" model="process.node">
<field name="menu_id" ref="menu_expense_all"/>
<field name="model_id" ref="model_hr_expense_expense"/>
@@ -37,7 +37,7 @@
<field eval="&quot;&quot;&quot;object.state=='confirm'&quot;&quot;&quot;" name="model_states"/>
<field eval="0" name="flow_start"/>
</record>
<record id="process_node_refused0" model="process.node">
<field name="menu_id" ref="menu_expense_all"/>
<field name="model_id" ref="model_hr_expense_expense"/>
@@ -48,7 +48,7 @@
<field eval="&quot;&quot;&quot;object.state=='canceled'&quot;&quot;&quot;" name="model_states"/>
<field eval="0" name="flow_start"/>
</record>
<record id="process_node_approved0" model="process.node">
<field name="menu_id" ref="menu_expense_all"/>
<field name="model_id" ref="model_hr_expense_expense"/>
@@ -59,7 +59,7 @@
<field eval="&quot;&quot;&quot;object.state=='accepted'&quot;&quot;&quot;" name="model_states"/>
<field eval="0" name="flow_start"/>
</record>
<record id="process_node_supplierinvoice0" model="process.node">
<field name="menu_id" ref="account.menu_action_invoice_tree2"/>
<field name="model_id" ref="account.model_account_invoice"/>
@@ -70,7 +70,7 @@
<field eval="&quot;&quot;&quot;object.state=='draft'&quot;&quot;&quot;" name="model_states"/>
<field eval="0" name="flow_start"/>
</record>
<record id="process_node_reimbursement0" model="process.node">
<field name="menu_id" ref="account.menu_action_invoice_tree2"/>
<field name="model_id" ref="account.model_account_invoice"/>
@@ -81,7 +81,7 @@
<field eval="&quot;&quot;&quot;object.state=='paid'&quot;&quot;&quot;" name="model_states"/>
<field eval="0" name="flow_start"/>
</record>
<record id="process_node_reinvoicing0" model="process.node">
<field name="menu_id" ref="account.menu_action_invoice_tree1"/>
<field name="model_id" ref="account.model_account_invoice"/>
@@ -92,96 +92,90 @@
<field eval="&quot;&quot;&quot;object.state=='draft'&quot;&quot;&quot;" name="model_states"/>
<field eval="0" name="flow_start"/>
</record>
<!--
Process Transition
-->
<record id="process_transition_confirmexpense0" model="process.transition">
<field eval="[(6,0,[])]" name="role_ids"/>
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Confirm expense&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Expense is confirmed.&quot;&quot;&quot;" name="note"/>
<field model="process.node" name="target_node_id" ref="process_node_confirmedexpenses0"/>
<field model="process.node" name="source_node_id" ref="process_node_draftexpenses0"/>
</record>
<record id="process_transition_refuseexpense0" model="process.transition">
<field eval="[(6,0,[])]" name="role_ids"/>
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Refuse expense&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Expense is refused.&quot;&quot;&quot;" name="note"/>
<field model="process.node" name="target_node_id" ref="process_node_refused0"/>
<field model="process.node" name="source_node_id" ref="process_node_confirmedexpenses0"/>
</record>
<record id="process_transition_approveexpense0" model="process.transition">
<field eval="[(6,0,[])]" name="role_ids"/>
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Approve expense&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Expense is approved.&quot;&quot;&quot;" name="note"/>
<field model="process.node" name="target_node_id" ref="process_node_approved0"/>
<field model="process.node" name="source_node_id" ref="process_node_confirmedexpenses0"/>
</record>
<record id="process_transition_approveinvoice0" model="process.transition">
<field eval="[(6,0,[])]" name="role_ids"/>
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Supplier Invoice&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Creates supplier invoice.&quot;&quot;&quot;" name="note"/>
<field model="process.node" name="target_node_id" ref="process_node_supplierinvoice0"/>
<field model="process.node" name="source_node_id" ref="process_node_approved0"/>
</record>
<record id="process_transition_reimburseexpense0" model="process.transition">
<field eval="[(6,0,[])]" name="role_ids"/>
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Reimburse expense&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;After creating invoice, reimburse expenses&quot;&quot;&quot;" name="note"/>
<field model="process.node" name="target_node_id" ref="process_node_reimbursement0"/>
<field model="process.node" name="source_node_id" ref="process_node_supplierinvoice0"/>
</record>
<record id="process_transition_reimbursereinvoice0" model="process.transition">
<field eval="[(6,0,[])]" name="role_ids"/>
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Reinvoice&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Create Customer invoice&quot;&quot;&quot;" name="note"/>
<field model="process.node" name="target_node_id" ref="process_node_reinvoicing0"/>
<field model="process.node" name="source_node_id" ref="process_node_reimbursement0"/>
</record>
<!--
Process Transition Action
-->
<record id="process_transition_action_confirm0" model="process.transition.action">
<field eval="&quot;&quot;&quot;expense_confirm&quot;&quot;&quot;" name="action"/>
<field eval="&quot;&quot;&quot;object&quot;&quot;&quot;" name="state"/>
<field eval="&quot;&quot;&quot;Confirm&quot;&quot;&quot;" name="name"/>
<field name="transition_id" ref="process_transition_confirmexpense0"/>
</record>
<record id="process_transition_action_refuse0" model="process.transition.action">
<field eval="&quot;&quot;&quot;expense_canceled&quot;&quot;&quot;" name="action"/>
<field eval="&quot;&quot;&quot;object&quot;&quot;&quot;" name="state"/>
<field eval="&quot;&quot;&quot;Refuse&quot;&quot;&quot;" name="name"/>
<field name="transition_id" ref="process_transition_refuseexpense0"/>
</record>
<record id="process_transition_action_accept0" model="process.transition.action">
<field eval="&quot;&quot;&quot;expense_accept&quot;&quot;&quot;" name="action"/>
<field eval="&quot;&quot;&quot;object&quot;&quot;&quot;" name="state"/>
<field eval="&quot;&quot;&quot;Accept&quot;&quot;&quot;" name="name"/>
<field name="transition_id" ref="process_transition_approveexpense0"/>
</record>
<record id="process_transition_action_supplierinvoice0" model="process.transition.action">
<field eval="&quot;&quot;&quot;action_invoice_create&quot;&quot;&quot;" name="action"/>
<field eval="&quot;&quot;&quot;object&quot;&quot;&quot;" name="state"/>
<field eval="&quot;&quot;&quot;Invoice&quot;&quot;&quot;" name="name"/>
<field name="transition_id" ref="process_transition_approveinvoice0"/>
</record>
</data>
</openerp>
@@ -77,28 +77,24 @@
<field name="act_to" ref="act_validate" />
<field name="signal">validate</field>
<field name="condition">(holiday_status_id.double_validation == False)</field>
<field name="role_id" ref="HR_holidays"/>
</record>
<record model="workflow.transition" id="t3">
<field name="act_from" ref="act_confirm" />
<field name="act_to" ref="act_refuse" />
<field name="signal">refuse</field>
<field name="role_id" ref="HR_holidays"/>
</record>
<record model="workflow.transition" id="t4">
<field name="act_from" ref="act_validate" />
<field name="act_to" ref="act_cancel" />
<field name="signal">cancel</field>
<field name="role_id" ref="HR_holidays"/>
</record>
<record model="workflow.transition" id="t5">
<field name="act_from" ref="act_refuse" />
<field name="act_to" ref="act_cancel" />
<field name="signal">cancel</field>
<field name="role_id" ref="HR_holidays"/>
</record>
<record model="workflow.transition" id="t7">
@@ -124,7 +120,6 @@
<field name="act_to" ref="act_validate1" />
<field name="condition">(holiday_status_id.double_validation == True)</field>
<field name="signal">validate</field>
<field name="role_id" ref="HR_holidays"/>
</record>
</data>
@@ -1,21 +1,21 @@
<?xml version="1.0" ?>
<openerp>
<data>
<data>
<!--
Process
-->
<record id="process_process_holidaysprocess0" model="process.process">
<field eval="&quot;&quot;&quot;Holidays&quot;&quot;&quot;" name="name"/>
<field name="model_id" ref="hr_holidays.model_hr_holidays"/>
<field eval="1" name="active"/>
</record>
<!--
Process Node
-->
<record id="process_node_holidaysdefinition0" model="process.node">
<field name="menu_id" ref="hr_holidays.menu_open_ask_holidays_new"/>
<field name="model_id" ref="hr_holidays.model_hr_holidays_per_user"/>
@@ -25,7 +25,7 @@
<field name="process_id" ref="process_process_holidaysprocess0"/>
<field eval="1" name="flow_start"/>
</record>
<record id="process_node_holidaysrequest0" model="process.node">
<field name="menu_id" ref="hr_holidays.menu_open_ask_holidays_new"/>
<field name="model_id" ref="hr_holidays.model_hr_holidays"/>
@@ -36,7 +36,7 @@
<field eval="&quot;&quot;&quot;object.state=='draft'&quot;&quot;&quot;" name="model_states"/>
<field eval="0" name="flow_start"/>
</record>
<record id="process_node_refused0" model="process.node">
<field name="menu_id" ref="hr_holidays.menu_open_ask_holidays_new"/>
<field name="model_id" ref="hr_holidays.model_hr_holidays"/>
@@ -47,7 +47,7 @@
<field eval="&quot;&quot;&quot;object.state=='refuse'&quot;&quot;&quot;" name="model_states"/>
<field eval="0" name="flow_start"/>
</record>
<record id="process_node_approved0" model="process.node">
<field name="menu_id" ref="hr_holidays.menu_open_ask_holidays_new"/>
<field name="model_id" ref="hr_holidays.model_hr_holidays"/>
@@ -58,7 +58,7 @@
<field eval="&quot;&quot;&quot;object.state=='validate'&quot;&quot;&quot;" name="model_states"/>
<field eval="0" name="flow_start"/>
</record>
<record id="process_node_calendar0" model="process.node">
<field name="menu_id" ref="hr_holidays.menu_open_ask_holidays_new"/>
<field name="model_id" ref="hr_holidays.model_hr_holidays"/>
@@ -69,7 +69,7 @@
<field eval="&quot;&quot;&quot;object.state=='validate'&quot;&quot;&quot;" name="model_states"/>
<field eval="0" name="flow_start"/>
</record>
<record id="process_node_holidays0" model="process.node">
<field name="menu_id" ref="hr_holidays.menu_open_ask_holidays"/>
<field name="model_id" ref="hr_holidays.model_hr_holidays"/>
@@ -80,7 +80,7 @@
<field eval="&quot;&quot;&quot;object.state in ('draft', 'validate', 'confirm', 'refuse', 'cancel')&quot;&quot;&quot;" name="model_states"/>
<field eval="0" name="flow_start"/>
</record>
<record id="process_node_legaldeclaration0" model="process.node">
<field name="menu_id" ref="hr_holidays.menu_open_ask_holidays"/>
<field name="model_id" ref="hr_holidays.model_hr_holidays"/>
@@ -89,91 +89,85 @@
<field eval="&quot;&quot;&quot;Legal Declaration Document to declare new employee&quot;&quot;&quot;" name="note"/>
<field name="process_id" ref="hr.process_process_employeecontractprocess0"/>
<field eval="0" name="flow_start"/>
</record>
</record>
<!--
Process Transition
-->
<record id="process_transition_employeedeclaration0" model="process.transition">
<field eval="[(6,0,[])]" name="role_ids"/>
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Employee Declaration&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Document for employee&quot;&quot;&quot;" name="note"/>
<field model="process.node" name="target_node_id" ref="process_node_legaldeclaration0"/>
<field model="process.node" name="source_node_id" ref="hr.process_node_employee0"/>
</record>
<record id="process_transition_holidaysdefrequest0" model="process.transition">
<field eval="[(6,0,[])]" name="role_ids"/>
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Holidays def Request&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;If holidays available, employee can take it and fill it.&quot;&quot;&quot;" name="note"/>
<field model="process.node" name="target_node_id" ref="process_node_holidaysrequest0"/>
<field model="process.node" name="source_node_id" ref="process_node_holidaysdefinition0"/>
</record>
<record id="process_transition_refusedrequest0" model="process.transition">
<field eval="[(6,0,[])]" name="role_ids"/>
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Refused Request&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Request is refused.&quot;&quot;&quot;" name="note"/>
<field model="process.node" name="target_node_id" ref="process_node_refused0"/>
<field model="process.node" name="source_node_id" ref="process_node_holidaysrequest0" />
</record>
<record id="process_transition_approvedrequest0" model="process.transition">
<field eval="[(6,0,[])]" name="role_ids"/>
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Approved Request&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Request is approved.&quot;&quot;&quot;" name="note"/>
<field model="process.node" name="target_node_id" ref="process_node_approved0"/>
<field model="process.node" name="source_node_id" ref="process_node_holidaysrequest0"/>
</record>
<record id="process_transition_setholiday0" model="process.transition">
<field eval="[(6,0,[])]" name="role_ids"/>
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Set Holiday&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Holiday is set in the calendar.&quot;&quot;&quot;" name="note"/>
<field model="process.node" name="target_node_id" ref="process_node_calendar0"/>
<field model="process.node" name="source_node_id" ref="process_node_approved0"/>
</record>
<record id="process_transition_employeeholidays0" model="process.transition">
<field eval="[(6,0,[])]" name="role_ids"/>
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Employee Holidays&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Employee get holidays&quot;&quot;&quot;" name="note"/>
<field model="process.node" name="target_node_id" ref="process_node_holidays0"/>
<field model="process.node" name="source_node_id" ref="process_node_legaldeclaration0"/>
</record>
<!--
Process Transition Action
-->
<record id="process_transition_action_confirm0" model="process.transition.action">
<field eval="&quot;&quot;&quot;holidays_confirm&quot;&quot;&quot;" name="action"/>
<field eval="&quot;&quot;&quot;object&quot;&quot;&quot;" name="state"/>
<field eval="&quot;&quot;&quot;Confirm&quot;&quot;&quot;" name="name"/>
<field name="transition_id" ref="process_transition_holidaysdefrequest0"/>
</record>
<record id="process_transition_action_reufse0" model="process.transition.action">
<field eval="&quot;&quot;&quot;holidays_refuse&quot;&quot;&quot;" name="action"/>
<field eval="&quot;&quot;&quot;object&quot;&quot;&quot;" name="state"/>
<field eval="&quot;&quot;&quot;Refuse&quot;&quot;&quot;" name="name"/>
<field name="transition_id" ref="process_transition_refusedrequest0"/>
</record>
<record id="process_transition_action_validate0" model="process.transition.action">
<field eval="&quot;&quot;&quot;holidays_validate&quot;&quot;&quot;" name="action"/>
<field eval="&quot;&quot;&quot;object&quot;&quot;&quot;" name="state"/>
<field eval="&quot;&quot;&quot;Validate&quot;&quot;&quot;" name="name"/>
<field name="transition_id" ref="process_transition_approvedrequest0"/>
</record>
</data>
</openerp>
+1
View File
@@ -9,6 +9,7 @@
sequence: 0.0
name: Fortis
state: bank
bank: base.res_bank_1
-
I create a new employee “Richard”
-
+2 -2
View File
@@ -57,14 +57,14 @@ class hr_analytic_timesheet(osv.osv):
return super(hr_analytic_timesheet, self).unlink(cr, uid, ids, context=context)
def on_change_unit_amount(self, cr, uid, id, prod_id, unit_amount, unit, context=None):
def on_change_unit_amount(self, cr, uid, id, prod_id, unit_amount, company_id, unit=False, journal_id=False, context=None):
if context is None:
context = {}
res = {'value':{}}
if prod_id and unit_amount:
# find company
company_id = self.pool.get('res.company')._company_default_get(cr, uid, 'account.analytic.line', context=context)
res.update(self.pool.get('account.analytic.line').on_change_unit_amount(cr, uid, id, prod_id, unit_amount, company_id, unit, context=context))
res.update(self.pool.get('account.analytic.line').on_change_unit_amount(cr, uid, id, prod_id, unit_amount, company_id, unit, journal_id, context=context))
# update unit of measurement
if prod_id:
uom = self.pool.get('product.product').browse(cr, uid, prod_id, context=context)
+16 -27
View File
@@ -12,16 +12,17 @@
<field name="type">tree</field>
<field name="arch" type="xml">
<tree editable="bottom" string="Timesheet Lines">
<field name="user_id" on_change="on_change_user_id(user_id)" required="1"/>
<field name="date" on_change="on_change_date(date)"/>
<field domain="[('type','=','normal'),('state', '&lt;&gt;', 'close')]" name="account_id"/>
<field name="user_id" on_change="on_change_user_id(user_id)" required="1"/>
<field name="journal_id" invisible="1"/>
<field name="name"/>
<field name="product_id" on_change="on_change_unit_amount(product_id, unit_amount, product_uom_id)" required="1" domain="[('type','=','service')]"/>
<field name="unit_amount" on_change="on_change_unit_amount(product_id, unit_amount, product_uom_id)" sum="Total time"/>
<field name="product_uom_id" on_change="on_change_unit_amount(product_id, unit_amount, product_uom_id)"/>
<field name="amount" sum="Total cost"/>
<field name="general_account_id"/>
<field name="journal_id"/>
<field domain="[('type','=','normal')]" name="account_id"/>
<field name="product_id" on_change="on_change_unit_amount(product_id, unit_amount, False, product_uom_id,journal_id)" required="1" domain="[('type','=','service')]" invisible="1"/>
<field name="unit_amount" on_change="on_change_unit_amount(product_id, unit_amount, False, product_uom_id,journal_id)" sum="Total time"/>
<field name="product_uom_id" on_change="on_change_unit_amount(product_id, unit_amount, False, product_uom_id,journal_id)" invisible="1"/>
<field name="amount" sum="Total cost" invisible="1"/>
<field name="general_account_id" invisible="1"/>
<field name="journal_id" invisible="1"/>
</tree>
</field>
</record>
@@ -40,9 +41,9 @@
<page string="Information">
<group colspan="2" col="2">
<separator string="Product" colspan="2"/>
<field name="product_id" on_change="on_change_unit_amount(product_id, unit_amount, product_uom_id)" required="1" domain="[('type','=','service')]"/>
<field name="product_uom_id" on_change="on_change_unit_amount(product_id, unit_amount, product_uom_id)"/>
<field name="unit_amount" on_change="on_change_unit_amount(product_id, unit_amount, product_uom_id)"/>
<field name="product_id" on_change="on_change_unit_amount(product_id, unit_amount, False, product_uom_id,journal_id)" required="1" domain="[('type','=','service')]"/>
<field name="product_uom_id" on_change="on_change_unit_amount(product_id, unit_amount, False, product_uom_id,journal_id)"/>
<field name="unit_amount" on_change="on_change_unit_amount(product_id, unit_amount, False, product_uom_id,journal_id)"/>
</group>
<group colspan="2" col="2">
<separator string="Accounting" colspan="2"/>
@@ -67,7 +68,7 @@
<field name="arch" type="xml">
<search string="Timesheet">
<group col='8' colspan='4'>
<filter icon="terp-go-today" domain="[('date', '=', time.strftime('%%Y-%%m-%%d'))]" string="Today"/>
<filter name="today" icon="terp-go-today" domain="[('date', '=', time.strftime('%%Y-%%m-%%d'))]" string="Today"/>
<separator orientation="vertical"/>
<field name="user_id"/>
<field name="account_id" select="1" widget="selection"/>
@@ -81,32 +82,20 @@
<filter string="Anlytic account" icon="terp-folder-green" domain="[]" context="{'group_by':'account_id'}"/>
<filter string="Product" icon="terp-accessories-archiver" domain="[]" context="{'group_by':'product_id'}"/>
<separator orientation="vertical"/>
<filter string="Date" icon="terp-go-month" domain="[]" context="{'group_by':'date'}"/>
</group>
<filter string="Date" icon="terp-go-month" domain="[]" context="{'group_by':'date'}"/>
</group>
</search>
</field>
</record>
<record id="act_hr_timesheet_line_me_all_form" model="ir.actions.act_window">
<field name="name">My Working Hours</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">hr.analytic.timesheet</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="domain">[('user_id','=',uid)]</field>
<field name="filter" eval="True"/>
<field name="context">{"search_default_user_id":uid, "search_default_my": 1}</field>
<field name="search_view_id" ref="hr_timesheet_line_search"/>
</record>
<record id="act_hr_timesheet_line_evry1_all_form" model="ir.actions.act_window">
<field name="name">Working Hours</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">hr.analytic.timesheet</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="context">{"search_default_user_id":uid}</field>
<field name="context">{"search_default_user_id":uid, "search_default_today":1}</field>
<field name="search_view_id" ref="hr_timesheet_line_search"/>
<field name="help">This functionality gives you a list of work done by user, product and analytic account (or project). A search tool allows you to make fine-grained analysis.</field>
</record>
@@ -81,7 +81,7 @@ class hr_so_project(osv.osv_memory):
if not res['product_uom_id']:
raise osv.except_osv(_('UserError'), _('No cost unit defined for this employee !'))
up = timesheet_obj.on_change_unit_amount(cr, uid, False, res['product_id'], hour, res['product_uom_id'])['value']
up = timesheet_obj.on_change_unit_amount(cr, uid, False, res['product_id'], hour,False, res['product_uom_id'])['value']
res['name'] = data['info']
res['account_id'] = data['account_id'].id
@@ -21,17 +21,6 @@
</field>
</record>
<!--record id="view_account_analytic_account_form" model="ir.ui.view">
<field name="name">account.analytic.account.form</field>
<field name="model">account.analytic.account</field>
<field name="inherit_id" ref="account.view_account_analytic_account_form"/>
<field name="type">form</field>
<field name="arch" type="xml">
<field name="company_currency_id" position="replace">
<field name="currency_id"/>
</field>
</field>
</record-->
<record id="hr_timesheet_line_form" model="ir.ui.view">
<field name="name">hr.analytic.timesheet.form</field>
<field name="model">hr.analytic.timesheet</field>
@@ -83,13 +72,26 @@
</record>
<!-- Inherits for account analytic lines -->
<record id="view_account_analytic_line_search_inherit" model="ir.ui.view">
<field name="name">account.analytic.line.search.to_invoice</field>
<field name="model">account.analytic.line</field>
<field name="type">search</field>
<field name="inherit_id" ref="account.view_account_analytic_line_filter"/>
<field name="arch" type="xml">
<filter name="others" position="after">
<separator orientation="vertical"/>
<filter name="to_invoice" string="To Invoice" context="{'to_invoice': 1}" domain="[('invoice_id','=',False),('to_invoice','&lt;&gt;',False)]" icon="terp-sale"/>
</filter>
</field>
</record>
<record id="view_account_analytic_line_tree_inherit" model="ir.ui.view">
<field name="name">account.analytic.line.tree.to_invoice</field>
<field name="model">account.analytic.line</field>
<field name="type">tree</field>
<field name="inherit_id" ref="account.view_account_analytic_line_tree"/>
<field name="arch" type="xml">
<field name="journal_id" position="after">
<field name="account_id" position="after">
<field name="to_invoice"/>
</field>
</field>
@@ -103,18 +105,19 @@
<field name="arch" type="xml">
<field name="product_uom_id" position="after">
<field name="to_invoice"/>
<field name="invoice_id"/>
</field>
</field>
</record>
<!-- Menus -->
<record id="action_hr_analytic_timesheet_open_tree" model="ir.actions.act_window">
<field name="name">Entries to invoice</field>
<field name="name">Costs to Invoice</field>
<field name="res_model">account.analytic.line</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="domain">[('to_invoice','&lt;&gt;',False)]</field>
<field name="context">{"search_default_user_id":uid}</field>
<field name="domain">[]</field>
<field name="context">{'search_default_to_invoice': 1}</field>
<field name="help">OpenERP automatically group the entries to be invoiced so you can keep an eye on them on real time in one glance.</field>
</record>
<menuitem
@@ -123,31 +126,6 @@
parent="account.menu_finance_periodical_processing_billing"
sequence="1"/>
<record id="action_hr_analytic_timesheet_tree_invoiced" model="ir.actions.act_window">
<field name="name">Uninvoiced Entries</field>
<field name="res_model">account.analytic.line</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="domain">[('invoice_id','=',False),('to_invoice','!=',False)]</field>
<field name="filter" eval="True"/>
</record>
<record id="action_open_analytic_accounts" model="ir.actions.act_window">
<field name="name">Open Analytic Accounts</field>
<field name="res_model">account.analytic.account</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="domain">[('state','&lt;&gt;','close'),('type','&lt;&gt;','view')]</field>
</record>
<record id="action_open_invoice_analytic_accounts" model="ir.actions.act_window">
<field name="name">Unclosed Invoiceable Accounts</field>
<field name="res_model">account.analytic.account</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="domain">[('state','&lt;&gt;','close'),('type','&lt;&gt;','view'),('pricelist_id','&lt;&gt;',False)]</field>
</record>
<record id="view_hr_timesheet_invoice_factor_form" model="ir.ui.view">
<field name="name">hr_timesheet_invoice.factor.form</field>
<field name="model">hr_timesheet_invoice.factor</field>
@@ -21,6 +21,8 @@
from osv import fields,osv
import tools
from decimal_precision import decimal_precision as dp
class report_analytic_account_close(osv.osv):
_name = "report.analytic.account.close"
@@ -70,8 +72,8 @@ class report_account_analytic_line_to_invoice(osv.osv):
'account_id':fields.many2one('account.analytic.account', 'Analytic account', readonly=True),
'product_uom_id':fields.many2one('product.uom', 'UoM', readonly=True),
'unit_amount': fields.float('Units', readonly=True),
'sale_price': fields.float('Sale price', readonly=True),
'amount': fields.float('Amount', readonly=True),
'sale_price': fields.float('Sale price', readonly=True, digits_compute=dp.get_precision('Sale Price')),
'amount': fields.float('Amount', readonly=True, digits_compute=dp.get_precision('Account')),
'month':fields.selection([('01','January'), ('02','February'), ('03','March'), ('04','April'), ('05','May'), ('06','June'),
('07','July'), ('08','August'), ('09','September'), ('10','October'), ('11','November'), ('12','December')],'Month',readonly=True),
}
@@ -38,7 +38,7 @@ class hr_timesheet_invoice_create(osv.osv_memory):
'accounts': fields.many2many('account.analytic.account', 'invoice_id', 'account_id', 'Analytic Accounts', required=True),
'date': fields.boolean('Date', help='The real date of each work will be displayed on the invoice'),
'time': fields.boolean('Time spent', help='The time of each work done will be displayed on the invoice'),
'name': fields.boolean('Name of entry', help='The detail of each work done will be displayed on the invoice'),
'name': fields.boolean('Description', help='The detail of each work done will be displayed on the invoice'),
'price': fields.boolean('Cost', help='The cost of each work done will be displayed on the invoice. You probably don\'t want to check this'),
'product': fields.many2one('product.product', 'Product', help='Complete this field only if you want to force to use a specific product. Keep empty to use the real product that comes from the cost.'),
}
@@ -59,8 +59,10 @@ class hr_timesheet_invoice_create(osv.osv_memory):
return [x[0] for x in account_ids]
_defaults = {
'accounts': _get_accounts
}
'accounts': _get_accounts,
'date': lambda *args: 1,
'name': lambda *args: 1
}
def do_create(self, cr, uid, ids, context=None):
mod_obj = self.pool.get('ir.model.data')
@@ -2,37 +2,33 @@
<openerp>
<data>
<record id="view_hr_timesheet_invoice_create" model="ir.ui.view">
<record id="view_hr_timesheet_invoice_create" model="ir.ui.view">
<field name="name">hr.timesheet.invoice.create.form</field>
<field name="model">hr.timesheet.invoice.create</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Invoice analytic lines">
<group height="280" width="450">
<group col="4" colspan="6">
<notebook>
<page string="Billing Data">
<separator string="Do you want to show details of work in invoice ?" colspan="4"/>
<field name="date"/>
<field name="time"/>
<field name="name"/>
<field name="price"/>
<separator string="Force to use a specific product" colspan="4"/>
<field name="product"/>
</page>
<page string="Filter on Accounts" groups="base.group_extended">
<separator string="Choose accounts you want to invoice" colspan="4"/>
<field name="accounts" colspan="4" nolabel="1"/>
</page>
</notebook>
</group>
<separator colspan="4"/>
<group col="2" colspan="4">
<button special="cancel" string="Cancel" icon='gtk-cancel'/>
<button name="do_create" string="Create Invoices" colspan="1" type="object" icon="gtk-execute"/>
</group>
</group>
</form>
<form string="Invoice analytic lines">
<notebook colspan="4">
<page string="Billing Data">
<separator string="Do you want to show details of work in invoice ?" colspan="4"/>
<field name="date"/>
<field name="time"/>
<field name="name"/>
<field name="price"/>
<separator string="Force to use a specific product" colspan="4"/>
<field name="product"/>
</page>
<page string="Filter on Accounts" groups="base.group_extended">
<separator string="Choose accounts you want to invoice" colspan="4"/>
<field name="accounts" colspan="4" nolabel="1"/>
</page>
</notebook>
<separator colspan="4"/>
<group col="2" colspan="4">
<button special="cancel" string="Cancel" icon='gtk-cancel'/>
<button name="do_create" string="Create Invoices" colspan="1" type="object" icon="gtk-execute"/>
</group>
</form>
</field>
</record>
@@ -45,7 +41,7 @@
<field name="target">new</field>
</record>
<record model="ir.values" id="hr_timesheet_invoice_create_values">
<record model="ir.values" id="hr_timesheet_invoice_create_values">
<field name="model_id" ref="model_account_analytic_line" />
<field name="object" eval="1" />
<field name="name">Invoice analytic lines</field>
@@ -55,5 +51,5 @@
<field name="model">account.analytic.line</field>
</record>
</data>
</openerp>
</data>
</openerp>
@@ -104,11 +104,11 @@
<field invisible="1" name="date"/>
<field domain="[('type','=','normal'), ('state', '&lt;&gt;', 'close')]" name="account_id" on_change="on_change_account_id(account_id)"/>
<field name="name"/>
<field name="unit_amount" on_change="on_change_unit_amount(product_id, unit_amount, product_uom_id)" widget="float_time"/>
<field name="unit_amount" on_change="on_change_unit_amount(product_id, unit_amount, False, product_uom_id,journal_id)" widget="float_time"/>
<field name="to_invoice"/>
<field invisible="1" name="journal_id"/>
<field invisible="1" name="product_id" domain="[('type','=','service')]" on_change="on_change_unit_amount(product_id, unit_amount, product_uom_id)"/>
<field invisible="1" name="product_uom_id" on_change="on_change_unit_amount(product_id, unit_amount, product_uom_id)"/>
<field invisible="1" name="product_id" domain="[('type','=','service')]" on_change="on_change_unit_amount(product_id, unit_amount, False, product_uom_id,journal_id)"/>
<field invisible="1" name="product_uom_id" on_change="on_change_unit_amount(product_id, unit_amount, False, product_uom_id,journal_id)"/>
<field invisible="1" name="amount"/>
<field invisible="1" name="general_account_id"/>
<field invisible="1" name="user_id" required="1"/>
@@ -117,11 +117,11 @@
<field name="date"/>
<field domain="[('type','=','normal'), ('state', '&lt;&gt;', 'close')]" name="account_id" on_change="on_change_account_id(account_id)"/>
<field name="name"/>
<field name="unit_amount" on_change="on_change_unit_amount(product_id, unit_amount, product_uom_id)" widget="float_time"/>
<field name="unit_amount" on_change="on_change_unit_amount(product_id, unit_amount, False, product_uom_id,journal_id)" widget="float_time"/>
<field name="to_invoice"/>
<field name="journal_id"/>
<field name="product_id" domain="[('type','=','service')]" on_change="on_change_unit_amount(product_id, unit_amount, product_uom_id)"/>
<field name="product_uom_id" on_change="on_change_unit_amount(product_id, unit_amount, product_uom_id)"/>
<field name="product_id" domain="[('type','=','service')]" on_change="on_change_unit_amount(product_id, unit_amount, False, product_uom_id,journal_id)"/>
<field name="product_uom_id" on_change="on_change_unit_amount(product_id, unit_amount, False, product_uom_id,journal_id)"/>
<field name="amount"/>
<field name="general_account_id"/>
<field name="user_id" required="1"/>
@@ -1,21 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<!-- Roles definition -->
<record id="HR" model="res.roles">
<field name="name">Timesheets validation</field>
</record>
<!-- Workflow definition -->
<record id="wkf_timesheet" model="workflow">
<field name="name">hr_timesheet_sheet.sheet</field>
<field name="osv">hr_timesheet_sheet.sheet</field>
<field name="on_create">True</field>
</record>
<record id="act_new" model="workflow.activity">
<field name="wkf_id" ref="wkf_timesheet"/>
<field name="name">new</field>
@@ -42,7 +42,7 @@
<field name="action">write({'state':'done'})</field>
<field name="flow_stop">True</field>
</record>
<record id="t0" model="workflow.transition">
<field name="act_from" ref="act_new"/>
<field name="act_to" ref="act_draft"/>
@@ -56,13 +56,11 @@
<field name="act_from" ref="act_confirm"/>
<field name="act_to" ref="act_done"/>
<field name="signal">done</field>
<field name="role_id" ref="HR"/>
</record>
<record id="t3" model="workflow.transition">
<field name="act_from" ref="act_confirm"/>
<field name="act_to" ref="act_draft"/>
<field name="signal">cancel</field>
<field name="role_id" ref="HR"/>
</record>
</data>
</openerp>
@@ -1,21 +1,21 @@
<?xml version="1.0" ?>
<openerp>
<data>
<!--
<!--
Process
-->
<record id="process_process_hrtimesheetprocess0" model="process.process">
<field eval="1" name="active"/>
<field name="model_id" ref="hr_timesheet_sheet.model_hr_timesheet_sheet_sheet"/>
<field eval="&quot;&quot;&quot;Hr Timesheet&quot;&quot;&quot;" name="name"/>
</record>
<!--
<!--
Process Node
-->
<record id="process_node_attendance0" model="process.node">
<field name="model_id" ref="hr.model_hr_employee"/>
<field eval="&quot;&quot;&quot;state&quot;&quot;&quot;" name="kind"/>
@@ -24,7 +24,7 @@
<field name="process_id" ref="process_process_hrtimesheetprocess0"/>
<field eval="1" name="flow_start"/>
</record>
<record id="process_node_timesheet0" model="process.node">
<field name="menu_id" ref="hr_timesheet_sheet.menu_act_hr_timesheet_sheet_form"/>
<field name="model_id" ref="hr_timesheet_sheet.model_hr_timesheet_sheet_sheet"/>
@@ -35,7 +35,7 @@
<field eval="&quot;&quot;&quot;object.state=='draft'&quot;&quot;&quot;" name="model_states"/>
<field eval="0" name="flow_start"/>
</record>
<record id="process_node_drafttimesheetsheet0" model="process.node">
<field name="menu_id" ref="hr_timesheet_sheet.menu_act_hr_timesheet_sheet_form"/>
<field name="model_id" ref="hr_timesheet_sheet.model_hr_timesheet_sheet_sheet"/>
@@ -46,7 +46,7 @@
<field eval="&quot;&quot;&quot;object.state=='draft'&quot;&quot;&quot;" name="model_states"/>
<field eval="0" name="flow_start"/>
</record>
<record id="process_node_confirmedtimesheet0" model="process.node">
<field name="menu_id" ref="hr_timesheet_sheet.menu_act_hr_timesheet_sheet_form"/>
<field name="model_id" ref="hr_timesheet_sheet.model_hr_timesheet_sheet_sheet"/>
@@ -68,7 +68,7 @@
<field eval="&quot;&quot;&quot;object.state=='done'&quot;&quot;&quot;" name="model_states"/>
<field eval="0" name="flow_start"/>
</record>
<record id="process_node_invoiceonwork0" model="process.node">
<field name="menu_id" ref="account.menu_finance_receivables"/>
<field name="model_id" ref="account.model_account_invoice"/>
@@ -91,39 +91,32 @@
<field eval="&quot;&quot;&quot;object.state in ('open', pending', 'done', 'cancelled')&quot;&quot;&quot;" name="model_states"/>
<field eval="1" name="flow_start"/>
</record>
<!--
<!--
Process Transition
-->
<record id="res_roles_hr0" model="res.roles">
<field eval="&quot;&quot;&quot;HR&quot;&quot;&quot;" name="name"/>
</record>
<record id="hr_timesheet_sheet.t1" model="workflow.transition">
<field name="role_id" ref="res_roles_hr0"/>
</record>
<record id="process_transition_attendancetimesheet0" model="process.transition">
<field eval="[(6,0,[])]" name="role_ids"/>
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Sign in/out&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;The employee signs in and signs out.&quot;&quot;&quot;" name="note"/>
<field model="process.node" name="target_node_id" ref="process_node_drafttimesheetsheet0"/>
<field model="process.node" name="source_node_id" ref="process_node_attendance0"/>
</record>
<record id="process_transition_timesheetdraft0" model="process.transition">
<field eval="[(6,0,[])]" name="role_ids"/>
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Service&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;The timesheet line represents the time spent by the employee on a specific service provided.&quot;&quot;&quot;" name="note"/>
<field model="process.node" name="target_node_id" ref="process_node_drafttimesheetsheet0"/>
<field model="process.node" name="source_node_id" ref="process_node_timesheet0"/>
</record>
<record id="process_transition_confirmtimesheet0" model="process.transition">
<field eval="[(6,0,[])]" name="role_ids"/>
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Confirmation&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;The employee periodically confirms his own timesheets.&quot;&quot;&quot;" name="note"/>
@@ -131,58 +124,55 @@
<field model="process.node" name="source_node_id" ref="process_node_drafttimesheetsheet0"/>
<field eval="[(6,0,[ref('hr_timesheet_sheet.t1')])]" name="transition_ids"/>
</record>
<record id="process_transition_validatetimesheet0" model="process.transition">
<field eval="[(6,0,[])]" name="role_ids"/>
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Validation&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;The project manager validates the timesheets.&quot;&quot;&quot;" name="note"/>
<field model="process.node" name="target_node_id" ref="process_node_validatedtimesheet0"/>
<field model="process.node" name="source_node_id" ref="process_node_confirmedtimesheet0"/>
</record>
<record id="process_transition_invoiceontimesheet0" model="process.transition">
<field eval="[(6,0,[])]" name="role_ids"/>
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Billing&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;The invoice is created based on the timesheet.&quot;&quot;&quot;" name="note"/>
<field model="process.node" name="target_node_id" ref="process_node_invoiceonwork0"/>
<field model="process.node" name="source_node_id" ref="process_node_confirmedtimesheet0"/>
</record>
<record id="process_transition_tasktimesheet0" model="process.transition">
<field eval="[(6,0,[])]" name="role_ids"/>
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Task timesheet&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Moves task entry into the timesheet line&quot;&quot;&quot;" name="note"/>
<field model="process.node" name="target_node_id" ref="process_node_timesheet0"/>
<field model="process.node" name="source_node_id" ref="process_node_workontask0"/>
</record>
<!--
</record>
<!--
Process Action
-->
<record id="process_transition_action_draftconfirmtimesheet0" model="process.transition.action">
<field eval="&quot;&quot;&quot;button_confirm&quot;&quot;&quot;" name="action"/>
<field eval="&quot;&quot;&quot;object&quot;&quot;&quot;" name="state"/>
<field eval="&quot;&quot;&quot;Confirm&quot;&quot;&quot;" name="name"/>
<field name="transition_id" ref="process_transition_confirmtimesheet0"/>
</record>
<record id="process_transition_action_validatetimesheet0" model="process.transition.action">
<field eval="&quot;&quot;&quot;write({'state':'done'})&quot;&quot;&quot;" name="action"/>
<field eval="&quot;&quot;&quot;object&quot;&quot;&quot;" name="state"/>
<field eval="&quot;&quot;&quot;Validate&quot;&quot;&quot;" name="name"/>
<field name="transition_id" ref="process_transition_validatetimesheet0"/>
</record>
<record id="process_transition_action_refusetimesheet0" model="process.transition.action">
<field eval="&quot;&quot;&quot;write({'state':'draft'})&quot;&quot;&quot;" name="action"/>
<field eval="&quot;&quot;&quot;object&quot;&quot;&quot;" name="state"/>
<field eval="&quot;&quot;&quot;Refuse&quot;&quot;&quot;" name="name"/>
<field name="transition_id" ref="process_transition_validatetimesheet0"/>
</record>
</data>
</openerp>
@@ -6,7 +6,7 @@
<field name="model">hr.timesheet.current.open</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Current Timesheet">
<form string="My Timesheet">
<separator string="It will open the your current timesheet" colspan="4" />
<group colspan="4" col="6">
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
@@ -17,7 +17,7 @@
</record>
<record id="action_hr_timesheet_current_open" model="ir.actions.act_window">
<field name="name">Current Timesheet</field>
<field name="name">My Timesheet</field>
<field name="res_model">hr.timesheet.current.open</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
@@ -25,7 +25,11 @@
<field name="target">new</field>
</record>
<menuitem action="action_hr_timesheet_current_open" icon="STOCK_NEW" id="menu_act_hr_timesheet_sheet_form_my_current" name="Current Timesheet" parent="hr_attendance.menu_hr_time_tracking" sequence="1"/>
<menuitem action="action_hr_timesheet_current_open" icon="STOCK_NEW" id="menu_act_hr_timesheet_sheet_form_my_current" name="My Timesheet" parent="hr_attendance.menu_hr_time_tracking" sequence="1"/>
<menuitem action="action_hr_timesheet_current_open"
id="menu_act_project_management_timesheet_sheet_form" parent="base.menu_project_management_time_tracking"
sequence="5"/>
</data>
</openerp>
+160
View File
@@ -0,0 +1,160 @@
# Hindi translation for openobject-addons
# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2010-08-20 06:56+0000\n"
"PO-Revision-Date: 2010-10-04 13:03+0000\n"
"Last-Translator: vir (Open ERP) <vir@tinyerp.com>\n"
"Language-Team: Hindi <hi@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-10-05 04:57+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: knowledge
#: constraint:ir.model:0
msgid ""
"The Object name must start with x_ and not contain any special character !"
msgstr ""
#. module: knowledge
#: field:knowledge.installer,wiki:0
msgid "Collaborative Content (Wiki)"
msgstr ""
#. module: knowledge
#: help:knowledge.installer,wiki_quality_manual:0
msgid "Creates an example skeleton for a standard quality manual."
msgstr ""
#. module: knowledge
#: field:knowledge.installer,document_ftp:0
msgid "Shared Repositories (FTP)"
msgstr ""
#. module: knowledge
#: model:ir.module.module,shortdesc:knowledge.module_meta_information
msgid "Knowledge Management System"
msgstr ""
#. module: knowledge
#: constraint:ir.ui.menu:0
msgid "Error ! You can not create recursive Menu."
msgstr ""
#. module: knowledge
#: constraint:ir.actions.act_window:0
msgid "Invalid model name in the action definition."
msgstr "कार्य की परिभाषा में मॉडल का नाम अमान्य है."
#. module: knowledge
#: model:ir.ui.menu,name:knowledge.menu_document
msgid "Knowledge"
msgstr "ज्ञान"
#. module: knowledge
#: help:knowledge.installer,document_webdav:0
msgid ""
"Provides a WebDAV access to your OpenERP's Document Management System. Lets "
"you access attachments and virtual documents through your standard file "
"browser."
msgstr ""
#. module: knowledge
#: field:knowledge.installer,progress:0
msgid "Configuration Progress"
msgstr ""
#. module: knowledge
#: view:knowledge.installer:0
msgid "title"
msgstr "शीर्षक:"
#. module: knowledge
#: help:knowledge.installer,document_ftp:0
msgid ""
"Provides an FTP access to your OpenERP's Document Management System. Lets "
"you access attachments and virtual documents through a standard FTP client."
msgstr ""
#. module: knowledge
#: model:ir.module.module,description:knowledge.module_meta_information
msgid ""
"Installer for knowledge-based tools\n"
" "
msgstr ""
#. module: knowledge
#: model:ir.ui.menu,name:knowledge.menu_document_configuration
msgid "Configuration"
msgstr "कॉन्फ़िगरेशन"
#. module: knowledge
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
msgstr "संरचना देखने के लिए अमान्य XML!"
#. module: knowledge
#: model:ir.actions.act_window,name:knowledge.action_knowledge_installer
msgid "Knowledge Modules Installation"
msgstr ""
#. module: knowledge
#: view:ir.actions.todo:0
msgid "Launch"
msgstr ""
#. module: knowledge
#: field:knowledge.installer,wiki_quality_manual:0
msgid "Quality Manual"
msgstr ""
#. module: knowledge
#: view:knowledge.installer:0
msgid "Templates of Content"
msgstr ""
#. module: knowledge
#: field:knowledge.installer,document_webdav:0
msgid "Shared Repositories (WebDAV)"
msgstr ""
#. module: knowledge
#: help:knowledge.installer,wiki_faq:0
msgid ""
"Creates a skeleton internal FAQ pre-filled with documentation about "
"OpenERP's Document Management System."
msgstr ""
#. module: knowledge
#: field:knowledge.installer,wiki_faq:0
msgid "Internal FAQ"
msgstr ""
#. module: knowledge
#: model:ir.ui.menu,name:knowledge.menu_document2
msgid "Collaborative Content"
msgstr ""
#. module: knowledge
#: field:knowledge.installer,config_logo:0
msgid "Image"
msgstr "चित्र"
#. module: knowledge
#: model:ir.model,name:knowledge.model_knowledge_installer
msgid "knowledge.installer"
msgstr "knowledge.installer"
#. module: knowledge
#: help:knowledge.installer,wiki:0
msgid ""
"Lets you create wiki pages and page groups in order to keep track of "
"business knowledge and share it with and between your employees."
msgstr ""
+1 -20
View File
@@ -135,16 +135,6 @@
</record>
<!-- Emails action-->
<record model="ir.actions.act_window" id="action_view_mailgate_message">
<field name="name">Emails</field>
<field name="res_model">mailgate.message</field>
<field name="view_mode">tree,form</field>
<field name="view_type">form</field>
<field name="domain">[('history', '=', True)]</field>
<field name="view_id" ref="view_mailgate_message_tree"/>
<field name="context">{"search_default_user_id":uid}</field>
</record>
<record model="ir.actions.act_window" id="action_view_mailgate_thread">
<field name="name">Mailgateway Threads</field>
<field name="res_model">mailgate.thread</field>
@@ -196,18 +186,9 @@
view_id="view_mailgate_message_tree"
/>
<menuitem name="Emails" id="menu_base_config_mail"
parent="base.menu_base_partner" sequence="5" />
<menuitem name="Emails" id="menu_mailgate_message"
parent="menu_base_config_mail"
action="mail_gateway.action_view_mailgate_message"
/>
<act_window
id="act_res_partner_open_email" name="Attachments"
res_model="ir.attachment"
res_model="ir.attachment"
src_model="mailgate.message"
domain="[('res_id', '=', res_id),('res_model','=',model)]"/>
+1 -2
View File
@@ -29,10 +29,9 @@
<attribute name="string">Configure</attribute>
</xpath>
<group colspan="8">
<field name="marketing_campaign" />
<field name="email_template" />
<field name="crm_profiling" />
<field name="marketing_campaign" />
<field name="marketing_campaign_mailchimp" />
</group>
</data>
</field>
+1 -3
View File
@@ -29,10 +29,8 @@ class marketing_installer(osv.osv_memory):
help="Helps you to design templates of emails and integrate them in your different processes."),
'marketing_campaign':fields.boolean('Marketing Campaigns',
help="Helps you to manage marketing campaigns and automate actions and communication steps."),
'marketing_campaign_mailchimp':fields.boolean('Mailchimp Integration',
help="This modules integrate mailchimp.com's service with OpenERP to automate mass mailings."),
'crm_profiling':fields.boolean('Profiling Tools',
help="Helps you to perform segmentation within partners and design segmentation questionnaires")
help="Helps you to perform segmentation of partners and design segmentation questionnaires")
}
marketing_installer()
@@ -84,8 +84,8 @@
<field name="search_view_id" ref="view_campaign_analysis_search"/>
</record>
<menuitem name="Reporting" id="base.menu_report_association" parent="base.marketing_menu"/>
<menuitem action="action_campaign_analysis_all" id="menu_action_campaign_analysis_all" parent="base.menu_report_association" sequence="2"/>
<menuitem name="Reporting" id="base.menu_report_marketing" parent="base.marketing_menu"/>
<menuitem action="action_campaign_analysis_all" id="menu_action_campaign_analysis_all" parent="base.menu_report_marketing" sequence="2"/>
</data>
</openerp>
@@ -1,21 +1,21 @@
<?xml version="1.0" ?>
<openerp>
<data>
<!--
Process
-->
<record id="process_process_membershipprocess0" model="process.process">
<field eval="&quot;&quot;&quot;Membership Process&quot;&quot;&quot;" name="name"/>
<field name="model_id" ref="base.model_res_partner"/>
<field eval="1" name="active"/>
</record>
<!--
Process Node
-->
<record id="process_node_membershipproduct0" model="process.node">
<field name="menu_id" ref="membership.menu_membership_products"/>
<field name="model_id" ref="product.model_product_product"/>
@@ -25,7 +25,7 @@
<field name="process_id" ref="process_process_membershipprocess0"/>
<field eval="1" name="flow_start"/>
</record>
<record id="process_node_waitingmember0" model="process.node">
<field name="menu_id" ref="account.menu_action_invoice_tree1"/>
<field name="model_id" ref="account.model_account_invoice"/>
@@ -35,7 +35,7 @@
<field name="process_id" ref="process_process_membershipprocess0"/>
<field eval="0" name="flow_start"/>
</record>
<record id="process_node_invoicedmember0" model="process.node">
<field name="menu_id" ref="account.menu_action_invoice_tree1"/>
<field name="model_id" ref="account.model_account_invoice"/>
@@ -45,7 +45,7 @@
<field name="process_id" ref="process_process_membershipprocess0"/>
<field eval="0" name="flow_start"/>
</record>
<record id="process_node_paidmember0" model="process.node">
<field name="menu_id" ref="account.menu_action_invoice_tree1"/>
<field name="model_id" ref="account.model_account_invoice"/>
@@ -56,7 +56,7 @@
<field eval="&quot;&quot;&quot;object.state=='paid'&quot;&quot;&quot;" name="model_states"/>
<field eval="0" name="flow_start"/>
</record>
<record id="process_node_setassociation0" model="process.node">
<field name="menu_id" ref="membership.menu_members"/>
<field name="model_id" ref="base.model_res_partner"/>
@@ -67,7 +67,7 @@
<field eval="&quot;&quot;&quot;object.state=='paid'&quot;&quot;&quot;" name="model_states"/>
<field eval="0" name="flow_start"/>
</record>
<record id="process_node_associatedmember0" model="process.node">
<field name="menu_id" ref="membership.menu_members"/>
<field name="model_id" ref="base.model_res_partner"/>
@@ -78,62 +78,57 @@
<field eval="&quot;&quot;&quot;object.state=='associated'&quot;&quot;&quot;" name="model_states"/>
<field eval="0" name="flow_start"/>
</record>
<!--
Process Transition
-->
<record id="process_transition_producttomember0" model="process.transition">
<field eval="[(6,0,[])]" name="role_ids"/>
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Product to member&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Define product for membership.&quot;&quot;&quot;" name="note"/>
<field model="process.node" name="target_node_id" ref="process_node_waitingmember0"/>
<field model="process.node" name="source_node_id" ref="process_node_membershipproduct0"/>
</record>
<record id="process_transition_waitingtoinvoice0" model="process.transition">
<field eval="[(6,0,[])]" name="role_ids"/>
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Waiting to invoice&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Draft invoice is now open.&quot;&quot;&quot;" name="note"/>
<field model="process.node" name="target_node_id" ref="process_node_invoicedmember0"/>
<field model="process.node" name="source_node_id" ref="process_node_waitingmember0"/>
</record>
<record id="process_transition_action_create0" model="process.transition.action">
<field eval="&quot;&quot;&quot;invoice_open&quot;&quot;&quot;" name="action"/>
<field eval="&quot;&quot;&quot;object&quot;&quot;&quot;" name="state"/>
<field eval="&quot;&quot;&quot;Create&quot;&quot;&quot;" name="name"/>
<field name="transition_id" ref="process_transition_waitingtoinvoice0"/>
</record>
<record id="process_transition_invoicetopaid0" model="process.transition">
<field eval="[(6,0,[])]" name="role_ids"/>
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Invoice to paid&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Invoice is be paid.&quot;&quot;&quot;" name="note"/>
<field model="process.node" name="target_node_id" ref="process_node_paidmember0"/>
<field model="process.node" name="source_node_id" ref="process_node_invoicedmember0"/>
</record>
<record id="process_transition_invoicetoassociate0" model="process.transition">
<field eval="[(6,0,[])]" name="role_ids"/>
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;invoice to associate&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Invoiced member may be Associated member.&quot;&quot;&quot;" name="note"/>
<field model="process.node" name="target_node_id" ref="process_node_associatedmember0"/>
<field model="process.node" name="source_node_id" ref="process_node_invoicedmember0"/>
</record>
<record id="process_transition_associationpartner0" model="process.transition">
<field eval="[(6,0,[])]" name="role_ids"/>
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Association Partner&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Associated partner.&quot;&quot;&quot;" name="note"/>
<field model="process.node" name="target_node_id" ref="process_node_associatedmember0"/>
<field model="process.node" name="source_node_id" ref="process_node_setassociation0"/>
</record>
</data>
</openerp>
-1
View File
@@ -85,7 +85,6 @@
],
'demo_xml': [
'mrp_demo.xml',
'board_manufacturing_demo.xml'
],
'test': [
'test/mrp_procurement.yml',
-9
View File
@@ -1,9 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data noupdate="1">
<record id="base.user_root" model="res.users">
<field name="action_id" ref="open_board_manufacturing"/>
</record>
</data>
</openerp>
+4 -16
View File
@@ -1,7 +1,7 @@
<?xml version="1.0" ?>
<openerp>
<data>
<record id="process_node_productionorder0" model="process.node">
<field name="menu_id" ref="mrp.menu_mrp_production_action"/>
@@ -14,7 +14,7 @@
<field eval="1" name="flow_start"/>
</record>
<record id="process_node_minimumstockrule0" model="process.node">
<field name="menu_id" ref="mrp.menu_action_orderpoint_form"/>
<field name="model_id" ref="procurement.model_stock_warehouse_orderpoint"/>
@@ -36,7 +36,7 @@
<field eval="&quot;&quot;&quot;object.state in ('draft', 'confirmed', 'cancel', 'exception', 'running', 'done', 'waiting')&quot;&quot;&quot;" name="model_states"/>
<field eval="0" name="flow_start"/>
</record>
<record id="process_node_stockproduct1" model="process.node">
<field name="menu_id" ref="base.menu_mrp_procurement_action"/>
<field name="model_id" ref="mrp.model_procurement_order"/>
@@ -60,7 +60,7 @@
<field eval="&quot;&quot;&quot;object.state in ('draft', 'confirmed', 'cancel', 'exception', 'running', 'done', 'waiting')&quot;&quot;&quot;" name="model_states"/>
<field eval="0" name="flow_start"/>
</record>
<record id="process_node_serviceproduct1" model="process.node">
<field name="menu_id" ref="base.menu_mrp_procurement_action"/>
<field name="model_id" ref="mrp.model_procurement_order"/>
@@ -128,7 +128,6 @@
<field eval="0" name="flow_start"/>
</record>
<record id="process_transition_servicemto0" model="process.transition">
<field eval="[(6,0,[])]" name="role_ids"/>
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Make to Order&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;If the service has a 'Produce' supply method, this creates a task in the project management module of OpenERP.&quot;&quot;&quot;" name="note"/>
@@ -137,7 +136,6 @@
</record>
<record id="process_transition_servicemts0" model="process.transition">
<field eval="[(6,0,[])]" name="role_ids"/>
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Make to Stock&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;This is used in case of a service without any impact in the system, a training session for instance.&quot;&quot;&quot;" name="note"/>
@@ -146,7 +144,6 @@
</record>
<record id="process_transition_stockmts0" model="process.transition">
<field eval="[(6,0,[])]" name="role_ids"/>
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Make to Stock&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;The system waits for the products to be available in the stock. These products are typically procured manually or through a minimum stock rule.&quot;&quot;&quot;" name="note"/>
@@ -155,7 +152,6 @@
</record>
<record id="process_transition_stockproduct0" model="process.transition">
<field eval="[(6,0,[])]" name="role_ids"/>
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Make to Order&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;The system creates an order (production or purchased) depending on the sold quantity and the products parameters.&quot;&quot;&quot;" name="note"/>
@@ -164,7 +160,6 @@
</record>
<record id="process_transition_productionprocureproducts0" model="process.transition">
<field eval="[(6,0,[])]" name="role_ids"/>
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Procurement of raw material&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;In order to supply raw material (to be purchased or produced), the production order creates as much procurement orders as components listed in the BOM, through a run of the schedulers (MRP).&quot;&quot;&quot;" name="note"/>
@@ -173,7 +168,6 @@
</record>
<record id="process_transition_minimumstockprocure0" model="process.transition">
<field eval="[(6,0,[])]" name="role_ids"/>
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;'Minimum stock rule' material&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;The 'Minimum stock rule' allows the system to create procurement orders automatically as soon as the minimum stock is reached.&quot;&quot;&quot;" name="note"/>
@@ -182,7 +176,6 @@
</record>
<record id="process_transition_procurestockableproduct0" model="process.transition">
<field eval="[(6,0,[])]" name="role_ids"/>
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Procurement of stockable Products&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Depending on the chosen method to supply the stockable products, the procurement order creates a RFQ, a production order, ... &quot;&quot;&quot;" name="note"/>
@@ -191,7 +184,6 @@
</record>
<record id="process_transition_procureserviceproduct0" model="process.transition">
<field eval="[(6,0,[])]" name="role_ids"/>
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Procurement of services&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Depending on the chosen method to 'supply' the service, the procurement order creates a RFQ for a subcontracting purchase order or waits until the service is done (= the delivery of the products).&quot;&quot;&quot;" name="note"/>
@@ -200,7 +192,6 @@
</record>
<record id="process_transition_purchaseprocure0" model="process.transition">
<field eval="[(6,0,[])]" name="role_ids"/>
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Automatic RFQ&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;The system launches automatically a RFQ to the preferred supplier.&quot;&quot;&quot;" name="note"/>
@@ -209,7 +200,6 @@
</record>
<record id="process_transition_producttostockrules0" model="process.transition">
<field eval="[(6,0,[])]" name="role_ids"/>
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Procurement rule&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;The Minimum Stock Rule is an automatic procurement rule based on a mini and maxi quantity. It's available in the Inventory management menu and configured by product.&quot;&quot;&quot;" name="note"/>
@@ -218,7 +208,6 @@
</record>
<record id="process_transition_billofmaterialrouting0" model="process.transition">
<field eval="[(6,0,[])]" name="role_ids"/>
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Material Routing&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;The Bill of Material is linked to a routing, i.e. the succession of work centers.&quot;&quot;&quot;" name="note"/>
@@ -227,7 +216,6 @@
</record>
<record id="process_transition_bom0" model="process.transition">
<field eval="[(6,0,[])]" name="role_ids"/>
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Manufacturing decomposition&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;The Bill of Material is the product's decomposition. The components (that are products themselves) can also have their own Bill of Material (multi-level).&quot;&quot;&quot;" name="note"/>
@@ -36,7 +36,6 @@
-->
<record id="process_transition_servicerfq0" model="process.transition">
<field eval="[(6,0,[])]" name="role_ids"/>
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;To Buy&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;If the service has a 'Buy' supply method, this creates a RFQ, a subcontracting demand for instance.&quot;&quot;&quot;" name="note"/>
@@ -66,7 +66,6 @@
-->
<record id="process_transition_stockrfq0" model="process.transition">
<field eval="[(6,0,[])]" name="role_ids"/>
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;To Buy&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;In case the Supply method of the product is Buy, the system creates a purchase order.&quot;&quot;&quot;" name="note"/>
@@ -75,7 +74,6 @@
</record>
<record id="process_transition_stockproduction0" model="process.transition">
<field eval="[(6,0,[])]" name="role_ids"/>
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;To Produce&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;In case the Supply method of the product is Produce, the system creates a production order.&quot;&quot;&quot;" name="note"/>
@@ -72,7 +72,6 @@
-->
<record id="process_transition_productionstart0" model="process.transition">
<field eval="[(6,0,[])]" name="role_ids"/>
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Creation of the work order&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;The work orders are created on the basis of the production order.&quot;&quot;&quot;" name="note"/>
@@ -81,7 +80,6 @@
</record>
<record id="process_transition_workstartoperation0" model="process.transition">
<field eval="[(6,0,[])]" name="role_ids"/>
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Details of the work order&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;There is 1 work order per work center. The information about the number of cycles or the cycle time.&quot;&quot;&quot;" name="note"/>
@@ -90,7 +88,6 @@
</record>
<record id="process_transition_startdoneoperation0" model="process.transition">
<field eval="[(6,0,[])]" name="role_ids"/>
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Operation done&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;When the operation is finished, the operator updates the system by finishing the work order.&quot;&quot;&quot;" name="note"/>
@@ -99,7 +96,6 @@
</record>
<record id="process_transition_startcanceloperation0" model="process.transition">
<field eval="[(6,0,[])]" name="role_ids"/>
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Operation cancelled&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;When the operation needs to be cancelled, you can do it in the work order form.&quot;&quot;&quot;" name="note"/>
+20 -19
View File
@@ -679,26 +679,27 @@ class mrp_repair_line(osv.osv, ProductChangeMixin):
"""
if not type:
return {'value': {
'location_id': False,
'location_dest_id': False
}
}
produc_id = self.pool.get('stock.location').search(cr, uid, [('name','=','Production')])[0]
if type == 'add':
stock_id = self.pool.get('stock.location').search(cr, uid, [('name','=','Stock')])[0]
to_invoice = False
if guarantee_limit and date.today() > datetime.strptime(guarantee_limit, '%Y-%m-%d'):
to_invoice=True
return {'value': {
'to_invoice': to_invoice,
'location_id': stock_id,
'location_dest_id': produc_id
}
}
return {'value': {
'to_invoice': False,
'location_id': produc_id,
'location_id': False,
'location_dest_id': False
}
}
product_id = self.pool.get('stock.location').search(cr, uid, [('name','=','Production')])[0]
if type != 'add':
return {'value': {
'to_invoice': False,
'location_id': product_id,
'location_dest_id': False
}
}
stock_id = self.pool.get('stock.location').search(cr, uid, [('name','=','Stock')])[0]
to_invoice = (guarantee_limit and
datetime.strptime(guarantee_limit, '%Y-%m-%d') < datetime.now())
return {'value': {
'to_invoice': to_invoice,
'location_id': stock_id,
'location_dest_id': product_id
}
}
+2 -2
View File
@@ -33,9 +33,9 @@ class order(report_sxw.rml_parse):
def total(self, repair):
total = 0.0
for operation in repair.operations:
total+=operation.price_subtotal
total += operation.price_subtotal
for fee in repair.fees_lines:
total+=fee.price_subtotal
total += fee.price_subtotal
total = total + repair.amount_tax
return total
+4 -4
View File
@@ -343,7 +343,7 @@
<para style="terp_default_9">Net Total :</para>
</td>
<td>
<para style="P26">[[ formatLang(o.amount_untaxed)]] [[ o.pricelist_id.currency_id. symbol ]]</para>
<para style="P26">[[ formatLang(o.amount_untaxed, digits=get_digits(dp='Sale Price'))]] [[ o.pricelist_id.currency_id. symbol ]]</para>
</td>
</tr>
@@ -357,7 +357,7 @@
<para style="terp_default_9">Taxes:</para>
</td>
<td>
<para style="P26">[[ formatLang(o.amount_tax)]] [[ o.pricelist_id.currency_id. symbol ]]</para>
<para style="P26">[[ formatLang(o.amount_tax, digits=get_digits(dp='Account'))]] [[ o.pricelist_id.currency_id. symbol ]]</para>
</td>
</tr>
<tr>
@@ -370,7 +370,7 @@
<para style="terp_tblheader_Details">Total :</para>
</td>
<td>
<para style="terp_default_right_bold_9">[[ formatLang(total(o)) ]] [[ o.pricelist_id.currency_id. symbol ]]</para>
<para style="terp_default_right_bold_9">[[ formatLang(total(o), digits=get_digits(dp='Sale Price')) ]] [[ o.pricelist_id.currency_id. symbol ]]</para>
</td>
</tr>
</blockTable>
@@ -391,4 +391,4 @@
<font color="white"> </font>
</para>
</story>
</document>
</document>
+2 -2
View File
@@ -8,13 +8,13 @@ msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2009-12-08 11:46+0000\n"
"PO-Revision-Date: 2010-10-03 15:55+0000\n"
"PO-Revision-Date: 2010-10-04 06:51+0000\n"
"Last-Translator: Naven <naven@ipv4.pl>\n"
"Language-Team: Polish <pl@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-10-04 04:57+0000\n"
"X-Launchpad-Export-Date: 2010-10-05 04:57+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: multi_company
@@ -31,10 +31,21 @@ class account_statement(report_sxw.rml_parse):
self.localcontext.update({
'time': time,
'get_total':self._get_total,
'get_data':self._get_data,
})
def _get_data(self, statement):
lines = []
for line in statement.line_ids:
lines.append(line)
return lines
def _get_total(self, statement_line_ids):
total = 0.0
for line in statement_line_ids:
total += line.amount
return total
report_sxw.report_sxw('report.account.statement', 'account.bank.statement', 'addons/statement/report/account_statement.rml', parser=account_statement,header='internal')
@@ -216,10 +216,10 @@
<para style="terp_default_Centre_8">[[ formatLang(statement.closing_date,date=True) ]]</para>
</td>
<td>
<para style="terp_default_Centre_8">[[ formatLang(statement.balance_start) ]][[ company.currency_id.symbol ]]</para>
<para style="terp_default_Centre_8">[[ formatLang(statement.balance_start, digits=get_digits(dp='Account')) ]][[ company.currency_id.symbol ]]</para>
</td>
<td>
<para style="terp_default_Centre_8">[[ formatLang(statement.balance_end_real) ]][[ company.currency_id.symbol ]]</para>
<para style="terp_default_Centre_8">[[ formatLang(statement.balance_end_real, digits=get_digits(dp='Account')) ]][[ company.currency_id.symbol ]]</para>
</td>
</tr>
</blockTable>
@@ -247,13 +247,14 @@
<td>
<para style="P2">[[ repeatIn(statement.line_ids,'line_ids') and ' ' or removeParentNode('blockTable') ]]</para>
<para style="P2">[[ repeatIn(get_data(statement), 'line_ids')]]</para>
<para style="terp_default_9">[[ line_ids.name ]]</para>
<!--<para style="terp_default_9">[[ line_ids.name ]]</para>-->
<para style="terp_default_9">[[ line_ids['name'] ]]</para>
</td>
<td>
<para style="terp_default_9">[[ line_ids.partner_id.name ]]</para>
</td>
<td>
<para style="terp_default_Right_9">[[ formatLang(line_ids.amount) ]][[ company.currency_id.symbol ]]</para>
<para style="terp_default_Right_9">[[ formatLang(line_ids.amount, digits=get_digits(dp='Account')) ]][[ company.currency_id.symbol ]]</para>
</td>
</tr>
</blockTable>
@@ -268,7 +269,7 @@
<para style="terp_default_Right_9_Bold">Total :</para>
</td>
<td>
<para style="terp_default_Right_9">[[ formatLang(get_total(statement.line_ids)) ]][[ company.currency_id.symbol ]]</para>
<para style="terp_default_Right_9">[[ formatLang(get_total(statement.line_ids), digits=get_digits(dp='Account')) ]][[ company.currency_id.symbol ]]</para>
</td>
</tr>
</blockTable>
@@ -282,4 +283,4 @@
<font color="white"> </font>
</para>
</story>
</document>
</document>
-3
View File
@@ -282,9 +282,6 @@
</form>
</field>
</page>
<page string="Roles Required">
<field name="role_ids" colspan="4" nolabel="1"/>
</page>
<page string="Roles from Workflow">
<field name="transition_ids" colspan="4" nolabel="1"/>
</page>
@@ -40,7 +40,6 @@
-->
<record id="process_transition_supplierofproduct0" model="process.transition">
<field eval="[(6,0,[])]" name="role_ids"/>
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Supplier of the product&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;1 or several supplier(s) can be linked to a product. All information stands in the product form.&quot;&quot;&quot;" name="note"/>
+2 -1
View File
@@ -257,11 +257,12 @@
<field name="domain">[('parent_id','=',False)]</field>
<field name="view_type">tree</field>
<field name="view_id" ref="product_category_tree_view"/>
<field name="help">Products category opens a tree structure view of your products by category.</field>
<field name="help">This is a hyerarchical structure of your product's categories, you can enter a category to browse all products in this category and his children.</field>
</record>
<menuitem
action="product_category_action"
id="product.menu_products_category"
groups="base.group_extended"
parent="base.menu_product"
sequence="0"/>
<record id="product_category_action_form" model="ir.actions.act_window">
+4 -6
View File
@@ -25,15 +25,13 @@ class misc_tools_installer(osv.osv_memory):
_inherit = 'res.config.installer'
_columns = {
'lunch':fields.boolean('Lunch',help='Helps to manage Lunch Orders.'),
'subscription':fields.boolean('Recurring Documents',help='Helps to add subscription on documents.'),
'survey':fields.boolean('Survey',help='Manages Custom Surveys.'),
'idea':fields.boolean('Idea',help='Manages ideas and votes'),
'audittrail':fields.boolean('Audit Trail',help="Lets you to track user's operations on specific Objects."),
'lunch':fields.boolean('Lunch',help='A simple module to help you to manage Lunch orders.'),
'subscription':fields.boolean('Recurring Documents',help='Helps to generate automatically recurring documents.'),
'survey':fields.boolean('Survey',help='Allows you to organize surveys.'),
'idea':fields.boolean('Ideas Box',help='Promote ideas of the employees, votes and discussion on best ideas.'),
}
_defaults = {
'lunch': True,
}
misc_tools_installer()
@@ -26,10 +26,9 @@
</xpath>
<group colspan="8">
<field name="lunch"/>
<field name="subscription"/>
<field name="survey"/>
<field name="idea"/>
<field name="audittrail"/>
<field name="survey"/>
<field name="subscription" groups="base.group_extended"/>
</group>
</data>
</field>
+3 -6
View File
@@ -3,12 +3,9 @@
<data noupdate="1">
<!--
Administrator shortcut
Demo user startup menu
-->
<record id="base.user_root" model="res.users">
<field name="action_id" ref="open_board_project"/>
</record>
Administrator shortcut
Demo user startup menu
-->
<record id="note_project" model="board.note">
<field name="name">Don't forget the new development policies.</field>
+3 -7
View File
@@ -34,14 +34,10 @@ class project_installer(osv.osv_memory):
'hr_timesheet_sheet': fields.boolean('Timesheets',
help="Tracks and helps employees encode and validate timesheets "
"and attendances."),
'hr_timesheet_invoice': fields.boolean('Invoice Based on Hours',
help="Helps generate invoices based on human resources "
"costs and general expenses."),
'project_timesheet': fields.boolean('Bill Time on Tasks',
help="Helps generate invoices based on time spent on tasks, if activated on the project."),
'account_budget': fields.boolean('Budgets',
help="Helps accountants manage analytic and crossover budgets."),
'project_messages': fields.boolean('Project Messages',
help="Lets employees send messages to other members of the "
"projects they're working on."),
'project_issue': fields.boolean('Issues Tracker',
help="Automatically synchronizes project tasks and crm cases."),
# Methodologies
@@ -50,7 +46,7 @@ class project_installer(osv.osv_memory):
"in the SCRUM methodology."),
'project_gtd': fields.boolean('Getting Things Done',
help="GTD is a methodology to efficiently organise yourself and your tasks. This module fully integrates GTD principle with OpenERP's project management."),
}
}
_defaults={
'project_issue': True,
+22 -25
View File
@@ -2,20 +2,20 @@
<openerp>
<data>
<!--
<!--
Process
-->
<record id="process_process_tasksprocess0" model="process.process">
<field eval="1" name="active"/>
<field name="model_id" ref="project.model_project_task"/>
<field eval="&quot;&quot;&quot;Tasks&quot;&quot;&quot;" name="name"/>
</record>
<!--
<!--
Process Node
-->
<record id="process_node_taskbydelegate0" model="process.node">
<field name="menu_id" ref="project.menu_action_view_task"/>
<field name="model_id" ref="project.model_project_task"/>
@@ -26,7 +26,7 @@
<field eval="&quot;&quot;&quot;object.state in ('open', 'pending')&quot;&quot;&quot;" name="model_states"/>
<field eval="1" name="flow_start"/>
</record>
<record id="process_node_drafttask0" model="process.node">
<field name="menu_id" ref="project.menu_action_view_task"/>
<field name="model_id" ref="project.model_project_task"/>
@@ -37,7 +37,7 @@
<field eval="&quot;&quot;&quot;object.state=='draft'&quot;&quot;&quot;" name="model_states"/>
<field eval="0" name="flow_start"/>
</record>
<record id="process_node_opentask0" model="process.node">
<field name="menu_id" ref="project.menu_action_view_task"/>
<field name="model_id" ref="project.model_project_task"/>
@@ -48,7 +48,7 @@
<field eval="&quot;&quot;&quot;object.state=='open'&quot;&quot;&quot;" name="model_states"/>
<field eval="0" name="flow_start"/>
</record>
<record id="process_node_donetask0" model="process.node">
<field name="menu_id" ref="project.menu_action_view_task"/>
<field name="model_id" ref="project.model_project_task"/>
@@ -59,77 +59,74 @@
<field eval="&quot;&quot;&quot;object.state=='done'&quot;&quot;&quot;" name="model_states"/>
<field eval="0" name="flow_start"/>
</record>
<!--
<!--
Process Transition
-->
<record id="process_transition_delegate0" model="process.transition">
<field eval="[(6,0,[])]" name="role_ids"/>
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Delegate&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Delegates tasks to the other user&quot;&quot;&quot;" name="note"/>
<field model="process.node" name="target_node_id" ref="process_node_drafttask0"/>
<field model="process.node" name="source_node_id" ref="process_node_taskbydelegate0"/>
</record>
<record id="process_transition_draftopentask0" model="process.transition">
<field eval="[(6,0,[])]" name="role_ids"/>
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Draft Open task&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;From draft state, it will come into the open state.&quot;&quot;&quot;" name="note"/>
<field model="process.node" name="target_node_id" ref="process_node_opentask0"/>
<field model="process.node" name="source_node_id" ref="process_node_drafttask0"/>
</record>
<record id="process_transition_opendonetask0" model="process.transition">
<field eval="[(6,0,[])]" name="role_ids"/>
<field eval="[(6,0,[])]" name="transition_ids"/>
<field eval="&quot;&quot;&quot;Open Done Task&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;When task is completed, it will come into the done state.&quot;&quot;&quot;" name="note"/>
<field model="process.node" name="target_node_id" ref="process_node_donetask0"/>
<field model="process.node" name="source_node_id" ref="process_node_opentask0"/>
</record>
<!--
<!--
Process Action
-->
<record id="process_transition_action_draftopentask0" model="process.transition.action">
<field eval="&quot;&quot;&quot;do_open&quot;&quot;&quot;" name="action"/>
<field eval="&quot;&quot;&quot;object&quot;&quot;&quot;" name="state"/>
<field eval="&quot;&quot;&quot;Open&quot;&quot;&quot;" name="name"/>
<field name="transition_id" ref="process_transition_draftopentask0"/>
</record>
<record id="process_transition_action_draftcanceltask0" model="process.transition.action">
<field eval="&quot;&quot;&quot;do_cancel&quot;&quot;&quot;" name="action"/>
<field eval="&quot;&quot;&quot;object&quot;&quot;&quot;" name="state"/>
<field eval="&quot;&quot;&quot;Cancel&quot;&quot;&quot;" name="name"/>
<field name="transition_id" ref="process_transition_draftopentask0"/>
</record>
<record id="process_transition_action_openpendingtask0" model="process.transition.action">
<field eval="&quot;&quot;&quot;do_pending&quot;&quot;&quot;" name="action"/>
<field eval="&quot;&quot;&quot;object&quot;&quot;&quot;" name="state"/>
<field eval="&quot;&quot;&quot;Set pending&quot;&quot;&quot;" name="name"/>
<field name="transition_id" ref="process_transition_opendonetask0"/>
</record>
<record id="process_transition_action_opendrafttask0" model="process.transition.action">
<field eval="&quot;&quot;&quot;do_draft&quot;&quot;&quot;" name="action"/>
<field eval="&quot;&quot;&quot;object&quot;&quot;&quot;" name="state"/>
<field eval="&quot;&quot;&quot;Draft&quot;&quot;&quot;" name="name"/>
<field name="transition_id" ref="process_transition_opendonetask0"/>
</record>
<record id="process_transition_action_opencanceltask0" model="process.transition.action">
<field eval="&quot;&quot;&quot;do_cancel&quot;&quot;&quot;" name="action"/>
<field eval="&quot;&quot;&quot;object&quot;&quot;&quot;" name="state"/>
<field eval="&quot;&quot;&quot;Cancel&quot;&quot;&quot;" name="name"/>
<field name="transition_id" ref="process_transition_opendonetask0"/>
</record>
</data>
</openerp>
+10 -4
View File
@@ -190,7 +190,6 @@ class project(osv.osv):
'active': True,
'priority': 1,
'sequence': 10,
'warn_manager': True,
}
def _check_dates(self, cr, uid, ids):
@@ -373,6 +372,11 @@ class task(osv.osv):
return res
def onchange_remaining(self, cr, uid, ids, remaining=0.0, planned = 0.0):
if remaining and not planned:
return {'value':{'planned_hours': remaining}}
return {}
def onchange_planned(self, cr, uid, ids, planned = 0.0, effective = 0.0):
return {'value':{'remaining_hours': planned - effective}}
@@ -482,7 +486,6 @@ class task(osv.osv):
return True
_constraints = [
(_check_dates, 'Error! Task start-date must be lower then task end-date.', ['date_start', 'date_end']),
(_check_recursion, _('Error ! You cannot create recursive tasks.'), ['parent_ids'])
]
#
@@ -615,7 +618,10 @@ class task(osv.osv):
def do_open(self, cr, uid, ids, *args):
tasks= self.browse(cr,uid,ids)
for t in tasks:
self.write(cr, uid, [t.id], {'state': 'open', 'date_start': time.strftime('%Y-%m-%d %H:%M:%S'),})
data = {'state': 'open'}
if not t.date_start:
data['date_start'] = time.strftime('%Y-%m-%d %H:%M:%S')
self.write(cr, uid, [t.id], data)
message = _('Task ') + " '" + t.name + "' "+ _("is Open.")
self.log(cr, uid, t.id, message)
return True
@@ -680,7 +686,7 @@ class task(osv.osv):
def prev_type(self, cr, uid, ids, *args):
for task in self.browse(cr, uid, ids):
typeid = task.type_id.id
types = map(lambda x:x.id, task.project_id.type_ids)
types = map(lambda x:x.id, task.project_id and task.project_id.type_ids or [])
if types:
if typeid and typeid in types:
index = types.index(typeid)
+3 -3
View File
@@ -27,11 +27,11 @@
<field name="project_issue"/>
<field name="project_long_term" groups="base.group_extended"/>
<field name="hr_timesheet_sheet"/>
<field name="hr_timesheet_invoice"/>
<field name="project_timesheet"/>
<field name="account_budget" groups="base.group_extended"/>
<field name="project_messages" groups="base.group_extended"/>
<newline/>
<separator string="Methodologies" colspan="4"/>
<field name="project_scrum" groups="base.group_extended"/>
<field name="project_scrum"/>
<field name="project_gtd"/>
</group>
</data>
+11 -13
View File
@@ -207,7 +207,7 @@
<form string="Task edition">
<group colspan="6" col="6">
<field name="name" select="1"/>
<field name="project_id" required="1" select="1" domain="[('user_id','=',uid)]"/>
<field name="project_id" select="1" domain="[('user_id','=',uid)]"/>
<field name="total_hours" widget="float_time"/>
<field name="date_deadline" attrs="{'readonly':[('state','in',['done', 'cancelled'])]}"/>
<field name="user_id" select="1" attrs="{'readonly':[('state','in',['done', 'cancelled'])]}"/>
@@ -303,15 +303,13 @@
<field eval="2" name="priority"/>
<field name="arch" type="xml">
<tree colors="grey:state in ('cancelled','done');blue:remaining_hours&lt;0 and state in ('pending');red:date_deadline and (date_deadline&gt;current_date) and (state in ('draft','open'));black:state not in ('cancelled','done')" string="Tasks">
<field name="id"/>
<field name="sequence" invisible="not context.get('seq_visible', False)"/>
<field name="name"/>
<field name="project_id" icon="gtk-indent" domain="['|',('user_id','=',uid),('members','=',uid)]"/>
<field name="user_id"/>
<field name="project_id" icon="gtk-indent" domain="['|',('user_id','=',uid),('members','=',uid)]" invisible="context.get('user_invisible', False)"/>
<field name="user_id" invisible="context.get('user_invisible', False)"/>
<field name="delegated_user_id" invisible="context.get('show_delegated', True)"/>
<field name="planned_hours"/>
<field name="remaining_hours" widget="float_time" sum="Remaining Hours" invisible="context.get('set_visible',False)"/>
<field name="delay_hours"/>
<field name="remaining_hours" widget="float_time" sum="Remaining Hours" on_change="onchange_remaining(remaining_hours,planned_hours)"/>
<field name="planned_hours" widget="float_time" invisible="1"/>
<field name="date_deadline" invisible="context.get('set_visible',False)"/>
<field name="type_id" groups="base.group_extended" invisible="context.get('set_visible',False)"/>
<button name="next_type" invisible="context.get('set_visible',False)"
@@ -384,10 +382,10 @@
<filter string="In Progress" domain="[('state','=','open')]" help="In Progress Tasks" icon="terp-camera_test"/>
<filter string="Pending" domain="[('state','=','pending')]" context="{'show_delegated':False}" help="Pending Tasks" icon="terp-gtk-media-pause"/>
<separator orientation="vertical"/>
<filter name="edit"
string="Edit" context="{'set_editable':True,'seq_visible': True}"
icon="gtk-execute"
groups="base.group_extended"/>
<filter name="edit"
string="Edit" context="{'set_editable':True,'seq_visible': True}"
icon="gtk-execute"
groups="base.group_extended"/>
<separator orientation="vertical"/>
<filter string="Deadlines" domain="[('date_deadline','&lt;&gt;',False)]" help="Show only tasks having a deadline" icon="terp-gnome-cpu-frequency-applet+"/>
<separator orientation="vertical"/>
@@ -486,7 +484,7 @@
</record>
<record id="open_task_type_form" model="ir.actions.act_window">
<field name="name">Task Stages</field>
<field name="name">Stages</field>
<field name="res_model">project.task.type</field>
<field name="view_type">form</field>
<field name="view_id" ref="task_type_tree"/>
@@ -498,7 +496,7 @@
<act_window context="{'search_default_user_id': [active_id]}" id="act_res_users_2_project_project" name="User's projects" res_model="project.project" src_model="res.users" view_mode="tree,form" view_type="form"/>
<act_window
context="{'search_default_project_id': [active_id]}"
context="{'search_default_project_id': [active_id]}"
id="act_project_project_2_project_task_all"
name="Tasks"
res_model="project.task"
+5 -5
View File
@@ -106,19 +106,19 @@ class project_task(osv.osv):
timebox_obj = self.pool.get('project.gtd.timebox')
if res['type'] == 'search':
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,'gtd_visible':True}" icon="gtk-new" help="Undefined Timebox" string="%s"/>''' % (_('Inbox'),)
search_extended ='''<newline/><group col="%d" expand="1" 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,'gtd_visible':True,'user_invisible':True}" icon="gtk-new" help="Undefined Timebox" string="%s"/>''' % (_('Inbox'),)
search_extended += '''<filter context="{'set_editable':True,'set_visible':True,'gtd_visible':True,'user_invisible':True}" icon="gtk-new" help="Undefined Timebox" string="%s"/>''' % (_('GTD'),)
search_extended += '''<separator orientation="vertical"/>'''
for time in tt:
if time.icon:
icon = time.icon
else :
icon=""
search_extended += '''<filter domain="[('timebox_id','=', ''' + str(time.id) + ''')]" icon="''' + icon + '''" string="''' + time.name + '''" context="{'gtd_visible':True}"/>'''
search_extended += '''<filter domain="[('timebox_id','=', ''' + str(time.id) + ''')]" icon="''' + icon + '''" string="''' + time.name + '''" context="{'gtd_visible':True, 'user_invisible': True}"/>'''
search_extended += '''
<separator orientation="vertical"/>
<field name="context_id" select="1" widget="selection" />
<field name="priority" select="1" />
<field name="context_id" select="1" widget="selection"/>
</group>
</search> '''
if search_extended:
+2 -1
View File
@@ -77,9 +77,10 @@
<field name="inherit_id" ref="project.view_task_tree2" />
<field name="arch" type="xml">
<field name="remaining_hours" position="after">
<button name="prev_timebox" type="object" icon="gtk-go-back" string="Previous" states="draft,pending,open" groups="project_gtd.group_project_getting" invisible=" not context.get('gtd_visible',False)"/>
<field string="Timebox" name="timebox_id" groups="project_gtd.group_project_getting" invisible=" not context.get('gtd_visible', False)"/>
<button name="prev_timebox" type="object" icon="gtk-go-back" string="Previous" states="draft,pending,open" groups="project_gtd.group_project_getting" invisible=" not context.get('gtd_visible',False)"/>
<button name="next_timebox" type="object" icon="gtk-go-forward" string="Next" states="draft,pending,open" groups="project_gtd.group_project_getting" invisible=" not context.get('gtd_visible',False)"/>
<field name="context_id" groups="project_gtd.group_project_getting" invisible="not context.get('gtd_visible', False)" widget="selection"/>
<button name="do_reopen" states="done,cancelled" string="Reactivate" type="object" icon="gtk-convert" help="For reopening the tasks" invisible="not context.get('set_visible',False)"/>
</field>
</field>
-1
View File
@@ -32,7 +32,6 @@
'depends': [
'crm',
'project',
'hr_timesheet_sheet',
],
'init_xml': [
'project_issue_data.xml'
@@ -35,7 +35,7 @@
<field name="type">graph</field>
<field name="arch" type="xml">
<graph orientation="vertical" string="Project Issue" type="bar">
<field name="stage_id"/>
<field name="type_id"/>
<field name="nbr" operator="+"/>
<field group="True" name="user_id"/>
</graph>
+25 -37
View File
@@ -144,7 +144,7 @@ class project_issue(crm.crm_case, osv.osv):
_columns = {
'id': fields.integer('ID'),
'name': fields.char('Name', size=128, required=True),
'name': fields.char('Issue', size=128, required=True),
'active': fields.boolean('Active', required=False),
'create_date': fields.datetime('Creation Date', readonly=True),
'write_date': fields.datetime('Update Date', readonly=True),
@@ -177,7 +177,7 @@ class project_issue(crm.crm_case, osv.osv):
'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="[('object_id.model', '=', 'project.issue')]"),
'type_id': fields.many2one ('project.task.type', 'Resolution', domain="[('object_id.model', '=', 'project.issue')]"),
'project_id':fields.many2one('project.project', 'Project'),
'duration': fields.float('Duration'),
'task_id': fields.many2one('project.task', 'Task', domain="[('project_id','=',project_id)]"),
@@ -279,16 +279,29 @@ class project_issue(crm.crm_case, osv.osv):
def convert_to_bug(self, cr, uid, ids, context=None):
return self._convert(cr, uid, ids, 'bug_categ', context=context)
def onchange_stage_id(self, cr, uid, ids, stage_id, context=None):
if context is None:
context = {}
if not stage_id:
return {'value':{}}
stage = self.pool.get('crm.case.stage').browse(cr, uid, stage_id, context)
if not stage.on_change:
return {'value':{}}
return {'value':{}}
def next_type(self, cr, uid, ids, *args):
for task in self.browse(cr, uid, ids):
typeid = task.type_id.id
types = map(lambda x:x.id, task.project_id.type_ids or [])
if types:
if not typeid:
self.write(cr, uid, task.id, {'type_id': types[0]})
elif typeid and typeid in types and types.index(typeid) != len(types)-1 :
index = types.index(typeid)
self.write(cr, uid, task.id, {'type_id': types[index+1]})
return True
def prev_type(self, cr, uid, ids, *args):
for task in self.browse(cr, uid, ids):
typeid = task.type_id.id
types = map(lambda x:x.id, task.project_id and task.project_id.type_ids or [])
if types:
if typeid and typeid in types:
index = types.index(typeid)
self.write(cr, uid, task.id, {'type_id': index and types[index-1] or False})
return True
def onchange_task_id(self, cr, uid, ids, task_id, context=None):
if context is None:
context = {}
@@ -370,31 +383,6 @@ class project_issue(crm.crm_case, osv.osv):
return res
def get_stage_dict(self, cr, uid, ids, context=None):
"""This function gives dictionary for stage according to stage levels
@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 context: A standard dictionary for contextual values"""
if not context:
context = {}
stage_obj = self.pool.get('crm.case.stage')
domain = [('object_id.model', '=', self._name)]
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
for stage in stage_obj.browse(cr, uid, sid, context=context):
s.setdefault(section, {})
s[section][previous.get(section, False)] = stage.id
previous[section] = stage.id
return s
def message_update(self, cr, uid, ids, vals={}, msg="", default_act='pending', context=None):
if context is None:
context = {}
@@ -31,39 +31,5 @@
<field name="name">v3.0</field>
</record>
<!-- Case Stage -->
<!-- For Bugs -->
<record model="crm.case.stage" id="stage1">
<field name="name">Accepted as Bug</field>
<field name="section_id" ref="crm.section_sales_department"/>
<field name="object_id" search="[('model','=','project.issue')]" model="ir.model"/>
</record>
<record model="crm.case.stage" id="stage2">
<field name="name">Fixed</field>
<field name="section_id" ref="crm.section_sales_department"/>
<field name="object_id" search="[('model','=','project.issue')]" model="ir.model"/>
</record>
<record model="crm.case.stage" id="stage3">
<field name="name">Won't fix</field>
<field name="section_id" ref="crm.section_sales_department"/>
<field name="object_id" search="[('model','=','project.issue')]" model="ir.model"/>
</record>
<record model="crm.case.stage" id="stage4">
<field name="name">Invalid</field>
<field name="section_id" ref="crm.section_sales_department"/>
<field name="object_id" search="[('model','=','project.issue')]" model="ir.model"/>
</record>
<record model="crm.case.stage" id="stage5">
<field name="name">Awaiting Response</field>
<field name="section_id" ref="crm.section_sales_department"/>
<field name="object_id" search="[('model','=','project.issue')]" model="ir.model"/>
</record>
<record model="crm.case.stage" id="stage6">
<field name="name">Works For Me</field>
<field name="section_id" ref="crm.section_sales_department"/>
<field name="object_id" search="[('model','=','project.issue')]" model="ir.model"/>
</record>
</data>
</openerp>
@@ -12,7 +12,6 @@
<field name="section_id" ref="crm.section_sales_department"/>
<field eval="1" name="active"/>
<field name="categ_id" ref="bug_categ"/>
<field name="stage_id" ref="stage1"/>
<field name="project_id" ref="project.project_project_22"/>
<field eval="15.0" name="duration"/>
<field eval="&quot;Bug in Accounts module&quot;" name="name"/>
@@ -30,7 +29,6 @@
<field eval="1" name="active"/>
<field eval="3.5" name="duration"/>
<field name="categ_id" ref="bug_categ"/>
<field name="stage_id" ref="stage2"/>
<field eval="&quot;Program not giving proper output&quot;" name="name"/>
<field name="project_id" ref="project.project_project_22"/>
</record>
@@ -45,7 +43,6 @@
<field eval="1" name="active"/>
<field eval="2.3" name="duration"/>
<field name="categ_id" ref="bug_categ"/>
<field name="stage_id" ref="stage3"/>
<field name="project_id" ref="project.project_project_23"/>
<field eval="&quot;Output incorrect&quot;" name="name"/>
</record>
@@ -61,7 +58,6 @@
<field eval="1" name="active"/>
<field eval="4.0" name="duration"/>
<field name="categ_id" ref="bug_categ"/>
<field name="stage_id" ref="stage4"/>
<field name="project_id" ref="project.project_project_22"/>
<field eval="&quot;Problem loading page&quot;" name="name"/>
</record>
@@ -76,7 +72,6 @@
<field eval="1" name="active"/>
<field eval="1.0" name="duration"/>
<field name="categ_id" ref="bug_categ"/>
<field name="stage_id" ref="stage5"/>
<field name="project_id" ref="project.project_project_22"/>
<field eval="&quot;Page not Found&quot;" name="name"/>
</record>
@@ -92,7 +87,6 @@
<field eval="1" name="active"/>
<field eval="4.0" name="duration"/>
<field name="categ_id" ref="bug_categ"/>
<field name="stage_id" ref="stage6"/>
<field name="project_id" ref="project.project_project_22"/>
<field eval="&quot;Programming Error&quot;" name="name"/>
</record>
@@ -108,7 +102,6 @@
<field eval="1" name="active"/>
<field eval="2.0" name="duration"/>
<field name="categ_id" ref="bug_categ"/>
<field name="stage_id" ref="stage6"/>
<field name="project_id" ref="project.project_project_9"/>
<field eval="&quot;Logical Error in Program&quot;" name="name"/>
</record>
@@ -124,7 +117,6 @@
<field eval="1" name="active"/>
<field eval="7.3" name="duration"/>
<field name="categ_id" ref="bug_categ"/>
<field name="stage_id" ref="stage5"/>
<field name="project_id" ref="project.project_project_9"/>
<field eval="&quot;Constraint Error&quot;" name="name"/>
</record>
@@ -139,7 +131,6 @@
<field eval="1" name="active"/>
<field eval="1.3" name="duration"/>
<field name="categ_id" ref="feature_request_categ"/>
<field name="stage_id" ref="stage5"/>
<field name="project_id" ref="project.project_project_22"/>
<field eval="&quot;Error in Program&quot;" name="name"/>
</record>
@@ -155,7 +146,6 @@
<field eval="1" name="active"/>
<field eval="13.0" name="duration"/>
<field name="categ_id" ref="feature_request_categ"/>
<field name="stage_id" ref="stage5"/>
<field name="project_id" ref="project.project_project_9"/>
<field eval="&quot;Patches Error in Program&quot;" name="name"/>
</record>
@@ -171,7 +161,6 @@
<field eval="1" name="active"/>
<field eval="3.2" name="duration"/>
<field name="categ_id" ref="feature_request_categ"/>
<field name="stage_id" ref="stage1"/>
<field name="project_id" ref="project.project_project_21"/>
<field eval="&quot;New Features To Be Added&quot;" name="name"/>
</record>
@@ -187,7 +176,6 @@
<field eval="1" name="active"/>
<field eval="3.0" name="duration"/>
<field name="categ_id" ref="feature_request_categ"/>
<field name="stage_id" ref="stage2"/>
<field name="project_id" ref="project.project_project_21"/>
<field eval="&quot;Add menus to the module&quot;" name="name"/>
<field eval="&quot;info@opensides.be&quot;" name="email_from"/>
@@ -204,7 +192,6 @@
<field eval="1" name="active"/>
<field eval="2.0" name="duration"/>
<field name="categ_id" ref="feature_request_categ"/>
<field name="stage_id" ref="stage3"/>
<field name="project_id" ref="project.project_project_9"/>
<field eval="&quot;Include Attendance sheet in Project&quot;" name="name"/>
<field eval="&quot;contact@tecsas.fr&quot;" name="email_from"/>
@@ -222,7 +209,6 @@
<field eval="1" name="active"/>
<field eval="2.45" name="duration"/>
<field name="categ_id" ref="feature_request_categ"/>
<field name="stage_id" ref="stage5"/>
<field name="project_id" ref="project.project_project_22"/>
<field eval="&quot;Create new object&quot;" name="name"/>
</record>
@@ -238,7 +224,6 @@
<field eval="1" name="active"/>
<field eval="15.0" name="duration"/>
<field name="categ_id" ref="feature_request_categ"/>
<field name="stage_id" ref="stage6"/>
<field name="project_id" ref="project.project_project_22"/>
<field eval="&quot;Improve Reports in HRMS&quot;" name="name"/>
</record>
@@ -254,7 +239,6 @@
<field eval="1" name="active"/>
<field eval="06.15" name="duration"/>
<field name="categ_id" ref="feature_request_categ"/>
<field name="stage_id" ref="stage5"/>
<field name="project_id" ref="project.project_project_22"/>
<field eval="&quot;Improve Reports in PMS&quot;" name="name"/>
</record>
+27 -42
View File
@@ -44,17 +44,6 @@
<menuitem action="project_issue_categ_action" name="Categories" id="menu_project_issue_category_act" parent="menu_project_confi" />
<record id="project_issue_stage_act" model="ir.actions.act_window">
<field name="name">Issue Stages</field>
<field name="res_model">crm.case.stage</field>
<field name="view_type">form</field>
<field name="view_id" ref="crm.crm_case_stage_tree"/>
<field name="domain">[('object_id.model', '=', 'project.issue')]</field>
<field name="context">{'object_id':'project.issue'}</field>
</record>
<menuitem action="project_issue_stage_act" name="Stages" id="menu_project_issue_stage_act" parent="menu_project_confi"/>
<record model="ir.ui.view" id="project_issue_form_view">
<field name="name">Project Issue Tracker Form</field>
<field name="model">project.issue</field>
@@ -68,9 +57,9 @@
<field name="user_id"/>
<field name="assigned_to" />
<group colspan="2" col="4">
<field name="stage_id" on_change="onchange_stage_id(stage_id)" domain="[('object_id.model', '=', 'project.issue')]" widget="selection" readonly="1"/>
<button icon="gtk-go-back" string="" name="stage_previous" type="object"/>
<button icon="gtk-go-forward" string="" name="stage_next" type="object"/>
<field name="type_id" widget="selection" readonly="1"/>
<button name="prev_type" string="Previous" type="object" icon="gtk-go-back" help="Change to Previous Stage"/>
<button name="next_type" string="Next" type="object" icon="gtk-go-forward" help="Change to Next Stage"/>
</group>
</group>
<notebook colspan="4">
@@ -191,14 +180,12 @@
<field name="id"/>
<field name="create_date"/>
<field name="name"/>
<field name="partner_id"/>
<field name="partner_id" groups="base.group_extended"/>
<field name="project_id" />
<field name="priority" string="Priority"/>
<field name="stage_id" string="Resolution"/>
<button icon="gtk-go-back" string="" name="stage_previous" type="object"
states="open,draft,pending,done,cancel" />
<button icon="gtk-go-forward" string="" name="stage_next" type="object"
states="open,draft,pending,done,cancel" />
<field name="type_id" widget="selection" readonly="1"/>
<button name="prev_type" string="Previous" type="object" icon="gtk-go-back" help="Change to Previous Stage"/>
<button name="next_type" string="Next" type="object" icon="gtk-go-forward" help="Change to Next Stage"/>
<field name="version_id" widget="selection"/>
<field name="user_id"/>
<field name="assigned_to"/>
@@ -227,16 +214,20 @@
<filter string="Pending" domain="[('state','=','pending')]" help="Pending Issues" icon="terp-gtk-media-pause"/>
<separator orientation="vertical"/>
<filter icon="terp-go-today" string="Today" separator="1" domain="[('create_date','=',time.strftime('%%Y-%%m-%%d'))]" help="Today's bugs" />
<filter icon="terp-go-week" string="7 Days" separator="1"
domain="[('create_date','&lt;', time.strftime('%%Y-%%m-%%d')), ('create_date', '&gt;=', (datetime.date.today()-datetime.timedelta(days=7)).strftime('%%Y-%%m-%%d'))]"
help="Bugs during last 7 days"
/>
<separator orientation="vertical"/>
<field name="name" string="Name"/>
<field name="partner_id" string="Partner" />
<field name="user_id"/>
<field name="project_id" string="Project"/>
<field name="categ_id"/>
<field name="name"/>
<field name="partner_id" groups="base.group_extended"/>
<field name="user_id">
<filter domain="[('user_id','=',False)]" help="Unassigned Issues" icon="terp-personal-" separator="1"/>
</field>
<field name="project_id"/>
</group>
<newline/>
<group expand="0" string="Extended Filters..." groups="base.group_extended">
<field name="categ_id" widget="selection" domain="[('object_id.model', '=', 'project.issue')]"/>
<field name="version_id" widget="selection"/>
<separator orientation="vertical"/>
<field name="id"/>
</group>
<newline/>
<group expand="0" string="Group By..." groups="base.group_extended">
@@ -255,7 +246,7 @@
<filter string="Priority" icon="terp-rating-rated" domain="[]"
context="{'group_by':'priority'}" />
<filter string="Stage" icon="terp-stage" domain="[]"
context="{'group_by':'stage_id'}" />
context="{'group_by':'type_id'}" />
<filter string="State" icon="terp-stock_effects-object-colorize" domain="[]"
context="{'group_by':'state'}" />
<separator orientation="vertical" />
@@ -291,13 +282,11 @@
<tree string="Feature Tracker Tree" colors="red:state=='open';black:state in ('draft', 'cancel','done','pending')">
<field name="id"/>
<field name="name" string="Feature description"/>
<field name="partner_id"/>
<field name="partner_id" groups="base.group_extended"/>
<field name="priority" string="Priority"/>
<field name="stage_id" string="Resolution"/>
<button icon="gtk-go-back" string="" name="stage_previous" type="object"
states="open,draft,pending,done,cancel" />
<button icon="gtk-go-forward" string="" name="stage_next" type="object"
states="open,draft,pending,done,cancel" />
<field name="type_id" widget="selection" readonly="1"/>
<button name="prev_type" string="Previous" type="object" icon="gtk-go-back" help="Change to Previous Stage"/>
<button name="next_type" string="Next" type="object" icon="gtk-go-forward" help="Change to Next Stage"/>
<field name="version_id"/>
<field name="user_id"/>
<field name="state"/>
@@ -317,12 +306,8 @@
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Feature Tracker Search">
<group>
<filter icon="terp-go-today" string=" Today " separator="1"
domain="[('date','=',time.strftime('%%Y-%%m-%%d'))]" help="Today's features"/>
<filter icon="terp-go-week" string=" 7 Days " separator="1"
domain="[('date','&lt;', time.strftime('%%Y-%%m-%%d')), ('date','&gt;=',(datetime.date.today()-datetime.timedelta(days=7)).strftime('%%Y-%%m-%%d'))]" help="Features during last 7 days"/>
</group>
<filter icon="terp-go-today" string="Today" separator="1"
domain="[('date','=',time.strftime('%%Y-%%m-%%d'))]" help="Today's features"/>
<separator orientation="vertical"/>
<group>
<field name="name" select='1' string="Feature description"/>

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