@@ -25,6 +25,7 @@ import project
|
||||
import partner
|
||||
import invoice
|
||||
import account_bank_statement
|
||||
import account_cash_statement
|
||||
import account_move_line
|
||||
import account_analytic_line
|
||||
import wizard
|
||||
@@ -33,4 +34,4 @@ import product
|
||||
import sequence
|
||||
import company
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
@@ -0,0 +1,448 @@
|
||||
# encoding: utf-8
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2008 PC Solutions (<http://pcsol.be>). All Rights Reserved
|
||||
# $Id$
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU 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 General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
from osv import osv, fields
|
||||
import time
|
||||
from mx import DateTime
|
||||
from decimal import Decimal
|
||||
from tools.translate import _
|
||||
|
||||
class singer_statement(osv.osv):
|
||||
|
||||
""" Singer Statements """
|
||||
|
||||
_name = 'singer.statement'
|
||||
_description = 'Statement'
|
||||
|
||||
def _sub_total(self, cr, uid, ids, name, arg, context=None):
|
||||
|
||||
""" Calculates Sub total"
|
||||
@param name: Names of fields.
|
||||
@param arg: User defined arguments
|
||||
@return: Dictionary of values.
|
||||
"""
|
||||
res = {}
|
||||
for obj in self.browse(cr, uid, ids):
|
||||
res[obj.id] = obj.pieces * obj.number
|
||||
return res
|
||||
|
||||
def on_change_sub(self, cr, uid, ids, pieces, number,*a):
|
||||
|
||||
""" Calculates Sub total on change of number
|
||||
@param pieces: Names of fields.
|
||||
@param number:
|
||||
"""
|
||||
sub=pieces*number
|
||||
return {'value':{'subtotal': sub or 0.0}}
|
||||
|
||||
_columns = {
|
||||
'pieces': fields.float('Values', digits=(16,2)),
|
||||
'number': fields.integer('Number'),
|
||||
'subtotal': fields.function(_sub_total, method=True, string='Sub Total', type='float',digits=(16,2)),
|
||||
'starting_id': fields.many2one('account.bank.statement',ondelete='cascade'),
|
||||
'ending_id': fields.many2one('account.bank.statement',ondelete='cascade'),
|
||||
}
|
||||
singer_statement()
|
||||
|
||||
class account_cash_statement(osv.osv):
|
||||
|
||||
_inherit = 'account.bank.statement'
|
||||
|
||||
def _get_starting_balance(self, cr, uid, ids, name, arg, context=None):
|
||||
|
||||
""" Find starting balance "
|
||||
@param name: Names of fields.
|
||||
@param arg: User defined arguments
|
||||
@return: Dictionary of values.
|
||||
"""
|
||||
res ={}
|
||||
for statement in self.browse(cr, uid, ids):
|
||||
amount_total=0.0
|
||||
for line in statement.starting_details_ids:
|
||||
amount_total+= line.pieces * line.number
|
||||
res[statement.id]=amount_total
|
||||
return res
|
||||
|
||||
def _balance_end_cash(self, cr, uid, ids, name, arg, context=None):
|
||||
""" Find ending balance "
|
||||
@param name: Names of fields.
|
||||
@param arg: User defined arguments
|
||||
@return: Dictionary of values.
|
||||
"""
|
||||
res ={}
|
||||
for statement in self.browse(cr, uid, ids):
|
||||
amount_total=0.0
|
||||
for line in statement.ending_details_ids:
|
||||
amount_total+= line.pieces * line.number
|
||||
res[statement.id]=amount_total
|
||||
return res
|
||||
|
||||
def _get_sum_entry_encoding(self, cr, uid, ids, name, arg, context=None):
|
||||
|
||||
""" Find encoding total of statements "
|
||||
@param name: Names of fields.
|
||||
@param arg: User defined arguments
|
||||
@return: Dictionary of values.
|
||||
"""
|
||||
res2={}
|
||||
for statement in self.browse(cr, uid, ids):
|
||||
encoding_total=0.0
|
||||
for line in statement.line_ids:
|
||||
encoding_total+= line.amount
|
||||
res2[statement.id]=encoding_total
|
||||
return res2
|
||||
|
||||
def _default_journal_id(self, cr, uid, context={}):
|
||||
|
||||
""" To get default journal for the object"
|
||||
@param name: Names of fields.
|
||||
@return: journal
|
||||
"""
|
||||
company_id = self.pool.get('res.users').browse(cr, uid, uid).company_id.id
|
||||
journal = self.pool.get('account.journal').search(cr, uid, [('type', '=', 'cash'), ('company_id', '=', company_id)])
|
||||
if journal:
|
||||
return journal[0]
|
||||
else:
|
||||
return False
|
||||
|
||||
def _end_balance(self, cursor, user, ids, name, attr, context=None):
|
||||
res_currency_obj = self.pool.get('res.currency')
|
||||
res_users_obj = self.pool.get('res.users')
|
||||
|
||||
res = {}
|
||||
|
||||
company_currency_id = res_users_obj.browse(cursor, user, user,
|
||||
context=context).company_id.currency_id.id
|
||||
|
||||
statements = self.browse(cursor, user, ids, context=context)
|
||||
for statement in statements:
|
||||
res[statement.id] = statement.balance_start
|
||||
currency_id = statement.currency.id
|
||||
for line in statement.move_line_ids:
|
||||
if line.debit > 0:
|
||||
if line.account_id.id == \
|
||||
statement.journal_id.default_debit_account_id.id:
|
||||
res[statement.id] += res_currency_obj.compute(cursor,
|
||||
user, company_currency_id, currency_id,
|
||||
line.debit, context=context)
|
||||
else:
|
||||
if line.account_id.id == \
|
||||
statement.journal_id.default_credit_account_id.id:
|
||||
res[statement.id] -= res_currency_obj.compute(cursor,
|
||||
user, company_currency_id, currency_id,
|
||||
line.credit, context=context)
|
||||
if statement.state in ('draft', 'open'):
|
||||
for line in statement.line_ids:
|
||||
res[statement.id] += line.amount
|
||||
for r in res:
|
||||
res[r] = round(res[r], 2)
|
||||
return res
|
||||
|
||||
_columns = {
|
||||
'company_id':fields.many2one('res.company', 'Company', required=False),
|
||||
'journal_id': fields.many2one('account.journal', 'Journal', required=True),
|
||||
'balance_start': fields.function(_get_starting_balance, method=True, string='Opening Balance', type='float',digits=(16,2), help="Opening balance based on cashBox"),
|
||||
'balance_end_real': fields.float('Closing Balance', digits=(16,2), states={'confirm':[('readonly', True)]}, help="closing balance entered by the cashbox verifier"),
|
||||
'state': fields.selection(
|
||||
[('draft', 'Draft'),
|
||||
('confirm', 'Confirm'),
|
||||
('open','Open')], 'State', required=True, states={'confirm': [('readonly', True)]}, readonly="1"),
|
||||
'total_entry_encoding':fields.function(_get_sum_entry_encoding, method=True, string="Cash Transaction", help="Total cash transactions"),
|
||||
'date':fields.datetime("Open On"),
|
||||
'closing_date':fields.datetime("Closed On"),
|
||||
'balance_end': fields.function(_end_balance, method=True, string='Balance', help="Closing balance based on transactions"),
|
||||
'balance_end_cash': fields.function(_balance_end_cash, method=True, string='Balance', help="Closing balance based on cashBox"),
|
||||
'starting_details_ids': fields.one2many('singer.statement', 'starting_id', string='Opening Cashbox'),
|
||||
'ending_details_ids': fields.one2many('singer.statement', 'ending_id', string='Closing Cashbox'),
|
||||
'name': fields.char('Name', size=64, required=True, readonly=True),
|
||||
'user_id':fields.many2one('res.users', 'Responsible', required=False),
|
||||
}
|
||||
_defaults = {
|
||||
'state': lambda *a: 'draft',
|
||||
'name': lambda *a: '/',
|
||||
'date': lambda *a:time.strftime("%Y-%m-%d %H:%M:%S"),
|
||||
'journal_id': _default_journal_id,
|
||||
'user_id': lambda self, cr, uid, context=None: uid
|
||||
}
|
||||
|
||||
def create(self, cr, uid, vals, context=None):
|
||||
company_id = vals and vals.get('company_id',False)
|
||||
if company_id:
|
||||
open_jrnl = self.search(cr, uid, [('company_id', '=', vals['company_id']), ('journal_id', '=', vals['journal_id']), ('state', '=', 'open')])
|
||||
if open_jrnl:
|
||||
raise osv.except_osv('Error', u'Une caisse de type espèce est déjà ouverte')
|
||||
if 'starting_details_ids' in vals:
|
||||
vals['starting_details_ids'] = starting_details_ids = map(list, vals['starting_details_ids'])
|
||||
for i in starting_details_ids:
|
||||
if i and i[0] and i[1]:
|
||||
i[0], i[1] = 0, 0
|
||||
res = super(account_cash_statement, self).create(cr, uid, vals, context=context)
|
||||
return res
|
||||
|
||||
def onchange_journal_id(self, cr, uid, statement_id, journal_id, context={}):
|
||||
""" Changes balance start and starting details if journal_id changes"
|
||||
@param statement_id: Changed statement_id
|
||||
@param journal_id: Changed journal_id
|
||||
@return: Dictionary of changed values
|
||||
"""
|
||||
|
||||
cash_pool = self.pool.get('singer.statement')
|
||||
statement_pool = self.pool.get('account.bank.statement')
|
||||
|
||||
res = {}
|
||||
balance_start = 0.0
|
||||
|
||||
if not journal_id:
|
||||
res.update({
|
||||
'balance_start': balance_start
|
||||
})
|
||||
return res
|
||||
|
||||
|
||||
res = super(account_cash_statement, self).onchange_journal_id(cr, uid, statement_id, journal_id, context)
|
||||
return res
|
||||
|
||||
def button_open(self, cr, uid, ids, context=None):
|
||||
|
||||
""" Changes statement state to Running.
|
||||
@return: True
|
||||
"""
|
||||
cash_pool = self.pool.get('singer.statement')
|
||||
statement_pool = self.pool.get('account.bank.statement')
|
||||
|
||||
statement = statement_pool.browse(cr, uid, ids[0])
|
||||
number = self.pool.get('ir.sequence').get(cr, uid, 'account.bank.statement')
|
||||
|
||||
if len(statement.starting_details_ids) > 0:
|
||||
sid = []
|
||||
for line in statement.starting_details_ids:
|
||||
sid.append(line.id)
|
||||
|
||||
cash_pool.unlink(cr, uid, sid)
|
||||
|
||||
cr.execute("select id from account_bank_statement where journal_id=%s and user_id=%s and state=%s order by id desc limit 1", (statement.journal_id.id, uid, 'confirm'))
|
||||
rs = cr.fetchone()
|
||||
rs = rs and rs[0] or None
|
||||
if rs:
|
||||
statement = statement_pool.browse(cr, uid, rs)
|
||||
balance_start = statement.balance_end_real or 0.0
|
||||
open_ids = cash_pool.search(cr, uid, [('ending_id','=',statement.id)])
|
||||
for sid in open_ids:
|
||||
default = {
|
||||
'ending_id': False,
|
||||
'starting_id':ids[0]
|
||||
}
|
||||
cash_pool.copy(cr, uid, sid, default)
|
||||
|
||||
vals = {
|
||||
'date':time.strftime("%Y-%m-%d %H:%M:%S"),
|
||||
'state':'open',
|
||||
'name':number
|
||||
}
|
||||
|
||||
self.write(cr, uid, ids, vals)
|
||||
return True
|
||||
|
||||
def button_confirm(self, cr, uid, ids, context={}):
|
||||
|
||||
""" Check the starting and ending detail of statement
|
||||
@return: True
|
||||
"""
|
||||
done = []
|
||||
res_currency_obj = self.pool.get('res.currency')
|
||||
res_users_obj = self.pool.get('res.users')
|
||||
account_move_obj = self.pool.get('account.move')
|
||||
account_move_line_obj = self.pool.get('account.move.line')
|
||||
account_bank_statement_line_obj = self.pool.get('account.bank.statement.line')
|
||||
|
||||
company_currency_id = res_users_obj.browse(cr, uid, uid, context=context).company_id.currency_id.id
|
||||
|
||||
for st in self.browse(cr, uid, ids, context):
|
||||
if not st.state == 'open':
|
||||
continue
|
||||
|
||||
if st.balance_end != st.balance_end_cash:
|
||||
raise osv.except_osv(_('Error !'), _('Cash balance is not matching with closing balance !'))
|
||||
|
||||
if not (abs((st.balance_end or 0.0) - st.balance_end_real) < 0.0001):
|
||||
raise osv.except_osv(_('Error !'),
|
||||
_('The statement balance is incorrect !\n') +
|
||||
_('The expected balance (%.2f) is different than the computed one. (%.2f)') % (st.balance_end_real, st.balance_end))
|
||||
if (not st.journal_id.default_credit_account_id) \
|
||||
or (not st.journal_id.default_debit_account_id):
|
||||
raise osv.except_osv(_('Configuration Error !'),
|
||||
_('Please verify that an account is defined in the journal.'))
|
||||
|
||||
for line in st.move_line_ids:
|
||||
if line.state <> 'valid':
|
||||
raise osv.except_osv(_('Error !'),
|
||||
_('The account entries lines are not in valid state.'))
|
||||
# for bank.statement.lines
|
||||
# In line we get reconcile_id on bank.ste.rec.
|
||||
# in bank stat.rec we get line_new_ids on bank.stat.rec.line
|
||||
for move in st.line_ids:
|
||||
context.update({'date':move.date})
|
||||
move_id = account_move_obj.create(cr, uid, {
|
||||
'journal_id': st.journal_id.id,
|
||||
'period_id': st.period_id.id,
|
||||
'date': move.date,
|
||||
}, context=context)
|
||||
account_bank_statement_line_obj.write(cr, uid, [move.id], {
|
||||
'move_ids': [(4,move_id, False)]
|
||||
})
|
||||
if not move.amount:
|
||||
continue
|
||||
|
||||
torec = []
|
||||
if move.amount >= 0:
|
||||
account_id = st.journal_id.default_credit_account_id.id
|
||||
else:
|
||||
account_id = st.journal_id.default_debit_account_id.id
|
||||
acc_cur = ((move.amount<=0) and st.journal_id.default_debit_account_id) or move.account_id
|
||||
amount = res_currency_obj.compute(cr, uid, st.currency.id,
|
||||
company_currency_id, move.amount, context=context,
|
||||
account=acc_cur)
|
||||
if move.reconcile_id and move.reconcile_id.line_new_ids:
|
||||
for newline in move.reconcile_id.line_new_ids:
|
||||
amount += newline.amount
|
||||
|
||||
val = {
|
||||
'name': move.name,
|
||||
'date': move.date,
|
||||
'ref': move.ref,
|
||||
'move_id': move_id,
|
||||
'partner_id': ((move.partner_id) and move.partner_id.id) or False,
|
||||
'account_id': (move.account_id) and move.account_id.id,
|
||||
'credit': ((amount>0) and amount) or 0.0,
|
||||
'debit': ((amount<0) and -amount) or 0.0,
|
||||
'statement_id': st.id,
|
||||
'journal_id': st.journal_id.id,
|
||||
'period_id': st.period_id.id,
|
||||
'currency_id': st.currency.id,
|
||||
}
|
||||
|
||||
amount = res_currency_obj.compute(cr, uid, st.currency.id,
|
||||
company_currency_id, move.amount, context=context,
|
||||
account=acc_cur)
|
||||
if st.currency.id <> company_currency_id:
|
||||
amount_cur = res_currency_obj.compute(cr, uid, company_currency_id,
|
||||
st.currency.id, amount, context=context,
|
||||
account=acc_cur)
|
||||
val['amount_currency'] = -amount_cur
|
||||
|
||||
if move.account_id and move.account_id.currency_id and move.account_id.currency_id.id <> company_currency_id:
|
||||
val['currency_id'] = move.account_id.currency_id.id
|
||||
if company_currency_id==move.account_id.currency_id.id:
|
||||
amount_cur = move.amount
|
||||
else:
|
||||
amount_cur = res_currency_obj.compute(cr, uid, company_currency_id,
|
||||
move.account_id.currency_id.id, amount, context=context,
|
||||
account=acc_cur)
|
||||
val['amount_currency'] = amount_cur
|
||||
|
||||
torec.append(account_move_line_obj.create(cr, uid, val , context=context))
|
||||
|
||||
if move.reconcile_id and move.reconcile_id.line_new_ids:
|
||||
for newline in move.reconcile_id.line_new_ids:
|
||||
account_move_line_obj.create(cr, uid, {
|
||||
'name': newline.name or move.name,
|
||||
'date': move.date,
|
||||
'ref': move.ref,
|
||||
'move_id': move_id,
|
||||
'partner_id': ((move.partner_id) and move.partner_id.id) or False,
|
||||
'account_id': (newline.account_id) and newline.account_id.id,
|
||||
'debit': newline.amount>0 and newline.amount or 0.0,
|
||||
'credit': newline.amount<0 and -newline.amount or 0.0,
|
||||
'statement_id': st.id,
|
||||
'journal_id': st.journal_id.id,
|
||||
'period_id': st.period_id.id,
|
||||
'analytic_account_id':newline.analytic_id and newline.analytic_id.id or False,
|
||||
|
||||
}, context=context)
|
||||
|
||||
# Fill the secondary amount/currency
|
||||
# if currency is not the same than the company
|
||||
amount_currency = False
|
||||
currency_id = False
|
||||
if st.currency.id <> company_currency_id:
|
||||
amount_currency = move.amount
|
||||
currency_id = st.currency.id
|
||||
account_move_line_obj.create(cr, uid, {
|
||||
'name': move.name,
|
||||
'date': move.date,
|
||||
'ref': move.ref,
|
||||
'move_id': move_id,
|
||||
'partner_id': ((move.partner_id) and move.partner_id.id) or False,
|
||||
'account_id': account_id,
|
||||
'credit': ((amount < 0) and -amount) or 0.0,
|
||||
'debit': ((amount > 0) and amount) or 0.0,
|
||||
'statement_id': st.id,
|
||||
'journal_id': st.journal_id.id,
|
||||
'period_id': st.period_id.id,
|
||||
'amount_currency': amount_currency,
|
||||
'currency_id': currency_id,
|
||||
}, context=context)
|
||||
|
||||
for line in account_move_line_obj.browse(cr, uid, [x.id for x in
|
||||
account_move_obj.browse(cr, uid, move_id,
|
||||
context=context).line_id],
|
||||
context=context):
|
||||
if line.state <> 'valid':
|
||||
raise osv.except_osv(_('Error !'),
|
||||
_('Ledger Posting line "%s" is not valid') % line.name)
|
||||
|
||||
if move.reconcile_id and move.reconcile_id.line_ids:
|
||||
torec += map(lambda x: x.id, move.reconcile_id.line_ids)
|
||||
#try:
|
||||
if abs(move.reconcile_amount-move.amount)<0.0001:
|
||||
|
||||
writeoff_acc_id = False
|
||||
#There should only be one write-off account!
|
||||
for entry in move.reconcile_id.line_new_ids:
|
||||
writeoff_acc_id = entry.account_id.id
|
||||
break
|
||||
|
||||
account_move_line_obj.reconcile(cr, uid, torec, 'statement', writeoff_acc_id=writeoff_acc_id, writeoff_period_id=st.period_id.id, writeoff_journal_id=st.journal_id.id, context=context)
|
||||
else:
|
||||
account_move_line_obj.reconcile_partial(cr, uid, torec, 'statement', context)
|
||||
#except:
|
||||
# raise osv.except_osv(_('Error !'), _('Unable to reconcile entry "%s": %.2f') % (move.name, move.amount))
|
||||
|
||||
if st.journal_id.entry_posted:
|
||||
account_move_obj.write(cr, uid, [move_id], {'state':'posted'})
|
||||
done.append(st.id)
|
||||
self.write(cr, uid, done, {'state':'confirm'}, context=context)
|
||||
return True
|
||||
|
||||
def button_cancel(self, cr, uid, ids, context={}):
|
||||
done = []
|
||||
for st in self.browse(cr, uid, ids, context):
|
||||
ids = []
|
||||
for line in st.line_ids:
|
||||
ids += [x.id for x in line.move_ids]
|
||||
self.pool.get('account.move').unlink(cr, uid, ids, context)
|
||||
done.append(st.id)
|
||||
self.write(cr, uid, done, {'state':'draft'}, context=context)
|
||||
return True
|
||||
|
||||
account_cash_statement()
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data noupdate="1">
|
||||
<data>
|
||||
<!-- This file must be loaded _after_ account_demo.xml ! -->
|
||||
<record id="test_invoice_1" model="account.invoice">
|
||||
<field name="currency_id" ref="base.EUR"/>
|
||||
@@ -44,14 +44,14 @@
|
||||
<test expr="state">open</test>
|
||||
</assert>
|
||||
<function model="account.invoice" name="pay_and_reconcile">
|
||||
<!-- ids = --> <value eval="[ref('test_invoice_1')]"/>
|
||||
<!-- pay_amount = --> <value eval="1850"/>
|
||||
<!-- pay_account_id = --> <value eval="ref('cash')"/>
|
||||
<!-- period_id = --> <value eval="ref('account.period_' + str(int(time.strftime('%m'))))"/>
|
||||
<!-- pay_journal_id = --> <value eval="ref('bank_journal')"/>
|
||||
<!-- writeoff_acc_id = --> <value eval="ref('cash')"/>
|
||||
<!-- writeoff_period_id = --> <value eval="ref('account.period_' + str(int(time.strftime('%m'))))"/>
|
||||
<!-- writeoff_journal_id = --> <value eval="ref('bank_journal')"/>
|
||||
<!-- ids = --> <value eval="[ref('test_invoice_1')]"/>
|
||||
<!-- pay_amount = --> <value eval="1850"/>
|
||||
<!-- pay_account_id = --> <value eval="ref('cash')"/>
|
||||
<!-- period_id = --> <value eval="ref('account.period_' + str(int(time.strftime('%m'))))"/>
|
||||
<!-- pay_journal_id = --> <value eval="ref('bank_journal')"/>
|
||||
<!-- writeoff_acc_id = --> <value eval="ref('cash')"/>
|
||||
<!-- writeoff_period_id = --> <value eval="ref('account.period_' + str(int(time.strftime('%m'))))"/>
|
||||
<!-- writeoff_journal_id = --> <value eval="ref('bank_journal')"/>
|
||||
</function>
|
||||
|
||||
<assert id="test_invoice_1" model="account.invoice" string="Test invoice 1 is now paid">
|
||||
|
||||
+144
-15
@@ -378,7 +378,7 @@
|
||||
<field name="model">account.bank.statement</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Statement">
|
||||
<form string="Bank Statement">
|
||||
<group col="6" colspan="4">
|
||||
<field name="name" select="1"/>
|
||||
<field name="date" select="1"/>
|
||||
@@ -394,7 +394,7 @@
|
||||
<field name="balance_end_real"/>
|
||||
</group>
|
||||
<notebook colspan="4">
|
||||
<page string="Entry encoding">
|
||||
<page string="Transaction">
|
||||
<field colspan="4" name="line_ids" nolabel="1">
|
||||
<tree editable="bottom" string="Statement lines">
|
||||
<field name="sequence" invisible="1"/>
|
||||
@@ -423,7 +423,7 @@
|
||||
</form>
|
||||
</field>
|
||||
</page>
|
||||
<page string="Real Entries">
|
||||
<page string="Accounting Entries">
|
||||
<field colspan="4" name="move_line_ids" nolabel="1"/>
|
||||
</page>
|
||||
</notebook>
|
||||
@@ -442,6 +442,7 @@
|
||||
<field name="res_model">account.bank.statement</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="domain">[('journal_id.type', '=', 'bank')]</field>
|
||||
</record>
|
||||
<menuitem string="Bank Statements" action="action_bank_statement_tree" id="menu_bank_statement_tree" parent="menu_finance_bank_and_cash" sequence="7"/>
|
||||
|
||||
@@ -1131,16 +1132,6 @@
|
||||
<field name="view_mode">form</field>
|
||||
<field name="act_window_id" ref="action_move_line_search"/>
|
||||
</record>
|
||||
<record id="action_move_line_search_view3" model="ir.actions.act_window">
|
||||
<field name="name">Cash Register</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">account.move.line</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="view_id" ref="view_move_line_tree"/>
|
||||
<field name="search_view_id" ref="view_account_move_line_filter"/>
|
||||
<field name="domain">[('journal_id.type', '=', 'cash')]</field>
|
||||
</record>
|
||||
<record id="action_move_line_search_view4" model="ir.actions.act_window">
|
||||
<field name="name">Checks Register</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
@@ -1151,7 +1142,7 @@
|
||||
<field name="search_view_id" ref="view_account_move_line_filter"/>
|
||||
<field name="domain">[('journal_id.type', '=', 'bank')]</field>
|
||||
</record>
|
||||
<menuitem action="action_move_line_search_view3" id="journal_cash_move_lines" parent="menu_finance_bank_and_cash"/>
|
||||
|
||||
<menuitem action="action_move_line_search_view4" id="journal_bank_move_lines" parent="menu_finance_bank_and_cash"/>
|
||||
|
||||
<!-- <menuitem action="action_move_line_search" id="menu_action_move_line_search" parent="account.next_id_29"/>-->
|
||||
@@ -2037,6 +2028,144 @@
|
||||
sequence="4"
|
||||
/>
|
||||
|
||||
|
||||
<!-- Cash Statement -->
|
||||
<record id="view_bank_statement_tree" model="ir.ui.view">
|
||||
<field name="name">account.bank.statement.tree</field>
|
||||
<field name="model">account.bank.statement</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree colors="red:balance_end_real!=balance_end;blue:state=='draft' and (balance_end_real==balance_end);black:state in ('open');blue:state in ('draft')" string="Statement">
|
||||
<field name="date"/>
|
||||
<field name="name"/>
|
||||
<field name="journal_id"/>
|
||||
<field name="period_id"/>
|
||||
<field name="balance_start"/>
|
||||
<field name="balance_end_real"/>
|
||||
<field name="balance_end"/>
|
||||
<field name="user_id" select="1"/>
|
||||
<field name="state"/>
|
||||
<button type="object" string="Open" name="button_open" states="draft" icon="terp-camera_test"/>
|
||||
<button type="object" string="Confirm" name="button_confirm" states="open" icon="terp-gtk-go-back-rtl"/>
|
||||
<button type="object" string="Cancel" name="button_cancel" states="confirm" icon="terp-gtk-stop"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_bank_statement_form2" model="ir.ui.view">
|
||||
<field name="name">account.bank.statement.form</field>
|
||||
<field name="model">account.bank.statement</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Statement">
|
||||
<group col="6" colspan="4">
|
||||
<field name="name" select="1"/>
|
||||
<field name="company_id" select="1" groups="base.group_multi_company"/>
|
||||
<field name="journal_id" on_change="onchange_journal_id(journal_id)" domain="[('type','=','cash')]" select="1" />
|
||||
<field name="user_id" select="1" readonly="1"/>
|
||||
<field name="period_id" select="1"/>
|
||||
<field name="balance_end_real"/>
|
||||
</group>
|
||||
|
||||
<notebook colspan="4">
|
||||
<page string="Cash Transactions" attrs="{'invisible': [('state','=','draft')]}">
|
||||
<field colspan="4" name="line_ids" nolabel="1">
|
||||
<tree editable="bottom" string="Statement lines">
|
||||
<field name="sequence" invisible="1"/>
|
||||
<field name="date"/>
|
||||
<field name="ref"/>
|
||||
<field name="name"/>
|
||||
<field name="type"/>
|
||||
<field name="partner_id" on_change="onchange_partner_id(partner_id, type, parent.currency, {'amount': amount})"/>
|
||||
<field domain="[('journal_id','=',parent.journal_id)]" name="account_id"/>
|
||||
<field name="amount"/>
|
||||
<field context="{'partner_id': partner_id, 'amount': amount, 'account_id': account_id, 'currency_id': parent.currency, 'journal_id': parent.journal_id, 'date':date}" name="reconcile_id"/>
|
||||
<field invisible="1" name="reconcile_amount"/>
|
||||
</tree>
|
||||
</field>
|
||||
</page>
|
||||
<page string="Cash Box">
|
||||
<group col="2" colspan="2" expand="1">
|
||||
<field name="starting_details_ids" nolabel="1" colspan="2" attrs="{'readonly':[('state','=','draft')]}">
|
||||
<tree string = "Opening Balance" editable="bottom">
|
||||
<field name="pieces"/>
|
||||
<field name="number" on_change="on_change_sub(pieces,number, parent.balance_end)"/>
|
||||
<field name="subtotal" sum="Total"/>
|
||||
</tree>
|
||||
<form string = "Opening Balance">
|
||||
<field name="pieces"/>
|
||||
<field name="number" on_change="on_change_sub(pieces,number, parent.balance_end)"/>
|
||||
<field name="subtotal"/>
|
||||
</form>
|
||||
</field>
|
||||
</group>
|
||||
<group col="2" colspan="2" expand="1">
|
||||
<field name="ending_details_ids" nolabel="1" colspan="2" attrs="{'readonly':[('state','=','draft')]}">
|
||||
<tree string = "Closing Balance" editable="bottom">
|
||||
<field name="pieces"/>
|
||||
<field name="number" on_change="on_change_sub(pieces,number, parent.balance_end)"/>
|
||||
<field name="subtotal" sum="Total"/>
|
||||
</tree>
|
||||
<form string = "Closing Balance">
|
||||
<field name="pieces"/>
|
||||
<field name="number" on_change="on_change_sub(pieces,number, parent.balance_end)"/>
|
||||
<field name="subtotal"/>
|
||||
</form>
|
||||
</field>
|
||||
</group>
|
||||
</page>
|
||||
<page string="Accounting Entries" attrs="{'invisible': [('state','!=','confirm')]}">
|
||||
<field colspan="4" name="move_line_ids" nolabel="1"/>
|
||||
</page>
|
||||
</notebook>
|
||||
<group col="6" colspan="4">
|
||||
<group col="2" colspan="2">
|
||||
<separator string="Dates" colspan="4"/>
|
||||
<field name="date" select="1" attrs="{'readonly':[('state','!=','draft')]}"/>
|
||||
<field name="closing_date" select="1" attrs="{'readonly':[('state','=','confirm')]}"/>
|
||||
</group>
|
||||
<group col="2" colspan="2">
|
||||
<separator string="Opening Balance" colspan="4"/>
|
||||
<field name="balance_start"/>
|
||||
<field name="total_entry_encoding"/>
|
||||
</group>
|
||||
<group col="2" colspan="2">
|
||||
<separator string="Closing Balance" colspan="4"/>
|
||||
<field name="balance_end" string="Approx"/>
|
||||
<field name="balance_end_cash" string="Cash Balance"/>
|
||||
</group>
|
||||
</group>
|
||||
<group col="8" colspan="4">
|
||||
<field name="state" colspan="4"/>
|
||||
<button name="button_confirm" states="open" string="Close CashBox" icon="terp-check" type="object"/>
|
||||
<button name="button_open" states="draft" string="Open CashBox" icon="terp-document-new" type="object"/>
|
||||
<button name="button_cancel" states="confirm,open" string="Cancel" icon="terp-gtk-stop" type="object" groups="base.group_extended"/>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
<record id="action_view_bank_statement_tree" model="ir.actions.act_window">
|
||||
<field name="name">Cash Register</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">account.bank.statement</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="view_id" ref="view_bank_statement_tree"/>
|
||||
<field name="search_view_id" ref="view_account_bank_statement_filter"/>
|
||||
<field name="domain">[('journal_id.type', '=', 'cash')]</field>
|
||||
</record>
|
||||
<record model="ir.actions.act_window.view" id="act_cash_statement1_all">
|
||||
<field name="sequence" eval="1"/>
|
||||
<field name="view_mode">tree</field>
|
||||
<field name="view_id" ref="view_bank_statement_tree"/>
|
||||
<field name="act_window_id" ref="action_view_bank_statement_tree"/>
|
||||
</record>
|
||||
<record model="ir.actions.act_window.view" id="act_cash_statement2_all">
|
||||
<field name="sequence" eval="1"/>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="view_id" ref="view_bank_statement_form2"/>
|
||||
<field name="act_window_id" ref="action_view_bank_statement_tree"/>
|
||||
</record>
|
||||
<menuitem action="action_view_bank_statement_tree" id="journal_cash_move_lines" parent="menu_finance_bank_and_cash"/>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
@@ -1,72 +1,72 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data noupdate="1">
|
||||
<data>
|
||||
|
||||
<!-- Types -->
|
||||
<record model="account.account.type" id="conf_account_type_receivable" >
|
||||
<field name="name">Receivable</field>
|
||||
<field name="code">receivable</field>
|
||||
<field name="close_method">unreconciled</field>
|
||||
</record>
|
||||
<!-- Types -->
|
||||
<record model="account.account.type" id="conf_account_type_receivable" >
|
||||
<field name="name">Receivable</field>
|
||||
<field name="code">receivable</field>
|
||||
<field name="close_method">unreconciled</field>
|
||||
</record>
|
||||
|
||||
<record model="account.account.type" id="conf_account_type_payable" >
|
||||
<field name="name">Payable</field>
|
||||
<field name="code">payable</field>
|
||||
<field name="close_method">unreconciled</field>
|
||||
</record>
|
||||
<record model="account.account.type" id="conf_account_type_payable" >
|
||||
<field name="name">Payable</field>
|
||||
<field name="code">payable</field>
|
||||
<field name="close_method">unreconciled</field>
|
||||
</record>
|
||||
|
||||
<record model="account.account.type" id="conf_account_type_view">
|
||||
<field name="name">View</field>
|
||||
<field name="code">view</field>
|
||||
<field name="close_method">none</field>
|
||||
</record>
|
||||
<record model="account.account.type" id="conf_account_type_view">
|
||||
<field name="name">View</field>
|
||||
<field name="code">view</field>
|
||||
<field name="close_method">none</field>
|
||||
</record>
|
||||
|
||||
<record model="account.account.type" id="conf_account_type_income" >
|
||||
<field name="name">Income</field>
|
||||
<field name="code">income</field>
|
||||
<field name="close_method">none</field>
|
||||
</record>
|
||||
<record model="account.account.type" id="conf_account_type_income" >
|
||||
<field name="name">Income</field>
|
||||
<field name="code">income</field>
|
||||
<field name="close_method">none</field>
|
||||
</record>
|
||||
|
||||
<record model="account.account.type" id="conf_account_type_expense">
|
||||
<field name="name">Expense</field>
|
||||
<field name="code">expense</field>
|
||||
<field name="close_method">none</field>
|
||||
</record>
|
||||
<record model="account.account.type" id="conf_account_type_expense">
|
||||
<field name="name">Expense</field>
|
||||
<field name="code">expense</field>
|
||||
<field name="close_method">none</field>
|
||||
</record>
|
||||
|
||||
<record model="account.account.type" id="conf_account_type_tax">
|
||||
<field name="name">Tax</field>
|
||||
<field name="code">tax</field>
|
||||
<field name="close_method">unreconciled</field>
|
||||
</record>
|
||||
<record model="account.account.type" id="conf_account_type_tax">
|
||||
<field name="name">Tax</field>
|
||||
<field name="code">tax</field>
|
||||
<field name="close_method">unreconciled</field>
|
||||
</record>
|
||||
|
||||
<record model="account.account.type" id="conf_account_type_cash">
|
||||
<field name="name">Cash</field>
|
||||
<field name="code">cash</field>
|
||||
<field name="close_method">balance</field>
|
||||
</record>
|
||||
<record model="account.account.type" id="conf_account_type_cash">
|
||||
<field name="name">Cash</field>
|
||||
<field name="code">cash</field>
|
||||
<field name="close_method">balance</field>
|
||||
</record>
|
||||
|
||||
<record model="account.account.type" id="conf_account_type_asset">
|
||||
<field name="name">Asset</field>
|
||||
<field name="code">asset</field>
|
||||
<field name="close_method">balance</field>
|
||||
</record>
|
||||
<record model="account.account.type" id="conf_account_type_asset">
|
||||
<field name="name">Asset</field>
|
||||
<field name="code">asset</field>
|
||||
<field name="close_method">balance</field>
|
||||
</record>
|
||||
|
||||
<record model="account.account.type" id="conf_account_type_equity">
|
||||
<field name="name">Equity</field>
|
||||
<field name="code">equity</field>
|
||||
<field name="close_method">balance</field>
|
||||
</record>
|
||||
<record model="account.account.type" id="conf_account_type_equity">
|
||||
<field name="name">Equity</field>
|
||||
<field name="code">equity</field>
|
||||
<field name="close_method">balance</field>
|
||||
</record>
|
||||
|
||||
<record model="account.account.type" id="conf_account_type_bnk">
|
||||
<field name="name">Bank</field>
|
||||
<field name="code">bank</field>
|
||||
<field name="close_method">balance</field>
|
||||
</record>
|
||||
<record model="account.account.type" id="conf_account_type_chk">
|
||||
<field name="name">Check</field>
|
||||
<field name="code">check</field>
|
||||
<field name="close_method">balance</field>
|
||||
</record>
|
||||
<record model="account.account.type" id="conf_account_type_bnk">
|
||||
<field name="name">Bank</field>
|
||||
<field name="code">bank</field>
|
||||
<field name="close_method">balance</field>
|
||||
</record>
|
||||
<record model="account.account.type" id="conf_account_type_chk">
|
||||
<field name="name">Check</field>
|
||||
<field name="code">check</field>
|
||||
<field name="close_method">balance</field>
|
||||
</record>
|
||||
|
||||
|
||||
|
||||
@@ -82,7 +82,7 @@
|
||||
<!-- Balance Sheet -->
|
||||
|
||||
<record id="conf_bal" model="account.account.template">
|
||||
<field name="code">1</field>
|
||||
<field name="code">1</field>
|
||||
<field name="name">Balance Sheet</field>
|
||||
<field ref="conf_chart0" name="parent_id"/>
|
||||
<field name="type">view</field>
|
||||
@@ -90,7 +90,7 @@
|
||||
</record>
|
||||
|
||||
<record id="conf_fas" model="account.account.template">
|
||||
<field name="code">10</field>
|
||||
<field name="code">10</field>
|
||||
<field name="name">Fixed Assets</field>
|
||||
<field ref="conf_bal" name="parent_id"/>
|
||||
<field name="type">view</field>
|
||||
@@ -98,7 +98,7 @@
|
||||
</record>
|
||||
|
||||
<record id="conf_xfa" model="account.account.template">
|
||||
<field name="code">100</field>
|
||||
<field name="code">100</field>
|
||||
<field name="name">Fixed Asset Account</field>
|
||||
<field ref="conf_fas" name="parent_id"/>
|
||||
<field name="type">other</field>
|
||||
@@ -106,7 +106,7 @@
|
||||
</record>
|
||||
|
||||
<record id="conf_nca" model="account.account.template">
|
||||
<field name="code">11</field>
|
||||
<field name="code">11</field>
|
||||
<field name="name">Net Current Assets</field>
|
||||
<field ref="conf_bal" name="parent_id"/>
|
||||
<field name="type">view</field>
|
||||
@@ -114,9 +114,9 @@
|
||||
</record>
|
||||
|
||||
<record id="conf_cas" model="account.account.template">
|
||||
<field name="code">110</field>
|
||||
<field name="code">110</field>
|
||||
<field name="name">Current Assets</field>
|
||||
<field ref="conf_nca" name="parent_id"/>
|
||||
<field ref="conf_nca" name="parent_id"/>
|
||||
<field name="type">view</field>
|
||||
<field name="user_type" ref="conf_account_type_view"/>
|
||||
</record>
|
||||
@@ -143,7 +143,7 @@
|
||||
</record> -->
|
||||
|
||||
<record id="conf_ova" model="account.account.template">
|
||||
<field name="code">1103</field>
|
||||
<field name="code">1103</field>
|
||||
<field name="name">Output VAT</field>
|
||||
<field ref="conf_cas" name="parent_id"/>
|
||||
<field name="type">other</field>
|
||||
@@ -151,7 +151,7 @@
|
||||
</record>
|
||||
|
||||
<record id="conf_bnk" model="account.account.template">
|
||||
<field name="code">1104</field>
|
||||
<field name="code">1104</field>
|
||||
<field name="name">Bank Current Account</field>
|
||||
<field ref="conf_cas" name="parent_id"/>
|
||||
<field name="type">view</field>
|
||||
@@ -167,7 +167,7 @@
|
||||
</record>
|
||||
|
||||
<record id="conf_cli" model="account.account.template">
|
||||
<field name="code">111</field>
|
||||
<field name="code">111</field>
|
||||
<field name="name">Current Liabilities</field>
|
||||
<field ref="conf_nca" name="parent_id"/>
|
||||
<field name="type">view</field>
|
||||
@@ -188,7 +188,7 @@
|
||||
</record>-->
|
||||
|
||||
<record id="conf_iva" model="account.account.template">
|
||||
<field name="code">1112</field>
|
||||
<field name="code">1112</field>
|
||||
<field name="name">Input VAT</field>
|
||||
<field ref="conf_cli" name="parent_id"/>
|
||||
<field name="type">other</field>
|
||||
@@ -198,7 +198,7 @@
|
||||
<!-- Profit and Loss -->
|
||||
|
||||
<record id="conf_gpf" model="account.account.template">
|
||||
<field name="code">2</field>
|
||||
<field name="code">2</field>
|
||||
<field name="name">Profit and Loss</field>
|
||||
<field ref="conf_chart0" name="parent_id"/>
|
||||
<field name="type">view</field>
|
||||
@@ -206,7 +206,7 @@
|
||||
</record>
|
||||
|
||||
<record id="conf_rev" model="account.account.template">
|
||||
<field name="code">20</field>
|
||||
<field name="code">20</field>
|
||||
<field name="name">Revenue</field>
|
||||
<field ref="conf_gpf" name="parent_id"/>
|
||||
<field name="type">view</field>
|
||||
@@ -226,7 +226,7 @@
|
||||
</record> -->
|
||||
|
||||
<record id="conf_cos" model="account.account.template">
|
||||
<field name="code">21</field>
|
||||
<field name="code">21</field>
|
||||
<field name="name">Cost of Sales</field>
|
||||
<field ref="conf_gpf" name="parent_id"/>
|
||||
<field name="type">view</field>
|
||||
@@ -242,7 +242,7 @@
|
||||
</record>
|
||||
|
||||
<record id="conf_ovr" model="account.account.template">
|
||||
<field name="code">22</field>
|
||||
<field name="code">22</field>
|
||||
<field name="name">Overheads</field>
|
||||
<field ref="conf_gpf" name="parent_id"/>
|
||||
<field name="type">view</field>
|
||||
@@ -381,22 +381,22 @@
|
||||
<field name="parent_id" ref="vat_code_base_sales"/>
|
||||
</record>
|
||||
|
||||
<record id="configurable_chart_template" model="account.chart.template">
|
||||
<record id="configurable_chart_template" model="account.chart.template">
|
||||
<field name="name">Configurable Account Chart Template</field>
|
||||
<field name="account_root_id" ref="conf_chart0"/>
|
||||
<field name="tax_code_root_id" ref="vat_code_chart_root"/>
|
||||
<field name="bank_account_view_id" ref="conf_bnk"/>
|
||||
<field name="bank_account_view_id" ref="conf_bnk"/>
|
||||
<field name="property_account_receivable" ref="conf_a_recv"/>
|
||||
<field name="property_account_payable" ref="conf_a_pay"/>
|
||||
<field name="property_account_expense_categ" ref="conf_a_expense"/>
|
||||
<field name="property_account_income_categ" ref="conf_a_sale"/>
|
||||
</record>
|
||||
|
||||
<!-- VAT Codes -->
|
||||
<!-- VAT Codes -->
|
||||
<!-- Purchases + Input VAT -->
|
||||
|
||||
<record id="ivats" model="account.tax.template">
|
||||
<field name="chart_template_id" ref="configurable_chart_template"/>
|
||||
<field name="chart_template_id" ref="configurable_chart_template"/>
|
||||
<field name="name">IVAT S</field>
|
||||
<field eval="0.15" name="amount"/>
|
||||
<field name="type">percent</field>
|
||||
@@ -410,7 +410,7 @@
|
||||
</record>
|
||||
|
||||
<record id="ivatr" model="account.tax.template">
|
||||
<field name="chart_template_id" ref="configurable_chart_template"/>
|
||||
<field name="chart_template_id" ref="configurable_chart_template"/>
|
||||
<field name="name">IVAT R</field>
|
||||
<field eval="0.005" name="amount"/>
|
||||
<field name="type">percent</field>
|
||||
@@ -424,7 +424,7 @@
|
||||
</record>
|
||||
|
||||
<record id="ivatz" model="account.tax.template">
|
||||
<field name="chart_template_id" ref="configurable_chart_template"/>
|
||||
<field name="chart_template_id" ref="configurable_chart_template"/>
|
||||
<field name="name">IVAT Z</field>
|
||||
<field eval="0.0" name="amount"/>
|
||||
<field name="type">percent</field>
|
||||
@@ -434,7 +434,7 @@
|
||||
</record>
|
||||
|
||||
<record id="ivatx" model="account.tax.template">
|
||||
<field name="chart_template_id" ref="configurable_chart_template"/>
|
||||
<field name="chart_template_id" ref="configurable_chart_template"/>
|
||||
<field name="name">IVAT X</field>
|
||||
<field eval="0.0" name="amount"/>
|
||||
<field name="type">percent</field>
|
||||
@@ -444,7 +444,7 @@
|
||||
</record>
|
||||
|
||||
<record id="ivato" model="account.tax.template">
|
||||
<field name="chart_template_id" ref="configurable_chart_template"/>
|
||||
<field name="chart_template_id" ref="configurable_chart_template"/>
|
||||
<field name="name">IVAT O</field>
|
||||
<field eval="0.0" name="amount"/>
|
||||
<field name="type">percent</field>
|
||||
@@ -456,7 +456,7 @@
|
||||
<!-- Sales + Output VAT -->
|
||||
|
||||
<record id="ovats" model="account.tax.template">
|
||||
<field name="chart_template_id" ref="configurable_chart_template"/>
|
||||
<field name="chart_template_id" ref="configurable_chart_template"/>
|
||||
<field name="name">OVAT S</field>
|
||||
<field eval="0.15" name="amount"/>
|
||||
<field name="type">percent</field>
|
||||
@@ -470,7 +470,7 @@
|
||||
</record>
|
||||
|
||||
<record id="ovatr" model="account.tax.template">
|
||||
<field name="chart_template_id" ref="configurable_chart_template"/>
|
||||
<field name="chart_template_id" ref="configurable_chart_template"/>
|
||||
<field name="name">OVAT R</field>
|
||||
<field eval="0.005" name="amount"/>
|
||||
<field name="type">percent</field>
|
||||
@@ -484,7 +484,7 @@
|
||||
</record>
|
||||
|
||||
<record id="ovatz" model="account.tax.template">
|
||||
<field name="chart_template_id" ref="configurable_chart_template"/>
|
||||
<field name="chart_template_id" ref="configurable_chart_template"/>
|
||||
<field name="name">OVAT Z</field>
|
||||
<field eval="0.0" name="amount"/>
|
||||
<field name="type">percent</field>
|
||||
@@ -494,7 +494,7 @@
|
||||
</record>
|
||||
|
||||
<record id="ovatx" model="account.tax.template">
|
||||
<field name="chart_template_id" ref="configurable_chart_template"/>
|
||||
<field name="chart_template_id" ref="configurable_chart_template"/>
|
||||
<field name="name">OVAT X</field>
|
||||
<field eval="0.0" name="amount"/>
|
||||
<field name="type">percent</field>
|
||||
@@ -504,7 +504,7 @@
|
||||
</record>
|
||||
|
||||
<record id="ovato" model="account.tax.template">
|
||||
<field name="chart_template_id" ref="configurable_chart_template"/>
|
||||
<field name="chart_template_id" ref="configurable_chart_template"/>
|
||||
<field name="name">OVAT O</field>
|
||||
<field eval="0.0" name="amount"/>
|
||||
<field name="type">percent</field>
|
||||
|
||||
@@ -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-25 03:47+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-06-26 03:57+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: account
|
||||
|
||||
@@ -7,13 +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-05-09 18:34+0000\n"
|
||||
"PO-Revision-Date: 2010-06-25 18:22+0000\n"
|
||||
"Last-Translator: lyyser <logard.1961@gmail.com>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-06-22 04:04+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-06-26 03:57+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: account
|
||||
@@ -466,7 +466,7 @@ msgstr "Panga võrdlus"
|
||||
#. module: account
|
||||
#: rml:account.invoice:0
|
||||
msgid "Disc.(%)"
|
||||
msgstr ""
|
||||
msgstr "Allah. (%)"
|
||||
|
||||
#. module: account
|
||||
#: rml:account.general.ledger:0
|
||||
@@ -732,7 +732,7 @@ msgstr "Välja nimi"
|
||||
#: field:account.tax.code,sign:0
|
||||
#: field:account.tax.code.template,sign:0
|
||||
msgid "Sign for parent"
|
||||
msgstr ""
|
||||
msgstr "Logi vanemana"
|
||||
|
||||
#. module: account
|
||||
#: field:account.fiscalyear,end_journal_period_id:0
|
||||
|
||||
@@ -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-25 03:47+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-06-26 03:57+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: account
|
||||
|
||||
@@ -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-25 03:47+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-06-26 03:58+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: account
|
||||
|
||||
@@ -2,43 +2,43 @@
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<record id="account_analytic_chart_view" model="ir.ui.view">
|
||||
<field name="name">Account Analytic Chart</field>
|
||||
<field name="model">account.analytic.chart</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Analytic Account Charts">
|
||||
<separator string="Select the Period for Analysis" colspan="4"/>
|
||||
<field name="from_date"/>
|
||||
<newline/>
|
||||
<field name="to_date"/>
|
||||
<newline/>
|
||||
<label string="(Keep empty to open the current situation)" align="0.0" colspan="3"/>
|
||||
<separator colspan="4"/>
|
||||
<group colspan="4" col="6">
|
||||
<button special="cancel" string="Cancel" icon="gtk-cancel"/>
|
||||
<button name="analytic_account_chart_open_window" string="Open Charts" type="object" icon="gtk-ok"/>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
<record id="account_analytic_chart_view" model="ir.ui.view">
|
||||
<field name="name">Chart of Analytic Accounts</field>
|
||||
<field name="model">account.analytic.chart</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Analytic Account Charts">
|
||||
<separator string="Select the Period for Analysis" colspan="4"/>
|
||||
<field name="from_date"/>
|
||||
<newline/>
|
||||
<field name="to_date"/>
|
||||
<newline/>
|
||||
<label string="(Keep empty to open the current situation)" align="0.0" colspan="3"/>
|
||||
<separator colspan="4"/>
|
||||
<group colspan="4" col="6">
|
||||
<button special="cancel" string="Cancel" icon="gtk-cancel"/>
|
||||
<button name="analytic_account_chart_open_window" string="Open Charts" type="object" icon="gtk-ok"/>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_account_analytic_chart" model="ir.actions.act_window">
|
||||
<field name="name">Analytic Chart of Accounts</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">account.analytic.chart</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="view_id" ref="account_analytic_chart_view"/>
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
<record id="action_account_analytic_chart" model="ir.actions.act_window">
|
||||
<field name="name">Chart of Analytic Accounts</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">account.analytic.chart</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="view_id" ref="account_analytic_chart_view"/>
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
|
||||
<menuitem
|
||||
name="Analytic Chart of Accounts"
|
||||
parent="account.menu_finance_charts"
|
||||
action="action_account_analytic_chart"
|
||||
id="menu_action_analytic_account_tree2"
|
||||
icon="STOCK_INDENT"/>
|
||||
<menuitem
|
||||
name="Chart of Analytic Accounts"
|
||||
parent="account.menu_finance_charts"
|
||||
action="action_account_analytic_chart"
|
||||
id="menu_action_analytic_account_tree2"
|
||||
icon="STOCK_INDENT"/>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
</openerp>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?><openerp><data noupdate="0">
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp><data>
|
||||
|
||||
<record id="group_account_invoice" model="res.groups">
|
||||
<field name="name">Finance / Invoice</field>
|
||||
|
||||
@@ -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-25 03:47+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-06-26 03:58+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: account_budget
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data noupdate="True">
|
||||
|
||||
<data>
|
||||
|
||||
<!-- deactivate minimal account -->
|
||||
<record id="account.minimal_0" model="account.account">
|
||||
<field eval="False" name="active"/>
|
||||
@@ -21,6 +21,6 @@
|
||||
<record id="account.a_sale" model="account.account">
|
||||
<field eval="False" name="active"/>
|
||||
</record>
|
||||
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
@@ -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-25 03:47+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-06-26 03:58+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: account_coda
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data noupdate="0">
|
||||
<data noupdate="0">
|
||||
|
||||
<!--<wizard string="Send followups"
|
||||
name="account_followup.followup.print.all"
|
||||
@@ -13,23 +13,23 @@
|
||||
type="wizard" />-->
|
||||
|
||||
|
||||
<record id="view_account_followup_print" model="ir.ui.view">
|
||||
<record id="view_account_followup_print" model="ir.ui.view">
|
||||
<field name="name">account.followup.print.form</field>
|
||||
<field name="model">account.followup.print</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Send followups">
|
||||
<group col="4" colspan="6">
|
||||
<field name="followup_id"/>
|
||||
<field name="date"/>
|
||||
<newline/>
|
||||
</group>
|
||||
<separator colspan="4"/>
|
||||
<group col="2" colspan="4">
|
||||
<button special="cancel" string="Cancel" icon='gtk-cancel'/>
|
||||
<button name="do_continue" string="Continue" colspan="1" type="object" icon="gtk-ok"/>
|
||||
</group>
|
||||
</form>
|
||||
<form string="Send followups">
|
||||
<group col="4" colspan="6">
|
||||
<field name="followup_id"/>
|
||||
<field name="date"/>
|
||||
<newline/>
|
||||
</group>
|
||||
<separator colspan="4"/>
|
||||
<group col="2" colspan="4">
|
||||
<button special="cancel" string="Cancel" icon='gtk-cancel'/>
|
||||
<button name="do_continue" string="Continue" colspan="1" type="object" icon="gtk-ok"/>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.values" id="account_followup_print_values">
|
||||
<record model="ir.values" id="account_followup_print_values">
|
||||
<field name="model_id" ref="model_account_followup_followup" />
|
||||
<field name="object" eval="1" />
|
||||
<field name="name">Send followups</field>
|
||||
@@ -60,61 +60,61 @@
|
||||
|
||||
<!-- Screen2 -->
|
||||
|
||||
<record id="view_account_followup_print_all" model="ir.ui.view">
|
||||
<record id="view_account_followup_print_all" model="ir.ui.view">
|
||||
<field name="name">account.followup.print.all.form</field>
|
||||
<field name="model">account.followup.print.all</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Send followups">
|
||||
<group col="4" colspan="6">
|
||||
<notebook>
|
||||
<page string="Partner Selection">
|
||||
<separator string="Select partners to remind" colspan="4"/>
|
||||
<field name="partner_ids" colspan="4" nolabel="1"/>
|
||||
</page>
|
||||
<page string="Email Settings">
|
||||
<field name="email_conf" colspan="4"/>
|
||||
<field name="partner_lang" colspan="4"/>
|
||||
<field name="email_subject" colspan="4"/>
|
||||
<!--<separator string="Email body" colspan="4" attrs="{'readonly':[('partner_lang','=',True)]}"/>-->
|
||||
<separator string="Email body" colspan="4" />
|
||||
<field name="email_body" colspan="4" nolabel="1"/>
|
||||
<separator string="Legend" colspan="4"/>
|
||||
<label string="%%(partner_name)s: Partner name" colspan="2"/>
|
||||
<label string="%%(user_signature)s: User name" colspan="2"/>
|
||||
<label string="%%(followup_amount)s: Total Amount Due" colspan="2"/>
|
||||
<label string="%%(date)s: Current Date" colspan="2"/>
|
||||
<label string="%%(company_name)s: User's Company name" colspan="2"/>
|
||||
<label string="%%(company_currency)s: User's Company Currency" colspan="2"/>
|
||||
<label string="%%(heading)s: Move line header" colspan="2"/>
|
||||
<label string="%%(line)s: Ledger Posting lines" colspan="2"/>
|
||||
</page>
|
||||
</notebook>
|
||||
</group>
|
||||
<separator colspan="4"/>
|
||||
<group>
|
||||
<button special="cancel" string="Cancel" icon='gtk-cancel'/>
|
||||
<button name="do_print" string="Print Follow Ups" colspan="1" type="object" icon="gtk-print"/>
|
||||
<button name="do_mail" string="Send Mails" colspan="1" type="object" icon="gtk-execute"/>
|
||||
</group>
|
||||
</form>
|
||||
<form string="Send followups">
|
||||
<group col="4" colspan="6">
|
||||
<notebook>
|
||||
<page string="Partner Selection">
|
||||
<separator string="Select partners to remind" colspan="4"/>
|
||||
<field name="partner_ids" colspan="4" nolabel="1"/>
|
||||
</page>
|
||||
<page string="Email Settings">
|
||||
<field name="email_conf" colspan="4"/>
|
||||
<field name="partner_lang" colspan="4"/>
|
||||
<field name="email_subject" colspan="4"/>
|
||||
<!--<separator string="Email body" colspan="4" attrs="{'readonly':[('partner_lang','=',True)]}"/>-->
|
||||
<separator string="Email body" colspan="4" />
|
||||
<field name="email_body" colspan="4" nolabel="1"/>
|
||||
<separator string="Legend" colspan="4"/>
|
||||
<label string="%%(partner_name)s: Partner name" colspan="2"/>
|
||||
<label string="%%(user_signature)s: User name" colspan="2"/>
|
||||
<label string="%%(followup_amount)s: Total Amount Due" colspan="2"/>
|
||||
<label string="%%(date)s: Current Date" colspan="2"/>
|
||||
<label string="%%(company_name)s: User's Company name" colspan="2"/>
|
||||
<label string="%%(company_currency)s: User's Company Currency" colspan="2"/>
|
||||
<label string="%%(heading)s: Move line header" colspan="2"/>
|
||||
<label string="%%(line)s: Ledger Posting lines" colspan="2"/>
|
||||
</page>
|
||||
</notebook>
|
||||
</group>
|
||||
<separator colspan="4"/>
|
||||
<group>
|
||||
<button special="cancel" string="Cancel" icon='gtk-cancel'/>
|
||||
<button name="do_print" string="Print Follow Ups" colspan="1" type="object" icon="gtk-print"/>
|
||||
<button name="do_mail" string="Send Mails" colspan="1" type="object" icon="gtk-execute"/>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_account_followup_print_all_msg" model="ir.ui.view">
|
||||
<record id="view_account_followup_print_all_msg" model="ir.ui.view">
|
||||
<field name="name">account.followup.print.all.msg.form</field>
|
||||
<field name="model">account.followup.print.all</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Summary">
|
||||
<group col="4" colspan="6">
|
||||
<field name="summary" height="300" width="800"/>
|
||||
</group>
|
||||
<separator colspan="4"/>
|
||||
<group>
|
||||
<button special="cancel" string="Ok" icon='gtk-cancel'/>
|
||||
</group>
|
||||
</form>
|
||||
<form string="Summary">
|
||||
<group col="4" colspan="6">
|
||||
<field name="summary" height="300" width="800"/>
|
||||
</group>
|
||||
<separator colspan="4"/>
|
||||
<group>
|
||||
<button special="cancel" string="Ok" icon='gtk-cancel'/>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -128,5 +128,5 @@
|
||||
</record>
|
||||
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
@@ -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-25 03:47+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-06-26 03:58+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: account_payment
|
||||
|
||||
@@ -7,13 +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: 2009-11-17 09:23+0000\n"
|
||||
"Last-Translator: Fabien (Open ERP) <fp@tinyerp.com>\n"
|
||||
"PO-Revision-Date: 2010-06-27 21:01+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-22 04:17+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-06-28 03:48+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: account_voucher
|
||||
@@ -215,7 +215,7 @@ msgstr "Estado"
|
||||
#: selection:account.voucher.line,type:0
|
||||
#: rml:voucher.cash_receipt.drcr:0
|
||||
msgid "Debit"
|
||||
msgstr "Débito"
|
||||
msgstr "Debe"
|
||||
|
||||
#. module: account_voucher
|
||||
#: field:account.voucher,type:0
|
||||
|
||||
@@ -2,30 +2,30 @@
|
||||
<openerp>
|
||||
<data noupdate="1">
|
||||
|
||||
#
|
||||
# Sequences for sale.order
|
||||
#
|
||||
#
|
||||
# Sequences for sale.order
|
||||
#
|
||||
|
||||
<record model="ir.sequence.type" id="seq_type_auction_deposit">
|
||||
<field name="name">Auction deposit</field>
|
||||
<field name="code">auction.deposit</field>
|
||||
</record>
|
||||
<record model="ir.sequence" id="seq_sale_order">
|
||||
<field name="name">Auction deposit</field>
|
||||
<field name="code">auction.deposit</field>
|
||||
<field name="prefix">AD/</field>
|
||||
<field name="padding">3</field>
|
||||
</record>
|
||||
<record model="ir.sequence.type" id="seq_type_bid">
|
||||
<field name="name">Auction bid </field>
|
||||
<field name="code">auction.bid</field>
|
||||
</record>
|
||||
<record model="ir.sequence" id="seq_auction_bid">
|
||||
<field name="name">Auction bid</field>
|
||||
<field name="code">auction.bid</field>
|
||||
<field name="prefix">bid/</field>
|
||||
<field name="padding">3</field>
|
||||
</record>
|
||||
<record model="ir.sequence.type" id="seq_type_auction_deposit">
|
||||
<field name="name">Auction deposit</field>
|
||||
<field name="code">auction.deposit</field>
|
||||
</record>
|
||||
<record model="ir.sequence" id="seq_sale_order">
|
||||
<field name="name">Auction deposit</field>
|
||||
<field name="code">auction.deposit</field>
|
||||
<field name="prefix">AD/</field>
|
||||
<field name="padding">3</field>
|
||||
</record>
|
||||
<record model="ir.sequence.type" id="seq_type_bid">
|
||||
<field name="name">Auction bid </field>
|
||||
<field name="code">auction.bid</field>
|
||||
</record>
|
||||
<record model="ir.sequence" id="seq_auction_bid">
|
||||
<field name="name">Auction bid</field>
|
||||
<field name="code">auction.bid</field>
|
||||
<field name="prefix">bid/</field>
|
||||
<field name="padding">3</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
+163
-160
File diff suppressed because it is too large
Load Diff
@@ -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-25 03:47+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-06-26 03:58+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: audittrail
|
||||
|
||||
@@ -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: 2009-11-17 08:59+0000\n"
|
||||
"Last-Translator: Jordi Esteve (www.zikzakmedia.com) "
|
||||
"<jesteve@zikzakmedia.com>\n"
|
||||
"PO-Revision-Date: 2010-06-27 21:04+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-22 04:16+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-06-28 03:48+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: audittrail
|
||||
@@ -83,7 +82,7 @@ msgstr "Ver registro"
|
||||
#. module: audittrail
|
||||
#: model:ir.model,name:audittrail.model_audittrail_log_line
|
||||
msgid "audittrail.log.line"
|
||||
msgstr "audittrail.registro.linea"
|
||||
msgstr "auditoria.registro.linea"
|
||||
|
||||
#. module: audittrail
|
||||
#: field:audittrail.log,method:0
|
||||
@@ -212,7 +211,7 @@ msgstr "Reglas de auditoría"
|
||||
#. module: audittrail
|
||||
#: model:ir.model,name:audittrail.model_audittrail_rule
|
||||
msgid "audittrail.rule"
|
||||
msgstr "audittrail.regla"
|
||||
msgstr "auditoria.regla"
|
||||
|
||||
#. module: audittrail
|
||||
#: view:audittrail.rule:0
|
||||
@@ -227,7 +226,7 @@ msgstr "Registrar escrituras"
|
||||
#. module: audittrail
|
||||
#: model:ir.model,name:audittrail.model_audittrail_log
|
||||
msgid "audittrail.log"
|
||||
msgstr "audittrail.registro"
|
||||
msgstr "auditoria.registro"
|
||||
|
||||
#. module: audittrail
|
||||
#: field:audittrail.log.line,field_description:0
|
||||
|
||||
@@ -233,7 +233,6 @@ the rule to mark CC(mail to any other person defined in actions)."),
|
||||
@param email: pass the emails
|
||||
@param emailfrom: Pass name the email From else False
|
||||
@param context: A standard dictionary for contextual values """
|
||||
|
||||
body = self.format_mail(obj, body)
|
||||
if not emailfrom:
|
||||
if hasattr(obj, 'user_id') and obj.user_id and obj.user_id.address_id and\
|
||||
@@ -255,8 +254,7 @@ the rule to mark CC(mail to any other person defined in actions)."),
|
||||
@param cr: the current row, from the database cursor,
|
||||
@param uid: the current user’s ID for security checks,
|
||||
@param context: A standard dictionary for contextual values """
|
||||
|
||||
ok = True
|
||||
ok = True
|
||||
if eval(action.domain):
|
||||
obj_ids = obj._table.search(cr, uid, eval(action.domain), context=context)
|
||||
if not obj.id in obj_ids:
|
||||
@@ -277,7 +275,8 @@ the rule to mark CC(mail to any other person defined in actions)."),
|
||||
ok = ok and (not action.trg_state_from or action.trg_state_from==obj.state)
|
||||
if state_to:
|
||||
ok = ok and (not action.trg_state_to or action.trg_state_to==state_to)
|
||||
|
||||
elif action.trg_state_to:
|
||||
ok = False
|
||||
reg_name = action.regex_name
|
||||
result_name = True
|
||||
if reg_name:
|
||||
|
||||
@@ -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-25 03:47+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-06-26 03:58+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: base_module_quality
|
||||
|
||||
@@ -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-25 03:47+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-06-26 03:58+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: base_module_quality
|
||||
|
||||
@@ -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-25 03:47+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-06-26 03:58+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
"X-Poedit-Country: GREECE\n"
|
||||
"X-Poedit-Language: Greek\n"
|
||||
|
||||
@@ -1,71 +0,0 @@
|
||||
# Translation of OpenERP Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * board_association
|
||||
#
|
||||
msgid ""
|
||||
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-24 01:15+0000\n"
|
||||
"Last-Translator: Panayiotis Konstantinidis <Unknown>\n"
|
||||
"Language-Team: nls@hellug.gr <nls@hellug.gr>\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:46+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
"X-Poedit-Country: GREECE\n"
|
||||
"X-Poedit-Language: Greek\n"
|
||||
"X-Poedit-SourceCharset: utf-8\n"
|
||||
|
||||
#. module: board_association
|
||||
#: model:ir.ui.menu,name:board_association.menu_board_associations_manager
|
||||
msgid "Associations"
|
||||
msgstr "Συνεταιρισμοί"
|
||||
|
||||
#. module: board_association
|
||||
#: model:ir.module.module,shortdesc:board_association.module_meta_information
|
||||
msgid "Dashboard for Associations"
|
||||
msgstr "Πίνακας για Συνεταιρισμούς"
|
||||
|
||||
#. module: board_association
|
||||
#: constraint:ir.ui.view:0
|
||||
msgid "Invalid XML for View Architecture!"
|
||||
msgstr "Άκυρο XML για Αρχιτεκτονική Όψης!"
|
||||
|
||||
#. module: board_association
|
||||
#: view:board.board:0
|
||||
#: model:ir.actions.act_window,name:board_association.open_board_associations_manager
|
||||
msgid "Association Dashboard"
|
||||
msgstr "Πίνακας Συνεταιρισμών"
|
||||
|
||||
#. module: board_association
|
||||
#: view:board.board:0
|
||||
msgid "My tasks"
|
||||
msgstr "Οι αναθέσεις μου"
|
||||
|
||||
#. module: board_association
|
||||
#: view:board.board:0
|
||||
msgid "New members"
|
||||
msgstr "Νέα μέλη"
|
||||
|
||||
#. module: board_association
|
||||
#: view:board.board:0
|
||||
msgid "Unpaid Invoices"
|
||||
msgstr "Απλήρωτα Τιμολόγια"
|
||||
|
||||
#. module: board_association
|
||||
#: constraint:ir.actions.act_window:0
|
||||
msgid "Invalid model name in the action definition."
|
||||
msgstr "Λανθασμένο όνομα μοντέλου στον ορισμό ενέργειας"
|
||||
|
||||
#. module: board_association
|
||||
#: view:board.board:0
|
||||
msgid "Next Events"
|
||||
msgstr "Επόμενα Συμβάντα"
|
||||
|
||||
#. module: board_association
|
||||
#: view:board.board:0
|
||||
msgid "Registrations by Events"
|
||||
msgstr "Καταχωρήσεις ανά Συμβάν"
|
||||
@@ -1,125 +0,0 @@
|
||||
# Translation of OpenERP Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * board_auction
|
||||
#
|
||||
msgid ""
|
||||
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-24 01:15+0000\n"
|
||||
"Last-Translator: Panayiotis Konstantinidis <Unknown>\n"
|
||||
"Language-Team: nls@hellug.gr <nls@hellug.gr>\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:46+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
"X-Poedit-Country: GREECE\n"
|
||||
"X-Poedit-Language: Greek\n"
|
||||
"X-Poedit-SourceCharset: utf-8\n"
|
||||
|
||||
#. module: board_auction
|
||||
#: constraint:ir.ui.view:0
|
||||
msgid "Invalid XML for View Architecture!"
|
||||
msgstr "Invalid XML for View Architecture!"
|
||||
|
||||
#. module: board_auction
|
||||
#: view:board.board:0
|
||||
msgid "Objects by day"
|
||||
msgstr "Αντικείμενα ανά Ημέρα"
|
||||
|
||||
#. module: board_auction
|
||||
#: view:board.board:0
|
||||
msgid "Objects statistics"
|
||||
msgstr "Στατιστικά Αντικειμένων"
|
||||
|
||||
#. module: board_auction
|
||||
#: model:ir.ui.menu,name:board_auction.menu_board_auction_manager
|
||||
msgid "Auction Manager"
|
||||
msgstr "Υπεύθυνος Δημοπρασίας"
|
||||
|
||||
#. module: board_auction
|
||||
#: view:board.board:0
|
||||
msgid "Summary pointing by user"
|
||||
msgstr "Περίληψη χτυπημάτων ανά χρήστη"
|
||||
|
||||
#. module: board_auction
|
||||
#: model:ir.ui.menu,name:board_auction.menu_board_auction
|
||||
msgid "Auction Member"
|
||||
msgstr "Μέλος Δημοπρασίας"
|
||||
|
||||
#. module: board_auction
|
||||
#: view:board.board:0
|
||||
msgid "My Latest Deposits"
|
||||
msgstr "Οι Τελευταίες Καταθέσεις μου"
|
||||
|
||||
#. module: board_auction
|
||||
#: model:ir.actions.act_window,name:board_auction.open_board_auction
|
||||
msgid "Auction member board"
|
||||
msgstr "Πίνακας μέλους δημοπρασίας"
|
||||
|
||||
#. module: board_auction
|
||||
#: view:board.board:0
|
||||
msgid "Auction manager "
|
||||
msgstr "Υπεύθυνος Δημοπρασίας "
|
||||
|
||||
#. module: board_auction
|
||||
#: model:ir.module.module,shortdesc:board_auction.module_meta_information
|
||||
msgid "Board for Auction"
|
||||
msgstr "Πίνακας Δημοπρασίας"
|
||||
|
||||
#. module: board_auction
|
||||
#: view:board.board:0
|
||||
msgid "Estimations/Adjudication"
|
||||
msgstr "Εκτιμήσεις/Κατακυρώσεις"
|
||||
|
||||
#. module: board_auction
|
||||
#: view:board.board:0
|
||||
msgid "Total Adjudications"
|
||||
msgstr "Σύνολο Κατακυρώσεων"
|
||||
|
||||
#. module: board_auction
|
||||
#: view:board.board:0
|
||||
msgid "Latest objects"
|
||||
msgstr "Τελευταία αντικείμενα"
|
||||
|
||||
#. module: board_auction
|
||||
#: view:board.board:0
|
||||
msgid "Latest deposits"
|
||||
msgstr "Τελευταίες καταθέσεις"
|
||||
|
||||
#. module: board_auction
|
||||
#: constraint:ir.actions.act_window:0
|
||||
msgid "Invalid model name in the action definition."
|
||||
msgstr "Λανθασμένο όνομα μοντέλου στον ορισμό ενέργειας"
|
||||
|
||||
#. module: board_auction
|
||||
#: view:board.board:0
|
||||
msgid "Menu"
|
||||
msgstr "Μενού"
|
||||
|
||||
#. module: board_auction
|
||||
#: view:board.board:0
|
||||
msgid "My objects By Day"
|
||||
msgstr "Τα Ανικείμενά μου ανά Ημέρα"
|
||||
|
||||
#. module: board_auction
|
||||
#: view:board.board:0
|
||||
msgid "My board"
|
||||
msgstr "Ο Πίνακάς μου"
|
||||
|
||||
#. module: board_auction
|
||||
#: model:ir.actions.act_window,name:board_auction.open_board_auction_manager
|
||||
msgid "Auction manager board"
|
||||
msgstr "Πίνακας Υπεύθυνου Δημοπρασίας"
|
||||
|
||||
#. module: board_auction
|
||||
#: view:board.board:0
|
||||
msgid "Min/Adj/Max"
|
||||
msgstr "Ελαχ./Επικ./Μέγ."
|
||||
|
||||
#. module: board_auction
|
||||
#: view:board.board:0
|
||||
msgid "My Latest Objects"
|
||||
msgstr "Τα Τελευταία μου Αντικείμενα"
|
||||
@@ -1,122 +0,0 @@
|
||||
# Translation of OpenERP Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * board_crm_configuration
|
||||
#
|
||||
msgid ""
|
||||
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-24 01:16+0000\n"
|
||||
"Last-Translator: Panayiotis Konstantinidis <Unknown>\n"
|
||||
"Language-Team: nls@hellug.gr <nls@hellug.gr>\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:46+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
"X-Poedit-Country: GREECE\n"
|
||||
"X-Poedit-Language: Greek\n"
|
||||
"X-Poedit-SourceCharset: utf-8\n"
|
||||
|
||||
#. module: board_crm_configuration
|
||||
#: model:ir.module.module,shortdesc:board_crm_configuration.module_meta_information
|
||||
msgid "Dashboard for CRM Configuration"
|
||||
msgstr "Πίνακας Ρυθμίσεων CRM"
|
||||
|
||||
#. module: board_crm_configuration
|
||||
#: view:board.board:0
|
||||
#: model:ir.ui.menu,name:board_crm_configuration.menu_board_statistics_dash
|
||||
msgid "Statistics Dashboard"
|
||||
msgstr "Πίνακας Στατιστικών Μεγεθών"
|
||||
|
||||
#. module: board_crm_configuration
|
||||
#: constraint:ir.ui.view:0
|
||||
msgid "Invalid XML for View Architecture!"
|
||||
msgstr "Άκυρο XML για Αρχιτεκτονική Όψης!"
|
||||
|
||||
#. module: board_crm_configuration
|
||||
#: view:board.board:0
|
||||
#: model:ir.actions.act_window,name:board_crm_configuration.act_oppor_categ
|
||||
msgid "Opportunities By Categories"
|
||||
msgstr "Ευκαιρίες ανά Κατηγορίες"
|
||||
|
||||
#. module: board_crm_configuration
|
||||
#: view:board.board:0
|
||||
#: model:ir.actions.act_window,name:board_crm_configuration.act_my_cases
|
||||
msgid "My Cases"
|
||||
msgstr "Τα Θέματά μου"
|
||||
|
||||
#. module: board_crm_configuration
|
||||
#: model:ir.actions.act_window,name:board_crm_configuration.open_board_crm
|
||||
msgid "CRM Dashboard"
|
||||
msgstr "Πίνακας Αναφορών CRM"
|
||||
|
||||
#. module: board_crm_configuration
|
||||
#: view:board.board:0
|
||||
#: model:ir.ui.menu,name:board_crm_configuration.menu_board_crm
|
||||
msgid "Connecting Dashboard"
|
||||
msgstr "Σύνδεση Πινάκων Αναφορών"
|
||||
|
||||
#. module: board_crm_configuration
|
||||
#: view:board.board:0
|
||||
#: model:ir.actions.act_window,name:board_crm_configuration.act_leads_month_user
|
||||
msgid "Leads Of The Month By User"
|
||||
msgstr "Σύνδεσμοι Μηνός ανά Χρήστη"
|
||||
|
||||
#. module: board_crm_configuration
|
||||
#: view:board.board:0
|
||||
#: view:report.crm.case.section.stage:0
|
||||
msgid "Leads By Stage"
|
||||
msgstr "Σύνδεσμοι ανά Στάδιο"
|
||||
|
||||
#. module: board_crm_configuration
|
||||
#: view:board.board:0
|
||||
msgid "My Meetings"
|
||||
msgstr "Οι Συσκέψεις μου"
|
||||
|
||||
#. module: board_crm_configuration
|
||||
#: model:ir.ui.menu,name:board_crm_configuration.menu_board_crm_config
|
||||
msgid "CRM Configuration"
|
||||
msgstr "Ρυθμίσεις CRM"
|
||||
|
||||
#. module: board_crm_configuration
|
||||
#: view:board.board:0
|
||||
#: model:ir.actions.act_window,name:board_crm_configuration.act_jobs_categ
|
||||
msgid "Jobs Requests Of The Month by Applied Job"
|
||||
msgstr "Αιτήσεις Εργασίας του Μήνα ανά Θέση Αίτησης"
|
||||
|
||||
#. module: board_crm_configuration
|
||||
#: constraint:ir.actions.act_window:0
|
||||
msgid "Invalid model name in the action definition."
|
||||
msgstr "Λανθασμένο όνομα μοντέλου στον ορισμό ενέργειας"
|
||||
|
||||
#. module: board_crm_configuration
|
||||
#: view:board.board:0
|
||||
msgid "My Sales Pipeline"
|
||||
msgstr "Το Κανάλι Πωλήσεών μου"
|
||||
|
||||
#. module: board_crm_configuration
|
||||
#: view:report.crm.case.user:0
|
||||
msgid "Cases by User and Section"
|
||||
msgstr "Θέματα ανά Χρήστη και Τμήμα"
|
||||
|
||||
#. module: board_crm_configuration
|
||||
#: view:board.board:0
|
||||
msgid "My Leads By Stage"
|
||||
msgstr "Οι Σύνδεσμοί μου ανά Στάδιο"
|
||||
|
||||
#. module: board_crm_configuration
|
||||
#: view:report.crm.case.categ:0
|
||||
msgid "Cases by Sections and Categories"
|
||||
msgstr "Θέματα ανά Τμήμα και Κατηγορίες"
|
||||
|
||||
#. module: board_crm_configuration
|
||||
#: model:ir.actions.act_window,name:board_crm_configuration.open_board_statistical_dash
|
||||
msgid "CRM - Statistics Dashboard"
|
||||
msgstr "CRM - Πίνακας Στατιστικών Μεγεθών"
|
||||
|
||||
#. module: board_crm_configuration
|
||||
#: view:board.board:0
|
||||
msgid "My Leads"
|
||||
msgstr "Οι Σύνδεσμοί μου"
|
||||
@@ -1,92 +0,0 @@
|
||||
# Translation of OpenERP Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * board_document
|
||||
#
|
||||
msgid ""
|
||||
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-24 01:21+0000\n"
|
||||
"Last-Translator: Panayiotis Konstantinidis <Unknown>\n"
|
||||
"Language-Team: nls@hellug.gr <nls@hellug.gr>\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"
|
||||
"X-Poedit-Country: GREECE\n"
|
||||
"X-Poedit-Language: Greek\n"
|
||||
"X-Poedit-SourceCharset: utf-8\n"
|
||||
|
||||
#. module: board_document
|
||||
#: constraint:ir.ui.view:0
|
||||
msgid "Invalid XML for View Architecture!"
|
||||
msgstr "Άκυρο XML για Αρχιτεκτονική Όψης!"
|
||||
|
||||
#. module: board_document
|
||||
#: view:board.board:0
|
||||
msgid "New Files"
|
||||
msgstr "Νέα Αρχεία"
|
||||
|
||||
#. module: board_document
|
||||
#: model:ir.actions.act_window,name:board_document.open_board_document_manager
|
||||
#: model:ir.ui.menu,name:board_document.menu_board_document_manager
|
||||
msgid "Document Dashboard"
|
||||
msgstr "Πίνακας Εγγραφών"
|
||||
|
||||
#. module: board_document
|
||||
#: view:board.board:0
|
||||
msgid "Wall of Shame"
|
||||
msgstr "Τείχος της Ντροπής"
|
||||
|
||||
#. module: board_document
|
||||
#: view:board.board:0
|
||||
msgid "File Size by Month"
|
||||
msgstr "Μέγεθος Αρχείων ανά Μήνα"
|
||||
|
||||
#. module: board_document
|
||||
#: view:board.board:0
|
||||
msgid "Files by Month"
|
||||
msgstr "Αρχεία ανά Μήνα"
|
||||
|
||||
#. module: board_document
|
||||
#: model:ir.actions.act_window,name:board_document.open_board_document_manager1
|
||||
#: model:ir.ui.menu,name:board_document.menu_board_document_manager1
|
||||
msgid "Statistics by User"
|
||||
msgstr "Στατιστικά ανά Χρήστη"
|
||||
|
||||
#. module: board_document
|
||||
#: view:board.board:0
|
||||
msgid "Files by Resource Type"
|
||||
msgstr "Αρχεία ανά Τύπο Προέλευσης"
|
||||
|
||||
#. module: board_document
|
||||
#: constraint:ir.actions.act_window:0
|
||||
msgid "Invalid model name in the action definition."
|
||||
msgstr "Λανθασμένο όνομα μοντέλου στον ορισμό ενέργειας"
|
||||
|
||||
#. module: board_document
|
||||
#: model:ir.module.module,shortdesc:board_document.module_meta_information
|
||||
msgid "Dashboard for Document Management"
|
||||
msgstr "Πίνακας Διαχείρισης Εγγραφών"
|
||||
|
||||
#. module: board_document
|
||||
#: view:board.board:0
|
||||
msgid "Files by Partner"
|
||||
msgstr "Αρχεία ανά Συνεργάτη"
|
||||
|
||||
#. module: board_document
|
||||
#: model:ir.ui.menu,name:board_document.menu_board_document
|
||||
msgid "Document"
|
||||
msgstr "Έγγραφο"
|
||||
|
||||
#. module: board_document
|
||||
#: view:board.board:0
|
||||
msgid "Files by Users"
|
||||
msgstr "Αρχεία ανά Χρήστη"
|
||||
|
||||
#. module: board_document
|
||||
#: view:board.board:0
|
||||
msgid "Document board"
|
||||
msgstr "Πίνακας εγγράφου"
|
||||
@@ -1,142 +0,0 @@
|
||||
# Translation of OpenERP Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * board_project
|
||||
#
|
||||
msgid ""
|
||||
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-24 01:22+0000\n"
|
||||
"Last-Translator: Panayiotis Konstantinidis <Unknown>\n"
|
||||
"Language-Team: nls@hellug.gr <nls@hellug.gr>\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:46+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
"X-Poedit-Country: GREECE\n"
|
||||
"X-Poedit-Language: Greek\n"
|
||||
"X-Poedit-SourceCharset: utf-8\n"
|
||||
|
||||
#. module: board_project
|
||||
#: view:board.board:0
|
||||
msgid "My project's planning"
|
||||
msgstr "Σχεδιασμός Έργων μου"
|
||||
|
||||
#. module: board_project
|
||||
#: view:hr_timesheet_sheet.sheet:0
|
||||
#: model:ir.actions.act_window,name:board_project.act_hr_timesheet_sheet
|
||||
msgid "Timesheets"
|
||||
msgstr "Φύλλα Χρόνου Εργασίας"
|
||||
|
||||
#. module: board_project
|
||||
#: constraint:ir.actions.act_window:0
|
||||
msgid "Invalid model name in the action definition."
|
||||
msgstr "Λανθασμένο όνομα μοντέλου στον ορισμό ενέργειας"
|
||||
|
||||
#. module: board_project
|
||||
#: view:board.board:0
|
||||
#: model:ir.actions.act_window,name:board_project.act_my_project
|
||||
msgid "My projects"
|
||||
msgstr "Τα Έργα μου"
|
||||
|
||||
#. module: board_project
|
||||
#: model:ir.actions.act_window,name:board_project.action_view_task_tree_deadline
|
||||
msgid "My Task's Deadlines"
|
||||
msgstr "Προθεσμίες Αναθέσεών μου"
|
||||
|
||||
#. module: board_project
|
||||
#: view:project.task:0
|
||||
msgid "My Tasks"
|
||||
msgstr "Οι Αναθέσεις μου"
|
||||
|
||||
#. module: board_project
|
||||
#: view:board.board:0
|
||||
#: model:ir.actions.act_window,name:board_project.action_view_board_note_tree
|
||||
msgid "Public Notes"
|
||||
msgstr "Κοινοποιημένες Σημειώσεις"
|
||||
|
||||
#. module: board_project
|
||||
#: model:ir.actions.act_window,name:board_project.open_board_project
|
||||
#: model:ir.ui.menu,name:board_project.menu_board_project
|
||||
msgid "Project Dashboard"
|
||||
msgstr "Πίνακας Έργων"
|
||||
|
||||
#. module: board_project
|
||||
#: model:ir.module.module,shortdesc:board_project.module_meta_information
|
||||
msgid "Board for project users"
|
||||
msgstr "Πίνακας Χρηστών Έργου"
|
||||
|
||||
#. module: board_project
|
||||
#: model:ir.actions.act_window,name:board_project.action_project_pipeline_user
|
||||
msgid "Pipeline of tasks"
|
||||
msgstr "Κανάλι Αναθέσεων"
|
||||
|
||||
#. module: board_project
|
||||
#: view:board.board:0
|
||||
msgid "My Planning"
|
||||
msgstr "Ο Σχεδιασμός μου"
|
||||
|
||||
#. module: board_project
|
||||
#: view:board.board:0
|
||||
#: model:ir.actions.act_window,name:board_project.act_my_account
|
||||
msgid "My accounts to invoice"
|
||||
msgstr "Οι λογαριασμοί μου προς τιμολόγηση"
|
||||
|
||||
#. module: board_project
|
||||
#: model:ir.actions.act_window,name:board_project.open_board_project_manager
|
||||
#: model:ir.ui.menu,name:board_project.menu_board_project_manager
|
||||
msgid "Project Manager Dashboard"
|
||||
msgstr "Πίνακας Αναφορών Διευθυντή Έργου"
|
||||
|
||||
#. module: board_project
|
||||
#: view:board.board:0
|
||||
msgid "My Deadlines"
|
||||
msgstr "Οι Προθεσμίες μου"
|
||||
|
||||
#. module: board_project
|
||||
#: constraint:ir.ui.view:0
|
||||
msgid "Invalid XML for View Architecture!"
|
||||
msgstr "Άκυρο XML για Αρχιτεκτονική Όψης!"
|
||||
|
||||
#. module: board_project
|
||||
#: view:board.board:0
|
||||
msgid "User's timesheets"
|
||||
msgstr "Φύλλα χρόνου χρηστών"
|
||||
|
||||
#. module: board_project
|
||||
#: model:ir.ui.menu,name:board_project.next_id_86
|
||||
msgid "Project"
|
||||
msgstr "Έργο"
|
||||
|
||||
#. module: board_project
|
||||
#: view:board.board:0
|
||||
msgid "Project manager board"
|
||||
msgstr "Πίνακας διευθυντή έργου"
|
||||
|
||||
#. module: board_project
|
||||
#: view:board.board:0
|
||||
#: model:ir.actions.act_window,name:board_project.action_view_task_tree
|
||||
msgid "My Open Tasks"
|
||||
msgstr "Οι Ανοικτές Αναθέσεις μου"
|
||||
|
||||
#. module: board_project
|
||||
#: view:board.board:0
|
||||
msgid "My Board"
|
||||
msgstr "Ο Πίνακάς μου"
|
||||
|
||||
#. module: board_project
|
||||
#: view:board.board:0
|
||||
msgid "My tasks board"
|
||||
msgstr "Ο πίνακας αναθέσεών μου"
|
||||
|
||||
#. module: board_project
|
||||
#: view:board.board:0
|
||||
msgid "My user's pipeline"
|
||||
msgstr "Το κανάλι μου"
|
||||
|
||||
#. module: board_project
|
||||
#: view:board.board:0
|
||||
msgid "My Timesheet"
|
||||
msgstr "Το Φύλλο Χρόνου μου"
|
||||
@@ -69,12 +69,10 @@ this if you want the rule to send an email to the partner."),
|
||||
return tools.email_send(emailfrom, emails, name, body, reply_to=reply_to, openobject_id=str(obj.id))
|
||||
|
||||
def do_check(self, cr, uid, action, obj, 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 context: A standard dictionary for contextual values"""
|
||||
|
||||
ok = super(base_action_rule, self).do_check(cr, uid, action, obj, context=context)
|
||||
|
||||
if hasattr(obj, 'section_id'):
|
||||
@@ -89,7 +87,6 @@ this if you want the rule to send an email to the partner."),
|
||||
@param cr: the current row, from the database cursor,
|
||||
@param uid: the current user’s ID for security checks,
|
||||
@param context: A standard dictionary for contextual values """
|
||||
|
||||
res = super(base_action_rule, self).do_action(cr, uid, action, model_obj, obj, context=context)
|
||||
write = {}
|
||||
|
||||
@@ -125,7 +122,7 @@ this if you want the rule to send an email to the partner."),
|
||||
@param context: A standard dictionary for contextual values """
|
||||
|
||||
res = super(base_action_rule, self).state_get(cr, uid, context=context)
|
||||
return res + [('escalate', 'Escalate')] + crm.AVAILABLE_STATES
|
||||
return res + crm.AVAILABLE_STATES
|
||||
|
||||
def priority_get(self, cr, uid, context={}):
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data noupdate="1">
|
||||
<record model="crm.case.section" id="section_sales_department">
|
||||
<field name="name">Sales Department</field>
|
||||
<field name="code">Sales</field>
|
||||
</record>
|
||||
<record model="crm.case.section" id="section_sales_department">
|
||||
<field name="name">Sales Department</field>
|
||||
<field name="code">Sales</field>
|
||||
</record>
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
+18
-41
@@ -37,7 +37,6 @@ class crm_lead(osv.osv, crm_case):
|
||||
_description = "Lead"
|
||||
_order = "priority, id desc"
|
||||
_inherit = ['mailgate.thread','res.partner.address']
|
||||
|
||||
def _compute_day(self, cr, uid, ids, fields, args, context={}):
|
||||
"""
|
||||
@param cr: the current row, from the database cursor,
|
||||
@@ -97,20 +96,20 @@ class crm_lead(osv.osv, crm_case):
|
||||
|
||||
_columns = {
|
||||
# From crm.case
|
||||
'name': fields.char('Name', size=64),
|
||||
'active': fields.boolean('Active', required=False),
|
||||
'name': fields.char('Name', size=64),
|
||||
'active': fields.boolean('Active', required=False),
|
||||
'date_action_last': fields.datetime('Last Action', readonly=1),
|
||||
'date_action_next': fields.datetime('Next Action', readonly=1),
|
||||
'email_from': fields.char('Email', size=128, help="These people will receive email."),
|
||||
'email_from': fields.char('Email', size=128, help="E-mail address of the contact"),
|
||||
'section_id': fields.many2one('crm.case.section', 'Sales Team', \
|
||||
select=True, help='Sales team to which Case belongs to.\
|
||||
Define Responsible user and Email account for mail gateway.'),
|
||||
select=True, help='Sales team to which this case belongs to.\
|
||||
Defines responsible user and e-mail address for the mail gateway.'),
|
||||
'create_date': fields.datetime('Creation Date' , readonly=True),
|
||||
'email_cc': fields.text('Watchers Emails', size=252 , help="These \
|
||||
people will receive a copy of the future communication between partner \
|
||||
and users by email"),
|
||||
addresses will receive a copy of the future e-mail communication between partner \
|
||||
and users"),
|
||||
'description': fields.text('Notes'),
|
||||
'write_date': fields.datetime('Update Date' , readonly=True),
|
||||
'write_date': fields.datetime('Update Date' , readonly=True),
|
||||
|
||||
# Lead fields
|
||||
'categ_id': fields.many2one('crm.case.categ', 'Lead Source', \
|
||||
@@ -153,6 +152,7 @@ and users by email"),
|
||||
'user_id': crm_case._get_default_user,
|
||||
'email_from': crm_case._get_default_email,
|
||||
'state': lambda *a: 'draft',
|
||||
'type': lambda *a: 'lead',
|
||||
'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],
|
||||
@@ -274,8 +274,8 @@ and users by email"),
|
||||
res = mailgate_pool.get_partner(cr, uid, msg.get('from') or msg.get_unixfrom())
|
||||
if res:
|
||||
vals.update(res)
|
||||
res = self.create(cr, uid, vals, context)
|
||||
|
||||
res = self.create(cr, uid, vals, context)
|
||||
|
||||
attachents = msg.get('attachments', [])
|
||||
for attactment in attachents or []:
|
||||
@@ -318,39 +318,16 @@ and users by email"),
|
||||
if res and maps.get(res.group(1).lower()):
|
||||
key = maps.get(res.group(1).lower())
|
||||
vls[key] = res.group(2).lower()
|
||||
|
||||
vals.update(vls)
|
||||
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())
|
||||
# Unfortunately the API is based on lists
|
||||
# but we want to update the state based on the
|
||||
# previous state, so we have to loop:
|
||||
for case in self.browse(cr, uid, ids, context=context):
|
||||
values = dict(vals)
|
||||
if case.state == crm.AVAILABLE_STATES[4][0]: #pending
|
||||
values.update(state=crm.AVAILABLE_STATES[1][0]) #open
|
||||
res = self.write(cr, uid, [case.id], values, context=context)
|
||||
|
||||
return res
|
||||
|
||||
|
||||
@@ -2,79 +2,79 @@
|
||||
<openerp>
|
||||
<data noupdate="1">
|
||||
|
||||
|
||||
|
||||
<!-- CASE STATUS(stage_id) -->
|
||||
<record model="crm.case.stage" id="stage_lead1">
|
||||
<field name="name">New</field>
|
||||
<field name="section_id" ref="section_sales_department"/>
|
||||
<field name="object_id" search="[('model','=','crm.lead')]" model="ir.model"/>
|
||||
<field name="object_id" search="[('model','=','crm.lead')]" model="ir.model"/>
|
||||
</record>
|
||||
<record model="crm.case.stage" id="stage_lead2">
|
||||
<field name="name">Assigned</field>
|
||||
<field name="section_id" ref="section_sales_department"/>
|
||||
<field name="object_id" search="[('model','=','crm.lead')]" model="ir.model"/>
|
||||
<field name="object_id" search="[('model','=','crm.lead')]" model="ir.model"/>
|
||||
</record>
|
||||
<record model="crm.case.stage" id="stage_lead3">
|
||||
<field name="name">In Process</field>
|
||||
<field name="section_id" ref="section_sales_department"/>
|
||||
<field name="object_id" search="[('model','=','crm.lead')]" model="ir.model"/>
|
||||
<field name="object_id" search="[('model','=','crm.lead')]" model="ir.model"/>
|
||||
</record>
|
||||
<record model="crm.case.stage" id="stage_lead4">
|
||||
<field name="name">Converted</field>
|
||||
<field name="section_id" ref="section_sales_department"/>
|
||||
<field name="object_id" search="[('model','=','crm.lead')]" model="ir.model"/>
|
||||
<field name="object_id" search="[('model','=','crm.lead')]" model="ir.model"/>
|
||||
</record>
|
||||
<record model="crm.case.stage" id="stage_lead5">
|
||||
<field name="name">Recycled</field>
|
||||
<field name="section_id" ref="section_sales_department"/>
|
||||
<field name="object_id" search="[('model','=','crm.lead')]" model="ir.model"/>
|
||||
<field name="object_id" search="[('model','=','crm.lead')]" model="ir.model"/>
|
||||
</record>
|
||||
<record model="crm.case.stage" id="stage_lead6">
|
||||
<field name="name">Dead</field>
|
||||
<field name="section_id" ref="section_sales_department"/>
|
||||
<field name="object_id" search="[('model','=','crm.lead')]" model="ir.model"/>
|
||||
<field name="object_id" search="[('model','=','crm.lead')]" model="ir.model"/>
|
||||
</record>
|
||||
|
||||
<!-- CASE CATEGORY2(category2_id) -->
|
||||
<record model="crm.case.resource.type" id="type_lead1">
|
||||
<field name="name">Telesales</field>
|
||||
<field name="section_id" ref="section_sales_department"/>
|
||||
<field name="object_id" search="[('model','=','crm.lead')]" model="ir.model"/>
|
||||
<field name="object_id" search="[('model','=','crm.lead')]" model="ir.model"/>
|
||||
</record>
|
||||
<record model="crm.case.resource.type" id="type_lead2">
|
||||
<field name="name">Mail</field>
|
||||
<field name="section_id" ref="section_sales_department"/>
|
||||
<field name="object_id" search="[('model','=','crm.lead')]" model="ir.model"/>
|
||||
<field name="object_id" search="[('model','=','crm.lead')]" model="ir.model"/>
|
||||
</record>
|
||||
<record model="crm.case.resource.type" id="type_lead3">
|
||||
<field name="name">Email</field>
|
||||
<field name="section_id" ref="section_sales_department"/>
|
||||
<field name="object_id" search="[('model','=','crm.lead')]" model="ir.model"/>
|
||||
<field name="object_id" search="[('model','=','crm.lead')]" model="ir.model"/>
|
||||
</record>
|
||||
<record model="crm.case.resource.type" id="type_lead4">
|
||||
<field name="name">Print</field>
|
||||
<field name="section_id" ref="section_sales_department"/>
|
||||
<field name="object_id" search="[('model','=','crm.lead')]" model="ir.model"/>
|
||||
<field name="object_id" search="[('model','=','crm.lead')]" model="ir.model"/>
|
||||
</record>
|
||||
<record model="crm.case.resource.type" id="type_lead5">
|
||||
<field name="name">Web</field>
|
||||
<field name="section_id" ref="section_sales_department"/>
|
||||
<field name="object_id" search="[('model','=','crm.lead')]" model="ir.model"/>
|
||||
<field name="object_id" search="[('model','=','crm.lead')]" model="ir.model"/>
|
||||
</record>
|
||||
<record model="crm.case.resource.type" id="type_lead6">
|
||||
<field name="name">Radio</field>
|
||||
<field name="section_id" ref="section_sales_department"/>
|
||||
<field name="object_id" search="[('model','=','crm.lead')]" model="ir.model"/>
|
||||
<field name="object_id" search="[('model','=','crm.lead')]" model="ir.model"/>
|
||||
</record>
|
||||
<record model="crm.case.resource.type" id="type_lead7">
|
||||
<field name="name">Television</field>
|
||||
<field name="section_id" ref="section_sales_department"/>
|
||||
<field name="object_id" search="[('model','=','crm.lead')]" model="ir.model"/>
|
||||
<field name="object_id" search="[('model','=','crm.lead')]" model="ir.model"/>
|
||||
</record>
|
||||
<record model="crm.case.resource.type" id="type_lead8">
|
||||
<field name="name">Newsletter</field>
|
||||
<field name="section_id" ref="section_sales_department"/>
|
||||
<field name="object_id" search="[('model','=','crm.lead')]" model="ir.model"/>
|
||||
<field name="object_id" search="[('model','=','crm.lead')]" model="ir.model"/>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0"?>
|
||||
<openerp>
|
||||
<data noupdate="1">
|
||||
<data>
|
||||
|
||||
<record model="ir.actions.act_window" id="crm_case_category_act_leads_all">
|
||||
<field name="name">Leads</field>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<!--Lead Stage Form view -->
|
||||
<!--Lead Stage Form view -->
|
||||
|
||||
<record id="crm_lead_stage_act" model="ir.actions.act_window">
|
||||
<field name="name">Lead Stages</field>
|
||||
@@ -18,7 +18,7 @@
|
||||
parent="menu_crm_config_lead" />
|
||||
|
||||
|
||||
<!-- Resource Type Form View -->
|
||||
<!-- Resource Type Form View -->
|
||||
|
||||
<record id="crm_lead_resource_act" model="ir.actions.act_window">
|
||||
<field name="name">Lead Resource Type</field>
|
||||
@@ -34,7 +34,7 @@
|
||||
groups="base.group_extended" sequence="2"
|
||||
parent="menu_crm_config_lead" />
|
||||
|
||||
<!-- CRM Lead Form View -->
|
||||
<!-- CRM Lead Form View -->
|
||||
|
||||
<record model="ir.ui.view" id="crm_case_form_view_leads">
|
||||
<field name="name">CRM - Leads Form</field>
|
||||
@@ -165,9 +165,10 @@
|
||||
<field name="message_ids" colspan="4" nolabel="1" mode="form,tree">
|
||||
<form string="Communication history">
|
||||
<group col="6" colspan="4">
|
||||
<field name="date"/>
|
||||
<field name="email_to"/>
|
||||
<field name="email_from"/>
|
||||
<field name="email_to"/>
|
||||
<field name="date"/>
|
||||
<field name="name" colspan="6"/>
|
||||
</group>
|
||||
<notebook colspan="4">
|
||||
<page string="Details">
|
||||
@@ -204,18 +205,19 @@
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- CRM Lead Tree View -->
|
||||
<!-- CRM Lead Tree View -->
|
||||
|
||||
<record model="ir.ui.view" id="crm_case_tree_view_leads">
|
||||
<field name="name">CRM - Leads Tree</field>
|
||||
<field name="name">Leads</field>
|
||||
<field name="model">crm.lead</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Leads Tree" colors="blue:state=='pending';grey:state in ('cancel', 'done');red:date_deadline < current_date">
|
||||
<tree string="Leads" colors="blue:state=='pending';grey:state in ('cancel', 'done')">
|
||||
<field name="date_deadline" invisible="1"/>
|
||||
<field name="create_date"/>
|
||||
<field name="partner_name"/>
|
||||
<field name="name"/>
|
||||
<field name="partner_name"/>
|
||||
<field name="country_id" invisible="context.get('invisible_country', True)" />
|
||||
<field name="email_from"/>
|
||||
<field name="phone"/>
|
||||
|
||||
@@ -229,8 +231,7 @@
|
||||
<button name="stage_next" string="Next"
|
||||
states="open,pending" type="object"
|
||||
icon="gtk-go-forward" />
|
||||
<field name="section_id"
|
||||
invisible="context.get('invisible_section', True)" />
|
||||
<field name="section_id" invisible="context.get('invisible_section', True)" />
|
||||
<field name="user_id" />
|
||||
<field name="state" />
|
||||
<button name="case_open" string="Open"
|
||||
@@ -253,7 +254,7 @@
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- CRM Lead Calendar View -->
|
||||
<!-- CRM Lead Calendar View -->
|
||||
|
||||
<record model="ir.ui.view" id="crm_case_calendar_view_leads">
|
||||
<field name="name">CRM - Leads Calendar</field>
|
||||
@@ -270,7 +271,7 @@
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- CRM Lead Search View -->
|
||||
<!-- CRM Lead Search View -->
|
||||
|
||||
<record id="view_crm_case_leads_filter" model="ir.ui.view">
|
||||
<field name="name">CRM - Leads Search</field>
|
||||
@@ -300,6 +301,7 @@
|
||||
('create_date','>=',(datetime.date.today()-datetime.timedelta(days=7)).strftime('%%Y-%%m-%%d'))]"
|
||||
/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="name"/>
|
||||
<field name="partner_name"/>
|
||||
<field name="email_from"/>
|
||||
<field name="user_id">
|
||||
@@ -319,6 +321,20 @@
|
||||
help="Show Sales Team"/>
|
||||
</field>
|
||||
<newline/>
|
||||
<group expand="0" string="Extended options..." groups="base.group_extended">
|
||||
<field name="stage_id" widget="selection" domain="[('object_id.model', '=', 'crm.lead')]"/>
|
||||
<field name="categ_id" widget="selection" domain="[('object_id.model', '=', 'crm.lead')]"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="country_id" context="{'invisible_country': False}">
|
||||
<filter icon="terp-personal+" context="{'invisible_country': False}" help="Show countries"/>
|
||||
</field>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
|
||||
<newline/>
|
||||
<field name="create_date" string="Creation Date"/>
|
||||
<field name="date_closed"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Group By...">
|
||||
<filter string="Stage" icon="terp-stage" domain="[]" context="{'group_by':'stage_id'}"/>
|
||||
<filter string="State" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
|
||||
@@ -334,6 +350,5 @@
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
@@ -1,30 +1,30 @@
|
||||
<?xml version="1.0"?>
|
||||
<openerp>
|
||||
<data noupdate="1">
|
||||
<data noupdate="1">
|
||||
|
||||
<!-- CASE CATEGORY(categ_id) -->
|
||||
|
||||
<record model="crm.case.categ" id="categ_meet1">
|
||||
<field name="name">Customer Meeting</field>
|
||||
<field name="section_id" ref="section_sales_department"/>
|
||||
<field name="object_id" search="[('model','=','crm.meeting')]" model="ir.model"/>
|
||||
</record>
|
||||
<record model="crm.case.categ" id="categ_meet1">
|
||||
<field name="name">Customer Meeting</field>
|
||||
<field name="section_id" ref="section_sales_department"/>
|
||||
<field name="object_id" search="[('model','=','crm.meeting')]" model="ir.model"/>
|
||||
</record>
|
||||
|
||||
<record model="crm.case.categ" id="categ_meet2">
|
||||
<field name="name">Internal Meeting</field>
|
||||
<field name="section_id" ref="section_sales_department"/>
|
||||
<field name="object_id" search="[('model','=','crm.meeting')]" model="ir.model"/>
|
||||
</record>
|
||||
<record model="crm.case.categ" id="categ_meet2">
|
||||
<field name="name">Internal Meeting</field>
|
||||
<field name="section_id" ref="section_sales_department"/>
|
||||
<field name="object_id" search="[('model','=','crm.meeting')]" model="ir.model"/>
|
||||
</record>
|
||||
|
||||
<record model="crm.case.categ" id="categ_meet3">
|
||||
<field name="name">Phone Call</field>
|
||||
<field name="section_id" ref="section_sales_department"/>
|
||||
<field name="object_id" search="[('model','=','crm.meeting')]" model="ir.model"/>
|
||||
</record>
|
||||
<record model="crm.case.categ" id="categ_meet3">
|
||||
<field name="name">Phone Call</field>
|
||||
<field name="section_id" ref="section_sales_department"/>
|
||||
<field name="object_id" search="[('model','=','crm.meeting')]" model="ir.model"/>
|
||||
</record>
|
||||
|
||||
<record model="res.request.link" id="request_link_meeting">
|
||||
<field name="name">Case Meeting</field>
|
||||
<field name="object">crm.meeting</field>
|
||||
</record>
|
||||
</data>
|
||||
<field name="name">Case Meeting</field>
|
||||
<field name="object">crm.meeting</field>
|
||||
</record>
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0"?>
|
||||
<openerp>
|
||||
<data noupdate="1">
|
||||
<data>
|
||||
|
||||
<act_window
|
||||
id="crm_case_categ_meet_create_partner"
|
||||
|
||||
@@ -109,7 +109,7 @@ class crm_opportunity(osv.osv):
|
||||
|
||||
_defaults = {
|
||||
'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],
|
||||
'priority': crm.AVAILABLE_PRIORITIES[2][0],
|
||||
}
|
||||
|
||||
def action_makeMeeting(self, cr, uid, ids, context=None):
|
||||
|
||||
@@ -4,91 +4,91 @@
|
||||
<record model="crm.case.categ" id="categ_oppor1">
|
||||
<field name="name">Existing Customer</field>
|
||||
<field name="section_id" ref="section_sales_department"/>
|
||||
<field name="object_id" search="[('model','=','crm.lead')]" model="ir.model"/>
|
||||
<field name="object_id" search="[('model','=','crm.lead')]" model="ir.model"/>
|
||||
</record>
|
||||
<record model="crm.case.categ" id="categ_oppor2">
|
||||
<field name="name">Self Generated</field>
|
||||
<field name="section_id" ref="section_sales_department"/>
|
||||
<field name="object_id" search="[('model','=','crm.lead')]" model="ir.model"/>
|
||||
</record>
|
||||
<field name="object_id" search="[('model','=','crm.lead')]" model="ir.model"/>
|
||||
</record>
|
||||
<record model="crm.case.categ" id="categ_oppor3">
|
||||
<field name="name">Employee</field>
|
||||
<field name="section_id" ref="section_sales_department"/>
|
||||
<field name="object_id" search="[('model','=','crm.lead')]" model="ir.model"/>
|
||||
<field name="object_id" search="[('model','=','crm.lead')]" model="ir.model"/>
|
||||
</record>
|
||||
<record model="crm.case.categ" id="categ_oppor4">
|
||||
<field name="name">Partner</field>
|
||||
<field name="section_id" ref="section_sales_department"/>
|
||||
<field name="object_id" search="[('model','=','crm.lead')]" model="ir.model"/>
|
||||
<field name="object_id" search="[('model','=','crm.lead')]" model="ir.model"/>
|
||||
</record>
|
||||
<record model="crm.case.categ" id="categ_oppor5">
|
||||
<field name="name">Campaign</field>
|
||||
<field name="section_id" ref="section_sales_department"/>
|
||||
<field name="object_id" search="[('model','=','crm.lead')]" model="ir.model"/>
|
||||
</record>
|
||||
<field name="object_id" search="[('model','=','crm.lead')]" model="ir.model"/>
|
||||
</record>
|
||||
<record model="crm.case.categ" id="categ_oppor6">
|
||||
<field name="name">Website</field>
|
||||
<field name="section_id" ref="section_sales_department"/>
|
||||
<field name="object_id" search="[('model','=','crm.lead')]" model="ir.model"/>
|
||||
</record>
|
||||
<field name="object_id" search="[('model','=','crm.lead')]" model="ir.model"/>
|
||||
</record>
|
||||
<record model="crm.case.categ" id="categ_oppor7">
|
||||
<field name="name">Word of mouth</field>
|
||||
<field name="section_id" ref="section_sales_department"/>
|
||||
<field name="object_id" search="[('model','=','crm.lead')]" model="ir.model"/>
|
||||
</record>
|
||||
<field name="object_id" search="[('model','=','crm.lead')]" model="ir.model"/>
|
||||
</record>
|
||||
<record model="crm.case.categ" id="categ_oppor8">
|
||||
<field name="name">Other</field>
|
||||
<field name="section_id" ref="section_sales_department"/>
|
||||
<field name="object_id" search="[('model','=','crm.lead')]" model="ir.model"/>
|
||||
</record>
|
||||
<field name="object_id" search="[('model','=','crm.lead')]" model="ir.model"/>
|
||||
</record>
|
||||
|
||||
<!-- CASE STATUS(stage_id) -->
|
||||
<record model="crm.case.stage" id="stage_oppor1">
|
||||
<field name="name">Prospecting</field>
|
||||
<field name="section_id" ref="section_sales_department"/>
|
||||
<field name="object_id" search="[('model','=','crm.lead')]" model="ir.model"/>
|
||||
<field name="object_id" search="[('model','=','crm.lead')]" model="ir.model"/>
|
||||
</record>
|
||||
<record model="crm.case.stage" id="stage_oppor2">
|
||||
<field name="name">Needs Analysis</field>
|
||||
<field name="section_id" ref="section_sales_department"/>
|
||||
<field name="object_id" search="[('model','=','crm.lead')]" model="ir.model"/>
|
||||
<field name="object_id" search="[('model','=','crm.lead')]" model="ir.model"/>
|
||||
</record>
|
||||
<record model="crm.case.stage" id="stage_oppor3">
|
||||
<field name="name">Value Proposition</field>
|
||||
<field name="section_id" ref="section_sales_department"/>
|
||||
<field name="object_id" search="[('model','=','crm.lead')]" model="ir.model"/>
|
||||
<field name="object_id" search="[('model','=','crm.lead')]" model="ir.model"/>
|
||||
</record>
|
||||
<record model="crm.case.stage" id="stage_oppor4">
|
||||
<field name="name">Proposal/Price Quote</field>
|
||||
<field name="section_id" ref="section_sales_department"/>
|
||||
<field name="object_id" search="[('model','=','crm.lead')]" model="ir.model"/>
|
||||
<field name="object_id" search="[('model','=','crm.lead')]" model="ir.model"/>
|
||||
</record>
|
||||
<record model="crm.case.stage" id="stage_oppor5">
|
||||
<field name="name">Negotiation/Review</field>
|
||||
<field name="section_id" ref="section_sales_department"/>
|
||||
<field name="object_id" search="[('model','=','crm.lead')]" model="ir.model"/>
|
||||
<field name="object_id" search="[('model','=','crm.lead')]" model="ir.model"/>
|
||||
</record>
|
||||
<record model="crm.case.stage" id="stage_oppor6">
|
||||
<field name="name">Closed Won</field>
|
||||
<field name="section_id" ref="section_sales_department"/>
|
||||
<field name="object_id" search="[('model','=','crm.lead')]" model="ir.model"/>
|
||||
<field name="object_id" search="[('model','=','crm.lead')]" model="ir.model"/>
|
||||
</record>
|
||||
<record model="crm.case.stage" id="stage_oppor7">
|
||||
<field name="name">Closed Lost</field>
|
||||
<field name="section_id" ref="section_sales_department"/>
|
||||
<field name="object_id" search="[('model','=','crm.lead')]" model="ir.model"/>
|
||||
<field name="object_id" search="[('model','=','crm.lead')]" model="ir.model"/>
|
||||
</record>
|
||||
|
||||
<!-- Case Resource(type_id) -->
|
||||
<record model="crm.case.resource.type" id="type_oppor1">
|
||||
<field name="name">Existing Business</field>
|
||||
<field name="section_id" ref="section_sales_department"/>
|
||||
<field name="object_id" search="[('model','=','crm.lead')]" model="ir.model"/>
|
||||
</record>
|
||||
<field name="object_id" search="[('model','=','crm.lead')]" model="ir.model"/>
|
||||
</record>
|
||||
<record model="crm.case.resource.type" id="type_oppor2">
|
||||
<field name="name">New Business</field>
|
||||
<field name="section_id" ref="section_sales_department"/>
|
||||
<field name="object_id" search="[('model','=','crm.lead')]" model="ir.model"/>
|
||||
<field name="object_id" search="[('model','=','crm.lead')]" model="ir.model"/>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0"?>
|
||||
<openerp>
|
||||
<data noupdate="1">
|
||||
<data>
|
||||
|
||||
<act_window
|
||||
id="act_crm_opportunity_crm_phonecall_new"
|
||||
|
||||
@@ -248,6 +248,7 @@
|
||||
<field name="create_date"/>
|
||||
<field name="name" string="Opportunity"/>
|
||||
<field name="partner_id"/>
|
||||
<field name="country_id" invisible="context.get('invisible_country', True)" />
|
||||
<field name="date_action"/>
|
||||
<field name="stage_id"/>
|
||||
<button name="stage_previous" string="Previous"
|
||||
@@ -342,6 +343,20 @@
|
||||
help="Show Sales Team"/>
|
||||
</field>
|
||||
<newline/>
|
||||
<group expand="0" string="Extended options..." groups="base.group_extended">
|
||||
<field name="stage_id" widget="selection" domain="[('object_id.model', '=', 'crm.lead')]"/>
|
||||
<field name="categ_id" widget="selection" domain="[('object_id.model', '=', 'crm.lead')]"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="country_id" context="{'invisible_country': False}">
|
||||
<filter icon="terp-personal+" context="{'invisible_country': False}" help="Show countries"/>
|
||||
</field>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
|
||||
<newline/>
|
||||
<field name="create_date" string="Creation Date"/>
|
||||
<field name="date_closed"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Group By..." colspan="16">
|
||||
<filter string="Stage" icon="terp-stage" domain="[]"
|
||||
context="{'group_by':'stage_id'}" />
|
||||
@@ -352,7 +367,7 @@
|
||||
|
||||
<separator orientation="vertical" />
|
||||
<filter string="Salesman" icon="terp-personal"
|
||||
domain="[('user_id','=',uid)]" context="{'group_by':'user_id'}" />
|
||||
domain="[]" context="{'group_by':'user_id'}" />
|
||||
<separator orientation="vertical" />
|
||||
<filter string="Creation" icon="terp-go-month"
|
||||
domain="[]" context="{'group_by':'create_date'}" />
|
||||
|
||||
@@ -52,7 +52,7 @@ class crm_phonecall(osv.osv, crm_case):
|
||||
('draft', 'Draft'),
|
||||
('open', 'Todo'),
|
||||
('cancel', 'Cancelled'),
|
||||
('done', 'Closed'),
|
||||
('done', 'Done'),
|
||||
('pending', 'Pending'),
|
||||
], 'State', size=16, readonly=True,
|
||||
help='The state is set to \'Draft\', when a case is created.\
|
||||
@@ -89,7 +89,7 @@ class crm_phonecall(osv.osv, crm_case):
|
||||
_defaults = {
|
||||
'date': lambda *a: time.strftime('%Y-%m-%d %H:%M:%S'),
|
||||
'priority': lambda *a: crm.AVAILABLE_PRIORITIES[2][0],
|
||||
'state': lambda *a: 'draft',
|
||||
'state': lambda *a: 'open',
|
||||
'user_id': lambda self,cr,uid,ctx: uid,
|
||||
'active': lambda *a: 1,
|
||||
}
|
||||
|
||||
@@ -2,39 +2,39 @@
|
||||
<openerp>
|
||||
<data noupdate="1">
|
||||
->
|
||||
|
||||
<!--
|
||||
Phonecall Categories
|
||||
-->
|
||||
<record model="crm.case.categ" id="categ_phone1">
|
||||
<field name="name">Inbound</field>
|
||||
<field name="section_id" ref="section_sales_department"/>
|
||||
<field name="object_id" search="[('model','=','crm.phonecall')]" model="ir.model"/>
|
||||
|
||||
</record>
|
||||
<record model="crm.case.categ" id="categ_phone2">
|
||||
<field name="name">Outbound</field>
|
||||
<field name="section_id" ref="section_sales_department"/>
|
||||
<field name="object_id" search="[('model','=','crm.phonecall')]" model="ir.model"/>
|
||||
</record>
|
||||
|
||||
<!--
|
||||
Case Stage
|
||||
-->
|
||||
<record model="crm.case.stage" id="stage_phone1">
|
||||
<field name="name">Planned</field>
|
||||
<field name="section_id" ref="section_sales_department"/>
|
||||
<field name="object_id" search="[('model','=','crm.phonecall')]" model="ir.model"/>
|
||||
</record>
|
||||
<record model="crm.case.stage" id="stage_phone2">
|
||||
<field name="name">Held</field>
|
||||
<field name="section_id" ref="section_sales_department"/>
|
||||
<field name="object_id" search="[('model','=','crm.phonecall')]" model="ir.model"/>
|
||||
</record>
|
||||
<record model="crm.case.stage" id="stage_phone3">
|
||||
<field name="name">Not Held</field>
|
||||
<field name="section_id" ref="section_sales_department"/>
|
||||
<field name="object_id" search="[('model','=','crm.phonecall')]" model="ir.model"/>
|
||||
</record>
|
||||
|
||||
<!--
|
||||
Phonecall Categories
|
||||
-->
|
||||
<record model="crm.case.categ" id="categ_phone1">
|
||||
<field name="name">Inbound</field>
|
||||
<field name="section_id" ref="section_sales_department"/>
|
||||
<field name="object_id" search="[('model','=','crm.phonecall')]" model="ir.model"/>
|
||||
|
||||
</record>
|
||||
<record model="crm.case.categ" id="categ_phone2">
|
||||
<field name="name">Outbound</field>
|
||||
<field name="section_id" ref="section_sales_department"/>
|
||||
<field name="object_id" search="[('model','=','crm.phonecall')]" model="ir.model"/>
|
||||
</record>
|
||||
|
||||
<!--
|
||||
Case Stage
|
||||
-->
|
||||
<record model="crm.case.stage" id="stage_phone1">
|
||||
<field name="name">Planned</field>
|
||||
<field name="section_id" ref="section_sales_department"/>
|
||||
<field name="object_id" search="[('model','=','crm.phonecall')]" model="ir.model"/>
|
||||
</record>
|
||||
<record model="crm.case.stage" id="stage_phone2">
|
||||
<field name="name">Held</field>
|
||||
<field name="section_id" ref="section_sales_department"/>
|
||||
<field name="object_id" search="[('model','=','crm.phonecall')]" model="ir.model"/>
|
||||
</record>
|
||||
<record model="crm.case.stage" id="stage_phone3">
|
||||
<field name="name">Not Held</field>
|
||||
<field name="section_id" ref="section_sales_department"/>
|
||||
<field name="object_id" search="[('model','=','crm.phonecall')]" model="ir.model"/>
|
||||
</record>
|
||||
</data>
|
||||
</openerp>
|
||||
</openerp>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0"?>
|
||||
<openerp>
|
||||
<data noupdate="1">
|
||||
<data>
|
||||
|
||||
<act_window
|
||||
id="crm_case_categ_phone_create_partner"
|
||||
@@ -67,7 +67,7 @@
|
||||
<field name="view_mode">tree,calendar</field>
|
||||
<field name="view_id" ref="crm_case_phone_tree_view"/>
|
||||
<field name="domain" eval="'[(\'categ_id\',\'=\','+str(ref('categ_phone1'))+')]'"/>
|
||||
<field name="context">{'set_editable':True,'default_state':'open'}</field>
|
||||
<field name="context">{'set_editable':True,'default_state':'open','search_default_current':1,'search_default_today':1}</field>
|
||||
<field name="search_view_id" ref="crm.view_crm_case_phonecalls_filter"/>
|
||||
</record>
|
||||
|
||||
@@ -103,7 +103,7 @@
|
||||
<field name="view_mode">tree,calendar</field>
|
||||
<field name="view_id" ref="crm_case_phone_tree_view"/>
|
||||
<field name="domain" eval="'[(\'categ_id\',\'=\','+str(ref('categ_phone2'))+')]'"/>
|
||||
<field name="context">{'default_state':'open'}</field>
|
||||
<field name="context">{'default_state':'open','search_default_current':1}</field>
|
||||
<field name="search_view_id" ref="crm.view_crm_case_phonecalls_filter"/>
|
||||
</record>
|
||||
|
||||
|
||||
@@ -245,17 +245,22 @@
|
||||
<field name="type">search</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Search Phonecalls">
|
||||
<filter icon="terp-go-today" string="Current"
|
||||
name="current"
|
||||
domain="[('state','in', ('draft','open','pending'))]"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter icon="terp-go-today" string="Today"
|
||||
domain="[('date','<', time.strftime('%%Y-%%m-%%d 23:59:59')),\
|
||||
('date','>=',datetime.strftime('%%Y-%%m-%%d 00:00:00'))]"
|
||||
name="today"
|
||||
help="Todays's Phonecalls"
|
||||
/>
|
||||
<filter icon="terp-go-week"
|
||||
string="7 Days"
|
||||
help="Phonecalls during last 7 days"
|
||||
domain="[('date','<', time.strftime('%%Y-%%m-%%d')),\
|
||||
('date','>=',(datetime.date.today()-datetime.timedelta(days=7)).strftime('%%Y-%%m-%%d'))]"
|
||||
domain="[('date','>=',(datetime.date.today()-datetime.timedelta(days=7)).strftime('%%Y-%%m-%%d'))]"
|
||||
/>
|
||||
|
||||
<separator orientation="vertical"/>
|
||||
<field name="name" string="Call Summary"/>
|
||||
<field name="partner_id"/>
|
||||
|
||||
+40
-40
@@ -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: 2010-01-05 05:59+0000\n"
|
||||
"PO-Revision-Date: 2010-06-23 17:20+0000\n"
|
||||
"Last-Translator: Jordi Esteve (www.zikzakmedia.com) "
|
||||
"<jesteve@zikzakmedia.com>\n"
|
||||
"PO-Revision-Date: 2010-06-27 22:27+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-25 03:46+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-06-28 03:48+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: crm
|
||||
@@ -2302,7 +2301,7 @@ msgstr "Email empleado"
|
||||
#. module: crm
|
||||
#: model:ir.model,name:crm.model_crm_meeting
|
||||
msgid "Meeting Cases"
|
||||
msgstr ""
|
||||
msgstr "Casos reuniones"
|
||||
|
||||
#. module: crm
|
||||
#: view:crm.job:0
|
||||
@@ -2322,7 +2321,7 @@ msgstr "Trabajos"
|
||||
#. module: crm
|
||||
#: view:crm.case.rule:0
|
||||
msgid "%(case_date)s = Creation date"
|
||||
msgstr ""
|
||||
msgstr "%(case_date)s = Fecha de creación"
|
||||
|
||||
#. module: crm
|
||||
#: model:crm.case.stage,name:crm.stage_phone3
|
||||
@@ -2348,12 +2347,12 @@ msgstr "Correctivo"
|
||||
#. module: crm
|
||||
#: model:ir.model,name:crm.model_crm_opportunity
|
||||
msgid "Opportunity Cases"
|
||||
msgstr ""
|
||||
msgstr "Casos oportunidades"
|
||||
|
||||
#. module: crm
|
||||
#: view:crm.case:0
|
||||
msgid "Support Query"
|
||||
msgstr ""
|
||||
msgstr "Petición de soporte"
|
||||
|
||||
#. module: crm
|
||||
#: view:crm.case.rule:0
|
||||
@@ -2387,7 +2386,7 @@ msgstr "Enviar correo"
|
||||
#. module: crm
|
||||
#: wizard_view:crm.new.send.mail,init:0
|
||||
msgid "Set case state to"
|
||||
msgstr ""
|
||||
msgstr "Establecer estado del caso a"
|
||||
|
||||
#. module: crm
|
||||
#: model:crm.case.category2,name:crm.categ2_fund3
|
||||
@@ -2474,7 +2473,7 @@ msgstr "Cerrado"
|
||||
#. module: crm
|
||||
#: view:crm.job:0
|
||||
msgid "Candidate Name2"
|
||||
msgstr ""
|
||||
msgstr "Nombre 2 candidato"
|
||||
|
||||
#. module: crm
|
||||
#: code:addons/crm/crm.py:0
|
||||
@@ -2516,32 +2515,32 @@ msgstr ""
|
||||
#. module: crm
|
||||
#: field:crm.meeting,freebusy:0
|
||||
msgid "FreeBusy"
|
||||
msgstr ""
|
||||
msgstr "LibreOcupado"
|
||||
|
||||
#. module: crm
|
||||
#: model:crm.case.categ,name:crm.categ_meet1
|
||||
msgid "Customer Meeting"
|
||||
msgstr ""
|
||||
msgstr "Reunión de cliente"
|
||||
|
||||
#. module: crm
|
||||
#: wizard_field:crm.new.send.mail,init,doc2:0
|
||||
msgid "Attachment2"
|
||||
msgstr ""
|
||||
msgstr "Adjunto 2"
|
||||
|
||||
#. module: crm
|
||||
#: wizard_field:crm.new.send.mail,init,doc3:0
|
||||
msgid "Attachment3"
|
||||
msgstr ""
|
||||
msgstr "Adjunto 3"
|
||||
|
||||
#. module: crm
|
||||
#: view:crm.job:0
|
||||
msgid "Degree"
|
||||
msgstr ""
|
||||
msgstr "Grado"
|
||||
|
||||
#. module: crm
|
||||
#: wizard_field:crm.new.send.mail,init,doc1:0
|
||||
msgid "Attachment1"
|
||||
msgstr ""
|
||||
msgstr "Adjunto 1"
|
||||
|
||||
#. module: crm
|
||||
#: code:addons/crm/crm_phonecall.py:0
|
||||
@@ -2610,7 +2609,7 @@ msgstr ">"
|
||||
#. module: crm
|
||||
#: view:crm.job:0
|
||||
msgid "Candidate Phone"
|
||||
msgstr ""
|
||||
msgstr "Teléfono candidato"
|
||||
|
||||
#. module: crm
|
||||
#: model:ir.actions.wizard,name:crm.wizard_crm_send_mail
|
||||
@@ -2632,7 +2631,7 @@ msgstr "Meses"
|
||||
#: model:ir.actions.act_window,name:crm.action_crm_opportunity_assign_wizard
|
||||
#: model:ir.actions.act_window,name:crm.action_crm_phonecall_assign_wizard
|
||||
msgid "To Assign"
|
||||
msgstr ""
|
||||
msgstr "Para asignar"
|
||||
|
||||
#. module: crm
|
||||
#: code:addons/crm/wizard/wizard_cal_subscribe.py:0
|
||||
@@ -2649,6 +2648,7 @@ msgstr "Cuando un proyecto/oportunidad real es detectado"
|
||||
#: wizard_view:crm.job.partner_create,init:0
|
||||
msgid "Are you sure you want to create a partner based on this job request ?"
|
||||
msgstr ""
|
||||
"Está seguro de que desea crear una empresa basada en esta solicitud laboral ?"
|
||||
|
||||
#. module: crm
|
||||
#: wizard_field:crm.lead.opportunity_set,create_partner,action:0
|
||||
@@ -2675,12 +2675,12 @@ msgstr "Disminuir (0>1)"
|
||||
#. module: crm
|
||||
#: model:ir.actions.wizard,name:crm.wizard_case_history_event
|
||||
msgid "History of Events"
|
||||
msgstr ""
|
||||
msgstr "Histórico de eventos"
|
||||
|
||||
#. module: crm
|
||||
#: model:ir.model,name:crm.model_crm_case_category2
|
||||
msgid "Category2 of case"
|
||||
msgstr ""
|
||||
msgstr "Categoría 2 del caso"
|
||||
|
||||
#. module: crm
|
||||
#: wizard_field:crm.new.send.mail,init,to:0
|
||||
@@ -2718,7 +2718,7 @@ msgstr "Reciclado"
|
||||
#: model:crm.case.categ,name:crm.categ_lead8
|
||||
#: model:crm.case.categ,name:crm.categ_oppor8
|
||||
msgid "Other"
|
||||
msgstr ""
|
||||
msgstr "Otro"
|
||||
|
||||
#. module: crm
|
||||
#: view:crm.case:0
|
||||
@@ -2728,7 +2728,7 @@ msgstr ""
|
||||
#: selection:crm.new.send.mail,init,state:0
|
||||
#: view:crm.opportunity:0
|
||||
msgid "Done"
|
||||
msgstr ""
|
||||
msgstr "Hecho"
|
||||
|
||||
#. module: crm
|
||||
#: field:crm.segmentation,som_interval_max:0
|
||||
@@ -2777,7 +2777,7 @@ msgstr "Ya existe una empresa con el mismo nombre."
|
||||
#. module: crm
|
||||
#: model:ir.model,name:crm.model_crm_phonecall
|
||||
msgid "Phonecall Cases"
|
||||
msgstr ""
|
||||
msgstr "Casos llamadas"
|
||||
|
||||
#. module: crm
|
||||
#: help:crm.case.rule,sequence:0
|
||||
@@ -2787,7 +2787,7 @@ msgstr ""
|
||||
#. module: crm
|
||||
#: field:crm.menu.config_wizard,helpdesk:0
|
||||
msgid "Helpdesk"
|
||||
msgstr ""
|
||||
msgstr "Asistencia/Ayuda"
|
||||
|
||||
#. module: crm
|
||||
#: field:crm.case,user_id:0
|
||||
@@ -2809,18 +2809,18 @@ msgstr "Responsable"
|
||||
#: model:crm.case.stage,name:crm.stage_claim4
|
||||
#: model:crm.case.stage,name:crm.stage_meet3
|
||||
msgid "Invalid"
|
||||
msgstr ""
|
||||
msgstr "Inválido"
|
||||
|
||||
#. module: crm
|
||||
#: wizard_button:crm.job.meeting_set,init,order:0
|
||||
#: wizard_button:crm.phonecall.meeting_set,init,order:0
|
||||
msgid "Set Meeting"
|
||||
msgstr ""
|
||||
msgstr "Fijar reunión"
|
||||
|
||||
#. module: crm
|
||||
#: field:crm.menu.config_wizard,meeting:0
|
||||
msgid "Calendar of Meetings"
|
||||
msgstr ""
|
||||
msgstr "Calendario de reuniones"
|
||||
|
||||
#. module: crm
|
||||
#: view:crm.case:0
|
||||
@@ -2840,7 +2840,7 @@ msgstr ""
|
||||
#. module: crm
|
||||
#: view:crm.lead:0
|
||||
msgid "Lead Name"
|
||||
msgstr ""
|
||||
msgstr "Nombre iniciativa"
|
||||
|
||||
#. module: crm
|
||||
#: view:crm.claim:0
|
||||
@@ -2861,22 +2861,22 @@ msgstr ""
|
||||
#: wizard_view:crm.lead.opportunity_set,create_partner:0
|
||||
#: wizard_view:crm.lead.partner_create,init:0
|
||||
msgid "Are you sure you want to create a partner based on this lead ?"
|
||||
msgstr ""
|
||||
msgstr "¿Está seguro que quiere crear una empresa basada en esta iniciativa?"
|
||||
|
||||
#. module: crm
|
||||
#: model:crm.case.stage,name:crm.stage_job6
|
||||
msgid "Refused by Employee"
|
||||
msgstr ""
|
||||
msgstr "Rechazado por el empleado"
|
||||
|
||||
#. module: crm
|
||||
#: field:crm.case,partner_name:0
|
||||
msgid "Employee's Name"
|
||||
msgstr ""
|
||||
msgstr "Nombre del empleado"
|
||||
|
||||
#. module: crm
|
||||
#: model:crm.case.stage,name:crm.stage_job2
|
||||
msgid "First Interview"
|
||||
msgstr ""
|
||||
msgstr "Primera entrevista"
|
||||
|
||||
#. module: crm
|
||||
#: view:report.crm.case.section.categ.categ2:0
|
||||
@@ -2884,17 +2884,17 @@ msgstr ""
|
||||
#: view:report.crm.case.section.categ2:0
|
||||
#: view:report.crm.case.section.stage:0
|
||||
msgid "This Month"
|
||||
msgstr ""
|
||||
msgstr "Este mes"
|
||||
|
||||
#. module: crm
|
||||
#: view:crm.job:0
|
||||
msgid "Availability (weeks)"
|
||||
msgstr ""
|
||||
msgstr "Disponibilidad (semanas)"
|
||||
|
||||
#. module: crm
|
||||
#: view:crm.opportunity:0
|
||||
msgid "Opportunities Tree"
|
||||
msgstr ""
|
||||
msgstr "Árbol de oportunidades"
|
||||
|
||||
#. module: crm
|
||||
#: help:crm.case,state:0
|
||||
@@ -2911,12 +2911,12 @@ msgstr ""
|
||||
#. module: crm
|
||||
#: view:crm.job:0
|
||||
msgid "Open Jobs"
|
||||
msgstr ""
|
||||
msgstr "Trabajos abiertos"
|
||||
|
||||
#. module: crm
|
||||
#: selection:crm.email.add.cc,name:0
|
||||
msgid "Email Address"
|
||||
msgstr ""
|
||||
msgstr "Correo electrónico"
|
||||
|
||||
#. module: crm
|
||||
#: help:crm.segmentation,som_interval_max:0
|
||||
@@ -2930,17 +2930,17 @@ msgstr ""
|
||||
#. module: crm
|
||||
#: field:crm.case,case_id:0
|
||||
msgid "Related Case"
|
||||
msgstr ""
|
||||
msgstr "Caso relacionado"
|
||||
|
||||
#. module: crm
|
||||
#: field:crm.case.rule,server_action_id:0
|
||||
msgid "Server Action"
|
||||
msgstr ""
|
||||
msgstr "Acción servidor"
|
||||
|
||||
#. module: crm
|
||||
#: model:ir.actions.act_window,name:crm.crm_case_categ_claim0
|
||||
msgid "All Claims"
|
||||
msgstr ""
|
||||
msgstr "Todas las reclamaciones"
|
||||
|
||||
#. module: crm
|
||||
#: field:crm.case.log,user_id:0
|
||||
|
||||
@@ -91,7 +91,7 @@
|
||||
domain="[('section_id.user_id','=',uid)]"
|
||||
help="My section" />
|
||||
</field>
|
||||
<field name="user_id" widget="selection">
|
||||
<field name="user_id">
|
||||
<filter icon="terp-personal+" string="My Case" help="My Case" domain="[('user_id','=',uid)]" />
|
||||
</field>
|
||||
</group>
|
||||
@@ -179,7 +179,7 @@
|
||||
<field name="name">Leads Analysis</field>
|
||||
<field name="res_model">crm.lead.report</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="context">{'search_default_opportunity':1, "search_default_user":1,"search_default_this_month":1,'group_by_no_leaf':1,'group_by':[]}</field>
|
||||
<field name="context">{'search_default_lead':1, "search_default_user":1,"search_default_this_month":1,'group_by_no_leaf':1,'group_by':[]}</field>
|
||||
<field name="view_mode">tree,graph</field>
|
||||
<field name="domain">[]</field>
|
||||
</record>
|
||||
|
||||
@@ -68,69 +68,69 @@
|
||||
|
||||
<!-- Phone calls by user and section Search View -->
|
||||
|
||||
<record id="view_report_crm_phonecall_filter" model="ir.ui.view">
|
||||
<record id="view_report_crm_phonecall_filter" model="ir.ui.view">
|
||||
<field name="name">crm.phonecall.report.select</field>
|
||||
<field name="model">crm.phonecall.report</field>
|
||||
<field name="type">search</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Search">
|
||||
<group col="16" colspan="8">
|
||||
<!-- <filter string="This Year" name="This Year" icon="terp-hr"
|
||||
domain="[('name','=',time.localtime()[0])]"/>-->
|
||||
<filter string="This Year" icon="terp-go-year"
|
||||
domain="[('create_date','<=', time.strftime('%%Y-%%m-%%d')), ('create_date','>',(datetime.date.today()-datetime.timedelta(days=365)).strftime('%%Y-%%m-%%d'))]"/>
|
||||
<!-- <filter string="This Year" name="This Year" icon="terp-hr"
|
||||
domain="[('name','=',time.localtime()[0])]"/>-->
|
||||
<filter string="This Year" icon="terp-go-year"
|
||||
domain="[('create_date','<=', time.strftime('%%Y-%%m-%%d')), ('create_date','>',(datetime.date.today()-datetime.timedelta(days=365)).strftime('%%Y-%%m-%%d'))]"/>
|
||||
|
||||
<!-- <filter string="This Month" name="This Year" icon="terp-hr"
|
||||
domain="[('month','=',time.strftime('%%m'))]" />-->
|
||||
<!-- <filter string="This Month" name="This Year" icon="terp-hr"
|
||||
domain="[('month','=',time.strftime('%%m'))]" />-->
|
||||
<filter string="This Month" icon="terp-go-month" name="This Month"
|
||||
domain="[('create_date','<=', time.strftime('%%Y-%%m-%%d')), ('create_date','>',(datetime.date.today()-datetime.timedelta(days=30)).strftime('%%Y-%%m-%%d'))]"/>
|
||||
domain="[('create_date','<=', time.strftime('%%Y-%%m-%%d')), ('create_date','>',(datetime.date.today()-datetime.timedelta(days=30)).strftime('%%Y-%%m-%%d'))]"/>
|
||||
|
||||
<filter icon="terp-go-week" string="7 Days" separator="1"
|
||||
domain="[('create_date','<=', time.strftime('%%Y-%%m-%%d')), ('create_date','>',(datetime.date.today()-datetime.timedelta(days=7)).strftime('%%Y-%%m-%%d'))]"/>
|
||||
|
||||
<separator orientation="vertical" />
|
||||
<separator orientation="vertical" />
|
||||
<filter icon="terp-check"
|
||||
string="Current"
|
||||
domain="[('state','in',('draft','oprn'))]"/>
|
||||
string="Current"
|
||||
domain="[('state','in',('draft','oprn'))]"/>
|
||||
<filter icon="terp-hr"
|
||||
string="Pending"
|
||||
domain="[('state','=','pending')]"/>
|
||||
string="Pending"
|
||||
domain="[('state','=','pending')]"/>
|
||||
<filter icon="terp-sale"
|
||||
string="Done"
|
||||
domain="[('state','=','done')]"/>
|
||||
string="Done"
|
||||
domain="[('state','=','done')]"/>
|
||||
|
||||
<separator orientation="vertical" />
|
||||
<separator orientation="vertical" />
|
||||
<filter string="Stage" icon="terp-crm" domain="[]"
|
||||
context="{'group_by':'stage_id'}" />
|
||||
|
||||
|
||||
<filter icon="terp-personal+"
|
||||
context="{'invisible_section': False}"
|
||||
domain="[('section_id.user_id','=',uid)]"
|
||||
help="My section" />
|
||||
<filter icon="terp-personal+"
|
||||
context="{'invisible_section': False}"
|
||||
domain="[('section_id.user_id','=',uid)]"
|
||||
help="My section" />
|
||||
|
||||
<field name="user_id" select="1" widget="selection">
|
||||
<filter icon="terp-crm" string="My Case" help="My Case" domain="[('user_id','=',uid)]" />
|
||||
</field>
|
||||
<field name="user_id" select="1">
|
||||
<filter icon="terp-crm" string="My Case" help="My Case" domain="[('user_id','=',uid)]" />
|
||||
</field>
|
||||
</group>
|
||||
<newline/>
|
||||
<newline/>
|
||||
<group expand="0" string="Group By...">
|
||||
<filter string="User" name="User" icon="terp-personal"
|
||||
domain="[]" context="{'group_by':'user_id'}" />
|
||||
<filter string="Partner" icon="terp-personal" context="{'group_by':'partner_id'}" />
|
||||
<separator orientation="vertical" />
|
||||
<filter string="Section" icon="terp-sale"
|
||||
domain="[]"
|
||||
context="{'group_by':'section_id'}" />
|
||||
domain="[]"
|
||||
context="{'group_by':'section_id'}" />
|
||||
<filter string="Category" icon="terp-stock_symbol-selection"
|
||||
domain="[]" context="{'group_by':'categ_id'}" />
|
||||
domain="[]" context="{'group_by':'categ_id'}" />
|
||||
<separator orientation="vertical" />
|
||||
<filter string="Stage" icon="terp-stage" domain="[]" context="{'group_by':'stage_id'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Priority" icon="terp-rating-rated" domain="[]" context="{'group_by':'priority'}" />
|
||||
<separator orientation="vertical" />
|
||||
<filter string="State" icon="terp-stock_effects-object-colorize"
|
||||
domain="[]" context="{'group_by':'state'}" />
|
||||
domain="[]" context="{'group_by':'state'}" />
|
||||
<separator orientation="vertical" />
|
||||
<filter string="Company" icon="terp-go-home"
|
||||
domain="[]"
|
||||
@@ -147,12 +147,12 @@
|
||||
<newline/>
|
||||
<group expand="0" string="Extended options..." groups="base.group_extended">
|
||||
<field name="partner_id"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="stage_id" widget="selection" domain="[('object_id.model', '=', 'crm.phonecall')]"/>
|
||||
<field name="categ_id" widget="selection" domain="[('object_id.model', '=', 'crm.phonecall')]"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="stage_id" widget="selection" domain="[('object_id.model', '=', 'crm.phonecall')]"/>
|
||||
<field name="categ_id" widget="selection" domain="[('object_id.model', '=', 'crm.phonecall')]"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="company_id" groups="base.group_multi_company"/>
|
||||
<newline/>
|
||||
<newline/>
|
||||
<field name="creation_date"/>
|
||||
<field name="opening_date"/>
|
||||
<field name="date_closed"/>
|
||||
|
||||
@@ -24,17 +24,14 @@ from osv import fields,osv
|
||||
class res_partner(osv.osv):
|
||||
""" Inherits partner and adds CRM information in the partner form """
|
||||
_inherit = 'res.partner'
|
||||
|
||||
_columns = {
|
||||
'opportunity_ids': fields.one2many('crm.lead', 'partner_id',\
|
||||
'Opportunities', readonly=True, \
|
||||
domain=[('type', '=', 'opportunity')]),
|
||||
'meeting_ids': fields.one2many('crm.meeting', 'partner_id',\
|
||||
'Meetings', readonly=True),
|
||||
'phonecall_ids': fields.one2many('crm.phonecall', 'partner_id',\
|
||||
'Phonecalls', readonly=True),
|
||||
}
|
||||
|
||||
'opportunity_ids': fields.one2many('crm.lead', 'partner_id',\
|
||||
'Leads and Opportunities'),
|
||||
'meeting_ids': fields.one2many('crm.meeting', 'partner_id',\
|
||||
'Meetings'),
|
||||
'phonecall_ids': fields.one2many('crm.phonecall', 'partner_id',\
|
||||
'Phonecalls'),
|
||||
}
|
||||
res_partner()
|
||||
|
||||
|
||||
|
||||
@@ -11,53 +11,11 @@
|
||||
<field name="inherit_id" ref="base.view_partner_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<page string="History" position="inside">
|
||||
<field name="meeting_ids" colspan="4" nolabel="1" >
|
||||
<tree string="Meetings" colors="gray:state in ('draft', 'cancel','done','pending')">
|
||||
<field name="user_id" string="Responsible"/>
|
||||
<field name="name" string="Subject" />
|
||||
<field name="date" string="Start Date" />
|
||||
<field name="date_deadline" string="End Date"/>
|
||||
</tree>
|
||||
</field>
|
||||
</page>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_crm_partner_info_form2" model="ir.ui.view">
|
||||
<field name="name">res.partner.crm.info.inherit2</field>
|
||||
<field name="model">res.partner</field>
|
||||
<field name="type">form</field>
|
||||
<field name="inherit_id" ref="base.view_partner_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<page string="History" position="inside">
|
||||
<field name="phonecall_ids" colspan="4" nolabel="1">
|
||||
<tree string="Phone Calls" colors="gray:state in ('draft', 'cancel','done','pending')">
|
||||
<field name="date" string="Date"/>
|
||||
<field name="name" string="Call Summary"/>
|
||||
<field name="categ_id"/>
|
||||
<field name="user_id"/>
|
||||
<field name="state"/>
|
||||
<button name="case_open" string="Open" states="draft,pending" type="object" icon="gtk-go-forward"/>
|
||||
<button name="case_close" string="Held" states="open,draft,pending" type="object" icon="gtk-jump-to"/>
|
||||
<button name="case_pending" string="Not Held" states="open" type="object" icon="gtk-media-pause"/>
|
||||
<button name="case_cancel" string="Cancel" states="draft,open,pending" type="object" icon="gtk-cancel"/>
|
||||
</tree>
|
||||
</field>
|
||||
</page>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_crm_partner_info_form3" model="ir.ui.view">
|
||||
<field name="name">res.partner.crm.info.inherit3</field>
|
||||
<field name="model">res.partner</field>
|
||||
<field name="type">form</field>
|
||||
<field name="inherit_id" ref="base.view_partner_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<page string="History" position="inside">
|
||||
<field name="opportunity_ids" colspan="4" nolabel="1" domain="[('type', '=', 'opportunity')]">
|
||||
<field name="opportunity_ids" colspan="4" nolabel="1">
|
||||
<tree string="Opportunities" colors="blue:state=='pending';grey:state=='cancel')">
|
||||
<field name="create_date"/>
|
||||
<field name="name"/>
|
||||
<field name="type"/>
|
||||
<field name="stage_id"/>
|
||||
<button name="stage_previous" string="Previous"
|
||||
states="open,pending" type="object" icon="gtk-go-back" />
|
||||
@@ -85,11 +43,31 @@
|
||||
states="draft,open,pending" type="object"
|
||||
icon="gtk-cancel" />
|
||||
</tree>
|
||||
</field>
|
||||
</field>
|
||||
<field name="meeting_ids" colspan="4" nolabel="1" >
|
||||
<tree string="Meetings" colors="gray:state in ('draft', 'cancel','done','pending')">
|
||||
<field name="user_id" string="Responsible"/>
|
||||
<field name="name" string="Subject" />
|
||||
<field name="date" string="Start Date" />
|
||||
<field name="date_deadline" string="End Date"/>
|
||||
</tree>
|
||||
</field>
|
||||
<field name="phonecall_ids" colspan="4" nolabel="1">
|
||||
<tree string="Phone Calls" colors="gray:state in ('draft', 'cancel','done','pending')">
|
||||
<field name="date" string="Date"/>
|
||||
<field name="name" string="Call Summary"/>
|
||||
<field name="categ_id"/>
|
||||
<field name="user_id"/>
|
||||
<field name="state"/>
|
||||
<button name="case_open" string="Open" states="draft,pending" type="object" icon="gtk-go-forward"/>
|
||||
<button name="case_close" string="Held" states="open,draft,pending" type="object" icon="gtk-jump-to"/>
|
||||
<button name="case_pending" string="Not Held" states="open" type="object" icon="gtk-media-pause"/>
|
||||
<button name="case_cancel" string="Cancel" states="draft,open,pending" type="object" icon="gtk-cancel"/>
|
||||
</tree>
|
||||
</field>
|
||||
</page>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
|
||||
@@ -4,32 +4,27 @@
|
||||
"access_crm_segmentation","crm.segmentation","model_crm_segmentation","crm.group_crm_manager",1,1,1,1
|
||||
"access_crm_segmentation_line","crm.segmentation.line","model_crm_segmentation_line","crm.group_crm_manager",1,1,1,1
|
||||
"access_crm_case_section","crm.case.section","model_crm_case_section","crm.group_crm_user",1,0,0,0
|
||||
"access_crm_case_categ","crm.case.categ","model_crm_case_categ","crm.group_crm_user",1,0,0,0
|
||||
"access_crm_case_categ","crm.case.categ","model_crm_case_categ","base.group_user",1,0,0,0
|
||||
"access_crm_meeting","crm.meeting","model_crm_meeting","crm.group_crm_user",1,1,1,1
|
||||
"access_crm_meeting_all","crm.meeting"_allll,"model_crm_meeting","base.group_user",1,0,0,0
|
||||
"access_crm_lead","crm.lead","model_crm_lead","crm.group_crm_user",1,1,1,1
|
||||
"access_crm_lead.all","crm.lead.all","model_crm_lead","base.group_user",1,0,0,0
|
||||
"access_crm_phonecall","crm.phonecall","model_crm_phonecall","crm.group_crm_user",1,1,1,1
|
||||
"access_crm_phonecall.all","crm.phonecall.all","model_crm_phonecall","base.group_user",1,0,0,0
|
||||
"access_crm_case_section_user","crm.case.section.user","model_crm_case_section","crm.group_crm_user",1,0,0,0
|
||||
"access_crm_case_section_manager","crm.case.section.manager","model_crm_case_section","crm.group_crm_manager",1,1,1,1
|
||||
"access_crm_case_categ_user","crm.case.categ.user","model_crm_case_categ","crm.group_crm_user",1,0,0,0
|
||||
"access_crm_case_categ_manager","crm.case.categ.manager","model_crm_case_categ","crm.group_crm_manager",1,1,1,1
|
||||
"access_crm_case_stage","crm.case.stage","model_crm_case_stage","crm.group_crm_user",1,0,0,0
|
||||
"access_crm_case_stage","crm.case.stage","model_crm_case_stage","base.group_user",1,0,0,0
|
||||
"access_crm_case_stage_manager","crm.case.stage","model_crm_case_stage","crm.group_crm_manager",1,1,1,1
|
||||
"access_crm_case_resource_type_user","crm_case_resource_type user","model_crm_case_resource_type","crm.group_crm_user",1,0,0,0
|
||||
"access_crm_case_resource_type_manager","crm_case_resource_type manager","model_crm_case_resource_type","crm.group_crm_manager",1,1,1,1
|
||||
"access_crm_lead_report_manager","crm.lead.report","model_crm_lead_report","crm.group_crm_manager",1,0,0,0
|
||||
"access_crm_phonecall_report_manager","crm.phonecall.report","model_crm_phonecall_report","crm.group_crm_manager",1,0,0,0
|
||||
"access_crm_lead2partner","crm.lead2partner","model_crm_lead2partner","crm.group_crm_user",1,1,1,1
|
||||
"access_crm_lead2opportunity","crm.lead2opportunity","model_crm_lead2opportunity","crm.group_crm_user",1,1,1,1
|
||||
"access_crm_opportunity2phonecall","crm.opportunity2phonecall","model_crm_opportunity2phonecall","crm.group_crm_user",1,1,1,1
|
||||
"access_crm_phonecall2phonecall","crm.phonecall2phonecall","model_crm_phonecall2phonecall","crm.group_crm_user",1,1,1,1
|
||||
"access_crm_phonecall2partner","crm.phonecall2partner","model_crm_phonecall2partner","crm.group_crm_user",1,1,1,1
|
||||
"access_crm_phonecall2opportunity","crm.phonecall2opportunity","model_crm_phonecall2opportunity","crm.group_crm_user",1,1,1,1
|
||||
"access_crm_send_mail","crm.send.mail","model_crm_send_mail","crm.group_crm_user",1,1,1,1
|
||||
"access_crm_send_mail_attachment","crm.send.mail.attachment","model_crm_send_mail_attachment","crm.group_crm_user",1,1,1,1
|
||||
"access_crm_partner2opportunity","crm.partner2opportunity","model_crm_partner2opportunity","crm.group_crm_user",1,1,1,1
|
||||
"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_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
|
||||
|
||||
|
Can't render this file because it contains an unexpected character in line 9 and column 38.
|
@@ -20,10 +20,12 @@
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
from osv import osv, fields
|
||||
import base64
|
||||
import itertools
|
||||
|
||||
from tools.translate import _
|
||||
from osv import osv, fields
|
||||
import tools
|
||||
from tools.translate import _
|
||||
|
||||
class crm_lead_forward_to_partner(osv.osv_memory):
|
||||
"""Forwards lead history"""
|
||||
@@ -31,20 +33,28 @@ class crm_lead_forward_to_partner(osv.osv_memory):
|
||||
|
||||
_columns = {
|
||||
'name': fields.selection([('user', 'User'), ('partner', 'Partner'), \
|
||||
('email', 'Email Address')], 'Send to', required=True),
|
||||
'user_id': fields.many2one('res.users', "User"),
|
||||
'partner_id' : fields.many2one('res.partner', 'Partner'),
|
||||
'address_id' : fields.many2one('res.partner.address', 'Address'),
|
||||
'email_from' : fields.char('From', required=True, size=128),
|
||||
'email_to' : fields.char('To', required=True, size=128),
|
||||
'subject' : fields.char('Subject', required=True, size=128),
|
||||
'message' : fields.text('Message', required=True),
|
||||
('email', 'Email Address')], 'Send to', required=True),
|
||||
'user_id': fields.many2one('res.users', "User"),
|
||||
'partner_id' : fields.many2one('res.partner', 'Partner'),
|
||||
'address_id' : fields.many2one('res.partner.address', 'Address'),
|
||||
'email_from' : fields.char('From', required=True, size=128),
|
||||
'email_to' : fields.char('To', required=True, size=128),
|
||||
'subject' : fields.char('Subject', required=True, size=128),
|
||||
'message' : fields.text('Message', required=True),
|
||||
'history': fields.selection([('latest', 'Latest email'), ('whole', 'Whole Story'), ('info', 'Case Information')], 'Send history', required=True),
|
||||
'add_cc': fields.boolean('Add as CC', required=False, help="Selcect if you want this user to add as cc for this case.This user will receive all future conversations"),
|
||||
'add_cc': fields.boolean('Add as CC', required=False, help="Check this box if you want this address to be added in the CC list"\
|
||||
" for this case, in order to receive all future conversations"),
|
||||
}
|
||||
|
||||
|
||||
_defaults = {
|
||||
'name' : 'email',
|
||||
'history': 'latest',
|
||||
'add_cc': True,
|
||||
'email_from': lambda self, cr, uid, *a: self.pool.get('res.users')._get_email_from(cr, uid, uid)[uid]
|
||||
}
|
||||
|
||||
def get_whole_history(self, cr, uid, ids, context=None):
|
||||
"""This function gets whole communication history and returns as top posting style
|
||||
"""This function gets whole communication history and returns as top posting style
|
||||
@param self: The object pointer
|
||||
@param cr: the current row, from the database cursor,
|
||||
@param uid: the current user’s ID for security checks,
|
||||
@@ -87,13 +97,10 @@ class crm_lead_forward_to_partner(osv.osv_memory):
|
||||
"""
|
||||
if not user:
|
||||
return {'value': {'email_to': False}}
|
||||
email = False
|
||||
addr = self.pool.get('res.users').read(cr, uid, user, ['address_id'])['address_id']
|
||||
if addr:
|
||||
email = self.pool.get('res.partner.address').read(cr, uid, addr[0] , ['email'])['email']
|
||||
email = self.pool.get('res.users')._get_email_from(cr, uid, [user])[user]
|
||||
return {'value': {'email_to': email}}
|
||||
|
||||
def on_change_history(self, cr, uid, ids, history, context=None):
|
||||
def on_change_history(self, cr, uid, ids, history_type, context=None):
|
||||
"""Gives message body according to type of history selected
|
||||
* info: Forward the case information
|
||||
* whole: Send the whole history
|
||||
@@ -106,31 +113,36 @@ class crm_lead_forward_to_partner(osv.osv_memory):
|
||||
"""
|
||||
#TODO: ids and context are not comming
|
||||
res = False
|
||||
msg_val = ''
|
||||
res_id = context.get('active_id')
|
||||
model = context.get('active_model')
|
||||
model_pool = self.pool.get(model)
|
||||
if not res_id or not model:
|
||||
return res
|
||||
if history == 'info':
|
||||
msg_val = self._get_case_history(cr, uid, history_type, res_id, context=context)
|
||||
if msg_val:
|
||||
res = {'value': {'message' : '\n\n' + msg_val}}
|
||||
return res
|
||||
|
||||
def _get_case_history(self, cr, uid, history_type, res_id, context=None):
|
||||
if not res_id:
|
||||
return
|
||||
|
||||
msg_val = ''
|
||||
model_pool = self.pool.get('crm.lead')
|
||||
print history_type
|
||||
if history_type == 'info':
|
||||
msg_val = self.get_lead_details(cr, uid, res_id, context=context)
|
||||
|
||||
if history == 'whole':
|
||||
elif history_type == 'whole':
|
||||
log_ids = model_pool.browse(cr, uid, res_id, context=context).message_ids
|
||||
log_ids = map(lambda x: x.id, log_ids)
|
||||
log_ids = [x.id for x in log_ids]
|
||||
if not log_ids:
|
||||
raise osv.except_osv('Warning!', 'There is no history to send')
|
||||
msg_val = self.get_whole_history(cr, uid, log_ids, context=context)
|
||||
|
||||
if history == 'latest':
|
||||
elif history_type == 'latest':
|
||||
log_ids = model_pool.browse(cr, uid, res_id, context=context).message_ids
|
||||
if not log_ids:
|
||||
raise osv.except_osv('Warning!', 'There is no history to send')
|
||||
msg_val = self.get_latest_history(cr, uid, log_ids[0].id, context=context)
|
||||
|
||||
if msg_val:
|
||||
res = {'value': {'message' : '\n\n' + msg_val}}
|
||||
return res
|
||||
return msg_val
|
||||
|
||||
def on_change_partner(self, cr, uid, ids, partner_id):
|
||||
"""This function fills address information based on partner/user selected
|
||||
@@ -169,7 +181,7 @@ class crm_lead_forward_to_partner(osv.osv_memory):
|
||||
context = {}
|
||||
|
||||
res_id = context.get('active_id', False)
|
||||
|
||||
|
||||
model = context.get('active_model', False)
|
||||
if not res_id or not model:
|
||||
return {}
|
||||
@@ -184,19 +196,35 @@ class crm_lead_forward_to_partner(osv.osv_memory):
|
||||
body = case_pool.format_body(this.message)
|
||||
email_from = this.email_from or False
|
||||
|
||||
flag = False
|
||||
flag = tools.email_send(
|
||||
email_from,
|
||||
emails,
|
||||
this.subject,
|
||||
body,
|
||||
# extract attachements from case and emails according to mode
|
||||
attachments = []
|
||||
attach_pool = self.pool.get('ir.attachment')
|
||||
direct_attachments = attach_pool.search(cr, uid, [('res_model', '=', 'crm.lead'), ('res_id', '=', res_id)], context=context)
|
||||
attachments += attach_pool.browse(cr, uid, direct_attachments, context=context)
|
||||
if this.history in ['latest', 'whole'] and case.message_ids:
|
||||
msgs = case.message_ids
|
||||
if this.history == 'latest':
|
||||
msgs = msgs[:1]
|
||||
attachments.extend(itertools.chain(*[m.attachment_ids for m in msgs]))
|
||||
|
||||
result = tools.email_send(
|
||||
email_from,
|
||||
emails,
|
||||
this.subject,
|
||||
body,
|
||||
openobject_id=str(case.id),
|
||||
attach=[(a.datas_fname or a.name, base64.decodestring(a.datas)) for a in attachments if a.datas],
|
||||
reply_to=case.section_id.reply_to,
|
||||
)
|
||||
if flag:
|
||||
|
||||
if result:
|
||||
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:
|
||||
else:
|
||||
raise osv.except_osv(_('Error!'), _('Unable to send mail. Please check SMTP is configured properly.'))
|
||||
|
||||
if this.add_cc and (not case.email_cc or not this.email_to in case.email_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 {}
|
||||
|
||||
def get_lead_details(self, cr, uid, lead_id, context=None):
|
||||
@@ -209,11 +237,11 @@ class crm_lead_forward_to_partner(osv.osv_memory):
|
||||
'zip', 'city', 'country_id', 'state_id', 'email_from',
|
||||
'phone', 'fax', 'mobile'
|
||||
]
|
||||
|
||||
|
||||
for field_name in field_names:
|
||||
field_definition = lead_proxy._columns[field_name]
|
||||
value = None
|
||||
|
||||
|
||||
if field_definition._type == 'selection':
|
||||
if hasattr(field_definition.selection, '__call__'):
|
||||
key = field_definition.selection(lead_proxy, cr, uid, context=context)
|
||||
@@ -225,7 +253,7 @@ class crm_lead_forward_to_partner(osv.osv_memory):
|
||||
value = lead[field_name].name_get()[0][1]
|
||||
else:
|
||||
value = lead[field_name]
|
||||
|
||||
|
||||
message.append("%s: %s" % (field_definition.string, value or ''))
|
||||
elif lead.type == 'opportunity':
|
||||
pa = lead.partner_address_id
|
||||
@@ -246,7 +274,7 @@ class crm_lead_forward_to_partner(osv.osv_memory):
|
||||
"Mobile: %s" % (pa.mobile or ''),
|
||||
]
|
||||
return "\n".join(message + ['---'])
|
||||
|
||||
|
||||
def default_get(self, cr, uid, fields, context=None):
|
||||
"""
|
||||
This function gets default values
|
||||
@@ -254,29 +282,21 @@ class crm_lead_forward_to_partner(osv.osv_memory):
|
||||
if context is None:
|
||||
context = {}
|
||||
|
||||
active_ids = context.get('active_ids')
|
||||
if not active_ids:
|
||||
return {}
|
||||
defaults = super(crm_lead_forward_to_partner, self).default_get(cr, uid, fields, context=context)
|
||||
|
||||
active_id = context.get('active_id')
|
||||
if not active_id:
|
||||
return defaults
|
||||
|
||||
lead_proxy = self.pool.get('crm.lead')
|
||||
lead = lead_proxy.browse(cr, uid, active_ids[0], context=context)
|
||||
message = False
|
||||
|
||||
user = self.pool.get('res.users').browse(cr, uid, uid, context=context)
|
||||
email_from = ''
|
||||
if user.address_id and user.address_id.email:
|
||||
email_from = "%s <%s>" % (user.name, user.address_id.email)
|
||||
|
||||
message = self.get_lead_details(cr, uid, lead.id, context=context)
|
||||
lead = lead_proxy.browse(cr, uid, active_id, context=context)
|
||||
|
||||
res = {
|
||||
'email_from' : email_from,
|
||||
'subject' : '[%s-Forward:%06d] %s' % (lead.type.title(), lead.id, lead.name),
|
||||
'message' : message,
|
||||
}
|
||||
if 'history' in fields:
|
||||
res.update({'history': 'info'})
|
||||
return res
|
||||
message = self._get_case_history(cr, uid, defaults.get('history', 'latest'), lead.id, context=context)
|
||||
defaults.update({
|
||||
'subject' : '%s: %s' % (_('Fwd'), lead.name),
|
||||
'message' : message,
|
||||
})
|
||||
return defaults
|
||||
|
||||
crm_lead_forward_to_partner()
|
||||
|
||||
|
||||
@@ -7,28 +7,24 @@
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Forward to Partner">
|
||||
<separator string="User" colspan="4" />
|
||||
<separator string="Sender" colspan="4" />
|
||||
<field name="email_from" colspan="2" />
|
||||
<field name="history" colspan="2" on_change="on_change_history(history, context)"/>
|
||||
<separator string="Send to" colspan="4" />
|
||||
<separator string="Recipient" colspan="4" />
|
||||
<field name="name" colspan="2" />
|
||||
<group col="2" colspan="2" attrs="{ 'invisible' : [('name','!=','user')]}">
|
||||
<group col="2" colspan="2" attrs="{ 'invisible' : [('name','!=','user')]}">
|
||||
<field name="user_id"
|
||||
attrs="{ 'required' : [('name','=','user')]}"
|
||||
on_change="on_change_email(user_id)" />
|
||||
</group>
|
||||
<group col="4" colspan="4" attrs="{'invisible' : [('name','!=','partner')]}">
|
||||
<field name="partner_id" attrs="{'required' : [('name','=','partner')]}" on_change="on_change_partner(partner_id)" colspan="2" />
|
||||
<field name="address_id" string="Contact" on_change="on_change_address(address_id)" colspan="2" />
|
||||
</group>
|
||||
<field colspan="4" name="email_to" attrs="{ 'required' : [('name','=','email')]}" />
|
||||
<newline/>
|
||||
<group colspan="2" col="2">
|
||||
<field name="add_cc" colspan="2"/>
|
||||
</group>
|
||||
<separator string="Email" colspan="4" />
|
||||
<field name="partner_id" attrs="{'required' : [('name','=','partner')]}" on_change="on_change_partner(partner_id)" colspan="2" />
|
||||
<field name="address_id" string="Contact" on_change="on_change_address(address_id)" colspan="2" />
|
||||
</group>
|
||||
<field colspan="2" name="email_to" attrs="{ 'required' : [('name','=','email')]}" />
|
||||
<field name="add_cc"/>
|
||||
<separator string="Message" colspan="4" />
|
||||
<field name="subject" colspan="4" />
|
||||
<separator string="Mesage body" colspan="4" />
|
||||
<field name="message" colspan="4" nolabel="1"/>
|
||||
<separator string="" colspan="4" />
|
||||
<group colspan="4" col="2">
|
||||
|
||||
@@ -83,6 +83,9 @@ class crm_lead2opportunity(osv.osv_memory):
|
||||
}
|
||||
lead_obj.write(cr, uid, lead.id, vals, context=context)
|
||||
lead_obj._history(cr, uid, [lead], _('Opportunity'), details='Converted to Opportunity', context=context)
|
||||
if lead.partner_id:
|
||||
msg_ids = [ x.id for x in lead.message_ids]
|
||||
self.pool.get('mailgate.message').write(cr, uid, msg_ids, {'partner_id': lead.partner_id.id}, context=context)
|
||||
|
||||
value = {
|
||||
'name': _('Opportunity'),
|
||||
|
||||
@@ -53,7 +53,8 @@ class crm_send_new_email(osv.osv_memory):
|
||||
_columns = {
|
||||
'email_to' : fields.char('To', size=64, required=True),
|
||||
'email_from' : fields.char('From', size=64, required=True),
|
||||
'email_cc' : fields.char('CC', size=128),
|
||||
'email_cc' : fields.char('CC', size=128, help="Carbon Copy: list of recipients that will receive"\
|
||||
" a copy of this mail, and future communication related to this case"),
|
||||
'subject': fields.char('Subject', size=128, required=True),
|
||||
'text': fields.text('Message', required=True),
|
||||
'state': fields.selection(crm.AVAILABLE_STATES, string='Set New State To', required=True),
|
||||
@@ -92,7 +93,7 @@ class crm_send_new_email(osv.osv_memory):
|
||||
|
||||
case = case_pool.browse(cr, uid, res_id)
|
||||
if context.get('mail', 'new') == 'new':
|
||||
if len(case.message_ids):
|
||||
if case.message_ids:
|
||||
message_id = case.message_ids[0].message_id
|
||||
else:
|
||||
hist = hist_obj.browse(cr, uid, res_id)
|
||||
@@ -107,12 +108,11 @@ class crm_send_new_email(osv.osv_memory):
|
||||
body = obj.text
|
||||
|
||||
body = case_pool.format_body(body)
|
||||
email_from = getattr(obj, 'email_from', False)
|
||||
email_from = getattr(obj, 'email_from', False)
|
||||
x_headers = {}
|
||||
if message_id:
|
||||
x_headers['References'] = "%s" % (message_id)
|
||||
|
||||
flag = False
|
||||
|
||||
flag = tools.email_send(
|
||||
email_from,
|
||||
emails,
|
||||
@@ -120,10 +120,11 @@ class crm_send_new_email(osv.osv_memory):
|
||||
body,
|
||||
email_cc=email_cc,
|
||||
attach=attach,
|
||||
reply_to=case.section_id and case.section_id.reply_to or email_from,
|
||||
reply_to=case.section_id and case.section_id.reply_to,
|
||||
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:
|
||||
@@ -164,23 +165,23 @@ class crm_send_new_email(osv.osv_memory):
|
||||
mod_obj = self.pool.get(model)
|
||||
res_id = context and context.get('active_ids', []) or []
|
||||
|
||||
user_obj = self.pool.get('res.users')
|
||||
user_mail_from = user_obj._get_email_from(cr, uid, [uid], context=context)[uid]
|
||||
|
||||
for case in mod_obj.browse(cr, uid, res_id):
|
||||
if 'email_to' in fields:
|
||||
res.update({'email_to': case.email_from})
|
||||
if 'email_from' in fields:
|
||||
res.update({'email_from': (case.section_id and case.section_id.reply_to) or \
|
||||
(case.user_id and case.user_id.address_id and \
|
||||
case.user_id.address_id.email and \
|
||||
"%s <%s>" % (case.user_id.name, case.user_id.address_id.email)) or \
|
||||
tools.config.get('email_from',False)})
|
||||
res.update({'email_from': user_mail_from})
|
||||
if 'subject' in fields:
|
||||
res.update({'subject': '[%s] %s' % (str(case.id), context.get('subject', case.name) or '')})
|
||||
res.update({'subject': str(context.get('subject', case.name) or '')})
|
||||
if 'email_cc' in fields:
|
||||
res.update({'email_cc': case.email_cc or ''})
|
||||
if 'text' in fields:
|
||||
res.update({'text': '\n\n'+(case.user_id.signature or '')})
|
||||
if 'state' in fields:
|
||||
res.update({'state': 'pending'})
|
||||
|
||||
return res
|
||||
|
||||
def get_reply_defaults(self, cr, uid, fields, context=None):
|
||||
@@ -190,6 +191,9 @@ class crm_send_new_email(osv.osv_memory):
|
||||
hist_obj = self.pool.get('mailgate.message')
|
||||
res_ids = context and context.get('active_ids', []) or []
|
||||
|
||||
user_obj = self.pool.get('res.users')
|
||||
user_mail_from = user_obj._get_email_from(cr, uid, [uid], context=context)[uid]
|
||||
|
||||
include_original = context and context.get('include_original', False) or False
|
||||
res = {}
|
||||
for hist in hist_obj.browse(cr, uid, res_ids, context=context):
|
||||
@@ -200,14 +204,12 @@ class crm_send_new_email(osv.osv_memory):
|
||||
return {}
|
||||
|
||||
model_pool = self.pool.get(model)
|
||||
res_id = hist.res_id
|
||||
res_id = hist.res_id
|
||||
case = model_pool.browse(cr, uid, res_id)
|
||||
if 'email_to' in fields:
|
||||
res.update({'email_to': case.email_from or hist.email_from or False})
|
||||
if 'email_from' in fields:
|
||||
res.update({'email_from': (case.section_id and case.section_id.reply_to) or \
|
||||
(case.user_id and case.user_id.address_id and \
|
||||
case.user_id.address_id.email) or hist.email_to or tools.config.get('email_from',False)})
|
||||
res.update({'email_from': user_mail_from})
|
||||
|
||||
signature = '\n' + (case.user_id.signature or '')
|
||||
original = [signature]
|
||||
@@ -250,13 +252,6 @@ class crm_send_new_email(osv.osv_memory):
|
||||
return True
|
||||
if tools.config.get('email_from'):
|
||||
return True
|
||||
|
||||
for case in mod_obj.browse(cr, uid, context.get('active_ids', [])):
|
||||
if not case.user_id:
|
||||
raise osv.except_osv(_('Error'), _('You must define a responsible user for this case in order to use this action!'))
|
||||
if not case.user_id.address_id.email:
|
||||
raise osv.except_osv(_('Warning!'), _("Please specify user's email address !"))
|
||||
|
||||
return True
|
||||
|
||||
crm_send_new_email()
|
||||
|
||||
@@ -10,12 +10,11 @@
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<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" colspan="6"/>
|
||||
<group colspan="4" col="2">
|
||||
<field name="email_from"/>
|
||||
<field name="email_to" />
|
||||
<field name="email_cc"/>
|
||||
<field name="subject"/>
|
||||
</group>
|
||||
<notebook colspan="6">
|
||||
<page string="Message">
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0"?>
|
||||
<openerp>
|
||||
<data noupdate="1">
|
||||
<data>
|
||||
|
||||
<menuitem id="base.menu_aftersale" name="After-Sale Services"
|
||||
groups="base.group_extended"
|
||||
|
||||
@@ -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-25 03:47+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-06-26 03:58+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
"X-Poedit-Country: GREECE\n"
|
||||
"X-Poedit-Language: Greek\n"
|
||||
|
||||
@@ -43,10 +43,10 @@
|
||||
'depends': ['base', 'process','board'],
|
||||
'init_xml': [],
|
||||
'update_xml': [
|
||||
'security/document_security.xml',
|
||||
'document_view.xml',
|
||||
'document_data.xml',
|
||||
'wizard/document_configuration_view.xml',
|
||||
'security/document_security.xml',
|
||||
'security/ir.model.access.csv',
|
||||
'report/document_report_view.xml',
|
||||
'board_document_view.xml',
|
||||
|
||||
@@ -98,6 +98,7 @@ class document_file(osv.osv):
|
||||
('binary','Binary'),
|
||||
|
||||
],'Type', help="Type is used to separate URL and binary File"),
|
||||
'company_id': fields.many2one('res.company', 'Company'),
|
||||
}
|
||||
|
||||
def __get_def_directory(self, cr, uid, context=None):
|
||||
@@ -105,6 +106,7 @@ class document_file(osv.osv):
|
||||
return dirobj._get_root_directory(cr, uid, context)
|
||||
|
||||
_defaults = {
|
||||
'company_id': lambda s,cr,uid,c: s.pool.get('res.company')._company_default_get(cr, uid, 'ir.attachment', context=c),
|
||||
'user_id': lambda self, cr, uid, ctx:uid,
|
||||
'file_size': lambda self, cr, uid, ctx:0,
|
||||
'store_method': lambda *args: 'db',
|
||||
|
||||
@@ -9,15 +9,9 @@
|
||||
</record>
|
||||
|
||||
<record model="document.storage" id="storage_default">
|
||||
<field name="name">Default File storage</field>
|
||||
<field name="user_id" ref="base.user_admin"/>
|
||||
</record>
|
||||
|
||||
<record model="document.storage" id="storage_db">
|
||||
<field name="name">DB storage</field>
|
||||
<field name="user_id" ref="base.user_admin"/>
|
||||
<field name="type" eval="'db'" />
|
||||
<field name="path"></field>
|
||||
<field name="name">Default DB storage</field>
|
||||
<field name="type">db</field>
|
||||
<field name="user_id" ref="base.user_admin"/>
|
||||
</record>
|
||||
|
||||
<record model="document.directory" id="dir_root">
|
||||
@@ -60,7 +54,7 @@
|
||||
</record>
|
||||
|
||||
<record model="document.directory" id="dir_personnal_folder">
|
||||
<field name="name">Personnal Folders</field>
|
||||
<field name="name">Personal Folders</field>
|
||||
<field name="parent_id" ref="dir_root"/>
|
||||
<field name="type">ressource</field>
|
||||
<field name="storage_id" ref="storage_default"/>
|
||||
|
||||
@@ -60,6 +60,7 @@ class document_directory(osv.osv):
|
||||
'ressource_tree': fields.boolean('Tree Structure',
|
||||
help="Check this if you want to use the same tree structure as the object selected in the system."),
|
||||
'dctx_ids': fields.one2many('document.directory.dctx', 'dir_id', 'Context fields'),
|
||||
'company_id': fields.many2one('res.company', 'Company'),
|
||||
}
|
||||
|
||||
|
||||
@@ -92,6 +93,7 @@ class document_directory(osv.osv):
|
||||
return None
|
||||
|
||||
_defaults = {
|
||||
'company_id': lambda s,cr,uid,c: s.pool.get('res.company')._company_default_get(cr, uid, 'document.directory', context=c),
|
||||
'user_id': lambda self,cr,uid,ctx: uid,
|
||||
'domain': lambda self,cr,uid,ctx: '[]',
|
||||
'type': lambda *args: 'directory',
|
||||
|
||||
@@ -24,6 +24,8 @@ from osv import osv, fields
|
||||
import os
|
||||
import tools
|
||||
import base64
|
||||
import logging
|
||||
|
||||
from tools.misc import ustr
|
||||
from tools.translate import _
|
||||
|
||||
@@ -96,6 +98,8 @@ class document_storage(osv.osv):
|
||||
"""
|
||||
_name = 'document.storage'
|
||||
_description = 'Storage Media'
|
||||
_doclog = logging.getLogger('document')
|
||||
|
||||
_columns = {
|
||||
'name': fields.char('Name', size=64, required=True, select=1),
|
||||
'write_date': fields.datetime('Date Modified', readonly=True),
|
||||
@@ -151,7 +155,7 @@ class document_storage(osv.osv):
|
||||
# On a migrated db, some files may have the wrong storage type
|
||||
# try to fix their directory.
|
||||
if ira.file_size:
|
||||
netsvc.Logger().notifyChannel('document', netsvc.LOG_WARNING, "ir.attachment #%d does not have a filename, but is at filestore, fix it!" % ira.id)
|
||||
self._doclog.warning( "ir.attachment #%d does not have a filename, but is at filestore, fix it!" % ira.id)
|
||||
return None
|
||||
fpath = os.path.join(boo.path, ira.store_fname)
|
||||
return file(fpath, 'rb').read()
|
||||
@@ -167,7 +171,7 @@ class document_storage(osv.osv):
|
||||
# On a migrated db, some files may have the wrong storage type
|
||||
# try to fix their directory.
|
||||
if ira.file_size:
|
||||
netsvc.Logger().notifyChannel('document',netsvc.LOG_WARNING,"ir.attachment #%d does not have a filename, trying the name." %ira.id)
|
||||
self._doclog.warning("ir.attachment #%d does not have a filename, trying the name." %ira.id)
|
||||
sfname = ira.name
|
||||
fpath = os.path.join(boo.path,ira.store_fname or ira.name)
|
||||
if os.path.exists(fpath):
|
||||
@@ -187,7 +191,6 @@ class document_storage(osv.osv):
|
||||
if not context:
|
||||
context = {}
|
||||
boo = self.browse(cr, uid, id, context)
|
||||
logger = netsvc.Logger()
|
||||
if fil_obj:
|
||||
ira = fil_obj
|
||||
else:
|
||||
@@ -195,7 +198,7 @@ class document_storage(osv.osv):
|
||||
|
||||
if not boo.online:
|
||||
raise RuntimeError('media offline')
|
||||
logger.notifyChannel('document', netsvc.LOG_DEBUG, "Store data for ir.attachment #%d" % ira.id)
|
||||
self._doclog.debug( "Store data for ir.attachment #%d" % ira.id)
|
||||
store_fname = None
|
||||
fname = None
|
||||
if boo.type == 'filestore':
|
||||
@@ -214,14 +217,14 @@ class document_storage(osv.osv):
|
||||
fp = file(fname, 'wb')
|
||||
fp.write(data)
|
||||
fp.close()
|
||||
logger.notifyChannel('document', netsvc.LOG_DEBUG, "Saved data to %s" % fname)
|
||||
self._doclog.debug( "Saved data to %s" % fname)
|
||||
filesize = len(data) # os.stat(fname).st_size
|
||||
store_fname = os.path.join(flag, filename)
|
||||
|
||||
# TODO Here, an old file would be left hanging.
|
||||
|
||||
except Exception, e :
|
||||
netsvc.Logger().notifyChannel('document', netsvc.LOG_WARNING, "Couldn't save data: %s" % str(e))
|
||||
except Exception, e:
|
||||
self._doclog.warning( "Couldn't save data to %s", path, exc_info=True)
|
||||
raise except_orm(_('Error!'), str(e))
|
||||
elif boo.type == 'db':
|
||||
filesize = len(data)
|
||||
@@ -250,14 +253,12 @@ class document_storage(osv.osv):
|
||||
fp = file(fname,'wb')
|
||||
fp.write(data)
|
||||
fp.close()
|
||||
logger.notifyChannel('document',netsvc.LOG_DEBUG,"Saved data to %s" % fname)
|
||||
self._doclog.debug("Saved data to %s", fname)
|
||||
filesize = len(data) # os.stat(fname).st_size
|
||||
store_fname = os.path.join(*npath)
|
||||
# TODO Here, an old file would be left hanging.
|
||||
except Exception,e :
|
||||
import traceback
|
||||
traceback.print_exc()
|
||||
netsvc.Logger().notifyChannel('document',netsvc.LOG_WARNING,"Couldn't save data: %s" % e)
|
||||
self._doclog.warning("Couldn't save data:", exc_info=True)
|
||||
raise except_orm(_('Error!'), str(e))
|
||||
else:
|
||||
raise TypeError("No %s storage" % boo.type)
|
||||
@@ -271,8 +272,8 @@ class document_storage(osv.osv):
|
||||
try:
|
||||
mime, icont = cntIndex.doIndex(data, ira.datas_fname,
|
||||
ira.file_type or None, fname)
|
||||
except Exception, e:
|
||||
logger.notifyChannel('document', netsvc.LOG_DEBUG, 'Cannot index file: %s' % str(e))
|
||||
except Exception:
|
||||
self._doclog.debug('Cannot index file:', exc_info=True)
|
||||
pass
|
||||
|
||||
# a hack: /assume/ that the calling write operation will not try
|
||||
@@ -284,7 +285,7 @@ class document_storage(osv.osv):
|
||||
file_node.content_type = mime
|
||||
return True
|
||||
except Exception, e :
|
||||
netsvc.Logger().notifyChannel('document', netsvc.LOG_WARNING, "Couldn't save data: %s" % str(e))
|
||||
self._doclog.warning( "Couldn't save data:", exc_info=True)
|
||||
# should we really rollback once we have written the actual data?
|
||||
# at the db case (only), that rollback would be safe
|
||||
raise except_orm(_('Error at doc write!'), str(e))
|
||||
@@ -319,9 +320,9 @@ class document_storage(osv.osv):
|
||||
try:
|
||||
os.unlink(fname)
|
||||
except Exception, e:
|
||||
netsvc.Logger().notifyChannel('document', netsvc.LOG_WARNING, "Could not remove file %s, please remove manually." % fname)
|
||||
self._doclog.warning("Could not remove file %s, please remove manually.", fname, exc_info=True)
|
||||
else:
|
||||
netsvc.Logger().notifyChannel('document', netsvc.LOG_WARNING, "Unknown unlink key %s" % ktype)
|
||||
self._doclog.warning("Unknown unlink key %s" % ktype)
|
||||
|
||||
return True
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<!--<menuitem name="Document Management" icon="terp-stock" id="menu_document"/>
|
||||
<menuitem name="Document Configuration" id="menu_document_configuration" parent="menu_document"/>-->
|
||||
|
||||
<menuitem name="Knowledge" icon="terp-stock" id="base.menu_document" sequence="19" groups="base.group_user"/>
|
||||
<menuitem name="Knowledge" icon="terp-stock" id="base.menu_document" sequence="19" groups="group_document_user"/>
|
||||
<menuitem name="Configuration" id="base.menu_document_configuration" parent="base.menu_document" sequence="50"/>
|
||||
<menuitem name="Document Management" id="menu_document_management_configuration" parent="base.menu_document_configuration" sequence="1"/>
|
||||
|
||||
@@ -13,14 +13,15 @@
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Storage Media">
|
||||
<group colspan="4" col="4">
|
||||
<group colspan="4" col="6">
|
||||
<field name="name" select="1" colspan="4"/>
|
||||
<field name="user_id"/>
|
||||
<field name="type"/>
|
||||
<newline/>
|
||||
<field name="user_id"/>
|
||||
<field name="online"/>
|
||||
<field name="readonly"/>
|
||||
</group>
|
||||
<group colspan="2" attrs="{'invisible':[('type','!=','realstore')]}">
|
||||
<group colspan="2" attrs="{'invisible':[('type','=','db')]}">
|
||||
<field name="path"/>
|
||||
</group>
|
||||
</form>
|
||||
@@ -35,17 +36,31 @@
|
||||
<tree string="Storage Media" toolbar="1">
|
||||
<field name="name"/>
|
||||
<field name="type"/>
|
||||
<field name="online"/>
|
||||
<field name="readonly"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_document_storage_filter" model="ir.ui.view">
|
||||
<field name="name">Search View: Document Storage</field>
|
||||
<field name="model">document.storage</field>
|
||||
<field name="type">search</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Search Document storage">
|
||||
<field name="name" />
|
||||
<newline/>
|
||||
<group expand="0" string="Group By..." groups="base.group_extended">
|
||||
<filter string="Type" domain="[]" context="{'group_by':'type'}"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.actions.act_window" id="action_document_storage_form">
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">document.storage</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="search_view_id" ref="view_document_storage_filter"/>
|
||||
</record>
|
||||
<menuitem
|
||||
name="Storage Media"
|
||||
@@ -63,6 +78,7 @@
|
||||
<field name="user_id"/>
|
||||
<field name="parent_id"/>
|
||||
<field name="storage_id" />
|
||||
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
|
||||
<notebook colspan="4">
|
||||
<page string="Definition">
|
||||
<separator string="Directory Type" colspan="4"/>
|
||||
@@ -96,7 +112,7 @@
|
||||
</tree>
|
||||
</field>
|
||||
</page>
|
||||
<page string="Dynamic context">
|
||||
<page string="Dynamic context" groups="base.group_extended">
|
||||
<field name="dctx_ids" nolabel="1" colspan="4">
|
||||
<tree string="Fields" editable="bottom">
|
||||
<field name="field"/>
|
||||
@@ -119,6 +135,7 @@
|
||||
<field name="name">document.directory</field>
|
||||
<field name="model">document.directory</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="field_parent">child_ids</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Directories" toolbar="1">
|
||||
<field name="name"/>
|
||||
@@ -130,12 +147,35 @@
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_document_directory_filter" model="ir.ui.view">
|
||||
<field name="name">Search View: Document Directory</field>
|
||||
<field name="model">document.directory</field>
|
||||
<field name="type">search</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Search Document Directory">
|
||||
<filter string="Static" domain="[('type','=','directory')]"/>
|
||||
<filter string="Resources" domain="[('type','=','ressource')]"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="name" />
|
||||
<field name="user_id" />
|
||||
<field name="storage_id" />
|
||||
<newline/>
|
||||
<group expand="0" string="Group By..." groups="base.group_extended">
|
||||
<filter string="Type" domain="[]" context="{'group_by':'type'}"/>
|
||||
<filter string="Owner" icon="terp-personal" domain="[]" context="{'group_by':'user_id'}"/>
|
||||
<filter string="Storage" domain="[]" context="{'group_by':'storage_id'}"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.actions.act_window" id="action_document_directory_form">
|
||||
<field name="name">Directories</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">document.directory</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="search_view_id" ref="view_document_directory_filter"/>
|
||||
</record>
|
||||
|
||||
<record id="action_dir_view1" model="ir.actions.act_window.view">
|
||||
@@ -159,7 +199,7 @@
|
||||
|
||||
<record model="ir.actions.act_window" id="action_document_directory_tree">
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="name">Directorie's Structure</field>
|
||||
<field name="name">Directories' Structure</field>
|
||||
<field name="res_model">document.directory</field>
|
||||
<field name="view_type">tree</field>
|
||||
<field name="view_id" ref="document.view_document_directory_tree"/>
|
||||
@@ -180,7 +220,8 @@
|
||||
<group colspan="4" col="6">
|
||||
<field name="name" select="1" />
|
||||
<field name="type"/>
|
||||
<field name="parent_id"/>
|
||||
<field name="parent_id"/>
|
||||
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
|
||||
</group>
|
||||
<notebook colspan="4">
|
||||
<page string="Attachment">
|
||||
@@ -244,11 +285,15 @@
|
||||
help="Filter on my Attachment" />
|
||||
</field>
|
||||
<field name="partner_id"/>
|
||||
<field name="company_id" groups="base.group_multi_company"/>
|
||||
<newline/>
|
||||
<group expand="0" string="Group By...">
|
||||
<filter string="Partner" icon="terp-personal" domain="[]"
|
||||
context="{'group_by':'partner_id'}" />
|
||||
<filter string="Directory" icon="terp-folder-green" domain="[]" context="{'group_by':'parent_id'}"/>
|
||||
<filter string="Type" domain="[]" context="{'group_by':'type'}"/>
|
||||
<filter string="Owner" icon="terp-personal" domain="[]" context="{'group_by':'user_id'}"/>
|
||||
<filter string="Company" icon="terp-personal" domain="[]" context="{'group_by':'company_id'}" groups="base.group_multi_company"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
@@ -259,7 +304,7 @@
|
||||
<field name="type">tree</field>
|
||||
<field name="priority" eval="1"/>
|
||||
<field name="arch" type="xml">
|
||||
<tree colors="blue:type in ('url')" string="Documents">
|
||||
<tree colors="blue:type in ('url',)">
|
||||
<field name="name"/>
|
||||
<field name="type"/>
|
||||
<field name="datas_fname"/>
|
||||
@@ -272,8 +317,10 @@
|
||||
</record>
|
||||
|
||||
<record model="ir.actions.act_window" id="action_document_file_form">
|
||||
<field name="name">Documents</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">ir.attachment</field>
|
||||
<field name="name">Document</field>
|
||||
<field name="view_type">form</field>
|
||||
</record>
|
||||
<menuitem name="Documents" id="menu_document_doc" parent="base.menu_document" sequence="5"/>
|
||||
@@ -286,9 +333,10 @@
|
||||
<record model="ir.actions.act_window" id="action_document_file_directory_form">
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">ir.attachment</field>
|
||||
<field name="name">Directory</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="domain">[('parent_id','child_of',active_id)]</field>
|
||||
<field name="context">{'parent_id':'active_id'}</field>
|
||||
<field name="context">{'parent_id':active_id}</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.values" id="ir_action_document_file_directory_form">
|
||||
@@ -348,6 +396,9 @@
|
||||
res_model="ir.attachment"
|
||||
src_model="document.directory"/>
|
||||
|
||||
|
||||
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
|
||||
@@ -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-25 03:47+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-06-26 03:58+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: document
|
||||
|
||||
@@ -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-25 03:47+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-06-26 03:58+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: document
|
||||
|
||||
@@ -339,7 +339,8 @@ class node_dir(node_database):
|
||||
fil_id = fil_obj.create(cr, uid, val, context=ctx)
|
||||
fil = fil_obj.browse(cr, uid, fil_id, context=ctx)
|
||||
fnode = node_file(path, self, self.context, fil)
|
||||
fnode.set_data(cr, data, fil)
|
||||
if data is not None:
|
||||
fnode.set_data(cr, data, fil)
|
||||
return fnode
|
||||
|
||||
def get_etag(self, cr):
|
||||
@@ -667,7 +668,7 @@ class node_file(node_class):
|
||||
self.file_id = fil.id
|
||||
#todo: more info from ir_attachment
|
||||
if fil.file_type and '/' in fil.file_type:
|
||||
self.mimetype = fil.file_type
|
||||
self.mimetype = str(fil.file_type)
|
||||
self.create_date = fil.create_date
|
||||
self.write_date = fil.write_date or fil.create_date
|
||||
self.content_length = fil.file_size
|
||||
@@ -809,7 +810,7 @@ class node_content(node_class):
|
||||
(self.extension,))
|
||||
res = cr.fetchall()
|
||||
if res and res[0][0]:
|
||||
self.mimetype = res[0][0]
|
||||
self.mimetype = str(res[0][0])
|
||||
|
||||
|
||||
def get_data(self, cr, fil_obj = None):
|
||||
|
||||
@@ -19,16 +19,6 @@
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
# 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 General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
from osv import fields,osv
|
||||
import time
|
||||
@@ -53,9 +43,10 @@ class report_document_user(osv.osv):
|
||||
'partner':fields.char('Partner',size=64,readonly=True),
|
||||
}
|
||||
def init(self, cr):
|
||||
cr.execute("""
|
||||
create or replace view report_document_user as (
|
||||
select
|
||||
tools.drop_view_if_exists(cr, 'report_document_user')
|
||||
cr.execute("""
|
||||
CREATE OR REPLACE VIEW report_document_user as (
|
||||
SELECT
|
||||
min(f.id) as id,
|
||||
to_char(f.create_date, 'YYYY') as name,
|
||||
to_char(f.create_date, 'MM') as month,
|
||||
@@ -67,12 +58,12 @@ class report_document_user(osv.osv):
|
||||
f.file_size as file_size,
|
||||
min(d.type) as type,
|
||||
f.write_date as change_date
|
||||
from ir_attachment f
|
||||
FROM ir_attachment f
|
||||
left join document_directory d on (f.parent_id=d.id and d.name<>'')
|
||||
inner join res_users u on (f.user_id=u.id)
|
||||
group by to_char(f.create_date, 'YYYY'), to_char(f.create_date, 'MM'),d.name,f.parent_id,d.type,f.create_date,f.user_id,f.file_size,u.name,d.type,f.write_date
|
||||
)
|
||||
""")
|
||||
""")
|
||||
report_document_user()
|
||||
|
||||
class report_files_partner(osv.osv):
|
||||
@@ -94,7 +85,7 @@ class report_files_partner(osv.osv):
|
||||
def init(self, cr):
|
||||
tools.drop_view_if_exists(cr, 'report_files_partner')
|
||||
cr.execute("""
|
||||
create or replace view report_files_partner as (
|
||||
CREATE VIEW report_files_partner as (
|
||||
select min(f.id) as id,count(*) as nbr,
|
||||
to_char(f.create_date,'YYYY') as name,
|
||||
min(to_char(f.create_date,'MM')) as month,
|
||||
@@ -119,7 +110,8 @@ class report_document_file(osv.osv):
|
||||
}
|
||||
_order = "month"
|
||||
def init(self, cr):
|
||||
cr.execute("""
|
||||
tools.drop_view_if_exists(cr, 'report_document_file')
|
||||
cr.execute("""
|
||||
create or replace view report_document_file as (
|
||||
select min(f.id) as id,
|
||||
count(*) as nbr,
|
||||
@@ -128,7 +120,7 @@ class report_document_file(osv.osv):
|
||||
from ir_attachment f
|
||||
group by EXTRACT(MONTH FROM f.create_date)
|
||||
)
|
||||
""")
|
||||
""")
|
||||
|
||||
report_document_file()
|
||||
|
||||
@@ -145,7 +137,8 @@ class report_document_wall(osv.osv):
|
||||
}
|
||||
|
||||
def init(self, cr):
|
||||
cr.execute("""
|
||||
tools.drop_view_if_exists(cr, 'report_document_wall')
|
||||
cr.execute("""
|
||||
create or replace view report_document_wall as (
|
||||
select max(f.id) as id,
|
||||
to_char(min(f.create_date),'YYYY-MM-DD HH24:MI:SS') as last,
|
||||
@@ -159,7 +152,7 @@ class report_document_wall(osv.osv):
|
||||
group by i.user_id) group by f.user_id,f.create_date
|
||||
having (CURRENT_DATE - to_date(to_char(f.create_date,'YYYY-MM-DD'),'YYYY-MM-DD')) > 30
|
||||
)
|
||||
""")
|
||||
""")
|
||||
report_document_wall()
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
|
||||
@@ -2,6 +2,10 @@
|
||||
<openerp>
|
||||
<data noupdate="0">
|
||||
|
||||
<record id="group_document_user" model="res.groups">
|
||||
<field name="name">Document / User</field>
|
||||
</record>
|
||||
|
||||
<record id="group_document_manager" model="res.groups">
|
||||
<field name="name">Document / Manager</field>
|
||||
</record>
|
||||
|
||||
@@ -49,14 +49,14 @@ def textToString(element) :
|
||||
class TxtIndex(indexer):
|
||||
def _getMimeTypes(self):
|
||||
return ['text/plain','text/html','text/diff','text/xml', 'text/*',
|
||||
'application/xml']
|
||||
'application/xml']
|
||||
|
||||
def _getExtensions(self):
|
||||
return ['.txt', '.py']
|
||||
|
||||
def _doIndexContent(self,content):
|
||||
return content
|
||||
|
||||
|
||||
cntIndex.register(TxtIndex())
|
||||
|
||||
class PptxIndex(indexer):
|
||||
@@ -95,8 +95,8 @@ class DocIndex(indexer):
|
||||
return ['.doc']
|
||||
|
||||
def _doIndexFile(self,fname):
|
||||
#fp = Popen(['antiword', fname], shell=False, stdout=PIPE).stdout
|
||||
return _to_unicode( 'None')
|
||||
fp = Popen(['antiword', fname], shell=False, stdout=PIPE).stdout
|
||||
return _to_unicode(fp.read())
|
||||
|
||||
cntIndex.register(DocIndex())
|
||||
|
||||
@@ -177,21 +177,33 @@ class ImageNoIndex(indexer):
|
||||
|
||||
cntIndex.register(ImageNoIndex())
|
||||
|
||||
#class Doc(indexer):
|
||||
#def _getDefMime(self,ext):
|
||||
# other opendocument formats:
|
||||
# chart-template chart database
|
||||
# formula-template formula graphics-template graphics
|
||||
# image
|
||||
# presentation-template presentation spreadsheet-template spreadsheet
|
||||
|
||||
class OpenDoc(indexer):
|
||||
""" Index OpenDocument files.
|
||||
|
||||
Q: is it really worth it to index spreadsheets, or do we only get a
|
||||
meaningless list of numbers (cell contents) ?
|
||||
"""
|
||||
def _getMimeTypes(self):
|
||||
otypes = [ 'text', 'text-web', 'text-template', 'text-master' ]
|
||||
return map(lambda a: 'application/vnd.oasis.opendocument.'+a, otypes)
|
||||
|
||||
def _getExtensions(self):
|
||||
return ['.odt', '.ott', ] # '.ods'
|
||||
|
||||
def _doIndexContent(self, content):
|
||||
s = StringIO.StringIO(content)
|
||||
o = odt2txt.OpenDocumentTextFile(s)
|
||||
result = _to_unicode(o.toString())
|
||||
s.close()
|
||||
return result
|
||||
|
||||
cntIndex.register(OpenDoc())
|
||||
|
||||
#def content_index(content, filename=None, content_type=None):
|
||||
#fname,ext = os.path.splitext(filename)
|
||||
#result = ''
|
||||
#elif ext in ('.xls','.ods','.odt','.odp'):
|
||||
#s = StringIO.StringIO(content)
|
||||
#o = odt2txt.OpenDocumentTextFile(s)
|
||||
#result = _to_unicode(o.toString())
|
||||
#s.close()
|
||||
#elif ext in ('.txt','.py','.patch','.html','.csv','.xml'):
|
||||
#result = content
|
||||
#else:
|
||||
#result = content
|
||||
#return result
|
||||
|
||||
#eof
|
||||
|
||||
@@ -31,6 +31,9 @@ for fname in args:
|
||||
else:
|
||||
res = cntIndex.doIndex(None, fname, None, fname,True)
|
||||
|
||||
if options.verbose:
|
||||
for line in res[:5]:
|
||||
print line
|
||||
except Exception,e:
|
||||
import traceback,sys
|
||||
tb_s = reduce(lambda x, y: x+y, traceback.format_exception( sys.exc_type, sys.exc_value, sys.exc_traceback))
|
||||
|
||||
@@ -55,8 +55,6 @@ class openerp_dav_handler(dav_interface):
|
||||
M_NS={ "DAV:" : dav_interface.M_NS['DAV:'],}
|
||||
|
||||
def __init__(self, parent, verbose=False):
|
||||
self.db_name = False
|
||||
self.directory_id=False
|
||||
self.db_name_list=[]
|
||||
self.parent = parent
|
||||
self.baseuri = parent.baseuri
|
||||
@@ -65,10 +63,10 @@ class openerp_dav_handler(dav_interface):
|
||||
def get_propnames(self, uri):
|
||||
props = self.PROPS
|
||||
self.parent.log_message('get propnames: %s' % uri)
|
||||
if uri[-1]=='/':uri=uri[:-1]
|
||||
cr, uid, pool, dbname, uri2 = self.get_cr(uri)
|
||||
if not dbname:
|
||||
if cr: cr.close()
|
||||
# TODO: maybe limit props for databases..?
|
||||
return props
|
||||
node = self.uri2object(cr, uid, pool, uri2)
|
||||
if node:
|
||||
@@ -83,7 +81,6 @@ class openerp_dav_handler(dav_interface):
|
||||
raise DAV_NotFound
|
||||
|
||||
def match_prop(self, uri, match, ns, propname):
|
||||
if uri[-1]=='/':uri=uri[:-1]
|
||||
cr, uid, pool, dbname, uri2 = self.get_cr(uri)
|
||||
if not dbname:
|
||||
if cr: cr.close()
|
||||
@@ -104,8 +101,7 @@ class openerp_dav_handler(dav_interface):
|
||||
pname -- name of the property
|
||||
"""
|
||||
if self.M_NS.has_key(ns):
|
||||
return dav_interface.get_prop(self, uri, ns, propname)
|
||||
if uri[-1]=='/':uri=uri[:-1]
|
||||
return dav_interface.get_prop(self, uri, ns, propname)
|
||||
cr, uid, pool, dbname, uri2 = self.get_cr(uri)
|
||||
if not dbname:
|
||||
if cr: cr.close()
|
||||
@@ -114,19 +110,46 @@ class openerp_dav_handler(dav_interface):
|
||||
if not node:
|
||||
cr.close()
|
||||
raise DAV_NotFound
|
||||
res = node.get_dav_eprop(cr, ns, propname)
|
||||
res = node.get_dav_eprop(cr, ns, propname)
|
||||
cr.close()
|
||||
return res
|
||||
|
||||
def get_db(self,uri):
|
||||
names=self.uri2local(uri).split('/')
|
||||
self.db_name=False
|
||||
if len(names) > 1:
|
||||
self.db_name=self.uri2local(uri).split('/')[1]
|
||||
if self.db_name=='':
|
||||
raise Exception,'Plese specify Database name in folder'
|
||||
return self.db_name
|
||||
|
||||
def get_db(self, uri, rest_ret=False, allow_last=False):
|
||||
"""Parse the uri and get the dbname and the rest.
|
||||
Db name should be the first component in the unix-like
|
||||
path supplied in uri.
|
||||
|
||||
@param rest_ret Instead of the db_name, return (db_name, rest),
|
||||
where rest is the remaining path
|
||||
@param allow_last If the dbname is the last component in the
|
||||
path, allow it to be resolved. The default False value means
|
||||
we will not attempt to use the db, unless there is more
|
||||
path.
|
||||
|
||||
@return db_name or (dbname, rest) depending on rest_ret,
|
||||
will return dbname=False when component is not found.
|
||||
"""
|
||||
|
||||
uri2 = self.uri2local(uri)
|
||||
if uri2.startswith('/'):
|
||||
uri2 = uri2[1:]
|
||||
names=uri2.split('/',1)
|
||||
db_name=False
|
||||
rest = None
|
||||
if allow_last:
|
||||
ll = 0
|
||||
else:
|
||||
ll = 1
|
||||
if len(names) > ll and names[0]:
|
||||
db_name = names[0]
|
||||
names = names[1:]
|
||||
|
||||
if rest_ret:
|
||||
if len(names):
|
||||
rest = names[0]
|
||||
return db_name, rest
|
||||
return db_name
|
||||
|
||||
|
||||
def urijoin(self,*ajoin):
|
||||
""" Return the base URI of this request, or even join it with the
|
||||
@@ -140,20 +163,25 @@ class openerp_dav_handler(dav_interface):
|
||||
result = s.exp_list()
|
||||
self.db_name_list=[]
|
||||
for db_name in result:
|
||||
db = pooler.get_db_only(db_name)
|
||||
cr = db.cursor()
|
||||
cr.execute("select id from ir_module_module where name = 'document' and state='installed' ")
|
||||
res=cr.fetchone()
|
||||
if res and len(res):
|
||||
self.db_name_list.append(db_name)
|
||||
cr.close()
|
||||
cr = None
|
||||
try:
|
||||
db = pooler.get_db_only(db_name)
|
||||
cr = db.cursor()
|
||||
cr.execute("SELECT id FROM ir_module_module WHERE name = 'document' AND state='installed' ")
|
||||
res=cr.fetchone()
|
||||
if res and len(res):
|
||||
self.db_name_list.append(db_name)
|
||||
except Exception, e:
|
||||
self.parent.log_error("Exception in db list: %s" % e)
|
||||
finally:
|
||||
if cr:
|
||||
cr.close()
|
||||
return self.db_name_list
|
||||
|
||||
def get_childs(self, uri, filters=None):
|
||||
""" return the child objects as self.baseuris for the given URI """
|
||||
self.parent.log_message('get childs: %s' % uri)
|
||||
if uri[-1]=='/':uri=uri[:-1]
|
||||
cr, uid, pool, dbname, uri2 = self.get_cr(uri)
|
||||
cr, uid, pool, dbname, uri2 = self.get_cr(uri, allow_last=True)
|
||||
|
||||
if not dbname:
|
||||
if cr: cr.close()
|
||||
@@ -194,38 +222,33 @@ class openerp_dav_handler(dav_interface):
|
||||
#
|
||||
# pos: -1 to get the parent of the uri
|
||||
#
|
||||
def get_cr(self, uri):
|
||||
def get_cr(self, uri, allow_last=False):
|
||||
""" Split the uri, grab a cursor for that db
|
||||
"""
|
||||
pdb = self.parent.auth_proxy.last_auth
|
||||
reluri = self.uri2local(uri)
|
||||
try:
|
||||
dbname = reluri.split('/')[1]
|
||||
except:
|
||||
dbname = False
|
||||
dbname, uri2 = self.get_db(uri, rest_ret=True, allow_last=allow_last)
|
||||
uri2 = (uri2 and uri2.split('/')) or []
|
||||
if not dbname:
|
||||
return None, None, None, False, None
|
||||
if not pdb and dbname:
|
||||
# if dbname was in our uri, we should have authenticated
|
||||
# against that.
|
||||
raise Exception("Programming error")
|
||||
#assert pdb == dbname, " %s != %s" %(pdb, dbname)
|
||||
return None, None, None, False, uri2
|
||||
# if dbname was in our uri, we should have authenticated
|
||||
# against that.
|
||||
assert pdb == dbname, " %s != %s" %(pdb, dbname)
|
||||
res = self.parent.auth_proxy.auth_creds.get(dbname, False)
|
||||
if not res:
|
||||
if not res:
|
||||
self.parent.auth_proxy.checkRequest(self.parent, uri, dbname)
|
||||
res = self.parent.auth_proxy.auth_creds[dbname]
|
||||
res = self.parent.auth_proxy.auth_creds[dbname]
|
||||
user, passwd, dbn2, uid = res
|
||||
db,pool = pooler.get_db_and_pool(dbname)
|
||||
cr = db.cursor()
|
||||
uri2 = reluri.split('/')[2:]
|
||||
return cr, uid, pool, dbname, uri2
|
||||
|
||||
def uri2object(self, cr, uid, pool,uri):
|
||||
def uri2object(self, cr, uid, pool, uri):
|
||||
if not uid:
|
||||
return None
|
||||
return pool.get('document.directory').get_object(cr, uid, uri)
|
||||
|
||||
def get_data(self,uri):
|
||||
def get_data(self,uri, rrange=None):
|
||||
self.parent.log_message('GET: %s' % uri)
|
||||
if uri[-1]=='/':uri=uri[:-1]
|
||||
cr, uid, pool, dbname, uri2 = self.get_cr(uri)
|
||||
try:
|
||||
if not dbname:
|
||||
@@ -234,6 +257,9 @@ class openerp_dav_handler(dav_interface):
|
||||
if not node:
|
||||
raise DAV_NotFound(uri2)
|
||||
try:
|
||||
if rrange:
|
||||
self.parent.log_error("Doc get_data cannot use range")
|
||||
raise DAV_Error(409)
|
||||
datas = node.get_data(cr)
|
||||
except TypeError,e:
|
||||
import traceback
|
||||
@@ -256,7 +282,6 @@ class openerp_dav_handler(dav_interface):
|
||||
def _get_dav_resourcetype(self,uri):
|
||||
""" return type of object """
|
||||
self.parent.log_message('get RT: %s' % uri)
|
||||
if uri[-1]=='/':uri=uri[:-1]
|
||||
cr, uid, pool, dbname, uri2 = self.get_cr(uri)
|
||||
try:
|
||||
if not dbname:
|
||||
@@ -272,7 +297,6 @@ class openerp_dav_handler(dav_interface):
|
||||
|
||||
def _get_dav_displayname(self,uri):
|
||||
self.parent.log_message('get DN: %s' % uri)
|
||||
if uri[-1]=='/':uri=uri[:-1]
|
||||
cr, uid, pool, dbname, uri2 = self.get_cr(uri)
|
||||
if not dbname:
|
||||
cr.close()
|
||||
@@ -288,7 +312,6 @@ class openerp_dav_handler(dav_interface):
|
||||
def _get_dav_getcontentlength(self, uri):
|
||||
""" return the content length of an object """
|
||||
self.parent.log_message('get length: %s' % uri)
|
||||
if uri[-1]=='/':uri=uri[:-1]
|
||||
result = 0
|
||||
cr, uid, pool, dbname, uri2 = self.get_cr(uri)
|
||||
if not dbname:
|
||||
@@ -306,7 +329,6 @@ class openerp_dav_handler(dav_interface):
|
||||
def _get_dav_getetag(self,uri):
|
||||
""" return the ETag of an object """
|
||||
self.parent.log_message('get etag: %s' % uri)
|
||||
if uri[-1]=='/':uri=uri[:-1]
|
||||
result = 0
|
||||
cr, uid, pool, dbname, uri2 = self.get_cr(uri)
|
||||
if not dbname:
|
||||
@@ -323,7 +345,6 @@ class openerp_dav_handler(dav_interface):
|
||||
@memoize(CACHE_SIZE)
|
||||
def get_lastmodified(self, uri):
|
||||
""" return the last modified date of the object """
|
||||
if uri[-1]=='/':uri=uri[:-1]
|
||||
today = time.time()
|
||||
cr, uid, pool, dbname, uri2 = self.get_cr(uri)
|
||||
if not dbname:
|
||||
@@ -342,7 +363,6 @@ class openerp_dav_handler(dav_interface):
|
||||
@memoize(CACHE_SIZE)
|
||||
def get_creationdate(self, uri):
|
||||
""" return the last modified date of the object """
|
||||
if uri[-1]=='/':uri=uri[:-1]
|
||||
cr, uid, pool, dbname, uri2 = self.get_cr(uri)
|
||||
if not dbname:
|
||||
raise DAV_Error, 409
|
||||
@@ -361,7 +381,6 @@ class openerp_dav_handler(dav_interface):
|
||||
@memoize(CACHE_SIZE)
|
||||
def _get_dav_getcontenttype(self,uri):
|
||||
self.parent.log_message('get contenttype: %s' % uri)
|
||||
if uri[-1]=='/':uri=uri[:-1]
|
||||
cr, uid, pool, dbname, uri2 = self.get_cr(uri)
|
||||
if not dbname:
|
||||
return 'httpd/unix-directory'
|
||||
@@ -369,7 +388,7 @@ class openerp_dav_handler(dav_interface):
|
||||
node = self.uri2object(cr, uid, pool, uri2)
|
||||
if not node:
|
||||
raise DAV_NotFound(uri2)
|
||||
result = node.mimetype
|
||||
result = str(node.mimetype)
|
||||
return result
|
||||
#raise DAV_NotFound, 'Could not find %s' % path
|
||||
finally:
|
||||
@@ -434,10 +453,8 @@ class openerp_dav_handler(dav_interface):
|
||||
|
||||
def rmcol(self,uri):
|
||||
""" delete a collection """
|
||||
if uri[-1]=='/':uri=uri[:-1]
|
||||
|
||||
cr, uid, pool, dbname, uri2 = self.get_cr(uri)
|
||||
if not dbname: # *-*
|
||||
if not dbname:
|
||||
raise DAV_Error, 409
|
||||
node = self.uri2object(cr, uid, pool, uri2)
|
||||
node.rmcol(cr)
|
||||
@@ -447,7 +464,6 @@ class openerp_dav_handler(dav_interface):
|
||||
return 204
|
||||
|
||||
def rm(self,uri):
|
||||
if uri[-1]=='/':uri=uri[:-1]
|
||||
cr, uid, pool,dbname, uri2 = self.get_cr(uri)
|
||||
if not dbname:
|
||||
cr.close()
|
||||
@@ -626,3 +642,5 @@ class openerp_dav_handler(dav_interface):
|
||||
def is_collection(self, uri):
|
||||
""" test if the given uri is a collection """
|
||||
return self._get_dav_resourcetype(uri)==COLLECTION
|
||||
|
||||
#eof
|
||||
|
||||
@@ -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-25 03:47+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-06-26 03:58+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: document_webdav_old
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
|
||||
# Copyright (c) 1999 Christian Scholz (ruebe@aachen.heimat.de)
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
@@ -48,7 +49,9 @@ def mk_prop_response(self, uri, good_props, bad_props, doc):
|
||||
uparts=urlparse.urlparse(uri)
|
||||
fileloc=uparts[2]
|
||||
href=doc.createElement("D:href")
|
||||
huri=doc.createTextNode(uparts[0]+'://'+'/'.join(uparts[1:2]) + urllib.quote(fileloc))
|
||||
davpath = self._dataclass.parent.get_davpath()
|
||||
hurl = '%s://%s%s%s' % (uparts[0], uparts[1], davpath, urllib.quote(fileloc))
|
||||
huri=doc.createTextNode(hurl)
|
||||
href.appendChild(huri)
|
||||
re.appendChild(href)
|
||||
|
||||
@@ -111,5 +114,45 @@ def mk_prop_response(self, uri, good_props, bad_props, doc):
|
||||
return re
|
||||
|
||||
|
||||
PROPFIND.mk_prop_response = mk_prop_response
|
||||
def mk_propname_response(self,uri,propnames,doc):
|
||||
""" make a new <prop> result element for a PROPNAME request
|
||||
|
||||
This will simply format the propnames list.
|
||||
propnames should have the format {NS1 : [prop1, prop2, ...], NS2: ...}
|
||||
|
||||
"""
|
||||
re=doc.createElement("D:response")
|
||||
|
||||
# write href information
|
||||
uparts=urlparse.urlparse(uri)
|
||||
fileloc=uparts[2]
|
||||
href=doc.createElement("D:href")
|
||||
davpath = self._dataclass.parent.get_davpath()
|
||||
hurl = '%s://%s%s%s' % (uparts[0], uparts[1], davpath, urllib.quote(fileloc))
|
||||
huri=doc.createTextNode(hurl)
|
||||
href.appendChild(huri)
|
||||
re.appendChild(href)
|
||||
|
||||
ps=doc.createElement("D:propstat")
|
||||
nsnum=0
|
||||
|
||||
for ns,plist in propnames.items():
|
||||
# write prop element
|
||||
pr=doc.createElement("D:prop")
|
||||
nsp="ns"+str(nsnum)
|
||||
pr.setAttribute("xmlns:"+nsp,ns)
|
||||
nsnum=nsnum+1
|
||||
|
||||
# write propertynames
|
||||
for p in plist:
|
||||
pe=doc.createElement(nsp+":"+p)
|
||||
pr.appendChild(pe)
|
||||
|
||||
ps.appendChild(pr)
|
||||
re.appendChild(ps)
|
||||
|
||||
return re
|
||||
|
||||
PROPFIND.mk_prop_response = mk_prop_response
|
||||
PROPFIND.mk_propname_response = mk_propname_response
|
||||
|
||||
|
||||
@@ -33,6 +33,7 @@ from dav_fs import openerp_dav_handler
|
||||
from tools.config import config
|
||||
from DAV.WebDAVServer import DAVRequestHandler
|
||||
from service.websrv_lib import HTTPDir,FixSendError
|
||||
from BaseHTTPServer import BaseHTTPRequestHandler
|
||||
import urlparse
|
||||
import urllib
|
||||
from string import atoi,split
|
||||
@@ -42,6 +43,9 @@ def OpenDAVConfig(**kw):
|
||||
class OpenDAV:
|
||||
def __init__(self, **kw):
|
||||
self.__dict__.update(**kw)
|
||||
|
||||
def getboolean(self, word):
|
||||
return self.__dict__.get(word, False)
|
||||
|
||||
class Config:
|
||||
DAV = OpenDAV(**kw)
|
||||
@@ -51,6 +55,7 @@ def OpenDAVConfig(**kw):
|
||||
|
||||
class DAVHandler(FixSendError,DAVRequestHandler):
|
||||
verbose = False
|
||||
protocol_version = 'HTTP/1.1'
|
||||
|
||||
def get_userinfo(self,user,pw):
|
||||
return False
|
||||
@@ -64,18 +69,17 @@ class DAVHandler(FixSendError,DAVRequestHandler):
|
||||
pass
|
||||
|
||||
def get_db_from_path(self, uri):
|
||||
if uri or uri == '/':
|
||||
dbs = self.IFACE_CLASS.db_list()
|
||||
res = len(dbs) and dbs[0] or False
|
||||
else:
|
||||
res = self.IFACE_CLASS.get_db(uri)
|
||||
# interface class will handle all cases.
|
||||
res = self.IFACE_CLASS.get_db(uri, allow_last=True)
|
||||
return res
|
||||
|
||||
def setup(self):
|
||||
davpath = '/'+config.get_misc('webdav','vdir','webdav')
|
||||
self.davpath = '/'+config.get_misc('webdav','vdir','webdav')
|
||||
self.baseuri = "http://%s:%d/"% (self.server.server_name, self.server.server_port)
|
||||
self.IFACE_CLASS = openerp_dav_handler(self, self.verbose)
|
||||
|
||||
def get_davpath(self):
|
||||
return self.davpath
|
||||
|
||||
def log_message(self, format, *args):
|
||||
netsvc.Logger().notifyChannel('webdav', netsvc.LOG_DEBUG_RPC, format % args)
|
||||
@@ -83,6 +87,17 @@ class DAVHandler(FixSendError,DAVRequestHandler):
|
||||
def log_error(self, format, *args):
|
||||
netsvc.Logger().notifyChannel('xmlrpc', netsvc.LOG_WARNING, format % args)
|
||||
|
||||
def send_response(self, code, message=None):
|
||||
# the BufferingHttpServer will send Connection: close , while
|
||||
# the BaseHTTPRequestHandler will only accept int code.
|
||||
# workaround both of them.
|
||||
BaseHTTPRequestHandler.send_response(self, int(code), message)
|
||||
|
||||
def send_header(self, key, value):
|
||||
if key == 'Connection' and value == 'close':
|
||||
self.close_connection = 1
|
||||
DAVRequestHandler.send_header(self, key, value)
|
||||
|
||||
def do_PUT(self):
|
||||
dc=self.IFACE_CLASS
|
||||
uri=urlparse.urljoin(self.get_baseuri(dc), self.path)
|
||||
@@ -161,8 +176,18 @@ class DAVHandler(FixSendError,DAVRequestHandler):
|
||||
self.send_body(None, '201', 'Created', '', headers=headers)
|
||||
|
||||
|
||||
from service.http_server import reg_http_service,OpenERPAuthProvider
|
||||
|
||||
class DAVAuthProvider(OpenERPAuthProvider):
|
||||
def authenticate(self, db, user, passwd, client_address):
|
||||
""" authenticate, but also allow the False db, meaning to skip
|
||||
authentication when no db is specified.
|
||||
"""
|
||||
if db is False:
|
||||
return True
|
||||
return OpenERPAuthProvider.authenticate(self, db, user, passwd, client_address)
|
||||
|
||||
try:
|
||||
from service.http_server import reg_http_service,OpenERPAuthProvider
|
||||
|
||||
if (config.get_misc('webdav','enable',True)):
|
||||
directory = '/'+config.get_misc('webdav','vdir','webdav')
|
||||
@@ -177,7 +202,7 @@ try:
|
||||
|
||||
conf = OpenDAVConfig(**_dc)
|
||||
handler._config = conf
|
||||
reg_http_service(HTTPDir(directory,DAVHandler,OpenERPAuthProvider()))
|
||||
reg_http_service(HTTPDir(directory,DAVHandler,DAVAuthProvider()))
|
||||
netsvc.Logger().notifyChannel('webdav', netsvc.LOG_INFO, "WebDAV service registered at path: %s/ "% directory)
|
||||
except Exception, e:
|
||||
logger = netsvc.Logger()
|
||||
|
||||
@@ -232,7 +232,7 @@ class email_template(osv.osv):
|
||||
template_obj = self.browse(cr, uid, ids)[0]
|
||||
src_obj = template_obj.object_name.model
|
||||
vals['ref_ir_act_window'] = self.pool.get('ir.actions.act_window').create(cr, uid, {
|
||||
'name': _("%s Mail Form") % template_obj.name,
|
||||
'name': template_obj.name,
|
||||
'type': 'ir.actions.act_window',
|
||||
'res_model': 'email_template.send.wizard',
|
||||
'src_model': src_obj,
|
||||
|
||||
@@ -108,15 +108,18 @@
|
||||
</group>
|
||||
</page>
|
||||
<page string="Advanced">
|
||||
<field name="ref_ir_act_window" />
|
||||
<field name="ref_ir_value" />
|
||||
<separator string="Attachments (Report to attach)" colspan="4"/>
|
||||
<field name="file_name" colspan="2" />
|
||||
<field name="report_template" colspan="2"
|
||||
<group colspan="2" col="2">
|
||||
<separator string="Actions" colspan="2"/>
|
||||
<button name="create_action" string="Create Action" type="object" colspan="2" attrs="{'invisible':[('ref_ir_act_window','!=',False), ('ref_ir_value','!=',False)]}"/>
|
||||
<field name="ref_ir_act_window"/>
|
||||
<field name="ref_ir_value"/>
|
||||
<button name="delete_action" string="Delete Action" type="object" colspan="2" attrs="{'invisible':[('ref_ir_act_window','=',False), ('ref_ir_value','=',False)]}"/>
|
||||
</group>
|
||||
<group colspan="2" col="2">
|
||||
<separator string="Attachments (Report to attach)" colspan="4"/>
|
||||
<field name="file_name" colspan="2" />
|
||||
<field name="report_template" colspan="2"
|
||||
domain="[('model','=',model_int_name)]" />
|
||||
<group colspan="2">
|
||||
<button name="create_action" string="Create Action" type="object" colspan="1" attrs="{'invisible':[('ref_ir_act_window','!=',False), ('ref_ir_value','!=',False)]}"/>
|
||||
<button name="delete_action" string="Delete Action" type="object" colspan="1" attrs="{'invisible':[('ref_ir_act_window','=',False), ('ref_ir_value','=',False)]}"/>
|
||||
</group>
|
||||
</page>
|
||||
</notebook>
|
||||
|
||||
@@ -21,5 +21,6 @@
|
||||
|
||||
import event
|
||||
import wizard
|
||||
import report
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
Note that:
|
||||
- You can define new types of events in
|
||||
Events / Configuration / Types of Events
|
||||
- You can access predefined reports about number of registration per event or per event category in :
|
||||
- You can access predefined reports about number of registration per event or per event category in:
|
||||
Events / Reporting
|
||||
""",
|
||||
'author': 'Tiny',
|
||||
@@ -46,15 +46,15 @@
|
||||
'update_xml': [
|
||||
'wizard/event_confirm_registration_view.xml',
|
||||
'event_view.xml',
|
||||
'report/report_event_registration_view.xml',
|
||||
'event_sequence.xml',
|
||||
'security/event_security.xml',
|
||||
'security/ir.model.access.csv',
|
||||
'wizard/event_registration_view.xml',
|
||||
'wizard/event_registrations_partner.xml',
|
||||
'wizard/event_make_invoice_view.xml',
|
||||
'board_association_view.xml',
|
||||
],
|
||||
'demo_xml': ['event_demo.xml','board_association_demo.xml'],
|
||||
'demo_xml': ['event_demo.xml', 'board_association_demo.xml'],
|
||||
'test': ['test/test_event.yml'],
|
||||
'installable': True,
|
||||
'active': False,
|
||||
'certificate': '0083059161581',
|
||||
|
||||
@@ -12,8 +12,38 @@
|
||||
<action
|
||||
string="New members"
|
||||
name="%(membership.action_report_partner_member_year_tree)d"
|
||||
view_mode="graph,tree" colspan="4"/>-->
|
||||
|
||||
view_mode="graph,tree" colspan="4"/>-->
|
||||
|
||||
<record model ="ir.ui.view" id="view_report_event_reg_graph">
|
||||
<field name="name">Registration Event report</field>
|
||||
<field name="model">report.event.registration</field>
|
||||
<field name="type">graph</field>
|
||||
<field name="arch" type="xml">
|
||||
<graph string="Event on Registration" type="bar" >
|
||||
<field name="event_id"/>
|
||||
<field name="draft_state" operator="+"/>
|
||||
<field name="confirm_state" operator="+"/>
|
||||
<field name="register_max" operator="+"/>
|
||||
</graph>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.actions.act_window" id="act_event_reg">
|
||||
<field name="name">Events On Registrations</field>
|
||||
<field name="res_model">report.event.registration</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">graph,tree</field>
|
||||
<field name="view_id" ref="view_report_event_reg_graph"/>
|
||||
</record>
|
||||
|
||||
<record model="ir.actions.act_window" id="act_event_view">
|
||||
<field name="name">Next Events</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">event.event</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
|
||||
<record model="board.note.type" id="note_association_type">
|
||||
<field name="name">associations</field>
|
||||
</record>
|
||||
@@ -27,7 +57,7 @@
|
||||
<hpaned position="100">
|
||||
<child1>
|
||||
<action string="Next Events"
|
||||
name="%(event.action_event_registration_report)d"
|
||||
name="%(act_event_view)d"
|
||||
colspan="4"/>
|
||||
<action
|
||||
string="Unpaid Invoices"
|
||||
@@ -35,14 +65,13 @@
|
||||
colspan="4"
|
||||
domain="[('state','not in',['draft','cancel']),('reconciled','=',False),('type','=','out_invoice')]"/>
|
||||
</child1>
|
||||
|
||||
<child2>
|
||||
<action
|
||||
string="Registrations by Events"
|
||||
name="%(event.action_event_type_registration)d"
|
||||
view_mode="graph,tree"
|
||||
colspan="4"/>
|
||||
<action string="Register Events"
|
||||
name="%(act_event_reg)d"
|
||||
colspan="4"/>
|
||||
|
||||
</child2>
|
||||
|
||||
</hpaned>
|
||||
</form>
|
||||
</field>
|
||||
|
||||
+327
-263
@@ -19,231 +19,166 @@
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
from crm import crm
|
||||
from osv import fields, osv
|
||||
import time
|
||||
from tools.translate import _
|
||||
import netsvc
|
||||
import pooler
|
||||
import time
|
||||
import tools
|
||||
from tools.translate import _
|
||||
from crm import crm
|
||||
|
||||
|
||||
class event_type(osv.osv):
|
||||
class event_type(osv.osv):
|
||||
""" Event Type """
|
||||
_name = 'event.type'
|
||||
_description= 'Event type'
|
||||
_description = __doc__
|
||||
_columns = {
|
||||
'name': fields.char('Event type', size=64, required=True),
|
||||
}
|
||||
|
||||
event_type()
|
||||
|
||||
class event(osv.osv):
|
||||
class event_event(osv.osv):
|
||||
"""Event"""
|
||||
_name = 'event.event'
|
||||
_description = 'Event'
|
||||
_inherits = {'crm.case.section': 'section_id'}
|
||||
_description = __doc__
|
||||
_inherit = 'crm.case.section'
|
||||
_order = 'date_begin'
|
||||
|
||||
def copy(self, cr, uid, id, default=None, context=None):
|
||||
return super(event, self).copy(cr, uid, id, default={'code': self.pool.get('ir.sequence').get(cr, uid, 'event.event'), 'state': 'draft'})
|
||||
def copy(self, cr, uid, id, default=None, context=None):
|
||||
""" Copy record of Given id
|
||||
@param id: Id of Event Registration type record.
|
||||
@param context: A standard dictionary for contextual values
|
||||
"""
|
||||
if not default:
|
||||
default = {}
|
||||
default.update({
|
||||
'code': self.pool.get('ir.sequence').get(cr, uid, 'event.event'),
|
||||
'state': 'draft'
|
||||
})
|
||||
return super(event_event, self).copy(cr, uid, id, default=default, context=context)
|
||||
|
||||
def button_draft(self, cr, uid, ids, context={}):
|
||||
return self.write(cr, uid, ids, {'state': 'draft'})
|
||||
def button_draft(self, cr, uid, ids, context=None):
|
||||
return self.write(cr, uid, ids, {'state': 'draft'}, context=context)
|
||||
|
||||
def button_cancel(self, cr, uid, ids, context={}):
|
||||
return self.write(cr, uid, ids, {'state': 'cancel'})
|
||||
def button_cancel(self, cr, uid, ids, context=None):
|
||||
return self.write(cr, uid, ids, {'state': 'cancel'}, context=context)
|
||||
|
||||
def button_done(self, cr, uid, ids, context={}):
|
||||
return self.write(cr, uid, ids, {'state': 'done'})
|
||||
def button_done(self, cr, uid, ids, context=None):
|
||||
return self.write(cr, uid, ids, {'state': 'done'}, context=context)
|
||||
|
||||
def button_confirm(self, cr, uid, ids, context={}):
|
||||
for eve in self.browse(cr, uid, ids):
|
||||
if eve.mail_auto_confirm:
|
||||
def button_confirm(self, cr, uid, ids, context=None):
|
||||
register_pool = self.pool.get('event.registration')
|
||||
for event in self.browse(cr, uid, ids, context=context):
|
||||
if event.mail_auto_confirm:
|
||||
#send reminder that will confirm the event for all the people that were already confirmed
|
||||
reg_ids = self.pool.get('event.registration').search(cr, uid, [('event_id', '=', eve.id), ('state', 'not in', ['draft', 'cancel'])])
|
||||
if reg_ids:
|
||||
self.pool.get('event.registration').mail_user_confirm(cr, uid, reg_ids)
|
||||
reg_ids = register_pool.search(cr, uid, [
|
||||
('event_id', '=', event.id),
|
||||
('state', 'not in', ['draft', 'cancel'])])
|
||||
register_pool.mail_user_confirm(cr, uid, reg_ids)
|
||||
|
||||
return self.write(cr, uid, ids, {'state': 'confirm'})
|
||||
|
||||
def _get_register(self, cr, uid, ids, name, args, context=None):
|
||||
res={}
|
||||
|
||||
def _get_register(self, cr, uid, ids, fields, args, context=None):
|
||||
"""
|
||||
Get Confirm or uncofirm register value.
|
||||
@param ids: List of Event registration type's id
|
||||
@param fields: List of function fields(register_current and register_prospect).
|
||||
@param context: A standard dictionary for contextual values
|
||||
@return: Dictionary of function fields value.
|
||||
"""
|
||||
register_pool = self.pool.get('event.registration')
|
||||
res = {}
|
||||
for event in self.browse(cr, uid, ids, context):
|
||||
res[event.id] = {}
|
||||
state = 'draft'
|
||||
if name[0] == 'register_current':
|
||||
state = 'open'
|
||||
query = """SELECT sum(r.nb_register)
|
||||
from event_registration r
|
||||
where state=%s and event_id=%s"""
|
||||
|
||||
cr.execute(query, (state, event.id, ))
|
||||
res2 = cr.fetchone()
|
||||
if res2 and res2[0]:
|
||||
res[event.id][name[0]] = res2[0]
|
||||
else:
|
||||
res[event.id][name[0]] = 0
|
||||
for field in fields:
|
||||
res[event.id][field] = False
|
||||
state = []
|
||||
if 'register_current' in fields:
|
||||
state.append('open')
|
||||
if 'register_prospect' in fields:
|
||||
state.append('draft')
|
||||
|
||||
reg_ids = register_pool.search(cr, uid, [
|
||||
('event_id', '=', event.id),
|
||||
('state', 'in', state)])
|
||||
if 'register_current' in fields:
|
||||
res[event.id]['register_current'] = len(reg_ids)
|
||||
if 'register_prospect' in fields:
|
||||
res[event.id]['register_prospect'] = len(reg_ids)
|
||||
|
||||
|
||||
return res
|
||||
|
||||
def write(self, cr, uid, ids, vals, *args, **kwargs):
|
||||
res = super(event, self).write(cr, uid, ids, vals, *args, **kwargs)
|
||||
if 'date_begin' in vals and vals['date_begin']:
|
||||
for eve in self.browse(cr, uid, ids):
|
||||
def write(self, cr, uid, ids, vals, context=None):
|
||||
"""
|
||||
Writes values in one or several fields.
|
||||
@param ids: List of Event registration type's IDs
|
||||
@param vals: dictionary with values to update.
|
||||
@return: True
|
||||
"""
|
||||
register_pool = self.pool.get('event.registration')
|
||||
res = super(event_event, self).write(cr, uid, ids, vals, context=context)
|
||||
if vals.get('date_begin', False) or vals.get('mail_auto_confirm', False) or vals.get('mail_confirm', False):
|
||||
for event in self.browse(cr, uid, ids, context=context):
|
||||
#change the deadlines of the registration linked to this event
|
||||
reg_ids = self.pool.get('event.registration').search(cr, uid, [('event_id', '=', eve.id)])
|
||||
if reg_ids:
|
||||
self.pool.get('event.registration').write(cr, uid, reg_ids, {'date_deadline': vals['date_begin']})
|
||||
register_values = {}
|
||||
if vals.get('date_begin', False):
|
||||
register_values['date_deadline'] = vals['date_begin']
|
||||
|
||||
#change the description of the registration linked to this event
|
||||
if 'mail_auto_confirm' in vals:
|
||||
if vals['mail_auto_confirm']:
|
||||
if 'mail_confirm' not in vals:
|
||||
for eve in self.browse(cr, uid, ids):
|
||||
vals['mail_confirm'] = eve.mail_confirm
|
||||
else:
|
||||
vals['mail_confirm']=False
|
||||
if 'mail_confirm' in vals:
|
||||
for eve in self.browse(cr, uid, ids):
|
||||
reg_ids = self.pool.get('event.registration').search(cr, uid, [('event_id', '=', eve.id)])
|
||||
if reg_ids:
|
||||
self.pool.get('event.registration').write(cr, uid, reg_ids, {'description': vals['mail_confirm']})
|
||||
#change the description of the registration linked to this event
|
||||
if vals.get('mail_auto_confirm', False):
|
||||
if vals['mail_auto_confirm']:
|
||||
if 'mail_confirm' not in vals:
|
||||
vals['mail_confirm'] = event.mail_confirm
|
||||
else:
|
||||
vals['mail_confirm'] = False
|
||||
if 'mail_confirm' in vals:
|
||||
register_values['description'] = vals['mail_confirm']
|
||||
|
||||
if register_values:
|
||||
reg_ids = register_pool.search(cr, uid, [('event_id', '=', event.id)])
|
||||
register_pool.write(cr, uid, reg_ids, register_values)
|
||||
return res
|
||||
|
||||
_columns = {
|
||||
'type': fields.many2one('event.type', 'Type'),
|
||||
'section_id': fields.many2one('crm.case.section', 'Case section', required=True),
|
||||
'register_max': fields.integer('Maximum Registrations'),
|
||||
'register_min': fields.integer('Minimum Registrations'),
|
||||
'register_current': fields.function(_get_register, method=True, string='Confirmed Registrations', multi='register_current'),
|
||||
'register_prospect': fields.function(_get_register, method=True, string='Unconfirmed Registrations', multi='register_prospect'),
|
||||
'date_begin': fields.datetime('Beginning date', required=True),
|
||||
'date_end': fields.datetime('Ending date', required=True),
|
||||
'state': fields.selection([('draft', 'Draft'), ('confirm', 'Confirmed'), ('done', 'Done'), ('cancel', 'Cancelled')], 'State', readonly=True, required=True,
|
||||
help='If event is created, the state is \'Draft\'.\n If event is confirmed for the particular dates the state is set to \'Confirmed\'.\
|
||||
'type': fields.many2one('event.type', 'Type', help="Type of Event like Seminar, Exhibition, Conference, Training."),
|
||||
'register_max': fields.integer('Maximum Registrations', help="Provide Maximun Number of Registrations"),
|
||||
'register_min': fields.integer('Minimum Registrations', help="Providee Minimum Number of Registrations"),
|
||||
'register_current': fields.function(_get_register, method=True, string='Confirmed Registrations', multi='register_current', help="Total of Open Registrations"),
|
||||
'register_prospect': fields.function(_get_register, method=True, string='Unconfirmed Registrations', multi='register_prospect', help="Total of Prospect Registrations"),
|
||||
'date_begin': fields.datetime('Beginning date', required=True, help="Beginning Date of Event"),
|
||||
'date_end': fields.datetime('Closing date', required=True, help="Closing Date of Event"),
|
||||
'state': fields.selection([('draft', 'Draft'), ('confirm', 'Confirmed'), ('done', 'Done'), ('cancel', 'Cancelled')], 'State', readonly=True, required=True, help='If event is created, the state is \'Draft\'.\n If event is confirmed for the particular dates the state is set to \'Confirmed\'.\
|
||||
\nIf the event is over, the state is set to \'Done\'.\n If event is cancelled the state is set to \'Cancelled\'.'),
|
||||
'mail_auto_registr': fields.boolean('Mail Auto Register', help='Check this box if you want to use the automatic mailing for new registration'),
|
||||
'mail_auto_confirm': fields.boolean('Mail Auto Confirm', help='Check this box if you want ot use the automatic confirmation emailing or the reminder'),
|
||||
'mail_registr': fields.text('Registration Email', help='This email will be sent when someone subscribes to the event.'),
|
||||
'mail_confirm': fields.text('Confirmation Email', help="This email will be sent when the event gets confimed or when someone subscribes to a confirmed event. This is also the email sent to remind someone about the event."),
|
||||
'product_id': fields.many2one('product.product', 'Product', required=True),
|
||||
'product_id': fields.many2one('product.product', 'Product', required=True, help="Product which is provided cost of event. Invoice of event will be created with this Product."),
|
||||
'note': fields.text('Notes', help="Description or Summary of Event")
|
||||
}
|
||||
|
||||
_defaults = {
|
||||
'state': lambda *args: 'draft',
|
||||
'state': 'draft',
|
||||
'code': lambda obj, cr, uid, context: obj.pool.get('ir.sequence').get(cr, uid, 'event.event'),
|
||||
'user_id': lambda self, cr, uid, ctx: uid,
|
||||
'user_id': lambda obj, cr, uid, context: uid,
|
||||
}
|
||||
|
||||
event()
|
||||
event_event()
|
||||
|
||||
class event_registration(osv.osv):
|
||||
|
||||
def check_confirm(self, cr, uid, ids, context):
|
||||
mod_obj = self.pool.get('ir.model.data')
|
||||
current_registration = self.browse(cr, uid, [ids[0]])[0]
|
||||
total_confirmed = current_registration.event_id.register_current + current_registration.nb_register
|
||||
if total_confirmed <= current_registration.event_id.register_max or current_registration.event_id.register_max == 0:
|
||||
self.write(cr, uid, [ids[0]], {'state': 'open'}, context=context)
|
||||
self._history(cr, uid, [ids[0]], 'Open', history=True)
|
||||
self.mail_user(cr, uid, [ids[0]])
|
||||
return True
|
||||
else:
|
||||
model_data_ids = mod_obj.search(cr, uid, [('model', '=', 'ir.ui.view'), ('name', '=', 'view_event_confirm_registration')], context=context)
|
||||
resource_id = mod_obj.read(cr, uid, model_data_ids, fields=['res_id'], context=context)[0]['res_id']
|
||||
context.update({'reg_id': ids[0]})
|
||||
return {
|
||||
'name': _('Confirm Registration'),
|
||||
'context': context,
|
||||
'view_type': 'form',
|
||||
'view_mode': 'tree,form',
|
||||
'res_model': 'event.confirm.registration',
|
||||
'views': [(resource_id, 'form')],
|
||||
'type': 'ir.actions.act_window',
|
||||
'target': 'new',
|
||||
'nodestroy': True
|
||||
}
|
||||
|
||||
def _history(self, cr, uid, ids, keyword, history=False, email=False, context={}):
|
||||
for case in self.browse(cr, uid, ids):
|
||||
data = {
|
||||
'name': keyword,
|
||||
'som': case.som.id,
|
||||
'canal_id': case.canal_id.id,
|
||||
'user_id': uid,
|
||||
}
|
||||
obj = self.pool.get('mailgate.message')
|
||||
obj.create(cr, uid, data, context=context)
|
||||
return True
|
||||
|
||||
def button_reg_close(self, cr, uid, ids, *args):
|
||||
self.write(cr, uid, ids, {'state': 'done', })
|
||||
self._history(cr, uid, ids, 'Done', history=True)
|
||||
return True
|
||||
|
||||
def button_reg_cancel(self, cr, uid, ids, *args):
|
||||
self.write(cr, uid, ids, {'state': 'cancel', })
|
||||
self._history(cr, uid, ids, 'Cancel', history=True)
|
||||
return True
|
||||
|
||||
def create(self, cr, uid, *args, **argv):
|
||||
event = self.pool.get('event.event').browse(cr, uid, args[0]['event_id'], None)
|
||||
args[0]['section_id']= event.section_id.id
|
||||
args[0]['date_deadline']= event.date_begin
|
||||
args[0]['description']= event.mail_confirm
|
||||
res = super(event_registration, self).create(cr, uid, *args, **argv)
|
||||
self._history(cr, uid, [res], 'Created', history=True)
|
||||
return res
|
||||
|
||||
def write(self, cr, uid, *args, **argv):
|
||||
if 'event_id' in args[1]:
|
||||
event = self.pool.get('event.event').browse(cr, uid, args[1]['event_id'], None)
|
||||
args[1]['section_id']= event.section_id.id
|
||||
args[1]['date_deadline']= event.date_begin
|
||||
args[1]['description']= event.mail_confirm
|
||||
return super(event_registration, self).write(cr, uid, *args, **argv)
|
||||
|
||||
def mail_user_confirm(self, cr, uid, ids):
|
||||
reg_ids = self.browse(cr, uid, ids)
|
||||
for reg_id in reg_ids:
|
||||
src = reg_id.event_id.reply_to or False
|
||||
dest = []
|
||||
if reg_id.email_from:
|
||||
dest += [reg_id.email_from]
|
||||
if reg_id.email_cc:
|
||||
dest += [reg_id.email_cc]
|
||||
if dest and src:
|
||||
tools.email_send(src, dest, 'Auto Confirmation: '+'['+str(reg_id.id)+']'+' '+reg_id.name, reg_id.event_id.mail_confirm, openobject_id = str(reg_id.id))
|
||||
if not src:
|
||||
raise osv.except_osv(_('Error!'), _('You must define a reply-to address in order to mail the participant. You can do this in the Mailing tab of your event. Note that this is also the place where you can configure your event to not send emails automaticly while registering'))
|
||||
return False
|
||||
|
||||
def mail_user(self, cr, uid, ids):
|
||||
reg_ids = self.browse(cr, uid, ids)
|
||||
for reg_id in reg_ids:
|
||||
src = reg_id.event_id.reply_to or False
|
||||
dest = []
|
||||
if reg_id.email_from:
|
||||
dest += [reg_id.email_from]
|
||||
if reg_id.email_cc:
|
||||
dest += [reg_id.email_cc]
|
||||
if reg_id.event_id.mail_auto_confirm or reg_id.event_id.mail_auto_registr:
|
||||
if dest and src:
|
||||
if reg_id.event_id.state in ['draft', 'fixed', 'open', 'confirm', 'running'] and reg_id.event_id.mail_auto_registr:
|
||||
tools.email_send(src, dest, 'Auto Registration: '+'['+str(reg_id.id)+']'+' '+reg_id.name, reg_id.event_id.mail_registr, openobject_id = str(reg_id.id))
|
||||
if (reg_id.event_id.state in ['confirm', 'running']) and reg_id.event_id.mail_auto_confirm:
|
||||
tools.email_send(src, dest, 'Auto Confirmation: '+'['+str(reg_id.id)+']'+' '+reg_id.name, reg_id.event_id.mail_confirm, openobject_id = str(reg_id.id))
|
||||
if not src:
|
||||
raise osv.except_osv(_('Error!'), _('You must define a reply-to address in order to mail the participant. You can do this in the Mailing tab of your event. Note that this is also the place where you can configure your event to not send emails automaticly while registering'))
|
||||
return False
|
||||
|
||||
def _create_invoice_lines(self, cr, uid, ids, vals):
|
||||
return self.pool.get('account.invoice.line').create(cr, uid, vals)
|
||||
class event_registration(osv.osv):
|
||||
"""Event Registration"""
|
||||
|
||||
_name= 'event.registration'
|
||||
_description = 'Event Registration'
|
||||
_description = __doc__
|
||||
_inherit = 'crm.meeting'
|
||||
|
||||
_columns = {
|
||||
'email_cc': fields.text('Watchers Emails', size=252 , help="These \
|
||||
'email_cc': fields.text('CC', size=252 , help="These \
|
||||
people will receive a copy of the future communication between partner \
|
||||
and users by email"),
|
||||
and users by email"),
|
||||
'nb_register': fields.integer('Number of Registration', readonly=True, states={'draft': [('readonly', False)]}),
|
||||
'event_id': fields.many2one('event.event', 'Event Related', required=True),
|
||||
"partner_invoice_id": fields.many2one('res.partner', 'Partner Invoiced'),
|
||||
@@ -252,26 +187,223 @@ and users by email"),
|
||||
"badge_title": fields.char('Badge Title', size=128),
|
||||
"badge_name": fields.char('Badge Name', size=128),
|
||||
"badge_partner": fields.char('Badge Partner', size=128),
|
||||
"invoice_label": fields.char("Label Invoice", size=128, required=True),
|
||||
"event_product": fields.char("Product Name", size=128, required=True),
|
||||
"tobe_invoiced": fields.boolean("To be Invoiced"),
|
||||
"invoice_id": fields.many2one("account.invoice", "Invoice"),
|
||||
'date_closed': fields.datetime('Closed', readonly=True),
|
||||
'ref': fields.reference('Reference', selection=crm._links_get, size=128),
|
||||
'ref2': fields.reference('Reference 2', selection=crm._links_get, size=128),
|
||||
'canal_id': fields.many2one('res.partner.canal', 'Channel', help="The channels represent the different communication modes available with the customer." \
|
||||
" With each commercial opportunity, you can indicate the canall which is this opportunity source."),
|
||||
'som': fields.many2one('res.partner.som', 'State of Mind', help="The minds states allow to define a value scale which represents" \
|
||||
"the partner mentality in relation to our services.The scale has" \
|
||||
"to be created with a factor for each level from 0 (Very dissatisfied) to 10 (Extremely satisfied)."),
|
||||
}
|
||||
|
||||
_defaults = {
|
||||
'nb_register': lambda *a: 1,
|
||||
'tobe_invoiced': lambda *a: True,
|
||||
'name': lambda *a: 'Registration',
|
||||
'nb_register': 1,
|
||||
'tobe_invoiced': True,
|
||||
'name': 'Registration',
|
||||
}
|
||||
|
||||
def _make_invoice(self, cr, uid, reg, lines, context=None):
|
||||
""" Create Invoice from Invoice lines
|
||||
@param reg : Object of event.registration
|
||||
@param lines: ids of Invoice lines
|
||||
"""
|
||||
if context is None:
|
||||
context = {}
|
||||
inv_pool = self.pool.get('account.invoice')
|
||||
inv_lines_pool = self.pool.get('account.invoice.line')
|
||||
|
||||
val_invoice = inv_pool.onchange_partner_id(cr, uid, [], 'out_invoice', reg.partner_invoice_id.id, False, False)
|
||||
val_invoice['value'].update({'partner_id': reg.partner_invoice_id.id})
|
||||
partner_address_id = val_invoice['value']['address_invoice_id']
|
||||
|
||||
value = inv_lines_pool.product_id_change(cr, uid, [], reg.event_id.product_id.id, uom =False, partner_id=reg.partner_invoice_id.id, fposition_id=reg.partner_invoice_id.property_account_position.id)
|
||||
|
||||
l = inv_lines_pool.read(cr, uid, lines)
|
||||
|
||||
val_invoice['value'].update({
|
||||
'origin': reg.event_product,
|
||||
'reference': False,
|
||||
'invoice_line': [(6, 0, lines)],
|
||||
'comment': "",
|
||||
})
|
||||
inv_id = inv_pool.create(cr, uid, val_invoice['value'])
|
||||
inv_pool.button_compute(cr, uid, [inv_id])
|
||||
self._history(cr, uid, [reg], _('Invoiced'))
|
||||
return inv_id
|
||||
|
||||
def action_invoice_create(self, cr, uid, ids, grouped=False, date_inv = False, context=None):
|
||||
""" Action of Create Invoice """
|
||||
res = False
|
||||
invoices = {}
|
||||
tax_ids=[]
|
||||
|
||||
inv_lines_pool = self.pool.get('account.invoice.line')
|
||||
inv_pool = self.pool.get('account.invoice')
|
||||
product_pool = self.pool.get('product.product')
|
||||
contact_pool = self.pool.get('res.partner.contact')
|
||||
if not context:
|
||||
context = {}
|
||||
# If date was specified, use it as date invoiced, usefull when invoices are generated this month and put the
|
||||
# last day of the last month as invoice date
|
||||
if date_inv:
|
||||
context['date_inv'] = date_inv
|
||||
|
||||
for reg in self.browse(cr, uid, ids, context=context):
|
||||
|
||||
val_invoice = inv_pool.onchange_partner_id(cr, uid, [], 'out_invoice', reg.partner_invoice_id.id, False, False)
|
||||
|
||||
val_invoice['value'].update({'partner_id': reg.partner_invoice_id.id})
|
||||
partner_address_id = val_invoice['value']['address_invoice_id']
|
||||
|
||||
if not partner_address_id:
|
||||
raise osv.except_osv(_('Error !'),
|
||||
_("Registered partner doesn't have an address to make the invoice."))
|
||||
|
||||
value = inv_lines_pool.product_id_change(cr, uid, [], reg.event_id.product_id.id, uom =False, partner_id=reg.partner_invoice_id.id, fposition_id=reg.partner_invoice_id.property_account_position.id)
|
||||
product = product_pool.browse(cr, uid, reg.event_id.product_id.id, context=context)
|
||||
for tax in product.taxes_id:
|
||||
tax_ids.append(tax.id)
|
||||
|
||||
vals = value['value']
|
||||
c_name = reg.contact_id and ('-' + contact_pool.name_get(cr, uid, [reg.contact_id.id])[0][1]) or ''
|
||||
vals.update({
|
||||
'name': reg.event_product + '-' + c_name,
|
||||
'price_unit': reg.unit_price,
|
||||
'quantity': reg.nb_register,
|
||||
'product_id':reg.event_id.product_id.id,
|
||||
'invoice_line_tax_id': [(6, 0, tax_ids)],
|
||||
})
|
||||
inv_line_ids = self._create_invoice_lines(cr, uid, [reg.id], vals)
|
||||
invoices.setdefault(reg.partner_id.id, []).append((reg, inv_line_ids))
|
||||
|
||||
for val in invoices.values():
|
||||
if grouped:
|
||||
res = self._make_invoice(cr, uid, val[0][0], [v for k , v in val], context=context)
|
||||
|
||||
for k , v in val:
|
||||
self.write(cr, uid, [k.id], {'state': 'done', 'invoice_id': res}, context=context)
|
||||
|
||||
else:
|
||||
for k , v in val:
|
||||
res = self._make_invoice(cr, uid, k, [v], context=context)
|
||||
self.write(cr, uid, [k.id], {'state': 'done', 'invoice_id': res}, context=context)
|
||||
return res
|
||||
|
||||
def check_confirm(self, cr, uid, ids, context=None):
|
||||
"""
|
||||
Check confirm event register on given id.
|
||||
@param ids: List of Event registration's IDs
|
||||
@param context: A standard dictionary for contextual values
|
||||
@return: Dictionary value which open Confirm registration form.
|
||||
"""
|
||||
data_pool = self.pool.get('ir.model.data')
|
||||
unconfirmed_ids = []
|
||||
for registration in self.browse(cr, uid, ids, context=context):
|
||||
total_confirmed = registration.event_id.register_current + registration.nb_register
|
||||
if total_confirmed <= registration.event_id.register_max or registration.event_id.register_max == 0:
|
||||
self.write(cr, uid, [registration.id], {'state': 'open'}, context=context)
|
||||
self.mail_user(cr, uid, [registration.id])
|
||||
self._history(cr, uid, [registration.id], _('Open'))
|
||||
else:
|
||||
unconfirmed_ids.append(registration.id)
|
||||
if unconfirmed_ids:
|
||||
view_id = data_pool._get_id(cr, uid, 'event', 'view_event_confirm_registration')
|
||||
view_data = data_pool.browse(cr, uid, view_id)
|
||||
view_id = view_data.res_id
|
||||
context['registration_ids'] = unconfirmed_ids
|
||||
return {
|
||||
'name': _('Confirm Registration'),
|
||||
'context': context,
|
||||
'view_type': 'form',
|
||||
'view_mode': 'tree,form',
|
||||
'res_model': 'event.confirm.registration',
|
||||
'views': [(view_id, 'form')],
|
||||
'type': 'ir.actions.act_window',
|
||||
'target': 'new',
|
||||
'context': context,
|
||||
'nodestroy': True
|
||||
}
|
||||
return True
|
||||
|
||||
def button_reg_close(self, cr, uid, ids, *args):
|
||||
registrations = self.browse(cr, uid, ids)
|
||||
self._history(cr, uid, registrations, _('Done'))
|
||||
self.write(cr, uid, ids, {'state': 'done', 'date_closed': time.strftime('%Y-%m-%d %H:%M:%S')})
|
||||
return True
|
||||
|
||||
def button_reg_cancel(self, cr, uid, ids, *args):
|
||||
registrations = self.browse(cr, uid, ids)
|
||||
self._history(cr, uid, registrations, _('Cancel'))
|
||||
self.write(cr, uid, ids, {'state': 'cancel'})
|
||||
return True
|
||||
|
||||
def create(self, cr, uid, values, context=None):
|
||||
""" Overrides orm create method.
|
||||
"""
|
||||
event = self.pool.get('event.event').browse(cr, uid, values['event_id'], context=context)
|
||||
|
||||
values['date_deadline']= event.date_begin
|
||||
values['description']= event.mail_confirm
|
||||
res = super(event_registration, self).create(cr, uid, values, context=context)
|
||||
registrations = self.browse(cr, uid, [res], context=context)
|
||||
self._history(cr, uid, registrations, _('Created'))
|
||||
return res
|
||||
|
||||
def write(self, cr, uid, ids, values, context=None):
|
||||
if 'event_id' in values:
|
||||
event = self.pool.get('event.event').browse(cr, uid, values['event_id'], context=context)
|
||||
values['date_deadline']= event.date_begin
|
||||
values['description']= event.mail_confirm
|
||||
return super(event_registration, self).write(cr, uid, ids, values, context=context)
|
||||
|
||||
|
||||
def mail_user(self, cr, uid, ids, confirm=False, context=None):
|
||||
"""
|
||||
Send email to user
|
||||
"""
|
||||
if not context:
|
||||
context = {}
|
||||
|
||||
for reg_id in self.browse(cr, uid, ids):
|
||||
src = reg_id.event_id.reply_to or False
|
||||
dest = []
|
||||
if reg_id.email_from:
|
||||
dest += [reg_id.email_from]
|
||||
if reg_id.email_cc:
|
||||
dest += [reg_id.email_cc]
|
||||
if dest and src:
|
||||
if confirm:
|
||||
tools.email_send(src, dest,
|
||||
_('Auto Confirmation: [%s] %s') %(reg_id.id, reg_id.name),
|
||||
reg_id.event_id.mail_confirm,
|
||||
openobject_id = reg_id.id)
|
||||
elif reg_id.event_id.mail_auto_confirm or reg_id.event_id.mail_auto_registr:
|
||||
if reg_id.event_id.state in ['draft', 'fixed', 'open', 'confirm', 'running'] and reg_id.event_id.mail_auto_registr:
|
||||
tools.email_send(src, dest,
|
||||
_('Auto Registration: [%s] %s') %(reg_id.id, reg_id.name),
|
||||
reg_id.event_id.mail_registr, openobject_id = reg_id.id)
|
||||
if (reg_id.event_id.state in ['confirm', 'running']) and reg_id.event_id.mail_auto_confirm:
|
||||
tools.email_send(src, dest,
|
||||
_('Auto Confirmation: [%s] %s') %(reg_id.id, reg_id.name),
|
||||
reg_id.event_id.mail_confirm, openobject_id = reg_id.id)
|
||||
|
||||
if not src:
|
||||
raise osv.except_osv(_('Error!'), _('You must define a reply-to address in order to mail the participant. You can do this in the Mailing tab of your event. Note that this is also the place where you can configure your event to not send emails automaticly while registering'))
|
||||
|
||||
return True
|
||||
|
||||
def mail_user_confirm(self, cr, uid, ids, context=None):
|
||||
"""
|
||||
Send email to user
|
||||
"""
|
||||
return self.mail_user(cr, uid, ids, confirm=True, context=context)
|
||||
|
||||
def _create_invoice_lines(self, cr, uid, ids, vals):
|
||||
""" Create account Invoice line for Registration Id.
|
||||
"""
|
||||
return self.pool.get('account.invoice.line').create(cr, uid, vals)
|
||||
|
||||
def onchange_badge_name(self, cr, uid, ids, badge_name):
|
||||
|
||||
data ={}
|
||||
if not badge_name:
|
||||
return data
|
||||
@@ -279,9 +411,11 @@ and users by email"),
|
||||
return {'value': data}
|
||||
|
||||
def onchange_contact_id(self, cr, uid, ids, contact, partner):
|
||||
|
||||
data ={}
|
||||
if not contact:
|
||||
return data
|
||||
|
||||
contact_id = self.pool.get('res.partner.contact').browse(cr, uid, contact)
|
||||
data['badge_name'] = contact_id.name
|
||||
data['badge_title'] = contact_id.title
|
||||
@@ -292,26 +426,27 @@ and users by email"),
|
||||
data['email_from'] = self.pool.get('res.partner.job').browse(cr, uid, job_ids[0]).email
|
||||
d = self.onchange_badge_name(cr, uid, ids, data['badge_name'])
|
||||
data.update(d['value'])
|
||||
|
||||
return {'value': data}
|
||||
|
||||
def onchange_event(self, cr, uid, ids, event_id, partner_invoice_id):
|
||||
context={}
|
||||
if not event_id:
|
||||
return {'value': {'unit_price': False , 'invoice_label': False }}
|
||||
return {'value': {'unit_price': False, 'event_product': False}}
|
||||
data_event = self.pool.get('event.event').browse(cr, uid, event_id)
|
||||
|
||||
if data_event.product_id:
|
||||
if not partner_invoice_id:
|
||||
unit_price=self.pool.get('product.product').price_get(cr, uid, [data_event.product_id.id], context=context)[data_event.product_id.id]
|
||||
return {'value': {'unit_price': unit_price , 'invoice_label': data_event.product_id.name}}
|
||||
return {'value': {'unit_price': unit_price, 'event_product': data_event.product_id.name}}
|
||||
data_partner = self.pool.get('res.partner').browse(cr, uid, partner_invoice_id)
|
||||
context.update({'partner_id': data_partner})
|
||||
unit_price = self.pool.get('product.product')._product_price(cr, uid, [data_event.product_id.id], False, False, {'pricelist': data_partner.property_product_pricelist.id})[data_event.product_id.id]
|
||||
return {'value': {'unit_price': unit_price , 'invoice_label': data_event.product_id.name}}
|
||||
return {'value': {'unit_price': False, 'invoice_label': False}}
|
||||
|
||||
return {'value': {'unit_price': unit_price, 'event_product': data_event.product_id.name}}
|
||||
|
||||
return {'value': {'unit_price': False, 'event_product': False}}
|
||||
|
||||
def onchange_partner_id(self, cr, uid, ids, part, event_id, email=False):
|
||||
|
||||
data={}
|
||||
data['badge_partner'] = data['contact_id'] = data['partner_invoice_id'] = data['email_from'] = data['badge_title'] = data['badge_name'] = False
|
||||
if not part:
|
||||
@@ -334,6 +469,7 @@ and users by email"),
|
||||
return {'value': data}
|
||||
|
||||
def onchange_partner_invoice_id(self, cr, uid, ids, event_id, partner_invoice_id):
|
||||
|
||||
data={}
|
||||
context={}
|
||||
data['unit_price']=False
|
||||
@@ -351,80 +487,8 @@ and users by email"),
|
||||
return {'value': data}
|
||||
return {'value': data}
|
||||
|
||||
def onchange_categ_id(self, cr, uid, ids, categ, context={}):
|
||||
if not categ:
|
||||
return {'value': {}}
|
||||
cat = self.pool.get('crm.case.categ').browse(cr, uid, categ, context).probability
|
||||
return {'value': {'probability': cat}}
|
||||
|
||||
event_registration()
|
||||
|
||||
|
||||
|
||||
class report_event_registration(osv.osv):
|
||||
_name = "report.event.registration"
|
||||
_description = "Events on registrations"
|
||||
_auto = False
|
||||
_columns = {
|
||||
'name': fields.char('Event', size=20),
|
||||
'date_begin': fields.datetime('Beginning date', required=True),
|
||||
'date_end': fields.datetime('Ending date', required=True),
|
||||
'draft_state': fields.integer('Draft Registration', size=20),
|
||||
'confirm_state': fields.integer('Confirm Registration', size=20),
|
||||
'register_max': fields.integer('Maximum Registrations'),
|
||||
}
|
||||
def init(self, cr):
|
||||
cr.execute("""
|
||||
create or replace view report_event_registration as (
|
||||
select
|
||||
e.id as id,
|
||||
c.name as name,
|
||||
e.date_begin as date_begin,
|
||||
e.date_end as date_end,
|
||||
(SELECT sum(c.nb_register) FROM event_registration c WHERE c.section_id=e.section_id and state in ('draft')) as draft_state,
|
||||
(SELECT sum(c.nb_register) FROM event_registration c WHERE c.section_id=e.section_id and state in ('open')) as confirm_state,
|
||||
e.register_max as register_max
|
||||
from
|
||||
event_event e,crm_case_section c
|
||||
where
|
||||
e.section_id=c.id
|
||||
)""")
|
||||
|
||||
report_event_registration()
|
||||
|
||||
class report_event_type_registration(osv.osv):
|
||||
_name = "report.event.type.registration"
|
||||
_description = "Event type on registration"
|
||||
_auto = False
|
||||
_columns = {
|
||||
'name': fields.char('Event Type', size=20),
|
||||
'nbevent': fields.integer('Number Of Events'),
|
||||
'draft_state': fields.integer('Draft Registrations', size=20),
|
||||
'confirm_state': fields.integer('Confirm Registrations', size=20),
|
||||
}
|
||||
|
||||
|
||||
def init(self, cr):
|
||||
cr.execute("""
|
||||
create or replace view report_event_type_registration as (
|
||||
select
|
||||
count(t.id) as id,
|
||||
t.name as name,
|
||||
(select sum(c.nb_register) from event_registration c, event_event e where c.section_id=e.section_id and c.state='draft' and e.type=t.id ) as draft_state ,
|
||||
(select sum(c.nb_register) from event_registration c, event_event e where c.section_id=e.section_id and c.state='open' and e.type=t.id ) as confirm_state,
|
||||
count(t.id) as nbevent
|
||||
from
|
||||
event_event e
|
||||
inner join
|
||||
crm_case_section c1 on (e.section_id=c1.id)
|
||||
inner join
|
||||
event_type t on (e.type=t.id)
|
||||
group by
|
||||
t.name,t.id
|
||||
|
||||
)""")
|
||||
report_event_type_registration()
|
||||
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
|
||||
@@ -2,12 +2,5 @@
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<!-- The base section for all events -->
|
||||
|
||||
<record model="crm.case.section" id="case_section_event">
|
||||
<field name="name">Events</field>
|
||||
</record>
|
||||
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
@@ -58,7 +58,6 @@
|
||||
<field name="date_begin">2008-01-01 19:00:00</field>
|
||||
<field name="date_end">2008-01-01 23:00:00</field>
|
||||
<field name="product_id" ref="event_product_0"/>
|
||||
<field name="parent_id" ref="case_section_event"/>
|
||||
<field name="user_id" ref="base.user_root"/>
|
||||
<field name="register_max">500</field>
|
||||
<field name="type" ref="event_type_1"/>
|
||||
@@ -94,7 +93,6 @@
|
||||
<field name="product_id" ref="event_product_1"/>
|
||||
<field name="type" ref="event_type_1"/>
|
||||
<field name="user_id" ref="base.user_root"/>
|
||||
<field name="parent_id" ref="case_section_event"/>
|
||||
<field name="register_max">350</field>
|
||||
<field name="state">confirm</field>
|
||||
</record>
|
||||
@@ -107,7 +105,6 @@
|
||||
<field name="type" ref="event_type_2"/>
|
||||
<field name="register_max">200</field>
|
||||
<field name="user_id" ref="base.user_root"/>
|
||||
<field name="parent_id" ref="case_section_event"/>
|
||||
<field name="mail_auto_registr">True</field>
|
||||
<field name="mail_auto_confirm">True</field>
|
||||
<field name="state">done</field>
|
||||
|
||||
+173
-199
@@ -36,19 +36,8 @@
|
||||
<menuitem name="Configuration" id="menu_event_config" parent="menu_marketing_event_main" sequence="30" groups="base.group_extended"/>
|
||||
<menuitem name="Types of Events" id="menu_event_type" action="action_event_type" parent="menu_event_config" groups="base.group_extended,crm.group_crm_manager"/>
|
||||
|
||||
<!-- The base section for all events -->
|
||||
|
||||
<record model="ir.actions.act_window" id="action_event_categories">
|
||||
<field name="name">Events by section</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">crm.case.section</field>
|
||||
<field name="domain" eval="[('parent_id','=',False)]" />
|
||||
<field name="view_type">tree</field>
|
||||
</record>
|
||||
<menuitem name="Events by Categories" id="menu_action_event_categories" action="action_event_categories" parent="menu_event_main"/>
|
||||
|
||||
|
||||
<!-- Events Organisation/CONFIGURATION/EVENTS -->
|
||||
<!-- Events Organisation/CONFIGURATION/EVENTS -->
|
||||
|
||||
<record model="ir.ui.view" id="view_event_form">
|
||||
<field name="name">Events</field>
|
||||
@@ -58,7 +47,7 @@
|
||||
<form string="Events">
|
||||
<group col="6" colspan="4">
|
||||
<field name="name" string="Event" select="1"/>
|
||||
<field name="type"/>
|
||||
<field name="type" widget="selection"/>
|
||||
<field name="user_id" select="1"/>
|
||||
<field name="date_begin" select="1"/>
|
||||
<field name="date_end"/>
|
||||
@@ -67,11 +56,12 @@
|
||||
<notebook colspan="4">
|
||||
<page string="General">
|
||||
<separator string="Event description" colspan="4"/>
|
||||
<field name="parent_id" domain="[('parent_id','child_of','Event')]" string="Parent Category"/>
|
||||
<field name="parent_id" domain="[('parent_id','child_of','Event')]"/>
|
||||
<field name="active"/>
|
||||
<field name="register_min"/>
|
||||
<field name="register_max"/>
|
||||
<separator string="Status" colspan="4"/>
|
||||
<separator string="Notes" colspan="4"/>
|
||||
<field name="note" colspan="4" nolabel="1"/>
|
||||
<field name="state" select="1"/>
|
||||
<group col="4" colspan="2">
|
||||
<button string="Confirm Event" name="button_confirm" states="draft" type="object" icon="gtk-apply"/>
|
||||
@@ -80,17 +70,25 @@
|
||||
<button string="Set To Draft" name="button_draft" states="confirm,cancel,done" type="object" icon="gtk-convert"/>
|
||||
</group>
|
||||
</page>
|
||||
<page string="Mailing">
|
||||
<field name="reply_to"/>
|
||||
<separator string="Auto Registration Email" colspan="4"/>
|
||||
<field name="mail_auto_registr"/>
|
||||
<newline/>
|
||||
<field name="mail_registr" colspan="4"/>
|
||||
<separator string="Auto Confirmation Email" colspan="4"/>
|
||||
<field name="mail_auto_confirm"/>
|
||||
<newline/>
|
||||
<field name="mail_confirm" colspan="4"/>
|
||||
<page string="Mailing">
|
||||
<field name="reply_to" />
|
||||
<newline/>
|
||||
|
||||
<group col="3" colspan="2" expand="1">
|
||||
<separator string="Auto Registration Email" colspan="2"/>
|
||||
<newline/>
|
||||
<field name="mail_auto_registr"/>
|
||||
<separator string="Registration Email" colspan="2"/>
|
||||
<newline/>
|
||||
<field name="mail_registr" colspan="2" nolabel="1"/>
|
||||
</group>
|
||||
<group col="2" colspan="2" >
|
||||
<separator string="Auto Confirmation Email" colspan="2"/>
|
||||
<field name="mail_auto_confirm"/>
|
||||
<newline/>
|
||||
<separator string="Confirmation Email" colspan="2"/>
|
||||
<field name="mail_confirm" colspan="2" nolabel="1"/>
|
||||
</group>
|
||||
</page>
|
||||
<page string="Statistics">
|
||||
<separator string="Registrations" colspan="4"/>
|
||||
@@ -103,6 +101,7 @@
|
||||
</record>
|
||||
|
||||
<!-- event.event tree view -->
|
||||
|
||||
<record model="ir.ui.view" id="view_event_tree">
|
||||
<field name="name">event.event.tree</field>
|
||||
<field name="model">event.event</field>
|
||||
@@ -111,6 +110,7 @@
|
||||
<tree string="Events" colors="red:register_min>register_current;black:register_min<=register_current">
|
||||
<field name="name" string="Name"/>
|
||||
<field name="user_id"/>
|
||||
<field name="type"/>
|
||||
<field name="date_begin"/>
|
||||
<field name="register_min"/>
|
||||
<field name="register_current"/>
|
||||
@@ -126,36 +126,61 @@
|
||||
<field name="arch" type="xml">
|
||||
<search string="Events">
|
||||
<group col="10" colspan="4">
|
||||
<separator orientation="vertical"/>
|
||||
<filter icon="terp-document-new" string="Draft" domain="[('state','=','draft')]" help="Draft Events"/>
|
||||
<filter icon="terp-document-new" string="Draft" name="draft" domain="[('state','=','draft')]" help="Draft Events"/>
|
||||
<filter icon="terp-camera_test" string="Confirmed" domain="[('state','=','confirm')]" help="Confirmed Events"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="name" string="Event" select="1"/>
|
||||
<field name="user_id" select="1"/>
|
||||
<field name="date_begin" select="1"/>
|
||||
<field name="state" select="1"/>
|
||||
<field name="user_id" widget="selection">
|
||||
<filter icon="terp-personal"
|
||||
string="My Events"
|
||||
help="My Events"
|
||||
domain="[('user_id','=',uid)]"/>
|
||||
</field>
|
||||
<field name="date_begin" select="1"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Group By..." colspan="4" col="12">
|
||||
<filter string="Event Type" icon="terp-crm" context="{'group_by':'type'}"/>
|
||||
<filter string="state" icon="terp-stock_effects-object-colorize" context="{'group_by':'state'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Responsible" icon="terp-personal" context="{'group_by': 'user_id'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Creation" icon="terp-go-month"
|
||||
domain="[]" context="{'group_by':'date_begin'}"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Events Organisation/CONFIGURATION/EVENTS -->
|
||||
|
||||
<record model="ir.actions.act_window" id="action_event_view">
|
||||
<field name="name">Events</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">event.event</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="context">{"search_default_user_id":uid}</field>
|
||||
<field name="context">{"search_default_draft": "1"}</field>
|
||||
<field name="search_view_id" ref="view_event_search"/>
|
||||
</record>
|
||||
|
||||
<act_window
|
||||
id="act_event_list_register_event"
|
||||
name="Registration"
|
||||
res_model="event.registration"
|
||||
src_model="event.event"
|
||||
view_mode="tree,form"
|
||||
domain="[('event_id', '=', active_id)]"
|
||||
view_type="form"/>
|
||||
|
||||
<menuitem name="Events" id="menu_event_event" action="action_event_view" parent="menu_event_main" />
|
||||
|
||||
<!-- EVENTS/REGISTRATIONS/EVENTS -->
|
||||
|
||||
<!-- Registration view (form) by _inherits .................. -->
|
||||
<record model="ir.ui.view" id="event_registration_tree">
|
||||
|
||||
<record model="ir.ui.view" id="view_event_registration_tree">
|
||||
<field name="name">event.registration.tree</field>
|
||||
<field name="model">event.registration</field>
|
||||
<field name="type">tree</field>
|
||||
@@ -171,7 +196,7 @@
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="event_registration_form">
|
||||
<record model="ir.ui.view" id="view_event_registration_form">
|
||||
<field name="name">event.registration.form</field>
|
||||
<field name="model">event.registration</field>
|
||||
<field name="type">form</field>
|
||||
@@ -189,91 +214,107 @@
|
||||
<field name="unit_price"/>
|
||||
</group>
|
||||
<notebook colspan="4">
|
||||
<page string="General">
|
||||
<field name="contact_id" on_change="onchange_contact_id(contact_id, partner_id)" /><newline/>
|
||||
<field name="email_from"/>
|
||||
<button name="remind_partner" string="Send Reminder" states="open,pending" type="object" colspan="2" icon="gtk-go-forward"/>
|
||||
<newline/>
|
||||
<separator string="Badge" colspan="4"/>
|
||||
<field name="badge_title"/>
|
||||
<field name="badge_name" on_change="onchange_badge_name(badge_name)"/>
|
||||
<field name="badge_partner"/>
|
||||
<newline/>
|
||||
<separator string="Status" colspan="4"/>
|
||||
<group col="8" colspan="4">
|
||||
<field name="state" select="1" colspan="2"/>
|
||||
<button name="button_reg_close" string="Registration Invoiced" states="open" type="object" icon="gtk-print"/>
|
||||
<button name="check_confirm" string="Confirm Registration" states="draft" type="object" icon="gtk-apply"/>
|
||||
<button name="button_reg_cancel" string="Cancel Registration" states="draft,open" type="object" icon="gtk-cancel"/>
|
||||
</group>
|
||||
</page>
|
||||
<page string="Extra Info">
|
||||
<field name="name" select="1" colspan="4"/>
|
||||
<field name="id" select="1"/>
|
||||
<field name="active"/>
|
||||
<field name="email_cc" colspan="4"/>
|
||||
<field name="categ_id" on_change="onchange_categ_id(categ_id)"/>
|
||||
<separator colspan="4" string="Dates"/>
|
||||
<field name="create_date"/>
|
||||
<field name="date_closed"/>
|
||||
<separator colspan="4" string="References"/>
|
||||
<field name="ref" colspan="4"/>
|
||||
<field name="ref2" colspan="4"/>
|
||||
</page>
|
||||
<page string="History">
|
||||
<field name="message_ids" colspan="4" nolabel="1" mode="tree,form">
|
||||
<form string="Communication history">
|
||||
<group col="6" colspan="4">
|
||||
<field name="date"/>
|
||||
<field name="email_to"/>
|
||||
<field name="email_from"/>
|
||||
</group>
|
||||
<notebook colspan="4">
|
||||
<page string="Details">
|
||||
<field name="description" colspan="4" nolabel="1"/>
|
||||
</page>
|
||||
<page string="Attachments">
|
||||
<field name="attachment_ids" colspan="4" readonly="1" nolabel="1"/>
|
||||
</page>
|
||||
</notebook>
|
||||
<button colspan="4"
|
||||
string="Reply to Last Email"
|
||||
name="%(crm.action_crm_send_mail)d"
|
||||
context="{'mail':'reply', 'model': 'event.registration'}"
|
||||
icon="gtk-undo" type="action" />
|
||||
</form>
|
||||
<tree string="Communication history">
|
||||
<field name="date"/>
|
||||
<field name="email_from" />
|
||||
<field name="email_to"/>
|
||||
<field name="description"/>
|
||||
</tree>
|
||||
</field>
|
||||
<field name="log_ids" nolabel="1" colspan="4" mode="tree,form" readonly="1">
|
||||
<tree string="Actions">
|
||||
<separator string="Action Information" colspan="4"/>
|
||||
<field name="name"/>
|
||||
<field name="date"/>
|
||||
<field name="user_id"/>
|
||||
</tree>
|
||||
<form string="Actions">
|
||||
<separator string="Action Information" colspan="4"/>
|
||||
<field name="name" colspan="4"/>
|
||||
<field name="date"/>
|
||||
<field name="user_id"/>
|
||||
</form>
|
||||
</field>
|
||||
</page>
|
||||
<page string="Payments">
|
||||
<field name="invoice_label" select="1"/>
|
||||
<field name="tobe_invoiced" select="1"/>
|
||||
<field name="invoice_id"/>
|
||||
</page>
|
||||
<page string="General">
|
||||
<field name="contact_id" on_change="onchange_contact_id(contact_id, partner_id)" /><newline/>
|
||||
<field name="email_from"/>
|
||||
<button name="remind_partner" string="Send Reminder" states="open,pending" type="object" colspan="2" icon="gtk-go-forward"/>
|
||||
<newline/>
|
||||
<separator string="Badge" colspan="4"/>
|
||||
<field name="badge_title"/>
|
||||
<field name="badge_name" on_change="onchange_badge_name(badge_name)"/>
|
||||
<field name="badge_partner"/>
|
||||
<newline/>
|
||||
<separator string="Status" colspan="4"/>
|
||||
<group col="8" colspan="4">
|
||||
<field name="state" select="1" colspan="2"/>
|
||||
<button name="button_reg_close" string="Close Registration" states="open" type="object" icon="gtk-close"/>
|
||||
<button name="check_confirm" string="Confirm Registration" states="draft" type="object" icon="gtk-apply"/>
|
||||
<button name="button_reg_cancel" string="Cancel Registration" states="draft,open" type="object" icon="gtk-cancel"/>
|
||||
</group>
|
||||
</page>
|
||||
<page string="Payments">
|
||||
<field name="event_product" select="1"/>
|
||||
<field name="tobe_invoiced" select="1"/>
|
||||
<field name="invoice_id"/>
|
||||
</page>
|
||||
<page string="Emails" groups="base.group_extended">
|
||||
<group colspan="4">
|
||||
<field colspan="4" name="email_cc" string="CC"/>
|
||||
</group>
|
||||
<field name="message_ids" colspan="4" nolabel="1" mode="form,tree">
|
||||
<form string="Communication history">
|
||||
<group col="6" colspan="4">
|
||||
<field name="date"/>
|
||||
<field name="email_to"/>
|
||||
<field name="email_from"/>
|
||||
</group>
|
||||
<notebook colspan="4">
|
||||
<page string="Details">
|
||||
<field name="description" colspan="4" nolabel="1"/>
|
||||
</page>
|
||||
<page string="Attachments">
|
||||
<field name="attachment_ids" colspan="4" readonly="1" nolabel="1"/>
|
||||
</page>
|
||||
</notebook>
|
||||
<button colspan="4"
|
||||
string="Reply to Last Email"
|
||||
name="%(crm.action_crm_send_mail)d"
|
||||
context="{'mail':'reply', 'model': 'crm.lead', 'include_original' : True}"
|
||||
icon="gtk-undo" type="action" />
|
||||
</form>
|
||||
<tree string="Communication history">
|
||||
<field name="date"/>
|
||||
<field name="email_from" />
|
||||
<field name="email_to"/>
|
||||
<field name="description"/>
|
||||
</tree>
|
||||
</field>
|
||||
<button colspan="4" string="Send New Email"
|
||||
name="%(crm.action_crm_send_mail)d"
|
||||
context="{'mail':'new', 'model': 'event.registration'}"
|
||||
icon="gtk-go-forward" type="action" />
|
||||
</page>
|
||||
<page string="History">
|
||||
<group colspan="4">
|
||||
<field name="name" select="1" colspan="4"/>
|
||||
</group>
|
||||
<group col="2" colspan="2">
|
||||
<separator string="Dates" colspan="2"/>
|
||||
<field name="create_date"/>
|
||||
<field name="date_closed"/>
|
||||
</group>
|
||||
<group col="2" colspan="2">
|
||||
<separator string="Misc" colspan="2"/>
|
||||
<field name="id"/>
|
||||
<field name="active"/>
|
||||
</group>
|
||||
<group col="3" colspan="4">
|
||||
<separator colspan="4" string="References"/>
|
||||
<field name="ref" />
|
||||
<field name="ref2" />
|
||||
</group>
|
||||
<!-- TODO-->
|
||||
<field name="log_ids" nolabel="1" colspan="4">
|
||||
<tree string="Logs">
|
||||
<field name="name" colspan="4"/>
|
||||
<field name="date"/>
|
||||
<field name="user_id"/>
|
||||
</tree>
|
||||
<form string="Logs">
|
||||
<separator string="Action Information" colspan="4"/>
|
||||
<field name="name" colspan="4"/>
|
||||
<field name="date"/>
|
||||
<field name="user_id"/>
|
||||
</form>
|
||||
</field>
|
||||
</page>
|
||||
</notebook>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Search view of event registration form-->
|
||||
|
||||
<record model="ir.ui.view" id="view_registration_search">
|
||||
<field name="name">Registrations</field>
|
||||
<field name="model">event.registration</field>
|
||||
@@ -281,16 +322,28 @@
|
||||
<field name="arch" type="xml">
|
||||
<search string="Event Registration">
|
||||
<group col="12" colspan="4">
|
||||
<separator orientation="vertical"/>
|
||||
<filter icon="terp-document-new" string="Draft" domain="[('state','=','draft')]" help="Draft Registrations"/>
|
||||
<filter icon="terp-document-new" string="Draft" name="draft" domain="[('state','=','draft')]" help="Draft Registrations"/>
|
||||
<filter icon="terp-camera_test" string="Confirmed" domain="[('state','in',('open','done'))]" help="Confirmed Registrations"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="event_id" select="1"/>
|
||||
<field name="user_id" select="1"/>
|
||||
<field name="partner_id" select="1"/>
|
||||
<field name="partner_id" />
|
||||
<field name="event_id" widget="selection"/>
|
||||
<field name="state" select="1"/>
|
||||
<field name="invoice_label" select="1"/>
|
||||
|
||||
<field name="user_id" widget="selection">
|
||||
<filter icon="terp-personal"
|
||||
string="My Registration"
|
||||
help="My Registration"
|
||||
domain="[('user_id','=',uid)]"/>
|
||||
</field>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Group By...">
|
||||
<filter string="Event" icon="terp-crm" domain="[]" context="{'group_by':'event_id'}"/>
|
||||
<filter string="State" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Partner" icon="terp-personal" domain="[]" context="{'group_by':'partner_id'}"/>
|
||||
<filter string="Responsible" icon="terp-personal" domain="[]" context="{'group_by':'user_id'}"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
@@ -301,93 +354,14 @@
|
||||
<field name="view_type">form</field>
|
||||
<field name="domain"></field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="context">{"search_default_user_id":uid}</field>
|
||||
<field name="context">{"search_default_draft": "1"}</field>
|
||||
<field name="search_view_id" ref="view_registration_search"/>
|
||||
</record>
|
||||
|
||||
<menuitem
|
||||
name="Registrations"
|
||||
id="menu_action_registration" parent="menu_event_main"
|
||||
action="action_registration"/>
|
||||
|
||||
<!-- report , event on registration... start -->
|
||||
<record model="ir.ui.view" id="report_event_registration_tree">
|
||||
<field name="name">report.event.registration.tree</field>
|
||||
<field name="model">report.event.registration</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Event on Registration">
|
||||
<field name="name" select="1"/>
|
||||
<field name="date_begin" select="1"/>
|
||||
<field name="date_end"/>
|
||||
<field name="draft_state"/>
|
||||
<field name="confirm_state"/>
|
||||
<field name="register_max"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model ="ir.ui.view" id="report_event_registration_graph">
|
||||
<field name="name">report.event.registration.graph</field>
|
||||
<field name="model">report.event.registration</field>
|
||||
<field name="type">graph</field>
|
||||
<field name="arch" type="xml">
|
||||
<graph string="Event on Registration" type="bar">
|
||||
<field name="name"/>
|
||||
<field name="draft_state" operator="+"/>
|
||||
<field name="confirm_state" operator="+"/>
|
||||
<field name="register_max" operator="+"/>
|
||||
</graph>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.actions.act_window" id="action_event_registration_report">
|
||||
<field name="name">Events On Registrations</field>
|
||||
<field name="res_model">report.event.registration</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,graph</field>
|
||||
</record>
|
||||
<menuitem name="Reporting" id="menu_report_event" parent="menu_marketing_event_main" sequence="20"/>
|
||||
<!--<menuitem parent="menu_report_event" action="action_event_registration" id="menu_report_event_registration"/>-->
|
||||
<menuitem parent="menu_report_event" action="action_event_registration_report" id="menu_report_event_registration" />
|
||||
<!-- end... -->
|
||||
|
||||
|
||||
<!-- report , event type on registration... start -->
|
||||
<record model="ir.ui.view" id="report_event_type_registration_tree">
|
||||
<field name="name">report.event.type.registration.tree</field>
|
||||
<field name="model">report.event.type.registration</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Registration By Event Types">
|
||||
<field name="name" select="1"/>
|
||||
<field name="nbevent"/>
|
||||
<field name="draft_state"/>
|
||||
<field name="confirm_state"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="report_event_type_registration_graph">
|
||||
<field name="name">report.event.type.registration.graph</field>
|
||||
<field name="model">report.event.type.registration</field>
|
||||
<field name="type">graph</field>
|
||||
<field name="arch" type="xml">
|
||||
<graph string="Registration By Event Types" type="bar">
|
||||
<field name="name"/>
|
||||
<field name="draft_state" operator="+"/>
|
||||
<field name="confirm_state" operator="+"/>
|
||||
</graph>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.actions.act_window" id="action_event_type_registration">
|
||||
<field name="name">Registration By Event Types</field>
|
||||
<field name="res_model">report.event.type.registration</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">graph,tree</field>
|
||||
</record>
|
||||
<menuitem parent="menu_report_event" action="action_event_type_registration" id="menu_report_event_type_registration"/>
|
||||
|
||||
<!-- end... -->
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
+123
-102
@@ -7,111 +7,110 @@ msgstr ""
|
||||
"Project-Id-Version: OpenERP Server 5.0.4\n"
|
||||
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
||||
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
|
||||
"PO-Revision-Date: 2009-01-26 17:13+0000\n"
|
||||
"Last-Translator: Jordi Esteve (www.zikzakmedia.com) "
|
||||
"<jesteve@zikzakmedia.com>\n"
|
||||
"PO-Revision-Date: 2010-06-27 22:00+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-22 03:58+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-06-28 03:48+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: event
|
||||
#: field:event.event,date_end:0
|
||||
#: field:report.event.registration,date_end:0
|
||||
msgid "Ending date"
|
||||
msgstr ""
|
||||
msgstr "Fecha de finalización"
|
||||
|
||||
#. module: event
|
||||
#: field:event.event,register_min:0
|
||||
msgid "Minimum Registrations"
|
||||
msgstr ""
|
||||
msgstr "Registros mínimos"
|
||||
|
||||
#. module: event
|
||||
#: constraint:ir.actions.act_window:0
|
||||
msgid "Invalid model name in the action definition."
|
||||
msgstr ""
|
||||
msgstr "Nombre de modelo inválido en la definición de acción."
|
||||
|
||||
#. module: event
|
||||
#: field:event.event,mail_registr:0
|
||||
msgid "Registration Email"
|
||||
msgstr ""
|
||||
msgstr "Email de registro"
|
||||
|
||||
#. module: event
|
||||
#: model:crm.case.section,name:event.event_0_crm_case_section
|
||||
msgid "Concert of Bon Jovi"
|
||||
msgstr ""
|
||||
msgstr "Concierto de Bon Jovi"
|
||||
|
||||
#. module: event
|
||||
#: field:event.event,mail_confirm:0
|
||||
msgid "Confirmation Email"
|
||||
msgstr ""
|
||||
msgstr "Email de confirmación"
|
||||
|
||||
#. module: event
|
||||
#: constraint:crm.case.section:0
|
||||
msgid "Error ! You cannot create recursive sections."
|
||||
msgstr ""
|
||||
msgstr "¡Error! No puede crear secciones recursivas."
|
||||
|
||||
#. module: event
|
||||
#: model:ir.model,name:event.model_event_registration
|
||||
msgid "Event Registration"
|
||||
msgstr ""
|
||||
msgstr "Registro evento"
|
||||
|
||||
#. module: event
|
||||
#: model:ir.actions.wizard,name:event.event_reg_invoice
|
||||
msgid "Make Invoice"
|
||||
msgstr ""
|
||||
msgstr "Crear factura"
|
||||
|
||||
#. module: event
|
||||
#: field:report.event.type.registration,draft_state:0
|
||||
msgid "Draft Registrations"
|
||||
msgstr ""
|
||||
msgstr "Registros borrador"
|
||||
|
||||
#. module: event
|
||||
#: view:report.event.registration:0
|
||||
msgid "Event on Registration"
|
||||
msgstr ""
|
||||
msgstr "Evento en el registro"
|
||||
|
||||
#. module: event
|
||||
#: wizard_button:event.reg_make_invoice,init,end:0
|
||||
msgid "Ok"
|
||||
msgstr ""
|
||||
msgstr "Aceptar"
|
||||
|
||||
#. module: event
|
||||
#: field:event.event,mail_auto_confirm:0
|
||||
msgid "Mail Auto Confirm"
|
||||
msgstr ""
|
||||
msgstr "Enviar correo auto confirmación"
|
||||
|
||||
#. module: event
|
||||
#: model:product.template,name:event.event_product_1_product_template
|
||||
msgid "Ticket for Opera"
|
||||
msgstr ""
|
||||
msgstr "Entrada para la ópera"
|
||||
|
||||
#. module: event
|
||||
#: wizard_field:event.reg_make_invoice,init,inv_rejected:0
|
||||
msgid "Invoice Rejected"
|
||||
msgstr ""
|
||||
msgstr "Factura rechazada"
|
||||
|
||||
#. module: event
|
||||
#: view:event.event:0
|
||||
msgid "Confirm Event"
|
||||
msgstr ""
|
||||
msgstr "Confirmar evento"
|
||||
|
||||
#. module: event
|
||||
#: model:crm.case.section,name:event.event_1_crm_case_section
|
||||
msgid "Opera of Verdi"
|
||||
msgstr ""
|
||||
msgstr "Ópera de Verdi"
|
||||
|
||||
#. module: event
|
||||
#: field:report.event.registration,draft_state:0
|
||||
msgid "Draft Registration"
|
||||
msgstr ""
|
||||
msgstr "Registro borrador"
|
||||
|
||||
#. module: event
|
||||
#: wizard_view:event.reg_make_invoice,init:0
|
||||
msgid "Create Invoices"
|
||||
msgstr ""
|
||||
msgstr "Crear facturas"
|
||||
|
||||
#. module: event
|
||||
#: model:ir.module.module,description:event.module_meta_information
|
||||
@@ -131,22 +130,36 @@ msgid ""
|
||||
"event or per event category in :\n"
|
||||
" Events / Reporting\n"
|
||||
msgstr ""
|
||||
"Organización y planificación de eventos.\n"
|
||||
"\n"
|
||||
" Este módulo le permite\n"
|
||||
" * gestionar sus eventos y sus registros\n"
|
||||
" * usar emails para confirmar automáticamente y enviar confirmaciones "
|
||||
"para cualquier registro a un evento\n"
|
||||
" * ...\n"
|
||||
"\n"
|
||||
" Note that:\n"
|
||||
" - You can define new types of events in\n"
|
||||
" Events / Configuration / Types of Events\n"
|
||||
" - You can access predefined reports about number of registration per "
|
||||
"event or per event category in :\n"
|
||||
" Events / Reporting\n"
|
||||
|
||||
#. module: event
|
||||
#: view:event.registration:0
|
||||
msgid "Extra Info"
|
||||
msgstr ""
|
||||
msgstr "Información extra"
|
||||
|
||||
#. module: event
|
||||
#: view:event.registration:0
|
||||
msgid "Registration"
|
||||
msgstr ""
|
||||
msgstr "Registro"
|
||||
|
||||
#. module: event
|
||||
#: field:event.type,name:0
|
||||
#: model:ir.model,name:event.model_event_type
|
||||
msgid "Event type"
|
||||
msgstr ""
|
||||
msgstr "Tipo de evento"
|
||||
|
||||
#. module: event
|
||||
#: view:event.event:0
|
||||
@@ -154,54 +167,54 @@ msgstr ""
|
||||
#: model:ir.module.module,shortdesc:event.module_meta_information
|
||||
#: field:report.event.registration,name:0
|
||||
msgid "Event"
|
||||
msgstr ""
|
||||
msgstr "Evento"
|
||||
|
||||
#. module: event
|
||||
#: selection:event.event,state:0
|
||||
msgid "Confirmed"
|
||||
msgstr ""
|
||||
msgstr "Confirmado"
|
||||
|
||||
#. module: event
|
||||
#: wizard_view:event.confirm_registration,split:0
|
||||
msgid "Registration Confirmation"
|
||||
msgstr ""
|
||||
msgstr "Confirmación del registro"
|
||||
|
||||
#. module: event
|
||||
#: view:event.registration:0
|
||||
msgid "Dates"
|
||||
msgstr ""
|
||||
msgstr "Fechas"
|
||||
|
||||
#. module: event
|
||||
#: field:event.event,register_current:0
|
||||
#: model:ir.actions.act_window,name:event.action_registration_confirm
|
||||
#: model:ir.ui.menu,name:event.menu_action_registration_confirm
|
||||
msgid "Confirmed Registrations"
|
||||
msgstr ""
|
||||
msgstr "Registros confirmados"
|
||||
|
||||
#. module: event
|
||||
#: field:event.event,mail_auto_registr:0
|
||||
msgid "Mail Auto Register"
|
||||
msgstr ""
|
||||
msgstr "Enviar correo auto registro"
|
||||
|
||||
#. module: event
|
||||
#: view:event.registration:0
|
||||
msgid "Badge"
|
||||
msgstr ""
|
||||
msgstr "Distintivo"
|
||||
|
||||
#. module: event
|
||||
#: field:event.event,section_id:0
|
||||
msgid "Case section"
|
||||
msgstr ""
|
||||
msgstr "Sección del caso"
|
||||
|
||||
#. module: event
|
||||
#: field:event.registration,tobe_invoiced:0
|
||||
msgid "To be Invoiced"
|
||||
msgstr ""
|
||||
msgstr "Para ser facturado"
|
||||
|
||||
#. module: event
|
||||
#: model:ir.ui.menu,name:event.menu_event_event
|
||||
msgid "All Events"
|
||||
msgstr ""
|
||||
msgstr "Todos los eventos"
|
||||
|
||||
#. module: event
|
||||
#: model:ir.ui.menu,name:event.menu_report_event
|
||||
@@ -211,34 +224,34 @@ msgstr "Informe"
|
||||
#. module: event
|
||||
#: view:event.registration:0
|
||||
msgid "Cancel Registration"
|
||||
msgstr ""
|
||||
msgstr "Cancelar registro"
|
||||
|
||||
#. module: event
|
||||
#: model:ir.ui.menu,name:event.menu_action_event_categories
|
||||
msgid "Events by Categories"
|
||||
msgstr ""
|
||||
msgstr "Eventos por categorías"
|
||||
|
||||
#. module: event
|
||||
#: wizard_view:event.confirm_registration,split:0
|
||||
msgid "The event limit is reached. What do you want to do?"
|
||||
msgstr ""
|
||||
msgstr "Se ha alcanzado el límite del evento. ¿Qué desea hacer?"
|
||||
|
||||
#. module: event
|
||||
#: field:report.event.type.registration,confirm_state:0
|
||||
msgid "Confirm Registrations"
|
||||
msgstr ""
|
||||
msgstr "Confirmar registros"
|
||||
|
||||
#. module: event
|
||||
#: view:event.registration:0
|
||||
msgid "References"
|
||||
msgstr ""
|
||||
msgstr "Referencias"
|
||||
|
||||
#. module: event
|
||||
#: model:ir.actions.act_window,name:event.action_event_type_registration
|
||||
#: model:ir.ui.menu,name:event.menu_report_event_type_registration
|
||||
#: view:report.event.type.registration:0
|
||||
msgid "Registration By Event Types"
|
||||
msgstr ""
|
||||
msgstr "Registro por tipos de evento"
|
||||
|
||||
#. module: event
|
||||
#: model:ir.ui.menu,name:event.menu_event_config
|
||||
@@ -253,7 +266,7 @@ msgstr "¡XML inválido para la definición de la vista!"
|
||||
#. module: event
|
||||
#: wizard_button:event.confirm_registration,split,confirm:0
|
||||
msgid "Confirm Anyway"
|
||||
msgstr ""
|
||||
msgstr "Confirmar de todos modos"
|
||||
|
||||
#. module: event
|
||||
#: constraint:product.template:0
|
||||
@@ -263,75 +276,75 @@ msgstr "Error: La UdV debe estar en una categoría diferente que la UdM"
|
||||
#. module: event
|
||||
#: view:event.event:0
|
||||
msgid "Parent Category"
|
||||
msgstr ""
|
||||
msgstr "Categoría padre"
|
||||
|
||||
#. module: event
|
||||
#: view:event.registration:0
|
||||
msgid "Registration Invoiced"
|
||||
msgstr ""
|
||||
msgstr "Registro facturado"
|
||||
|
||||
#. module: event
|
||||
#: field:report.event.type.registration,nbevent:0
|
||||
msgid "Number Of Events"
|
||||
msgstr ""
|
||||
msgstr "Número de eventos"
|
||||
|
||||
#. module: event
|
||||
#: view:event.event:0
|
||||
msgid "Cancel Event"
|
||||
msgstr ""
|
||||
msgstr "Cancelar evento"
|
||||
|
||||
#. module: event
|
||||
#: wizard_field:event.reg_make_invoice,init,inv_rej_reason:0
|
||||
msgid "Error Messages"
|
||||
msgstr ""
|
||||
msgstr "Mensajes de error"
|
||||
|
||||
#. module: event
|
||||
#: view:event.event:0
|
||||
msgid "Mailing"
|
||||
msgstr ""
|
||||
msgstr "Envío correo"
|
||||
|
||||
#. module: event
|
||||
#: model:product.template,name:event.event_product_0_product_template
|
||||
msgid "Ticket for Concert"
|
||||
msgstr ""
|
||||
msgstr "Entrada para concierto"
|
||||
|
||||
#. module: event
|
||||
#: field:event.event,register_prospect:0
|
||||
#: model:ir.actions.act_window,name:event.action_registration_draft
|
||||
#: model:ir.ui.menu,name:event.menu_action_registration_draft
|
||||
msgid "Unconfirmed Registrations"
|
||||
msgstr ""
|
||||
msgstr "Registros sin confirmar"
|
||||
|
||||
#. module: event
|
||||
#: field:event.registration,partner_invoice_id:0
|
||||
msgid "Partner Invoiced"
|
||||
msgstr ""
|
||||
msgstr "Empresa facturada"
|
||||
|
||||
#. module: event
|
||||
#: view:event.registration:0
|
||||
msgid "Communication history"
|
||||
msgstr ""
|
||||
msgstr "Histórico comunicación"
|
||||
|
||||
#. module: event
|
||||
#: selection:event.event,state:0
|
||||
msgid "Canceled"
|
||||
msgstr ""
|
||||
msgstr "Cancelado"
|
||||
|
||||
#. module: event
|
||||
#: view:event.event:0
|
||||
msgid "Event Done"
|
||||
msgstr ""
|
||||
msgstr "Evento realizado"
|
||||
|
||||
#. module: event
|
||||
#: field:event.registration,badge_name:0
|
||||
msgid "Badge Name"
|
||||
msgstr ""
|
||||
msgstr "Nombre de distintivo"
|
||||
|
||||
#. module: event
|
||||
#: model:ir.actions.act_window,name:event.action_event_registration
|
||||
#: model:ir.ui.menu,name:event.menu_report_event_registration
|
||||
msgid "Events On Registrations"
|
||||
msgstr ""
|
||||
msgstr "Eventos en los registros"
|
||||
|
||||
#. module: event
|
||||
#: constraint:product.template:0
|
||||
@@ -344,27 +357,27 @@ msgstr ""
|
||||
#. module: event
|
||||
#: wizard_field:event.reg_make_invoice,init,inv_created:0
|
||||
msgid "Invoice Created"
|
||||
msgstr ""
|
||||
msgstr "Factura creada"
|
||||
|
||||
#. module: event
|
||||
#: view:event.event:0
|
||||
msgid "Statistics"
|
||||
msgstr ""
|
||||
msgstr "Estadísticas"
|
||||
|
||||
#. module: event
|
||||
#: selection:event.event,state:0
|
||||
msgid "Draft"
|
||||
msgstr ""
|
||||
msgstr "Borrador"
|
||||
|
||||
#. module: event
|
||||
#: view:event.event:0
|
||||
msgid "Event description"
|
||||
msgstr ""
|
||||
msgstr "Descripción del evento"
|
||||
|
||||
#. module: event
|
||||
#: model:ir.model,name:event.model_report_event_type_registration
|
||||
msgid "Event type on registration"
|
||||
msgstr ""
|
||||
msgstr "Tipo de evento en el registro"
|
||||
|
||||
#. module: event
|
||||
#: constraint:ir.model:0
|
||||
@@ -377,7 +390,7 @@ msgstr ""
|
||||
#. module: event
|
||||
#: field:event.registration,event_id:0
|
||||
msgid "Event Related"
|
||||
msgstr ""
|
||||
msgstr "Evento relacionado"
|
||||
|
||||
#. module: event
|
||||
#: model:crm.case.section,name:event.case_section_event
|
||||
@@ -389,167 +402,170 @@ msgstr "Eventos"
|
||||
#. module: event
|
||||
#: field:event.registration,nb_register:0
|
||||
msgid "Number of Registration"
|
||||
msgstr ""
|
||||
msgstr "Número de registro"
|
||||
|
||||
#. module: event
|
||||
#: view:event.event:0
|
||||
#: field:event.event,state:0
|
||||
#: view:event.registration:0
|
||||
msgid "Status"
|
||||
msgstr ""
|
||||
msgstr "Estado"
|
||||
|
||||
#. module: event
|
||||
#: model:ir.actions.act_window,name:event.action_event_categories
|
||||
msgid "Events by section"
|
||||
msgstr ""
|
||||
msgstr "Eventos por sección"
|
||||
|
||||
#. module: event
|
||||
#: model:ir.ui.menu,name:event.menu_action_registration
|
||||
msgid "All Registrations"
|
||||
msgstr ""
|
||||
msgstr "Todos los registros"
|
||||
|
||||
#. module: event
|
||||
#: help:event.event,mail_auto_registr:0
|
||||
msgid ""
|
||||
"Check this box if you want to use the automatic mailing for new registration"
|
||||
msgstr ""
|
||||
"Marque esta opción si desea utilizar el correo automático para nuevos "
|
||||
"registros"
|
||||
|
||||
#. module: event
|
||||
#: view:event.event:0
|
||||
msgid "Set To Draft"
|
||||
msgstr ""
|
||||
msgstr "Establecer en borrador"
|
||||
|
||||
#. module: event
|
||||
#: view:event.registration:0
|
||||
#: model:ir.actions.wizard,name:event.event_confirm_registration
|
||||
#: field:report.event.registration,confirm_state:0
|
||||
msgid "Confirm Registration"
|
||||
msgstr ""
|
||||
msgstr "Confirmación registro"
|
||||
|
||||
#. module: event
|
||||
#: view:event.registration:0
|
||||
msgid "History"
|
||||
msgstr ""
|
||||
msgstr "Histórico"
|
||||
|
||||
#. module: event
|
||||
#: model:ir.ui.menu,name:event.menu_event_type
|
||||
msgid "Types of Events"
|
||||
msgstr ""
|
||||
msgstr "Tipos de eventos"
|
||||
|
||||
#. module: event
|
||||
#: field:event.registration,contact_id:0
|
||||
msgid "Partner Contact"
|
||||
msgstr ""
|
||||
msgstr "Contacto empresa"
|
||||
|
||||
#. module: event
|
||||
#: view:event.event:0
|
||||
msgid "Auto Confirmation Email"
|
||||
msgstr ""
|
||||
msgstr "Correo de confirmación automático"
|
||||
|
||||
#. module: event
|
||||
#: view:event.event:0
|
||||
#: view:event.registration:0
|
||||
msgid "General"
|
||||
msgstr ""
|
||||
msgstr "General"
|
||||
|
||||
#. module: event
|
||||
#: view:event.registration:0
|
||||
msgid "Send Reminder"
|
||||
msgstr ""
|
||||
msgstr "Enviar recordatorio"
|
||||
|
||||
#. module: event
|
||||
#: selection:event.event,state:0
|
||||
msgid "Done"
|
||||
msgstr ""
|
||||
msgstr "Realizado"
|
||||
|
||||
#. module: event
|
||||
#: field:event.event,date_begin:0
|
||||
#: field:report.event.registration,date_begin:0
|
||||
msgid "Beginning date"
|
||||
msgstr ""
|
||||
msgstr "Fecha inicio"
|
||||
|
||||
#. module: event
|
||||
#: field:event.registration,invoice_id:0
|
||||
msgid "Invoice"
|
||||
msgstr ""
|
||||
msgstr "Factura"
|
||||
|
||||
#. module: event
|
||||
#: model:ir.model,name:event.model_report_event_registration
|
||||
msgid "Events on registrations"
|
||||
msgstr ""
|
||||
msgstr "Eventos en los registros"
|
||||
|
||||
#. module: event
|
||||
#: wizard_button:event.confirm_registration,split,end:0
|
||||
msgid "Cancel"
|
||||
msgstr ""
|
||||
msgstr "Cancelar"
|
||||
|
||||
#. module: event
|
||||
#: wizard_button:event.reg_make_invoice,init,open:0
|
||||
msgid "Open"
|
||||
msgstr ""
|
||||
msgstr "Abierto"
|
||||
|
||||
#. module: event
|
||||
#: field:event.registration,badge_title:0
|
||||
msgid "Badge Title"
|
||||
msgstr ""
|
||||
msgstr "Título del distintivo"
|
||||
|
||||
#. module: event
|
||||
#: model:ir.actions.act_window,name:event.action_new_event_form
|
||||
#: model:ir.ui.menu,name:event.menu_event_new_event
|
||||
msgid "New event"
|
||||
msgstr ""
|
||||
msgstr "Nuevo evento"
|
||||
|
||||
#. module: event
|
||||
#: field:event.registration,unit_price:0
|
||||
msgid "Unit Price"
|
||||
msgstr ""
|
||||
msgstr "Precio unitario"
|
||||
|
||||
#. module: event
|
||||
#: model:crm.case.section,name:event.event_2_crm_case_section
|
||||
msgid "Conference on ERP Buisness"
|
||||
msgstr ""
|
||||
msgstr "Conferencia en negocios ERP"
|
||||
|
||||
#. module: event
|
||||
#: field:event.registration,badge_partner:0
|
||||
msgid "Badge Partner"
|
||||
msgstr ""
|
||||
msgstr "Empresa distinguida"
|
||||
|
||||
#. module: event
|
||||
#: model:ir.actions.act_window,name:event.action_event_view_confirm
|
||||
#: model:ir.ui.menu,name:event.menu_event_event_confirm
|
||||
msgid "Confirmed Events"
|
||||
msgstr ""
|
||||
msgstr "Eventos confirmados"
|
||||
|
||||
#. module: event
|
||||
#: field:event.event,register_max:0
|
||||
#: field:report.event.registration,register_max:0
|
||||
msgid "Maximum Registrations"
|
||||
msgstr ""
|
||||
msgstr "Registros máximos"
|
||||
|
||||
#. module: event
|
||||
#: field:event.event,type:0
|
||||
msgid "Type"
|
||||
msgstr ""
|
||||
msgstr "Tipo"
|
||||
|
||||
#. module: event
|
||||
#: help:event.event,mail_registr:0
|
||||
msgid "This email will be sent when someone subscribes to the event."
|
||||
msgstr ""
|
||||
"Este correo electrónico será enviado cuando alguien se suscriba al evento."
|
||||
|
||||
#. module: event
|
||||
#: model:product.template,name:event.event_product_2_product_template
|
||||
msgid "Ticket for Conference"
|
||||
msgstr ""
|
||||
msgstr "Entrada para conferencia"
|
||||
|
||||
#. module: event
|
||||
#: field:event.registration,case_id:0
|
||||
msgid "Case"
|
||||
msgstr ""
|
||||
msgstr "Caso"
|
||||
|
||||
#. module: event
|
||||
#: view:event.event:0
|
||||
msgid "Name"
|
||||
msgstr ""
|
||||
msgstr "Nombre"
|
||||
|
||||
#. module: event
|
||||
#: help:event.event,mail_auto_confirm:0
|
||||
@@ -557,6 +573,8 @@ msgid ""
|
||||
"Check this box if you want ot use the automatic confirmation emailing or the "
|
||||
"reminder"
|
||||
msgstr ""
|
||||
"Marque esta opción si desea utilizar el correo de confirmación automático o "
|
||||
"el recordatorio"
|
||||
|
||||
#. module: event
|
||||
#: help:event.event,mail_confirm:0
|
||||
@@ -565,55 +583,58 @@ msgid ""
|
||||
"subscribes to a confirmed event. This is also the email sent to remind "
|
||||
"someone about the event."
|
||||
msgstr ""
|
||||
"Este correo electrónico será enviado cuando el evento sea confirmado o "
|
||||
"cuando alguien se suscriba a un evento confirmado. Éste es también el correo "
|
||||
"que será enviado para recordar a alguien sobre el evento."
|
||||
|
||||
#. module: event
|
||||
#: field:event.event,product_id:0
|
||||
msgid "Product"
|
||||
msgstr ""
|
||||
msgstr "Producto"
|
||||
|
||||
#. module: event
|
||||
#: field:event.registration,invoice_label:0
|
||||
msgid "Label Invoice"
|
||||
msgstr ""
|
||||
msgstr "Etiquetar factura"
|
||||
|
||||
#. module: event
|
||||
#: view:event.registration:0
|
||||
msgid "Payments"
|
||||
msgstr ""
|
||||
msgstr "Pagos"
|
||||
|
||||
#. module: event
|
||||
#: view:event.type:0
|
||||
#: field:report.event.type.registration,name:0
|
||||
msgid "Event Type"
|
||||
msgstr ""
|
||||
msgstr "Tipo de evento"
|
||||
|
||||
#. module: event
|
||||
#: view:event.event:0
|
||||
#: model:ir.actions.act_window,name:event.action_registration
|
||||
#: model:ir.actions.wizard,name:event.wizard_event_registration
|
||||
msgid "Registrations"
|
||||
msgstr ""
|
||||
msgstr "Registros"
|
||||
|
||||
#. module: event
|
||||
#: model:ir.actions.act_window,name:event.action_event_view_draft
|
||||
#: model:ir.ui.menu,name:event.menu_event_event_draft
|
||||
msgid "Draft Events"
|
||||
msgstr ""
|
||||
msgstr "Eventos en borrador"
|
||||
|
||||
#. module: event
|
||||
#: model:ir.ui.menu,name:event.menu_event_main
|
||||
msgid "Events Organisation"
|
||||
msgstr ""
|
||||
msgstr "Organización de eventos"
|
||||
|
||||
#. module: event
|
||||
#: view:event.registration:0
|
||||
msgid "Actions"
|
||||
msgstr ""
|
||||
msgstr "Acciones"
|
||||
|
||||
#. module: event
|
||||
#: model:ir.actions.wizard,name:event.wizard_event_reg_partners
|
||||
msgid "List Register Partners"
|
||||
msgstr ""
|
||||
msgstr "Listar empresas registradas"
|
||||
|
||||
#. module: event
|
||||
#: constraint:product.product:0
|
||||
@@ -623,4 +644,4 @@ msgstr "Error: Código EAN erróneo"
|
||||
#. module: event
|
||||
#: view:event.event:0
|
||||
msgid "Auto Registration Email"
|
||||
msgstr ""
|
||||
msgstr "Correo de registro automático"
|
||||
|
||||
@@ -19,32 +19,6 @@
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
from osv import fields, osv
|
||||
import report_event_registration
|
||||
|
||||
class event_registration_list(osv.osv_memory):
|
||||
""" List Event Registration """
|
||||
_name = "event.registration.list"
|
||||
_description = "List Event Registrations"
|
||||
|
||||
def open_registration(self, cr, uid, ids, context={}):
|
||||
if not context.get('active_id', None):
|
||||
return {
|
||||
'name': 'Event Registrations',
|
||||
'view_type': 'form',
|
||||
'view_mode': 'tree,form',
|
||||
'res_model': 'event.registration',
|
||||
'type': 'ir.actions.act_window'
|
||||
}
|
||||
|
||||
return {
|
||||
'domain': [('section_id', '=', context['active_id'])],
|
||||
'name': 'Event Registrations',
|
||||
'view_type': 'form',
|
||||
'view_mode': 'tree,form',
|
||||
'res_model': 'event.registration',
|
||||
'type': 'ir.actions.act_window'
|
||||
}
|
||||
|
||||
event_registration_list()
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
@@ -0,0 +1,83 @@
|
||||
# -*- 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/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
from osv import fields, osv
|
||||
import tools
|
||||
|
||||
class report_event_registration(osv.osv):
|
||||
|
||||
_name = "report.event.registration"
|
||||
_description = "Events on registrations and Events on type"
|
||||
_auto = False
|
||||
_rec_name = 'date'
|
||||
_columns = {
|
||||
'date': fields.date('Date', readonly=True),
|
||||
'year': fields.char('Year', size=4, readonly=True),
|
||||
'month':fields.selection([('01','January'), ('02','February'), ('03','March'), ('04','April'),
|
||||
('05','May'), ('06','June'), ('07','July'), ('08','August'), ('09','September'),
|
||||
('10','October'), ('11','November'), ('12','December')], 'Month',readonly=True),
|
||||
'day': fields.char('Day', size=128, readonly=True),
|
||||
'event_id': fields.many2one('event.event', 'Event Related', required=True),
|
||||
'draft_state': fields.integer(' # No of draft Registration.', size=20),
|
||||
'confirm_state': fields.integer(' # No of Confirm Registration', size=20),
|
||||
'register_max': fields.integer('Maximum Registrations'),
|
||||
'nbevent': fields.integer('Number Of Events'),
|
||||
'type': fields.many2one('event.type', 'Event Type'),
|
||||
'state': fields.selection([('draft', 'Draft'), ('confirm', 'Confirmed'), ('done', 'Done'), ('cancel', 'Cancelled')], 'State', readonly=True, required=True),
|
||||
'user_id':fields.many2one('res.users', 'Responsible', readonly=True),
|
||||
}
|
||||
_order = 'date desc'
|
||||
def init(self, cr):
|
||||
"""
|
||||
initialize the sql view for the event registration
|
||||
cr -- the cursor
|
||||
"""
|
||||
cr.execute("""
|
||||
create or replace view report_event_registration as (
|
||||
select
|
||||
e.id as id,
|
||||
c.event_id as event_id,
|
||||
e.date_begin as date,
|
||||
e.user_id as user_id,
|
||||
to_char(e.date_begin, 'YYYY') as year,
|
||||
to_char(e.date_begin, 'MM') as month,
|
||||
to_char(e.date_begin, 'YYYY-MM-DD') as day,
|
||||
count(t.id) as nbevent,
|
||||
t.id as type,
|
||||
(SELECT sum(c.nb_register) FROM event_registration c WHERE c.event_id=e.id and t.id=e.type and state in ('draft')) as draft_state,
|
||||
(SELECT sum(c.nb_register) FROM event_registration c WHERE c.event_id=e.id and t.id=e.type and state in ('open')) as confirm_state,
|
||||
e.register_max as register_max,
|
||||
e.state as state
|
||||
from
|
||||
event_event e
|
||||
inner join
|
||||
event_registration c on (e.id=c.event_id)
|
||||
inner join
|
||||
event_type t on (e.type=t.id)
|
||||
group by
|
||||
to_char(e.date_begin, 'YYYY'),
|
||||
to_char(e.date_begin, 'MM'),
|
||||
t.id, e.id, e.date_begin,
|
||||
e.register_max, e.type, e.state, c.event_id, e.user_id,
|
||||
to_char(e.date_begin, 'YYYY-MM-DD')
|
||||
)""")
|
||||
|
||||
report_event_registration()
|
||||
@@ -0,0 +1,129 @@
|
||||
<?xml version="1.0"?>
|
||||
<openerp>
|
||||
<data>
|
||||
<!-- report , event on registration... start -->
|
||||
<record model="ir.ui.view" id="report_event_registration_tree">
|
||||
<field name="name">report.event.registration.tree</field>
|
||||
<field name="model">report.event.registration</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Event on Registration">
|
||||
<field name="date" invisible="1"/>
|
||||
<field name="user_id" invisible="1"/>
|
||||
<field name="year" invisible="1"/>
|
||||
<field name="day" invisible="1"/>
|
||||
<field name="month" invisible="1"/>
|
||||
<field name="event_id" invisible="1"/>
|
||||
<field name="state" invisible="1"/>
|
||||
<field name="type" invisible="1"/>
|
||||
<field name="nbevent"/>
|
||||
<field name="draft_state"/>
|
||||
<field name="confirm_state"/>
|
||||
<field name="register_max"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model ="ir.ui.view" id="report_event_registration_graph">
|
||||
<field name="name">report.event.registration.graph</field>
|
||||
<field name="model">report.event.registration</field>
|
||||
<field name="type">graph</field>
|
||||
<field name="arch" type="xml">
|
||||
<graph orientation="horizontal" string="Event on Registration" type="bar" >
|
||||
<field name="event_id"/>
|
||||
<field name="draft_state" operator="+"/>
|
||||
<field name="confirm_state" operator="+"/>
|
||||
<field name="register_max" operator="+"/>
|
||||
</graph>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Event on Registration search view -->
|
||||
|
||||
<record model="ir.ui.view" id="view_report_event_registration_search">
|
||||
<field name="name">.search</field>
|
||||
<field name="model">report.event.registration</field>
|
||||
<field name="type">search</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Event on Registration">
|
||||
<group col="8" colspan="4">
|
||||
<filter icon="terp-go-year" string="Last 365 Days"
|
||||
domain="[('date','<=', time.strftime('%%Y-%%m-%%d')),('date','>',(datetime.date.today()-datetime.timedelta(days=365)).strftime('%%Y-%%m-%%d'))]"
|
||||
help="Tasks performed in last 365 days"/>
|
||||
<filter icon="terp-go-month" string="Last 30 Days"
|
||||
name="month"
|
||||
domain="[('date','<=', time.strftime('%%Y-%%m-%%d')), ('date','>',(datetime.date.today()-datetime.timedelta(days=30)).strftime('%%Y-%%m-%%d'))]"
|
||||
help="Tasks performed in last 30 days"/>
|
||||
<filter icon="terp-go-week"
|
||||
string="Last 7 Days"
|
||||
separator="1"
|
||||
domain="[('date','<=', time.strftime('%%Y-%%m-%%d')), ('date','>',(datetime.date.today()-datetime.timedelta(days=7)).strftime('%%Y-%%m-%%d'))]"
|
||||
help="Tasks during last 7 days"/>
|
||||
|
||||
<separator orientation="vertical"/>
|
||||
<filter icon="terp-document-new"
|
||||
string="Draft"
|
||||
domain="[('state','=','draft')]"/>
|
||||
<filter icon="terp-camera_test"
|
||||
string="Confirm"
|
||||
domain="[('state', '=', 'confirm')]"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="event_id" widget="selection"/>
|
||||
<field name="type" widget="selection"/>
|
||||
<field name="user_id" widget="selection">
|
||||
<filter icon="terp-personal"
|
||||
string="My Events"
|
||||
help="My Events"
|
||||
domain="[('user_id','=',uid)]"/>
|
||||
</field>
|
||||
<field name="date"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Group By..." colspan="4" col="12">
|
||||
<filter string="Event" name="event" icon="terp-crm" context="{'group_by':'event_id'}"/>
|
||||
<filter string="Event Type" icon="terp-crm" context="{'group_by':'type'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="state" icon="terp-stock_effects-object-colorize" context="{'group_by':'state'}"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Responsible" name="user" icon="terp-personal" context="{'group_by': 'user_id'}"/>
|
||||
<separator orientation="vertical" />
|
||||
<filter string="Day" icon="terp-go-month"
|
||||
domain="[]" context="{'group_by':'day'}"/>
|
||||
<filter string="Month" icon="terp-go-month"
|
||||
domain="[]" context="{'group_by':'month'}"/>
|
||||
<filter string="Year" icon="terp-go-year"
|
||||
domain="[]" context="{'group_by':'year'}"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.actions.act_window" id="action_report_event_registration">
|
||||
<field name="name">Events On Registrations</field>
|
||||
<field name="res_model">report.event.registration</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,graph</field>
|
||||
<field name="search_view_id" ref="view_report_event_registration_search"/>
|
||||
<field name="context">{"search_default_user":1,"search_default_month":1,'group_by_no_leaf':1,'group_by':[]}</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.actions.act_window.view" id="action_report_event_registration_tree">
|
||||
<field name="sequence" eval="1"/>
|
||||
<field name="view_mode">tree</field>
|
||||
<field name="view_id" ref="report_event_registration_tree"/>
|
||||
<field name="act_window_id" ref="action_report_event_registration"/>
|
||||
</record>
|
||||
|
||||
<record model="ir.actions.act_window.view" id="action_report_event_registration_graph">
|
||||
<field name="sequence" eval="2"/>
|
||||
<field name="view_mode">graph</field>
|
||||
<field name="view_id" ref="report_event_registration_graph"/>
|
||||
<field name="act_window_id" ref="action_report_event_registration"/>
|
||||
</record>
|
||||
|
||||
<!--<menuitem parent="menu_report_event" action="action_event_registration" id="menu_report_event_registration"/>-->
|
||||
<menuitem parent="menu_report_event" action="action_report_event_registration" id="menu_report_event_registration" />
|
||||
|
||||
<!-- end... -->
|
||||
</data>
|
||||
</openerp>
|
||||
@@ -1,13 +1,24 @@
|
||||
<?xml version="1.0"?>
|
||||
<openerp>
|
||||
<data>
|
||||
<record id="menu_event_config" model="ir.ui.menu">
|
||||
<field name="groups_id" eval="[(6,0,[ref('crm.group_crm_manager'), ref('base.group_extended')])]"/>
|
||||
</record>
|
||||
<data noupdate="0">
|
||||
|
||||
|
||||
<record id="group_event_manager" model="res.groups">
|
||||
<field name="name">EVENT / Manager</field>
|
||||
</record>
|
||||
|
||||
<record id="group_event_subscriber" model="res.groups">
|
||||
<field name="name">EVENT / Subscriber</field>
|
||||
</record>
|
||||
|
||||
<!-- <record id="menu_event_config" model="ir.ui.menu">-->
|
||||
<!-- <field name="groups_id" eval="[(6,0,[ref('crm.group_crm_manager'), ref('base.group_extended')])]"/>-->
|
||||
<!-- </record>-->
|
||||
<!---->
|
||||
<!-- <record id="menu_report_event" model="ir.ui.menu">-->
|
||||
<!-- <field name="groups_id" eval="[(6,0,[ref('crm.group_crm_manager'), ref('base.group_extended')])]"/>-->
|
||||
<!-- </record>-->
|
||||
|
||||
<record id="menu_report_event" model="ir.ui.menu">
|
||||
<field name="groups_id" eval="[(6,0,[ref('crm.group_crm_manager'), ref('base.group_extended')])]"/>
|
||||
</record>
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
|
||||
@@ -1,12 +1,6 @@
|
||||
"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
|
||||
"access_event_type","event.type","model_event_type","crm.group_crm_user",1,0,0,0
|
||||
"access_event_type_manager","event.type manager","model_event_type","crm.group_crm_manager",1,1,1,1
|
||||
"access_event_event","event.event","model_event_event","crm.group_crm_user",1,1,1,1
|
||||
"access_event_registration","event.registration","model_event_registration","crm.group_crm_user",1,1,1,1
|
||||
"access_report_event_registration","report.event.registration","model_report_event_registration","crm.group_crm_user",1,0,0,0
|
||||
"access_report_event_type_registration","report.event.type.registration","model_report_event_type_registration","crm.group_crm_user",1,0,0,0
|
||||
"access_event_confirm_registration","event.confirm.registration","model_event_confirm_registration","crm.group_crm_user",1,0,0,0
|
||||
"access_event_confirm_registration_manager","event.confirm.registration manager","model_event_confirm_registration","crm.group_crm_manager",1,1,1,1
|
||||
"access_event_make_invoice","event.make.invoice","model_event_make_invoice","crm.group_crm_user",1,1,1,1
|
||||
"access_event_partners_list","event.partners.list","model_event_partners_list","crm.group_crm_user",1,0,0,0
|
||||
"access_event_registration_list","event.registration.list","model_event_registration_list","crm.group_crm_user",1,0,0,0
|
||||
"access_event_type","event.type","model_event_type","event.group_event_subscriber",1,0,0,0
|
||||
"access_event_type_manager","event.type manager","model_event_type","event.group_event_manager",1,1,1,1
|
||||
"access_event_event","event.event","model_event_event","event.group_event_subscriber",1,1,1,1
|
||||
"access_event_registration","event.registration","model_event_registration","event.group_event_subscriber",1,1,1,1
|
||||
"access_report_event_registration","report.event.registration","model_report_event_registration","event.group_event_subscriber",1,0,0,0
|
||||
|
||||
|
@@ -0,0 +1,227 @@
|
||||
- |
|
||||
In order to test the 'event' module in OpenERP, we create a new event.
|
||||
|
||||
- |
|
||||
Given that I have product "Ticket for Concert".
|
||||
-
|
||||
!record {model: product.product, id: product_product_ticketforconcert0}:
|
||||
categ_id: product.cat1
|
||||
cost_method: standard
|
||||
list_price: 68.0
|
||||
mes_type: fixed
|
||||
name: Ticket for Concert
|
||||
procure_method: make_to_stock
|
||||
standard_price: 15.0
|
||||
supply_method: buy
|
||||
type: product
|
||||
uom_id: product.product_uom_unit
|
||||
uom_po_id: product.product_uom_unit
|
||||
volume: 0.0
|
||||
warranty: 0.0
|
||||
weight: 0.0
|
||||
weight_net: 0.0
|
||||
|
||||
- |
|
||||
Given that I have also Event type "Conference".
|
||||
-
|
||||
!record {model: event.type, id: event_type_conference0}:
|
||||
name: Conference
|
||||
- |
|
||||
I create partner "Mark Johnson" and and I provide an address to this
|
||||
new customer, as well as an email "info@mycustomer.com".
|
||||
-
|
||||
!record {model: res.partner, id: res_partner_markjohnson0}:
|
||||
address:
|
||||
- city: Bruxelles
|
||||
country_id: base.be
|
||||
job_ids:
|
||||
- contact_id: base_contact.res_partner_contact_jacot0
|
||||
function: CTO
|
||||
name: base.res_partner_maxtor
|
||||
sequence_partner: 0.0
|
||||
state: current
|
||||
street: Rue des Palais 51, bte 33
|
||||
type: default
|
||||
zip: '1000'
|
||||
email: 'info@mycustomer.com'
|
||||
credit_limit: 0.0
|
||||
lang: en_US
|
||||
name: Mark Johnson
|
||||
property_account_payable: account.a_pay
|
||||
property_account_receivable: account.a_recv
|
||||
|
||||
- |
|
||||
we create it with a "Conference on OpenERP Offshore Business" event and provide "Beginning date", "Ending Date", "Product" as Concert Ticket.
|
||||
-
|
||||
!record {model: event.event, id: event_event_conference0}:
|
||||
code: C/004
|
||||
date_begin: '2010-06-07 13:39:00'
|
||||
date_end: '2010-06-10 13:39:00'
|
||||
name: Conference on OpenERP Offshore Business.
|
||||
product_id: 'product_product_ticketforconcert0'
|
||||
register_max: 0.0
|
||||
register_min: 0.0
|
||||
state: draft
|
||||
type: 'event_type_conference0'
|
||||
|
||||
- |
|
||||
we set the limit of registrations to this event using "Minimum Registrations" 2 and "Maximum Registrations" 10
|
||||
-
|
||||
!python {model: event.event}: |
|
||||
self.write(cr, uid, [ref('event_event_conference0')], {'register_max': 10, 'register_min': 2})
|
||||
|
||||
- |
|
||||
We Check that the event is in "Draft" state.
|
||||
-
|
||||
!assert {model: event.event, id: event_event_conference0}:
|
||||
- state == 'draft'
|
||||
|
||||
- |
|
||||
Then we confirm it press on "Confirm Event" button.
|
||||
-
|
||||
!python {model: event.event}: |
|
||||
self.button_confirm(cr, uid, [ref("event_event_conference0")], {"active_ids": [ref("event.menu_event_event")]})
|
||||
|
||||
- |
|
||||
Check that Event is "confirmed" or not.
|
||||
-
|
||||
!assert {model: event.event, id: event_event_conference0}:
|
||||
- state == 'confirm'
|
||||
|
||||
- |
|
||||
person "Mark Johnson" want to confirm their registrations. for that
|
||||
I create New Registration for "Conference on OpenERP Offshore Business.
|
||||
-
|
||||
!record {model: event.registration, id: event_registration_registrationjacot0}:
|
||||
badge_name: Jacot
|
||||
badge_partner: Mark Johnson
|
||||
badge_title: M.
|
||||
contact_id: base_contact.res_partner_contact_jacot0
|
||||
date_deadline: '2010-06-07 13:39:00'
|
||||
event_id: event.event_event_conference0
|
||||
event_product: Ticket for Concert
|
||||
name: 'Registration: Jacot'
|
||||
partner_id: 'res_partner_markjohnson0'
|
||||
partner_invoice_id: 'res_partner_markjohnson0'
|
||||
unit_price: 68.0
|
||||
- |
|
||||
I check that "Number of registration" is less than "Maximum registration" defined in "Conference on OpenERP Offshore Business" event.
|
||||
if not then confirmation will fail because its greater then the Maximum registration.
|
||||
-
|
||||
!python {model: event.event}: |
|
||||
obj_register = self.pool.get('event.registration')
|
||||
event_id1 = self.browse(cr, uid, [ref('event_event_conference0')])[0]
|
||||
register_ids = obj_register.search(cr, uid, [('event_id', '=', event_id1.id)])
|
||||
register_id = obj_register.browse(cr, uid, register_ids)[0]
|
||||
assert register_id.nb_register <= event_id1.register_max
|
||||
|
||||
- |
|
||||
And Confirm that Registration by click on "Confirm Registration" button of Registraion form.
|
||||
-
|
||||
!python {model: event.registration}: |
|
||||
self.check_confirm(cr, uid, [ref("event_registration_registrationjacot0")], {"active_ids": [ref("event.menu_action_registration")]})
|
||||
|
||||
- |
|
||||
one other Person "Zen" also want to confirm their Registraions. so
|
||||
They create New registraion for This event.
|
||||
-
|
||||
!record {model: event.registration, id: event_registration_registrationzen0}:
|
||||
badge_name: Zen
|
||||
badge_partner: China Export
|
||||
contact_id: base_contact.res_partner_contact_zen0
|
||||
date_deadline: '2010-06-07 13:39:00'
|
||||
event_id: event.event_event_conference0
|
||||
event_product: Ticket for Concert
|
||||
name: 'Registration: Zen'
|
||||
partner_id: base.res_partner_3
|
||||
partner_invoice_id: base.res_partner_3
|
||||
unit_price: 68.0
|
||||
|
||||
- |
|
||||
And Confirm that Registration by click on "Confirm Registration" button of Registraion form.
|
||||
-
|
||||
!python {model: event.registration}: |
|
||||
self.check_confirm(cr, uid, [ref("event_registration_registrationzen0")], {"active_ids": [ref("event.menu_action_registration")]})
|
||||
|
||||
- |
|
||||
Third person create New Registration for "Conference on OpenERP Offshore Business" event.
|
||||
-
|
||||
!record {model: event.registration, id: event_registration_registrationpassot0}:
|
||||
badge_name: Passot
|
||||
badge_partner: Mediapole SPRL
|
||||
badge_title: M.
|
||||
contact_id: base_contact.res_partner_contact_passot0
|
||||
date_deadline: '2010-06-07 13:39:00'
|
||||
email_from: info@mediapole.net
|
||||
event_id: 'event_event_conference0'
|
||||
event_product: Ticket for Concert
|
||||
name: 'Registration: Passot'
|
||||
partner_id: base.res_partner_8
|
||||
partner_invoice_id: base.res_partner_8
|
||||
unit_price: 68.0
|
||||
- |
|
||||
This person cannot Confirm their registration.so I check that state is "Unconfirmed".
|
||||
-
|
||||
!assert {model: event.registration, id: event_registration_registrationpassot0}:
|
||||
- state == 'draft'
|
||||
|
||||
- |
|
||||
I Check that the total number of confirmed is 2 and unconfirmed registrations 1.
|
||||
-
|
||||
!python {model: event.event}: |
|
||||
obj_event = self.browse(cr, uid, [ref('event_event_conference0')])[0]
|
||||
assert obj_event.register_current == '2'
|
||||
assert obj_event.register_prospect == '1'
|
||||
|
||||
- |
|
||||
We check all registered partners to this event using the wizard "List Register Partners".
|
||||
-
|
||||
!record {model: event.partners.list, id: event_partners_list_0}:
|
||||
{}
|
||||
-
|
||||
I click on "Open Partners" button of "List Register Partners" wizard.
|
||||
-
|
||||
!python {model: event.partners.list}: |
|
||||
self.list_partners(cr, uid, [ref("event_partners_list_0")], {"active_ids":
|
||||
[ref("event.event_event_conference0")]})
|
||||
|
||||
- |
|
||||
This event is finished by click on "Event Done" button of this event form.
|
||||
-
|
||||
!python {model: event.event}: |
|
||||
self.button_done(cr, uid, [ref("event.event_event_conference0")], {"active_ids": [ref("event.menu_event_event")] })
|
||||
- |
|
||||
We can create invoice if the registration is in "Open" state otherwise it gives the warning to the user.
|
||||
so I check that Registration is in "Open" state before click on "Make Invoices."
|
||||
-
|
||||
!assert {model: event.registration, id: event_registration_registrationjacot0}:
|
||||
- state == 'open'
|
||||
- |
|
||||
Now, I will invoice the participant who have address using "Make Invoices". This wizard will also give the number of invoices are created and rejected.
|
||||
Create invoice will be linked to Invoice Field available on Payments tab of registrations
|
||||
|
||||
-
|
||||
!record {model: event.make.invoice, id: event_make_invoice_0}:
|
||||
{}
|
||||
- |
|
||||
I click on "Done" button of this "Make Invoices" wizard.
|
||||
-
|
||||
!python {model: event.make.invoice}: |
|
||||
self.make_invoice(cr, uid, [ref("event_make_invoice_0")], {"active_ids": [ref("event_registration_registrationzen0")]})
|
||||
- |
|
||||
I check that Invoice for this partner is create or not.
|
||||
-
|
||||
!python {model: event.registration}: |
|
||||
obj_event_reg = self.pool.get('event.registration')
|
||||
obj_lines = self.pool.get('account.invoice.line')
|
||||
inv_obj = self.pool.get('account.invoice')
|
||||
data_event_reg = obj_event_reg.browse(cr, uid, [ref('event_registration_registrationzen0')], context=context)[0]
|
||||
invoice_ids = inv_obj.search(cr, uid, [('partner_id', '=', data_event_reg.partner_invoice_id.id)])
|
||||
|
||||
if invoice_ids:
|
||||
invoice_id = inv_obj.browse(cr, uid, invoice_ids)[0]
|
||||
line_ids = obj_lines.search(cr, uid, [('product_id', '=', data_event_reg.event_id.product_id.id), ('invoice_id', '=', invoice_id.id), ('price_unit', '=', data_event_reg.unit_price)])
|
||||
line_id = obj_lines.browse(cr, uid, line_ids)[0]
|
||||
assert line_id.product_id == data_event_reg.event_id.product_id
|
||||
assert data_event_reg.partner_id == invoice_id.partner_id
|
||||
assert invoice_id.address_invoice_id == data_event_reg.partner_address_id
|
||||
@@ -19,8 +19,6 @@
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
import event_registration
|
||||
import event_make_invoice
|
||||
import event_registrations_partner
|
||||
import event_confirm_registration
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
@@ -20,7 +20,8 @@
|
||||
##############################################################################
|
||||
|
||||
from osv import fields, osv
|
||||
|
||||
from tools.translate import _
|
||||
|
||||
class event_confirm_registration(osv.osv_memory):
|
||||
"""
|
||||
Confirm Event Registration
|
||||
@@ -29,19 +30,40 @@ class event_confirm_registration(osv.osv_memory):
|
||||
_description = "Event Registraion"
|
||||
|
||||
_columns = {
|
||||
'msg': fields.text('Message', readonly=True),
|
||||
}
|
||||
_defaults={
|
||||
'msg':lambda *a:'The event limit is reached. What do you want to do?'
|
||||
}
|
||||
'msg': fields.text('Message', readonly=True),
|
||||
}
|
||||
_defaults = {
|
||||
'msg': 'The event limit is reached. What do you want to do?'
|
||||
}
|
||||
|
||||
def default_get(self, cr, uid, fields, context=None):
|
||||
"""
|
||||
This function gets default values
|
||||
"""
|
||||
registration_pool = self.pool.get('event.registration')
|
||||
registration_ids = context.get('registration_ids', [])
|
||||
res = super(event_confirm_registration, self).default_get(cr, uid, fields, context=context)
|
||||
msg = ""
|
||||
overlimit_event_ids = []
|
||||
for registration in registration_pool.browse(cr, uid, registration_ids, context=context):
|
||||
total_confirmed = registration.event_id.register_current
|
||||
register_max = registration.event_id.register_max
|
||||
if registration.event_id.id not in overlimit_event_ids:
|
||||
overlimit_event_ids.append(registration.event_id.id)
|
||||
msg += _("The Event '%s' is reached Maximum Limit(%s). It has %s Confirmed registration\n") \
|
||||
%(registration.event_id.name, register_max, total_confirmed)
|
||||
if 'msg' in fields:
|
||||
res.update({'msg': msg})
|
||||
|
||||
return res
|
||||
|
||||
def confirm(self, cr, uid, ids, context):
|
||||
registration_obj = self.pool.get('event.registration')
|
||||
reg_id = context.get('reg_id', False) or context.get('active_id', False)
|
||||
if reg_id:
|
||||
registration_obj.write(cr, uid, [reg_id], {'state':'open', })
|
||||
registration_obj._history(cr, uid, [reg_id], 'Open', history=True)
|
||||
registration_obj.mail_user(cr, uid, [reg_id])
|
||||
registration_pool = self.pool.get('event.registration')
|
||||
registration_ids = context.get('registration_ids', [])
|
||||
for reg_id in registration_ids:
|
||||
registration_pool.write(cr, uid, [reg_id], {'state':'open', })
|
||||
registration_pool._history(cr, uid, [reg_id], _('Open'))
|
||||
registration_pool.mail_user(cr, uid, [reg_id])
|
||||
return {}
|
||||
|
||||
event_confirm_registration()
|
||||
|
||||
@@ -2,32 +2,32 @@
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<record id="view_event_confirm_registration" model="ir.ui.view">
|
||||
<record id="view_event_confirm_registration" model="ir.ui.view">
|
||||
<field name="name">Registration Confirmation</field>
|
||||
<field name="model">event.confirm.registration</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Registration Confirmation">
|
||||
<field name="msg"/>
|
||||
<separator string="" colspan="4"/>
|
||||
<group colspan="4" col="6">
|
||||
<button icon="gtk-cancel" special="cancel" string="_Cancel"/>
|
||||
<button icon="gtk-ok" name="confirm" string="Confirm Anyway" type="object"/>
|
||||
</group>
|
||||
</form>
|
||||
<field name="msg" nolabel="1" colspan="4"/>
|
||||
<separator string="" colspan="4"/>
|
||||
<group colspan="4" col="6">
|
||||
<button icon="gtk-close" special="cancel" string="Close"/>
|
||||
<button icon="gtk-ok" name="confirm" string="Confirm Anyway" type="object"/>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
</record>
|
||||
|
||||
<record id="action_event_confirm_registration" model="ir.actions.act_window">
|
||||
<record id="action_event_confirm_registration" model="ir.actions.act_window">
|
||||
<field name="name">Registrations</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">event.confirm.registration</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="view_id" ref="view_event_confirm_registration"/>
|
||||
<field name="context">{'record_id' : active_id}</field>
|
||||
<field name="context">{'record_id' : active_id}</field>
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
</openerp>
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
#
|
||||
##############################################################################
|
||||
from osv import fields, osv
|
||||
from tools.translate import _
|
||||
|
||||
class event_make_invoice(osv.osv_memory):
|
||||
"""
|
||||
@@ -27,109 +28,71 @@ class event_make_invoice(osv.osv_memory):
|
||||
_name = "event.make.invoice"
|
||||
_description = "Event Make Invoice"
|
||||
_columns = {
|
||||
'inv_created': fields.char('Invoice Created', size=32, readonly=True),
|
||||
'inv_rejected': fields.char('Invoice Rejected', size=32, readonly=True),
|
||||
'inv_rej_reason': fields.text('Error Messages', readonly=True),
|
||||
# 'invoice_ids': fields.char('Invoice Ids', size=128), # Improve me
|
||||
}
|
||||
|
||||
def _makeInvoices(self, cr, uid, context={}):
|
||||
invoices = {}
|
||||
invoice_ids = []
|
||||
create_ids=[]
|
||||
tax_ids=[]
|
||||
inv_create = 0
|
||||
inv_reject = 0
|
||||
inv_rej_reason = ""
|
||||
list_inv = []
|
||||
obj_event_reg = self.pool.get('event.registration')
|
||||
obj_lines = self.pool.get('account.invoice.line')
|
||||
inv_obj = self.pool.get('account.invoice')
|
||||
data_event_reg = obj_event_reg.browse(cr,uid, context['active_ids'], context=context)
|
||||
|
||||
for reg in data_event_reg:
|
||||
if reg.state=='draft':
|
||||
inv_reject = inv_reject + 1
|
||||
inv_rej_reason += "ID "+str(reg.id)+": Invoice cannot be created if the registration is in draft state. \n"
|
||||
continue
|
||||
if (not reg.tobe_invoiced):
|
||||
inv_reject = inv_reject + 1
|
||||
inv_rej_reason += "ID "+str(reg.id)+": Registration is set as 'Cannot be invoiced'. \n"
|
||||
continue
|
||||
if reg.invoice_id:
|
||||
inv_reject = inv_reject + 1
|
||||
inv_rej_reason += "ID "+str(reg.id)+": Registration already has an invoice linked. \n"
|
||||
continue
|
||||
if not reg.event_id.product_id:
|
||||
inv_reject = inv_reject + 1
|
||||
inv_rej_reason += "ID "+str(reg.id)+": Event related doesn't have any product defined. \n"
|
||||
continue
|
||||
if not reg.partner_invoice_id:
|
||||
inv_reject = inv_reject + 1
|
||||
inv_rej_reason += "ID "+str(reg.id)+": Registration doesn't have any partner to invoice. \n"
|
||||
continue
|
||||
else:
|
||||
val_invoice = inv_obj.onchange_partner_id(cr, uid, [], 'out_invoice', reg.partner_invoice_id.id, False, False)
|
||||
val_invoice['value'].update({'partner_id': reg.partner_invoice_id.id})
|
||||
partner_address_id = val_invoice['value']['address_invoice_id']
|
||||
|
||||
if not partner_address_id:
|
||||
inv_reject = inv_reject + 1
|
||||
inv_rej_reason += "ID "+str(reg.id)+": Registered partner doesn't have an address to make the invoice. \n"
|
||||
continue
|
||||
'grouped': fields.boolean('Group the invoices'),
|
||||
'invoice_date':fields.date('Invoice Date'),
|
||||
# 'invoice_ids': fields.char('Invoice Ids', size=128), # Improve me
|
||||
}
|
||||
|
||||
inv_create = inv_create + 1
|
||||
value = obj_lines.product_id_change(cr, uid, [], reg.event_id.product_id.id,uom =False, partner_id=reg.partner_invoice_id.id, fposition_id=reg.partner_invoice_id.property_account_position.id)
|
||||
data_product = self.pool.get('product.product').browse(cr,uid,[reg.event_id.product_id.id])
|
||||
for tax in data_product[0].taxes_id:
|
||||
tax_ids.append(tax.id)
|
||||
def view_init(self, cr, uid, fields, context=None):
|
||||
"""
|
||||
This function checks for precondition before wizard executes
|
||||
@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 fields: List of fields for default value
|
||||
@param context: A standard dictionary for contextual values
|
||||
"""
|
||||
obj_event_reg = self.pool.get('event.registration')
|
||||
data = context and context.get('active_ids', [])
|
||||
|
||||
for event_reg in obj_event_reg.browse(cr, uid, data, context=context):
|
||||
if event_reg.state == 'draft':
|
||||
raise osv.except_osv(_('Warning !'),
|
||||
_("Invoice cannot be created if the registration is in draft state."))
|
||||
if event_reg.state == 'done':
|
||||
raise osv.except_osv(_('Warning !'),
|
||||
_("Invoice cannot be created if the registration is in done state."))
|
||||
|
||||
if (not event_reg.tobe_invoiced):
|
||||
raise osv.except_osv(_('Warning !'),
|
||||
_("Registration is set as Cannot be invoiced"))
|
||||
|
||||
vals = value['value']
|
||||
c_name = reg.contact_id and ('-' + self.pool.get('res.partner.contact').name_get(cr, uid, [reg.contact_id.id])[0][1]) or ''
|
||||
vals.update({
|
||||
'name': reg.invoice_label + '-' + c_name,
|
||||
'price_unit': reg.unit_price,
|
||||
'quantity': reg.nb_register,
|
||||
'product_id':reg.event_id.product_id.id,
|
||||
'invoice_line_tax_id': [(6, 0, tax_ids)],
|
||||
})
|
||||
inv_line_ids = obj_event_reg._create_invoice_lines(cr, uid, [reg.id], vals)
|
||||
|
||||
val_invoice['value'].update({
|
||||
'origin': reg.invoice_label,
|
||||
'reference': False,
|
||||
'invoice_line': [(6,0,[inv_line_ids])],
|
||||
'comment': "",
|
||||
})
|
||||
|
||||
inv_id = inv_obj.create(cr, uid, val_invoice['value'])
|
||||
list_inv.append(inv_id)
|
||||
obj_event_reg.write(cr, uid, reg.id, {'invoice_id': inv_id, 'state': 'done'})
|
||||
obj_event_reg._history(cr, uid, [reg.id], 'Invoiced', history=True)
|
||||
|
||||
# {'inv_created' : str(inv_create) , 'inv_rejected' : str(inv_reject), 'invoice_ids': str(list_inv), 'inv_rej_reason': inv_rej_reason}
|
||||
return {'inv_created' : str(inv_create) , 'inv_rejected' : str(inv_reject), 'inv_rej_reason': inv_rej_reason}
|
||||
if not event_reg.event_id.product_id:
|
||||
raise osv.except_osv(_('Warning !'),
|
||||
_("Event related doesn't have any product defined"))
|
||||
if not event_reg.partner_invoice_id:
|
||||
raise osv.except_osv(_('Warning !'),
|
||||
_("Registration doesn't have any partner to invoice."))
|
||||
|
||||
def default_get(self, cr, uid, fields_list, context=None):
|
||||
res = super(event_make_invoice, self).default_get(cr, uid, fields_list, context)
|
||||
res.update(self._makeInvoices(cr, uid, context=context))
|
||||
return res
|
||||
|
||||
def confirm(self, cr, uid, ids, context={}):
|
||||
obj_model = self.pool.get('ir.model.data')
|
||||
data_inv = self.read(cr, uid, ids, [], context)[0]
|
||||
model_data_ids = obj_model.search(cr,uid,[('model','=','ir.ui.view'),('name','=','invoice_form')])
|
||||
resource_id = obj_model.read(cr,uid,model_data_ids,fields=['res_id'])[0]['res_id']
|
||||
def make_invoice(self, cr, uid, ids, context={}):
|
||||
|
||||
reg_obj = self.pool.get('event.registration')
|
||||
newinv = []
|
||||
|
||||
for data in self.browse(cr, uid, ids):
|
||||
res = reg_obj.action_invoice_create(cr, uid, context.get(('active_ids'),[]), data.grouped, date_inv = data.invoice_date)
|
||||
|
||||
mod_obj =self.pool.get('ir.model.data')
|
||||
result = mod_obj._get_id(cr, uid, 'account', 'view_account_invoice_filter')
|
||||
|
||||
id = mod_obj.read(cr, uid, result, ['res_id'])
|
||||
|
||||
return {
|
||||
# 'domain': "[('id','in', ["+','.join(map(str,data_inv['invoice_ids']))+"])]",
|
||||
'domain': "[('id','=',%s)]" % res,
|
||||
'name': 'Invoices',
|
||||
'view_type': 'form',
|
||||
'view_mode': 'tree,form',
|
||||
'res_model': 'account.invoice',
|
||||
'views': [(False,'tree'),(resource_id,'form')],
|
||||
'context': "{'type':'out_invoice'}",
|
||||
'type': 'ir.actions.act_window'
|
||||
'view_id': False,
|
||||
'context': "{'type':'out_refund'}",
|
||||
'type': 'ir.actions.act_window',
|
||||
'search_view_id': id['id']
|
||||
}
|
||||
|
||||
|
||||
event_make_invoice()
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
@@ -7,15 +7,17 @@
|
||||
<field name="model">event.make.invoice</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Make Invoices">
|
||||
<field name="inv_created" />
|
||||
<field name="inv_rejected" />
|
||||
<field name="inv_rej_reason" colspan="4"/>
|
||||
<group colspan="4" col="6">
|
||||
<button icon="gtk-cancel" special="cancel" string="_Ok"/>
|
||||
<button icon="gtk-ok" name="confirm" string="Open" type="object"/>
|
||||
</group>
|
||||
</form>
|
||||
<form string="Create invoices">
|
||||
<separator colspan="4" string="Do you really want to create the invoices ?" />
|
||||
<field name="grouped" />
|
||||
<field name="invoice_date"/>
|
||||
<group colspan="4">
|
||||
<separator string="" colspan="4" />
|
||||
<label string="" colspan="2"/>
|
||||
<button special="cancel" string="Close" icon="gtk-close"/>
|
||||
<button name="make_invoice" string="Done" type="object" icon="gtk-ok"/>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<record id="view_event_registration" model="ir.ui.view">
|
||||
<field name="name">List Event Registrations</field>
|
||||
<field name="model">event.registration.list</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="">
|
||||
<button special="cancel" string="Cancel" icon="gtk-cancel"/>
|
||||
<button name="open_registration" string="Open Registrations" type="object" icon="gtk-open"/>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_event_registration" model="ir.actions.act_window">
|
||||
<field name="name">Registrations</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">event.registration.list</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="view_id" ref="view_event_registration"/>
|
||||
<field name="context">{'record_id' : active_id}</field>
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.values" id="event_registration_values">
|
||||
<field name="model_id" ref="event.model_event_event" />
|
||||
<field name="object" eval="1" />
|
||||
<field name="name">Event Registrations</field>
|
||||
<field name="key2">client_action_multi</field>
|
||||
<field name="value" eval="'ir.actions.act_window,' + str(ref('action_event_registration'))" />
|
||||
<field name="key">action</field>
|
||||
<field name="model">event.event</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
@@ -1,55 +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/>.
|
||||
#
|
||||
##############################################################################
|
||||
from osv import fields, osv
|
||||
from tools.translate import _
|
||||
|
||||
class event_partners_list(osv.osv_memory):
|
||||
""" Event Partners """
|
||||
_name = "event.partners.list"
|
||||
_description = "List Event Partners"
|
||||
|
||||
def list_partners(self, cr, uid, ids, context={}):
|
||||
obj_reg = self.pool.get('event.registration')
|
||||
mod_obj = self.pool.get('ir.model.data')
|
||||
list_partner = []
|
||||
reg_ids = obj_reg.search(cr, uid, [('event_id','in',context['active_ids'])], context=context)
|
||||
data_reg = obj_reg.browse(cr, uid, reg_ids, context=context)
|
||||
for reg in data_reg:
|
||||
if not reg.partner_id.id in list_partner:
|
||||
list_partner.append(reg.partner_id.id)
|
||||
result = mod_obj._get_id(cr, uid, 'base', 'view_res_partner_filter')
|
||||
id = mod_obj.read(cr, uid, result, ['res_id'], context=context)
|
||||
model_data_ids = mod_obj.search(cr,uid,[('model','=','ir.ui.view'),('name','=','view_partner_form')], context=context)
|
||||
resource_id = mod_obj.read(cr, uid, model_data_ids, fields=['res_id'], context=context)[0]['res_id']
|
||||
return {
|
||||
'domain': "[('id','in', ["+','.join(map(str, list_partner))+"])]",
|
||||
'name': _('Event Partners'),
|
||||
'view_type': 'form',
|
||||
'view_mode': 'tree,form',
|
||||
'res_model': 'res.partner',
|
||||
'views': [(False,'tree'),(resource_id,'form')],
|
||||
'type': 'ir.actions.act_window',
|
||||
'search_view_id': id['res_id']
|
||||
}
|
||||
|
||||
event_partners_list()
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
@@ -1,39 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<record id="view_event_partners" model="ir.ui.view">
|
||||
<field name="name">Event Partners</field>
|
||||
<field name="model">event.partners.list</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Event Partners">
|
||||
<button special="cancel" string="Cancel" icon="gtk-cancel"/>
|
||||
<button name="list_partners" string="Open Partners" type="object" icon="gtk-open"/>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_event_partners" model="ir.actions.act_window">
|
||||
<field name="name">List Register Partners</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">event.partners.list</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="view_id" ref="view_event_partners"/>
|
||||
<field name="context">{'record_id' : active_id}</field>
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.values" id="event_partner_values">
|
||||
<field name="model_id" ref="event.model_event_event" />
|
||||
<field name="object" eval="1" />
|
||||
<field name="name">Event Partners</field>
|
||||
<field name="key2">client_action_multi</field>
|
||||
<field name="value" eval="'ir.actions.act_window,' + str(ref('action_event_partners'))"/>
|
||||
<field name="key">action</field>
|
||||
<field name="model">event.event</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user