bzr revid: uco@tinyerp.com-20100625052028-lwmnh3lirji3h8nz
This commit is contained in:
uco
2010-06-25 10:50:28 +05:30
162 changed files with 3278 additions and 2504 deletions
+3 -3
View File
@@ -18,8 +18,6 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
{
"name" : "Accounting and Financial Management",
"version" : "1.1",
@@ -119,6 +117,8 @@ module named account_vouchers
'report/account_account_report_view.xml',
'report/account_analytic_entries_report_view.xml',
'board_account_view.xml',
"wizard/account_pl_report_view.xml",
"wizard/account_bs_report_view.xml"
],
'demo_xml': [
#'demo/price_accuracy00.yml',
@@ -145,4 +145,4 @@ module named account_vouchers
'active': False,
'certificate': '0080331923549',
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+17 -17
View File
@@ -2,30 +2,30 @@
<openerp>
<data>
<menuitem icon="terp-account" id="menu_finance" name="Accounting" sequence="13"/>
<menuitem icon="terp-account" id="menu_finance" name="Accounting" sequence="13"/>
<menuitem id="menu_finance_receivables" name="Receivables" parent="menu_finance" sequence="1"/>
<menuitem id="menu_finance_payables" name="Payables" parent="menu_finance" sequence="2"/>
<menuitem id="menu_finance_bank_and_cash" name="Bank and Cash" parent="menu_finance" sequence="3"/>
<!-- <menuitem id="menu_accounting" name="Accounting" parent="menu_finance" sequence="5"/>-->
<menuitem id="menu_finance_periodical_processing" name="Periodical Processing" parent="menu_finance" sequence="8" groups="group_account_user"/>
<menuitem id="periodical_processing_journal_entries_validation" name="Journal Entries Validation" parent="menu_finance_periodical_processing"/>
<menuitem id="periodical_processing_reconciliation" name="Reconciliation" parent="menu_finance_periodical_processing"/>
<!-- <menuitem id="periodical_processing_recurrent_entries" name="Recurrent Entries" parent="menu_finance_periodical_processing"/>-->
<menuitem id="periodical_processing_invoicing" name="Invoicing" parent="menu_finance_periodical_processing"/>
<!-- <menuitem id="periodical_processing_end_of_period" name="End of Period" parent="menu_finance_periodical_processing"/>-->
<menuitem id="periodical_processing_journal_entries_validation" name="Journal Entries Validation" parent="menu_finance_periodical_processing"/>
<menuitem id="periodical_processing_reconciliation" name="Reconciliation" parent="menu_finance_periodical_processing"/>
<!-- <menuitem id="periodical_processing_recurrent_entries" name="Recurrent Entries" parent="menu_finance_periodical_processing"/>-->
<menuitem id="periodical_processing_invoicing" name="Invoicing" parent="menu_finance_periodical_processing"/>
<!-- <menuitem id="periodical_processing_end_of_period" name="End of Period" parent="menu_finance_periodical_processing"/>-->
<menuitem id="menu_finance_charts" name="Charts" parent="menu_finance" sequence="5"/>
<menuitem id="menu_finance_reporting" name="Reporting" parent="account.menu_finance" sequence="12"/>
<menuitem id="menu_finance_reporting_budgets" name="Budgets" parent="menu_finance_reporting"/>
<menuitem id="menu_generic_report" name="Management Reports" parent="menu_finance_reporting"/>
<menuitem id="menu_finance_legal_statement" name="Legal Reports" parent="menu_finance_reporting"/>
<menuitem id="menu_finance_management_belgian_reports" name="Belgian Reports" parent="menu_finance_reporting"/>
<menuitem id="menu_finance_reporting_budgets" name="Budgets" parent="menu_finance_reporting"/>
<menuitem id="menu_generic_report" name="Management Reports" parent="menu_finance_reporting"/>
<menuitem id="menu_finance_legal_statement" name="Legal Reports" parent="menu_finance_reporting"/>
<menuitem id="menu_finance_management_belgian_reports" name="Belgian Reports" parent="menu_finance_reporting"/>
<menuitem id="menu_finance_configuration" name="Configuration" parent="menu_finance" sequence="13"/>
<menuitem id="menu_finance_accounting" name="Financial Accounting" parent="menu_finance_configuration"/>
<menuitem id="menu_analytic_accounting" name="Analytic Accounting" parent="menu_finance_configuration"/>
<menuitem id="menu_analytic" parent="menu_analytic_accounting" name="Accounts"/>
<menuitem id="menu_low_level" name="Low Level" parent="menu_finance_accounting"/>
<menuitem id="menu_configuration_misc" name="Miscelleanous" parent="menu_finance_configuration"/>
<menuitem id="base.menu_action_currency_form" parent="menu_configuration_misc" sequence="20"/>
<menuitem id="menu_finance_accounting" name="Financial Accounting" parent="menu_finance_configuration"/>
<menuitem id="menu_analytic_accounting" name="Analytic Accounting" parent="menu_finance_configuration"/>
<menuitem id="menu_analytic" parent="menu_analytic_accounting" name="Accounts"/>
<menuitem id="menu_low_level" name="Low Level" parent="menu_finance_accounting"/>
<menuitem id="menu_configuration_misc" name="Miscelleanous" parent="menu_finance_configuration"/>
<menuitem id="base.menu_action_currency_form" parent="menu_configuration_misc" sequence="20"/>
<!-- <menuitem id="menu_finance_configuration1" name="Configuration" parent="menu_finance" sequence="80"/>-->
<!-- <menuitem id="base.menu_action_currency_form" parent="menu_finance_configuration" sequence="20"/>-->
<!-- <menuitem id="menu_finance_accounting1" name="Financial Accounting" parent="menu_finance_configuration" sequence="80"/>-->
@@ -38,7 +38,7 @@
<menuitem id="menu_finance_entries" name="Accounting" parent="menu_finance" sequence="4"
groups="group_account_user"/>
<menuitem id="account.menu_finance_recurrent_entries" name="Recurrent Entries" parent="menu_finance_periodical_processing" sequence="15"/>
<menuitem id="account.menu_finance_recurrent_entries" name="Recurring Entries" parent="menu_finance_periodical_processing" sequence="15"/>
<!-- <menuitem id="menu_finance_periodical_processing11" name="Periodical Processing" parent="account.menu_finance"-->
<!-- sequence="3"-->
+9 -1
View File
@@ -801,15 +801,19 @@ class account_move_line(osv.osv):
ids = journal_pool.search(cr, uid, [])
journals = journal_pool.browse(cr, uid, ids)
all_journal = [None]
common_fields = {}
total = len(journals)
for journal in journals:
all_journal.append(journal.id)
for field in journal.view_id.columns_id:
if not field.field in fields:
fields[field.field] = [None, journal.id]
fields[field.field] = [journal.id]
fld.append((field.field, field.sequence))
flds.append(field.field)
common_fields[field.field] = 1
else:
fields.get(field.field).append(journal.id)
common_fields[field.field] = common_fields[field.field] + 1
fld.append(('period_id', 3))
fld.append(('journal_id', 10))
@@ -831,6 +835,10 @@ class account_move_line(osv.osv):
for field_it in fld:
field = field_it[0]
if common_fields.get(field) == total:
fields.get(field).append(None)
if field=='state':
state = 'colors="red:state==\'draft\'"'
-15
View File
@@ -61,21 +61,6 @@
parent="menu_tax_report"
type="wizard"/> -->
<record id="action_tax_code_tree" model="ir.actions.act_window">
<field name="name">Chart of Taxes</field>
<field name="res_model">account.tax.code</field>
<field name="domain">[('parent_id','=',False)]</field>
<field name="view_type">tree</field>
<field name="view_id" ref="view_tax_code_tree"/>
</record>
<menuitem
action="action_tax_code_tree"
id="menu_action_tax_code_tree"
parent="menu_tax_report"
sequence="12"/>
<report id="account_account_balance_compare"
string="Account balance"
model="account.account"
+39 -18
View File
@@ -632,7 +632,7 @@
<field name="view_id" ref="view_tax_code_tree"/>
</record>
<menuitem id="next_id_27" name="Taxes" parent="account.menu_finance_accounting"/>
<menuitem action="action_tax_code_list" id="menu_action_tax_code_list" parent="menu_low_level" sequence="12"/>
<menuitem action="action_tax_code_list" id="menu_action_tax_code_list" parent="menu_low_level" sequence="12"/>
<!--
@@ -714,7 +714,19 @@
<field name="domain">[('parent_id','=',False)]</field>
</record>
<menuitem action="action_tax_form" id="menu_action_tax_form" parent="next_id_27"/>
<record id="action_tax_code_tree" model="ir.actions.act_window">
<field name="name">Chart of Taxes</field>
<field name="res_model">account.tax.code</field>
<field name="domain">[('parent_id','=',False)]</field>
<field name="view_type">tree</field>
<field name="view_id" ref="view_tax_code_tree"/>
</record>
<menuitem
action="action_tax_code_tree"
id="menu_action_tax_code_tree"
parent="menu_finance_charts"
sequence="12"/>
<!-- <wizard id="action_move_journal_line_form" menu="False" model="account.move.line" name="account.move.journal" string="Entries by Line"/-->
<!--
@@ -1041,7 +1053,15 @@
<field name="view_id" ref="view_move_tree"/>
<field name="search_view_id" ref="view_account_move_filter"/>
</record>
<act_window
domain="[('move_id','=',active_id)]"
id="act_account_move_to_account_move_line_open"
name="Journal Items"
context="{'move_id':active_id}"
res_model="account.move.line"
src_model="account.move"/>
<record id="action_move_to_review" model="ir.actions.act_window">
<field name="name">Journal Entries to Review</field>
<field name="type">ir.actions.act_window</field>
@@ -1218,17 +1238,17 @@
id="menu_action_account_bank_reconcile_check_tree"
parent="periodical_processing_reconciliation" groups="group_account_user" />
<act_window
context="{'search_default_next_partner':1}"
<act_window
context="{'search_default_next_partner':1}"
id="action_account_manual_reconcile" name="Entry Lines"
res_model="account.move.line"
/>
<menuitem
name="Manual Reconcilication" icon="STOCK_EXECUTE"
action="action_account_manual_reconcile"
id="menu_manual_reconcile"
parent="account.periodical_processing_reconciliation"/>
<menuitem
name="Manual Reconcilication" icon="STOCK_EXECUTE"
action="action_account_manual_reconcile"
id="menu_manual_reconcile"
parent="account.periodical_processing_reconciliation"/>
<act_window
@@ -1287,7 +1307,7 @@
<field name="model">account.model.line</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Entry Model Line">
<tree string="Entry Model Line" editable="bottom">
<field name="sequence"/>
<field name="ref"/>
<field name="name"/>
@@ -1295,6 +1315,8 @@
<field name="partner_id"/>
<field name="debit"/>
<field name="credit"/>
<field name="date"/>
<field name="date_maturity"/>
</tree>
</field>
</record>
@@ -1330,10 +1352,10 @@
<field name="name" select="1"/>
<field name="ref" select="1"/>
<field name="journal_id" select="1"/>
<field colspan="4" name="lines_id" widget="one2many_list"/>
<field colspan="4" nolabel="1" name="lines_id" height="250" widget="one2many_list"/>
<separator string="Legend" colspan="4"/>
<field name="legend" colspan="4" nolabel="1"/>
<group col="1" colspan="4">
<group col="1" colspan="4">
<button name="%(action_account_use_model_create_entry)d" string="Create entries" type="action" icon="gtk-execute"/>
</group>
</form>
@@ -1351,17 +1373,16 @@
</field>
</record>
<record id="action_model_form" model="ir.actions.act_window">
<field name="name">Define Models</field>
<field name="name">Define Recurring</field>
<field name="res_model">account.model</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
</record>
<menuitem action="action_model_form" id="menu_action_model_form" parent="account.menu_finance_recurrent_entries"/>
<menuitem action="action_model_form" id="menu_action_model_form" parent="account.menu_configuration_misc"/>
<!--
# Payment Terms
-->
# Payment Terms
-->
<record id="view_payment_term_line_tree" model="ir.ui.view">
<field name="name">account.payment.term.line.tree</field>
+15 -15
View File
@@ -1,12 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<!-- <wizard-->
<!-- string="Account balance-Compare Years"-->
<!-- model="account.account"-->
<!-- name="account.balance.account.balance.report"-->
<!-- keyword="client_print_multi"-->
<!-- id="wizard_account_balance_compare_report"/>-->
<!-- <wizard-->
<!-- string="Account balance-Compare Years"-->
<!-- model="account.account"-->
<!-- name="account.balance.account.balance.report"-->
<!-- keyword="client_print_multi"-->
<!-- id="wizard_account_balance_compare_report"/>-->
<!-- <wizard id="wizard_invoice_refund" model="account.invoice" name="account.invoice.refund" string="Credit Note" groups="base.group_user"/> -->
@@ -75,7 +75,7 @@
<!-- report-related wizards -->
<!-- <wizard id="wizard_partner_balance_report" menu="False" model="res.partner" name="account.partner.balance.report" string="Partner Balance"/>
<menuitem icon="STOCK_PRINT" action="wizard_partner_balance_report" id="menu_partner_balance" parent="account.next_id_22" type="wizard"/> -->
<menuitem id="next_id_22" name="Partner Accounts" parent="menu_finance_generic_reporting" sequence="1"/>
<menuitem id="next_id_22" name="Partner Accounts" parent="menu_finance_generic_reporting" sequence="1"/>
<!--<wizard id="wizard_third_party_ledger" menu="False" model="res.partner" name="account.third_party_ledger.report" string="Partner Ledger"/>
<menuitem icon="STOCK_PRINT" action="wizard_third_party_ledger" id="menu_third_party_ledger" parent="account.next_id_22" type="wizard"/> -->
@@ -94,30 +94,30 @@
<wizard id="wizard_validate_account_moves_line" menu="True" model="account.move.line" name="account.move_line.validate" string="Validate Ledger Postings"/>-->
<!-- Use Models -->
<!-- Use Models -->
<!-- <wizard string="Create Entries From Models" model="account.model" name="account_use_models" menu="False" id="wizard_account_use_model"/>-->
<!-- <menuitem action="wizard_account_use_model" type="wizard" parent="account.menu_finance_recurrent_entries" id="menu_account_use_model"/>-->
<!-- <wizard string="Create Entries From Models" model="account.move.line" name="account_use_models" menu="True" id="wizard_line_account_use_model"/>-->
<!-- account.invoice -->
<!-- account.invoice -->
<!-- <wizard string="Open State" model="account.invoice" name="account.wizard_paid_open" menu="False" id="wizard_paid_open" groups="base.group_user"/> -->
<!-- generic report wizard -->
<!-- <wizard id="wizard_account_balance_report" menu="False" model="account.account" name="account.account.balance.report" string="Account Balance"/>-->
<!-- generic report wizard -->
<!-- <wizard id="wizard_account_balance_report" menu="False" model="account.account" name="account.account.balance.report" string="Account Balance"/>-->
<!-- <menuitem icon="STOCK_PRINT" action="wizard_account_balance_report" id="menu_account_balance_report" parent="account.menu_generic_report" type="wizard"/>-->
<!-- <wizard id="wizard_general_ledger" menu="False" model="account.account" name="account.general.ledger.report" string="General Ledger"/>
<!-- <wizard id="wizard_general_ledger" menu="False" model="account.account" name="account.general.ledger.report" string="General Ledger"/>
<menuitem icon="STOCK_PRINT" action="wizard_general_ledger" id="menu_general_ledger" parent="account.menu_generic_report" type="wizard"/>-->
<!-- <wizard id="wizard_print_journal" menu="False" model="account.journal.period" name="account.print.journal.report" string="Print Journal" />
<menuitem icon="STOCK_PRINT" action="wizard_print_journal" id="menu_print_journal" parent="account.menu_generic_report" type="wizard" />
<menuitem icon="STOCK_PRINT" action="wizard_print_journal" id="menu_print_journal" parent="account.menu_generic_report" type="wizard" />
<wizard id="wizard_central_journal" menu="False" model="account.journal.period" name="account.central.journal.report" string="Print Central Journal" />
<menuitem icon="STOCK_PRINT" action="wizard_central_journal" id="menu_central_journal" parent="account.menu_generic_report" type="wizard" />
<menuitem icon="STOCK_PRINT" action="wizard_central_journal" id="menu_central_journal" parent="account.menu_generic_report" type="wizard" />
<wizard id="wizard_general_journal" menu="False" model="account.journal.period" name="account.general.journal.report" string="Print General Journal" />
<menuitem icon="STOCK_PRINT" action="wizard_general_journal" id="menu_general_journal" parent="account.menu_generic_report" type="wizard" />-->
<menuitem icon="STOCK_PRINT" action="wizard_general_journal" id="menu_general_journal" parent="account.menu_generic_report" type="wizard" />-->
<!-- <wizard id="wizard_invoice_currency_change" model="account.invoice" name="account.invoice.currency_change" string="Change Currency" groups="base.group_user"/>-->
</data>
+5 -6
View File
@@ -7,14 +7,13 @@ msgstr ""
"Project-Id-Version: OpenERP Server 5.0.0\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
"PO-Revision-Date: 2010-06-23 17:24+0000\n"
"Last-Translator: Jordi Esteve (www.zikzakmedia.com) "
"<jesteve@zikzakmedia.com>\n"
"PO-Revision-Date: 2010-06-24 10:03+0000\n"
"Last-Translator: Borja López Soilán (Pexego) <borjals@pexego.es>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-06-24 03:47+0000\n"
"X-Launchpad-Export-Date: 2010-06-25 03:47+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account
@@ -806,7 +805,7 @@ msgstr "Cuenta de la empresa"
#. module: account
#: wizard_view:account.subscription.generate,init:0
msgid "Generate entries before:"
msgstr "Generar asientos antes:"
msgstr "Generar asientos hasta:"
#. module: account
#: rml:account.analytic.account.cost_ledger:0
@@ -3680,7 +3679,7 @@ msgstr ""
#: wizard_field:account.invoice.pay,addendum,comment:0
#: wizard_field:account.invoice.pay,init,name:0
msgid "Entry Name"
msgstr "Núm. asiento"
msgstr "Descripción"
#. module: account
#: help:account.invoice,account_id:0
+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-08-28 16:01+0000\n"
"PO-Revision-Date: 2010-05-14 17:04+0000\n"
"PO-Revision-Date: 2010-06-24 09:57+0000\n"
"Last-Translator: Borja López Soilán (Pexego) <borjals@pexego.es>\n"
"Language-Team: Galician <gl@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-06-22 04:04+0000\n"
"X-Launchpad-Export-Date: 2010-06-25 03:47+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account
@@ -2047,7 +2047,7 @@ msgstr ""
#. module: account
#: field:account.journal,invoice_sequence_id:0
msgid "Invoice Sequence"
msgstr ""
msgstr "Secuencia de factura"
#. module: account
#: wizard_view:account.automatic.reconcile,init:0
@@ -3597,7 +3597,7 @@ msgstr ""
#: wizard_field:account.invoice.pay,addendum,comment:0
#: wizard_field:account.invoice.pay,init,name:0
msgid "Entry Name"
msgstr ""
msgstr "Descripción"
#. module: account
#: help:account.invoice,account_id:0
@@ -5064,7 +5064,7 @@ msgstr ""
#. module: account
#: model:ir.model,name:account.model_fiscalyear_seq
msgid "Maintains Invoice sequences with Fiscal Year"
msgstr ""
msgstr "Mantén secuencias de facturas con exercicio fiscal"
#. module: account
#: selection:account.account.balance.report,checktype,display_account:0
+1 -1
View File
@@ -13,7 +13,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-06-24 03:47+0000\n"
"X-Launchpad-Export-Date: 2010-06-25 03:47+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account
+3 -3
View File
@@ -70,8 +70,8 @@
<field name="priority">2</field>
<field name="inherit_id" ref="base.view_partner_form"/>
<field name="arch" type="xml">
<notebook>
<page string="Accounting" position="inside">
<page string="Notes" position="before">
<page string="Accounting">
<group col="2" colspan="2">
<separator string="Customer Accounting Properties" colspan="2"/>
<field name="property_account_receivable" groups="account.group_account_user" />
@@ -119,7 +119,7 @@
</tree>
</field>
</page>
</notebook>
</page>
</field>
</record>
+2
View File
@@ -40,5 +40,7 @@ import account_account_report
import account_entries_report
import account_analytic_entries_report
import voucher_print
import report_bs
import report_pl
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
@@ -24,7 +24,7 @@ import time
import mx.DateTime
import rml_parse
from report import report_sxw
from account_report_india.report import report_pl
from account.report import report_pl
class report_balancesheet_horizontal(rml_parse.rml_parse):
def __init__(self, cr, uid, name, context):
@@ -195,9 +195,9 @@ class report_balancesheet_horizontal(rml_parse.rml_parse):
return comp_obj.name
report_sxw.report_sxw('report.account.balancesheet.horizontal', 'account.account',
'addons/account_report_india/report/report_balance_sheet_horizontal.rml',parser=report_balancesheet_horizontal,
'addons/account/report/report_balance_sheet_horizontal.rml',parser=report_balancesheet_horizontal,
header=False)
report_sxw.report_sxw('report.account.balancesheet', 'account.account',
'addons/account_report_india/report/report_balance_sheet.rml',parser=report_balancesheet_horizontal,
'addons/account/report/report_balance_sheet.rml',parser=report_balancesheet_horizontal,
header=False)
@@ -170,8 +170,8 @@ class report_pl_account_horizontal(rml_parse.rml_parse):
return comp_obj.name
report_sxw.report_sxw('report.pl.account.horizontal', 'account.account',
'addons/account_report_india/report/report_pl_account_horizontal.rml',parser=report_pl_account_horizontal, header=False)
'addons/account/report/report_pl_account_horizontal.rml',parser=report_pl_account_horizontal, header=False)
report_sxw.report_sxw('report.pl.account', 'account.account',
'addons/account_report_india/report/report_pl_account.rml',parser=report_pl_account_horizontal, header=False)
'addons/account/report/report_pl_account.rml',parser=report_pl_account_horizontal, header=False)
+2
View File
@@ -58,6 +58,8 @@ import account_central_journal
import account_general_journal
import account_change_currency
import account_bs_report
import account_pl_report
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
@@ -0,0 +1,89 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="account_pl_report_view" model="ir.ui.view">
<field name="name">Select period</field>
<field name="model">account.pl.report</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Select period">
<field name="company_id"/>
<field name="display_account" required = "True"/>
<newline/>
<field name="fiscalyear"/>
<label colspan="2" string="(Keep empty for all open fiscal years)" align="0.0"/>
<field name="display_type"/>
<newline/>
<separator string="Filters" colspan="4"/>
<field name="state" required="True"/>
<newline/>
<group attrs="{'invisible':[('state','=','none')]}" colspan="4">
<group attrs="{'invisible':[('state','=','byperiod')]}" colspan="4">
<separator string="Date Filter" colspan="4"/>
<field name="date_from"/>
<field name="date_to"/>
</group>
<group attrs="{'invisible':[('state','=','bydate')]}" colspan="4">
<separator string="Filter on Periods" colspan="4"/>
<field name="periods" colspan="4" nolabel="1"/>
</group>
</group>
<newline/>
<group colspan="4" col="6">
<label string ="" colspan="2"/>
<button special="cancel" string="Cancel" icon="gtk-cancel"/>
<button name="check_state" string="Print" type="object" icon="gtk-print" default_focus="1"/>
</group>
</form>
</field>
</record>
<record id="action_account_pl_report" model="ir.actions.act_window">
<field name="name">Account Profit And Loss</field>
<field name="res_model">account.pl.report</field>
<field name="type">ir.actions.act_window</field>
<field name="view_type">form</field>
<field name="view_mode">form</field>
<field name="view_id" ref="account_pl_report_view"/>
<field name="target">new</field>
</record>
<record id="account_pl_report_account_view" model="ir.ui.view">
<field name="name">Account Chart</field>
<field name="model">account.pl.report</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Select Chart">
<field name="Account_list"/>
<separator colspan="4"/>
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
<button name="next_view" string="Next" type="object" icon="gtk-go-forward" default_focus="1"/>
</form>
</field>
</record>
<record id="action_pl_balance_account_report" model="ir.actions.act_window">
<field name="name">Select Account</field>
<field name="res_model">account.pl.report</field>
<field name="type">ir.actions.act_window</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_id" ref="account_pl_report_account_view"/>
<field name="context">{'record_id':active_id}</field>
<field name="target">new</field>
</record>
<menuitem
parent="account.menu_finance_legal_statement"
id="final_accounting_reports"
name="Accounting Reports"/>
<menuitem icon="STOCK_PRINT"
name="Profit And Loss"
action="action_pl_balance_account_report"
id="menu_account_pl_report"
parent="final_accounting_reports"/>
</data>
</openerp>
@@ -2,37 +2,37 @@
<openerp>
<data>
<record id="view_account_subscription_generate" model="ir.ui.view">
<record id="view_account_subscription_generate" model="ir.ui.view">
<field name="name">account.subscription.generate.form</field>
<field name="model">account.subscription.generate</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Subscription Compute">
<group colspan="4" >
<separator string="Generate entries before:" colspan="4"/>
<field name="date"/>
<group colspan="4" >
<separator string="Generate entries before:" colspan="4"/>
<field name="date"/>
</group>
<separator string="" colspan="4" />
<separator string="" colspan="4" />
<group colspan="4" col="6">
<label string ="" colspan="2"/>
<button icon="gtk-cancel" special="cancel" string="Cancel" />
<button icon="gtk-execute" string="Compute Entry Dates"
name="action_generate" type="object" />
<label string ="" colspan="2"/>
<button icon="gtk-cancel" special="cancel" string="Cancel" />
<button icon="gtk-execute" string="Compute Entry Dates"
name="action_generate" type="object" />
</group>
</form>
</field>
</record>
</record>
<record id="action_account_subscription_generate" model="ir.actions.act_window">
<field name="name">Create Subscription Entries</field>
<field name="name">Automatic Recurring</field>
<field name="res_model">account.subscription.generate</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_id" ref="view_account_subscription_generate"/>
<field name="target">new</field>
<field name="view_id" ref="view_account_subscription_generate"/>
<field name="target">new</field>
</record>
<menuitem action="action_account_subscription_generate" id="menu_generate_subscription" parent="menu_finance_periodical_processing" />
<menuitem action="action_account_subscription_generate" id="menu_generate_subscription" parent="account.menu_finance_recurrent_entries" />
</data>
</openerp>
@@ -2,88 +2,88 @@
<openerp>
<data>
<record id="view_account_use_model" model="ir.ui.view">
<record id="view_account_use_model" model="ir.ui.view">
<field name="name">account.use.model.form</field>
<field name="model">account.use.model</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Create Entries From Models">
<group height="240" width="510">
<separator string="This wizard will create entries from Models" colspan="4"/>
<field name="model"/>
<separator colspan="4"/>
<group colspan="4" col="2">
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
<button icon="gtk-execute" string="Create Entries" name="create_entries" type="object"/>
</group>
</group>
</form>
<form string="Create Entries From Models">
<group height="240" width="510">
<separator string="This wizard will create recurring accounting entries" colspan="4"/>
<field name="model"/>
<separator colspan="4"/>
<group colspan="4" col="2">
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
<button icon="gtk-execute" string="Create Entries" name="create_entries" type="object"/>
</group>
</group>
</form>
</field>
</record>
<record id="action_view_account_use_model" model="ir.actions.act_window">
<field name="name">Create Entries From Models</field>
<record id="action_view_account_use_model" model="ir.actions.act_window">
<field name="name">Manual Recurring</field>
<field name="res_model">account.use.model</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_id" ref="view_account_use_model"/>
<field name="target">new</field>
<field name="context">{'model_line':'model_line'}</field>
<field name="view_id" ref="view_account_use_model"/>
<field name="target">new</field>
<field name="context">{'model_line':'model_line'}</field>
</record>
<record model="ir.values" id="action_account_use_model_values">
<field name="model_id" ref="account.model_account_move_line" />
<field name="object" eval="1" />
<field name="name">Create Entries From Models</field>
<field name="name">Manual Recurring</field>
<field name="key2">client_action_multi</field>
<field name="value" eval="'ir.actions.act_window,' +str(ref('action_view_account_use_model'))" />
<field name="key">action</field>
<field name="model">account.move.line</field>
</record>
</record>
<menuitem action="action_view_account_use_model" name="Create Entries From Models"
parent="account.menu_finance_recurrent_entries" id="menu_account_use_model"/>
<menuitem action="action_view_account_use_model"
parent="account.menu_finance_recurrent_entries" id="menu_account_use_model"/>
<record id="view_account_use_model_open_entry" model="ir.ui.view">
<record id="view_account_use_model_open_entry" model="ir.ui.view">
<field name="name">account.use.model.open.entry.form</field>
<field name="model">account.use.model</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Use Model">
<group colspan="4" col="6">
<label string = "Entry Lines Created." colspan="2"/>
<newline/>
<button icon="gtk-ok" special="cancel" string="Ok"/>
<button icon="terp-gtk-go-back-rtl" string="Open" name="open_moves" type="object" default_focus='1'/>
<group colspan="4" col="6">
<label string = "Entry Lines Created." colspan="2"/>
<newline/>
<button icon="gtk-ok" special="cancel" string="Ok"/>
<button icon="terp-gtk-go-back-rtl" string="Open" name="open_moves" type="object" default_focus='1'/>
</group>
</form>
</field>
</record>
<record id="view_account_use_model_create_entry" model="ir.ui.view">
<record id="view_account_use_model_create_entry" model="ir.ui.view">
<field name="name">account.use.model.create.entry.form</field>
<field name="model">account.use.model</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Use Model">
<group colspan="4" col="6">
<label string = "Are you sure you want to create entries?" colspan="2"/>
<newline/>
<button icon="terp-gtk-stop" special="cancel" string="Cancel"/>
<button icon="gtk-execute" string="Ok" name="create_entries" type="object" default_focus='1'/>
<group colspan="4" col="6">
<label string = "Are you sure you want to create entries?" colspan="2"/>
<newline/>
<button icon="terp-gtk-stop" special="cancel" string="Cancel"/>
<button icon="gtk-execute" string="Ok" name="create_entries" type="object" default_focus='1'/>
</group>
</form>
</field>
</record>
<record id="action_account_use_model_create_entry" model="ir.actions.act_window">
<field name="name">Create Entries From Models</field>
<record id="action_account_use_model_create_entry" model="ir.actions.act_window">
<field name="name">Manual Recurring</field>
<field name="res_model">account.use.model</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_id" ref="view_account_use_model_create_entry"/>
<field name="target">new</field>
<field name="view_id" ref="view_account_use_model_create_entry"/>
<field name="target">new</field>
</record>
</data>
</data>
</openerp>
@@ -2,23 +2,22 @@
<openerp>
<data>
<!--Account Moves-->
<!--Account Moves-->
<record id="validate_account_move_view" model="ir.ui.view">
<field name="name">Validate Account Move</field>
<field name="model">validate.account.move</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Validate Account Entries">
<separator string="Select Period and Journal for Validation" colspan="4"/>
<field name="journal_id"/>
<newline/>
<field name="period_id"/>
<separator string="Information" colspan="4"/>
<label string="All draft account entries in this journal and period will be validated. It means you won't be able to modify their accouting fields." colspan="4"/>
<group colspan="4" col="6">
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
<button icon="terp-camera_test" string="Validate" name="validate_move" type="object"/>
</group>
<form string="Validate Account Entries">
<separator string="Validate Journal Entries of a Journal" colspan="4"/>
<label string="All draft account entries in this journal and period will be validated. It means you won't be able to modify their accouting fields." colspan="4"/>
<field name="journal_id"/>
<newline/>
<field name="period_id"/>
<group colspan="4" col="6">
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
<button icon="terp-camera_test" string="Validate" name="validate_move" type="object"/>
</group>
</form>
</field>
</record>
@@ -33,38 +32,38 @@
</record>
<menuitem
name="Validate Ledger Postings"
parent="periodical_processing_journal_entries_validation"
action="action_validate_account_move"
id="menu_validate_account_moves"
/>
name="Validate Ledger Postings"
parent="periodical_processing_journal_entries_validation"
action="action_validate_account_move"
id="menu_validate_account_moves"
/>
<!--Account Move lines-->
<record id="validate_account_move_line_view" model="ir.ui.view">
<record id="validate_account_move_line_view" model="ir.ui.view">
<field name="name">Validate Ledger Postings</field>
<field name="model">validate.account.move.lines</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Validate Moves">
<separator string="Validate Ledger Postings" colspan="4"/>
<button special="cancel" string="Cancel" icon="gtk-cancel"/>
<button name="validate_move_lines" string="Validate" type="object" icon="gtk-go-forward" default_focus="1"/>
</form>
<button special="cancel" string="Cancel" icon="gtk-cancel"/>
<button name="validate_move_lines" string="Validate" type="object" icon="gtk-go-forward" default_focus="1"/>
</form>
</field>
</record>
</record>
<record id="action_validate_account_move_line" model="ir.actions.act_window">
<record id="action_validate_account_move_line" model="ir.actions.act_window">
<field name="name">Validate Ledger Postings</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">validate.account.move.lines</field>
<field name="view_type">form</field>
<field name="view_mode">form</field>
<field name="view_id" ref="validate_account_move_line_view"/>
<field name="context">{'record_id' : active_id}</field>
<field name="context">{'record_id' : active_id}</field>
<field name="target">new</field>
</record>
</record>
<record model="ir.values" id="validate_account_move_line_values">
<record model="ir.values" id="validate_account_move_line_values">
<field name="model_id" ref="account.model_account_move_line" />
<field name="object" eval="1" />
<field name="name">Validate Ledger Postings</field>
+1 -1
View File
@@ -26,7 +26,7 @@ from osv import fields,osv
#----------------------------------------------------------
class stock_picking(osv.osv):
_inherit = "stock.picking"
_description = "Packing List"
_description = "Picking List"
def action_invoice_create(self, cr, uid, ids, journal_id=False,
group=False, type='out_invoice', context=None):
+1 -1
View File
@@ -14,7 +14,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-06-24 03:47+0000\n"
"X-Launchpad-Export-Date: 2010-06-25 03:47+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_budget
+167
View File
@@ -0,0 +1,167 @@
# Spanish 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: 2009-11-24 13:11+0000\n"
"PO-Revision-Date: 2010-06-24 09:42+0000\n"
"Last-Translator: Borja López Soilán (Pexego) <borjals@pexego.es>\n"
"Language-Team: Spanish <es@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-06-25 03:47+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_coda
#: field:account.coda,journal_id:0
#: wizard_field:account.coda_import,init,journal_id:0
msgid "Bank Journal"
msgstr "Diario bancario"
#. module: account_coda
#: constraint:ir.model:0
msgid ""
"The Object name must start with x_ and not contain any special character !"
msgstr ""
"¡El objeto debe empezar con x_ y no puede contener ningún carácter especial!"
#. module: account_coda
#: wizard_field:account.coda_import,extraction,note:0
msgid "Log"
msgstr "Registro"
#. module: account_coda
#: wizard_button:account.coda_import,extraction,open:0
msgid "_Open Statement"
msgstr ""
#. module: account_coda
#: model:ir.module.module,shortdesc:account_coda.module_meta_information
msgid "Account CODA"
msgstr ""
#. module: account_coda
#: field:account.coda,name:0
msgid "Coda file"
msgstr ""
#. module: account_coda
#: wizard_view:account.coda_import,init:0
msgid "Clic on 'New' to select your file :"
msgstr ""
#. module: account_coda
#: model:ir.actions.wizard,name:account_coda.wizard_account_coda_import
msgid "Import Coda File"
msgstr ""
#. module: account_coda
#: constraint:ir.actions.act_window:0
msgid "Invalid model name in the action definition."
msgstr "Nombre de modelo inválido en la definición de acción."
#. module: account_coda
#: field:account.coda,note:0
msgid "Import log"
msgstr "Registro de importación"
#. module: account_coda
#: wizard_field:account.coda_import,init,def_receivable:0
msgid "Default receivable Account"
msgstr "Cuenta a recibir por defecto"
#. module: account_coda
#: model:ir.module.module,description:account_coda.module_meta_information
msgid ""
"Module provides functionality to import\n"
" bank statements from .csv file.\n"
" Import coda file wizard is used to import bank statements."
msgstr ""
#. module: account_coda
#: wizard_button:account.coda_import,extraction,end:0
msgid "_Close"
msgstr "_Cerrar"
#. module: account_coda
#: field:account.coda,statement_id:0
msgid "Generated Bank Statement"
msgstr "Extracto bancario generado"
#. module: account_coda
#: view:account.coda:0
#: model:ir.actions.act_window,name:account_coda.act_account_payment_account_bank_statement
#: model:ir.actions.act_window,name:account_coda.action_account_coda
msgid "Coda import"
msgstr ""
#. module: account_coda
#: field:account.coda,user_id:0
msgid "User"
msgstr "Usuario"
#. module: account_coda
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
msgstr "¡XML inválido para la estructura de la vista!"
#. module: account_coda
#: model:ir.model,name:account_coda.model_account_coda
msgid "coda for an Account"
msgstr ""
#. module: account_coda
#: wizard_field:account.coda_import,init,def_payable:0
msgid "Default Payable Account"
msgstr "Cuenta a pagar por defecto"
#. module: account_coda
#: model:ir.ui.menu,name:account_coda.menu_account_coda
msgid "Coda Statements"
msgstr ""
#. module: account_coda
#: model:ir.ui.menu,name:account_coda.menu_account_coda_wizard
msgid "Import Coda Statements"
msgstr ""
#. module: account_coda
#: wizard_button:account.coda_import,init,extraction:0
msgid "_Ok"
msgstr "_Aceptar"
#. module: account_coda
#: wizard_view:account.coda_import,extraction:0
#: wizard_view:account.coda_import,init:0
msgid "Import Coda Statement"
msgstr ""
#. module: account_coda
#: field:account.bank.statement,coda_id:0
msgid "Coda"
msgstr ""
#. module: account_coda
#: wizard_view:account.coda_import,extraction:0
msgid "Results :"
msgstr "Resultados :"
#. module: account_coda
#: wizard_field:account.coda_import,init,coda:0
msgid "Coda File"
msgstr ""
#. module: account_coda
#: field:account.coda,date:0
msgid "Import Date"
msgstr "Fecha de importación"
#. module: account_coda
#: wizard_view:account.coda_import,init:0
msgid "Select your bank journal :"
msgstr "Seleccione su diario bancario :"
@@ -272,7 +272,7 @@ class account_followup_print_all(osv.osv_memory):
data['followup_id'] = 'followup_id' in context and context['followup_id'] or False
date = 'date' in context and context['date'] or data['date']
for id in to_update.keys():
if to_update[id]['partner_id'] in data['partner_ids'][0][2]:
if to_update[id]['partner_id'] in data['partner_ids']:
cr.execute(
"UPDATE account_move_line "\
"SET followup_line_id=%s, followup_date=%s "\
+1 -1
View File
@@ -14,7 +14,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-06-24 03:47+0000\n"
"X-Launchpad-Export-Date: 2010-06-25 03:47+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: account_payment
-3
View File
@@ -1,3 +0,0 @@
import report
import wizard
@@ -1,3 +0,0 @@
import report_bs
import report_pl
@@ -1,165 +0,0 @@
# -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
from report import report_sxw
import xml.dom.minidom
import os, time
import osv
import re
import tools
import pooler
import re
import sys
class rml_parse(report_sxw.rml_parse):
def __init__(self, cr, uid, name, context):
super(rml_parse, self).__init__(cr, uid, name, context=None)
self.localcontext.update({
'comma_me': self.comma_me,
'format_date': self._get_and_change_date_format_for_swiss,
'strip_name' : self._strip_name,
'explode_name' : self._explode_name,
})
def comma_me(self,amount):
#print "#" + str(amount) + "#"
if not amount:
amount = 0.0
if type(amount) is float :
amount = str('%.2f'%amount)
else :
amount = str(amount)
if (amount == '0'):
return ' '
orig = amount
new = re.sub("^(-?\d+)(\d{3})", "\g<1>'\g<2>", amount)
if orig == new:
return new
else:
return self.comma_me(new)
def _ellipsis(self, string, maxlen=100, ellipsis = '...'):
ellipsis = ellipsis or ''
try:
return string[:maxlen - len(ellipsis) ] + (ellipsis, '')[len(string) < maxlen]
except Exception, e:
return False
def _strip_name(self, name, maxlen=50):
return self._ellipsis(name, maxlen, '...')
def _get_and_change_date_format_for_swiss (self,date_to_format):
date_formatted=''
if date_to_format:
date_formatted = strptime (date_to_format,'%Y-%m-%d').strftime('%d.%m.%Y')
return date_formatted
def _explode_name(self,chaine,length):
# We will test if the size is less then account
full_string = ''
if (len(str(chaine)) <= length):
return chaine
#
else:
chaine = unicode(chaine,'utf8').encode('iso-8859-1')
rup = 0
for carac in chaine:
rup = rup + 1
if rup == length:
full_string = full_string + '\n'
full_string = full_string + carac
rup = 0
else:
full_string = full_string + carac
return full_string
def makeAscii(self,str):
try:
Stringer = str.encode("utf-8")
except UnicodeDecodeError:
try:
Stringer = str.encode("utf-16")
except UnicodeDecodeError:
print "UTF_16 Error"
Stringer = str
else:
return Stringer
else:
return Stringer
return Stringer
def explode_this(self,chaine,length):
#chaine = self.repair_string(chaine)
chaine = rstrip(chaine)
ast = list(chaine)
i = length
while i <= len(ast):
ast.insert(i,'\n')
i = i + length
chaine = str("".join(ast))
return chaine
def repair_string(self,chaine):
ast = list(chaine)
UnicodeAst = []
_previouslyfound = False
i = 0
#print str(ast)
while i < len(ast):
elem = ast[i]
try:
Stringer = elem.encode("utf-8")
except UnicodeDecodeError:
to_reencode = elem + ast[i+1]
print str(to_reencode)
Good_char = to_reencode.decode('utf-8')
UnicodeAst.append(Good_char)
i += i +2
else:
UnicodeAst.append(elem)
i += i + 1
return "".join(UnicodeAst)
def ReencodeAscii(self,str):
print sys.stdin.encoding
try:
Stringer = str.decode("ascii")
except UnicodeEncodeError:
print "REENCODING ERROR"
return str.encode("ascii")
except UnicodeDecodeError:
print "DECODING ERROR"
return str.encode("ascii")
else:
print Stringer
return Stringer
def _add_header(self, node, header=1):
if header==2:
rml_head = self.rml_header2
else:
rml_head = self.rml_header
rml_head = rml_head.replace('<pageGraphics>','''<pageGraphics> <image x="10" y="26cm" height="770.0" width="1120.0" >[[company.logo]] </image> ''')
return True
@@ -1,89 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="account_pl_report_view" model="ir.ui.view">
<field name="name">Select period</field>
<field name="model">account.pl.report</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Select period">
<field name="company_id"/>
<field name="display_account" required = "True"/>
<newline/>
<field name="fiscalyear"/>
<label colspan="2" string="(Keep empty for all open fiscal years)" align="0.0"/>
<field name="display_type"/>
<newline/>
<separator string="Filters" colspan="4"/>
<field name="state" required="True"/>
<newline/>
<group attrs="{'invisible':[('state','=','none')]}" colspan="4">
<group attrs="{'invisible':[('state','=','byperiod')]}" colspan="4">
<separator string="Date Filter" colspan="4"/>
<field name="date_from"/>
<field name="date_to"/>
</group>
<group attrs="{'invisible':[('state','=','bydate')]}" colspan="4">
<separator string="Filter on Periods" colspan="4"/>
<field name="periods" colspan="4" nolabel="1"/>
</group>
</group>
<newline/>
<group colspan="4" col="6">
<label string ="" colspan="2"/>
<button special="cancel" string="Cancel" icon="gtk-cancel"/>
<button name="check_state" string="Print" type="object" icon="gtk-print" default_focus="1"/>
</group>
</form>
</field>
</record>
<record id="action_account_pl_report" model="ir.actions.act_window">
<field name="name">Account Profit And Loss</field>
<field name="res_model">account.pl.report</field>
<field name="type">ir.actions.act_window</field>
<field name="view_type">form</field>
<field name="view_mode">form</field>
<field name="view_id" ref="account_pl_report_view"/>
<field name="target">new</field>
</record>
<record id="account_pl_report_account_view" model="ir.ui.view">
<field name="name">Account Chart</field>
<field name="model">account.pl.report</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Select Chart">
<field name="Account_list"/>
<separator colspan="4"/>
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
<button name="next_view" string="Next" type="object" icon="gtk-go-forward" default_focus="1"/>
</form>
</field>
</record>
<record id="action_pl_balance_account_report" model="ir.actions.act_window">
<field name="name">Select Account</field>
<field name="res_model">account.pl.report</field>
<field name="type">ir.actions.act_window</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_id" ref="account_pl_report_account_view"/>
<field name="context">{'record_id':active_id}</field>
<field name="target">new</field>
</record>
<menuitem
parent="account.menu_finance_legal_statement"
id="final_accounting_reports"
name="Accounting Reports"/>
<menuitem icon="STOCK_PRINT"
name="Profit And Loss"
action="action_pl_balance_account_report"
id="menu_account_pl_report"
parent="final_accounting_reports"/>
</data>
</openerp>
+98 -89
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-06-24 02:48+0000\n"
"PO-Revision-Date: 2010-06-24 22:06+0000\n"
"Last-Translator: Panayiotis Konstantinidis <Unknown>\n"
"Language-Team: Greek <el@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-06-24 03:47+0000\n"
"X-Launchpad-Export-Date: 2010-06-25 03:47+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: auction
@@ -182,7 +182,7 @@ msgstr "ΦΠΑ"
#. module: auction
#: view:auction.lots:0
msgid "Statements"
msgstr ""
msgstr "Καταστάσεις"
#. module: auction
#: xsl:flagey.huissier:0
@@ -244,33 +244,34 @@ msgstr "Σύγχρονη Τέχνη"
#: view:auction.lots:0
#: view:report.unclassified.objects:0
msgid "Ref"
msgstr ""
msgstr "Αναφορά"
#. module: auction
#: field:report.auction.view,nseller:0
msgid "No of sellers"
msgstr ""
msgstr "Αριθμός πωλητών"
#. module: auction
#: selection:auction.lots.send.aie,date_ask,lang:0
msgid "ned"
msgstr ""
msgstr "Κανονική ισοδύναμη απόκλιση"
#. module: auction
#: constraint:hr.attendance:0
msgid "Error: Sign in (resp. Sign out) must follow Sign out (resp. Sign in)"
msgstr ""
"Σφάλμα: Η Είσοδος (ή Έξοδος) πρέπει να ακολουθείται από Έξοδο (Είσοδο)"
#. module: auction
#: view:auction.lots:0
#: field:report.buyer.auction,total_price:0
msgid "Total Adj."
msgstr ""
msgstr "Συνολική προσαρμογή"
#. module: auction
#: field:report.auction.view2,obj_margin_procent:0
msgid "Net margin (%)"
msgstr ""
msgstr "Καθαρό περιθώριο (%)"
#. module: auction
#: selection:auction.lots,state:0
@@ -278,28 +279,28 @@ msgstr ""
#: selection:report.seller.auction,state:0
#: selection:report.unclassified.objects,state:0
msgid "Unsold"
msgstr ""
msgstr "Αδιάθετο"
#. module: auction
#: view:auction.dates:0
msgid "Dates"
msgstr ""
msgstr "Ημερομηνίες"
#. module: auction
#: constraint:product.template:0
msgid "Error: UOS must be in a different category than the UOM"
msgstr ""
msgstr "Error: UOS must be in a different category than the UOM"
#. module: auction
#: rml:auction.total.rml:0
msgid "Items"
msgstr ""
msgstr "Αντικείμενα"
#. module: auction
#: model:account.tax,name:auction.auction_tax5
#: field:auction.dates,seller_costs:0
msgid "Seller Costs"
msgstr ""
msgstr "Έξοδα πωλητών"
#. module: auction
#: view:auction.bid:0
@@ -309,75 +310,75 @@ msgstr ""
#: model:ir.actions.report.xml,name:auction.bid_auction
#: model:ir.ui.menu,name:auction.menu_action_bid_open
msgid "Bids"
msgstr ""
msgstr "Προσφορές"
#. module: auction
#: model:ir.ui.menu,name:auction.auction_all_objects_menu
msgid "All objects"
msgstr ""
msgstr "Όλα τα αντικείμενα"
#. module: auction
#: model:ir.actions.act_window,name:auction.action_auction_buyer_reporting_all2
msgid "Buyer's auction for all months"
msgstr ""
msgstr "Πληστηριασμοί αγοραστή για όλους τους μήνες"
#. module: auction
#: field:auction.bid,contact_tel:0
msgid "Contact"
msgstr ""
msgstr "Επικοινωνία"
#. module: auction
#: field:report.auction.view,obj_ret:0
#: field:report.object.encoded,obj_ret:0
#: field:report.object.encoded.manager,obj_ret:0
msgid "# obj ret"
msgstr ""
msgstr "Αριθμός αντικειμένων που επεστράφησαν"
#. module: auction
#: wizard_button:auction.lots.sms_send,init,send:0
msgid "Send SMS"
msgstr ""
msgstr "Αποστολή SMS"
#. module: auction
#: selection:auction.lot.category,aie_categ:0
msgid "Cont. Art/Painting"
msgstr ""
msgstr "Cont. Τέχνη/Ζωγραφική"
#. module: auction
#: field:auction.lots,sel_inv_id:0
msgid "Seller Invoice"
msgstr ""
msgstr "Τιμολόγιο πωλητή"
#. module: auction
#: view:auction.dates:0
msgid "Commissions"
msgstr ""
msgstr "Προμήθειες"
#. module: auction
#: wizard_button:auction.lots.numerotate,search,init:0
msgid "Back"
msgstr ""
msgstr "Πίσω"
#. module: auction
#: model:ir.actions.act_window,name:auction.action_all_objects_unsold
msgid "Unsold objects"
msgstr ""
msgstr "Αδιάθετα αντικείμενα"
#. module: auction
#: model:ir.ui.menu,name:auction.menu_all_objects_sold1
msgid "Sold Objects"
msgstr ""
msgstr "Πουλημένα αντικείμενα"
#. module: auction
#: view:report.buyer.auction2:0
#: view:report.seller.auction2:0
msgid "Sum net margin"
msgstr ""
msgstr "Σύνολο καθαρού περιθωρίου"
#. module: auction
#: view:auction.deposit:0
msgid "Deposit Border Form"
msgstr ""
msgstr "Κατάθεση φόρμας συνόρων"
#. module: auction
#: field:auction.bid,bid_lines:0
@@ -385,12 +386,12 @@ msgstr ""
#: rml:bids.lots:0
#: model:ir.model,name:auction.model_auction_bid_line
msgid "Bid"
msgstr ""
msgstr "Προσφορά"
#. module: auction
#: wizard_field:auction.lots.send.aie,date_ask,lang:0
msgid "Langage"
msgstr ""
msgstr "Γλώσσα"
#. module: auction
#: field:auction.bid_line,lot_id:0
@@ -398,17 +399,17 @@ msgstr ""
#: view:auction.lots:0
#: model:ir.model,name:auction.model_auction_lots
msgid "Object"
msgstr ""
msgstr "Αντικείμενο"
#. module: auction
#: model:ir.actions.wizard,name:auction.wizard_map_user
msgid "Map buyer username to Partners"
msgstr ""
msgstr "Καταγραφή του ονόματος χρήστη στους 'Συνεργάτες'"
#. module: auction
#: wizard_field:auction.lots.numerotate,search,lot_num:0
msgid "Inventory Number"
msgstr ""
msgstr "Αριθμός απογραφής"
#. module: auction
#: wizard_button:auction.lots.buyer_map,check,end:0
@@ -416,17 +417,17 @@ msgstr ""
#: wizard_button:auction.lots.numerotate,search,end:0
#: wizard_button:auction.lots.numerotate_cont,init,end:0
msgid "Exit"
msgstr ""
msgstr "Έξοδος"
#. module: auction
#: field:report.buyer.auction2,net_revenue:0
msgid "Net Revenue"
msgstr ""
msgstr "Καθαρό έσοδο"
#. module: auction
#: view:report.buyer.auction:0
msgid "Auction buyer reporting form view"
msgstr ""
msgstr "Έντυπο έκθεσης άποψης των αγοραστών δημοπρασιών"
#. module: auction
#: field:auction.dates,state:0
@@ -436,17 +437,17 @@ msgstr ""
#: field:report.seller.auction,state:0
#: field:report.unclassified.objects,state:0
msgid "Status"
msgstr ""
msgstr "Κατάσταση"
#. module: auction
#: model:ir.actions.wizard,name:auction.wizard_sms
msgid "SMS Send"
msgstr ""
msgstr "Αποστολή γραπτού μηνύματος"
#. module: auction
#: selection:auction.lot.category,aie_categ:0
msgid "Antique/Cartoons"
msgstr ""
msgstr "Αντίκες/Γελοιογραφίες"
#. module: auction
#: view:auction.lots:0
@@ -454,42 +455,43 @@ msgstr ""
#: selection:report.seller.auction,state:0
#: selection:report.unclassified.objects,state:0
msgid "Sold"
msgstr ""
msgstr "Πουλημένο"
#. module: auction
#: constraint:hr.employee:0
msgid "Error ! You cannot create recursive Hierarchy of Employees."
msgstr ""
"Σφάλμα! Δε μπορείται να δημιουργήσετε αναδρομική ιεραρχία στους εργαζομένους"
#. module: auction
#: field:auction.bid_line,name:0
msgid "Bid date"
msgstr ""
msgstr "Ημερομηνία προσφορών"
#. module: auction
#: field:auction.dates,acc_expense:0
msgid "Expense Account"
msgstr ""
msgstr "Λογαριασμός Εξόδων"
#. module: auction
#: model:ir.ui.menu,name:auction.menu_wizard_emporte
msgid "Deliveries Management"
msgstr ""
msgstr "Διαχείριση Παραδόσεων"
#. module: auction
#: field:auction.lots,obj_desc:0
msgid "Object Description"
msgstr ""
msgstr "Περιγραφή αντικειμένου"
#. module: auction
#: selection:auction.deposit,method:0
msgid "Contact the Seller"
msgstr ""
msgstr "Επικοινωνήστε με τον πωλητή"
#. module: auction
#: view:auction.lots:0
msgid "Auction Objects"
msgstr ""
msgstr "Δημοπρατημένα αντικείμενα"
#. module: auction
#: field:auction.lots,gross_revenue:0
@@ -497,60 +499,60 @@ msgstr ""
#: field:report.object.encoded.manager,gross_revenue:0
#: field:report.seller.auction2,gross_revenue:0
msgid "Gross revenue"
msgstr ""
msgstr "Μικτό έσοδο"
#. module: auction
#: view:report.seller.auction2:0
msgid "Auction reporting2 form view"
msgstr ""
msgstr "Έντυπο αναφοράς άποψης Δημοπρασίας"
#. module: auction
#: model:ir.actions.wizard,name:auction.wizard_pay
msgid "Pay objects of the buyer"
msgstr ""
msgstr "Πληρωμή αντικειμένων του αγοραστή"
#. module: auction
#: view:report.deposit.border:0
msgid "Depositer's statistics"
msgstr ""
msgstr "Στατιστικά αποταμιευτή"
#. module: auction
#: view:auction.lots:0
msgid "Buyer information"
msgstr ""
msgstr "Πληροφορίες Αγοραστή"
#. module: auction
#: model:ir.model,name:auction.model_report_seller_auction
msgid "Auction Reporting on seller view"
msgstr ""
msgstr "Έντυπο αναφοράς άποψης των πωλητών για τη δημοπρασία"
#. module: auction
#: field:auction.lots,name2:0
msgid "Short Description (2)"
msgstr ""
msgstr "Σύντομη περιγραφή (2)"
#. module: auction
#: model:ir.model,name:auction.model_auction_dates
msgid "auction.dates"
msgstr ""
msgstr "Δημοπρασίες.Ημερομηνίες"
#. module: auction
#: rml:auction.total.rml:0
#: model:ir.ui.menu,name:auction.auction_buyers_menu
msgid "Buyers"
msgstr ""
msgstr "Αγοραστές"
#. module: auction
#: wizard_field:auction.pay.buy,init,amount:0
#: wizard_field:auction.pay.buy,init,amount2:0
#: wizard_field:auction.pay.buy,init,amount3:0
msgid "Amount paid"
msgstr ""
msgstr "Ποσό που πληρώθηκε"
#. module: auction
#: model:ir.ui.menu,name:auction.menu_report_latest_doposit_tree
msgid "My Latest Deposits"
msgstr ""
msgstr "Οι Τελευταίες Καταθέσεις μου"
#. module: auction
#: field:auction.lots,lot_est1:0
@@ -559,105 +561,105 @@ msgstr ""
#: field:report.auction.view,min_est:0
#: field:report.unclassified.objects,lot_est1:0
msgid "Minimum Estimation"
msgstr ""
msgstr "Ελάχιστος υπολογισμός"
#. module: auction
#: view:auction.dates:0
msgid "Accounting"
msgstr ""
msgstr "Λογιστική"
#. module: auction
#: model:ir.ui.menu,name:auction.menu_buyer_allmonth_view2
msgid "Buyer's Revenues"
msgstr ""
msgstr "Έσοδα του Αγοραστή"
#. module: auction
#: model:ir.model,name:auction.model_report_auction_adjudication
msgid "report_auction_adjudication"
msgstr ""
msgstr "Αναφορά_δημοπρασίες_Διαγωνισμοί"
#. module: auction
#: field:auction.bid_line,price:0
msgid "Maximum Price"
msgstr ""
msgstr "Μέγιστη τιμή"
#. module: auction
#: selection:auction.lots.send.aie,date_ask,lang:0
msgid "eng"
msgstr ""
msgstr "Αγγλική"
#. module: auction
#: view:report.buyer.auction2:0
msgid "Auction buyer reporting tree view2"
msgstr ""
msgstr "Προβολή δέντρου εκθέσεων αγοραστή δημοπρασιών"
#. module: auction
#: wizard_view:auction.lots.sms_send,init:0
msgid "Bulk SMS send"
msgstr ""
msgstr "Μαζική αποστολή γραπτών μηνυμάτων"
#. module: auction
#: wizard_view:auction.taken,init:0
msgid "Select lots which are Sold"
msgstr ""
msgstr "Επιλέξτε παρτίδες που έχουν πουληθεί"
#. module: auction
#: field:auction.lots,statement_id:0
msgid "Payment"
msgstr ""
msgstr "Πληρωμή"
#. module: auction
#: selection:auction.lots.send.aie,date_ask,lang:0
msgid "fr"
msgstr ""
msgstr "Γαλλική"
#. module: auction
#: selection:auction.lot.category,aie_categ:0
msgid "Antique/Old weapons and militaria"
msgstr ""
msgstr "Αντίκες/ παλαιά όπλα και στρατιωτικά είδη"
#. module: auction
#: selection:auction.lot.category,aie_categ:0
msgid "Antique/Oriental Arts/Chineese furnitures"
msgstr ""
msgstr "Αντίκεςς/Ανατολίτικη τέχνη/Κινέζικα έπιπλα"
#. module: auction
#: selection:auction.deposit,method:0
msgid "Keep until sold"
msgstr ""
msgstr "Διατήρηση μέχρι να πουληθεί"
#. module: auction
#: wizard_button:auction.lots.numerotate,init,choice:0
#: wizard_button:auction.lots.send.aie,init,date_ask:0
#: wizard_button:auction.lots.send.aie.results,init,date_ask:0
msgid "Continue"
msgstr ""
msgstr "Συνεχίστε"
#. module: auction
#: field:report.object.encoded,obj_num:0
#: field:report.object.encoded.manager,obj_num:0
msgid "# of Encoded obj."
msgstr ""
msgstr "Πλήθος κωδικοποιημένων αντικειμένων"
#. module: auction
#: xsl:report.auction.vnd_bordereau:0
msgid "List N."
msgstr ""
msgstr "Λίστα Ν."
#. module: auction
#: field:report.deposit.border,moy_est:0
msgid "Avg. Est"
msgstr ""
msgstr "Μέσος υπολογισμός"
#. module: auction
#: rml:auction.total.rml:0
msgid "# of sellers:"
msgstr ""
msgstr "Πλήθος πωλητών:"
#. module: auction
#: constraint:product.product:0
msgid "Error: Invalid ean code"
msgstr ""
msgstr "Σφάλμα: Άκυρος κωδικός EAN"
#. module: auction
#: model:ir.module.module,description:auction.module_meta_information
@@ -668,26 +670,33 @@ msgid ""
" Delivery Management. \n"
" "
msgstr ""
"Αυτή η μονάδα παρέχει λειτουργικότητα στη \n"
" Διαχείριση καλλιτεχνών, αντικειμένων, πωλητών, αγοραστών και "
"δημοπρασίας.\n"
" Διαχείριση προσφορών, ιχνηλάτιση πουλημένων, πληρωμένων και απλήρωτων "
"αντικειμένων.\n"
" Διαχείριση παραδόσεων. \n"
" "
#. module: auction
#: rml:auction.total.rml:0
msgid "# of items taken away:"
msgstr ""
msgstr "πλήθος αντικειμένων που παραδόθηκαν:"
#. module: auction
#: model:ir.ui.menu,name:auction.menu_auction_allmonth_view1
msgid "Auction's Summary"
msgstr ""
msgstr "Περίληψη Δημοπρασίας"
#. module: auction
#: rml:buyer.list:0
msgid "%)"
msgstr ""
msgstr "%)"
#. module: auction
#: wizard_view:auction.lots.able,init:0
msgid "Confirmation set taken away"
msgstr ""
msgstr "Επιβεβαίωση αυτών που έχουν σταλθεί"
#. module: auction
#: wizard_field:auction.lots.make_invoice,init,objects:0
@@ -696,7 +705,7 @@ msgstr ""
#: wizard_field:auction.lots.send.aie.results,date_ask,objects:0
#: field:report.deposit.border,nb_obj:0
msgid "# of objects"
msgstr ""
msgstr "ΠΛήθος αντικειμένων"
#. module: auction
#: field:auction.lots,lot_est2:0
@@ -705,42 +714,42 @@ msgstr ""
#: field:report.auction.view,max_est:0
#: field:report.unclassified.objects,lot_est2:0
msgid "Maximum Estimation"
msgstr ""
msgstr "Μέγιστος υπολογισμός"
#. module: auction
#: field:auction.lots,buyer_price:0
msgid "Buyer price"
msgstr ""
msgstr "Τιμή αγοραστή"
#. module: auction
#: model:ir.actions.wizard,name:auction.auction_wizard_payer_sel
msgid "Mark as paid for seller"
msgstr ""
msgstr "Σημειώστε το ως πληρωμένο για τον πωλητή"
#. module: auction
#: model:ir.actions.report.xml,name:auction.seller_form_id
msgid "Seller List"
msgstr ""
msgstr "Λίστα πωλητών"
#. module: auction
#: field:auction.lots,is_ok:0
msgid "Buyer's payment"
msgstr ""
msgstr "ΠΛηρωμή αγοραστή"
#. module: auction
#: view:auction.dates:0
msgid "Close + Create all invoices"
msgstr ""
msgstr "Κλείσιμο + Δημιουργεία όλων των τιμολογίων"
#. module: auction
#: model:ir.actions.wizard,name:auction.auction_catalog_flagy
msgid "Auction Catalog Flagey"
msgstr ""
msgstr "Κατάλογος δημοπρασιών Flagey"
#. module: auction
#: field:auction.lot.history,price:0
msgid "Withdrawn price"
msgstr ""
msgstr "Απόσυρση τιμής"
#. module: auction
#: model:account.tax,name:auction.auction_tax4
+335 -230
View File
@@ -25,6 +25,7 @@ from tools.translate import _
import ir
import pooler
import time
import tools
class audittrail_rule(osv.osv):
"""
@@ -33,25 +34,28 @@ class audittrail_rule(osv.osv):
_name = 'audittrail.rule'
_description = "Audittrail Rule"
_columns = {
"name": fields.char("Rule Name", size=32, required=True),
"object_id": fields.many2one('ir.model', 'Object', required=True),
"user_id": fields.many2many('res.users', 'audittail_rules_users',
'user_id', 'rule_id', 'Users'),
"log_read": fields.boolean("Log reads"),
"log_write": fields.boolean("Log writes"),
"log_unlink": fields.boolean("Log deletes"),
"log_create": fields.boolean("Log creates"),
"state": fields.selection((("draft", "Draft"),
("subscribed", "Subscribed")),
"State", required=True),
"action_id": fields.many2one('ir.actions.act_window', "Action ID"),
"name": fields.char("Rule Name", size=32, required=True),
"object_id": fields.many2one('ir.model', 'Object', required=True),
"user_id": fields.many2many('res.users', 'audittail_rules_users',
'user_id', 'rule_id', 'Users', help="if User is not added then it will applicable for all users"),
"log_read": fields.boolean("Log Reads"),
"log_write": fields.boolean("Log Writes"),
"log_unlink": fields.boolean("Log Deletes"),
"log_create": fields.boolean("Log Creates"),
"log_action": fields.boolean("Log Action"),
"log_workflow": fields.boolean("Log Workflow"),
"state": fields.selection((("draft", "Draft"),
("subscribed", "Subscribed")),
"State", required=True),
"action_id": fields.many2one('ir.actions.act_window', "Action ID"),
}
_defaults = {
'state': lambda *a: 'draft',
'log_create': lambda *a: 1,
'log_unlink': lambda *a: 1,
'log_write': lambda *a: 1,
'state': lambda *a: 'draft',
'log_create': lambda *a: 1,
'log_unlink': lambda *a: 1,
'log_write': lambda *a: 1,
}
_sql_constraints = [
@@ -65,7 +69,7 @@ class audittrail_rule(osv.osv):
@param cr: the current row, from the database cursor,
@param uid: the current user’s ID for security checks,
@param ids: List of Auddittrail Rule’s IDs.
@return: True
@return: True
"""
obj_action = self.pool.get('ir.actions.act_window')
obj_model = self.pool.get('ir.model.data')
@@ -74,20 +78,20 @@ class audittrail_rule(osv.osv):
obj = self.pool.get(thisrule.object_id.model)
if not obj:
raise osv.except_osv(
_('WARNING: audittrail is not part of the pool'),
_('WARNING: audittrail is not part of the pool'),
_('Change audittrail depends -- Setting rule as DRAFT'))
self.write(cr, uid, [thisrule.id], {"state": "draft"})
val = {
"name": 'View Log',
"res_model": 'audittrail.log',
"src_model": thisrule.object_id.model,
"name": 'View Log',
"res_model": 'audittrail.log',
"src_model": thisrule.object_id.model,
"domain": "[('object_id','=', " + str(thisrule.object_id.id) + "), ('res_id', '=', active_id)]"
}
id = obj_action.create(cr, uid, val)
self.write(cr, uid, [thisrule.id], {"state": "subscribed", "action_id": id})
action_id = obj_action.create(cr, uid, val)
self.write(cr, uid, [thisrule.id], {"state": "subscribed", "action_id": action_id})
keyword = 'client_action_relate'
value = 'ir.actions.act_window,' + str(id)
value = 'ir.actions.act_window,' + str(action_id)
res = obj_model.ir_set(cr, uid, 'action', keyword, 'View_log_' + thisrule.object_id.model, [thisrule.object_id.model], value, replace=True, isobject=True, xml_id=False)
#End Loop
return True
@@ -98,7 +102,7 @@ class audittrail_rule(osv.osv):
@param cr: the current row, from the database cursor,
@param uid: the current user’s ID for security checks,
@param ids: List of Auddittrail Rule’s IDs.
@return: True
@return: True
"""
obj_action = self.pool.get('ir.actions.act_window')
val_obj = self.pool.get('ir.values')
@@ -127,17 +131,28 @@ class audittrail_log(osv.osv):
_name = 'audittrail.log'
_description = "Audittrail Log"
def _name_get_resname(self, cr, uid, ids, *args):
data = {}
for resname in self.browse(cr, uid, ids,[]):
model_object = resname.object_id
res_id = resname.res_id
if model_object and res_id:
model_pool = self.pool.get(model_object.model)
res = model_pool.read(cr, uid, res_id, ['name'])
data[resname.id] = res['name']
else:
data[resname.id] = False
return data
_columns = {
"name": fields.char("Name", size=32),
"object_id": fields.many2one('ir.model', 'Object'),
"user_id": fields.many2one('res.users', 'User'),
"method": fields.selection((('read', 'Read'),
('write', 'Write'),
('unlink', 'Delete'),
('create', 'Create')), "Method"),
"timestamp": fields.datetime("Date"),
"res_id": fields.integer('Resource Id'),
"line_ids": fields.one2many('audittrail.log.line', 'log_id', 'Log lines'),
"name": fields.char("Resource Name",size=64),
# "name": fields.function(_name_get_resname, type='char', string='Resource Name', method=True),
"object_id": fields.many2one('ir.model', 'Object'),
"user_id": fields.many2one('res.users', 'User'),
"method": fields.char("Method", size=64),
"timestamp": fields.datetime("Date"),
"res_id": fields.integer('Resource Id'),
"line_ids": fields.one2many('audittrail.log.line', 'log_id', 'Log lines'),
}
_defaults = {
@@ -155,14 +170,14 @@ class audittrail_log_line(osv.osv):
_name = 'audittrail.log.line'
_description = "Log Line"
_columns = {
'field_id': fields.many2one('ir.model.fields', 'Fields', required=True),
'log_id': fields.many2one('audittrail.log', 'Log'),
'log': fields.integer("Log ID"),
'old_value': fields.text("Old Value"),
'new_value': fields.text("New Value"),
'old_value_text': fields.text('Old value Text'),
'new_value_text': fields.text('New value Text'),
'field_description': fields.char('Field Description', size=64),
'field_id': fields.many2one('ir.model.fields', 'Fields', required=True),
'log_id': fields.many2one('audittrail.log', 'Log'),
'log': fields.integer("Log ID"),
'old_value': fields.text("Old Value"),
'new_value': fields.text("New Value"),
'old_value_text': fields.text('Old value Text'),
'new_value_text': fields.text('New value Text'),
'field_description': fields.char('Field Description', size=64),
}
audittrail_log_line()
@@ -170,276 +185,366 @@ audittrail_log_line()
class audittrail_objects_proxy(osv_pool):
""" Uses Object proxy for auditing changes on object of subscribed Rules"""
def get_value_text(self, cr, uid, field_name, values, object, context=None):
def get_value_text(self, cr, uid, field_name, values, model, context=None):
"""
Gets textual values for the fields
e.g.: For field of type many2one it gives its name value instead of id
@param cr: the current row, from the database cursor,
@param uid: the current user’s ID for security checks,
@param field_name: List of fields for text values
@param values: Values for field to be converted into textual values
@return: values: List of textual values for given fields
@param field_name: List of fields for text values
@param values: Values for field to be converted into textual values
@return: values: List of textual values for given fields
"""
if not context:
context = {}
pool = pooler.get_pool(cr.dbname)
f_id = pool.get('ir.model.fields').search(cr, uid, [('name', '=', field_name), ('model_id', '=', object.id)])
if f_id:
field = pool.get('ir.model.fields').read(cr, uid, f_id)[0]
model = field['relation']
field_pool = pool.get('ir.model.fields')
model_pool = pool.get('ir.model')
obj_pool = pool.get(model.model)
if obj_pool._inherits:
inherits_ids = model_pool.search(cr, uid, [('model', '=', obj_pool._inherits.keys()[0])])
field_ids = field_pool.search(cr, uid, [('name', '=', field_name), ('model_id', 'in', (model.id, inherits_ids[0]))])
else:
field_ids = field_pool.search(cr, uid, [('name', '=', field_name), ('model_id', '=', model.id)])
field_id = field_ids and field_ids[0] or False
assert field_id, _("'%s' field is not exits in '%s' model" %(field_name, model.model))
if field['ttype'] == 'many2one':
if values:
if type(values) == tuple:
values = values[0]
val = pool.get(model).read(cr, uid, [values], [pool.get(model)._rec_name])
if val:
return val[0][pool.get(model)._rec_name]
elif field['ttype'] == 'many2many':
value = []
if values:
for id in values:
val = pool.get(model).read(cr, uid, [id], [pool.get(model)._rec_name])
if val:
value.append(val[0][pool.get(model)._rec_name])
return value
field = field_pool.read(cr, uid, field_id)
relation_model = field['relation']
relation_model_pool = relation_model and pool.get(relation_model) or False
elif field['ttype'] == 'one2many':
if values:
value = []
for id in values:
val = pool.get(model).read(cr, uid, [id], [pool.get(model)._rec_name])
if field['ttype'] == 'many2one':
res = False
relation_id = False
if values and type(values) == tuple:
relation_id = values[0]
if relation_id and relation_model_pool:
relation_model_object = relation_model_pool.read(cr, uid, relation_id, [relation_model_pool._rec_name])
res = relation_model_object[relation_model_pool._rec_name]
return res
if val:
value.append(val[0][pool.get(model)._rec_name])
return value
return values
elif field['ttype'] in ('many2many','one2many'):
res = []
for relation_model_object in relation_model_pool.read(cr, uid, values, [relation_model_pool._rec_name]):
res.append(relation_model_object[relation_model_pool._rec_name])
return res
def create_log_line(self, cr, uid, id, object, lines=[]):
return values
def create_log_line(self, cr, uid, log_id, model, lines=[]):
"""
Creates lines for changed fields with its old and new values
@param cr: the current row, from the database cursor,
@param uid: the current user’s ID for security checks,
@param object: Object who's values are being changed
@param model: Object who's values are being changed
@param lines: List of values for line is to be created
"""
pool = pooler.get_pool(cr.dbname)
obj = pool.get(object.model)
obj_pool = pool.get(model.model)
model_pool = pool.get('ir.model')
field_pool = pool.get('ir.model.fields')
log_line_pool = pool.get('audittrail.log.line')
#start Loop
for line in lines:
if obj._inherits:
inherits_ids = pool.get('ir.model').search(cr, uid, [('model', '=', obj._inherits.keys()[0])])
f_id = pool.get('ir.model.fields').search(cr, uid, [('name', '=', line['name']), ('model_id', 'in', (object.id, inherits_ids[0]))])
if obj_pool._inherits:
inherits_ids = model_pool.search(cr, uid, [('model', '=', obj_pool._inherits.keys()[0])])
field_ids = field_pool.search(cr, uid, [('name', '=', line['name']), ('model_id', 'in', (model.id, inherits_ids[0]))])
else:
f_id = pool.get('ir.model.fields').search(cr, uid, [('name', '=', line['name']), ('model_id', '=', object.id)])
if f_id:
fields = pool.get('ir.model.fields').read(cr, uid, f_id)
old_value = 'old_value' in line and line['old_value'] or ''
new_value = 'new_value' in line and line['new_value'] or ''
old_value_text = 'old_value_text' in line and line['old_value_text'] or ''
new_value_text = 'new_value_text' in line and line['new_value_text'] or ''
if old_value_text == new_value_text:
continue
if fields[0]['ttype'] == 'many2one':
if type(old_value) == tuple:
old_value = old_value[0]
if type(new_value) == tuple:
new_value = new_value[0]
vals = {
"log_id": id,
"field_id": f_id[0],
"old_value": old_value,
"new_value": new_value,
"old_value_text": old_value_text,
"new_value_text": new_value_text,
"field_description": fields[0]['field_description']
}
line_id = pool.get('audittrail.log.line').create(cr, uid, vals)
cr.commit()
#End Loop
field_ids = field_pool.search(cr, uid, [('name', '=', line['name']), ('model_id', '=', model.id)])
field_id = field_ids and field_ids[0] or False
assert field_id, _("'%s' field is not exits in '%s' model" %(line['name'], model.model))
field = field_pool.read(cr, uid, field_id)
old_value = 'old_value' in line and line['old_value'] or ''
new_value = 'new_value' in line and line['new_value'] or ''
old_value_text = 'old_value_text' in line and line['old_value_text'] or ''
new_value_text = 'new_value_text' in line and line['new_value_text'] or ''
if old_value_text == new_value_text:
continue
if field['ttype'] == 'many2one':
if type(old_value) == tuple:
old_value = old_value[0]
if type(new_value) == tuple:
new_value = new_value[0]
vals = {
"log_id": log_id,
"field_id": field_id,
"old_value": old_value,
"new_value": new_value,
"old_value_text": old_value_text,
"new_value_text": new_value_text,
"field_description": field['field_description']
}
line_id = log_line_pool.create(cr, uid, vals)
#End Loop
return True
def log_fct(self, db, uid, object, method, fct_src, *args):
def log_fct(self, db, uid, model, method, fct_src, *args):
"""
Logging function: This function is performs logging oprations according to method
@param db: the current database
@param uid: the current user’s ID for security checks,
@param object: Object who's values are being changed
@param method: method to log: create, read, write, unlink
@param method: method to log: create, read, write, unlink
@param fct_src: execute method of Object proxy
@return: Returns result as per method of Object proxy
@return: Returns result as per method of Object proxy
"""
logged_uids = []
res2 = args
pool = pooler.get_pool(db)
cr = pooler.get_db(db).cursor()
obj_ids = pool.get('ir.model').search(cr, uid, [('model', '=', object)])
model_object = pool.get('ir.model').browse(cr, uid, obj_ids)[0]
resource_pool = pool.get(model)
log_pool = pool.get('audittrail.log')
model_pool = pool.get('ir.model')
model_ids = model_pool.search(cr, uid, [('model', '=', model)])
model_id = model_ids and model_ids[0] or False
assert model_id, _("'%s' Model is not exits..." %(model))
model = model_pool.browse(cr, uid, model_id)
if method in ('create'):
res_id = fct_src(db, uid, object, method, *args)
res_id = fct_src(db, uid, model.model, method, *args)
cr.commit()
new_value = pool.get(model_object.model).read(cr, uid, [res_id], args[0].keys())[0]
if 'id' in new_value:
del new_value['id']
if not logged_uids or uid in logged_uids:
resource_name = pool.get(model_object.model).name_get(cr, uid, [res_id])
resource_name = resource_name and resource_name[0][1] or ''
vals = {
"method": method,
"object_id": model_object.id,
"user_id": uid, "res_id": res_id,
"name": resource_name
}
id = pool.get('audittrail.log').create(cr, uid, vals)
lines = []
for field in new_value:
if new_value[field]:
line = {
'name': field,
'new_value': new_value[field],
'new_value_text': self.get_value_text(cr, uid, field, new_value[field], model_object)
}
lines.append(line)
self.create_log_line(cr, uid, id, model_object, lines)
resource = resource_pool.read(cr, uid, res_id, args[0].keys())
vals = {
"method": method,
"object_id": model.id,
"user_id": uid,
"res_id": resource['id'],
}
if 'id' in resource:
del resource['id']
log_id = log_pool.create(cr, uid, vals)
lines = []
for field in resource:
line = {
'name': field,
'new_value': resource[field],
'new_value_text': self.get_value_text(cr, uid, field, resource[field], model)
}
lines.append(line)
self.create_log_line(cr, uid, log_id, model, lines)
cr.commit()
cr.close()
return res_id
if method in ('write'):
res_ids = args[0]
for res_id in res_ids:
old_values = pool.get(model_object.model).read(cr, uid, res_id, args[1].keys())
old_values_text = {}
for field in args[1].keys():
old_values_text[field] = self.get_value_text(cr, uid, field, old_values[field], model_object)
res = fct_src(db, uid, object, method, *args)
cr.commit()
if res:
new_values = pool.get(model_object.model).read(cr, uid, res_ids, args[1].keys())[0]
if not logged_uids or uid in logged_uids:
resource_name = pool.get(model_object.model).name_get(cr, uid, [res_id])
resource_name = resource_name and resource_name[0][1] or ''
id = pool.get('audittrail.log').create(cr, uid, {"method": method, "object_id": model_object.id, "user_id": uid, "res_id": res_id, "name": resource_name})
lines = []
for field in args[1].keys():
if args[1].keys():
line = {
'name': field,
'new_value': field in new_values and new_values[field] or '',
'old_value': field in old_values and old_values[field] or '',
'new_value_text': self.get_value_text(cr, uid, field, new_values[field], model_object),
'old_value_text': old_values_text[field]
}
lines.append(line)
cr.commit()
self.create_log_line(cr, uid, id, model_object, lines)
cr.close()
return res
if method in ('read'):
elif method in ('read'):
res_ids = args[0]
old_values = {}
res = fct_src(db, uid, object, method, *args)
res = fct_src(db, uid, model.model, method, *args)
if type(res) == list:
for v in res:
old_values[v['id']] = v
else:
old_values[res['id']] = res
for res_id in old_values:
if not logged_uids or uid in logged_uids:
resource_name = pool.get(model_object.model).name_get(cr, uid, [res_id])
resource_name = resource_name and resource_name[0][1] or ''
id = pool.get('audittrail.log').create(cr, uid, {"method": method, "object_id": model_object.id, "user_id": uid, "res_id": res_id, "name": resource_name})
lines = []
for field in old_values[res_id]:
if old_values[res_id][field]:
line = {
'name': field,
'old_value': old_values[res_id][field],
'old_value_text': self.get_value_text(cr, uid, field, old_values[res_id][field], model_object)
}
lines.append(line)
cr.commit()
self.create_log_line(cr, uid, id, model_object, lines)
vals = {
"method": method,
"object_id": model.id,
"user_id": uid,
"res_id": res_id,
}
log_id = log_pool.create(cr, uid, vals)
lines = []
for field in old_values[res_id]:
line = {
'name': field,
'old_value': old_values[res_id][field],
'old_value_text': self.get_value_text(cr, uid, field, old_values[res_id][field], model)
}
lines.append(line)
self.create_log_line(cr, uid, log_id, model, lines)
cr.close()
return res
if method in ('unlink'):
elif method in ('unlink'):
res_ids = args[0]
old_values = {}
for res_id in res_ids:
old_values[res_id] = pool.get(model_object.model).read(cr, uid, res_id, [])
old_values[res_id] = resource_pool.read(cr, uid, res_id)
for res_id in res_ids:
if not logged_uids or uid in logged_uids:
resource_name = pool.get(model_object.model).name_get(cr, uid, [res_id])
resource_name = resource_name and resource_name[0][1] or ''
id = pool.get('audittrail.log').create(cr, uid, {"method": method, "object_id": model_object.id, "user_id": uid, "res_id": res_id, "name": resource_name})
lines = []
for field in old_values[res_id]:
if old_values[res_id][field]:
line = {
'name': field,
'old_value': old_values[res_id][field],
'old_value_text': self.get_value_text(cr, uid, field, old_values[res_id][field], model_object)
}
lines.append(line)
cr.commit()
self.create_log_line(cr, uid, id, model_object, lines)
res = fct_src(db, uid, object, method, *args)
vals = {
"method": method,
"object_id": model.id,
"user_id": uid,
"res_id": res_id,
}
log_id = log_pool.create(cr, uid, vals)
lines = []
for field in old_values[res_id]:
if field in ('id'):
continue
line = {
'name': field,
'old_value': old_values[res_id][field],
'old_value_text': self.get_value_text(cr, uid, field, old_values[res_id][field], model)
}
lines.append(line)
self.create_log_line(cr, uid, log_id, model, lines)
res = fct_src(db, uid, model.model, method, *args)
cr.commit()
cr.close()
return res
cr.close()
else:
res_ids = args[0]
old_values = {}
fields = []
if len(args)>1 and type(args[1]) == dict:
fields = args[1].keys()
if type(res_ids) in (long, int):
res_ids = [res_ids]
if res_ids:
for resource in resource_pool.read(cr, uid, res_ids):
resource_id = resource['id']
if 'id' in resource:
del resource['id']
old_values_text = {}
old_value = {}
for field in resource.keys():
old_value[field] = resource[field]
old_values_text[field] = self.get_value_text(cr, uid, field, resource[field], model)
old_values[resource_id] = {'text':old_values_text, 'value': old_value}
def execute(self, db, uid, object, method, *args, **kw):
res = fct_src(db, uid, model.model, method, *args)
cr.commit()
if res_ids:
for resource in resource_pool.read(cr, uid, res_ids):
resource_id = resource['id']
if 'id' in resource:
del resource['id']
vals = {
"method": method,
"object_id": model.id,
"user_id": uid,
"res_id": resource_id,
}
log_id = log_pool.create(cr, uid, vals)
lines = []
for field in resource.keys():
line = {
'name': field,
'new_value': resource[field],
'old_value': old_values[resource_id]['value'][field],
'new_value_text': self.get_value_text(cr, uid, field, resource[field], model),
'old_value_text': old_values[resource_id]['text'][field]
}
lines.append(line)
self.create_log_line(cr, uid, log_id, model, lines)
cr.commit()
cr.close()
return res
return True
def execute(self, db, uid, model, method, *args, **kw):
"""
Overrides Object Proxy execute method
@param db: the current database
@param uid: the current user’s ID for security checks,
@param object: Object who's values are being changed
@param method: method to log: create, read, write, unlink
@return: Returns result as per method of Object proxy
@param method: get any method and create log
@return: Returns result as per method of Object proxy
"""
pool = pooler.get_pool(db)
model_pool = pool.get('ir.model')
rule_pool = pool.get('audittrail.rule')
cr = pooler.get_db(db).cursor()
cr.autocommit(True)
logged_uids = []
fct_src = super(audittrail_objects_proxy, self).execute
def my_fct(db, uid, object, method, *args):
field = method
def my_fct(db, uid, model, method, *args):
rule = False
obj_ids = pool.get('ir.model').search(cr, uid, [('model', '=', object)])
for obj_name in pool.obj_list():
if obj_name == 'audittrail.rule':
model_ids = model_pool.search(cr, uid, [('model', '=', model)])
model_id = model_ids and model_ids[0] or False
for model_name in pool.obj_list():
if model_name == 'audittrail.rule':
rule = True
if not rule:
return fct_src(db, uid, object, method, *args)
if not obj_ids:
return fct_src(db, uid, object, method, *args)
rule_ids = pool.get('audittrail.rule').search(cr, uid, [('object_id', '=', obj_ids[0]), ('state', '=', 'subscribed')])
if not rule_ids:
return fct_src(db, uid, object, method, *args)
return fct_src(db, uid, model, method, *args)
if not model_id:
return fct_src(db, uid, model, method, *args)
for thisrule in pool.get('audittrail.rule').browse(cr, uid, rule_ids):
rule_ids = rule_pool.search(cr, uid, [('object_id', '=', model_id), ('state', '=', 'subscribed')])
if not rule_ids:
return fct_src(db, uid, model, method, *args)
for thisrule in rule_pool.browse(cr, uid, rule_ids):
for user in thisrule.user_id:
logged_uids.append(user.id)
if not logged_uids or uid in logged_uids:
if field in ('read', 'write', 'create', 'unlink'):
if getattr(thisrule, 'log_' + field):
return self.log_fct(db, uid, object, method, fct_src, *args)
return fct_src(db, uid, object, method, *args)
res = my_fct(db, uid, object, method, *args)
if method in ('read', 'write', 'create', 'unlink'):
if getattr(thisrule, 'log_' + method):
return self.log_fct(db, uid, model, method, fct_src, *args)
elif method not in ('default_get','read','fields_view_get','fields_get','search','search_count','name_search','name_get','get','request_get', 'get_sc', 'unlink', 'write', 'create'):
if thisrule.log_action:
return self.log_fct(db, uid, model, method, fct_src, *args)
return fct_src(db, uid, model, method, *args)
res = my_fct(db, uid, model, method, *args)
cr.close()
return res
def exec_workflow(self, db, uid, model, method, *args, **argv):
pool = pooler.get_pool(db)
cr = pooler.get_db(db).cursor()
cr.autocommit(True)
logged_uids = []
fct_src = super(audittrail_objects_proxy, self).exec_workflow
field = method
rule = False
model_pool = pool.get('ir.model')
rule_pool = pool.get('audittrail.rule')
model_ids = model_pool.search(cr, uid, [('model', '=', model)])
for obj_name in pool.obj_list():
if obj_name == 'audittrail.rule':
rule = True
if not rule:
cr.close()
return super(audittrail_objects_proxy, self).exec_workflow(db, uid, model, method, *args, **argv)
if not model_ids:
cr.close()
return super(audittrail_objects_proxy, self).exec_workflow(db, uid, model, method, *args, **argv)
rule_ids = rule_pool.search(cr, uid, [('object_id', 'in', model_ids), ('state', '=', 'subscribed')])
if not rule_ids:
cr.close()
return super(audittrail_objects_proxy, self).exec_workflow(db, uid, model, method, *args, **argv)
for thisrule in rule_pool.browse(cr, uid, rule_ids):
for user in thisrule.user_id:
logged_uids.append(user.id)
if not logged_uids or uid in logged_uids:
if thisrule.log_workflow:
cr.close()
return self.log_fct(db, uid, model, method, fct_src, *args)
cr.close()
return super(audittrail_objects_proxy, self).exec_workflow(db, uid, model, method, *args, **argv)
cr.close()
return True
audittrail_objects_proxy()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+18 -16
View File
@@ -12,12 +12,15 @@
<form string="AuditTrail Rule">
<field name="name" select="1" required="1"/>
<field name="object_id" select="1"/>
<field name="log_read" />
<field name="log_write" />
<field name="log_unlink" />
<field name="log_create" />
<field name="action_id" colspan="4" readonly="1"/>
<field name="user_id" select="1" colspan="4"/>
<field name="log_read"/>
<field name="log_write"/>
<field name="log_unlink"/>
<field name="log_create"/>
<field name="log_action"/>
<field name="log_workflow"/>
<separator string="Users (if User is not added then it will applicable for all users)" colspan="4" />
<field name="user_id" select="1" colspan="4" nolabel="1" />
<field name="action_id" colspan="4" readonly="1" groups="base.group_extended"/>
<field name="state" select="1" readonly="1" />
<group colspan="2" col="2">
<button string="Subscribe" name="subscribe"
@@ -42,6 +45,8 @@
<field name="log_write" />
<field name="log_unlink" />
<field name="log_create" />
<field name="log_action"/>
<field name="log_workflow"/>
<field name="state" />
</tree>
</field>
@@ -58,9 +63,10 @@
<!--<field name="view_id" ref="view_audittrail_rule_form" />-->
</record>
<menuitem name="Audittrails" id="menu_action_audittrail"
<menuitem name="Audittrail" id="menu_action_audittrail"
groups="base.group_extended"
parent="base.menu_administration" />
<menuitem name="Rules" id="menu_action_audittrail_rule_tree"
action="action_audittrail_rule_tree" parent="menu_action_audittrail" />
@@ -83,13 +89,13 @@
<field name="arch" type="xml">
<form string="AuditTrail Logs">
<field name="timestamp" select="1" required="1" readonly="1"/>
<field name="object_id" select="1" readonly="1"/>
<field name="method" select="1" readonly="1"/>
<field name="user_id" select="1" readonly="1"/>
<field name="res_id" readonly="1"/>
<field name="method" select="1" readonly="1"/>
<field name="name" readonly="1" select="1"/>
<field name="res_id" readonly="1"/>
<field name="object_id" select="1" readonly="1"/>
<field name="line_ids" colspan="4" mode="tree,form"
widget="one2many_list" readonly="1">
widget="one2many_list" readonly="1" nolabel="1">
<form string="Log Lines">
<field name="field_id" colspan="4"
readonly="1" />
@@ -151,11 +157,7 @@
<field name="view_type">form</field>
</record>
<menuitem name="Logs" id="menu_action_audittrail_log_tree"
action="action_audittrail_log_tree" parent="menu_action_audittrail" />
<!-- <wizard string="View log" menu="False" model="audittrail.log" name="audittrail.view.log" id="wizard_audittrail_log"/>-->
<menuitem name="View Logs" id="menu_action_log_tree2"
action="action_audittrail_view_log" parent="menu_action_audittrail" />
action="action_audittrail_log_tree" parent="menu_action_audittrail" />
</data>
</openerp>
+36 -32
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-06-24 02:58+0000\n"
"PO-Revision-Date: 2010-06-24 21:17+0000\n"
"Last-Translator: Panayiotis Konstantinidis <Unknown>\n"
"Language-Team: Greek <el@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-06-24 03:47+0000\n"
"X-Launchpad-Export-Date: 2010-06-25 03:47+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: audittrail
@@ -159,153 +159,157 @@ msgid ""
" Subscribe Rules for read, write, create and delete on objects and check "
"logs"
msgstr ""
"Επιστρέπει στον Διαχειριστή να ακολουθεί τα ίχνη κάθε λειτουργίας του χρήστη "
"σε όλα τα αντικείμενα του συστήματος.\n"
" Εισάγεται κανόνες για ανάγνωση, εγγραφή, δημιουργία και διαγραφή στα "
"αντικείμενα και τα ημερολόγια ελέγχου."
#. module: audittrail
#: field:audittrail.log,timestamp:0
msgid "Date"
msgstr ""
msgstr "Ημερομηνία"
#. module: audittrail
#: field:audittrail.log,user_id:0
msgid "User"
msgstr ""
msgstr "Χρήστης"
#. module: audittrail
#: view:audittrail.log:0
msgid "Old Value Text : "
msgstr ""
msgstr "Παλιά τιμή κειμένου: "
#. module: audittrail
#: constraint:ir.ui.view:0
msgid "Invalid XML for View Architecture!"
msgstr ""
msgstr "Λανθασμένο XML για αρχιτεκτονική όψης!"
#. module: audittrail
#: field:audittrail.log,name:0
msgid "Name"
msgstr ""
msgstr "Όνομα"
#. module: audittrail
#: field:audittrail.log,line_ids:0
msgid "Log lines"
msgstr ""
msgstr "Γραμμές ημερολογίου"
#. module: audittrail
#: model:ir.ui.menu,name:audittrail.menu_action_audittrail_rule_tree_sub
msgid "Subscribed Rules"
msgstr ""
msgstr "Εγγεγραμμένοι Κανόνες"
#. module: audittrail
#: field:audittrail.log.line,field_id:0
msgid "Fields"
msgstr ""
msgstr "Πεδία"
#. module: audittrail
#: view:audittrail.rule:0
msgid "AuditTrail Rules"
msgstr ""
msgstr "Κανόνες διαδρομής ελέγχου"
#. module: audittrail
#: model:ir.model,name:audittrail.model_audittrail_rule
msgid "audittrail.rule"
msgstr ""
msgstr "ελεγκτική ιχνηλάτηση.κανόνες"
#. module: audittrail
#: view:audittrail.rule:0
msgid "UnSubscribe"
msgstr ""
msgstr "Διαγραφείτε"
#. module: audittrail
#: field:audittrail.rule,log_write:0
msgid "Log writes"
msgstr ""
msgstr "Εγγραφές ημερολογίου"
#. module: audittrail
#: model:ir.model,name:audittrail.model_audittrail_log
msgid "audittrail.log"
msgstr ""
msgstr "ελεγκτική ιχνηλάτηση.ημερολόγιο"
#. module: audittrail
#: field:audittrail.log.line,field_description:0
msgid "Field Description"
msgstr ""
msgstr "Περιγραφή πεδίου"
#. module: audittrail
#: selection:audittrail.log,method:0
msgid "Delete"
msgstr ""
msgstr "Διαγραφή"
#. module: audittrail
#: wizard_button:audittrail.view.log,init,open:0
msgid "Open Logs"
msgstr ""
msgstr "Άνοιγμα ημερολογίων"
#. module: audittrail
#: field:audittrail.log.line,new_value_text:0
msgid "New value Text"
msgstr ""
msgstr "Νέα τιμή κειμένου"
#. module: audittrail
#: field:audittrail.rule,name:0
msgid "Rule Name"
msgstr ""
msgstr "Όνομα Κανόνα"
#. module: audittrail
#: field:audittrail.rule,log_read:0
msgid "Log reads"
msgstr ""
msgstr "Αναγνώσεις ημερολογίων"
#. module: audittrail
#: model:ir.ui.menu,name:audittrail.menu_action_audittrail_log_tree
msgid "Logs"
msgstr ""
msgstr "Αρχεία καταγραφής"
#. module: audittrail
#: field:audittrail.log.line,new_value:0
msgid "New Value"
msgstr ""
msgstr "Νέα τιμή"
#. module: audittrail
#: model:ir.ui.menu,name:audittrail.menu_action_log_tree2
msgid "View Logs"
msgstr ""
msgstr "Δείτε τα αρχεία καταγραφής"
#. module: audittrail
#: field:audittrail.rule,log_create:0
msgid "Log creates"
msgstr ""
msgstr "Δημιουργία αρχείων καταγραφής"
#. module: audittrail
#: view:audittrail.log:0
msgid "AuditTrail Logs"
msgstr ""
msgstr "παρακολούθηση της πόρειας των αρχείων καταγραφής"
#. module: audittrail
#: model:ir.ui.menu,name:audittrail.menu_action_audittrail_rule_tree
msgid "Rules"
msgstr ""
msgstr "Κανόνες"
#. module: audittrail
#: view:audittrail.log:0
msgid "New Value : "
msgstr ""
msgstr "Νέα τιμή : "
#. module: audittrail
#: field:audittrail.rule,user_id:0
msgid "Users"
msgstr ""
msgstr "Χρήστες"
#. module: audittrail
#: field:audittrail.log.line,old_value_text:0
msgid "Old value Text"
msgstr ""
msgstr "Παλιά τιμή κειμένου"
#. module: audittrail
#: wizard_button:audittrail.view.log,init,end:0
msgid "Cancel"
msgstr ""
msgstr "Ακύρωση"
#. module: audittrail
#: field:audittrail.rule,log_unlink:0
msgid "Log deletes"
msgstr ""
msgstr "Διαγραφή αρχείων καταγραφής"
+3 -1
View File
@@ -27,7 +27,9 @@
'author': 'Tiny',
'website': 'http://www.openerp.com',
'depends': ['base'],
'init_xml': [],
'init_xml': [
'base_action_rule_data.xml'
],
'update_xml': [
'base_action_rule_view.xml',
'security/ir.model.access.csv',
+107 -17
View File
@@ -19,14 +19,16 @@
#
##############################################################################
import time
import mx.DateTime
import re
import tools
from datetime import datetime
from osv import fields, osv, orm
from osv.orm import except_orm
from osv.osv import osv_pool
from tools.translate import _
import mx.DateTime
import pooler
import re
import time
import tools
class base_action_rule(osv.osv):
""" Base Action Rules """
@@ -93,23 +95,23 @@ trigger date, like sending a reminder 15 minutes before a meeting."),
'trg_state_to': fields.selection(_state_get, 'Button Pressed', size=16),
'act_method': fields.char('Call Object Method', size=64),
'act_user_id': fields.many2one('res.users', 'Set responsible to'),
'act_state': fields.selection(_state_get, 'Set state to', size=16),
'act_email_cc': fields.char('Add watchers (Cc)', size=250, help="\
'act_user_id': fields.many2one('res.users', 'Set Responsible to'),
'act_state': fields.selection(_state_get, 'Set State to', size=16),
'act_email_cc': fields.char('Add Watchers (Cc)', size=250, help="\
These people will receive a copy of the future communication between partner \
and users by email"),
'act_remind_partner': fields.boolean('Remind Partner', help="Check \
this if you want the rule to send a reminder by email to the partner."),
'act_remind_user': fields.boolean('Remind responsible', help="Check \
'act_remind_user': fields.boolean('Remind Responsible', help="Check \
this if you want the rule to send a reminder by email to the user."),
'act_reply_to': fields.char('Reply-To', size=64),
'act_remind_attach': fields.boolean('Remind with attachment', help="Check this if you want that all documents attached to the object be attached to the reminder email sent."),
'act_mail_to_user': fields.boolean('Mail to responsible', help="Check\
'act_remind_attach': fields.boolean('Remind with Attachment', help="Check this if you want that all documents attached to the object be attached to the reminder email sent."),
'act_mail_to_user': fields.boolean('Mail to Responsible', help="Check\
this if you want the rule to send an email to the responsible person."),
'act_mail_to_watchers': fields.boolean('Mail to watchers (CC)',
'act_mail_to_watchers': fields.boolean('Mail to Watchers (CC)',
help="Check this if you want \
the rule to mark CC(mail to any other person defined in actions)."),
'act_mail_to_email': fields.char('Mail to these emails', size=128, \
'act_mail_to_email': fields.char('Mail to these Emails', size=128, \
help="Email-id of the persons whom mail is to be sent"),
'act_mail_body': fields.text('Mail body', help="Content of mail"),
'regex_name': fields.char('Regular Expression on Model Name', size=128),
@@ -132,6 +134,71 @@ the rule to mark CC(mail to any other person defined in actions)."),
_order = 'sequence'
def pre_action(self, cr, uid, ids, model, context=None):
# Searching for action rules
cr.execute("SELECT model.model, rule.id FROM base_action_rule rule LEFT JOIN ir_model model on (model.id = rule.name)")
res = cr.fetchall()
# Check if any rule matching with current object
for obj_name, rule_id in res:
if not (model == obj_name):
continue
else:
obj = self.pool.get(obj_name)
self._action(cr, uid, [rule_id], obj.browse(cr, uid, ids, context=context))
return True
def _create(self, old_create, model, context=None):
if not context:
context = {}
def make_call_old(cr, uid, vals, context=context):
new_id = old_create(cr, uid, vals, context=context)
if not context.get('action'):
self.pre_action(cr, uid, [new_id], model, context=context)
return new_id
return make_call_old
def _write(self, old_write, model, context=None):
if not context:
context = {}
def make_call_old(cr, uid, ids, vals, context=context):
if isinstance(ids, (str, int, long)):
ids = [ids]
if not context.get('action'):
self.pre_action(cr, uid, ids, model, context=context)
return old_write(cr, uid, ids, vals, context=context)
return make_call_old
def _register_hook(self, cr, uid, ids, context=None):
if not context:
context = {}
model_pool = self.pool.get('ir.model')
for action_rule in self.browse(cr, uid, ids, context=context):
model = action_rule.name.model
obj_pool = self.pool.get(model)
obj_pool.__setattr__('create', self._create(obj_pool.create, model, context=context))
obj_pool.__setattr__('write', self._write(obj_pool.write, model, context=context))
return True
def create(self, cr, uid, vals, context=None):
res_id = super(base_action_rule, self).create(cr, uid, vals, context)
self._register_hook(cr, uid, [res_id], context=context)
return res_id
def write(self, cr, uid, ids, vals, context=None):
res = super(base_action_rule, self).write(cr, uid, ids, vals, context)
self._register_hook(cr, uid, ids, context=context)
return res
def _check(self, cr, uid, automatic=False, use_new_cursor=False, \
context=None):
"""
This Function is call by scheduler.
"""
rule_pool= self.pool.get('base.action.rule')
rule_ids = rule_pool.search(cr, uid, [], context=context)
return self._register_hook(cr, uid, rule_ids, context=context)
def format_body(self, body):
""" Foramat Action rule's body
@param self: The object pointer """
@@ -235,6 +302,7 @@ the rule to mark CC(mail to any other person defined in actions)."),
context.update({'active_id':obj.id, 'active_ids':[obj.id]})
self.pool.get('ir.actions.server').run(cr, uid, [action.server_action_id.id], context)
write = {}
if hasattr(obj, 'user_id') and action.act_user_id:
obj.user_id = action.act_user_id
write['user_id'] = action.act_user_id.id
@@ -279,12 +347,10 @@ the rule to mark CC(mail to any other person defined in actions)."),
@param ids: List of Basic Action Rule’s IDs,
@param objects: pass objects
@param context: A standard dictionary for contextual values """
context.update({'action': True})
if not scrit:
scrit = []
cr.execute("select id from base_action_rule order by sequence")
rule_ids = map(lambda x: x[0], cr.fetchall())
for action in self.browse(cr, uid, rule_ids):
for action in self.browse(cr, uid, ids):
level = action.max_level
if not level:
break
@@ -333,6 +399,7 @@ the rule to mark CC(mail to any other person defined in actions)."),
self.do_action(cr, uid, action, model_obj, obj, context)
break
level -= 1
context.update({'action': False})
return True
def _check_mail(self, cr, uid, ids, context=None):
@@ -359,4 +426,27 @@ the rule to mark CC(mail to any other person defined in actions)."),
base_action_rule()
class ir_cron(osv.osv):
_inherit = 'ir.cron'
def _poolJobs(self, db_name, check=False):
try:
db, pool = pooler.get_db_and_pool(db_name)
except:
return False
cr = db.cursor()
try:
next = datetime.now().strftime('%Y-%m-%d %H:00:00')
# Putting nextcall always less than current time in order to call it every time
cr.execute('UPDATE ir_cron set nextcall = \'%s\' where numbercall<>0 and active and model=\'base.action.rule\' ' % (next))
cr.commit()
res = super(ir_cron, self)._poolJobs(db_name, check=check)
finally:
cr.commit()
cr.close()
ir_cron()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data noupdate="1">
<record id="ir_cron_crm_action" model="ir.cron">
<field name="name">Check Action Rules</field>
<field name="interval_number">4</field>
<field name="interval_type">hours</field>
<field name="numbercall">-1</field>
<field eval="False" name="doall"/>
<field eval="'base.action.rule'" name="model"/>
<field eval="'_check'" name="function"/>
<field eval="'()'" name="args"/>
</record>
</data>
</openerp>
@@ -18,7 +18,8 @@
<field name="active"/>
<field name="sequence"/>
<field name="max_level" />
<field name="domain" colspan="4"/>
<field name="domain"/>
<field name="filter_id"/>
<notebook colspan="4">
<page string="Conditions">
<group col="2" colspan="2" name="model">
@@ -54,7 +55,6 @@
<field name="act_state"/>
<separator colspan="4" string="Server Action to be Triggered"/>
<field name="server_action_id"/>
<field name="filter_id"/>
</page>
<page string="Email Actions">
<!-- <group col="4" colspan="2">-->
+16 -13
View File
@@ -377,6 +377,9 @@ property or property parameter."),
_defaults = {
'state': lambda *x: 'needs-action',
}
def copy(self, cr, uid, id, default=None, context=None):
raise osv.except_osv(_('Warning!'), _('Can not Duplicate'))
def get_ics_file(self, cr, uid, event_obj, context=None):
"""
@@ -875,7 +878,7 @@ class calendar_event(osv.osv):
value = {
'duration': 24
}
return {'value': value}
duration = 0.0
start = datetime.strptime(start_date, "%Y-%m-%d %H:%M:%S")
if end_date and not duration:
@@ -1005,17 +1008,17 @@ class calendar_event(osv.osv):
_columns = {
'id': fields.integer('ID'),
'sequence': fields.integer('Sequence'),
'name': fields.char('Description', size=64, required=False),
'date': fields.datetime('Date'),
'date_deadline': fields.datetime('Deadline'),
'name': fields.char('Description', size=64, required=False, states={'done': [('readonly', True)]}),
'date': fields.datetime('Date', states={'done': [('readonly', True)]}),
'date_deadline': fields.datetime('Deadline', states={'done': [('readonly', True)]}),
'create_date': fields.datetime('Created', readonly=True),
'duration': fields.float('Duration'),
'description': fields.text('Your action'),
'duration': fields.float('Duration', states={'done': [('readonly', True)]}),
'description': fields.text('Description', states={'done': [('readonly', True)]}),
'class': fields.selection([('public', 'Public'), ('private', 'Private'), \
('confidential', 'Confidential')], 'Mark as'),
'location': fields.char('Location', size=264, help="Location of Event"),
('confidential', 'Confidential')], 'Mark as', states={'done': [('readonly', True)]}),
'location': fields.char('Location', size=264, help="Location of Event", states={'done': [('readonly', True)]}),
'show_as': fields.selection([('free', 'Free'), ('busy', 'Busy')], \
'Show as'),
'Show as', states={'done': [('readonly', True)]}),
'base_calendar_url': fields.char('Caldav URL', size=264),
'exdate': fields.text('Exception Date/Times', help="This property \
defines the list of date/time exceptions for arecurring calendar component."),
@@ -1029,14 +1032,14 @@ e.g.: Every other month on the last Sunday of the month for 10 occurrences:\
FREQ=MONTHLY;INTERVAL=2;COUNT=10;BYDAY=-1SU'),
'rrule_type': fields.selection([('none', ''), ('daily', 'Daily'), \
('weekly', 'Weekly'), ('monthly', 'Monthly'), \
('yearly', 'Yearly'), ('custom', 'Custom')], 'Recurrency'),
'alarm_id': fields.many2one('res.alarm', 'Alarm'),
('yearly', 'Yearly'), ('custom', 'Custom')], 'Recurrency', states={'done': [('readonly', True)]}),
'alarm_id': fields.many2one('res.alarm', 'Alarm', states={'done': [('readonly', True)]}),
'base_calendar_alarm_id': fields.many2one('calendar.alarm', 'Alarm'),
'recurrent_uid': fields.integer('Recurrent ID'),
'recurrent_id': fields.datetime('Recurrent ID date'),
'vtimezone': fields.related('user_id', 'context_tz', type='char', size=24, \
string='Timezone', store=True),
'user_id': fields.many2one('res.users', 'Responsible'),
'user_id': fields.many2one('res.users', 'Responsible', states={'done': [('readonly', True)]}),
'freq': fields.selection([('None', 'No Repeat'), \
('secondly', 'Secondly'), \
('minutely', 'Minutely'), \
@@ -1068,7 +1071,7 @@ e.g.: Every other month on the last Sunday of the month for 10 occurrences:\
'end_date': fields.date('Repeat Until'),
'attendee_ids': fields.many2many('calendar.attendee', 'event_attendee_rel', \
'event_id', 'attendee_id', 'Attendees'),
'allday': fields.boolean('All Day'),
'allday': fields.boolean('All Day', states={'done': [('readonly', True)]}),
'active': fields.boolean('Active', help="If the active field is set to \
true, it will allow you to hide the event alarm information without removing it.")
}
+2 -2
View File
@@ -121,7 +121,7 @@
<filter string="Contact" icon="terp-gtk-jump-to-ltr" domain="[]"
context="{'group_by':'partner_address_id'}" />
<filter string="State" icon="terp-stock_effects-object-colorize" help="Invitation Type"
domain="[]" context="{'group_by':' state'}" />
domain="[]" context="{'group_by':'state'}" />
</group>
</search>
</field>
@@ -138,7 +138,7 @@
<!-- Calenadar's menu -->
<menuitem id="base.menu_calendar_configuration" name="Calendar"
parent="base.menu_config_address_book" sequence="15" />
parent="base.menu_base_config" sequence="15" />
<!-- Invitation menu -->
@@ -65,7 +65,6 @@ send an Email to Invited Person')
context = {}
model = False
model_field = False
context_id = context and context.get('active_id', False) or False
if not context or not context.get('model'):
return {}
@@ -104,11 +104,14 @@ class base_calendar_set_exrule(osv.osv_memory):
weekstring = ''
monthstring = ''
yearstring = ''
ex_id = base_calendar.base_calendar_id2real_id(context['active_id'])
model = context.get('model', False)
model_obj = self.pool.get(model)
for datas in self.read(cr, uid, ids, context=context):
freq = datas.get('freq')
if freq == 'None':
return ''
model_obj.write(cr, uid, ex_id,{'exrule': ''})
return{}
interval_srting = datas.get('interval') and (';INTERVAL=' + str(datas.get('interval'))) or ''
@@ -143,12 +146,8 @@ class base_calendar_set_exrule(osv.osv_memory):
exrule_string = 'FREQ=' + freq.upper() + weekstring + interval_srting \
+ enddate + monthstring + yearstring
ex_id = base_calendar.base_calendar_id2real_id(context['active_id'])
model = context.get('model', False)
model_obj = self.pool.get(model)
exrule_value = model_obj.write(cr, uid,ex_id,{
'exrule': exrule_string,
})
model_obj.write(cr, uid, ex_id,{'exrule': exrule_string})
return {}
_defaults = {
@@ -49,11 +49,13 @@
attrs="{'required' : [('freq','=','yearly')]}"/>
</group>
</group>
<group colspan="4" col="6">
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
<button icon="gtk-ok" string="ok" name="compute_exrule_string" type="object"/>
</group>
</form>
<group colspan="4" col="6">
<separator string="" colspan="8"/>
<label string="" colspan="2"/>
<button icon="gtk-cancel" special="cancel" string="_Cancel"/>
<button icon="gtk-ok" string="_Ok" name="compute_exrule_string" type="object"/>
</group>
</form>
</field>
</record>
+2
View File
@@ -20,5 +20,7 @@
##############################################################################
import base_contact
import base_contact_installer
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+1
View File
@@ -45,6 +45,7 @@
'update_xml': [
'security/ir.model.access.csv',
'base_contact_view.xml',
'base_contact_installer_view.xml',
'process/base_contact_process.xml'
],
'demo_xml': ['base_contact_demo.xml'],
@@ -0,0 +1,66 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
from lxml import etree
from osv import fields, osv
class base_contact_installer(osv.osv_memory):
_name = 'base.contact.installer'
_inherit = 'res.config.installer'
_columns = {
'name': fields.char('Name', size=64),
'migrate': fields.boolean('Migrate', help="If you select this, all addresses will be migrated."),
}
def execute(self, cr, uid, ids, context=None):
"""
This function is used to create contact and address from existing partner address
"""
cr.execute("""DROP TRIGGER IF EXISTS contactjob on res_partner_contact;
DROP LANGUAGE IF EXISTS plpgsql CASCADE;
CREATE LANGUAGE plpgsql ;
CREATE OR REPLACE FUNCTION add_to_job() RETURNS TRIGGER AS $contactjob$
DECLARE
new_name varchar;
new_phonenum varchar;
BEGIN
IF(TG_OP='INSERT') THEN
INSERT INTO res_partner_job(contact_id, address_id, function, state) VALUES(NEW.id, NEW.website::integer,NEW.first_name, 'current');
UPDATE res_partner_contact set first_name=Null, website=Null, active=True where id=NEW.id;
END IF;
RETURN NEW;
END;
$contactjob$ LANGUAGE plpgsql;
CREATE TRIGGER contactjob AFTER INSERT ON res_partner_contact FOR EACH ROW EXECUTE PROCEDURE add_to_job();""")
cr.commit()
cr.execute("INSERT into res_partner_contact (name, title, email, first_name, website) (SELECT coalesce(name, 'Noname'), title, email, function , to_char(id, '99999999') from res_partner_address)")
cr.commit()
cr.execute("DROP TRIGGER IF EXISTS contactjob on res_partner_contact")
cr.execute("DROP LANGUAGE IF EXISTS plpgsql CASCADE;")
cr.execute("DROP FUNCTION IF EXISTS add_to_job()")
cr.commit()
base_contact_installer()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
@@ -0,0 +1,56 @@
<openerp>
<data>
<record id="view_base_contact_installer" model="ir.ui.view">
<field name="name">base.contact.installer.view</field>
<field name="model">base.contact.installer</field>
<field name="type">form</field>
<field name="inherit_id" ref="base.res_config_installer"/>
<field name="arch" type="xml">
<data>
<form position="attributes">
<attribute name="string">Address's Migration to Contacts</attribute>
</form>
<separator string="title" position="attributes">
<attribute name="string">Select the Option for Addresses Migration</attribute>
</separator>
<xpath expr="//label[@string='description']"
position="attributes">
<attribute name="string">You can migrate Partner's current addresses to the contact.</attribute>
</xpath>
<xpath expr='//separator[@string="vsep"]' position='attributes'>
<attribute name='rowspan'>13</attribute>
<attribute name='string'></attribute>
</xpath>
<xpath expr="//button[@string='Install Modules']" position="attributes">
<attribute name="string">Migrate</attribute>
</xpath>
<group colspan="8">
<group colspan="2" col="2">
<label string="Due to changes in Address and Partner's relation, some of the details from address are needed to migrated into contact information." colspan="4"/>
<label string="Otherwise these details will not be visible from address/contact." colspan="4"/>
<label string="Do you want to migrate your Address data in Contact Data?" colspan="4" />
<field name="migrate" string="Yes/No" />
</group>
</group>
</data>
</field>
</record>
<record id="action_base_contact_installer" model="ir.actions.act_window">
<field name="name">Address Migration</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">base.contact.installer</field>
<field name="view_id" ref="view_base_contact_installer"/>
<field name="view_type">form</field>
<field name="view_mode">form</field>
<field name="target">new</field>
</record>
<record id="base_contact_installer_todo" model="ir.actions.todo">
<field name="action_id" ref="action_base_contact_installer"/>
<field name="sequence">3</field>
</record>
</data>
</openerp>
+1 -1
View File
@@ -14,7 +14,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-06-24 03:47+0000\n"
"X-Launchpad-Export-Date: 2010-06-25 03:47+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: base_module_quality
+1 -1
View File
@@ -15,7 +15,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-06-24 03:47+0000\n"
"X-Launchpad-Export-Date: 2010-06-25 03:47+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: base_module_quality
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
##############################################################################
#
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
@@ -15,7 +15,7 @@
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
@@ -48,7 +48,7 @@ PEP-8 Test , copyright of py files check, method can not call from loops
list_files.append(os.path.join(i, j))
py_list = []
for file_py in list_files:
if file_py.split('.')[-1] == 'py' and not file_py.endswith('__init__.py') and not file_py.endswith('__terp__.py'):
if file_py.split('.')[-1] == 'py' and not file_py.endswith('__init__.py') and not file_py.endswith('__openerp__.py'):
file_path = os.path.join(module_path, file_py)
py_list.append(file_path)
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
##############################################################################
#
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
@@ -15,7 +15,7 @@
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
@@ -50,7 +50,7 @@ class quality_test(base_module_quality.abstract_quality_check):
flag = False
self.result_details += '''<html><body><head>%s</head>'''%(self.get_style())
for file_py in list_files:
if file_py.split('.')[-1] == 'py' and not file_py.endswith('__init__.py') and not file_py.endswith('__terp__.py'):
if file_py.split('.')[-1] == 'py' and not file_py.endswith('__init__.py') and not file_py.endswith('__openerp__.py'):
if not flag:
flag = True
file_path = os.path.join(module_path, file_py)
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
##############################################################################
#
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
@@ -15,7 +15,7 @@
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
@@ -82,7 +82,7 @@ This test checks if the module satisfy tiny structure
# module files calculation (module.py,module_view.xml,etc..)
com_list = ['_unit_test.xml', '.py', '_view.xml', '_workflow.xml' , '_wizard.xml', '_report.xml', '_data.xml', '_demo.xml', '_security.xml', '_sequence.xml', '_graph.xml']
com_list = map(lambda x: module_name + x, com_list)
main_file = ['__init__.py', '__terp__.py']
main_file = ['__init__.py', '__openerp__.py']
com_list.extend(main_file)
module_dict['module'] = filter(lambda x: len(x.split(".")) > 1, module_dict['module'])
score = self.get_score(module_dict['module'], com_list)
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
##############################################################################
#
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
@@ -15,7 +15,7 @@
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
@@ -49,13 +49,13 @@ class quality_test(base_module_quality.abstract_quality_check):
score = 1.0
feel_good_factor = 0
feel_bad_factor = 0
if '__terp__.py' not in list_files:
if '__openerp__.py' not in list_files:
self.no_terp = True
self.result += _("The module does not contain the __terp__.py file")
self.result += _("The module does not contain the __openerp__.py file")
return None
result_dict = {}
result_dict1 = {}
terp_file = os.path.join(module_path,'__terp__.py')
terp_file = os.path.join(module_path,'__openerp__.py')
res = eval(tools.file_open(terp_file).read())
terp_keys = ['category', 'name', 'description', 'author', 'website', 'update_xml', 'init_xml', 'depends', 'version', 'active', 'installable', 'demo_xml']
for key in terp_keys:
@@ -117,7 +117,7 @@ class quality_test(base_module_quality.abstract_quality_check):
self.result_details += self.get_result_details(result_dict)
self.result_details += self.get_result_details(result_dict1)
return [_('__terp__.py file'), score]
return [_('__openerp__.py file'), score]
def run_test(self, cr, uid, module_path):
terp_score = self.run_test_terp(cr, uid, module_path)
@@ -125,7 +125,7 @@ class quality_test(base_module_quality.abstract_quality_check):
if self.score*100 < self.min_score:
self.message = 'Score is below than minimal score(%s%%)' % self.min_score
if terp_score:
self.result = self.get_result({'__terp__.py': terp_score})
self.result = self.get_result({'__openerp__.py': terp_score})
return None
def get_result(self, dict_terp):
@@ -144,4 +144,4 @@ class quality_test(base_module_quality.abstract_quality_check):
return res
return ""
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+1 -1
View File
@@ -13,7 +13,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-06-24 03:47+0000\n"
"X-Launchpad-Export-Date: 2010-06-25 03:47+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
"X-Poedit-Country: GREECE\n"
"X-Poedit-Language: Greek\n"
+1 -1
View File
@@ -13,7 +13,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-06-24 03:46+0000\n"
"X-Launchpad-Export-Date: 2010-06-25 03:46+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
"X-Poedit-Country: GREECE\n"
"X-Poedit-Language: Greek\n"
+1 -1
View File
@@ -13,7 +13,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-06-24 03:46+0000\n"
"X-Launchpad-Export-Date: 2010-06-25 03:46+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
"X-Poedit-Country: GREECE\n"
"X-Poedit-Language: Greek\n"
+1 -1
View File
@@ -13,7 +13,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-06-24 03:46+0000\n"
"X-Launchpad-Export-Date: 2010-06-25 03:46+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
"X-Poedit-Country: GREECE\n"
"X-Poedit-Language: Greek\n"
+1 -1
View File
@@ -13,7 +13,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-06-24 03:47+0000\n"
"X-Launchpad-Export-Date: 2010-06-25 03:47+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
"X-Poedit-Country: GREECE\n"
"X-Poedit-Language: Greek\n"
+1 -1
View File
@@ -13,7 +13,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-06-24 03:46+0000\n"
"X-Launchpad-Export-Date: 2010-06-25 03:46+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
"X-Poedit-Country: GREECE\n"
"X-Poedit-Language: Greek\n"
+3 -10
View File
@@ -32,16 +32,6 @@ class calendar_event_export(osv.osv_memory):
"""
Export Calendar Event.
"""
def process_export_ics(self, cr, uid, ids, context):
"""
Get Default value for file_path field.
"""
model = context.get('model', 'basic.calendar')
model_obj = self.pool.get(model)
calendar = model_obj.export_cal(cr, uid, context['active_ids'], context)
self.write(cr, uid, ids, {'file_path': base64.encodestring(calendar)})
return False
def default_get(self, cr, uid, fields, context):
"""
@@ -54,6 +44,9 @@ class calendar_event_export(osv.osv_memory):
name = 'OpenERP %s.ics' % (model_obj._description)
if 'name' in fields:
res.update({'name': name})
if 'file_path' in fields:
calendar = model_obj.export_cal(cr, uid, context['active_ids'], context)
res.update({'file_path': base64.encodestring(calendar)})
return res
_name = "calendar.event.export"
@@ -13,8 +13,8 @@
</group>
<separator string="" colspan="4" />
<group colspan="4" col="6">
<button name="process_export_ics" icon="gtk-execute" string="Genetate ics" type="object"/>
<button icon="gtk-cancel" special="cancel" string="_Cancel"/>
<label string=""/>
<button icon="gtk-close" special="cancel" string="_Close"/>
</group>
</form>
</field>
-1
View File
@@ -20,7 +20,6 @@
##############################################################################
import crm
import crm_mailgate
import crm_action_rule
import crm_segmentation
import crm_meeting
-1
View File
@@ -69,7 +69,6 @@ Create dashboard for CRM that includes:
'crm_opportunity_data.xml',
'crm_phonecall_data.xml',
],
'update_xml': [
'wizard/crm_lead_to_partner_view.xml',
'wizard/crm_lead_to_opportunity_view.xml',
+16 -5
View File
@@ -121,11 +121,16 @@ class crm_case(object):
s = self.get_stage_dict(cr, uid, ids, context=context)
section = self._name
stage_pool = self.pool.get('crm.case.stage')
for case in self.browse(cr, uid, ids, context):
if section in s:
st = case.stage_id.id or False
if st in s[section]:
self.write(cr, uid, [case.id], {'stage_id': s[section][st]})
data = {'stage_id': s[section][st]}
stage = stage_pool.browse(cr, uid, s[section][st], context=context)
if stage.on_change:
data.update({'probability': stage.probability})
self.write(cr, uid, [case.id], data)
return True
def get_stage_dict(self, cr, uid, ids, context=None):
@@ -162,12 +167,17 @@ class crm_case(object):
s = self.get_stage_dict(cr, uid, ids, context=context)
section = self._name
stage_pool = self.pool.get('crm.case.stage')
for case in self.browse(cr, uid, ids, context):
if section in s:
st = case.stage_id.id or False
s[section] = dict([(v, k) for (k, v) in s[section].iteritems()])
if st in s[section]:
self.write(cr, uid, [case.id], {'stage_id': s[section][st]})
data = {'stage_id': s[section][st]}
stage = stage_pool.browse(cr, uid, s[section][st], context=context)
if stage.on_change:
data.update({'probability': stage.probability})
self.write(cr, uid, [case.id], data)
return True
def onchange_partner_id(self, cr, uid, ids, part, email=False):
@@ -181,7 +191,8 @@ class crm_case(object):
"""
if not part:
return {'value': {'partner_address_id': False,
'email_from': False,
'email_from': False,
'phone': False
}}
addr = self.pool.get('res.partner').address_get(cr, uid, [part], ['contact'])
data = {'partner_address_id': addr['contact']}
@@ -200,7 +211,7 @@ class crm_case(object):
if not add:
return {'value': {'email_from': False}}
address = self.pool.get('res.partner.address').browse(cr, uid, add)
return {'value': {'email_from': address.email}}
return {'value': {'email_from': address.email, 'phone': address.phone}}
def _history(self, cr, uid, cases, keyword, history=False, subject=None, email=False, details=None, email_from=False, message_id=False, attach=[], context={}):
mailgate_pool = self.pool.get('mailgate.thread')
@@ -541,7 +552,7 @@ class crm_case_resource_type(osv.osv):
_rec_name = "name"
_columns = {
'name': fields.char('Case Resource Type', size=64, required=True, translate=True),
'name': fields.char('Resource Type', size=64, required=True, translate=True),
'section_id': fields.many2one('crm.case.section', 'Sales Team'),
'object_id': fields.many2one('ir.model', 'Object Name'),
}
-13
View File
@@ -5,18 +5,5 @@
<field name="name">Sales Department</field>
<field name="code">Sales</field>
</record>
<record id="ir_cron_crm_action" model="ir.cron">
<field name="name">Check cases rules</field>
<field name="interval_number">4</field>
<field name="interval_type">hours</field>
<field name="numbercall">-1</field>
<field eval="False" name="doall"/>
<field eval="'crm.case'" name="model"/>
<field eval="'_check'" name="function"/>
<field eval="'()'" name="args"/>
</record>
</data>
</openerp>
+134 -4
View File
@@ -27,15 +27,16 @@ import time
import mx.DateTime
from tools.translate import _
from crm import crm_case
import collections
import binascii
import tools
class crm_lead(osv.osv, crm_case):
""" CRM Lead Case """
_name = "crm.lead"
_description = "Lead"
_order = "priority, id desc"
_inherit = ['res.partner.address']
_inherits = {'mailgate.thread': 'thread_id'}
_inherit = ['mailgate.thread','res.partner.address']
def _compute_day(self, cr, uid, ids, fields, args, context={}):
"""
@@ -112,7 +113,6 @@ and users by email"),
'write_date': fields.datetime('Update Date' , readonly=True),
# Lead fields
'thread_id': fields.many2one('mailgate.thread', 'Thread', required=False),
'categ_id': fields.many2one('crm.case.categ', 'Lead Source', \
domain="[('section_id','=',section_id),\
('object_id.model', '=', 'crm.lead')]"),
@@ -120,6 +120,8 @@ and users by email"),
domain="[('section_id','=',section_id),\
('object_id.model', '=', 'crm.lead')]"),
'partner_name': fields.char("Partner Name", size=64),
'optin': fields.selection([('yes','Yes'),('no','No'),('unknown','/')],'Opt-In'),
'optout': fields.selection([('yes','Yes'),('no','No'),('unknown','/')],'Opt-Out'),
'type':fields.selection([
('lead','Lead'),
('opportunity','Opportunity'),
@@ -142,6 +144,8 @@ and users by email"),
\nIf the case is in progress the state is set to \'Open\'.\
\nWhen the case is over, the state is set to \'Done\'.\
\nIf the case needs to be reviewed then the state is set to \'Pending\'.'),
'message_ids': fields.one2many('mailgate.message', 'res_id', 'Messages', domain=[('history', '=', True),('model','=',_name)]),
'log_ids': fields.one2many('mailgate.message', 'res_id', 'Logs', domain=[('history', '=', False),('model','=',_name)]),
}
_defaults = {
@@ -149,6 +153,8 @@ and users by email"),
'user_id': crm_case._get_default_user,
'email_from': crm_case._get_default_email,
'state': lambda *a: 'draft',
'optin': lambda *a: 'unknown',
'optout': lambda *a: 'unknown',
'section_id': crm_case._get_section,
'company_id': lambda s, cr, uid, c: s.pool.get('res.company')._company_default_get(cr, uid, 'crm.lead', context=c),
'priority': lambda *a: crm.AVAILABLE_PRIORITIES[2][0],
@@ -232,6 +238,130 @@ and users by email"),
}
return value
def message_new(self, cr, uid, msg, context):
"""
Automatically calls when new email message arrives
@param self: The object pointer
@param cr: the current row, from the database cursor,
@param uid: the current user’s ID for security checks
"""
mailgate_pool = self.pool.get('email.server.tools')
subject = msg.get('subject')
body = msg.get('body')
msg_from = msg.get('from')
priority = msg.get('priority')
vals = {
'name': subject,
'email_from': msg_from,
'email_cc': msg.get('cc'),
'description': body,
'user_id': False,
}
if msg.get('priority', False):
vals['priority'] = priority
res = mailgate_pool.get_partner(cr, uid, msg.get('from'))
if res:
vals.update(res)
res = self.create(cr, uid, vals, context)
attachents = msg.get('attachments', [])
for attactment in attachents or []:
data_attach = {
'name': attactment,
'datas':binascii.b2a_base64(str(attachents.get(attactment))),
'datas_fname': attactment,
'description': 'Mail attachment',
'res_model': self._name,
'res_id': res,
}
self.pool.get('ir.attachment').create(cr, uid, data_attach)
return res
def message_update(self, cr, uid, ids, vals={}, msg="", default_act='pending', context={}):
"""
@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 update mail’s IDs
"""
if isinstance(ids, (str, int, long)):
ids = [ids]
msg_from = msg['from']
vals.update({
'description': msg['body']
})
if msg.get('priority', False):
vals['priority'] = msg.get('priority')
maps = {
'cost':'planned_cost',
'revenue': 'planned_revenue',
'probability':'probability'
}
vls = { }
for line in msg['body'].split('\n'):
line = line.strip()
res = tools.misc.command_re.match(line)
if res and maps.get(res.group(1).lower(), False):
key = maps.get(res.group(1).lower())
vls[key] = res.group(2).lower()
vals.update(vls)
res = self.write(cr, uid, ids, vals)
return res
def emails_get(self, cr, uid, ids, context=None):
"""
Get Emails
@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 email’s IDs
@param context: A standard dictionary for contextual values
"""
res = {}
if isinstance(ids, (str, int, long)):
select = [long(ids)]
else:
select = ids
for thread in self.browse(cr, uid, select, context=context):
values = collections.defaultdict(set)
for message in thread.message_ids:
user_email = (message.user_id and message.user_id.address_id and message.user_id.address_id.email) or False
values['user_email'].add(user_email)
values['email_from'].add(message.email_from)
values['email_cc'].add(message.email_cc or False)
values['priority'] = thread.priority
res[thread.id] = dict((key,list(values[key])) for key, value in values.iteritems())
return res
def msg_send(self, cr, uid, id, *args, **argv):
""" Send The Message
@param self: The object pointer
@param cr: the current row, from the database cursor,
@param uid: the current user’s ID for security checks,
@param ids: List of email’s IDs
@param *args: Return Tuple Value
@param **args: Return Dictionary of Keyword Value
"""
return True
crm_lead()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+8 -4
View File
@@ -146,6 +146,11 @@
<field name="date_open"/>
<field name="date_closed"/>
</group>
<group colspan="2" col="2">
<separator string="Mailings" colspan="2" col="2"/>
<field name="optin"/>
<field name="optout"/>
</group>
<group colspan="2" col="2">
<separator string="Statistics" colspan="2" col="2"/>
<field name="day_open"/>
@@ -256,12 +261,11 @@
<field name="type">calendar</field>
<field name="priority" eval="2"/>
<field name="arch" type="xml">
<calendar string="Meeting For Leads Generation"
date_start="create_date" color="user_id"
date_delay="duration">
<calendar string="Leads Generation"
date_start="create_date" color="user_id">
<field name="name" />
<field name="partner_name" />
<field name="partner_contact" />
<field name="partner_address_id" />
</calendar>
</field>
</record>
-173
View File
@@ -1,173 +0,0 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import time
import re
import os
import binascii
import mx.DateTime
import base64
from tools.translate import _
import tools
from osv import fields,osv,orm
from osv.orm import except_orm
import collections
from tools import command_re
class mailgate_thread(osv.osv):
""" mailgate_thread """
_name = "mailgate.thread"
_inherit = "mailgate.thread"
def message_new(self, cr, uid, msg, context):
"""
Automatically calls when new email message arrives
@param self: The object pointer
@param cr: the current row, from the database cursor,
@param uid: the current user’s ID for security checks
"""
mailgate_pool = self.pool.get('email.server.tools')
subject = msg.get('subject')
body = msg.get('body')
msg_from = msg.get('from')
priority = msg.get('priority')
vals = {
'name': subject,
'email_from': msg_from,
'email_cc': msg.get('cc'),
'description': body,
'user_id': False,
}
if msg.get('priority', False):
vals['priority'] = priority
res = mailgate_pool.get_partner(cr, uid, msg.get('from'))
if res:
vals.update(res)
res = self.create(cr, uid, vals, context)
cases = self.browse(cr, uid, [res])
self._history(cr, uid, cases, _('Receive'), history=True, details=body, email_from=msg_from, message_id=msg.get('id'))
attachents = msg.get('attachments', [])
for attactment in attachents or []:
data_attach = {
'name': attactment,
'datas':binascii.b2a_base64(str(attachents.get(attactment))),
'datas_fname': attactment,
'description': 'Mail attachment',
'res_model': self._name,
'res_id': res,
}
self.pool.get('ir.attachment').create(cr, uid, data_attach)
return res
def message_update(self, cr, uid, ids, vals={}, msg="", default_act='pending', context={}):
"""
@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 update mail’s IDs
"""
if isinstance(ids, (str, int, long)):
ids = [ids]
msg_from = msg['from']
vals.update({
'description': msg['body']
})
if msg.get('priority', False):
vals['priority'] = msg.get('priority')
maps = {
'cost':'planned_cost',
'revenue': 'planned_revenue',
'probability':'probability'
}
vls = { }
for line in msg['body'].split('\n'):
line = line.strip()
res = command_re.match(line)
if res and maps.get(res.group(1).lower(), False):
key = maps.get(res.group(1).lower())
vls[key] = res.group(2).lower()
vals.update(vls)
res = self.write(cr, uid, ids, vals)
cases = self.browse(cr, uid, ids)
message_id = context.get('references_id', False)
self._history(cr, uid, cases, _('Receive'), history=True, details=msg['body'], email_from=msg_from, message_id=message_id)
#getattr(self, act)(cr, uid, select)
return res
def emails_get(self, cr, uid, ids, context=None):
"""
Get Emails
@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 email’s IDs
@param context: A standard dictionary for contextual values
"""
res = {}
if isinstance(ids, (str, int, long)):
select = [long(ids)]
else:
select = ids
for thread in self.browse(cr, uid, select, context=context):
values = collections.defaultdict(set)
for message in thread.message_ids:
user_email = (message.user_id and message.user_id.address_id and message.user_id.address_id.email) or False
values['user_email'].add(user_email)
values['email_from'].add(message.email_from)
values['email_cc'].add(message.email_cc or False)
res[str(thread.id)] = dict((key,list(values[key])) for key, value in values.iteritems())
return res
def msg_send(self, cr, uid, id, *args, **argv):
""" Send The Message
@param self: The object pointer
@param cr: the current row, from the database cursor,
@param uid: the current user’s ID for security checks,
@param ids: List of email’s IDs
@param *args: Return Tuple Value
@param **args: Return Dictionary of Keyword Value
"""
return True
mailgate_thread()
+12 -12
View File
@@ -43,32 +43,32 @@ class crm_meeting(osv.osv, crm_case):
_name = 'crm.meeting'
_description = "Meeting"
_order = "id desc"
_inherit = ["calendar.event"]
_inherits = {'mailgate.thread': 'thread_id'}
_inherit = ['mailgate.thread',"calendar.event"]
_columns = {
# From crm.case
'name': fields.char('Summary', size=124, required=True),
'partner_id': fields.many2one('res.partner', 'Partner'),
'name': fields.char('Summary', size=124, required=True, states={'done': [('readonly', True)]}),
'partner_id': fields.many2one('res.partner', 'Partner', states={'done': [('readonly', True)]}),
'partner_address_id': fields.many2one('res.partner.address', 'Partner Contact', \
domain="[('partner_id','=',partner_id)]"),
'section_id': fields.many2one('crm.case.section', 'Sales Team', \
domain="[('partner_id','=',partner_id)]", states={'done': [('readonly', True)]}),
'section_id': fields.many2one('crm.case.section', 'Sales Team', states={'done': [('readonly', True)]}, \
select=True, help='Sales team to which Case belongs to.\
Define Responsible user and Email account for mail gateway.'),
'email_from': fields.char('Email', size=128, help="These people will receive email."),
'email_from': fields.char('Email', size=128, states={'done': [('readonly', True)]}, help="These people will receive email."),
'id': fields.integer('ID'),
'create_date': fields.datetime('Creation Date' , readonly=True),
'write_date': fields.datetime('Write Date' , readonly=True),
# Meeting fields
'thread_id': fields.many2one('mailgate.thread', 'Thread', required=False),
'categ_id': fields.many2one('crm.case.categ', 'Meeting Type', \
domain="[('object_id.model', '=', 'crm.meeting')]", \
),
'phonecall_id': fields.many2one ('crm.phonecall', 'Phonecall'),
'opportunity_id': fields.many2one ('crm.lead', 'Opportunity', domain="[('type', '=', 'opportunity')]"),
'attendee_ids': fields.many2many('calendar.attendee', 'meeting_attendee_rel',\
'event_id', 'attendee_id', 'Attendees'),
'event_id', 'attendee_id', 'Attendees', states={'done': [('readonly', True)]}),
'date_closed': fields.datetime('Closed', readonly=True),
'date_deadline': fields.datetime('Deadline'),
'date_deadline': fields.datetime('Deadline', states={'done': [('readonly', True)]}),
'message_ids': fields.one2many('mailgate.message', 'res_id', 'Messages', domain=[('history', '=', True),('model','=',_name)]),
'log_ids': fields.one2many('mailgate.message', 'res_id', 'Logs', domain=[('history', '=', False),('model','=',_name)]),
'state': fields.selection([('open', 'Confirmed'),
('draft', 'Unconfirmed'),
('cancel', 'Cancelled'),
+34 -2
View File
@@ -148,6 +148,7 @@
<button string="Invite People"
name="%(base_calendar.action_view_calendar_invite_attendee_wizard)d"
icon="terp-partner" type="action"
attrs="{'readonly': [('state', '=', 'done')]}"
context="{'model' : 'crm.meeting', 'attendee_field':'attendee_ids'}" colspan="2"/>
<field name="attendee_ids" colspan="4"
nolabel="1" widget="one2many" mode="tree,form">
@@ -214,10 +215,27 @@
<tree string="Meetings"
colors="red:state=='open';black:state in ('draft', 'cancel','done','pending')">
<field name="name" string="Subject" />
<field name="partner_id" string="Partner" />
<field name="date" string="Meeting Date" />
<field name="date" string="Start Date" />
<field name="duration" />
<field name="partner_id" string="Partner" />
<field name="location" />
<field name="categ_id" string="Meeting Type"/>
<field name="class" string="Privacy"/>
<field name="state"/>
<field name="user_id" invisible="1"/>
<field name="show_as" invisible="1" string="Show time as"/>
<button name="case_reset" string="Reset to Unconfirmed"
states="open,done,cancel" type="object"
icon="gtk-convert" />
<button name="case_open" string="Confirm"
states="draft" type="object"
icon="gtk-go-forward" />
<button name="case_close" string="Done"
states="open" type="object"
icon="gtk-jump-to" />
<button name="case_cancel" string="Cancel"
states="draft,open" type="object"
icon="gtk-cancel" />
</tree>
</field>
</record>
@@ -268,6 +286,10 @@
help="Current Meetings"/>
<separator orientation="vertical"/>
<field name="name" select="1" string="Subject"/>
<field name="categ_id" select="1"
string="Meeting Type" widget="selection"
domain="[('object_id.model', '=', 'crm.meeting')]" />
<separator orientation="vertical"/>
<field name="partner_id" select="1" />
<field name="section_id" select="1" widget="selection">
<filter icon="terp-personal+"
@@ -282,16 +304,26 @@
domain="[]" context="{'group_by':'date'}" />
<filter string="Privacy" icon="terp-locked"
domain="[]" context="{'group_by':'class'}" />
<filter string="Show time as" icon="terp-project"
domain="[]" context="{'group_by':'show_as'}" />
<separator orientation="vertical" />
<filter string="Responsible" icon="terp-personal" domain="[]"
context="{'group_by':'user_id'}" />
<filter string="Partner" icon="terp-personal" domain="[]"
context="{'group_by':'partner_id'}" />
<separator orientation="vertical" />
<filter string="Meeting Type" help="Meeting Type"
icon="terp-stock_symbol-selection" domain="[]"
context="{'group_by':'categ_id'}" />
<filter string="State" icon="terp-stock_effects-object-colorize" domain="[]"
context="{'group_by':'state'}" />
<separator orientation="vertical" />
</group>
<newline/>
<group expand="0" string="Extended Options...">
<field name="class" select="1" string="Privacy"/>
<field name="show_as" string="Show time as" select="1"/>
</group>
</search>
</field>
</record>
+2 -1
View File
@@ -143,9 +143,10 @@ class crm_opportunity(osv.osv):
context = {
'default_opportunity_id': opp.id,
'default_partner_id': opp.partner_id and opp.partner_id.id or False,
'default_user_id': uid,
'default_section_id': opp.section_id and opp.section_id.id or False,
'default_email_from': opp.email_from,
'default_state': 'open',
'default_state': 'open',
'default_name': opp.name
}
value = {
+3 -3
View File
@@ -7,9 +7,9 @@
name="Phone calls"
res_model="crm.phonecall"
src_model="crm.lead"
view_mode="calendar,tree,form"
view_mode="tree,calendar,form"
context="{'default_duration': 1.0 ,'default_opportunity_id': active_id}"
domain="[('user_id','=',uid),('opportunity_id', '=', active_id)]"
domain="[('opportunity_id', '=', active_id)]"
view_type="form"/>
<act_window
@@ -19,7 +19,7 @@
src_model="crm.lead"
view_mode="tree,form,calendar,"
context="{'default_duration': 4.0, 'default_opportunity_id': active_id}"
domain="[('user_id','=',uid), ('opportunity_id', '=', active_id)]"
domain="[('opportunity_id', '=', active_id)]"
view_type="form"/>
<record model="ir.actions.act_window" id="crm_case_category_act_oppor11">
+9 -5
View File
@@ -258,6 +258,8 @@
<field name="section_id"
invisible="context.get('invisible_section', True)" />
<field name="user_id"/>
<field name="priority" invisible="1"/>
<field name="categ_id" invisible="1"/>
<field name="state"/>
<button name="case_open" string="Open"
states="draft,pending" type="object"
@@ -299,14 +301,14 @@
<field name="arch" type="xml">
<search string="Search Opportunities">
<filter icon="terp-check"
string="Current"
string="Current" help="Current Opportunities"
name="current"
domain="[('state','in',('draft','open'))]"/>
<filter icon="terp-camera_test"
string="Open"
string="Open" help="Open Opportunities"
domain="[('state','=','open')]"/>
<filter icon="terp-gtk-media-pause"
string="Pending"
string="Pending" help="Pending Opportunities"
domain="[('state','=','pending')]"/>
<separator orientation="vertical"/>
<filter icon="terp-go-today" string="Today"
@@ -352,8 +354,10 @@
<separator orientation="vertical" />
<filter string="Creation" icon="terp-go-month"
domain="[]" context="{'group_by':'create_date'}" />
<filter string="Exp.Closing" icon="terp-go-month"
domain="[]" context="{'group_by':'date_deadline'}" />
<filter string="Exp.Closing"
icon="terp-go-month"
help="Expected Closing" domain="[]"
context="{'group_by':'date_deadline'}" />
</group>
</search>
</field>
+3 -3
View File
@@ -31,13 +31,11 @@ class crm_phonecall(osv.osv, crm_case):
_name = "crm.phonecall"
_description = "Phonecall"
_order = "id desc"
_inherits = {'mailgate.thread': 'thread_id'}
_inherit = ['mailgate.thread']
_columns = {
# From crm.case
'name': fields.char('Name', size=64),
'active': fields.boolean('Active', required=False),
'thread_id': fields.many2one('mailgate.thread', 'Thread', required=False),
'date_action_last': fields.datetime('Last Action', readonly=1),
'date_action_next': fields.datetime('Next Action', readonly=1),
'create_date': fields.datetime('Creation Date' , readonly=True),
@@ -84,6 +82,8 @@ class crm_phonecall(osv.osv, crm_case):
'date_closed': fields.datetime('Closed', readonly=True),
'date': fields.datetime('Date'),
'opportunity_id': fields.many2one ('crm.lead', 'Opportunity'),
'message_ids': fields.one2many('mailgate.message', 'res_id', 'Messages', domain=[('history', '=', True),('model','=',_name)]),
'log_ids': fields.one2many('mailgate.message', 'res_id', 'Logs', domain=[('history', '=', False),('model','=',_name)]),
}
_defaults = {
+6
View File
@@ -18,6 +18,7 @@
<field name="categ_id" ref="crm.categ_phone1"/>
<field name="stage_id" ref="crm.stage_phone1"/>
<field eval="&quot;(769) 703-274&quot;" name="partner_phone"/>
<field eval="2.3" name="duration"/>
</record>
<record id="crm_case_phone02" model="crm.phonecall">
<field name="partner_address_id" ref="base.res_partner_address_6"/>
@@ -33,6 +34,7 @@
<field name="categ_id" ref="crm.categ_phone1"/>
<field name="stage_id" ref="crm.stage_phone2"/>
<field eval="&quot;(956) 293-2595&quot;" name="partner_phone"/>
<field eval="1.5" name="duration"/>
</record>
<record id="crm_case_phone03" model="crm.phonecall">
<field name="partner_address_id" ref="base.res_partner_address_2"/>
@@ -49,6 +51,7 @@
<field name="stage_id" ref="crm.stage_phone3"/>
<field eval="&quot;(079) 681-2139&quot;" name="partner_phone"/>
<field eval="&quot;contact@tecsas.fr&quot;" name="email_from"/>
<field eval="5.0" name="duration"/>
</record>
<record id="crm_case_phone04" model="crm.phonecall">
<field eval="time.strftime('%Y-%m-21 14:10:23')" name="date"/>
@@ -63,6 +66,7 @@
<field name="categ_id" ref="crm.categ_phone2"/>
<field name="stage_id" ref="crm.stage_phone1"/>
<field eval="&quot;(514) 698-4118&quot;" name="partner_phone"/>
<field eval="3.45" name="duration"/>
</record>
<record id="crm_case_phone05" model="crm.phonecall">
<field name="partner_address_id" ref="base.res_partner_address_10"/>
@@ -78,6 +82,7 @@
<field name="categ_id" ref="crm.categ_phone2"/>
<field name="stage_id" ref="crm.stage_phone2"/>
<field eval="&quot;(855) 924-4364&quot;" name="partner_phone"/>
<field eval="2.08" name="duration"/>
</record>
<record id="crm_case_phone06" model="crm.phonecall">
<field name="partner_address_id" ref="base.res_partner_address_1"/>
@@ -94,6 +99,7 @@
<field name="stage_id" ref="crm.stage_phone3"/>
<field eval="&quot;(373) 907-1009&quot;" name="partner_phone"/>
<field eval="&quot;info@opensides.be&quot;" name="email_from"/>
<field eval="8.56" name="duration"/>
</record>
</data>
</openerp>
+10
View File
@@ -12,6 +12,16 @@
domain="[('partner_id', '=', active_id)]"
groups="base.group_extended"
/>
<act_window
id="act_crm_phonecall_crm_meeting_new"
name="Meetings"
res_model="crm.meeting"
src_model="crm.phonecall"
view_mode="tree,form,calendar,"
context="{'default_duration': 4.0, 'default_phonecall_id': active_id}"
domain="[('phonecall_id', '=', active_id)]"
view_type="form"/>
<!-- PHONE CALLS (menu) -->
+6 -7
View File
@@ -118,9 +118,6 @@
<separator colspan="4" />
<group col="8" colspan="4">
<field name="state" select="1" />
<button name="case_cancel" string="Cancel"
states="draft,open,pending" type="object"
icon="gtk-cancel" />
<button name="case_open" string="Open"
states="draft,pending" type="object"
icon="gtk-go-forward" />
@@ -132,6 +129,9 @@
<button name="case_reset" string="Reset to Draft"
states="done,cancel" type="object"
icon="gtk-convert" />
<button name="case_cancel" string="Cancel"
states="draft,open,pending" type="object"
icon="gtk-cancel" />
</group>
</form>
</field>
@@ -146,8 +146,8 @@
<field name="arch" type="xml">
<form string="Phone Call">
<group colspan="4" col="7">
<field name="name" string="Summary"/>
<field name="date" string="Planned Date"/>
<field name="name" string="Summary" required="1"/>
<field name="date" string="Planned Date" required="1"/>
<field name="user_id"/>
<button string="Schedule a Meeting"
name="action_make_meeting"
@@ -181,8 +181,6 @@
<field name="partner_address_id" string="Contact"
on_change="onchange_partner_address_id(partner_address_id, email_from)" />
<newline/>
<field name="partner_phone" />
<newline/>
<field name="partner_mobile" />
</group>
<group col="2" colspan="2">
@@ -212,6 +210,7 @@
<field name="partner_phone"/>
<field name="user_id"/>
<field name="state" invisible="1"/>
<field name="create_date" invisible="1"/>
<button string="Opportunity"
name="%(phonecall2opportunity_act)d"
states="draft,open,pending"
+1 -1
View File
@@ -14,7 +14,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-06-24 03:46+0000\n"
"X-Launchpad-Export-Date: 2010-06-25 03:46+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
#. module: crm
@@ -1,91 +1,87 @@
<?xml version="1.0" ?>
<openerp>
<data>
<data>
<!--
Process
-->
<!--
Process
-->
<record id="process_process_contractprocess0" model="process.process">
<field eval="1" name="active"/>
<field name="model_id" ref="mail_gateway.model_mailgate_thread"/>
<field eval="&quot;&quot;&quot;Contract&quot;&quot;&quot;" name="name"/>
</record>
<field eval="1" name="active"/>
<field eval="&quot;&quot;&quot;Contract&quot;&quot;&quot;" name="name"/>
</record>
<!--
Process Node
-->
<!--
Process Node
-->
<record id="process_node_leads0" model="process.node">
<field name="model_id" ref="mail_gateway.model_mailgate_thread"/>
<field eval="&quot;&quot;&quot;state&quot;&quot;&quot;" name="kind"/>
<field eval="&quot;&quot;&quot;Leads&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Very first contact with new prospect&quot;&quot;&quot;" name="note"/>
<field name="process_id" ref="process_process_contractprocess0"/>
<field eval="&quot;&quot;&quot;object.state in ('draft', 'open', 'pending', 'done', 'cancel')&quot;&quot;&quot;" name="model_states"/>
<field eval="1" name="flow_start"/>
</record>
<record id="process_node_leads0" model="process.node">
<field eval="&quot;&quot;&quot;state&quot;&quot;&quot;" name="kind"/>
<field eval="&quot;&quot;&quot;Leads&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Very first contact with new prospect&quot;&quot;&quot;" name="note"/>
<field name="process_id" ref="process_process_contractprocess0"/>
<field eval="&quot;&quot;&quot;object.state in ('draft', 'open', 'pending', 'done', 'cancel')&quot;&quot;&quot;" name="model_states"/>
<field eval="1" name="flow_start"/>
</record>
<record id="process_node_partner0" model="process.node">
<field name="menu_id" ref="base.menu_partner_form"/>
<field name="model_id" ref="base.model_res_partner"/>
<field eval="&quot;&quot;&quot;state&quot;&quot;&quot;" name="kind"/>
<field eval="&quot;&quot;&quot;Partner&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Convert to prospect to business partner&quot;&quot;&quot;" name="note"/>
<field name="process_id" ref="process_process_contractprocess0"/>
<field eval="0" name="flow_start"/>
</record>
<record id="process_node_partner0" model="process.node">
<field name="menu_id" ref="base.menu_partner_form"/>
<field name="model_id" ref="base.model_res_partner"/>
<field eval="&quot;&quot;&quot;state&quot;&quot;&quot;" name="kind"/>
<field eval="&quot;&quot;&quot;Partner&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Convert to prospect to business partner&quot;&quot;&quot;" name="note"/>
<field name="process_id" ref="process_process_contractprocess0"/>
<field eval="0" name="flow_start"/>
</record>
<record id="process_node_opportunities0" model="process.node">
<field name="model_id" ref="mail_gateway.model_mailgate_thread"/>
<field eval="&quot;&quot;&quot;state&quot;&quot;&quot;" name="kind"/>
<field eval="&quot;&quot;&quot;Opportunities&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;When a real project/opportunity is detected&quot;&quot;&quot;" name="note"/>
<field name="process_id" ref="process_process_contractprocess0"/>
<field eval="&quot;&quot;&quot;object.state in ('draft', 'open', 'pending', 'done', 'cancel')&quot;&quot;&quot;" name="model_states"/>
<field eval="0" name="flow_start"/>
</record>
<record id="process_node_opportunities0" model="process.node">
<field eval="&quot;&quot;&quot;state&quot;&quot;&quot;" name="kind"/>
<field eval="&quot;&quot;&quot;Opportunities&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;When a real project/opportunity is detected&quot;&quot;&quot;" name="note"/>
<field name="process_id" ref="process_process_contractprocess0"/>
<field eval="&quot;&quot;&quot;object.state in ('draft', 'open', 'pending', 'done', 'cancel')&quot;&quot;&quot;" name="model_states"/>
<field eval="0" name="flow_start"/>
</record>
<record id="process_node_meeting0" model="process.node">
<field name="model_id" ref="mail_gateway.model_mailgate_thread"/>
<field eval="&quot;&quot;&quot;state&quot;&quot;&quot;" name="kind"/>
<field eval="&quot;&quot;&quot;Meeting&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Schedule a normal or phone meeting&quot;&quot;&quot;" name="note"/>
<field name="process_id" ref="process_process_contractprocess0"/>
<field eval="&quot;&quot;&quot;object.state in ('draft', 'open', 'pending', 'done', 'cancel')&quot;&quot;&quot;" name="model_states"/>
<field eval="0" name="flow_start"/>
</record>
<record id="process_node_meeting0" model="process.node">
<field eval="&quot;&quot;&quot;state&quot;&quot;&quot;" name="kind"/>
<field eval="&quot;&quot;&quot;Meeting&quot;&quot;&quot;" name="name"/>
<field eval="&quot;&quot;&quot;Schedule a normal or phone meeting&quot;&quot;&quot;" name="note"/>
<field name="process_id" ref="process_process_contractprocess0"/>
<field eval="&quot;&quot;&quot;object.state in ('draft', 'open', 'pending', 'done', 'cancel')&quot;&quot;&quot;" name="model_states"/>
<field eval="0" name="flow_start"/>
</record>
<!--
Process Transition
-->
<!--
Process Transition
-->
<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"/>
<field model="process.node" name="target_node_id" ref="process_node_opportunities0"/>
<field model="process.node" name="source_node_id" ref="process_node_leads0"/>
</record>
<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"/>
<field model="process.node" name="target_node_id" ref="process_node_opportunities0"/>
<field model="process.node" name="source_node_id" ref="process_node_leads0"/>
</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"/>
<field model="process.node" name="target_node_id" ref="process_node_partner0"/>
<field model="process.node" name="source_node_id" ref="process_node_leads0"/>
</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"/>
<field model="process.node" name="target_node_id" ref="process_node_partner0"/>
<field model="process.node" name="source_node_id" ref="process_node_leads0"/>
</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"/>
<field model="process.node" name="target_node_id" ref="process_node_meeting0"/>
<field model="process.node" name="source_node_id" ref="process_node_opportunities0"/>
</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"/>
<field model="process.node" name="target_node_id" ref="process_node_meeting0"/>
<field model="process.node" name="source_node_id" ref="process_node_opportunities0"/>
</record>
</data>
</openerp>
</data>
</openerp>
+1 -2
View File
@@ -109,7 +109,6 @@ class crm_lead_report(osv.osv):
'date_closed': fields.date('Close Date', readonly=True),
'company_id': fields.many2one('res.company', 'Company', readonly=True),
'priority': fields.selection(crm.AVAILABLE_PRIORITIES, 'Priority'),
'type':fields.selection([
('lead','Lead'),
('opportunity','Opportunity'),
@@ -148,7 +147,7 @@ class crm_lead_report(osv.osv):
0 as avg_answers,
0.0 as perc_done,
0.0 as perc_cancel,
(select count(id) from mailgate_message where thread_id=c.id) as email,
(select count(id) from mailgate_message where res_id=c.id and model='crm.lead') as email,
date_trunc('day',c.create_date) as create_date,
avg(extract('epoch' from (c.date_closed-c.create_date)))/(3600*24) as delay_close,
avg(extract('epoch' from (c.date_deadline - c.date_closed)))/(3600*24) as delay_expected,
+1 -2
View File
@@ -30,9 +30,8 @@
"access_crm_lead2opportunity_partner","crm.lead2opportunity.partner","model_crm_lead2opportunity_partner","crm.group_crm_user",1,1,1,1
"access_crm_installer","crm.installer.rule","model_crm_installer","base.group_system",1,1,1,1
"access_crm_lead_forward_to_partner","crm.lead.forward.to.partner","model_crm_lead_forward_to_partner","crm.group_crm_user",1,1,1,1
"access_mailgate_thread","mailgate.thread","model_mailgate_thread","crm.group_crm_user",1,1,1,1
"access_res_partner","res.partner.crm.user","base.model_res_partner","crm.group_crm_user",1,0,0,0
"access_res_partner_address","res.partner.address.crm.user","base.model_res_partner_address","crm.group_crm_user",1,0,0,0
"access_res_partner_category","res.partner.category.crm.user","base.model_res_partner_category","crm.group_crm_user",1,0,0,0
"mail_gateway_mailgate_message","mail_gateway.mailgate.message","mail_gateway.model_mailgate_message","crm.group_crm_user",1,1,1,1
"mail_gateway_mailgate_thread","mail_gateway.mailgate.thread","model_mailgate_thread","crm.group_crm_user",1,1,1,1
"mail_gateway_mailgate_thread","mail_gateway.mailgate.thread","mail_gateway.model_mailgate_thread","crm.group_crm_user",1,1,1,1
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
30 access_crm_lead2opportunity_partner crm.lead2opportunity.partner model_crm_lead2opportunity_partner crm.group_crm_user 1 1 1 1
31 access_crm_installer crm.installer.rule model_crm_installer base.group_system 1 1 1 1
32 access_crm_lead_forward_to_partner crm.lead.forward.to.partner model_crm_lead_forward_to_partner crm.group_crm_user 1 1 1 1
access_mailgate_thread mailgate.thread model_mailgate_thread crm.group_crm_user 1 1 1 1
33 access_res_partner res.partner.crm.user base.model_res_partner crm.group_crm_user 1 0 0 0
34 access_res_partner_address res.partner.address.crm.user base.model_res_partner_address crm.group_crm_user 1 0 0 0
35 access_res_partner_category res.partner.category.crm.user base.model_res_partner_category crm.group_crm_user 1 0 0 0
36 mail_gateway_mailgate_message mail_gateway.mailgate.message mail_gateway.model_mailgate_message crm.group_crm_user 1 1 1 1
37 mail_gateway_mailgate_thread mail_gateway.mailgate.thread model_mailgate_thread mail_gateway.model_mailgate_thread crm.group_crm_user 1 1 1 1
+11 -18
View File
@@ -183,25 +183,18 @@ class crm_lead_forward_to_partner(osv.osv_memory):
emails = [this.email_to]
body = case_pool.format_body(this.message)
email_from = this.email_from or False
case_pool._history(cr, uid, [case], _('Forward'), history=True, email=this.email_to, details=body, email_from=email_from)
flag = False
if case.section_id and case.section_id.server_id:
flag = smtp_pool.send_email(
cr=cr,
uid=uid,
server_id=case.section_id.server_id.id,
emailto=emails,
subject=this.subject,
body="<pre>%s</pre>" % body,
)
else:
flag = tools.email_send(
email_from,
emails,
this.subject,
body,
)
flag = tools.email_send(
email_from,
emails,
this.subject,
body,
)
if flag:
case_pool._history(cr, uid, [case], _('Forward'), history=True, email=this.email_to, subject=this.subject, details=body, email_from=email_from)
if not flag:
raise osv.except_osv(_('Error!'), _('Unable to send mail. Please check SMTP is configured properly.'))
if this.add_cc:
case_pool.write(cr, uid, case.id, {'email_cc' : case.email_cc and case.email_cc + ', ' + this.email_to or this.email_to})
return {}
@@ -210,7 +203,7 @@ class crm_lead_forward_to_partner(osv.osv_memory):
message = []
lead_proxy = self.pool.get('crm.lead')
lead = lead_proxy.browse(cr, uid, lead_id, context=context)
if lead.type == 'lead':
if not lead.type or lead.type == 'lead':
field_names = [
'partner_name', 'title', 'function', 'street', 'street2',
'zip', 'city', 'country_id', 'state_id', 'email_from',
@@ -9,13 +9,15 @@
<field name="model">crm.opportunity2phonecall</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Schedule Other Call">
<form string="Schedule a PhoneCall">
<separator string="Schedule a PhoneCall" colspan="4"/>
<group colspan="2" >
<field name="name"/>
<field name="date" string="Planned Date"/>
<newline/>
<field name="user_id" />
<field name="section_id"/>
<separator string="" colspan="4"/>
<label string ="" colspan="2"/>
<button name="action_cancel" string="_Cancel"
icon="gtk-cancel" special="cancel" />
@@ -85,11 +85,19 @@ Call Could not convert into Opportunity"))
id3 = data_obj.browse(cr, uid, id3, context=context).res_id
for this in self.browse(cr, uid, ids, context=context):
address = None
if this.partner_id:
address_id = self.pool.get('res.partner').address_get(cr, uid, [this.partner_id.id])
if address_id:
address = self.pool.get('res.partner.address').browse(cr, uid, address_id['default'], context=context)
new_opportunity_id = opp_obj.create(cr, uid, {
'name': this.name,
'planned_revenue': this.planned_revenue,
'probability': this.probability,
'partner_id': this.partner_id and this.partner_id.id or False,
'partner_address_id': address and address.id,
'phone': address and address.phone,
'mobile': address and address.mobile,
'section_id': case.section_id and case.section_id.id or False,
'description': case.description or False,
'phonecall_id': case.id,
@@ -94,6 +94,7 @@ class crm_phonecall2phonecall(osv.osv_memory):
'views': [(id2, 'form'), (id3, 'tree'), (False, 'calendar'), (False, 'graph')],
'type': 'ir.actions.act_window',
'res_id': phonecall_id,
'domain': [('id', 'in', [int(phonecall_id)])],
'search_view_id': res['res_id']
}
return res
+19 -16
View File
@@ -23,6 +23,7 @@
from osv import osv, fields
from tools.translate import _
import base64
import time
import tools
from crm import crm
@@ -96,27 +97,23 @@ class crm_send_new_email(osv.osv_memory):
else:
hist = hist_obj.browse(cr, uid, res_id)
message_id = hist.message_id
model = hist.model_id.model
model = hist.model
model_pool = self.pool.get(model)
res_ids = model_pool.search(cr, uid, [('thread_id','=', hist.thread_id.id)])
res_id = res_ids and res_ids[0] or False
case = model_pool.browse(cr, uid, res_id)
emails = [obj.email_to] + (obj.email_cc or '').split(',')
emails = [obj.email_to]
email_cc = (obj.email_cc or '').split(',')
emails = filter(None, emails)
body = obj.text
body = case_pool.format_body(body)
email_from = getattr(obj, 'email_from', False)
case_pool._history(cr, uid, [case], _('Send'), history=True, \
email=obj.email_to, details=body, \
subject=obj.subject, email_from=email_from, \
message_id=message_id, attach=attach)
x_headers = dict()
#x_headers = {
# 'Reply-To':"%s" % case.section_id.reply_to,
#}
x_headers = {
'model': model,
'resource-id': res_id
}
if message_id:
x_headers['References'] = "%s" % (message_id)
@@ -127,13 +124,19 @@ class crm_send_new_email(osv.osv_memory):
emails,
obj.subject,
body,
email_cc=email_cc,
attach=attach,
reply_to=case.section_id.reply_to,
reply_to=case.section_id and case.section_id.reply_to or email_from,
openobject_id=str(case.id),
x_headers=x_headers
)
if not flag:
raise osv.except_osv(_('Error!'), _('Unable to send mail. Please check SMTP is configured properly.'))
if flag:
case_pool._history(cr, uid, [case], _('Send'), history=True, \
email=obj.email_to, details=body, \
subject=obj.subject, email_from=email_from, \
message_id=message_id, attach=attach)
if obj.state == 'unchanged':
pass
elif obj.state == 'done':
@@ -196,7 +199,7 @@ class crm_send_new_email(osv.osv_memory):
include_original = context and context.get('include_original', False) or False
res = {}
for hist in hist_obj.browse(cr, uid, res_ids, context=context):
model = hist.model_id.model
model = hist.model
# In the case where the crm.case does not exist in the database
if not model:
@@ -225,10 +228,10 @@ class crm_send_new_email(osv.osv_memory):
original = [header, sender, to, sentdate, desc, signature]
res['text']= '\n'.join(original)
res['text']= '\n\n\n' + '\n'.join(original)
if 'subject' in fields:
res.update({'subject': '[%s] %s' %(str(case.id), case.name or '')})
res.update({'subject': 'Re: %s' %(hist.name or '')})
if 'state' in fields:
res['state']='pending'
return res
+8 -6
View File
@@ -9,13 +9,15 @@
<field name="model">crm.send.mail</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Send New Mail" col="2">
<separator string="Send New Mail" colspan="2"/>
<form string="Send New Mail" col="4">
<separator string="Send New Mail" colspan="4"/>
<group colspan="4" col="6">
<field name="email_from" />
<field name="email_to" />
<field name="email_cc" />
<field name="subject" />
<notebook colspan="2">
<field name="subject" colspan="6"/>
</group>
<notebook colspan="6">
<page string="Message">
<field name="text" nolabel="1" colspan="4"/>
</page>
@@ -31,8 +33,8 @@
</field>
</page>
</notebook>
<separator string="" colspan="2"/>
<group colspan="2" col="4" >
<separator string="" colspan="6"/>
<group colspan="6" col="4" >
<field name="state" />
<button name="action_cancel" string="_Cancel" icon="gtk-cancel" special="cancel" />
<button name="action_send" type="object" string="_Send" icon="gtk-go-forward" />
+41 -4
View File
@@ -21,7 +21,7 @@
from osv import fields, osv
from crm import crm
import time
class crm_claim(osv.osv, crm.crm_case):
"""
Crm claim
@@ -29,10 +29,8 @@ class crm_claim(osv.osv, crm.crm_case):
_name = "crm.claim"
_description = "Claim Cases"
_order = "id desc"
_inherits = {'mailgate.thread': 'thread_id'}
_inherit = ['mailgate.thread']
_columns = {
'thread_id': fields.many2one('mailgate.thread', 'Thread', required=False),
'id': fields.integer('ID', readonly=True),
'name': fields.char('Name', size=128, required=True),
'active': fields.boolean('Active', required=False),
@@ -90,6 +88,8 @@ class crm_claim(osv.osv, crm.crm_case):
\nIf the case is in progress the state is set to \'Open\'.\
\nWhen the case is over, the state is set to \'Done\'.\
\nIf the case needs to be reviewed then the state is set to \'Pending\'.'),
'message_ids': fields.one2many('mailgate.message', 'res_id', 'Messages', domain=[('history', '=', True),('model','=',_name)]),
'log_ids': fields.one2many('mailgate.message', 'res_id', 'Logs', domain=[('history', '=', False),('model','=',_name)]),
}
_defaults = {
@@ -100,9 +100,46 @@ class crm_claim(osv.osv, crm.crm_case):
'email_from':crm.crm_case. _get_default_email,
'state': lambda *a: 'draft',
'section_id':crm.crm_case. _get_section,
'date': lambda *a: time.strftime('%Y-%m-%d %H:%M:%S'),
'company_id': lambda s, cr, uid, c: s.pool.get('res.company')._company_default_get(cr, uid, 'crm.case', context=c),
'priority': lambda *a: crm.AVAILABLE_PRIORITIES[2][0],
}
def onchange_partner_id(self, cr, uid, ids, part, email=False):
"""This function returns value of partner address based on partner
@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 part: Partner's id
@email: Partner's email ID
"""
if not part:
return {'value': {'partner_address_id': False,
'email_from': False,
'partner_phone': False,
'partner_mobile': False
}}
addr = self.pool.get('res.partner').address_get(cr, uid, [part], ['contact'])
data = {'partner_address_id': addr['contact']}
data.update(self.onchange_partner_address_id(cr, uid, ids, addr['contact'])['value'])
print data
return {'value': data}
def onchange_partner_address_id(self, cr, uid, ids, add, email=False):
"""This function returns value of partner email based on Partner Address
@param self: The object pointer
@param cr: the current row, from the database cursor,
@param uid: the current user’s ID for security checks,
@param ids: List of case IDs
@param add: Id of Partner's address
@email: Partner's email ID
"""
if not add:
return {'value': {'email_from': False}}
address = self.pool.get('res.partner.address').browse(cr, uid, add)
return {'value': {'email_from': address.email, 'partner_phone': address.phone, 'partner_mobile': address.mobile}}
crm_claim()
+36 -9
View File
@@ -58,7 +58,6 @@
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Claims" colors="blue:state=='pending';black:state=='open';grey:state in ('close', 'cancel')">
<field name="id"/>
<field name="name"/>
<field name="partner_id"/>
<field name="user_id" />
@@ -67,6 +66,8 @@
<field name="date_deadline" string="Deadline"/>
<field name="date_closed" string="Closure Date"/>
<field name="categ_id" string="Type" select="1"/>
<field name="stage_id" invisible="1"/>
<field name="som" invisible="1"/>
<field name="state"/>
<button name="case_open" string="Open"
states="draft,pending" type="object"
@@ -123,8 +124,9 @@
<field name="user_id" string="Responsible"/>
<field name="section_id" widget="selection"/>
<label string="Stage: " align="1.0"/>
<group colspan="1" col="2">
<group colspan="1" col="3">
<field name="stage_id" select="1" nolabel="1"/>
<button name="stage_previous" string="" type="object" icon="gtk-go-back" />
<button icon="gtk-go-forward" string="" name="stage_next" type="object"/>
</group>
<field name="categ_id" select="1" widget="selection"
@@ -143,18 +145,18 @@
<separator colspan="4" string=""/>
<group col="8" colspan="4">
<field name="state" select="1"/>
<button name="case_close" string="Done"
states="open,draft,pending" type="object"
icon="gtk-jump-to" />
<button name="case_open" string="Open"
states="draft,pending" type="object"
icon="gtk-go-forward" />
<button name="case_cancel" string="Cancel"
states="draft,open,pending" type="object"
icon="gtk-cancel" />
<button name="case_pending" string="Pending"
states="draft,open" type="object"
icon="gtk-media-pause" />
<button name="case_close" string="Done"
states="open,draft,pending" type="object"
icon="gtk-jump-to" />
<button name="case_cancel" string="Cancel"
states="draft,open,pending" type="object"
icon="gtk-cancel" />
<button name="case_reset"
string="Reset to Draft" states="done,cancel"
type="object" icon="gtk-convert" />
@@ -291,12 +293,37 @@
widget="selection"/>
<newline/>
<group expand="0" string="Group By...">
<filter string="Partner" icon="terp-partner"
domain="[]" help="Partner"
context="{'group_by':'partner_id'}" />
<filter string="Responsible" icon="terp-personal"
domain="[]" help="Responsible User"
context="{'group_by':'user_id'}" />
<filter string="Sales Team" icon="terp-personal+"
domain="[]" help="Sales Team"
context="{'group_by':'section_id'}" />
<separator orientation="vertical"/>
<filter string="Stage" icon="terp-stage"
domain="[]" context="{'group_by':'stage_id'}" />
<filter string="Type" icon="terp-stock_symbol-selection"
domain="[]" context="{'group_by':'categ_id'}" />
<filter string="State"
icon="terp-stock_effects-object-colorize"
domain="[]" context="{'group_by':'state'}" />
<separator orientation="vertical"/>
<filter string="Claim Date" icon="terp-go-month"
domain="[]" help="Claim Date"
context="{'group_by':'date'}" />
<filter string="Deadline" icon="terp-go-month"
domain="[]"
context="{'group_by':'date_deadline'}" />
<filter string="Closure" icon="terp-go-month"
domain="[]"
domain="[]" help="Date Closed"
context="{'group_by':'date_closed'}" />
<separator orientation="vertical"/>
<filter string="State of Mind"
icon="terp-face-plain"
domain="[]" context="{'group_by':'som'}" />
</group>
</search>
</field>
+3 -3
View File
@@ -28,10 +28,8 @@ class crm_fundraising(osv.osv, crm.crm_case):
_name = "crm.fundraising"
_description = "Fund Raising Cases"
_order = "id desc"
_inherits = {'mailgate.thread': 'thread_id'}
_inherit = ['mailgate.thread']
_columns = {
'thread_id': fields.many2one('mailgate.thread', 'Thread', required=False),
'id': fields.integer('ID'),
'name': fields.char('Name', size=128, required=True),
'active': fields.boolean('Active', required=False),
@@ -87,6 +85,8 @@ class crm_fundraising(osv.osv, crm.crm_case):
\nIf the case is in progress the state is set to \'Open\'.\
\nWhen the case is over, the state is set to \'Done\'.\
\nIf the case needs to be reviewed then the state is set to \'Pending\'.'),
'message_ids': fields.one2many('mailgate.message', 'res_id', 'Messages', domain=[('history', '=', True),('model','=',_name)]),
'log_ids': fields.one2many('mailgate.message', 'res_id', 'Logs', domain=[('history', '=', False),('model','=',_name)]),
}
_defaults = {
+20 -14
View File
@@ -72,21 +72,21 @@
<field name="user_id" />
<field name="state" />
<field name="partner_id" invisible="1"/>
<button name="case_close" string="Done"
states="open,draft,pending" type="object"
icon="gtk-close" />
<button name="case_open" string="Open"
states="draft,pending" type="object"
icon="gtk-go-forward" />
<button name="case_cancel" string="Cancel"
states="draft,open,pending" type="object"
icon="gtk-cancel" />
<button name="case_pending" string="Pending"
states="draft,open" type="object" icon="gtk-media-pause" />
<button name="case_escalate" string="Escalate"
states="open,draft,pending" type="object"
groups="base.group_extended"
icon="gtk-go-up" />
<button name="case_close" string="Done"
states="open,draft,pending" type="object"
icon="gtk-close" />
<button name="case_cancel" string="Cancel"
states="draft,open,pending" type="object"
icon="gtk-cancel" />
<button name="case_reset" string="Reset to Draft"
states="done,cancel" type="object" icon="gtk-convert" />
</tree>
@@ -133,15 +133,9 @@
<separator colspan="4"/>
<group col="8" colspan="4">
<field name="state"/>
<button name="case_close" string="Done"
states="open,draft,pending" type="object"
icon="gtk-close" />
<button name="case_open" string="Open"
states="draft,pending" type="object"
icon="gtk-go-forward" />
<button name="case_cancel" string="Cancel"
states="draft,open,pending" type="object"
icon="gtk-cancel" />
<button name="case_pending" string="Pending"
states="draft,open" type="object"
icon="gtk-media-pause" />
@@ -149,6 +143,12 @@
states="open,draft,pending" type="object"
groups="base.group_extended"
icon="gtk-go-up" />
<button name="case_close" string="Done"
states="open,draft,pending" type="object"
icon="gtk-close" />
<button name="case_cancel" string="Cancel"
states="draft,open,pending" type="object"
icon="gtk-cancel" />
<button name="case_reset"
string="Reset to Draft" states="done,cancel"
type="object" icon="gtk-convert" />
@@ -304,9 +304,15 @@
domain="[]"
context="{'group_by':'user_id'}" />
<separator orientation="vertical" />
<filter string="Type" icon="terp-stock_symbol-selection"
domain="[]"
<filter string="Category" help="Fund Category"
icon="terp-stock_symbol-selection" domain="[]"
context="{'group_by':'categ_id'}" />
<filter string="Payment Mode" help="Payment Mode"
icon="terp-dolar" domain="[]"
context="{'group_by':'type_id'}" />
<separator orientation="vertical" />
<filter string="State" icon="terp-stock_effects-object-colorize" domain="[]"
context="{'group_by':'state'}" />
</group>
</search>
</field>
+3 -3
View File
@@ -21,6 +21,7 @@
from crm import crm
from osv import fields, osv
import time
class crm_helpdesk(osv.osv, crm.crm_case):
""" Helpdesk Cases """
@@ -28,10 +29,8 @@ class crm_helpdesk(osv.osv, crm.crm_case):
_name = "crm.helpdesk"
_description = "Helpdesk Cases"
_order = "id desc"
_inherits = {'mailgate.thread': 'thread_id'}
_inherit = ['mailgate.thread']
_columns = {
'thread_id': fields.many2one('mailgate.thread', 'Thread', required=False),
'id': fields.integer('ID', readonly=True),
'name': fields.char('Name', size=128, required=True),
'active': fields.boolean('Active', required=False),
@@ -87,6 +86,7 @@ class crm_helpdesk(osv.osv, crm.crm_case):
'partner_address_id': crm.crm_case._get_default_partner_address,
'email_from': crm.crm_case. _get_default_email,
'state': lambda *a: 'draft',
'date': lambda *a: time.strftime('%Y-%m-%d %H:%M:%S'),
'section_id': crm.crm_case. _get_section,
'company_id': lambda s, cr, uid, c: s.pool.get('res.company')._company_default_get(cr, uid, 'crm.helpdesk', context=c),
'priority': lambda *a: crm.AVAILABLE_PRIORITIES[2][0],
+45 -27
View File
@@ -29,7 +29,7 @@
<field name="arch" type="xml">
<form string="Helpdesk Support">
<group colspan="4" col="7">
<field name="name" select="1"/>
<field name="name" select="1" string="Query"/>
<field name="section_id" widget="selection"/>
<field name="user_id" select="1"/>
<button name="remind_user"
@@ -71,26 +71,26 @@
<separator colspan="4"/>
<group col="8" colspan="4">
<field name="state" select="1"/>
<button name="case_close"
states="open,draft,pending" string="Close"
type="object" icon="gtk-close" />
<button name="case_open"
states="draft,pending" string="Open"
type="object" icon="gtk-go-forward" />
<button name="case_cancel"
states="draft,open,pending" string="Cancel"
type="object" icon="gtk-cancel" />
states="draft,pending" string="Open"
type="object" icon="gtk-go-forward" />
<button name="case_pending"
states="draft,open" string="Pending"
type="object" icon="gtk-media-pause" />
states="draft,open" string="Pending"
type="object" icon="gtk-media-pause" />
<button name="case_escalate"
states="open,draft,pending"
string="Escalate" type="object"
icon="gtk-go-up" />
states="open,draft,pending"
string="Escalate" type="object"
icon="gtk-go-up" />
<button name="case_close"
states="open,draft,pending" string="Close"
type="object" icon="gtk-jump-to" />
<button name="case_cancel"
states="draft,open,pending" string="Cancel"
type="object" icon="gtk-cancel" />
<button name="case_reset"
states="done,cancel"
string="Reset to Draft" type="object"
icon="gtk-convert" />
states="done,cancel"
string="Reset to Draft" type="object"
icon="gtk-convert" />
</group>
</page>
<page string="History" groups="base.group_extended">
@@ -179,24 +179,18 @@
<field name="arch" type="xml">
<tree string="Helpdesk Support Tree"
colors="black:state=='open';blue:state=='pending';grey:state in ('cancel','close')">
<field name="id"/>
<field name="name" string="Query Description" />
<field name="name" string="Query" />
<field name="partner_id" string="Partner"/>
<field name="date" string="Date"/>
<field name="date_deadline"/>
<field name="user_id"/>
<field name="section_id"/>
<field name="priority"/>
<field name="som" invisible="1"/>
<field name="state"/>
<button name="case_close" string="Done"
states="open,draft,pending" type="object"
icon="gtk-close" />
<button name="case_open" string="Open"
states="draft,pending" type="object"
icon="gtk-go-forward" />
<button name="case_cancel" string="Cancel"
states="draft,open,pending" type="object"
icon="gtk-cancel" />
<button name="case_pending" string="Pending"
states="draft,open" type="object"
icon="gtk-media-pause" />
@@ -204,6 +198,12 @@
groups="base.group_extended"
states="open,draft,pending" type="object"
icon="gtk-go-up" />
<button name="case_close" string="Done"
states="open,draft,pending" type="object"
icon="gtk-close" />
<button name="case_cancel" string="Cancel"
states="draft,open,pending" type="object"
icon="gtk-cancel" />
<button name="case_reset" string="Reset to Draft"
states="done,cancel" type="object" icon="gtk-convert" />
</tree>
@@ -255,12 +255,30 @@
</field>
<newline/>
<group expand="0" string="Group By...">
<filter string="Customer" icon="terp-personal"
domain="[]" context="{'group_by':'partner_id'}" />
<filter string="Partner" icon="terp-partner"
domain="[]" help="Partner"
context="{'group_by':'partner_id'}" />
<filter string="Responsible" icon="terp-personal"
domain="[]" help="Responsible User"
context="{'group_by':'user_id'}" />
<filter string="Sales Team" icon="terp-personal+"
domain="[]" help="Sales Team"
context="{'group_by':'section_id'}" />
<separator orientation="vertical"/>
<filter string="State" icon="terp-stock_effects-object-colorize" domain="[]"
context="{'group_by':'state'}" />
<filter string="Priority" icon="terp-rating-rated"
domain="[]" context="{'group_by':'priority'}" />
<filter string="State of Mind"
icon="terp-face-plain"
domain="[]" context="{'group_by':'som'}" />
<separator orientation="vertical"/>
<filter string="Date" icon="terp-go-month"
domain="[]" help="Request Date"
context="{'group_by':'date'}" />
<filter string="Deadline" icon="terp-go-month"
domain="[]"
context="{'group_by':'date_deadline'}" />
</group>
</search>
</field>
+1 -1
View File
@@ -13,7 +13,7 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2010-06-24 03:47+0000\n"
"X-Launchpad-Export-Date: 2010-06-25 03:47+0000\n"
"X-Generator: Launchpad (build Unknown)\n"
"X-Poedit-Country: GREECE\n"
"X-Poedit-Language: Greek\n"
-2
View File
@@ -28,8 +28,6 @@ import decimal_precision as dp
# Overloaded stock_picking to manage carriers :
class stock_picking(osv.osv):
_name = "stock.picking"
_description = "Packing List"
_inherit = 'stock.picking'
def _cal_weight(self, cr, uid, ids, name, args, context=None):
+1
View File
@@ -27,5 +27,6 @@ import directory_content
import directory_report
import document
import report
import wizard
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

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