[MERGE] merge with trunk addons
bzr revid: qdp-launchpad@tinyerp.com-20100628075055-uldxx5qhzjp2g9rr
This commit is contained in:
@@ -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()
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
</separator>
|
||||
<xpath expr="//label[@string='description']"
|
||||
position="attributes">
|
||||
<attribute name="string">You can enhance OpenERP's basic accounting support with a few additional OpenERP applications.</attribute>
|
||||
<attribute name="string">From this screen, you can configure your accounting system. Choose a Chart of Account matched to your accounting system or the Generic Chart of Account which allows you to configure which suit your needs.</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//button[@string='Install Modules']" position="attributes">
|
||||
<attribute name="string">Configure</attribute>
|
||||
|
||||
@@ -801,15 +801,19 @@ class account_move_line(osv.osv):
|
||||
ids = journal_pool.search(cr, uid, [])
|
||||
journals = journal_pool.browse(cr, uid, ids)
|
||||
all_journal = [None]
|
||||
common_fields = {}
|
||||
total = len(journals)
|
||||
for journal in journals:
|
||||
all_journal.append(journal.id)
|
||||
for field in journal.view_id.columns_id:
|
||||
if not field.field in fields:
|
||||
fields[field.field] = [None, journal.id]
|
||||
fields[field.field] = [journal.id]
|
||||
fld.append((field.field, field.sequence))
|
||||
flds.append(field.field)
|
||||
common_fields[field.field] = 1
|
||||
else:
|
||||
fields.get(field.field).append(journal.id)
|
||||
common_fields[field.field] = common_fields[field.field] + 1
|
||||
|
||||
fld.append(('period_id', 3))
|
||||
fld.append(('journal_id', 10))
|
||||
@@ -831,6 +835,10 @@ class account_move_line(osv.osv):
|
||||
|
||||
for field_it in fld:
|
||||
field = field_it[0]
|
||||
|
||||
if common_fields.get(field) == total:
|
||||
fields.get(field).append(None)
|
||||
|
||||
if field=='state':
|
||||
state = 'colors="red:state==\'draft\'"'
|
||||
|
||||
|
||||
@@ -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
-17
@@ -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"/>-->
|
||||
@@ -1620,8 +1611,6 @@
|
||||
|
||||
<act_window domain="[('journal_id', '=', active_id)]" id="act_account_journal_2_account_move_line" name="Entry lines" res_model="account.move.line" src_model="account.journal"/>
|
||||
|
||||
<act_window domain="[('partner_id', '=', active_id), ('account_id.type', 'in', ['receivable', 'payable']), ('reconcile_id','=',False)]" id="act_account_partner_account_move_unreconciled" name="Unreconciled Receivables & Payables" res_model="account.move.line" src_model="res.partner"/>
|
||||
|
||||
<act_window domain="[('partner_id', '=', active_id), ('account_id.type', 'in', ['receivable', 'payable'])]" id="act_account_partner_account_move_all" name="Receivables & Payables" res_model="account.move.line" src_model="res.partner"/>
|
||||
|
||||
<act_window domain="[('partner_id', '=', active_id)]" id="act_account_partner_account_move" name="All Account Entries" res_model="account.move.line" src_model="res.partner"/>
|
||||
@@ -2039,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>
|
||||
|
||||
@@ -5,16 +5,16 @@
|
||||
Administrator shortcut
|
||||
Demo user startup menu
|
||||
-->
|
||||
<record id="sc_account_dash" model="ir.ui.view_sc">
|
||||
<!-- <record id="sc_account_dash" model="ir.ui.view_sc">
|
||||
<field name="name">Accounting dashboard</field>
|
||||
<field name="user_id" ref="base.user_root"/>
|
||||
<field name="resource">ir.ui.menu</field>
|
||||
<field name="sequence">0</field>
|
||||
<field name="res_id" ref="menu_board_account"/>
|
||||
</record>
|
||||
</record> -->
|
||||
<record id="base.user_root" model="res.users">
|
||||
<field name="action_id" ref="open_board_account"/>
|
||||
</record>
|
||||
|
||||
|
||||
</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>
|
||||
|
||||
@@ -7,14 +7,13 @@ msgstr ""
|
||||
"Project-Id-Version: OpenERP Server 5.0.0\n"
|
||||
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
||||
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
|
||||
"PO-Revision-Date: 2010-06-23 17:24+0000\n"
|
||||
"Last-Translator: Jordi Esteve (www.zikzakmedia.com) "
|
||||
"<jesteve@zikzakmedia.com>\n"
|
||||
"PO-Revision-Date: 2010-06-24 10:03+0000\n"
|
||||
"Last-Translator: Borja López Soilán (Pexego) <borjals@pexego.es>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-06-24 03:47+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-06-26 03:57+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: account
|
||||
@@ -806,7 +805,7 @@ msgstr "Cuenta de la empresa"
|
||||
#. module: account
|
||||
#: wizard_view:account.subscription.generate,init:0
|
||||
msgid "Generate entries before:"
|
||||
msgstr "Generar asientos antes:"
|
||||
msgstr "Generar asientos hasta:"
|
||||
|
||||
#. module: account
|
||||
#: rml:account.analytic.account.cost_ledger:0
|
||||
@@ -3680,7 +3679,7 @@ msgstr ""
|
||||
#: wizard_field:account.invoice.pay,addendum,comment:0
|
||||
#: wizard_field:account.invoice.pay,init,name:0
|
||||
msgid "Entry Name"
|
||||
msgstr "Núm. asiento"
|
||||
msgstr "Descripción"
|
||||
|
||||
#. module: account
|
||||
#: help:account.invoice,account_id:0
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -8,13 +8,13 @@ msgstr ""
|
||||
"Project-Id-Version: openobject-addons\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
|
||||
"PO-Revision-Date: 2010-05-14 17:04+0000\n"
|
||||
"PO-Revision-Date: 2010-06-24 09:57+0000\n"
|
||||
"Last-Translator: Borja López Soilán (Pexego) <borjals@pexego.es>\n"
|
||||
"Language-Team: Galician <gl@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-06-22 04:04+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-06-26 03:57+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: account
|
||||
@@ -2047,7 +2047,7 @@ msgstr ""
|
||||
#. module: account
|
||||
#: field:account.journal,invoice_sequence_id:0
|
||||
msgid "Invoice Sequence"
|
||||
msgstr ""
|
||||
msgstr "Secuencia de factura"
|
||||
|
||||
#. module: account
|
||||
#: wizard_view:account.automatic.reconcile,init:0
|
||||
@@ -3597,7 +3597,7 @@ msgstr ""
|
||||
#: wizard_field:account.invoice.pay,addendum,comment:0
|
||||
#: wizard_field:account.invoice.pay,init,name:0
|
||||
msgid "Entry Name"
|
||||
msgstr ""
|
||||
msgstr "Descripción"
|
||||
|
||||
#. module: account
|
||||
#: help:account.invoice,account_id:0
|
||||
@@ -5064,7 +5064,7 @@ msgstr ""
|
||||
#. module: account
|
||||
#: model:ir.model,name:account.model_fiscalyear_seq
|
||||
msgid "Maintains Invoice sequences with Fiscal Year"
|
||||
msgstr ""
|
||||
msgstr "Mantén secuencias de facturas con exercicio fiscal"
|
||||
|
||||
#. module: account
|
||||
#: selection:account.account.balance.report,checktype,display_account:0
|
||||
|
||||
@@ -13,7 +13,7 @@ msgstr ""
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-06-24 03:47+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-06-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>
|
||||
|
||||
@@ -23,18 +23,19 @@ import xml
|
||||
import copy
|
||||
from operator import itemgetter
|
||||
import datetime
|
||||
from report import report_sxw
|
||||
import xml.dom.minidom
|
||||
import os, time
|
||||
import osv
|
||||
import re
|
||||
import sys
|
||||
|
||||
from report import report_sxw
|
||||
import osv
|
||||
import tools
|
||||
import pooler
|
||||
import sys
|
||||
|
||||
class account_balance(report_sxw.rml_parse):
|
||||
_name = 'report.account.account.balance'
|
||||
def __init__(self, cr, uid, name, context):
|
||||
def __init__(self, cr, uid, name, context=None):
|
||||
super(account_balance, self).__init__(cr, uid, name, context=context)
|
||||
self.sum_debit = 0.00
|
||||
self.sum_credit = 0.00
|
||||
@@ -52,12 +53,13 @@ class account_balance(report_sxw.rml_parse):
|
||||
|
||||
def _add_header(self, node, header=1):
|
||||
if header==0:
|
||||
self.rml_header = ""
|
||||
self.rml_header = ""
|
||||
return True
|
||||
|
||||
def get_fiscalyear(self, form):
|
||||
res=[]
|
||||
if form.has_key('fiscalyear'):
|
||||
fisc_id = form['fiscalyear']
|
||||
if form.has_key('fiscalyear_id'):
|
||||
fisc_id = form['fiscalyear_id']
|
||||
if not (fisc_id):
|
||||
return ''
|
||||
self.cr.execute("select name from account_fiscalyear where id = %s" , (int(fisc_id),))
|
||||
@@ -84,10 +86,9 @@ class account_balance(report_sxw.rml_parse):
|
||||
else:
|
||||
result+=r.name+", "
|
||||
|
||||
return str(result and result[:-1]) or ''
|
||||
return str(result and result[:-1]) or 'ALL'
|
||||
|
||||
|
||||
def lines(self, form, ids={}, done=None, level=1):
|
||||
def lines(self, form, ids=[], done=None, level=1):
|
||||
if not ids:
|
||||
ids = self.ids
|
||||
if not ids:
|
||||
@@ -100,14 +101,27 @@ class account_balance(report_sxw.rml_parse):
|
||||
res={}
|
||||
result_acc=[]
|
||||
ctx = self.context.copy()
|
||||
ctx['state'] = form['context'].get('state','all')
|
||||
ctx['fiscalyear'] = form['fiscalyear']
|
||||
if form['state']=='byperiod' :
|
||||
|
||||
ctx['fiscalyear'] = form['fiscalyear_id']
|
||||
if form['filter'] == 'filter_period':
|
||||
periods = form['periods']
|
||||
if not periods:
|
||||
sql = """
|
||||
Select min(p.date_start) as start_date,max(p.date_stop) as stop_date from account_period as p where p.fiscalyear_id = %s
|
||||
"""
|
||||
sqlargs = (form['fiscalyear'],)
|
||||
else:
|
||||
sql = """
|
||||
Select min(p.date_start) as start_date,max(p.date_stop) as stop_date from account_period as p where p.id in %s
|
||||
"""
|
||||
sqlargs = (tuple(periods),)
|
||||
self.cr.execute(sql, sqlargs)
|
||||
res = self.cr.dictfetchall()
|
||||
ctx['periods'] = form['periods']
|
||||
elif form['state']== 'bydate':
|
||||
elif form['filter'] == 'filter_date':
|
||||
ctx['date_from'] = form['date_from']
|
||||
ctx['date_to'] = form['date_to']
|
||||
elif form['state'] == 'all' :
|
||||
elif form['filter'] == 'filter_no' :
|
||||
ctx['periods'] = form['periods']
|
||||
ctx['date_from'] = form['date_from']
|
||||
ctx['date_to'] = form['date_to']
|
||||
@@ -115,6 +129,7 @@ class account_balance(report_sxw.rml_parse):
|
||||
# def cmp_code(x, y):
|
||||
# return cmp(x.code, y.code)
|
||||
# accounts.sort(cmp_code)
|
||||
|
||||
child_ids = self.pool.get('account.account')._get_children_and_consol(self.cr, self.uid, ids, ctx)
|
||||
if child_ids:
|
||||
ids = child_ids
|
||||
@@ -180,8 +195,6 @@ class account_balance(report_sxw.rml_parse):
|
||||
def _sum_debit(self):
|
||||
return self.sum_debit
|
||||
|
||||
|
||||
|
||||
|
||||
report_sxw.report_sxw('report.account.account.balance', 'account.account', 'addons/account/report/account_balance.rml', parser=account_balance, header=0)
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
Executable → Regular
@@ -18,8 +18,6 @@
|
||||
<field name="product_id" invisible="1"/>
|
||||
<field name="uom_name" invisible="not context.get('set_visible',False)"/>
|
||||
<field name="categ_id" invisible="1"/>
|
||||
<field name="nbr" sum="# of Lines"/>
|
||||
<field name="product_qty"/>
|
||||
<field name="state" invisible="1"/>
|
||||
<field name="period_id" invisible="1"/>
|
||||
<field name="currency_id" invisible="1"/>
|
||||
@@ -29,6 +27,8 @@
|
||||
<field name="address_invoice_id" invisible="1"/>
|
||||
<field name="partner_bank" invisible="1"/>
|
||||
<field name="account_id" invisible="1"/>
|
||||
<field name="nbr" sum="# of Lines"/>
|
||||
<field name="product_qty"/>
|
||||
<field name="reconciled" sum="# Reconciled"/>
|
||||
<field name="price_average" avg="Average Price"/>
|
||||
<field name="price_total" sum="Total Price"/>
|
||||
@@ -57,31 +57,31 @@
|
||||
<field name="arch" type="xml">
|
||||
<search string="Invoices Analysis">
|
||||
<group col="10" colspan="12">
|
||||
<filter icon="terp-go-year" string=" 365 Days "
|
||||
domain="[('date','<=', time.strftime('%%Y-%%m-%%d')),('date','>',(datetime.date.today()-datetime.timedelta(days=365)).strftime('%%Y-%%m-%%d'))]"
|
||||
help="Invoices of last 365 days"/>
|
||||
<filter icon="terp-go-month" string=" 30 Days "
|
||||
name="month"
|
||||
domain="[('date','<=', time.strftime('%%Y-%%m-%%d')), ('date','>',(datetime.date.today()-datetime.timedelta(days=30)).strftime('%%Y-%%m-%%d'))]"
|
||||
help="Invoices of last 30 days"/>
|
||||
<filter icon="terp-go-week"
|
||||
string=" 7 Days "
|
||||
separator="1"
|
||||
domain="[('date','<=', time.strftime('%%Y-%%m-%%d')), ('date','>',(datetime.date.today()-datetime.timedelta(days=7)).strftime('%%Y-%%m-%%d'))]"
|
||||
help="Invoices during last 7 days"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter icon="terp-go-year" string=" 365 Days "
|
||||
domain="[('date','<=', time.strftime('%%Y-%%m-%%d')),('date','>',(datetime.date.today()-datetime.timedelta(days=365)).strftime('%%Y-%%m-%%d'))]"
|
||||
help="Invoices of last 365 days"/>
|
||||
<filter icon="terp-go-month" string=" 30 Days "
|
||||
name="month"
|
||||
domain="[('date','<=', time.strftime('%%Y-%%m-%%d')), ('date','>',(datetime.date.today()-datetime.timedelta(days=30)).strftime('%%Y-%%m-%%d'))]"
|
||||
help="Invoices of last 30 days"/>
|
||||
<filter icon="terp-go-week"
|
||||
string=" 7 Days "
|
||||
separator="1"
|
||||
domain="[('date','<=', time.strftime('%%Y-%%m-%%d')), ('date','>',(datetime.date.today()-datetime.timedelta(days=7)).strftime('%%Y-%%m-%%d'))]"
|
||||
help="Invoices during last 7 days"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Current"
|
||||
icon="terp-check"
|
||||
domain="[('state','in',('draft','open'))]"
|
||||
help = "Draft and Open Invoices"/>
|
||||
<filter string="Pro-forma"
|
||||
icon="terp-check"
|
||||
domain="[('state','=','proforma'),('state','=','proforma2')]"
|
||||
help = "Pro-forma Invoices"/>
|
||||
<filter string="Current"
|
||||
domain="[('state', '=' ,'open')]"
|
||||
help = "open Invoices"/>
|
||||
<filter string="Done"
|
||||
icon="terp-check"
|
||||
domain="[('state','in',('draft','open'))]"
|
||||
help = "Draft and Open Invoices"/>
|
||||
<filter string="Pro-forma"
|
||||
icon="terp-check"
|
||||
domain="[('state','=','proforma'),('state','=','proforma2')]"
|
||||
help = "Pro-forma Invoices"/>
|
||||
<filter string="Current"
|
||||
domain="[('state', '=' ,'open')]"
|
||||
help = "open Invoices"/>
|
||||
<filter string="Done"
|
||||
icon="terp-dialog-close"
|
||||
domain="[('state','=','paid')]"
|
||||
help = "Done Invoices"/>
|
||||
@@ -89,14 +89,14 @@
|
||||
<field name="partner_id"/>
|
||||
<field name="user_id" widget="selection">
|
||||
<filter icon="terp-dolar"
|
||||
string="My Invoices"
|
||||
help="My Invoices"
|
||||
domain="[('user_id','=',uid)]"/>
|
||||
string="My Invoices"
|
||||
help="My Invoices"
|
||||
domain="[('user_id','=',uid)]"/>
|
||||
</field>
|
||||
</group>
|
||||
<newline/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Group By...">
|
||||
<filter string="Salesman" name='User' icon="terp-personal" context="{'group_by':'user_id'}"/>
|
||||
<filter string="Salesman" name='user' icon="terp-personal" context="{'group_by':'user_id'}"/>
|
||||
<filter string="Partner" icon="terp-personal" context="{'group_by':'partner_id'}"/>
|
||||
<filter string="Product" icon="terp-accessories-archiver" context="{'group_by':'product_id','set_visible':True}"/>
|
||||
<separator orientation="vertical"/>
|
||||
@@ -111,9 +111,9 @@
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Company" icon="terp-go-home" context="{'group_by':'company_id'}" groups="base.group_multi_company"/>
|
||||
<newline/>
|
||||
<filter string="Day" icon="terp-go-today" context="{'group_by':'day'}"/>
|
||||
<filter string="Month" icon="terp-go-month" context="{'group_by':'month'}"/>
|
||||
<filter string="Year" icon="terp-go-year" context="{'group_by':'year'}"/>
|
||||
<filter string="Day" name="day" icon="terp-go-today" context="{'group_by':'day'}"/>
|
||||
<filter string="Month" name="month" icon="terp-go-month" context="{'group_by':'month'}"/>
|
||||
<filter string="Year" name="year" icon="terp-go-year" context="{'group_by':'year'}"/>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Extended options..." groups="base.group_extended">
|
||||
@@ -139,11 +139,19 @@
|
||||
<field name="res_model">account.invoice.report</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,graph</field>
|
||||
<field name="context">{'search_default_month':1,'search_default_User':1,'group_by_no_leaf':1,'group_by':[]}</field>
|
||||
<field name="context">{'search_default_month':1,'search_default_product':1,'group_by_no_leaf':1,'group_by':[]}</field>
|
||||
<field name="search_view_id" ref="view_account_invoice_report_search"/>
|
||||
</record>
|
||||
|
||||
<menuitem action="action_account_invoice_report_all" id="menu_action_account_invoice_report_all" parent="account.menu_finance_statistic_report_statement" sequence="0"/>
|
||||
|
||||
<act_window
|
||||
domain="[('partner_id', '=', active_id)]"
|
||||
id="act_account_invoice_partner_relation"
|
||||
name="Monthly Turnover"
|
||||
context="{'search_default_month':1,'search_default_user':1,'group_by_no_leaf':1,'group_by':[]}"
|
||||
res_model="account.invoice.report"
|
||||
src_model="res.partner"/>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
@@ -45,8 +45,9 @@ class journal_print(report_sxw.rml_parse):
|
||||
self.cr.execute('select a.code, a.name, sum(debit) as debit, sum(credit) as credit from account_move_line l left join account_account a on (l.account_id=a.id) where l.period_id=%s and l.journal_id=%s and l.state<>\'draft\' group by a.id, a.code, a.name, l.journal_id, l.period_id', (period, journal))
|
||||
res = self.cr.dictfetchall()
|
||||
a = {'journal':self.pool.get('account.journal').browse(self.cr, self.uid, journal),'period':self.pool.get('account.period').browse(self.cr, self.uid, period)}
|
||||
res[0].update(a)
|
||||
ids_final.append(res)
|
||||
if res:
|
||||
res[0].update(a)
|
||||
ids_final.append(res)
|
||||
return ids_final
|
||||
self.cr.execute('select a.code, a.name, sum(debit) as debit, sum(credit) as credit from account_move_line l left join account_account a on (l.account_id=a.id) where l.period_id=%s and l.journal_id=%s and l.state<>\'draft\' group by a.id, a.code, a.name', (period_id, journal_id))
|
||||
res = self.cr.dictfetchall()
|
||||
|
||||
Executable → Regular
@@ -36,15 +36,19 @@ class journal_print(report_sxw.rml_parse):
|
||||
'sum_debit_period': self._sum_debit_period,
|
||||
'sum_credit_period': self._sum_credit_period,
|
||||
'sum_debit': self._sum_debit,
|
||||
'sum_credit': self._sum_credit
|
||||
'sum_credit': self._sum_credit,
|
||||
})
|
||||
|
||||
def set_context(self, objects, data, ids, report_type = None):
|
||||
def set_context(self, objects, data, ids, report_type=None):
|
||||
super(journal_print, self).set_context(objects, data, ids, report_type)
|
||||
self.cr.execute('SELECT period_id, journal_id '
|
||||
'FROM account_journal_period '
|
||||
'WHERE id IN %s',
|
||||
(tuple(ids),))
|
||||
if (data['model'] == 'account.journal.period'):
|
||||
self.cr.execute('SELECT period_id, journal_id '
|
||||
'FROM account_journal_period '
|
||||
'WHERE id IN %s',
|
||||
(tuple(ids),))
|
||||
else:
|
||||
self.cr.execute('SELECT period_id, journal_id '
|
||||
'FROM account_journal_period ')
|
||||
res = self.cr.fetchall()
|
||||
self.period_ids, self.journal_ids = zip(*res)
|
||||
|
||||
@@ -91,7 +95,6 @@ class journal_print(report_sxw.rml_parse):
|
||||
return lines_data
|
||||
if not self.journal_ids:
|
||||
return []
|
||||
|
||||
self.cr.execute('SELECT j.code, j.name, '
|
||||
'SUM(l.debit) AS debit, SUM(l.credit) AS credit '
|
||||
'FROM account_move_line l '
|
||||
@@ -146,7 +149,7 @@ class journal_print(report_sxw.rml_parse):
|
||||
'AND state<>\'draft\'',
|
||||
(tuple(periods), tuple(journals)))
|
||||
return self.cr.fetchone()[0] or 0.0
|
||||
report_sxw.report_sxw('report.account.general.journal', 'account.journal.period', 'addons/account/report/general_journal.rml', parser=journal_print)
|
||||
report_sxw.report_sxw('report.account.general.journal', 'account.journal.period', 'addons/account/report/general_journal.rml', parser=journal_print, header=False)
|
||||
report_sxw.report_sxw('report.account.general.journal.wiz', 'account.journal.period', 'addons/account/report/wizard_general_journal.rml', parser=journal_print, header=False)
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
Executable → Regular
Executable → Regular
@@ -117,9 +117,10 @@
|
||||
</stylesheet>
|
||||
<images/>
|
||||
<story>
|
||||
<para style="Table Contents">[[ repeatIn(objects, 'o') ]]</para>
|
||||
<blockTable colWidths="65.0,62.0,58.0,62.0,174.0,57.0,61.0" style="Table1" repeatRows="1">
|
||||
<para style="terp_default_8">[[repeatIn(lines(data['form']['period_id'][0][2],data['form']['journal_id'][0][2],data['form']['sort_selection']), 'line') ]]</para>
|
||||
<section>
|
||||
<para style="Table Contents">[[ repeatIn(objects, 'o') ]]</para>
|
||||
<blockTable colWidths="65.0,62.0,58.0,62.0,174.0,57.0,61.0" style="Table1" repeatRows="1">
|
||||
<para style="terp_default_8">[[repeatIn(lines(data['form']['periods'],data['form']['journal_ids'],data['form']['sort_selection']), 'line') ]]</para>
|
||||
<tr>
|
||||
<td>
|
||||
<para style="P10a">Date</para>
|
||||
@@ -186,6 +187,8 @@
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
</tr>
|
||||
</blockTable>
|
||||
</blockTable>
|
||||
<pageBreak></pageBreak>
|
||||
</section>
|
||||
</story>
|
||||
</document>
|
||||
@@ -123,7 +123,8 @@
|
||||
<paraStyle name="terp_default_Bold_9_Right" fontName="Helvetica-Bold" fontSize="9.0" leading="11" alignment="RIGHT" spaceBefore="0.0" spaceAfter="0.0"/>
|
||||
</stylesheet>
|
||||
<images/>
|
||||
<story>
|
||||
<story>
|
||||
<para style="terp_default_8">[[ repeatIn(objects, 'o') ]]</para>
|
||||
<!--blockTable colWidths="180.0,180.0,180.0" style="Table_header_Content">
|
||||
<tr>
|
||||
<td>
|
||||
@@ -145,9 +146,12 @@
|
||||
<para style="terp_default_8">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
<para style="terp_default_8">[[ repeatIn(objects, 'o') ]]</para>
|
||||
<para style="terp_default_8">[[ repeatIn(lines(data['form']['period_id'][0][2],data['form']['journal_id'][0][2]), 'line') ]]</para>
|
||||
|
||||
|
||||
<section>
|
||||
<blockTable colWidths="180.0,180.0,180.0" style="Table_Sub_Header_Content">
|
||||
<para style="terp_default_8">[[ repeatIn(lines(data['form']['periods'],data['form']['journal_ids']), 'line') ]]</para>
|
||||
<condPageBreak height="1"/>
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_tblheader_General_Centre">Journal Code</para>
|
||||
@@ -214,17 +218,13 @@
|
||||
<para style="terp_default_Bold_9_Right">[[ formatLang(sum_credit(line[0]['period'].id, line[0]['journal'].id)) ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<tr>
|
||||
<td>
|
||||
<blockTable colWidths="80.0,272.0,94.0,87.0" style="Table_Journal_Line_Content">
|
||||
<para style="terp_default_8">[[repeatIn(line,'l')]]</para>
|
||||
<tr>
|
||||
<para style="terp_default_8">[[repeatIn(line,'l')]]</para>
|
||||
<td>
|
||||
<para style="terp_default_9">[[ l['code'] ]]</para>
|
||||
<para style="terp_default_9">d[[ l['code'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_9">[[ l['name'] ]]</para>
|
||||
@@ -237,9 +237,16 @@
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<pageBreak/>
|
||||
</section>
|
||||
|
||||
<para style="terp_default_8">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
|
||||
@@ -178,10 +178,10 @@
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9_Right"><u>[[ formatLang(sum_debit(data['form']['period_id'][0][2],data['form']['journal_id'][0][2])) ]]</u></para>
|
||||
<para style="terp_default_Bold_9_Right"><u>[[ formatLang(sum_debit(data['form']['periods'],data['form']['journal_ids'])) ]]</u></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9_Right"><u>[[ formatLang(sum_credit(data['form']['period_id'][0][2],data['form']['journal_id'][0][2])) ]]</u></para>
|
||||
<para style="terp_default_Bold_9_Right"><u>[[ formatLang(sum_credit(data['form']['periods'],data['form']['journal_ids'])) ]]</u></para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
@@ -191,7 +191,7 @@
|
||||
<tr>
|
||||
<td>
|
||||
|
||||
<para style="terp_default_9"><font>[[ repeatIn( lines( data['form']['period_id'][0][2], data['form']['journal_id'][0][2] ),'line')]]</font></para>
|
||||
<para style="terp_default_9"><font>[[ repeatIn( lines( data['form']['periods'], data['form']['journal_ids'] ),'line')]]</font></para>
|
||||
<blockTable colWidths="175.0,115.0,82.0,82.0,75.0" style="Table_Sub_Total">
|
||||
<tr>
|
||||
<td>
|
||||
@@ -208,10 +208,10 @@
|
||||
</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9_Right"><u>[[ formatLang(sum_debit_period( line[0]['pid'],data['form']['journal_id'][0][2])) ]]</u></para>
|
||||
<para style="terp_default_Bold_9_Right"><u>[[ formatLang(sum_debit_period( line[0]['pid'],data['form']['journal_ids'])) ]]</u></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9_Right"><u>[[ formatLang(sum_credit_period(line[0]['pid'],data['form']['journal_id'][0][2])) ]]</u></para>
|
||||
<para style="terp_default_Bold_9_Right"><u>[[ formatLang(sum_credit_period(line[0]['pid'],data['form']['journal_ids'])) ]]</u></para>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -18,121 +18,54 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
import time
|
||||
|
||||
from osv import osv, fields
|
||||
from tools.translate import _
|
||||
|
||||
class account_balance_report(osv.osv_memory):
|
||||
"""
|
||||
This wizard will provide the account balance report by periods, between any two dates.
|
||||
"""
|
||||
|
||||
_inherit = "account.common.report"
|
||||
_name = 'account.balance.report'
|
||||
_description = 'Account Balance Report'
|
||||
_columns = {
|
||||
'Account_list': fields.many2one('account.account', 'Chart account',
|
||||
required=True, domain = [('parent_id','=',False)]),
|
||||
'company_id': fields.many2one('res.company', 'Company', required=True),
|
||||
'display_account': fields.selection([('bal_mouvement','With movements'),
|
||||
('bal_all','All'),
|
||||
('bal_solde','With balance is not equal to 0'),
|
||||
],'Display accounts'),
|
||||
'fiscalyear': fields.many2one('account.fiscalyear', 'Fiscal year', help='Keep empty for all open fiscal year'),
|
||||
'state': fields.selection([('bydate','By Date'),
|
||||
('byperiod','By Period'),
|
||||
('all','By Date and Period'),
|
||||
('none','No Filter')
|
||||
],'Date/Period Filter'),
|
||||
'periods': fields.many2many('account.period', 'period_account_balance_rel',
|
||||
'report_id', 'period_id', 'Periods',
|
||||
help='Keep empty for all open fiscal year'),
|
||||
'date_from': fields.date('Start date', required=True),
|
||||
'date_to': fields.date('End date', required=True),
|
||||
}
|
||||
'display_account': fields.selection([('bal_all','All'), ('bal_mouvement','With movements'),
|
||||
('bal_solde','With balance is not equal to 0'),
|
||||
],'Display accounts'),
|
||||
}
|
||||
|
||||
def _get_company(self, cr, uid, context=None):
|
||||
user_obj = self.pool.get('res.users')
|
||||
company_obj = self.pool.get('res.company')
|
||||
user = user_obj.browse(cr, uid, uid, context=context)
|
||||
if user.company_id:
|
||||
return user.company_id.id
|
||||
_defaults = {
|
||||
'display_account': 'bal_all'
|
||||
}
|
||||
|
||||
def default_get(self, cr, uid, fields, context=None):
|
||||
""" To get default values for the object.
|
||||
@param self: The object pointer.
|
||||
@param cr: A database cursor
|
||||
@param uid: ID of the user currently logged in
|
||||
@param fields: List of fields for which we want default values
|
||||
@param context: A standard dictionary
|
||||
@return: A dictionary which of fields with values.
|
||||
"""
|
||||
res = {}
|
||||
if 'journal_ids' in fields:# FIX me!!
|
||||
res['journal_ids'] = []
|
||||
return res
|
||||
else:
|
||||
return company_obj.search(cr, uid, [('parent_id', '=', False)])[0]
|
||||
result = super(account_balance_report, self).default_get(cr, uid, fields, context=context)
|
||||
result.update({'company_id':self.pool.get('account.account').read(cr, uid, result['chart_account_id'], context=context)['company_id']})
|
||||
return result
|
||||
|
||||
_defaults={
|
||||
'state' : 'none',
|
||||
'date_from' : time.strftime('%Y-01-01'),
|
||||
'date_to' : time.strftime('%Y-%m-%d'),
|
||||
'company_id' : _get_company,
|
||||
'fiscalyear' : False,
|
||||
'display_account': 'bal_all',
|
||||
}
|
||||
def _print_report(self, cr, uid, ids, data, query_line, context=None):
|
||||
|
||||
def next_view(self, cr, uid, ids, context=None):
|
||||
obj_model = self.pool.get('ir.model.data')
|
||||
if context is None:
|
||||
context = {}
|
||||
data = self.read(cr, uid, ids, [])[0]
|
||||
context.update({'Account_list': data['Account_list']})
|
||||
model_data_ids = obj_model.search(cr,uid,[('model','=','ir.ui.view'),('name','=','account_balance_report_view')])
|
||||
resource_id = obj_model.read(cr, uid, model_data_ids, fields=['res_id'])[0]['res_id']
|
||||
return {
|
||||
'view_type': 'form',
|
||||
'view_mode': 'form',
|
||||
'res_model': 'account.balance.report',
|
||||
'views': [(resource_id,'form')],
|
||||
'type': 'ir.actions.act_window',
|
||||
'target': 'new',
|
||||
'context': context
|
||||
}
|
||||
|
||||
def check_state(self, cr, uid, ids, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
data={}
|
||||
data['ids'] = context['active_ids']
|
||||
data['form'] = self.read(cr, uid, ids, ['date_from', 'company_id', 'state', 'periods', 'date_to', 'display_account', 'fiscalyear'])[0]
|
||||
data['form']['Account_list'] = context.get('Account_list',[])
|
||||
data['form']['context'] = context
|
||||
if data['form']['Account_list']:
|
||||
data['model'] = 'ir.ui.menu'
|
||||
else:
|
||||
data['model'] = 'account.account'
|
||||
|
||||
if data['form']['state'] == 'bydate' :
|
||||
return self._check_date(cr, uid, data, context)
|
||||
elif data['form']['state'] == 'byperiod':
|
||||
if not data['form']['periods']:
|
||||
raise osv.except_osv(_('Warning'),_('Please Enter Periods ! '))
|
||||
|
||||
return {
|
||||
'type': 'ir.actions.report.xml',
|
||||
'report_name': 'account.account.balance',
|
||||
'datas': data,
|
||||
'nodestroy':True,
|
||||
}
|
||||
|
||||
def _check_date(self, cr, uid, data, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
sql = """
|
||||
SELECT f.id, f.date_start, f.date_stop FROM account_fiscalyear f Where %s between f.date_start and f.date_stop """
|
||||
cr.execute(sql, (data['form']['date_from'],))
|
||||
res = cr.dictfetchall()
|
||||
if res:
|
||||
|
||||
if (data['form']['date_to'] > res[0]['date_stop'] or data['form']['date_to'] < res[0]['date_start']):
|
||||
raise osv.except_osv(_('UserError'),_('Date to must be set between %s and %s') % (res[0]['date_start'], res[0]['date_stop']))
|
||||
else:
|
||||
return {
|
||||
'type': 'ir.actions.report.xml',
|
||||
'report_name': 'account.account.balance',
|
||||
'datas': data,
|
||||
'nodestroy':True,
|
||||
}
|
||||
else:
|
||||
raise osv.except_osv(_('UserError'),_('Date not in a defined fiscal year'))
|
||||
if data['model']=='ir.ui.menu':
|
||||
data['ids'] = [data['form']['chart_account_id']]
|
||||
data['form'].update(self.read(cr, uid, ids, ['display_account', 'company_id',])[0])
|
||||
data['form']['query_get'] = query_line
|
||||
return { 'type': 'ir.actions.report.xml', 'report_name': 'account.account.balance', 'datas': data, 'nodestroy':True, }
|
||||
|
||||
account_balance_report()
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
@@ -1,93 +1,66 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
<data>
|
||||
|
||||
<record id="account_balance_report_view" model="ir.ui.view">
|
||||
<field name="name">Select period</field>
|
||||
<field name="model">account.balance.report</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Select period">
|
||||
<field name="company_id" groups="base.group_multi_company"/>
|
||||
<field name="display_account" required = "True"/>
|
||||
<newline/>
|
||||
<field name="fiscalyear"/>
|
||||
<label colspan="2" string="(Keep empty for all open fiscal years)" align="0.0"/>
|
||||
<newline/>
|
||||
<separator string="Filters" colspan="4"/>
|
||||
<field name="state" required="True"/>
|
||||
<newline/>
|
||||
<group attrs="{'invisible':[('state','=','none')]}" colspan="4">
|
||||
<group attrs="{'invisible':[('state','=','byperiod')]}" colspan="4">
|
||||
<separator string="Date Filter" colspan="4"/>
|
||||
<field name="date_from"/>
|
||||
<field name="date_to"/>
|
||||
</group>
|
||||
<group attrs="{'invisible':[('state','=','bydate')]}" colspan="4">
|
||||
<separator string="Filter on Periods" colspan="4"/>
|
||||
<field name="periods" colspan="4" nolabel="1"/>
|
||||
</group>
|
||||
</group>
|
||||
<newline/>
|
||||
<group colspan="4" col="6">
|
||||
<label string ="" colspan="2"/>
|
||||
<button special="cancel" string="Cancel" icon="gtk-cancel"/>
|
||||
<button name="check_state" string="Print" type="object" icon="gtk-print" default_focus="1"/>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
<record id="account_report_balance_view" model="ir.ui.view">
|
||||
<field name="name">Account Balance</field>
|
||||
<field name="model">account.balance.report</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Print Account Balance" >
|
||||
<group width="600" height="250">
|
||||
<group colspan="4" col="4">
|
||||
<field name="chart_account_id" colspan="2" widget='selection'/>
|
||||
<field name="fiscalyear_id"/>
|
||||
<field name="filter"/>
|
||||
<field name="company_id"/>
|
||||
<field name="display_account"/>
|
||||
</group>
|
||||
<group attrs="{'invisible':[('filter','!=','filter_period')]}">
|
||||
<separator string="Periods" colspan="4"/>
|
||||
<field name="period_from"/>
|
||||
<field name="period_to"/>
|
||||
</group>
|
||||
<group colspan="4" attrs="{'invisible':[('filter','!=','filter_date')]}">
|
||||
<separator string="Date" colspan="4"/>
|
||||
<field name="date_from"/>
|
||||
<field name="date_to"/>
|
||||
</group>
|
||||
<group colspan="4" col="4" >
|
||||
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
|
||||
<button icon="gtk-print" name="check_report" string="Print" type="object"/>
|
||||
</group>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
<record id="action_account_balance_menu" model="ir.actions.act_window">
|
||||
<field name="name">Account Balance</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="res_model">account.balance.report</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="view_id" ref="account_report_balance_view"/>
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
|
||||
<record id="action_account_balance_report" model="ir.actions.act_window">
|
||||
<field name="name">Account Balance</field>
|
||||
<field name="res_model">account.balance.report</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">form</field>
|
||||
<field name="view_id" ref="account_balance_report_view"/>
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
<menuitem
|
||||
icon="STOCK_PRINT"
|
||||
name="Account Balance"
|
||||
parent="account.menu_generic_report"
|
||||
action="action_account_balance_menu"
|
||||
id="menu_general_Balance_report"
|
||||
/>
|
||||
|
||||
<record model="ir.values" id="action_account_balance_report_values">
|
||||
<record model="ir.values" id="action_account_balance_report_values1">
|
||||
<field name="model_id" ref="account.model_account_account" />
|
||||
<field name="object" eval="1" />
|
||||
<field name="name">Account Balance</field>
|
||||
<field name="key2">client_print_multi</field>
|
||||
<field name="value" eval="'ir.actions.act_window,' +str(ref('action_account_balance_report'))" />
|
||||
<field name="value" eval="'ir.actions.act_window,' +str(ref('action_account_balance_menu'))" />
|
||||
<field name="key">action</field>
|
||||
<field name="model">account.account</field>
|
||||
</record>
|
||||
|
||||
<record id="account_balance_report_account_view" model="ir.ui.view">
|
||||
<field name="name">Account Balance</field>
|
||||
<field name="model">account.balance.report</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Select Chart">
|
||||
<field name="Account_list"/>
|
||||
<separator colspan="4"/>
|
||||
<button icon="gtk-cancel" special="cancel" string="Cancel"/>
|
||||
<button name="next_view" string="Next" type="object" icon="gtk-go-forward" default_focus="1"/>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_account_balance_account_report" model="ir.actions.act_window">
|
||||
<field name="name">Select Account</field>
|
||||
<field name="res_model">account.balance.report</field>
|
||||
<field name="type">ir.actions.act_window</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="view_id" ref="account_balance_report_account_view"/>
|
||||
<field name="context">{'record_id':active_id}</field>
|
||||
<field name="target">new</field>
|
||||
</record>
|
||||
|
||||
<menuitem icon="STOCK_PRINT"
|
||||
name="Account Balance"
|
||||
action="action_account_balance_account_report"
|
||||
id="menu_account_balance_report"
|
||||
parent="account.menu_generic_report"/>
|
||||
|
||||
</data>
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
@@ -24,36 +24,30 @@ from tools.translate import _
|
||||
class account_central_journal(osv.osv_memory):
|
||||
_name = 'account.central.journal'
|
||||
_description = 'Account Central Journal'
|
||||
_inherit = "account.common.report"
|
||||
_defaults={
|
||||
'filter': 'filter_period'
|
||||
}
|
||||
|
||||
_columns = {
|
||||
'journal_id': fields.many2many('account.journal', 'account_journal_rel', 'account_id', 'journal_id', 'Journals', required=True),
|
||||
'period_id': fields.many2many('account.period', 'account_period_rel', 'account_id', 'period_id', 'Periods', required=True),
|
||||
}
|
||||
|
||||
def check_data(self, cr, uid, ids, context={}):
|
||||
obj_jperiod = self.pool.get('account.journal.period')
|
||||
datas = {}
|
||||
datas['ids'] = []
|
||||
datas['model'] = 'account.journal.period'
|
||||
datas['form'] = self.read(cr, uid, ids)[0]
|
||||
period_id = datas['form']['period_id']
|
||||
journal_id = datas['form']['journal_id']
|
||||
|
||||
if isinstance(period_id, list):
|
||||
ids_final = []
|
||||
for journal in journal_id:
|
||||
for period in period_id:
|
||||
ids_journal_period = obj_jperiod.search(cr,uid, [('journal_id','=',journal),('period_id','=',period)], context=context)
|
||||
if ids_journal_period:
|
||||
ids_final.append(ids_journal_period)
|
||||
def _print_report(self, cr, uid, ids, data, query_line, context=None):
|
||||
periods = data['form']['periods']
|
||||
data['ids'] = ids
|
||||
obj_jperiod = self.pool.get('account.journal.period')
|
||||
if isinstance(periods, list):
|
||||
ids_final = []
|
||||
for journal in data['form']['journal_ids']:
|
||||
for period in periods:
|
||||
ids_journal_period = obj_jperiod.search(cr,uid, [('journal_id','=',journal),('period_id','=',period)], context=context)
|
||||
if ids_journal_period:
|
||||
ids_final.append(ids_journal_period)
|
||||
if not ids_final:
|
||||
raise osv.except_osv(_('No Data Available'), _('No records found for your selection!'))
|
||||
return {
|
||||
'type': 'ir.actions.report.xml',
|
||||
'report_name': 'account.central.journal',
|
||||
'datas': datas,
|
||||
'nodestroy':True,
|
||||
}
|
||||
return {
|
||||
'type': 'ir.actions.report.xml',
|
||||
'report_name': 'account.central.journal.wiz',
|
||||
'datas': data,
|
||||
'nodestroy':True,
|
||||
}
|
||||
|
||||
account_central_journal()
|
||||
|
||||
|
||||
@@ -8,15 +8,23 @@
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Print Central Journal">
|
||||
<group col="4" colspan="6">
|
||||
<field name="journal_id"/>
|
||||
<field name="period_id"/>
|
||||
</group>
|
||||
<separator colspan="4"/>
|
||||
<group col="2" colspan="4">
|
||||
<button special="cancel" string="Cancel" icon='gtk-cancel'/>
|
||||
<button name="check_data" string="Print" colspan="1" type="object" icon="gtk-print"/>
|
||||
<group>
|
||||
<separator string="Journals"/><newline/>
|
||||
<field name="journal_ids" nolabel="1"/><newline/>
|
||||
<separator string="Periods"/><newline/>
|
||||
<group>
|
||||
<field name="period_from"/>
|
||||
<field name="period_to"/>
|
||||
</group>
|
||||
</group>
|
||||
<newline/>
|
||||
<group>
|
||||
<separator/><newline/>
|
||||
<group>
|
||||
<button special="cancel" string="Cancel" icon='gtk-cancel'/>
|
||||
<button name="check_report" string="Print" type="object" icon="gtk-ok"/>
|
||||
</group>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -26,22 +26,18 @@ import tools
|
||||
|
||||
class account_common_report(osv.osv_memory):
|
||||
_name = "account.common.report"
|
||||
_description = "Common Report"
|
||||
_description = "Account Common Report"
|
||||
|
||||
_columns = {
|
||||
'chart_account_id': fields.many2one('account.account', 'Chart of account', required=True, domain = [('parent_id','=',False)]),
|
||||
'chart_account_id': fields.many2one('account.account', 'Chart of account', help='Select Charts of Accounts', required=True, domain = [('parent_id','=',False)]),
|
||||
'fiscalyear_id': fields.many2one('account.fiscalyear', 'Fiscal year', help='Keep empty for all open fiscal year'),
|
||||
|
||||
'filter': fields.selection([('filter_no','No filters'), ('filter_date','Date'), ('filter_period','Periods')],"Filter by:", required=True),
|
||||
|
||||
'filter': fields.selection([('filter_no', 'No filters'), ('filter_date', 'Date'), ('filter_period', 'Periods')], "Filter by:", required=True),
|
||||
'period_from': fields.many2one('account.period', 'Start period'),
|
||||
'period_to': fields.many2one('account.period', 'End period'),
|
||||
#not used. Do we really need it? 'period_ids': fields.many2many('account.period', 'ledger_period_rel', 'ledger_id', 'period_id', 'Periods'),
|
||||
|
||||
'journal_ids': fields.many2many('account.journal', 'account_common_journal_rel', 'account_id', 'journal_id', 'Journals', required=True),
|
||||
|
||||
'date_from': fields.date("Start date"),
|
||||
'date_to': fields.date("End date"),
|
||||
'date_from': fields.date("Start Date"),
|
||||
'date_to': fields.date("End Date"),
|
||||
|
||||
#'display_account': fields.selection([('bal_mouvement','With movements'), ('bal_all','All'), ('bal_solde','With balance is not equal to 0')],"Display accounts"),
|
||||
#'landscape': fields.boolean("Landscape Mode"),
|
||||
@@ -95,33 +91,43 @@ class account_common_report(osv.osv_memory):
|
||||
'chart_account_id': _get_account,
|
||||
}
|
||||
|
||||
def _build_context(self, cr, uid, ids, data, context = None):
|
||||
def _build_context(self, cr, uid, ids, data, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
result = {}
|
||||
period_obj = self.pool.get('account.period')
|
||||
result['fiscalyear'] = data['form']['fiscalyear_id'] and data['form']['fiscalyear_id'] or False
|
||||
if data['form']['filter'] == 'filter_date':
|
||||
result['date_from'] = data['form']['date_from']
|
||||
result['date_to'] = data['form']['date_to']
|
||||
elif data['form']['filter'] == 'filter_period':
|
||||
period_obj = self.pool.get('account.period')
|
||||
if not data['form']['period_from'] or not data['form']['period_to']:
|
||||
raise osv.except_osv(_('Error'),_('Select Start period and End period'))
|
||||
elif (data['form']['period_from'] > data['form']['period_to']):
|
||||
raise osv.except_osv(_('Error'),_('Start period should be smaller then End period'))
|
||||
period_date_start = period_obj.read(cr, uid, data['form']['period_from'], ['date_start'])['date_start']
|
||||
period_date_stop = period_obj.read(cr, uid, data['form']['period_to'], ['date_stop'])['date_stop']
|
||||
cr.execute('SELECT id FROM account_period WHERE date_start >= %s AND date_stop <= %s', (period_date_start, period_date_stop))
|
||||
result['periods'] = lambda x: x[0], cr.fetchall()
|
||||
result['periods'] = map(lambda x: x[0], cr.fetchall())
|
||||
return result
|
||||
|
||||
def _print_report(self, cr, uid, ids, data, query_line, context):
|
||||
def _print_report(self, cr, uid, ids, data, query_line, context=None):
|
||||
raise (_('Error'), _('not implemented'))
|
||||
|
||||
def check_report(self, cr, uid, ids, context=None):
|
||||
obj_acc_move_line = self.pool.get('account.move.line')
|
||||
if context is None:
|
||||
context = {}
|
||||
data = {}
|
||||
data['ids'] = context.get('active_ids',[])
|
||||
data['ids'] = context.get('active_ids', [])
|
||||
data['model'] = context.get('active_model', 'ir.ui.menu')
|
||||
data['form'] = self.read(cr, uid, ids, ['date_from', 'date_to', 'fiscalyear_id', 'journal_ids', 'period_from', 'period_to', 'filter', 'chart_account_id'])[0]
|
||||
used_context = self._build_context(cr, uid, ids, data, context)
|
||||
query_line = obj_acc_move_line._query_get(cr, uid, obj='l', context=used_context)
|
||||
return self._print_report(cr, uid, ids, data, query_line, context)
|
||||
if used_context.get('periods', False):
|
||||
data['form']['periods'] = used_context['periods']
|
||||
else:
|
||||
data['form']['periods'] = []
|
||||
return self._print_report(cr, uid, ids, data, query_line, context=context)
|
||||
account_common_report()
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
|
||||
@@ -22,23 +22,29 @@ from osv import osv, fields
|
||||
from tools.translate import _
|
||||
|
||||
class account_general_journal(osv.osv_memory):
|
||||
_inherit = "account.common.report"
|
||||
_name = 'account.general.journal'
|
||||
_description = 'Account General Journal'
|
||||
|
||||
_columns = {
|
||||
'journal_id': fields.many2many('account.journal', 'account_journal_rel', 'account_id', 'journal_id', 'Journals', required=True),
|
||||
'period_id': fields.many2many('account.period', 'account_period_rel', 'account_id', 'period_id', 'Periods', required=True),
|
||||
}
|
||||
def _build_context(self, cr, uid, ids, data, context=None):
|
||||
period_obj = self.pool.get('account.period')
|
||||
result = super(account_general_journal, self)._build_context(cr, uid, ids, data, context=context)
|
||||
if not data['form']['period_from'] or not data['form']['period_to']:
|
||||
raise osv.except_osv(_('Error'),_('Select Start period and End period'))
|
||||
elif (data['form']['period_from'] > data['form']['period_to']):
|
||||
raise osv.except_osv(_('Error'),_('Start period should be smaller then End period'))
|
||||
period_date_start = period_obj.read(cr, uid, data['form']['period_from'], ['date_start'])['date_start']
|
||||
period_date_stop = period_obj.read(cr, uid, data['form']['period_to'], ['date_stop'])['date_stop']
|
||||
cr.execute('SELECT id FROM account_period WHERE date_start >= %s AND date_stop <= %s', (period_date_start, period_date_stop))
|
||||
result.update({'periods': map(lambda x: x[0], cr.fetchall())})
|
||||
return result
|
||||
|
||||
def check_data(self, cr, uid, ids, context=None):
|
||||
def _print_report(self, cr, uid, ids, data, query_line, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
obj_jperiod = self.pool.get('account.journal.period')
|
||||
datas = {}
|
||||
datas['ids'] = []
|
||||
datas['model'] = 'account.journal.period'
|
||||
datas['form'] = self.read(cr, uid, ids)[0]
|
||||
period_id = datas['form']['period_id']
|
||||
journal_id = datas['form']['journal_id']
|
||||
|
||||
period_id = data['form']['periods']
|
||||
journal_id = data['form']['journal_ids']
|
||||
if type(period_id)==type([]):
|
||||
ids_final = []
|
||||
for journal in journal_id:
|
||||
@@ -48,12 +54,13 @@ class account_general_journal(osv.osv_memory):
|
||||
ids_final.append(ids_journal_period)
|
||||
if not ids_final:
|
||||
raise osv.except_osv(_('No Data Available'), _('No records found for your selection!'))
|
||||
return {
|
||||
'type': 'ir.actions.report.xml',
|
||||
'report_name': 'account.general.journal',
|
||||
'datas': datas,
|
||||
'nodestroy':True,
|
||||
}
|
||||
data['ids'] = []
|
||||
data['form']['query_get'] = query_line
|
||||
if data['model'] == 'ir.ui.menu':
|
||||
return {'type': 'ir.actions.report.xml', 'report_name': 'account.general.journal.wiz', 'datas': data, 'nodestroy':True, }
|
||||
else:
|
||||
return {'type': 'ir.actions.report.xml', 'report_name': 'account.general.journal', 'datas': data, 'nodestroy':True, }
|
||||
|
||||
account_general_journal()
|
||||
|
||||
#vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
@@ -7,17 +7,22 @@
|
||||
<field name="model">account.general.journal</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Print General Journal">
|
||||
<group col="4" colspan="6">
|
||||
<field name="journal_id"/>
|
||||
<field name="period_id"/>
|
||||
</group>
|
||||
<separator colspan="4"/>
|
||||
<group col="2" colspan="4">
|
||||
<button special="cancel" string="Cancel" icon='gtk-cancel'/>
|
||||
<button name="check_data" string="Print" colspan="1" type="object" icon="gtk-ok"/>
|
||||
</group>
|
||||
</form>
|
||||
<form string="Print General Journal">
|
||||
<group height="320" width="560">
|
||||
<separator string="Journals" colspan="4"/>
|
||||
<field name="journal_ids" nolabel="1" colspan="4"/>
|
||||
<separator string="Periods" colspan="4"/>
|
||||
<group colspan="4">
|
||||
<field name="period_from"/>
|
||||
<field name="period_to"/>
|
||||
</group>
|
||||
<group>
|
||||
<separator colspan="4"/>
|
||||
<button special="cancel" string="Cancel" icon="gtk-cancel"/>
|
||||
<button name="check_report" string="Print" colspan="1" type="object" icon="gtk-ok"/>
|
||||
</group>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
@@ -22,31 +22,39 @@ from osv import osv, fields
|
||||
from tools.translate import _
|
||||
|
||||
class account_print_journal(osv.osv_memory):
|
||||
_inherit = "account.common.report"
|
||||
_name = 'account.print.journal'
|
||||
_description = 'Account Print Journal'
|
||||
|
||||
_columns = {
|
||||
'journal_id': fields.many2many('account.journal', 'account_journal_rel', 'account_id', 'journal_id', 'Journals', required=True),
|
||||
'period_id': fields.many2many('account.period', 'account_period_rel', 'account_id', 'period_id', 'Periods', required=True),
|
||||
'sort_selection': fields.selection([('date','By date'),
|
||||
('ref','Reference Number'),],
|
||||
'sort_selection': fields.selection([('date','By Date'),
|
||||
('ref','By Reference Number'),],
|
||||
'Entries Sorted By', required=True),
|
||||
}
|
||||
|
||||
_defaults = {
|
||||
'sort_selection': lambda *a: 'date',
|
||||
}
|
||||
|
||||
def check_data(self, cr, uid, ids, context=None):
|
||||
obj_jperiod = self.pool.get('account.journal.period')
|
||||
datas = {}
|
||||
datas['ids'] = []
|
||||
datas['model'] = 'account.journal.period'
|
||||
datas['form'] = self.read(cr, uid, ids)[0]
|
||||
period_id = datas['form']['period_id']
|
||||
journal_id = datas['form']['journal_id']
|
||||
_defaults = {
|
||||
'sort_selection': 'date',
|
||||
}
|
||||
|
||||
if type(period_id)==type([]):
|
||||
def _build_context(self, cr, uid, ids, data, context=None):
|
||||
period_obj = self.pool.get('account.period')
|
||||
result = super(account_print_journal, self)._build_context(cr, uid, ids, data, context=context)
|
||||
if not data['form']['period_from'] or not data['form']['period_to']:
|
||||
raise osv.except_osv(_('Error'),_('Select Start period and End period'))
|
||||
elif (data['form']['period_from'] > data['form']['period_to']):
|
||||
raise osv.except_osv(_('Error'),_('Start period should be smaller then End period'))
|
||||
period_date_start = period_obj.read(cr, uid, data['form']['period_from'], ['date_start'])['date_start']
|
||||
period_date_stop = period_obj.read(cr, uid, data['form']['period_to'], ['date_stop'])['date_stop']
|
||||
cr.execute('SELECT id FROM account_period WHERE date_start >= %s AND date_stop <= %s', (period_date_start, period_date_stop))
|
||||
result.update({'periods': map(lambda x: x[0], cr.fetchall())})
|
||||
return result
|
||||
|
||||
|
||||
def _print_report(self, cr, uid, ids, data, query_line, context=None):
|
||||
obj_jperiod = self.pool.get('account.journal.period')
|
||||
period_id = data['form']['periods']
|
||||
journal_id = data['form']['journal_ids']
|
||||
if type(period_id) ==type([]):
|
||||
ids_final = []
|
||||
for journal in journal_id:
|
||||
for period in period_id:
|
||||
@@ -55,13 +63,13 @@ class account_print_journal(osv.osv_memory):
|
||||
ids_final.append(ids_journal_period)
|
||||
if not ids_final:
|
||||
raise osv.except_osv(_('No Data Available'), _('No records found for your selection!'))
|
||||
return {
|
||||
'type': 'ir.actions.report.xml',
|
||||
'report_name': 'account.journal.period.print',
|
||||
'datas': datas,
|
||||
'nodestroy':True,
|
||||
}
|
||||
|
||||
data['form'].update(self.read(cr, uid, ids, ['sort_selection'])[0])
|
||||
data['form']['query_get'] = query_line
|
||||
if data['model'] == 'ir.ui.menu':
|
||||
return { 'type': 'ir.actions.report.xml', 'report_name': 'account.journal.period.print.wiz', 'datas': data, 'nodestroy':True, }
|
||||
else:
|
||||
return { 'type': 'ir.actions.report.xml', 'report_name': 'account.journal.period.print', 'datas': data, 'nodestroy':True, }
|
||||
|
||||
account_print_journal()
|
||||
|
||||
#vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
@@ -7,17 +7,28 @@
|
||||
<field name="model">account.print.journal</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Print Journal">
|
||||
<group col="4" colspan="6">
|
||||
<field name="journal_id"/>
|
||||
<field name="period_id"/>
|
||||
<newline/>
|
||||
<field name="sort_selection"/>
|
||||
<form string="Print Journals">
|
||||
<group height="350" width="650">
|
||||
<group colspan="4">
|
||||
<separator string="Journals" colspan="4"/>
|
||||
<newline/>
|
||||
<field name="journal_ids" nolabel="1"/>
|
||||
<newline/>
|
||||
<separator string="Periods" colspan="4"/>
|
||||
<group colspan="4">
|
||||
<field name="period_from"/>
|
||||
<field name="period_to"/>
|
||||
</group>
|
||||
<group colspan="4">
|
||||
<separator string="" colspan="4" col="2"/>
|
||||
<field name="sort_selection" />
|
||||
</group>
|
||||
</group>
|
||||
</group>
|
||||
<separator colspan="4"/>
|
||||
<group col="2" colspan="4">
|
||||
<button special="cancel" string="Cancel" icon='gtk-cancel'/>
|
||||
<button name="check_data" string="Print" colspan="1" type="object" icon="gtk-ok"/>
|
||||
<button special="cancel" string="Cancel" icon='gtk-cancel'/>
|
||||
<button name="check_report" string="Print" colspan="1" type="object" icon="gtk-ok"/>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
|
||||
@@ -26,7 +26,7 @@ from osv import fields,osv
|
||||
#----------------------------------------------------------
|
||||
class stock_picking(osv.osv):
|
||||
_inherit = "stock.picking"
|
||||
_description = "Packing List"
|
||||
_description = "Picking List"
|
||||
|
||||
def action_invoice_create(self, cr, uid, ids, journal_id=False,
|
||||
group=False, type='out_invoice', context=None):
|
||||
|
||||
@@ -14,7 +14,7 @@ msgstr ""
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-06-24 03:47+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-06-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>
|
||||
|
||||
@@ -0,0 +1,167 @@
|
||||
# Spanish translation for openobject-addons
|
||||
# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010
|
||||
# This file is distributed under the same license as the openobject-addons package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, 2010.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: openobject-addons\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2009-11-24 13:11+0000\n"
|
||||
"PO-Revision-Date: 2010-06-24 09:42+0000\n"
|
||||
"Last-Translator: Borja López Soilán (Pexego) <borjals@pexego.es>\n"
|
||||
"Language-Team: Spanish <es@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-06-26 03:58+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: account_coda
|
||||
#: field:account.coda,journal_id:0
|
||||
#: wizard_field:account.coda_import,init,journal_id:0
|
||||
msgid "Bank Journal"
|
||||
msgstr "Diario bancario"
|
||||
|
||||
#. module: account_coda
|
||||
#: constraint:ir.model:0
|
||||
msgid ""
|
||||
"The Object name must start with x_ and not contain any special character !"
|
||||
msgstr ""
|
||||
"¡El objeto debe empezar con x_ y no puede contener ningún carácter especial!"
|
||||
|
||||
#. module: account_coda
|
||||
#: wizard_field:account.coda_import,extraction,note:0
|
||||
msgid "Log"
|
||||
msgstr "Registro"
|
||||
|
||||
#. module: account_coda
|
||||
#: wizard_button:account.coda_import,extraction,open:0
|
||||
msgid "_Open Statement"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_coda
|
||||
#: model:ir.module.module,shortdesc:account_coda.module_meta_information
|
||||
msgid "Account CODA"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_coda
|
||||
#: field:account.coda,name:0
|
||||
msgid "Coda file"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_coda
|
||||
#: wizard_view:account.coda_import,init:0
|
||||
msgid "Clic on 'New' to select your file :"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_coda
|
||||
#: model:ir.actions.wizard,name:account_coda.wizard_account_coda_import
|
||||
msgid "Import Coda File"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_coda
|
||||
#: constraint:ir.actions.act_window:0
|
||||
msgid "Invalid model name in the action definition."
|
||||
msgstr "Nombre de modelo inválido en la definición de acción."
|
||||
|
||||
#. module: account_coda
|
||||
#: field:account.coda,note:0
|
||||
msgid "Import log"
|
||||
msgstr "Registro de importación"
|
||||
|
||||
#. module: account_coda
|
||||
#: wizard_field:account.coda_import,init,def_receivable:0
|
||||
msgid "Default receivable Account"
|
||||
msgstr "Cuenta a recibir por defecto"
|
||||
|
||||
#. module: account_coda
|
||||
#: model:ir.module.module,description:account_coda.module_meta_information
|
||||
msgid ""
|
||||
"Module provides functionality to import\n"
|
||||
" bank statements from .csv file.\n"
|
||||
" Import coda file wizard is used to import bank statements."
|
||||
msgstr ""
|
||||
|
||||
#. module: account_coda
|
||||
#: wizard_button:account.coda_import,extraction,end:0
|
||||
msgid "_Close"
|
||||
msgstr "_Cerrar"
|
||||
|
||||
#. module: account_coda
|
||||
#: field:account.coda,statement_id:0
|
||||
msgid "Generated Bank Statement"
|
||||
msgstr "Extracto bancario generado"
|
||||
|
||||
#. module: account_coda
|
||||
#: view:account.coda:0
|
||||
#: model:ir.actions.act_window,name:account_coda.act_account_payment_account_bank_statement
|
||||
#: model:ir.actions.act_window,name:account_coda.action_account_coda
|
||||
msgid "Coda import"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_coda
|
||||
#: field:account.coda,user_id:0
|
||||
msgid "User"
|
||||
msgstr "Usuario"
|
||||
|
||||
#. module: account_coda
|
||||
#: constraint:ir.ui.view:0
|
||||
msgid "Invalid XML for View Architecture!"
|
||||
msgstr "¡XML inválido para la estructura de la vista!"
|
||||
|
||||
#. module: account_coda
|
||||
#: model:ir.model,name:account_coda.model_account_coda
|
||||
msgid "coda for an Account"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_coda
|
||||
#: wizard_field:account.coda_import,init,def_payable:0
|
||||
msgid "Default Payable Account"
|
||||
msgstr "Cuenta a pagar por defecto"
|
||||
|
||||
#. module: account_coda
|
||||
#: model:ir.ui.menu,name:account_coda.menu_account_coda
|
||||
msgid "Coda Statements"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_coda
|
||||
#: model:ir.ui.menu,name:account_coda.menu_account_coda_wizard
|
||||
msgid "Import Coda Statements"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_coda
|
||||
#: wizard_button:account.coda_import,init,extraction:0
|
||||
msgid "_Ok"
|
||||
msgstr "_Aceptar"
|
||||
|
||||
#. module: account_coda
|
||||
#: wizard_view:account.coda_import,extraction:0
|
||||
#: wizard_view:account.coda_import,init:0
|
||||
msgid "Import Coda Statement"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_coda
|
||||
#: field:account.bank.statement,coda_id:0
|
||||
msgid "Coda"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_coda
|
||||
#: wizard_view:account.coda_import,extraction:0
|
||||
msgid "Results :"
|
||||
msgstr "Resultados :"
|
||||
|
||||
#. module: account_coda
|
||||
#: wizard_field:account.coda_import,init,coda:0
|
||||
msgid "Coda File"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_coda
|
||||
#: field:account.coda,date:0
|
||||
msgid "Import Date"
|
||||
msgstr "Fecha de importación"
|
||||
|
||||
#. module: account_coda
|
||||
#: wizard_view:account.coda_import,init:0
|
||||
msgid "Select your bank journal :"
|
||||
msgstr "Seleccione su diario bancario :"
|
||||
@@ -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-24 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
|
||||
|
||||
@@ -153,13 +153,15 @@ class account_analytic_account(osv.osv):
|
||||
def name_get(self, cr, uid, ids, context={}):
|
||||
if not len(ids):
|
||||
return []
|
||||
reads = self.read(cr, uid, ids, ['name','parent_id'], context)
|
||||
res = []
|
||||
for record in reads:
|
||||
name = record['name']
|
||||
if record['parent_id']:
|
||||
name = record['parent_id'][1]+' / '+name
|
||||
res.append((record['id'], name))
|
||||
for account in self.browse(cr, uid, ids, context=context):
|
||||
data = []
|
||||
acc = account
|
||||
while acc:
|
||||
data.insert(0, acc.name)
|
||||
acc = acc.parent_id
|
||||
data = ' / '.join(data)
|
||||
res.append((account.id, data))
|
||||
return res
|
||||
|
||||
def _complete_name_calc(self, cr, uid, ids, prop, unknow_none, unknow_dict):
|
||||
@@ -197,7 +199,7 @@ class account_analytic_account(osv.osv):
|
||||
'date': fields.date('Date End'),
|
||||
'company_id': fields.many2one('res.company', 'Company', required=True),
|
||||
'company_currency_id': fields.function(_get_company_currency, method=True, type='many2one', relation='res.currency', string='Currency'),
|
||||
'state': fields.selection([('draft','Draft'),('open','Open'), ('pending','Pending'),('cancelled', 'Cancelled'),('close','Closed'),('template', 'Template')], 'State', required=True,readonly=True,
|
||||
'state': fields.selection([('draft','Draft'),('open','Open'), ('pending','Pending'),('cancelled', 'Cancelled'),('close','Closed'),('template', 'Template')], 'State', required=True,
|
||||
help='* When an account is created its in \'Draft\' state.\
|
||||
\n* If any associated partner is there, it can be in \'Open\' state.\
|
||||
\n* If any pending balance is there it can be in \'Pending\'. \
|
||||
@@ -314,7 +316,7 @@ class account_analytic_line(osv.osv):
|
||||
|
||||
_columns = {
|
||||
'name' : fields.char('Description', size=256, required=True),
|
||||
'date' : fields.date('Date', required=True),
|
||||
'date' : fields.date('Date', required=True, select=1),
|
||||
'amount' : fields.float('Amount', required=True, help='Calculated by multiplying the quantity and the price given in the Product\'s cost price.'),
|
||||
'unit_amount' : fields.float('Quantity', help='Specifies the amount of quantity to count.'),
|
||||
'account_id' : fields.many2one('account.analytic.account', 'Analytic Account', required=True, ondelete='cascade', select=True),
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
|
||||
<openerp>
|
||||
<data noupdate="1">
|
||||
<record model="ir.ui.view_sc" id="sc_auction_dash">
|
||||
<field name="name">Auction dashboard</field>
|
||||
<field name="user_id" ref="base.user_root"/>
|
||||
<field name="resource">ir.ui.menu</field>
|
||||
<field name="sequence">4</field>
|
||||
<field name="res_id" ref="menu_board_auction"/>
|
||||
</record>
|
||||
<!-- <record model="ir.ui.view_sc" id="sc_auction_dash">-->
|
||||
<!-- <field name="name">Auction dashboard</field>-->
|
||||
<!-- <field name="user_id" ref="base.user_root"/>-->
|
||||
<!-- <field name="resource">ir.ui.menu</field>-->
|
||||
<!-- <field name="sequence">4</field>-->
|
||||
<!-- <field name="res_id" ref="menu_board_auction"/>-->
|
||||
<!-- </record>-->
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
+259
-247
File diff suppressed because it is too large
Load Diff
@@ -8,13 +8,13 @@ msgstr ""
|
||||
"Project-Id-Version: openobject-addons\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2009-08-28 16:01+0000\n"
|
||||
"PO-Revision-Date: 2010-06-24 02:58+0000\n"
|
||||
"PO-Revision-Date: 2010-06-24 21:17+0000\n"
|
||||
"Last-Translator: Panayiotis Konstantinidis <Unknown>\n"
|
||||
"Language-Team: Greek <el@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-06-24 03:47+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-06-26 03:58+0000\n"
|
||||
"X-Generator: Launchpad (build Unknown)\n"
|
||||
|
||||
#. module: audittrail
|
||||
@@ -159,153 +159,157 @@ msgid ""
|
||||
" Subscribe Rules for read, write, create and delete on objects and check "
|
||||
"logs"
|
||||
msgstr ""
|
||||
"Επιστρέπει στον Διαχειριστή να ακολουθεί τα ίχνη κάθε λειτουργίας του χρήστη "
|
||||
"σε όλα τα αντικείμενα του συστήματος.\n"
|
||||
" Εισάγεται κανόνες για ανάγνωση, εγγραφή, δημιουργία και διαγραφή στα "
|
||||
"αντικείμενα και τα ημερολόγια ελέγχου."
|
||||
|
||||
#. module: audittrail
|
||||
#: field:audittrail.log,timestamp:0
|
||||
msgid "Date"
|
||||
msgstr ""
|
||||
msgstr "Ημερομηνία"
|
||||
|
||||
#. module: audittrail
|
||||
#: field:audittrail.log,user_id:0
|
||||
msgid "User"
|
||||
msgstr ""
|
||||
msgstr "Χρήστης"
|
||||
|
||||
#. module: audittrail
|
||||
#: view:audittrail.log:0
|
||||
msgid "Old Value Text : "
|
||||
msgstr ""
|
||||
msgstr "Παλιά τιμή κειμένου: "
|
||||
|
||||
#. module: audittrail
|
||||
#: constraint:ir.ui.view:0
|
||||
msgid "Invalid XML for View Architecture!"
|
||||
msgstr ""
|
||||
msgstr "Λανθασμένο XML για αρχιτεκτονική όψης!"
|
||||
|
||||
#. module: audittrail
|
||||
#: field:audittrail.log,name:0
|
||||
msgid "Name"
|
||||
msgstr ""
|
||||
msgstr "Όνομα"
|
||||
|
||||
#. module: audittrail
|
||||
#: field:audittrail.log,line_ids:0
|
||||
msgid "Log lines"
|
||||
msgstr ""
|
||||
msgstr "Γραμμές ημερολογίου"
|
||||
|
||||
#. module: audittrail
|
||||
#: model:ir.ui.menu,name:audittrail.menu_action_audittrail_rule_tree_sub
|
||||
msgid "Subscribed Rules"
|
||||
msgstr ""
|
||||
msgstr "Εγγεγραμμένοι Κανόνες"
|
||||
|
||||
#. module: audittrail
|
||||
#: field:audittrail.log.line,field_id:0
|
||||
msgid "Fields"
|
||||
msgstr ""
|
||||
msgstr "Πεδία"
|
||||
|
||||
#. module: audittrail
|
||||
#: view:audittrail.rule:0
|
||||
msgid "AuditTrail Rules"
|
||||
msgstr ""
|
||||
msgstr "Κανόνες διαδρομής ελέγχου"
|
||||
|
||||
#. module: audittrail
|
||||
#: model:ir.model,name:audittrail.model_audittrail_rule
|
||||
msgid "audittrail.rule"
|
||||
msgstr ""
|
||||
msgstr "ελεγκτική ιχνηλάτηση.κανόνες"
|
||||
|
||||
#. module: audittrail
|
||||
#: view:audittrail.rule:0
|
||||
msgid "UnSubscribe"
|
||||
msgstr ""
|
||||
msgstr "Διαγραφείτε"
|
||||
|
||||
#. module: audittrail
|
||||
#: field:audittrail.rule,log_write:0
|
||||
msgid "Log writes"
|
||||
msgstr ""
|
||||
msgstr "Εγγραφές ημερολογίου"
|
||||
|
||||
#. module: audittrail
|
||||
#: model:ir.model,name:audittrail.model_audittrail_log
|
||||
msgid "audittrail.log"
|
||||
msgstr ""
|
||||
msgstr "ελεγκτική ιχνηλάτηση.ημερολόγιο"
|
||||
|
||||
#. module: audittrail
|
||||
#: field:audittrail.log.line,field_description:0
|
||||
msgid "Field Description"
|
||||
msgstr ""
|
||||
msgstr "Περιγραφή πεδίου"
|
||||
|
||||
#. module: audittrail
|
||||
#: selection:audittrail.log,method:0
|
||||
msgid "Delete"
|
||||
msgstr ""
|
||||
msgstr "Διαγραφή"
|
||||
|
||||
#. module: audittrail
|
||||
#: wizard_button:audittrail.view.log,init,open:0
|
||||
msgid "Open Logs"
|
||||
msgstr ""
|
||||
msgstr "Άνοιγμα ημερολογίων"
|
||||
|
||||
#. module: audittrail
|
||||
#: field:audittrail.log.line,new_value_text:0
|
||||
msgid "New value Text"
|
||||
msgstr ""
|
||||
msgstr "Νέα τιμή κειμένου"
|
||||
|
||||
#. module: audittrail
|
||||
#: field:audittrail.rule,name:0
|
||||
msgid "Rule Name"
|
||||
msgstr ""
|
||||
msgstr "Όνομα Κανόνα"
|
||||
|
||||
#. module: audittrail
|
||||
#: field:audittrail.rule,log_read:0
|
||||
msgid "Log reads"
|
||||
msgstr ""
|
||||
msgstr "Αναγνώσεις ημερολογίων"
|
||||
|
||||
#. module: audittrail
|
||||
#: model:ir.ui.menu,name:audittrail.menu_action_audittrail_log_tree
|
||||
msgid "Logs"
|
||||
msgstr ""
|
||||
msgstr "Αρχεία καταγραφής"
|
||||
|
||||
#. module: audittrail
|
||||
#: field:audittrail.log.line,new_value:0
|
||||
msgid "New Value"
|
||||
msgstr ""
|
||||
msgstr "Νέα τιμή"
|
||||
|
||||
#. module: audittrail
|
||||
#: model:ir.ui.menu,name:audittrail.menu_action_log_tree2
|
||||
msgid "View Logs"
|
||||
msgstr ""
|
||||
msgstr "Δείτε τα αρχεία καταγραφής"
|
||||
|
||||
#. module: audittrail
|
||||
#: field:audittrail.rule,log_create:0
|
||||
msgid "Log creates"
|
||||
msgstr ""
|
||||
msgstr "Δημιουργία αρχείων καταγραφής"
|
||||
|
||||
#. module: audittrail
|
||||
#: view:audittrail.log:0
|
||||
msgid "AuditTrail Logs"
|
||||
msgstr ""
|
||||
msgstr "παρακολούθηση της πόρειας των αρχείων καταγραφής"
|
||||
|
||||
#. module: audittrail
|
||||
#: model:ir.ui.menu,name:audittrail.menu_action_audittrail_rule_tree
|
||||
msgid "Rules"
|
||||
msgstr ""
|
||||
msgstr "Κανόνες"
|
||||
|
||||
#. module: audittrail
|
||||
#: view:audittrail.log:0
|
||||
msgid "New Value : "
|
||||
msgstr ""
|
||||
msgstr "Νέα τιμή : "
|
||||
|
||||
#. module: audittrail
|
||||
#: field:audittrail.rule,user_id:0
|
||||
msgid "Users"
|
||||
msgstr ""
|
||||
msgstr "Χρήστες"
|
||||
|
||||
#. module: audittrail
|
||||
#: field:audittrail.log.line,old_value_text:0
|
||||
msgid "Old value Text"
|
||||
msgstr ""
|
||||
msgstr "Παλιά τιμή κειμένου"
|
||||
|
||||
#. module: audittrail
|
||||
#: wizard_button:audittrail.view.log,init,end:0
|
||||
msgid "Cancel"
|
||||
msgstr ""
|
||||
msgstr "Ακύρωση"
|
||||
|
||||
#. module: audittrail
|
||||
#: field:audittrail.rule,log_unlink:0
|
||||
msgid "Log deletes"
|
||||
msgstr ""
|
||||
msgstr "Διαγραφή αρχείων καταγραφής"
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -179,7 +179,7 @@
|
||||
<record id="res_partner_job_2" model="res.partner.job">
|
||||
<field name="address_id" ref="base.res_partner_address_3"/>
|
||||
<field name="function">CTO</field>
|
||||
<field eval=""""info@mediapole.net"""" name="email"/>
|
||||
<field eval=""""info@mycompany.com"""" name="email"/>
|
||||
<field name="contact_id" ref="res_partner_contact_passot0"/>
|
||||
</record>
|
||||
<record id="res_partner_job_3" model="res.partner.job">
|
||||
|
||||
@@ -14,7 +14,7 @@ msgstr ""
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2010-06-24 03:47+0000\n"
|
||||
"X-Launchpad-Export-Date: 2010-06-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-24 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-24 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"
|
||||
|
||||
@@ -13,9 +13,7 @@
|
||||
<xpath expr="//label[@string='description']"
|
||||
position="attributes">
|
||||
<attribute name="string"
|
||||
>Now that OpenERP is installed, We have selected applications commonly useful to users which you can install directly, as well as sets of applications for more specific types or groups of businesses (the vertical modules).
|
||||
|
||||
If you don't think you need any of these right now, you can easily install them later on.</attribute>
|
||||
>The most common applications have been pre selected. You can directly install them. You can either choose generic modules, or select modules for specific business sectors and industries. If you do not think you need any of these right now, you can easily install them later.</attribute>
|
||||
</xpath>
|
||||
<xpath expr='//separator[@string="vsep"]' position='attributes'>
|
||||
<attribute name='string'></attribute>
|
||||
|
||||
@@ -26,9 +26,9 @@
|
||||
<field name="company_id" invisible="1"/>
|
||||
<field name="name" required="True"/><field name="account_no"/>
|
||||
<field name="currency" widget="selection"/><field name="street"/>
|
||||
<field name="zip"/>
|
||||
<field name="street2"/>
|
||||
<field name="country_id"/>
|
||||
<field name="zip"/>
|
||||
<field name="state_id"/>
|
||||
<field name="city"/>
|
||||
<field name="email"/>
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
<attribute name="string">Contact Information</attribute>
|
||||
</form>
|
||||
<xpath expr="//label[@string='description']" position="attributes">
|
||||
<attribute name="string">Information about you and the company you are related too. The Basic information related to the company has already been collected and some more information required by you to fill.</attribute>
|
||||
<attribute name="string">To receive more information, please fill in the form about you and your company. Documentation and/or information will be sent to you as soon as possible.</attribute>
|
||||
</xpath>
|
||||
<xpath expr='//separator[@string="title"]' position='attributes'>
|
||||
<attribute name='string'>Would you like more information or documentation ?</attribute>
|
||||
|
||||
@@ -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-24 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-24 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-24 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-24 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-24 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 "Το Φύλλο Χρόνου μου"
|
||||
@@ -20,7 +20,6 @@
|
||||
##############################################################################
|
||||
|
||||
import crm
|
||||
import crm_mailgate
|
||||
import crm_action_rule
|
||||
import crm_segmentation
|
||||
import crm_meeting
|
||||
|
||||
@@ -19,15 +19,16 @@
|
||||
<field name="res_model">crm.lead</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="view_id" ref="crm.crm_case_tree_view_leads"/>
|
||||
<field name="view_id" ref="crm.crm_case_tree_view_oppor"/>
|
||||
<field name="domain">[('user_id','=',uid),('state','!=','pending'),('state','!=','cancel')]</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.actions.act_window" id="act_my_meetings">
|
||||
<field name="res_model">crm.meeting</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="view_id" ref="crm.crm_case_tree_view_meet"/>
|
||||
<field name="domain">[('user_id','=',uid),('state','!=','pending'),('state','!=','cancel')]</field>
|
||||
<field name="domain">[('user_id','=',uid),('state','!=','cancel'),('date','ilike',time.strftime("%Y-%m"))]</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.actions.act_window" id="act_my_leads_stage">
|
||||
@@ -53,34 +54,28 @@
|
||||
<field name="arch" type="xml">
|
||||
<form string="Connecting Dashboard">
|
||||
<hpaned>
|
||||
|
||||
<child1>
|
||||
|
||||
<action
|
||||
string="My Opportunities"
|
||||
name="%(act_my_leads)d"
|
||||
colspan="4"
|
||||
height="150"
|
||||
width="510"/>
|
||||
|
||||
<action
|
||||
string="My Meetings"
|
||||
name="%(act_my_meetings)d"
|
||||
height="150"
|
||||
colspan="4"/>
|
||||
|
||||
</child1>
|
||||
|
||||
<child2>
|
||||
<action
|
||||
string="My Leads By Stage"
|
||||
string="Revenues by stage"
|
||||
name="%(act_my_leads_stage)d"
|
||||
colspan="4"/>
|
||||
|
||||
<action
|
||||
string="My Sales Pipeline"
|
||||
name="%(act_sales_pipeline)d"
|
||||
colspan="4"/>
|
||||
|
||||
</child2>
|
||||
</hpaned>
|
||||
</form>
|
||||
@@ -105,7 +100,5 @@
|
||||
action="open_board_crm"
|
||||
sequence="1"
|
||||
id="menu_board_crm" icon="terp-graph"/>
|
||||
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
+7
-8
@@ -118,20 +118,18 @@ class crm_case(object):
|
||||
@param context: A standard dictionary for contextual values"""
|
||||
if not context:
|
||||
context = {}
|
||||
|
||||
s = self.get_stage_dict(cr, uid, ids, context=context)
|
||||
section = self._name
|
||||
stage = False
|
||||
stage_pool = self.pool.get('crm.case.stage')
|
||||
for case in self.browse(cr, uid, ids, context):
|
||||
if section in s:
|
||||
st = case.stage_id.id or False
|
||||
if st in s[section]:
|
||||
data = {'stage_id': s[section][st]}
|
||||
stage = stage_pool.browse(cr, uid, s[section][st], context=context)
|
||||
if stage.on_change:
|
||||
data.update({'probability': stage.probability})
|
||||
stage = s[section][st]
|
||||
self.write(cr, uid, [case.id], data)
|
||||
return True
|
||||
return stage
|
||||
|
||||
def get_stage_dict(self, cr, uid, ids, context=None):
|
||||
"""This function gives dictionary for stage according to stage levels
|
||||
@@ -174,9 +172,10 @@ class crm_case(object):
|
||||
s[section] = dict([(v, k) for (k, v) in s[section].iteritems()])
|
||||
if st in s[section]:
|
||||
data = {'stage_id': s[section][st]}
|
||||
stage = stage_pool.browse(cr, uid, s[section][st], context=context)
|
||||
if stage.on_change:
|
||||
data.update({'probability': stage.probability})
|
||||
if s[section][st]:
|
||||
stage = stage_pool.browse(cr, uid, s[section][st], context=context)
|
||||
if stage.on_change:
|
||||
data.update({'probability': stage.probability})
|
||||
self.write(cr, uid, [case.id], data)
|
||||
return True
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -25,26 +25,25 @@
|
||||
<xpath expr="//button[@string='Install Modules']" position="attributes">
|
||||
<attribute name="string">Configure</attribute>
|
||||
</xpath>
|
||||
<group colspan="8">
|
||||
<group colspan="8">
|
||||
<group colspan="4" col="4" groups="base.group_extended" name="other">
|
||||
<field name="crm_claim" />
|
||||
<field name="crm_helpdesk" />
|
||||
<field name="crm_fundraising" />
|
||||
<field name="wiki_sale_faq"/>
|
||||
<field name="sale_crm" invisible="1"/>
|
||||
</group>
|
||||
<group colspan="2" col="2">
|
||||
<separator string="Synchronization" colspan="4" />
|
||||
<field name="crm_caldav" />
|
||||
<field name="fetchmail" />
|
||||
</group>
|
||||
<group colspan="2" col="2">
|
||||
<separator string="Plugins" colspan="4" />
|
||||
<separator string="Plugins" colspan="4" />
|
||||
<field name="thunderbird" />
|
||||
<label string="*Outlook*" />
|
||||
<!-- TODO <field name="outlook" />-->
|
||||
</group>
|
||||
<group colspan="4" col="4" groups="base.group_extended" name="other">
|
||||
<separator string="Additional features" colspan="4" />
|
||||
<field name="crm_claim" />
|
||||
<field name="crm_helpdesk" />
|
||||
<field name="crm_fundraising" />
|
||||
<field name="wiki_sale_faq"/>
|
||||
<field name="sale_crm" invisible="1"/>
|
||||
</group>
|
||||
</group>
|
||||
</data>
|
||||
</field>
|
||||
|
||||
+122
-11
@@ -27,6 +27,9 @@ import time
|
||||
import mx.DateTime
|
||||
from tools.translate import _
|
||||
from crm import crm_case
|
||||
import collections
|
||||
import binascii
|
||||
import tools
|
||||
|
||||
class crm_lead(osv.osv, crm_case):
|
||||
""" CRM Lead Case """
|
||||
@@ -34,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,
|
||||
@@ -94,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', \
|
||||
@@ -117,6 +119,8 @@ and users by email"),
|
||||
domain="[('section_id','=',section_id),\
|
||||
('object_id.model', '=', 'crm.lead')]"),
|
||||
'partner_name': fields.char("Partner Name", size=64),
|
||||
'optin': fields.boolean('Opt-In'),
|
||||
'optout': fields.boolean('Opt-Out'),
|
||||
'type':fields.selection([
|
||||
('lead','Lead'),
|
||||
('opportunity','Opportunity'),
|
||||
@@ -139,8 +143,8 @@ and users by email"),
|
||||
\nIf the case is in progress the state is set to \'Open\'.\
|
||||
\nWhen the case is over, the state is set to \'Done\'.\
|
||||
\nIf the case needs to be reviewed then the state is set to \'Pending\'.'),
|
||||
'message_ids': fields.one2many('mailgate.message', 'res_id', 'Messages', domain=[('history', '=', True),('res_model','=',_name)]),
|
||||
'log_ids': fields.one2many('mailgate.message', 'res_id', 'Logs', domain=[('history', '=', False),('res_model','=',_name)]),
|
||||
'message_ids': fields.one2many('mailgate.message', 'res_id', 'Messages', domain=[('history', '=', True),('model','=',_name)]),
|
||||
'log_ids': fields.one2many('mailgate.message', 'res_id', 'Logs', domain=[('history', '=', False),('model','=',_name)]),
|
||||
}
|
||||
|
||||
_defaults = {
|
||||
@@ -148,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],
|
||||
@@ -231,6 +236,112 @@ and users by email"),
|
||||
}
|
||||
return value
|
||||
|
||||
def stage_next(self, cr, uid, ids, context=None):
|
||||
stage = super(crm_lead, self).stage_next(cr, uid, ids, context)
|
||||
if stage:
|
||||
stage_obj = self.pool.get('crm.case.stage').browse(cr, uid, stage, context=context)
|
||||
if stage_obj.on_change:
|
||||
data = {'probability': stage_obj.probability}
|
||||
self.write(cr, uid, ids, data)
|
||||
return stage
|
||||
|
||||
def message_new(self, cr, uid, msg, context):
|
||||
"""
|
||||
Automatically calls when new email message arrives
|
||||
|
||||
@param self: The object pointer
|
||||
@param cr: the current row, from the database cursor,
|
||||
@param uid: the current user’s ID for security checks
|
||||
"""
|
||||
|
||||
mailgate_pool = self.pool.get('email.server.tools')
|
||||
|
||||
subject = msg.get('subject')
|
||||
body = msg.get('body')
|
||||
msg_from = msg.get('from')
|
||||
priority = msg.get('priority')
|
||||
|
||||
vals = {
|
||||
'name': subject,
|
||||
'email_from': msg_from,
|
||||
'email_cc': msg.get('cc'),
|
||||
'description': body,
|
||||
'user_id': False,
|
||||
}
|
||||
if msg.get('priority', False):
|
||||
vals['priority'] = priority
|
||||
|
||||
res = mailgate_pool.get_partner(cr, uid, msg.get('from') or msg.get_unixfrom())
|
||||
if res:
|
||||
vals.update(res)
|
||||
|
||||
res = self.create(cr, uid, vals, context)
|
||||
|
||||
attachents = msg.get('attachments', [])
|
||||
for attactment in attachents or []:
|
||||
data_attach = {
|
||||
'name': attactment,
|
||||
'datas':binascii.b2a_base64(str(attachents.get(attactment))),
|
||||
'datas_fname': attactment,
|
||||
'description': 'Mail attachment',
|
||||
'res_model': self._name,
|
||||
'res_id': res,
|
||||
}
|
||||
self.pool.get('ir.attachment').create(cr, uid, data_attach)
|
||||
|
||||
return res
|
||||
|
||||
def message_update(self, cr, uid, ids, vals={}, msg="", default_act='pending', context={}):
|
||||
"""
|
||||
@param self: The object pointer
|
||||
@param cr: the current row, from the database cursor,
|
||||
@param uid: the current user’s ID for security checks,
|
||||
@param ids: List of update mail’s IDs
|
||||
"""
|
||||
|
||||
if isinstance(ids, (str, int, long)):
|
||||
ids = [ids]
|
||||
|
||||
msg_from = msg['from']
|
||||
if msg.get('priority'):
|
||||
vals['priority'] = msg.get('priority')
|
||||
|
||||
maps = {
|
||||
'cost':'planned_cost',
|
||||
'revenue': 'planned_revenue',
|
||||
'probability':'probability'
|
||||
}
|
||||
vls = {}
|
||||
for line in msg['body'].split('\n'):
|
||||
line = line.strip()
|
||||
res = tools.misc.command_re.match(line)
|
||||
if res and maps.get(res.group(1).lower()):
|
||||
key = maps.get(res.group(1).lower())
|
||||
vls[key] = res.group(2).lower()
|
||||
vals.update(vls)
|
||||
|
||||
# Unfortunately the API is based on lists
|
||||
# but we want to update the state based on the
|
||||
# previous state, so we have to loop:
|
||||
for case in self.browse(cr, uid, ids, context=context):
|
||||
values = dict(vals)
|
||||
if case.state == 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
|
||||
|
||||
def msg_send(self, cr, uid, id, *args, **argv):
|
||||
|
||||
""" Send The Message
|
||||
@param self: The object pointer
|
||||
@param cr: the current row, from the database cursor,
|
||||
@param uid: the current user’s ID for security checks,
|
||||
@param ids: List of email’s IDs
|
||||
@param *args: Return Tuple Value
|
||||
@param **args: Return Dictionary of Keyword Value
|
||||
"""
|
||||
return True
|
||||
crm_lead()
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
@@ -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>
|
||||
@@ -146,6 +146,11 @@
|
||||
<field name="date_open"/>
|
||||
<field name="date_closed"/>
|
||||
</group>
|
||||
<group colspan="2" col="2">
|
||||
<separator string="Mailings" colspan="2" col="2"/>
|
||||
<field name="optin"/>
|
||||
<field name="optout"/>
|
||||
</group>
|
||||
<group colspan="2" col="2">
|
||||
<separator string="Statistics" colspan="2" col="2"/>
|
||||
<field name="day_open"/>
|
||||
@@ -160,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">
|
||||
@@ -199,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"/>
|
||||
|
||||
@@ -224,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"
|
||||
@@ -248,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>
|
||||
@@ -256,17 +262,16 @@
|
||||
<field name="type">calendar</field>
|
||||
<field name="priority" eval="2"/>
|
||||
<field name="arch" type="xml">
|
||||
<calendar string="Meeting For Leads Generation"
|
||||
date_start="create_date" color="user_id"
|
||||
date_delay="duration">
|
||||
<calendar string="Leads Generation"
|
||||
date_start="create_date" color="user_id">
|
||||
<field name="name" />
|
||||
<field name="partner_name" />
|
||||
<field name="partner_contact" />
|
||||
<field name="partner_address_id" />
|
||||
</calendar>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- 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>
|
||||
@@ -296,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">
|
||||
@@ -315,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'}"/>
|
||||
@@ -330,6 +350,5 @@
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
@@ -1,172 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as
|
||||
# published by the Free Software Foundation, either version 3 of the
|
||||
# License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Affero General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
import time
|
||||
import re
|
||||
import os
|
||||
|
||||
import binascii
|
||||
import mx.DateTime
|
||||
import base64
|
||||
|
||||
from tools.translate import _
|
||||
|
||||
import tools
|
||||
from osv import fields,osv,orm
|
||||
from osv.orm import except_orm
|
||||
import collections
|
||||
|
||||
from tools import command_re
|
||||
|
||||
class mailgate_thread(osv.osv):
|
||||
""" mailgate_thread """
|
||||
_name = "mailgate.thread"
|
||||
_inherit = "mailgate.thread"
|
||||
|
||||
def message_new(self, cr, uid, msg, context):
|
||||
"""
|
||||
Automatically calls when new email message arrives
|
||||
|
||||
@param self: The object pointer
|
||||
@param cr: the current row, from the database cursor,
|
||||
@param uid: the current user’s ID for security checks
|
||||
"""
|
||||
|
||||
mailgate_pool = self.pool.get('email.server.tools')
|
||||
|
||||
subject = msg.get('subject')
|
||||
body = msg.get('body')
|
||||
msg_from = msg.get('from')
|
||||
priority = msg.get('priority')
|
||||
|
||||
vals = {
|
||||
'name': subject,
|
||||
'email_from': msg_from,
|
||||
'email_cc': msg.get('cc'),
|
||||
'description': body,
|
||||
'user_id': False,
|
||||
}
|
||||
if msg.get('priority', False):
|
||||
vals['priority'] = priority
|
||||
|
||||
res = mailgate_pool.get_partner(cr, uid, msg.get('from'))
|
||||
if res:
|
||||
vals.update(res)
|
||||
res = self.create(cr, uid, vals, context)
|
||||
cases = self.browse(cr, uid, [res])
|
||||
self._history(cr, uid, cases, _('Receive'), history=True, details=body, email_from=msg_from, message_id=msg.get('id'))
|
||||
|
||||
attachents = msg.get('attachments', [])
|
||||
for attactment in attachents or []:
|
||||
data_attach = {
|
||||
'name': attactment,
|
||||
'datas':binascii.b2a_base64(str(attachents.get(attactment))),
|
||||
'datas_fname': attactment,
|
||||
'description': 'Mail attachment',
|
||||
'res_model': self._name,
|
||||
'res_id': res,
|
||||
}
|
||||
self.pool.get('ir.attachment').create(cr, uid, data_attach)
|
||||
|
||||
return res
|
||||
|
||||
def message_update(self, cr, uid, ids, vals={}, msg="", default_act='pending', context={}):
|
||||
"""
|
||||
@param self: The object pointer
|
||||
@param cr: the current row, from the database cursor,
|
||||
@param uid: the current user’s ID for security checks,
|
||||
@param ids: List of update mail’s IDs
|
||||
"""
|
||||
|
||||
if isinstance(ids, (str, int, long)):
|
||||
ids = [ids]
|
||||
|
||||
msg_from = msg['from']
|
||||
vals.update({
|
||||
'description': msg['body']
|
||||
})
|
||||
if msg.get('priority', False):
|
||||
vals['priority'] = msg.get('priority')
|
||||
|
||||
maps = {
|
||||
'cost':'planned_cost',
|
||||
'revenue': 'planned_revenue',
|
||||
'probability':'probability'
|
||||
}
|
||||
vls = { }
|
||||
for line in msg['body'].split('\n'):
|
||||
line = line.strip()
|
||||
res = command_re.match(line)
|
||||
if res and maps.get(res.group(1).lower(), False):
|
||||
key = maps.get(res.group(1).lower())
|
||||
vls[key] = res.group(2).lower()
|
||||
|
||||
vals.update(vls)
|
||||
res = self.write(cr, uid, ids, vals)
|
||||
cases = self.browse(cr, uid, ids)
|
||||
message_id = context.get('references_id', False)
|
||||
self._history(cr, uid, cases, _('Receive'), history=True, details=msg['body'], email_from=msg_from, message_id=message_id)
|
||||
#getattr(self, act)(cr, uid, select)
|
||||
return res
|
||||
|
||||
def emails_get(self, cr, uid, ids, context=None):
|
||||
|
||||
"""
|
||||
Get Emails
|
||||
@param self: The object pointer
|
||||
@param cr: the current row, from the database cursor,
|
||||
@param uid: the current user’s ID for security checks,
|
||||
@param ids: List of email’s IDs
|
||||
@param context: A standard dictionary for contextual values
|
||||
"""
|
||||
res = {}
|
||||
|
||||
if isinstance(ids, (str, int, long)):
|
||||
select = [long(ids)]
|
||||
else:
|
||||
select = ids
|
||||
|
||||
for thread in self.browse(cr, uid, select, context=context):
|
||||
values = collections.defaultdict(set)
|
||||
|
||||
for message in thread.message_ids:
|
||||
user_email = (message.user_id and message.user_id.address_id and message.user_id.address_id.email) or False
|
||||
values['user_email'].add(user_email)
|
||||
values['email_from'].add(message.email_from)
|
||||
values['email_cc'].add(message.email_cc or False)
|
||||
|
||||
res[str(thread.id)] = dict((key,list(values[key])) for key, value in values.iteritems())
|
||||
|
||||
return res
|
||||
|
||||
def msg_send(self, cr, uid, id, *args, **argv):
|
||||
|
||||
""" Send The Message
|
||||
@param self: The object pointer
|
||||
@param cr: the current row, from the database cursor,
|
||||
@param uid: the current user’s ID for security checks,
|
||||
@param ids: List of email’s IDs
|
||||
@param *args: Return Tuple Value
|
||||
@param **args: Return Dictionary of Keyword Value
|
||||
"""
|
||||
return True
|
||||
|
||||
mailgate_thread()
|
||||
@@ -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"
|
||||
|
||||
@@ -148,6 +148,7 @@
|
||||
<button string="Invite People"
|
||||
name="%(base_calendar.action_view_calendar_invite_attendee_wizard)d"
|
||||
icon="terp-partner" type="action"
|
||||
attrs="{'readonly': [('state', '=', 'done')]}"
|
||||
context="{'model' : 'crm.meeting', 'attendee_field':'attendee_ids'}" colspan="2"/>
|
||||
<field name="attendee_ids" colspan="4"
|
||||
nolabel="1" widget="one2many" mode="tree,form">
|
||||
@@ -214,10 +215,27 @@
|
||||
<tree string="Meetings"
|
||||
colors="red:state=='open';black:state in ('draft', 'cancel','done','pending')">
|
||||
<field name="name" string="Subject" />
|
||||
<field name="partner_id" string="Partner" />
|
||||
<field name="date" string="Meeting Date" />
|
||||
<field name="date" string="Start Date" />
|
||||
<field name="duration" />
|
||||
<field name="partner_id" string="Partner" />
|
||||
<field name="location" />
|
||||
<field name="categ_id" string="Meeting Type"/>
|
||||
<field name="class" string="Privacy"/>
|
||||
<field name="state"/>
|
||||
<field name="user_id" invisible="1"/>
|
||||
<field name="show_as" invisible="1" string="Show time as"/>
|
||||
<button name="case_reset" string="Reset to Unconfirmed"
|
||||
states="open,done,cancel" type="object"
|
||||
icon="gtk-convert" />
|
||||
<button name="case_open" string="Confirm"
|
||||
states="draft" type="object"
|
||||
icon="gtk-go-forward" />
|
||||
<button name="case_close" string="Done"
|
||||
states="open" type="object"
|
||||
icon="gtk-jump-to" />
|
||||
<button name="case_cancel" string="Cancel"
|
||||
states="draft,open" type="object"
|
||||
icon="gtk-cancel" />
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
@@ -268,6 +286,10 @@
|
||||
help="Current Meetings"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="name" select="1" string="Subject"/>
|
||||
<field name="categ_id" select="1"
|
||||
string="Meeting Type" widget="selection"
|
||||
domain="[('object_id.model', '=', 'crm.meeting')]" />
|
||||
<separator orientation="vertical"/>
|
||||
<field name="partner_id" select="1" />
|
||||
<field name="section_id" select="1" widget="selection">
|
||||
<filter icon="terp-personal+"
|
||||
@@ -282,16 +304,26 @@
|
||||
domain="[]" context="{'group_by':'date'}" />
|
||||
<filter string="Privacy" icon="terp-locked"
|
||||
domain="[]" context="{'group_by':'class'}" />
|
||||
<filter string="Show time as" icon="terp-project"
|
||||
domain="[]" context="{'group_by':'show_as'}" />
|
||||
<separator orientation="vertical" />
|
||||
<filter string="Responsible" icon="terp-personal" domain="[]"
|
||||
context="{'group_by':'user_id'}" />
|
||||
<filter string="Partner" icon="terp-personal" domain="[]"
|
||||
context="{'group_by':'partner_id'}" />
|
||||
<separator orientation="vertical" />
|
||||
<filter string="Meeting Type" help="Meeting Type"
|
||||
icon="terp-stock_symbol-selection" domain="[]"
|
||||
context="{'group_by':'categ_id'}" />
|
||||
<filter string="State" icon="terp-stock_effects-object-colorize" domain="[]"
|
||||
context="{'group_by':'state'}" />
|
||||
<separator orientation="vertical" />
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Extended Options...">
|
||||
<field name="class" select="1" string="Privacy"/>
|
||||
<field name="show_as" string="Show time as" select="1"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -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):
|
||||
@@ -143,9 +143,10 @@ class crm_opportunity(osv.osv):
|
||||
context = {
|
||||
'default_opportunity_id': opp.id,
|
||||
'default_partner_id': opp.partner_id and opp.partner_id.id or False,
|
||||
'default_user_id': uid,
|
||||
'default_section_id': opp.section_id and opp.section_id.id or False,
|
||||
'default_email_from': opp.email_from,
|
||||
'default_state': 'open',
|
||||
'default_state': 'open',
|
||||
'default_name': opp.name
|
||||
}
|
||||
value = {
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
<field name="categ_id" ref="crm.categ_oppor7"/>
|
||||
<field name="stage_id" ref="crm.stage_oppor5"/>
|
||||
<field eval=""Mediapole - 5000 units"" name="name"/>
|
||||
<field eval=""info@mediapole.net"" name="email_from"/>
|
||||
<field eval=""info@mycompany.net"" name="email_from"/>
|
||||
</record>
|
||||
<record id="crm_case_abcfuelcounits0" model="crm.lead">
|
||||
<field eval="40" name="probability"/>
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
<?xml version="1.0"?>
|
||||
<openerp>
|
||||
<data noupdate="1">
|
||||
<data>
|
||||
|
||||
<act_window
|
||||
id="act_crm_opportunity_crm_phonecall_new"
|
||||
name="Phone calls"
|
||||
res_model="crm.phonecall"
|
||||
src_model="crm.lead"
|
||||
view_mode="calendar,tree,form"
|
||||
view_mode="tree,calendar,form"
|
||||
context="{'default_duration': 1.0 ,'default_opportunity_id': active_id}"
|
||||
domain="[('user_id','=',uid),('opportunity_id', '=', active_id)]"
|
||||
domain="[('opportunity_id', '=', active_id)]"
|
||||
view_type="form"/>
|
||||
|
||||
<act_window
|
||||
@@ -19,7 +19,7 @@
|
||||
src_model="crm.lead"
|
||||
view_mode="tree,form,calendar,"
|
||||
context="{'default_duration': 4.0, 'default_opportunity_id': active_id}"
|
||||
domain="[('user_id','=',uid), ('opportunity_id', '=', active_id)]"
|
||||
domain="[('opportunity_id', '=', active_id)]"
|
||||
view_type="form"/>
|
||||
|
||||
<record model="ir.actions.act_window" id="crm_case_category_act_oppor11">
|
||||
|
||||
@@ -154,6 +154,8 @@
|
||||
<field name="fax"/>
|
||||
<newline/>
|
||||
<field name="mobile"/>
|
||||
<field name="optin"/>
|
||||
<field name="optout"/>
|
||||
</group>
|
||||
</page>
|
||||
|
||||
@@ -246,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"
|
||||
@@ -258,6 +261,8 @@
|
||||
<field name="section_id"
|
||||
invisible="context.get('invisible_section', True)" />
|
||||
<field name="user_id"/>
|
||||
<field name="priority" invisible="1"/>
|
||||
<field name="categ_id" invisible="1"/>
|
||||
<field name="state"/>
|
||||
<button name="case_open" string="Open"
|
||||
states="draft,pending" type="object"
|
||||
@@ -299,14 +304,14 @@
|
||||
<field name="arch" type="xml">
|
||||
<search string="Search Opportunities">
|
||||
<filter icon="terp-check"
|
||||
string="Current"
|
||||
string="Current" help="Current Opportunities"
|
||||
name="current"
|
||||
domain="[('state','in',('draft','open'))]"/>
|
||||
<filter icon="terp-camera_test"
|
||||
string="Open"
|
||||
string="Open" help="Open Opportunities"
|
||||
domain="[('state','=','open')]"/>
|
||||
<filter icon="terp-gtk-media-pause"
|
||||
string="Pending"
|
||||
string="Pending" help="Pending Opportunities"
|
||||
domain="[('state','=','pending')]"/>
|
||||
<separator orientation="vertical"/>
|
||||
<filter icon="terp-go-today" string="Today"
|
||||
@@ -338,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'}" />
|
||||
@@ -348,12 +367,14 @@
|
||||
|
||||
<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'}" />
|
||||
<filter string="Exp.Closing" icon="terp-go-month"
|
||||
domain="[]" context="{'group_by':'date_deadline'}" />
|
||||
<filter string="Exp.Closing"
|
||||
icon="terp-go-month"
|
||||
help="Expected Closing" domain="[]"
|
||||
context="{'group_by':'date_deadline'}" />
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
|
||||
@@ -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.\
|
||||
@@ -82,14 +82,14 @@ class crm_phonecall(osv.osv, crm_case):
|
||||
'date_closed': fields.datetime('Closed', readonly=True),
|
||||
'date': fields.datetime('Date'),
|
||||
'opportunity_id': fields.many2one ('crm.lead', 'Opportunity'),
|
||||
'message_ids': fields.one2many('mailgate.message', 'res_id', 'Messages', domain=[('history', '=', True),('res_model','=',_name)]),
|
||||
'log_ids': fields.one2many('mailgate.message', 'res_id', 'Logs', domain=[('history', '=', False),('res_model','=',_name)]),
|
||||
'message_ids': fields.one2many('mailgate.message', 'res_id', 'Messages', domain=[('history', '=', True),('model','=',_name)]),
|
||||
'log_ids': fields.one2many('mailgate.message', 'res_id', 'Logs', domain=[('history', '=', False),('model','=',_name)]),
|
||||
}
|
||||
|
||||
_defaults = {
|
||||
'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>
|
||||
|
||||
|
||||
@@ -38,7 +38,6 @@
|
||||
<field name="model">crm.phonecall</field>
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
|
||||
<tree string="Phone Calls" colors="grey:state in ('cancel','done');blue:state in ('pending',)">
|
||||
<field name="date" string="Date"/>
|
||||
<field name="name" string="Call Summary"/>
|
||||
@@ -246,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-24 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
|
||||
|
||||
@@ -77,7 +77,6 @@ class crm_lead_report(osv.osv):
|
||||
'name': fields.char('Year', size=64, required=False, readonly=True),
|
||||
'user_id':fields.many2one('res.users', 'User', readonly=True),
|
||||
'section_id':fields.many2one('crm.case.section', 'Section', readonly=True),
|
||||
'nbr': fields.integer('# of Cases', readonly=True),
|
||||
'state': fields.selection(AVAILABLE_STATES, 'State', size=16, readonly=True),
|
||||
'avg_answers': fields.function(_get_data, string='Avg. Answers', method=True, type="integer"),
|
||||
'perc_done': fields.function(_get_data, string='%Done', method=True, type="float"),
|
||||
@@ -92,10 +91,10 @@ class crm_lead_report(osv.osv):
|
||||
'create_date': fields.datetime('Create Date', readonly=True),
|
||||
'day': fields.char('Day', size=128, readonly=True),
|
||||
'email': fields.integer('# of Emails', size=128, readonly=True),
|
||||
'delay_open': fields.float('Delay to open',digits=(16,2),readonly=True, group_operator="avg",help="Number of Days to open the case"),
|
||||
'delay_open': fields.float('Delay to Open',digits=(16,2),readonly=True, group_operator="avg",help="Number of Days to open the case"),
|
||||
'delay_close': fields.float('Delay to Close',digits=(16,2),readonly=True, group_operator="avg",help="Number of Days to close the case"),
|
||||
'delay_expected': fields.float('Overpassed Deadline',digits=(16,2),readonly=True, group_operator="avg"),
|
||||
'delay_close': fields.float('Delay to close',digits=(16,2),readonly=True, group_operator="avg",help="Number of Days to close the case"),
|
||||
'probability': fields.float('Probability',digits=(16,2),readonly=True),
|
||||
'probability': fields.float('Probability',digits=(16,2),readonly=True, group_operator="avg"),
|
||||
'planned_revenue': fields.float('Planned Revenue',digits=(16,2),readonly=True),
|
||||
'categ_id': fields.many2one('crm.case.categ', 'Category',\
|
||||
domain="[('section_id','=',section_id),\
|
||||
@@ -107,6 +106,7 @@ class crm_lead_report(osv.osv):
|
||||
'opening_date': fields.date('Opening Date', readonly=True),
|
||||
'creation_date': fields.date('Creation Date', readonly=True),
|
||||
'date_closed': fields.date('Close Date', readonly=True),
|
||||
'nbr': fields.integer('# of Cases', readonly=True),
|
||||
'company_id': fields.many2one('res.company', 'Company', readonly=True),
|
||||
'priority': fields.selection(crm.AVAILABLE_PRIORITIES, 'Priority'),
|
||||
'type':fields.selection([
|
||||
@@ -147,7 +147,7 @@ class crm_lead_report(osv.osv):
|
||||
0 as avg_answers,
|
||||
0.0 as perc_done,
|
||||
0.0 as perc_cancel,
|
||||
(select count(id) from mailgate_message where res_id=c.id and res_model='crm.lead') as email,
|
||||
(select count(id) from mailgate_message where res_id=c.id and model='crm.lead') as email,
|
||||
date_trunc('day',c.create_date) as create_date,
|
||||
avg(extract('epoch' from (c.date_closed-c.create_date)))/(3600*24) as delay_close,
|
||||
avg(extract('epoch' from (c.date_deadline - c.date_closed)))/(3600*24) as delay_expected,
|
||||
|
||||
@@ -23,35 +23,15 @@
|
||||
<field name="partner_id" invisible="1"/>
|
||||
<field name="day" invisible="1"/>
|
||||
<field name="nbr" sum="# Leads"/>
|
||||
<field name="email" sum="#Mails"/>
|
||||
<field name="delay_open" sum='Avg Closing Delay'/>
|
||||
<field name="delay_close" sum='Avg Closing Delay'/>
|
||||
<field name="email" sum="# Mails"/>
|
||||
<field name="delay_open"/>
|
||||
<field name="delay_close"/>
|
||||
<field name="delay_expected"/>
|
||||
<field name="avg_answers"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Leads by user and section Form View -->
|
||||
|
||||
<record id="view_report_crm_lead_form" model="ir.ui.view">
|
||||
<field name="name">crm.lead.report.form</field>
|
||||
<field name="model">crm.lead.report</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Leads Analysis">
|
||||
<field name="name" select="1"/>
|
||||
<field name="month" select="1"/>
|
||||
<field name="user_id" select="1"/>
|
||||
<field name="section_id" select="1"/>
|
||||
<field name="nbr" select="1"/>
|
||||
<field name="delay_close"/>
|
||||
<field name="stage_id"/>
|
||||
<field name="state" select="1"/>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Leads by user and section Graph View -->
|
||||
|
||||
<record id="view_report_crm_lead_graph" model="ir.ui.view">
|
||||
@@ -59,9 +39,9 @@
|
||||
<field name="model">crm.lead.report</field>
|
||||
<field name="type">graph</field>
|
||||
<field name="arch" type="xml">
|
||||
<graph orientation="horizontal" string="Leads Analysis" type="bar">
|
||||
<field name="state"/>
|
||||
<field name="nbr" operator="+"/>
|
||||
<graph orientation="vertical" string="Leads Analysis" type="bar">
|
||||
<field name="stage_id"/>
|
||||
<field name="planned_revenue" operator="+"/>
|
||||
<field group="True" name="user_id"/>
|
||||
</graph>
|
||||
</field>
|
||||
@@ -75,37 +55,49 @@
|
||||
<field name="type">search</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Leads Analysis">
|
||||
<group col="16" colspan="8">
|
||||
<filter string="Last 365 Days" 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="Last 30 Days" 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'))]"/>
|
||||
<group col="20" colspan="8">
|
||||
<filter icon="terp-check"
|
||||
string="Opportunities"
|
||||
name="opportunity"
|
||||
domain="[('type','=','opportunity')]"/>
|
||||
<filter icon="terp-check"
|
||||
string="Leads"
|
||||
name="lead"
|
||||
domain="[('type','=','lead')]"/>
|
||||
<separator orientation="vertical" />
|
||||
<filter string="Last 365 Days" icon="terp-go-year"
|
||||
domain="[('create_date','>',(datetime.date.today()-datetime.timedelta(days=365)).strftime('%%Y-%%m-%%d'))]"/>
|
||||
<filter string="Last 30 Days" icon="terp-go-month" name="this_month"
|
||||
domain="[('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" />
|
||||
domain="[('create_date','>',(datetime.date.today()-datetime.timedelta(days=7)).strftime('%%Y-%%m-%%d'))]"/>
|
||||
<separator orientation="vertical" />
|
||||
<filter icon="terp-check"
|
||||
string="Current"
|
||||
domain="[('state','in',('draft','open')]"/>
|
||||
<filter icon="terp-check"
|
||||
string="Pending"
|
||||
domain="[('state','=','pending')]"/>
|
||||
<separator orientation="vertical" />
|
||||
<field name="section_id"
|
||||
default="context.get('section_id', False)"
|
||||
widget="selection"
|
||||
context="{'invisible_section': False}">
|
||||
<filter icon="terp-crm"
|
||||
context="{'invisible_section': False}"
|
||||
domain="[('section_id.user_id','=',uid)]"
|
||||
help="My section" />
|
||||
</field>
|
||||
<field name="user_id" widget="selection">
|
||||
<filter icon="terp-check"
|
||||
string="Closed"
|
||||
domain="[('state','=','done')]"/>
|
||||
<separator orientation="vertical" />
|
||||
<field name="section_id"
|
||||
default="context.get('section_id', False)"
|
||||
widget="selection"
|
||||
context="{'invisible_section': False}">
|
||||
<filter icon="terp-crm"
|
||||
context="{'invisible_section': False}"
|
||||
domain="[('section_id.user_id','=',uid)]"
|
||||
help="My section" />
|
||||
</field>
|
||||
<field name="user_id">
|
||||
<filter icon="terp-personal+" string="My Case" help="My Case" domain="[('user_id','=',uid)]" />
|
||||
</field>
|
||||
</field>
|
||||
</group>
|
||||
<newline/>
|
||||
<group expand="0" string="Group By...">
|
||||
<filter string="User" name="User" icon="terp-personal"
|
||||
<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" />
|
||||
@@ -133,19 +125,19 @@
|
||||
<filter string="Year" icon="terp-go-year"
|
||||
domain="[]" context="{'group_by':'name'}" />
|
||||
</group>
|
||||
<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.lead')]"/>
|
||||
<field name="categ_id" widget="selection" domain="[('object_id.model', '=', 'crm.lead')]"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
|
||||
<newline/>
|
||||
<field name="creation_date"/>
|
||||
<field name="opening_date"/>
|
||||
<field name="date_closed"/>
|
||||
</group>
|
||||
<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.lead')]"/>
|
||||
<field name="categ_id" widget="selection" domain="[('object_id.model', '=', 'crm.lead')]"/>
|
||||
<separator orientation="vertical"/>
|
||||
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
|
||||
<newline/>
|
||||
<field name="creation_date"/>
|
||||
<field name="opening_date"/>
|
||||
<field name="date_closed"/>
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
@@ -187,10 +179,9 @@
|
||||
<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_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">['|',('type', '=', 'lead'),('type', '=', False)]</field>
|
||||
<field name="search_view_id" ref="view_report_crm_lead_filter"/>
|
||||
<field name="domain">[]</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.actions.act_window.view" id="action_report_crm_lead_tree">
|
||||
@@ -211,10 +202,9 @@
|
||||
<field name="name">Opportunities Analysis</field>
|
||||
<field name="res_model">crm.lead.report</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="context">{"search_default_User":1,"search_default_This Month":1,'group_by_no_leaf':1,'group_by':[]}</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="view_mode">tree,graph</field>
|
||||
<field name="domain">[('type', '=', 'opportunity')]</field>
|
||||
<field name="search_view_id" ref="view_report_crm_lead_filter"/>
|
||||
<field name="domain">[]</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.actions.act_window.view" id="action_report_crm_opportunity_tree">
|
||||
|
||||
@@ -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()
|
||||
|
||||
|
||||
|
||||
@@ -4,62 +4,70 @@
|
||||
|
||||
<!-- Partners inherited form -->
|
||||
|
||||
<!-- <record id="view_crm_partner_info_form" model="ir.ui.view">-->
|
||||
<!-- <field name="name">res.partner.crm.info.inherit</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">-->
|
||||
<!-- <xpath expr="//notebook[last()]" position="after">-->
|
||||
<!-- <notebook colspan="4">-->
|
||||
<!-- <page string="CRM">-->
|
||||
<!-- <field name="meeting_ids" colspan="4" nolabel="1" />-->
|
||||
<!-- <field name="phonecall_ids" colspan="4" nolabel="1" />-->
|
||||
<!-- <field name="opportunity_ids" colspan="4" nolabel="1" domain="[('type', '=', 'opportunity')]">-->
|
||||
<!-- <tree string="Opportunities" colors="blue:state=='pending';grey:state in ('cancel', 'done')">-->
|
||||
<!-- <field name="create_date"/>-->
|
||||
<!-- <field name="partner_name"/>-->
|
||||
<!-- <field name="name"/>-->
|
||||
<!-- <field name="email_from"/>-->
|
||||
<!-- <field name="phone"/>-->
|
||||
<!-- -->
|
||||
<!-- <field name="categ_id" invisible="1"/>-->
|
||||
<!-- <field name="type_id" invisible="1"/>-->
|
||||
<!-- <field name="referred" invisible="1"/>-->
|
||||
<!-- -->
|
||||
<!-- <field name="stage_id"/>-->
|
||||
<!-- <button name="stage_previous" string="Previous"-->
|
||||
<!-- states="open,pending" type="object" icon="gtk-go-back" />-->
|
||||
<!-- <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="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="Close"-->
|
||||
<!-- states="open,draft,pending" type="object"-->
|
||||
<!-- icon="gtk-close" />-->
|
||||
<!-- <button string="Convert to Opportunity"-->
|
||||
<!-- name="convert_opportunity"-->
|
||||
<!-- states="draft,open,pending" icon="gtk-index"-->
|
||||
<!-- type="object" />-->
|
||||
<!-- <button name="case_escalate" string="Escalate"-->
|
||||
<!-- states="open,draft,pending" type="object"-->
|
||||
<!-- icon="gtk-go-up" />-->
|
||||
<!-- <button name="case_cancel" string="Cancel"-->
|
||||
<!-- states="draft,open,pending" type="object"-->
|
||||
<!-- icon="gtk-cancel" />-->
|
||||
<!-- </tree>-->
|
||||
<!-- </field>-->
|
||||
<!-- </page>-->
|
||||
<!-- </notebook>-->
|
||||
<!-- </xpath>-->
|
||||
<!-- </field>-->
|
||||
<!-- </record>-->
|
||||
|
||||
<record id="view_crm_partner_info_form1" model="ir.ui.view">
|
||||
<field name="name">res.partner.crm.info.inherit1</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">
|
||||
<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" />
|
||||
<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="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="Close"
|
||||
states="open,draft,pending" type="object"
|
||||
icon="gtk-close" />
|
||||
<button string="Convert to Opportunity"
|
||||
name="convert_opportunity"
|
||||
states="draft,open,pending" icon="gtk-index"
|
||||
type="object" />
|
||||
<button name="case_escalate" string="Escalate"
|
||||
states="open,draft,pending" type="object"
|
||||
icon="gtk-go-up" />
|
||||
<button name="case_cancel" string="Cancel"
|
||||
states="draft,open,pending" type="object"
|
||||
icon="gtk-cancel" />
|
||||
</tree>
|
||||
</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,35 +4,29 @@
|
||||
"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_mailgate_thread","mailgate.thread","model_mailgate_thread","crm.group_crm_user",1,1,1,1
|
||||
"access_res_partner","res.partner.crm.user","base.model_res_partner","crm.group_crm_user",1,0,0,0
|
||||
"access_res_partner_address","res.partner.address.crm.user","base.model_res_partner_address","crm.group_crm_user",1,0,0,0
|
||||
"access_res_partner_category","res.partner.category.crm.user","base.model_res_partner_category","crm.group_crm_user",1,0,0,0
|
||||
"mail_gateway_mailgate_message","mail_gateway.mailgate.message","mail_gateway.model_mailgate_message","crm.group_crm_user",1,1,1,1
|
||||
"mail_gateway_mailgate_thread","mail_gateway.mailgate.thread","model_mailgate_thread","crm.group_crm_user",1,1,1,1
|
||||
"mail_gateway_mailgate_thread","mail_gateway.mailgate.thread","mail_gateway.model_mailgate_thread","crm.group_crm_user",1,1,1,1
|
||||
|
||||
|
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">
|
||||
|
||||
@@ -81,10 +81,11 @@ class crm_lead2opportunity(osv.osv_memory):
|
||||
'partner_id': this.partner_id.id,
|
||||
'type': 'opportunity'
|
||||
}
|
||||
|
||||
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'),
|
||||
|
||||
@@ -9,13 +9,15 @@
|
||||
<field name="model">crm.opportunity2phonecall</field>
|
||||
<field name="type">form</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Schedule Other Call">
|
||||
<form string="Schedule a PhoneCall">
|
||||
<separator string="Schedule a PhoneCall" colspan="4"/>
|
||||
<group colspan="2" >
|
||||
<field name="name"/>
|
||||
<field name="date" string="Planned Date"/>
|
||||
<newline/>
|
||||
<field name="user_id" />
|
||||
<field name="section_id"/>
|
||||
<separator string="" colspan="4"/>
|
||||
<label string ="" colspan="2"/>
|
||||
<button name="action_cancel" string="_Cancel"
|
||||
icon="gtk-cancel" special="cancel" />
|
||||
|
||||
@@ -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,15 +93,14 @@ 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)
|
||||
message_id = hist.message_id
|
||||
model = hist.model
|
||||
model_pool = self.pool.get(model)
|
||||
res_ids = model_pool.search(cr, uid, [('thread_id','=', hist.thread_id.id)])
|
||||
res_id = res_ids and res_ids[0] or False
|
||||
res_id = hist.res_id
|
||||
case = model_pool.browse(cr, uid, res_id)
|
||||
emails = [obj.email_to]
|
||||
email_cc = (obj.email_cc or '').split(',')
|
||||
@@ -109,16 +109,10 @@ class crm_send_new_email(osv.osv_memory):
|
||||
|
||||
body = case_pool.format_body(body)
|
||||
email_from = getattr(obj, 'email_from', False)
|
||||
|
||||
x_headers = {
|
||||
'model': model,
|
||||
'resource-id': res_id
|
||||
}
|
||||
x_headers = {}
|
||||
if message_id:
|
||||
x_headers['References'] = "%s" % (message_id)
|
||||
|
||||
flag = False
|
||||
|
||||
flag = tools.email_send(
|
||||
email_from,
|
||||
emails,
|
||||
@@ -126,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:
|
||||
@@ -170,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):
|
||||
@@ -196,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):
|
||||
@@ -206,15 +204,12 @@ class crm_send_new_email(osv.osv_memory):
|
||||
return {}
|
||||
|
||||
model_pool = self.pool.get(model)
|
||||
res_ids = model_pool.search(cr, uid, [('thread_id','=', hist.thread_id.id)])
|
||||
res_id = res_ids and res_ids[0] or False
|
||||
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]
|
||||
@@ -257,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">
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
|
||||
from osv import fields, osv
|
||||
from crm import crm
|
||||
|
||||
import time
|
||||
class crm_claim(osv.osv, crm.crm_case):
|
||||
"""
|
||||
Crm claim
|
||||
@@ -88,8 +88,8 @@ class crm_claim(osv.osv, crm.crm_case):
|
||||
\nIf the case is in progress the state is set to \'Open\'.\
|
||||
\nWhen the case is over, the state is set to \'Done\'.\
|
||||
\nIf the case needs to be reviewed then the state is set to \'Pending\'.'),
|
||||
'message_ids': fields.one2many('mailgate.message', 'res_id', 'Messages', domain=[('history', '=', True),('res_model','=',_name)]),
|
||||
'log_ids': fields.one2many('mailgate.message', 'res_id', 'Logs', domain=[('history', '=', False),('res_model','=',_name)]),
|
||||
'message_ids': fields.one2many('mailgate.message', 'res_id', 'Messages', domain=[('history', '=', True),('model','=',_name)]),
|
||||
'log_ids': fields.one2many('mailgate.message', 'res_id', 'Logs', domain=[('history', '=', False),('model','=',_name)]),
|
||||
}
|
||||
|
||||
_defaults = {
|
||||
@@ -100,9 +100,46 @@ class crm_claim(osv.osv, crm.crm_case):
|
||||
'email_from':crm.crm_case. _get_default_email,
|
||||
'state': lambda *a: 'draft',
|
||||
'section_id':crm.crm_case. _get_section,
|
||||
'date': lambda *a: time.strftime('%Y-%m-%d %H:%M:%S'),
|
||||
'company_id': lambda s, cr, uid, c: s.pool.get('res.company')._company_default_get(cr, uid, 'crm.case', context=c),
|
||||
'priority': lambda *a: crm.AVAILABLE_PRIORITIES[2][0],
|
||||
}
|
||||
|
||||
def onchange_partner_id(self, cr, uid, ids, part, email=False):
|
||||
"""This function returns value of partner address based on partner
|
||||
@param self: The object pointer
|
||||
@param cr: the current row, from the database cursor,
|
||||
@param uid: the current user’s ID for security checks,
|
||||
@param ids: List of case IDs
|
||||
@param part: Partner's id
|
||||
@email: Partner's email ID
|
||||
"""
|
||||
if not part:
|
||||
return {'value': {'partner_address_id': False,
|
||||
'email_from': False,
|
||||
'partner_phone': False,
|
||||
'partner_mobile': False
|
||||
}}
|
||||
addr = self.pool.get('res.partner').address_get(cr, uid, [part], ['contact'])
|
||||
data = {'partner_address_id': addr['contact']}
|
||||
data.update(self.onchange_partner_address_id(cr, uid, ids, addr['contact'])['value'])
|
||||
print data
|
||||
return {'value': data}
|
||||
|
||||
def onchange_partner_address_id(self, cr, uid, ids, add, email=False):
|
||||
"""This function returns value of partner email based on Partner Address
|
||||
@param self: The object pointer
|
||||
@param cr: the current row, from the database cursor,
|
||||
@param uid: the current user’s ID for security checks,
|
||||
@param ids: List of case IDs
|
||||
@param add: Id of Partner's address
|
||||
@email: Partner's email ID
|
||||
"""
|
||||
if not add:
|
||||
return {'value': {'email_from': False}}
|
||||
address = self.pool.get('res.partner.address').browse(cr, uid, add)
|
||||
return {'value': {'email_from': address.email, 'partner_phone': address.phone, 'partner_mobile': address.mobile}}
|
||||
|
||||
|
||||
crm_claim()
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -58,7 +58,6 @@
|
||||
<field name="type">tree</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Claims" colors="blue:state=='pending';black:state=='open';grey:state in ('close', 'cancel')">
|
||||
<field name="id"/>
|
||||
<field name="name"/>
|
||||
<field name="partner_id"/>
|
||||
<field name="user_id" />
|
||||
@@ -67,6 +66,8 @@
|
||||
<field name="date_deadline" string="Deadline"/>
|
||||
<field name="date_closed" string="Closure Date"/>
|
||||
<field name="categ_id" string="Type" select="1"/>
|
||||
<field name="stage_id" invisible="1"/>
|
||||
<field name="som" invisible="1"/>
|
||||
<field name="state"/>
|
||||
<button name="case_open" string="Open"
|
||||
states="draft,pending" type="object"
|
||||
@@ -123,8 +124,9 @@
|
||||
<field name="user_id" string="Responsible"/>
|
||||
<field name="section_id" widget="selection"/>
|
||||
<label string="Stage: " align="1.0"/>
|
||||
<group colspan="1" col="2">
|
||||
<group colspan="1" col="3">
|
||||
<field name="stage_id" select="1" nolabel="1"/>
|
||||
<button name="stage_previous" string="" type="object" icon="gtk-go-back" />
|
||||
<button icon="gtk-go-forward" string="" name="stage_next" type="object"/>
|
||||
</group>
|
||||
<field name="categ_id" select="1" widget="selection"
|
||||
@@ -143,18 +145,18 @@
|
||||
<separator colspan="4" string=""/>
|
||||
<group col="8" colspan="4">
|
||||
<field name="state" select="1"/>
|
||||
<button name="case_close" string="Done"
|
||||
states="open,draft,pending" type="object"
|
||||
icon="gtk-jump-to" />
|
||||
<button name="case_open" string="Open"
|
||||
states="draft,pending" type="object"
|
||||
icon="gtk-go-forward" />
|
||||
<button name="case_cancel" string="Cancel"
|
||||
states="draft,open,pending" type="object"
|
||||
icon="gtk-cancel" />
|
||||
<button name="case_pending" string="Pending"
|
||||
states="draft,open" type="object"
|
||||
icon="gtk-media-pause" />
|
||||
<button name="case_close" string="Done"
|
||||
states="open,draft,pending" type="object"
|
||||
icon="gtk-jump-to" />
|
||||
<button name="case_cancel" string="Cancel"
|
||||
states="draft,open,pending" type="object"
|
||||
icon="gtk-cancel" />
|
||||
<button name="case_reset"
|
||||
string="Reset to Draft" states="done,cancel"
|
||||
type="object" icon="gtk-convert" />
|
||||
@@ -291,12 +293,37 @@
|
||||
widget="selection"/>
|
||||
<newline/>
|
||||
<group expand="0" string="Group By...">
|
||||
<filter string="Partner" icon="terp-partner"
|
||||
domain="[]" help="Partner"
|
||||
context="{'group_by':'partner_id'}" />
|
||||
<filter string="Responsible" icon="terp-personal"
|
||||
domain="[]" help="Responsible User"
|
||||
context="{'group_by':'user_id'}" />
|
||||
<filter string="Sales Team" icon="terp-personal+"
|
||||
domain="[]" help="Sales Team"
|
||||
context="{'group_by':'section_id'}" />
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Stage" icon="terp-stage"
|
||||
domain="[]" context="{'group_by':'stage_id'}" />
|
||||
<filter string="Type" icon="terp-stock_symbol-selection"
|
||||
domain="[]" context="{'group_by':'categ_id'}" />
|
||||
<filter string="State"
|
||||
icon="terp-stock_effects-object-colorize"
|
||||
domain="[]" context="{'group_by':'state'}" />
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="Claim Date" icon="terp-go-month"
|
||||
domain="[]" help="Claim Date"
|
||||
context="{'group_by':'date'}" />
|
||||
<filter string="Deadline" icon="terp-go-month"
|
||||
domain="[]"
|
||||
context="{'group_by':'date_deadline'}" />
|
||||
<filter string="Closure" icon="terp-go-month"
|
||||
domain="[]"
|
||||
domain="[]" help="Date Closed"
|
||||
context="{'group_by':'date_closed'}" />
|
||||
<separator orientation="vertical"/>
|
||||
<filter string="State of Mind"
|
||||
icon="terp-face-plain"
|
||||
domain="[]" context="{'group_by':'som'}" />
|
||||
</group>
|
||||
</search>
|
||||
</field>
|
||||
|
||||
@@ -85,8 +85,8 @@ class crm_fundraising(osv.osv, crm.crm_case):
|
||||
\nIf the case is in progress the state is set to \'Open\'.\
|
||||
\nWhen the case is over, the state is set to \'Done\'.\
|
||||
\nIf the case needs to be reviewed then the state is set to \'Pending\'.'),
|
||||
'message_ids': fields.one2many('mailgate.message', 'res_id', 'Messages', domain=[('history', '=', True),('res_model','=',_name)]),
|
||||
'log_ids': fields.one2many('mailgate.message', 'res_id', 'Logs', domain=[('history', '=', False),('res_model','=',_name)]),
|
||||
'message_ids': fields.one2many('mailgate.message', 'res_id', 'Messages', domain=[('history', '=', True),('model','=',_name)]),
|
||||
'log_ids': fields.one2many('mailgate.message', 'res_id', 'Logs', domain=[('history', '=', False),('model','=',_name)]),
|
||||
}
|
||||
|
||||
_defaults = {
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user