[MERGE] lp:openobject-addons
bzr revid: nco@tinyerp.com-20121116052834-3hbo0ywsa7efiwbj
This commit is contained in:
@@ -107,7 +107,7 @@ class account_analytic_line(osv.osv):
|
||||
if journal_id:
|
||||
journal = analytic_journal_obj.browse(cr, uid, journal_id, context=context)
|
||||
if journal.type == 'sale':
|
||||
product_price_type_ids = product_price_type_obj.search(cr, uid, [('field','=','list_price')], context)
|
||||
product_price_type_ids = product_price_type_obj.search(cr, uid, [('field','=','list_price')], context=context)
|
||||
if product_price_type_ids:
|
||||
pricetype = product_price_type_obj.browse(cr, uid, product_price_type_ids, context=context)[0]
|
||||
# Take the company currency as the reference one
|
||||
|
||||
@@ -486,6 +486,19 @@ class account_bank_statement(osv.osv):
|
||||
default['move_line_ids'] = []
|
||||
return super(account_bank_statement, self).copy(cr, uid, id, default, context=context)
|
||||
|
||||
def button_journal_entries(self, cr, uid, ids, context=None):
|
||||
ctx = (context or {}).copy()
|
||||
ctx['journal_id'] = self.browse(cr, uid, ids[0], context=context).journal_id.id
|
||||
return {
|
||||
'view_type':'form',
|
||||
'view_mode':'tree',
|
||||
'res_model':'account.move.line',
|
||||
'view_id':False,
|
||||
'type':'ir.actions.act_window',
|
||||
'domain':[('statement_id','in',ids)],
|
||||
'context':ctx,
|
||||
}
|
||||
|
||||
account_bank_statement()
|
||||
|
||||
class account_bank_statement_line(osv.osv):
|
||||
|
||||
@@ -402,6 +402,7 @@ class account_invoice(osv.osv):
|
||||
'default_res_id': ids[0],
|
||||
'default_use_template': True,
|
||||
'default_template_id': template_id,
|
||||
'default_composition_mode': 'comment',
|
||||
})
|
||||
return {
|
||||
'view_type': 'form',
|
||||
@@ -431,7 +432,7 @@ class account_invoice(osv.osv):
|
||||
if t['state'] in ('draft', 'cancel') and t['internal_number']== False:
|
||||
unlink_ids.append(t['id'])
|
||||
else:
|
||||
raise osv.except_osv(_('Invalid Action!'), _('You cannot delete an invoice which is open or paid. You should refund it instead.'))
|
||||
raise osv.except_osv(_('Invalid Action!'), _('You can not delete an invoice which is not cancelled. You should refund it instead.'))
|
||||
osv.osv.unlink(self, cr, uid, unlink_ids, context=context)
|
||||
return True
|
||||
|
||||
|
||||
@@ -436,7 +436,7 @@
|
||||
</sheet>
|
||||
<div class="oe_chatter">
|
||||
<field name="message_follower_ids" widget="mail_followers"/>
|
||||
<field name="message_ids" colspan="4" widget="mail_thread" nolabel="1"/>
|
||||
<field name="message_ids" widget="mail_thread" placeholder="Share a note..."/>
|
||||
</div>
|
||||
</form>
|
||||
</field>
|
||||
|
||||
@@ -582,7 +582,7 @@ class account_move_line(osv.osv):
|
||||
lines = self.browse(cr, uid, ids, context=context)
|
||||
for l in lines:
|
||||
if l.account_id.type == 'view':
|
||||
raise osv.except_osv(_('Error!'), _('You cannot create journal items on “View” type account %s %s.') % (l.account_id.code, l.account_id.name))
|
||||
return False
|
||||
return True
|
||||
|
||||
def _check_no_closed(self, cr, uid, ids, context=None):
|
||||
|
||||
@@ -302,7 +302,7 @@
|
||||
<field name="domain">[('parent_id','=',False)]</field>
|
||||
</record>
|
||||
|
||||
<record id="view_account_gain_loss_tree" model="ir.ui.view">
|
||||
<record id="view_account_gain_loss_tree" model="ir.ui.view">
|
||||
<field name="name">Unrealized Gain or Loss</field>
|
||||
<field name="model">account.account</field>
|
||||
<field name="arch" type="xml">
|
||||
@@ -322,7 +322,7 @@
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_account_gain_loss" model="ir.actions.act_window">
|
||||
<record id="action_account_gain_loss" model="ir.actions.act_window">
|
||||
<field name="name">Unrealized Gain or Loss</field>
|
||||
<field name="res_model">account.account</field>
|
||||
<field name="view_type">form</field>
|
||||
@@ -650,7 +650,7 @@
|
||||
<field name="ref"/>
|
||||
<field name="partner_id" on_change="onchange_partner_id(partner_id)"/>
|
||||
<field name="type" on_change="onchange_type(partner_id, type)"/>
|
||||
<field domain="[('journal_id','=',parent.journal_id), ('company_id', '=', parent.company_id)]" name="account_id"/>
|
||||
<field name="account_id" options='{"no_open":True}' domain="[('journal_id','=',parent.journal_id), ('company_id', '=', parent.company_id)]"/>
|
||||
<field name="analytic_account_id" groups="analytic.group_analytic_accounting" domain="[('company_id', '=', parent.company_id), ('type', '<>', 'view')]"/>
|
||||
<field name="amount"/>
|
||||
</tree>
|
||||
@@ -661,7 +661,7 @@
|
||||
<field name="ref"/>
|
||||
<field name="partner_id" on_change="onchange_partner_id(partner_id)"/>
|
||||
<field name="type" on_change="onchange_type(partner_id, type)"/>
|
||||
<field domain="[('journal_id', '=', parent.journal_id), ('type', '<>', 'view'), ('company_id', '=', parent.company_id)]" name="account_id"/>
|
||||
<field name="account_id" domain="[('journal_id', '=', parent.journal_id), ('type', '<>', 'view'), ('company_id', '=', parent.company_id)]"/>
|
||||
<field name="analytic_account_id" groups="analytic.group_analytic_accounting" domain="[('company_id', '=', parent.company_id), ('type', '<>', 'view')]"/>
|
||||
<field name="amount"/>
|
||||
<field name="sequence" readonly="0"/>
|
||||
@@ -671,15 +671,24 @@
|
||||
</form>
|
||||
</field>
|
||||
</page>
|
||||
<page string="Journal Entries" name="move_live_ids">
|
||||
<field name="move_line_ids"/>
|
||||
</page>
|
||||
</notebook>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_bank_statement_form_journal_items" model="ir.ui.view">
|
||||
<field name="name">account.bank.statement.journal.items.form.inherit</field>
|
||||
<field name="model">account.bank.statement</field>
|
||||
<field name="inherit_id" ref="view_bank_statement_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//div[@name='import_buttons']" position="inside">
|
||||
<button name="button_journal_entries"
|
||||
string="Journal Items" type="object"
|
||||
attrs="{'invisible':[('state','!=','confirm')]}"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_bank_statement_tree" model="ir.actions.act_window">
|
||||
<field name="name">Bank Statements</field>
|
||||
@@ -1055,7 +1064,7 @@
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_move_line_tree" model="ir.ui.view">
|
||||
<record id="view_move_line_tree" model="ir.ui.view">
|
||||
<field name="name">account.move.line.tree</field>
|
||||
<field name="model">account.move.line</field>
|
||||
<field eval="4" name="priority"/>
|
||||
@@ -1850,7 +1859,7 @@
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_subscription_search" model="ir.ui.view">
|
||||
<record id="view_subscription_search" model="ir.ui.view">
|
||||
<field name="name">account.subscription.search</field>
|
||||
<field name="model">account.subscription</field>
|
||||
<field name="arch" type="xml">
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
<field name="name">Automated Invoice Notification Mail</field>
|
||||
<field name="email_from">${object.user_id.email or object.company_id.email or 'noreply@localhost'}</field>
|
||||
<field name="subject">${object.company_id.name} Invoice (Ref ${object.number or 'n/a' })</field>
|
||||
<field name="email_to">${object.partner_id.email or ''}</field>
|
||||
<field name="email_recipients">${object.partner_id.id}</field>
|
||||
<field name="model_id" ref="account.model_account_invoice"/>
|
||||
<field name="auto_delete" eval="True"/>
|
||||
<field name="body_html"><![CDATA[
|
||||
|
||||
@@ -7,20 +7,20 @@ msgstr ""
|
||||
"Project-Id-Version: OpenERP Server 5.0.0\n"
|
||||
"Report-Msgid-Bugs-To: support@openerp.com\n"
|
||||
"POT-Creation-Date: 2012-02-08 00:35+0000\n"
|
||||
"PO-Revision-Date: 2011-03-17 20:16+0000\n"
|
||||
"PO-Revision-Date: 2012-11-13 15:01+0000\n"
|
||||
"Last-Translator: jpdborgna <Unknown>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Launchpad-Export-Date: 2012-10-30 05:06+0000\n"
|
||||
"X-Generator: Launchpad (build 16206)\n"
|
||||
"X-Launchpad-Export-Date: 2012-11-14 04:40+0000\n"
|
||||
"X-Generator: Launchpad (build 16251)\n"
|
||||
|
||||
#. module: account
|
||||
#: view:account.invoice.report:0
|
||||
#: view:analytic.entries.report:0
|
||||
msgid "last month"
|
||||
msgstr ""
|
||||
msgstr "Ultimo mes"
|
||||
|
||||
#. module: account
|
||||
#: model:process.transition,name:account.process_transition_supplierreconcilepaid0
|
||||
@@ -146,7 +146,7 @@ msgstr "Referencia"
|
||||
#. module: account
|
||||
#: view:account.open.closed.fiscalyear:0
|
||||
msgid "Choose Fiscal Year "
|
||||
msgstr ""
|
||||
msgstr "Seleccione el año fiscal "
|
||||
|
||||
#. module: account
|
||||
#: help:account.payment.term,active:0
|
||||
@@ -159,7 +159,7 @@ msgstr ""
|
||||
#: code:addons/account/account_invoice.py:1430
|
||||
#, python-format
|
||||
msgid "Warning!"
|
||||
msgstr ""
|
||||
msgstr "¡Advertencia!"
|
||||
|
||||
#. module: account
|
||||
#: code:addons/account/account.py:3129
|
||||
@@ -187,7 +187,7 @@ msgstr ""
|
||||
#: code:addons/account/wizard/account_move_journal.py:95
|
||||
#, python-format
|
||||
msgid "Journal: %s"
|
||||
msgstr ""
|
||||
msgstr "Diario: %s"
|
||||
|
||||
#. module: account
|
||||
#: help:account.analytic.journal,type:0
|
||||
@@ -228,6 +228,7 @@ msgstr ""
|
||||
#, python-format
|
||||
msgid "Invoice '%s' is paid partially: %s%s of %s%s (%s%s remaining)"
|
||||
msgstr ""
|
||||
"La factura '%s' está parcialmente pagada: %s%s de %s%s (%s%s pendiente)"
|
||||
|
||||
#. module: account
|
||||
#: model:process.transition,note:account.process_transition_supplierentriesreconcile0
|
||||
@@ -268,7 +269,7 @@ msgstr ""
|
||||
#. module: account
|
||||
#: view:account.fiscalyear.close.state:0
|
||||
msgid "Close Fiscalyear"
|
||||
msgstr ""
|
||||
msgstr "Cerrar ejercicio fiscal"
|
||||
|
||||
#. module: account
|
||||
#: field:account.automatic.reconcile,allow_write_off:0
|
||||
@@ -335,7 +336,7 @@ msgstr ""
|
||||
#. module: account
|
||||
#: view:account.installer:0
|
||||
msgid "Configure"
|
||||
msgstr ""
|
||||
msgstr "Configurar"
|
||||
|
||||
#. module: account
|
||||
#: selection:account.entries.report,month:0
|
||||
@@ -344,7 +345,7 @@ msgstr ""
|
||||
#: selection:report.account.sales,month:0
|
||||
#: selection:report.account_type.sales,month:0
|
||||
msgid "June"
|
||||
msgstr ""
|
||||
msgstr "Junio"
|
||||
|
||||
#. module: account
|
||||
#: model:ir.actions.act_window,help:account.action_account_moves_bank
|
||||
@@ -378,12 +379,12 @@ msgstr "Fecha de creación"
|
||||
#. module: account
|
||||
#: selection:account.journal,type:0
|
||||
msgid "Purchase Refund"
|
||||
msgstr ""
|
||||
msgstr "Devolución de compra"
|
||||
|
||||
#. module: account
|
||||
#: selection:account.journal,type:0
|
||||
msgid "Opening/Closing Situation"
|
||||
msgstr ""
|
||||
msgstr "Situación de apertura/cierre"
|
||||
|
||||
#. module: account
|
||||
#: help:account.journal,currency:0
|
||||
@@ -393,7 +394,7 @@ msgstr "La moneda utilizada para el extracto"
|
||||
#. module: account
|
||||
#: field:account.open.closed.fiscalyear,fyear_id:0
|
||||
msgid "Fiscal Year to Open"
|
||||
msgstr "Año fiscal para abrir"
|
||||
msgstr "Ejercicio fiscal a abrir"
|
||||
|
||||
#. module: account
|
||||
#: help:account.journal,sequence_id:0
|
||||
@@ -495,7 +496,7 @@ msgstr ""
|
||||
#. module: account
|
||||
#: field:account.bank.statement,account_id:0
|
||||
msgid "Account used in this journal"
|
||||
msgstr ""
|
||||
msgstr "Cuenta utilizada en este diario"
|
||||
|
||||
#. module: account
|
||||
#: help:account.aged.trial.balance,chart_account_id:0
|
||||
@@ -557,7 +558,7 @@ msgstr "Cerrar un año fiscal"
|
||||
#. module: account
|
||||
#: model:process.transition,note:account.process_transition_confirmstatementfromdraft0
|
||||
msgid "The accountant confirms the statement."
|
||||
msgstr ""
|
||||
msgstr "El contador confirma la declaración."
|
||||
|
||||
#. module: account
|
||||
#: report:account.account.balance:0
|
||||
@@ -8156,7 +8157,7 @@ msgstr ""
|
||||
#: field:account.bank.statement,balance_end_real:0
|
||||
#: field:account.treasury.report,ending_balance:0
|
||||
msgid "Ending Balance"
|
||||
msgstr "Balance final"
|
||||
msgstr "Saldo Final"
|
||||
|
||||
#. module: account
|
||||
#: help:account.move.line,blocked:0
|
||||
|
||||
@@ -31,7 +31,6 @@
|
||||
-
|
||||
!python {model: account.account}: |
|
||||
ctx={}
|
||||
ctx.update({'model': 'account.account','active_ids':[ref('account.chart0')],'active_id':ref('account.chart0')})
|
||||
data_dict = {'chart_account_id':ref('account.chart0')}
|
||||
from tools import test_reports
|
||||
test_reports.try_report_action(cr, uid, 'action_account_aged_balance_view',wiz_data=data_dict, context=ctx, our_module='account')
|
||||
@@ -40,7 +39,6 @@
|
||||
-
|
||||
!python {model: account.account}: |
|
||||
ctx={}
|
||||
ctx.update({'model': 'account.account','active_ids':[ref('account.chart0')]})
|
||||
data_dict = {'chart_account_id':ref('account.chart0'), 'account_report_id': ref('account_financial_report_balancesheet0')}
|
||||
from tools import test_reports
|
||||
test_reports.try_report_action(cr, uid, 'action_account_report',wiz_data=data_dict, context=ctx, our_module='account')
|
||||
@@ -49,7 +47,6 @@
|
||||
-
|
||||
!python {model: account.account}: |
|
||||
ctx={}
|
||||
ctx.update({'model': 'account.account','active_ids':[ref('account.chart0')]})
|
||||
data_dict = {'chart_account_id':ref('account.chart0')}
|
||||
from tools import test_reports
|
||||
test_reports.try_report_action(cr, uid, 'action_account_balance_menu',wiz_data=data_dict, context=ctx, our_module='account')
|
||||
@@ -60,7 +57,6 @@
|
||||
journal_ids = [ref('account.sales_journal'),ref('account.refund_sales_journal'),ref('account.expenses_journal'),ref('account.refund_expenses_journal'),
|
||||
ref('account.bank_journal'),ref('account.check_journal'),ref('account.cash_journal')]
|
||||
ctx={}
|
||||
ctx.update({'model': 'account.journal.period','active_ids':journal_ids})
|
||||
data_dict = {'chart_account_id':ref('account.chart0')}
|
||||
from tools import test_reports
|
||||
test_reports.try_report_action(cr, uid, 'action_account_central_journal',wiz_data=data_dict, context=ctx, our_module='account')
|
||||
@@ -71,7 +67,6 @@
|
||||
journal_ids = [ref('account.sales_journal'),ref('account.refund_sales_journal'),ref('account.expenses_journal'),ref('account.refund_expenses_journal'),
|
||||
ref('account.bank_journal'),ref('account.check_journal'),ref('account.cash_journal')]
|
||||
ctx={}
|
||||
ctx.update({'model': 'account.journal.period','active_ids':journal_ids})
|
||||
data_dict = {'chart_account_id':ref('account.chart0')}
|
||||
from tools import test_reports
|
||||
test_reports.try_report_action(cr, uid, 'action_account_general_journal',wiz_data=data_dict, context=ctx, our_module='account')
|
||||
@@ -80,7 +75,6 @@
|
||||
-
|
||||
!python {model: account.account}: |
|
||||
ctx={}
|
||||
ctx.update({'model': 'account.account','active_ids':[ref('account.chart0')]})
|
||||
data_dict = {'chart_account_id':ref('account.chart0'),'landscape':False}
|
||||
from tools import test_reports
|
||||
test_reports.try_report_action(cr, uid, 'action_account_general_ledger_menu',wiz_data=data_dict, context=ctx, our_module='account')
|
||||
@@ -89,7 +83,6 @@
|
||||
-
|
||||
!python {model: account.account}: |
|
||||
ctx={}
|
||||
ctx.update({'model': 'account.account','active_ids':[ref('account.chart0')]})
|
||||
data_dict = {'chart_account_id':ref('account.chart0'),'landscape':True}
|
||||
from tools import test_reports
|
||||
test_reports.try_report_action(cr, uid, 'action_account_general_ledger_menu',wiz_data=data_dict, context=ctx, our_module='account')
|
||||
@@ -99,7 +92,6 @@
|
||||
!python {model: account.journal.period}: |
|
||||
journal_ids = [ref('account.sales_journal'),ref('account.refund_sales_journal'),ref('account.expenses_journal'),ref('account.refund_expenses_journal'),ref('account.bank_journal'),ref('account.check_journal'),ref('account.cash_journal')]
|
||||
ctx={}
|
||||
ctx.update({'model': 'account.journal.period','active_ids':journal_ids})
|
||||
data_dict = {'chart_account_id':ref('account.chart0'), 'period_from':ref('period_1'), 'period_to':ref('period_12')}
|
||||
from tools import test_reports
|
||||
test_reports.try_report_action(cr, uid, 'action_account_print_journal',wiz_data=data_dict, context=ctx, our_module='account')
|
||||
@@ -109,7 +101,6 @@
|
||||
!python {model: account.account}: |
|
||||
ctx={}
|
||||
data_dict = {'chart_account_id':ref('account.chart0')}
|
||||
ctx.update({'model': 'account.account','active_ids':[ref('account.chart0')],'active_id':ref('account.chart0')})
|
||||
from tools import test_reports
|
||||
test_reports.try_report_action(cr, uid, 'action_account_partner_balance',wiz_data=data_dict, context=ctx, our_module='account')
|
||||
-
|
||||
@@ -118,7 +109,6 @@
|
||||
!python {model: account.account}: |
|
||||
ctx={}
|
||||
data_dict = {'chart_account_id':ref('account.chart0'),'page_split': True}
|
||||
ctx.update({'model': 'account.account','active_ids':[ref('account.chart0')],'active_id':ref('account.chart0')})
|
||||
from tools import test_reports
|
||||
test_reports.try_report_action(cr, uid, 'action_account_partner_ledger',wiz_data=data_dict, context=ctx, our_module='account')
|
||||
-
|
||||
@@ -127,7 +117,6 @@
|
||||
!python {model: res.partner}: |
|
||||
ctx={}
|
||||
data_dict = {'chart_account_id':ref('account.chart0'),'page_split': False}
|
||||
ctx.update({'model': 'account.account','active_ids':[ref('account.chart0')],'active_id':ref('account.chart0')})
|
||||
from tools import test_reports
|
||||
test_reports.try_report_action(cr, uid, 'action_account_partner_ledger',wiz_data=data_dict, context=ctx, our_module='account')
|
||||
-
|
||||
@@ -135,7 +124,6 @@
|
||||
-
|
||||
!python {model: account.account}: |
|
||||
ctx={}
|
||||
ctx.update({'model': 'account.account','active_ids':[ref('account.chart0')]})
|
||||
data_dict = {'chart_account_id':ref('account.chart0'), 'target_move': 'all', 'account_report_id': ref('account_financial_report_balancesheet0')}
|
||||
from tools import test_reports
|
||||
test_reports.try_report_action(cr, uid, 'action_account_report',wiz_data=data_dict, context=ctx, our_module='account')
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
from . import test_tax
|
||||
|
||||
fast_suite = [test_tax,
|
||||
]
|
||||
@@ -0,0 +1,49 @@
|
||||
from openerp.tests.common import TransactionCase
|
||||
|
||||
class TestTax(TransactionCase):
|
||||
"""Tests for taxes (account.tax)
|
||||
|
||||
We don't really need at this point to link taxes to tax codes
|
||||
(account.tax.code) nor to companies (base.company) to check computation
|
||||
results.
|
||||
"""
|
||||
|
||||
def setUp(self):
|
||||
super(TestTax, self).setUp()
|
||||
self.tax_model = self.registry('account.tax')
|
||||
|
||||
def test_programmatic_tax(self):
|
||||
cr, uid = self.cr, self.uid
|
||||
tax_id = self.tax_model.create(cr, uid, dict(
|
||||
name="Programmatic tax",
|
||||
type='code',
|
||||
python_compute='result = 12.0',
|
||||
python_compute_inv='result = 11.0',
|
||||
))
|
||||
|
||||
tax_records = self.tax_model.browse(cr, uid, [tax_id])
|
||||
res = self.tax_model.compute_all(cr, uid, tax_records, 50.0, 2)
|
||||
|
||||
tax_detail = res['taxes'][0]
|
||||
self.assertEquals(tax_detail['amount'], 24.0)
|
||||
self.assertEquals(res['total_included'], 124.0)
|
||||
|
||||
def test_percent_tax(self):
|
||||
"""Test computations done by a 10 percent tax."""
|
||||
cr, uid = self.cr, self.uid
|
||||
tax_id = self.tax_model.create(cr, uid, dict(
|
||||
name="Percent tax",
|
||||
type='percent',
|
||||
amount='0.1',
|
||||
))
|
||||
|
||||
tax_records = self.tax_model.browse(cr, uid, [tax_id])
|
||||
res = self.tax_model.compute_all(cr, uid, tax_records, 50.0, 2)
|
||||
|
||||
tax_detail = res['taxes'][0]
|
||||
self.assertEquals(tax_detail['amount'], 10.0)
|
||||
self.assertEquals(res['total_included'], 110.0)
|
||||
|
||||
# now the inverse computation
|
||||
res = self.tax_model.compute_inv(cr, uid, tax_records, 55.0, 2)
|
||||
self.assertEquals(res[0]['amount'], 10.0)
|
||||
@@ -14,15 +14,19 @@
|
||||
</xpath>
|
||||
<xpath expr="//notebook/page[@string='Filters']" position="after">
|
||||
<page string="Comparison" attrs="{'invisible': [('enable_filter','=',False)]}">
|
||||
<field name="label_filter" attrs="{'required': [('enable_filter', '=', True)]}"/>
|
||||
<field name="fiscalyear_id_cmp"/><newline/>
|
||||
<field name="filter_cmp"/>
|
||||
<separator string="Dates" colspan="4"/>
|
||||
<field name="date_from_cmp" attrs="{'readonly':[('filter_cmp', '!=', 'filter_date')], 'required':[('filter_cmp', '=', 'filter_date')]}" colspan="4"/>
|
||||
<field name="date_to_cmp" attrs="{'readonly':[('filter_cmp', '!=', 'filter_date')], 'required':[('filter_cmp', '=', 'filter_date')]}" colspan="4"/>
|
||||
<separator string="Periods" colspan="4"/>
|
||||
<field name="period_from_cmp" domain="[('fiscalyear_id', '=', fiscalyear_id_cmp)]" attrs="{'readonly':[('filter_cmp','!=','filter_period')], 'required':[('filter_cmp', '=', 'filter_period')]}" colspan="4"/>
|
||||
<field name="period_to_cmp" domain="[('fiscalyear_id', '=', fiscalyear_id_cmp)]" attrs="{'readonly':[('filter_cmp','!=','filter_period')], 'required':[('filter_cmp', '=', 'filter_period')]}" colspan="4"/>
|
||||
<group>
|
||||
<field name="label_filter" attrs="{'required': [('enable_filter', '=', True)]}"/>
|
||||
<field name="fiscalyear_id_cmp"/><newline/>
|
||||
<field name="filter_cmp"/>
|
||||
</group>
|
||||
<group string="Dates" attrs="{'invisible':[('filter_cmp', '!=', 'filter_date')]}">
|
||||
<field name="date_from_cmp" attrs="{'required':[('filter_cmp', '=', 'filter_date')]}"/>
|
||||
<field name="date_to_cmp" attrs="{'required':[('filter_cmp', '=', 'filter_date')]}"/>
|
||||
</group>
|
||||
<group string="Periods" attrs="{'invisible':[('filter_cmp', '!=', 'filter_period')]}">
|
||||
<field name="period_from_cmp" domain="[('fiscalyear_id', '=', fiscalyear_id_cmp)]" attrs="{'required':[('filter_cmp', '=', 'filter_period')]}"/>
|
||||
<field name="period_to_cmp" domain="[('fiscalyear_id', '=', fiscalyear_id_cmp)]" attrs="{'required':[('filter_cmp', '=', 'filter_period')]}"/>
|
||||
</group>
|
||||
</page>
|
||||
</xpath>
|
||||
<xpath expr="//notebook/page[@string='Journals']" position="replace">
|
||||
|
||||
@@ -27,7 +27,7 @@ class account_open_closed_fiscalyear(osv.osv_memory):
|
||||
_description = "Choose Fiscal Year"
|
||||
_columns = {
|
||||
'fyear_id': fields.many2one('account.fiscalyear', \
|
||||
'Fiscal Year to Open', required=True, help='Select Fiscal Year which you want to remove entries for its End of year entries journal'),
|
||||
'Fiscal Year', required=True, help='Select Fiscal Year which you want to remove entries for its End of year entries journal'),
|
||||
}
|
||||
|
||||
def remove_entries(self, cr, uid, ids, context=None):
|
||||
@@ -36,7 +36,7 @@ class account_open_closed_fiscalyear(osv.osv_memory):
|
||||
data = self.browse(cr, uid, ids, context=context)[0]
|
||||
period_journal = data.fyear_id.end_journal_period_id or False
|
||||
if not period_journal:
|
||||
raise osv.except_osv(_('Error!'), _('You have to set the end of the fiscal year for this journal.'))
|
||||
raise osv.except_osv(_('Error!'), _("You have to set the 'End of Year Entries Journal' for this Fiscal Year which is set after generating opening entries from 'Generate Opening Entries'."))
|
||||
|
||||
ids_move = move_obj.search(cr, uid, [('journal_id','=',period_journal.journal_id.id),('period_id','=',period_journal.period_id.id)])
|
||||
if ids_move:
|
||||
|
||||
@@ -5,14 +5,18 @@
|
||||
<field name="name">account.open.closed.fiscalyear.form</field>
|
||||
<field name="model">account.open.closed.fiscalyear</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Choose Fiscal Year " version="7.0">
|
||||
<form string="Cancel Fiscal Year Opening Entries" version="7.0">
|
||||
<separator string="Cancel Fiscal Year Opening Entries"/>
|
||||
<p class="oe_grey">
|
||||
This wizard will remove the end of year journal entries of selected fiscal year. Note that you can run this wizard many times for the same fiscal year.
|
||||
</p>
|
||||
<group>
|
||||
<field name="fyear_id" domain="[('state','=','draft')]"/>
|
||||
<field name="fyear_id" domain="[('state','=','draft'), ('end_journal_period_id', '!=', False)]"/>
|
||||
</group>
|
||||
<footer>
|
||||
<button string="Open" name="remove_entries" type="object" class="oe_highlight"/>
|
||||
<button string="Cancel Opening Entries" name="remove_entries" type="object" class="oe_highlight"/>
|
||||
or
|
||||
<button string="Cancel" class="oe_link" special="cancel"/>
|
||||
<button string="Discard" class="oe_link" special="cancel"/>
|
||||
</footer>
|
||||
</form>
|
||||
</field>
|
||||
|
||||
@@ -9,8 +9,7 @@
|
||||
<field name="inherit_id" ref="account_common_report_view" />
|
||||
<field name="arch" type="xml">
|
||||
<data>
|
||||
<xpath expr="//field[@name='journal_ids']" position="replace">
|
||||
<field name="journal_ids" colspan="4" nolabel="1" required="0" readonly="1"/>
|
||||
<xpath expr="//notebook/page[@string='Journals']" position="replace">
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='target_move']" position="after">
|
||||
<field name="display_account"/>
|
||||
|
||||
@@ -119,11 +119,11 @@ class account_common_report(osv.osv_memory):
|
||||
|
||||
def _get_fiscalyear(self, cr, uid, context=None):
|
||||
now = time.strftime('%Y-%m-%d')
|
||||
company_id = None
|
||||
company_id = False
|
||||
ids = context.get('active_ids', [])
|
||||
for wiz in self.browse(cr, uid, ids, context=context):
|
||||
company_id = wiz.company_id
|
||||
fiscalyears = self.pool.get('account.fiscalyear').search(cr, uid, [('date_start', '<', now), ('date_stop', '>', now), ('company_id', '=', company_id)], limit=1 )
|
||||
if ids:
|
||||
company_id = self.browse(cr, uid, ids[0], context=context).company_id.id
|
||||
fiscalyears = self.pool.get('account.fiscalyear').search(cr, uid, [('date_start', '<', now), ('date_stop', '>', now), ('company_id', '=', company_id)], limit=1)
|
||||
return fiscalyears and fiscalyears[0] or False
|
||||
|
||||
def _get_all_journal(self, cr, uid, context=None):
|
||||
|
||||
@@ -26,12 +26,10 @@
|
||||
<field name="model">mail.group</field>
|
||||
<field name="res_id" ref="mail.group_all_employees"/>
|
||||
<field name="type">notification</field>
|
||||
<field name="subtype_id" ref="mail.mt_comment"/>
|
||||
<field name="subject">Accounting and Finance application installed!</field>
|
||||
<field name="body"><![CDATA[
|
||||
With OpenERP's accounting, you get instant access to your financial data, and can setup analytic accounting, forecast taxes, control budgets, easily create and send invoices, record bank statements, etc.
|
||||
|
||||
<p>The accounting features are fully integrated with other OpenERP applications to automate all your processes: creation of customer invoices, control of supplier invoices, point-of-sale integration, automated follow-ups, etc.</p>
|
||||
]]></field>
|
||||
<field name="body"><![CDATA[<p>With OpenERP's accounting, you get instant access to your financial data, and can setup analytic accounting, forecast taxes, control budgets, easily create and send invoices, record bank statements, etc.</p>
|
||||
<p>The accounting features are fully integrated with other OpenERP applications to automate all your processes: creation of customer invoices, control of supplier invoices, point-of-sale integration, automated follow-ups, etc.</p>]]></field>
|
||||
</record>
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
@@ -276,7 +276,7 @@
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
<record model="ir.ui.view" id="view_default_inherit_tree">
|
||||
<record model="ir.ui.view" id="view_default_inherit_tree">
|
||||
<field name="name">account.analytic.default.tree.plans</field>
|
||||
<field name="model">account.analytic.default</field>
|
||||
<field name="inherit_id" ref="account_analytic_default.view_account_analytic_default_tree"/>
|
||||
|
||||
@@ -377,16 +377,15 @@ class account_asset_depreciation_line(osv.osv):
|
||||
move_line_obj = self.pool.get('account.move.line')
|
||||
currency_obj = self.pool.get('res.currency')
|
||||
created_move_ids = []
|
||||
asset_ids = []
|
||||
for line in self.browse(cr, uid, ids, context=context):
|
||||
if currency_obj.is_zero(cr, uid, line.asset_id.currency_id, line.remaining_value):
|
||||
can_close = True
|
||||
depreciation_date = time.strftime('%Y-%m-%d')
|
||||
period_ids = period_obj.find(cr, uid, depreciation_date, context=context)
|
||||
company_currency = line.asset_id.company_id.currency_id.id
|
||||
current_currency = line.asset_id.currency_id.id
|
||||
context.update({'date': depreciation_date})
|
||||
amount = currency_obj.compute(cr, uid, current_currency, company_currency, line.amount, context=context)
|
||||
sign = line.asset_id.category_id.journal_id.type = 'purchase' and 1 or -1
|
||||
sign = (line.asset_id.category_id.journal_id.type == 'purchase' and 1) or -1
|
||||
asset_name = line.asset_id.name
|
||||
reference = line.name
|
||||
move_vals = {
|
||||
@@ -409,8 +408,8 @@ class account_asset_depreciation_line(osv.osv):
|
||||
'period_id': period_ids and period_ids[0] or False,
|
||||
'journal_id': journal_id,
|
||||
'partner_id': partner_id,
|
||||
'currency_id': company_currency <> current_currency and current_currency or False,
|
||||
'amount_currency': company_currency <> current_currency and - sign * line.amount or 0.0,
|
||||
'currency_id': company_currency != current_currency and current_currency or False,
|
||||
'amount_currency': company_currency != current_currency and - sign * line.amount or 0.0,
|
||||
'date': depreciation_date,
|
||||
})
|
||||
move_line_obj.create(cr, uid, {
|
||||
@@ -423,16 +422,19 @@ class account_asset_depreciation_line(osv.osv):
|
||||
'period_id': period_ids and period_ids[0] or False,
|
||||
'journal_id': journal_id,
|
||||
'partner_id': partner_id,
|
||||
'currency_id': company_currency <> current_currency and current_currency or False,
|
||||
'amount_currency': company_currency <> current_currency and sign * line.amount or 0.0,
|
||||
'currency_id': company_currency != current_currency and current_currency or False,
|
||||
'amount_currency': company_currency != current_currency and sign * line.amount or 0.0,
|
||||
'analytic_account_id': line.asset_id.category_id.account_analytic_id.id,
|
||||
'date': depreciation_date,
|
||||
'asset_id': line.asset_id.id
|
||||
})
|
||||
self.write(cr, uid, line.id, {'move_id': move_id}, context=context)
|
||||
created_move_ids.append(move_id)
|
||||
if can_close:
|
||||
asset_obj.write(cr, uid, [line.asset_id.id], {'state': 'close'}, context=context)
|
||||
asset_ids.append(line.asset_id.id)
|
||||
# we re-evaluate the assets to determine whether we can close them
|
||||
for asset in asset_obj.browse(cr, uid, list(set(asset_ids)), context=context):
|
||||
if currency_obj.is_zero(cr, uid, asset.currency_id, asset.value_residual):
|
||||
asset.write({'state': 'close'})
|
||||
return created_move_ids
|
||||
|
||||
account_asset_depreciation_line()
|
||||
|
||||
@@ -72,12 +72,12 @@
|
||||
<field name="date" readonly="1"/>
|
||||
<field name="val_date" readonly="1"/>
|
||||
<field name="name"/>
|
||||
<field name="statement_id" readonly="1"/>
|
||||
<field name="statement_id"/>
|
||||
<field name="ref" readonly="1"/>
|
||||
<field name="partner_id" on_change="onchange_partner_id(partner_id)"/>
|
||||
<field name="type" on_change="onchange_type(partner_id, type)"/>
|
||||
<field name="account_id" domain="[('journal_id','=',journal_id)]"/>
|
||||
<field name="analytic_account_id" groups="analytic.group_analytic_accounting" domain="[('company_id', '=', parent.company_id), ('type', '<>', 'view')]"/>
|
||||
<field name="account_id"/>
|
||||
<field name="analytic_account_id" groups="analytic.group_analytic_accounting" domain="[('type', '<>', 'view')]"/>
|
||||
<field name="amount" readonly="1" sum="Total Amount"/>
|
||||
<field name="globalisation_id" string="Glob. Id"/>
|
||||
<field name="globalisation_amount" string="Glob. Am."/>
|
||||
@@ -100,8 +100,8 @@
|
||||
<field name="ref" readonly="0"/>
|
||||
<field name="partner_id" on_change="onchange_partner_id(partner_id)"/>
|
||||
<field name="type" on_change="onchange_type(partner_id, type)"/>
|
||||
<field domain="[('journal_id', '=', journal_id), ('type', '<>', 'view')]" name="account_id"/>
|
||||
<field name="analytic_account_id" groups="analytic.group_analytic_accounting" domain="[('company_id', '=', parent.company_id), ('type', '<>', 'view')]"/>
|
||||
<field domain="[('type', '<>', 'view')]" name="account_id"/>
|
||||
<field name="analytic_account_id" groups="analytic.group_analytic_accounting" domain="[('type', '<>', 'view')]"/>
|
||||
<field name="amount"/>
|
||||
<field name="globalisation_id"/>
|
||||
<field name="sequence" readonly="0"/>
|
||||
|
||||
@@ -220,7 +220,18 @@
|
||||
<menuitem parent="next_id_31"
|
||||
id="menu_act_crossovered_budget_view"
|
||||
action="act_crossovered_budget_view" sequence="1" />
|
||||
|
||||
|
||||
<record id="view_crossovered_budget_line_search" model="ir.ui.view">
|
||||
<field name="name">account.budget.line.search</field>
|
||||
<field name="model">crossovered.budget.lines</field>
|
||||
<field name="type">search</field>
|
||||
<field name="arch" type="xml">
|
||||
<search string="Budget Lines">
|
||||
<field name="analytic_account_id"/>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record model="ir.ui.view" id="view_crossovered_budget_line_tree">
|
||||
<field name="name">crossovered.budget.line.tree</field>
|
||||
<field name="model">crossovered.budget.lines</field>
|
||||
|
||||
@@ -267,6 +267,7 @@ class account_voucher(osv.osv):
|
||||
_order = "date desc, id desc"
|
||||
# _rec_name = 'number'
|
||||
_columns = {
|
||||
'active': fields.boolean('Active', help="By default, reconciliation vouchers made on draft bank statements are set as inactive, which allow to hide the customer/supplier payment while the bank statement isn't confirmed."),
|
||||
'type':fields.selection([
|
||||
('sale','Sale'),
|
||||
('purchase','Purchase'),
|
||||
@@ -328,6 +329,7 @@ class account_voucher(osv.osv):
|
||||
'is_multi_currency': fields.boolean('Multi Currency Voucher', help='Fields with internal purpose only that depicts if the voucher is a multi currency one or not'),
|
||||
}
|
||||
_defaults = {
|
||||
'active': True,
|
||||
'period_id': _get_period,
|
||||
'partner_id': _get_partner,
|
||||
'journal_id':_get_journal,
|
||||
@@ -381,8 +383,9 @@ class account_voucher(osv.osv):
|
||||
total_tax = 0.0
|
||||
|
||||
if not tax[0].price_include:
|
||||
for tax_line in tax_pool.compute_all(cr, uid, tax, voucher_amount, 1).get('taxes', []):
|
||||
total_tax += tax_line.get('amount', 0.0)
|
||||
for line in voucher.line_ids:
|
||||
for tax_line in tax_pool.compute_all(cr, uid, tax, line.amount, 1).get('taxes', []):
|
||||
total_tax += tax_line.get('amount', 0.0)
|
||||
total += total_tax
|
||||
else:
|
||||
for line in voucher.line_ids:
|
||||
@@ -413,31 +416,31 @@ class account_voucher(osv.osv):
|
||||
|
||||
line_ids = resolve_o2m_operations(cr, uid, line_pool, line_ids, ["amount"], context)
|
||||
|
||||
total_tax = 0.0
|
||||
for line in line_ids:
|
||||
line_amount = 0.0
|
||||
line_amount = line.get('amount',0.0)
|
||||
|
||||
if tax_id:
|
||||
tax = [tax_pool.browse(cr, uid, tax_id, context=context)]
|
||||
if partner_id:
|
||||
partner = partner_pool.browse(cr, uid, partner_id, context=context) or False
|
||||
taxes = position_pool.map_tax(cr, uid, partner and partner.property_account_position or False, tax)
|
||||
tax = tax_pool.browse(cr, uid, taxes, context=context)
|
||||
|
||||
if not tax[0].price_include:
|
||||
for tax_line in tax_pool.compute_all(cr, uid, tax, line_amount, 1).get('taxes', []):
|
||||
total_tax += tax_line.get('amount')
|
||||
|
||||
voucher_total += line_amount
|
||||
|
||||
total = voucher_total
|
||||
total_tax = 0.0
|
||||
if tax_id:
|
||||
tax = [tax_pool.browse(cr, uid, tax_id, context=context)]
|
||||
if partner_id:
|
||||
partner = partner_pool.browse(cr, uid, partner_id, context=context) or False
|
||||
taxes = position_pool.map_tax(cr, uid, partner and partner.property_account_position or False, tax)
|
||||
tax = tax_pool.browse(cr, uid, taxes, context=context)
|
||||
|
||||
if not tax[0].price_include:
|
||||
for tax_line in tax_pool.compute_all(cr, uid, tax, voucher_total, 1).get('taxes', []):
|
||||
total_tax += tax_line.get('amount')
|
||||
total += total_tax
|
||||
total = voucher_total + total_tax
|
||||
|
||||
res.update({
|
||||
'amount':total or voucher_total,
|
||||
'tax_amount':total_tax
|
||||
'amount': total or voucher_total,
|
||||
'tax_amount': total_tax
|
||||
})
|
||||
return {
|
||||
'value':res
|
||||
'value': res
|
||||
}
|
||||
|
||||
def onchange_term_id(self, cr, uid, ids, term_id, amount):
|
||||
@@ -1507,6 +1510,15 @@ account_voucher_line()
|
||||
class account_bank_statement(osv.osv):
|
||||
_inherit = 'account.bank.statement'
|
||||
|
||||
def button_confirm_bank(self, cr, uid, ids, context=None):
|
||||
voucher_obj = self.pool.get('account.voucher')
|
||||
voucher_ids = []
|
||||
for statement in self.browse(cr, uid, ids, context=context):
|
||||
voucher_ids += [line.voucher_id.id for line in statement.line_ids if line.voucher_id]
|
||||
if voucher_ids:
|
||||
voucher_obj.write(cr, uid, voucher_ids, {'active': True}, context=context)
|
||||
return super(account_bank_statement, self).button_confirm_bank(cr, uid, ids, context=context)
|
||||
|
||||
def button_cancel(self, cr, uid, ids, context=None):
|
||||
voucher_obj = self.pool.get('account.voucher')
|
||||
for st in self.browse(cr, uid, ids, context=context):
|
||||
@@ -1542,6 +1554,16 @@ account_bank_statement()
|
||||
class account_bank_statement_line(osv.osv):
|
||||
_inherit = 'account.bank.statement.line'
|
||||
|
||||
def onchange_partner_id(self, cr, uid, ids, partner_id, context=None):
|
||||
res = super(account_bank_statement_line, self).onchange_partner_id(cr, uid, ids, partner_id, context=context)
|
||||
if 'value' not in res:
|
||||
res['value'] = {}
|
||||
res['value'].update({'voucher_id' : False})
|
||||
return res
|
||||
|
||||
def onchange_amount(self, cr, uid, ids, amount, context=None):
|
||||
return {'value' : {'voucher_id' : False}}
|
||||
|
||||
def _amount_reconciled(self, cursor, user, ids, name, args, context=None):
|
||||
if not ids:
|
||||
return {}
|
||||
@@ -1568,7 +1590,7 @@ class account_bank_statement_line(osv.osv):
|
||||
_columns = {
|
||||
'amount_reconciled': fields.function(_amount_reconciled,
|
||||
string='Amount reconciled', type='float'),
|
||||
'voucher_id': fields.many2one('account.voucher', 'Payment'),
|
||||
'voucher_id': fields.many2one('account.voucher', 'Reconciliation'),
|
||||
}
|
||||
|
||||
def unlink(self, cr, uid, ids, context=None):
|
||||
|
||||
@@ -7,12 +7,10 @@
|
||||
<field name="model">mail.group</field>
|
||||
<field name="res_id" ref="mail.group_all_employees"/>
|
||||
<field name="type">notification</field>
|
||||
<field name="subtype_id" ref="mail.mt_comment"/>
|
||||
<field name="subject">eInvoicing & Payments application installed!</field>
|
||||
<field name="body"><![CDATA[
|
||||
OpenERP's electronic invoicing accelerates the creation of invoices and collection of customer payments. Invoices are created in a few clicks and your customers receive them by email. They can pay online and/or import them in their own system.
|
||||
|
||||
<p>You can track customer payments easily and automate follow-ups. You get an overview of the discussion with your customers on each invoice for easier traceability. For advanced accounting features, you should install the "Accounting and Finance" module.</p>
|
||||
]]></field>
|
||||
<field name="body"><![CDATA[<p>OpenERP's electronic invoicing accelerates the creation of invoices and collection of customer payments. Invoices are created in a few clicks and your customers receive them by email. They can pay online and/or import them in their own system.</p>
|
||||
<p>You can track customer payments easily and automate follow-ups. You get an overview of the discussion with your customers on each invoice for easier traceability. For advanced accounting features, you should install the "Accounting and Finance" module.</p>]]></field>
|
||||
</record>
|
||||
|
||||
<!-- mail: subtypes -->
|
||||
|
||||
@@ -200,33 +200,29 @@
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//div[@name='import_buttons']" position="inside">
|
||||
<button name="%(action_view_account_statement_from_invoice_lines)d"
|
||||
string="Import Invoices" type="action" icon="gtk-execute"
|
||||
string="Import Invoices" type="action"
|
||||
attrs="{'invisible':[('state','=','confirm')]}"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_bank_statement_tree_voucher" model="ir.ui.view">
|
||||
<record id="view_bank_statement_form_voucher" model="ir.ui.view">
|
||||
<field name="name">account.bank.statement.voucher.tree.inherit</field>
|
||||
<field name="model">account.bank.statement</field>
|
||||
<field name="inherit_id" ref="account.view_bank_statement_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//page[@name='statement_line_ids']/field[@name='line_ids']/tree/field[@name='amount']" position="after">
|
||||
<field name="voucher_id" context="{'line_type': type, 'default_type': amount < 0 and 'payment' or 'receipt', 'type': amount < 0 and 'payment' or 'receipt', 'default_partner_id': partner_id, 'default_journal_id': parent.journal_id, 'default_amount': abs(amount), 'default_reference': ref, 'default_date': date, 'default_name': name}"/>
|
||||
<field name="voucher_id" widget="many2onebutton" options="{'label':{'create':'Reconcile','edit':'Edit Reconciliation'}}" context="{'line_type': type, 'default_type': amount < 0 and 'payment' or 'receipt', 'type': amount < 0 and 'payment' or 'receipt', 'default_partner_id': partner_id, 'default_journal_id': parent.journal_id, 'default_amount': abs(amount), 'default_reference': ref, 'default_date': date, 'default_name': name, 'default_active': False}"/>
|
||||
</xpath>
|
||||
<xpath expr="//page[@name='statement_line_ids']/field[@name='line_ids']/form/group/field[@name='sequence']" position="before">
|
||||
<field name="voucher_id" widget="many2onebutton" options="{'label':{'create':'Reconcile','edit':'Edit Reconciliation'}}" context="{'line_type': type, 'default_type': amount < 0 and 'payment' or 'receipt', 'type': amount < 0 and 'payment' or 'receipt', 'default_partner_id': partner_id, 'default_journal_id': parent.journal_id, 'default_amount': abs(amount), 'default_reference': ref, 'default_date': date, 'default_name': name, 'default_active': False}"/>
|
||||
</xpath>
|
||||
<field name="amount" position="attributes">
|
||||
<attribute name="on_change">onchange_amount(amount)</attribute>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="view_bank_statement_form_voucher" model="ir.ui.view">
|
||||
<field name="name">account.bank.statement.voucher.form.inherit</field>
|
||||
<field name="model">account.bank.statement</field>
|
||||
<field name="inherit_id" ref="account.view_bank_statement_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//page[@name='statement_line_ids']/field[@name='line_ids']/form/group/field[@name='sequence']" position="before">
|
||||
<field name="voucher_id" context="{'line_type': type, 'default_type': amount < 0 and 'payment' or 'receipt', 'type': amount < 0 and 'payment' or 'receipt', 'default_partner_id': partner_id, 'default_journal_id': parent.journal_id, 'default_amount': abs(amount), 'default_reference': ref, 'default_date': date, 'default_name': name}"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
<record id="view_cash_statement_tree_voucher" model="ir.ui.view">
|
||||
<field name="name">account.cash.statement.voucher.tree.inherit</field>
|
||||
<field name="model">account.bank.statement</field>
|
||||
|
||||
@@ -392,35 +392,33 @@
|
||||
<field name="model">account.voucher</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Receipt" version="7.0">
|
||||
<header>
|
||||
<button name="proforma_voucher" string="Validate" states="draft" invisible="context.get('line_type', False)" class="oe_highlight"/>
|
||||
<button name="cancel_voucher" string="Cancel" states="draft,proforma" invisible="context.get('line_type', False)"/>
|
||||
<button name="cancel_voucher" string="Unreconcile" type="object" states="posted" invisible="context.get('line_type', False)" confirm="Are you sure to unreconcile and cancel this record ?"/>
|
||||
<button name="action_cancel_draft" type="object" states="cancel" string="Set to Draft" invisible="context.get('line_type', False)"/>
|
||||
<header invisible="context.get('line_type', False)">
|
||||
<button name="proforma_voucher" string="Validate" states="draft" class="oe_highlight"/>
|
||||
<button name="cancel_voucher" string="Cancel" states="draft,proforma"/>
|
||||
<button name="cancel_voucher" string="Unreconcile" type="object" states="posted" confirm="Are you sure to unreconcile and cancel this record ?"/>
|
||||
<button name="action_cancel_draft" type="object" states="cancel" string="Set to Draft"/>
|
||||
<field name="state" widget="statusbar" statusbar_visible="draft,posted" statusbar_colors='{"proforma":"blue"}'/>
|
||||
</header>
|
||||
<sheet>
|
||||
<h1 attrs="{'invisible': [('number','=',False)]}"><field name="number"/></h1>
|
||||
<group>
|
||||
<group invisible="context.get('line_type', False)">
|
||||
<group>
|
||||
<field name="partner_id" domain="[('customer','=',True)]" required="1" invisible="context.get('line_type', False)" on_change="onchange_partner_id(partner_id, journal_id, amount, currency_id, type, date, context)" string="Customer" context="{'search_default_customer': 1}"/>
|
||||
<field name="partner_id" domain="[('customer','=',True)]" required="1" on_change="onchange_partner_id(partner_id, journal_id, amount, currency_id, type, date, context)" string="Customer" context="{'search_default_customer': 1}"/>
|
||||
<field name="currency_id" invisible="1"/>
|
||||
<field name="amount" class="oe_inline"
|
||||
string="Paid Amount"
|
||||
widget="monetary" options="{'currency_field': 'currency_id'}"
|
||||
invisible="context.get('line_type', False)"
|
||||
on_change="onchange_amount(amount, payment_rate, partner_id, journal_id, currency_id, type, date, payment_rate_currency_id, company_id, context)"/>
|
||||
<field name="journal_id"
|
||||
domain="[('type','in',['bank', 'cash'])]"
|
||||
invisible="context.get('line_type', False)"
|
||||
widget="selection"
|
||||
on_change="onchange_journal(journal_id, line_cr_ids, False, partner_id, date, amount, type, company_id, context)"
|
||||
string="Payment Method"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="date" invisible="context.get('line_type', False)" on_change="onchange_date(date, currency_id, payment_rate_currency_id, amount, company_id, context)"/>
|
||||
<field name="reference" invisible="context.get('line_type', False)" string="Payment Ref" placeholder="e.g. 003/10"/>
|
||||
<field name="name" colspan="2" invisible="context.get('line_type', False)" placeholder="e.g. Invoice SAJ/0042"/>
|
||||
<field name="date" on_change="onchange_date(date, currency_id, payment_rate_currency_id, amount, company_id, context)"/>
|
||||
<field name="reference" string="Payment Ref" placeholder="e.g. 003/10"/>
|
||||
<field name="name" colspan="2" placeholder="e.g. Invoice SAJ/0042"/>
|
||||
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
|
||||
|
||||
<field name="account_id"
|
||||
@@ -432,7 +430,7 @@
|
||||
</group>
|
||||
<notebook>
|
||||
<page string="Payment Information" groups="base.group_user">
|
||||
<label for="line_cr_ids"/>
|
||||
<label for="line_cr_ids" invisible="context.get('line_type', False)"/>
|
||||
<field name="line_cr_ids" context="{'journal_id':journal_id, 'type':type, 'partner_id':partner_id}" on_change="onchange_line_ids(line_dr_ids, line_cr_ids, amount, currency_id, type, context)">
|
||||
<tree string="Invoices and outstanding transactions" editable="bottom" colors="gray:amount==0">
|
||||
<field name="move_line_id" context="{'journal_id':parent.journal_id, 'partner_id':parent.partner_id}"
|
||||
@@ -513,7 +511,7 @@
|
||||
</page>
|
||||
</notebook>
|
||||
</sheet>
|
||||
<div class="oe_chatter">
|
||||
<div class="oe_chatter" invisible="context.get('line_type', False)">
|
||||
<field name="message_follower_ids" widget="mail_followers"/>
|
||||
<field name="message_ids" widget="mail_thread"/>
|
||||
</div>
|
||||
|
||||
@@ -327,7 +327,7 @@ class account_analytic_line(osv.osv):
|
||||
'date': fields.date('Date', required=True, select=True),
|
||||
'amount': fields.float('Amount', required=True, help='Calculated by multiplying the quantity and the price given in the Product\'s cost price. Always expressed in the company main currency.', digits_compute=dp.get_precision('Account')),
|
||||
'unit_amount': fields.float('Quantity', help='Specifies the amount of quantity to count.'),
|
||||
'account_id': fields.many2one('account.analytic.account', 'Analytic Account', required=True, ondelete='cascade', select=True, domain=[('type','<>','view')]),
|
||||
'account_id': fields.many2one('account.analytic.account', 'Analytic Account', required=True, ondelete='restrict', select=True, domain=[('type','<>','view')]),
|
||||
'user_id': fields.many2one('res.users', 'User'),
|
||||
'company_id': fields.related('account_id', 'company_id', type='many2one', relation='res.company', string='Company', store=True, readonly=True),
|
||||
|
||||
|
||||
@@ -346,8 +346,13 @@ class audittrail_objects_proxy(object_proxy):
|
||||
x2m_model_id = x2m_model_ids and x2m_model_ids[0] or False
|
||||
assert x2m_model_id, _("'%s' Model does not exist..." %(field_obj._obj))
|
||||
x2m_model = pool.get('ir.model').browse(cr, SUPERUSER_ID, x2m_model_id)
|
||||
#recursive call on x2m fields that need to be checked too
|
||||
data.update(self.get_data(cr, SUPERUSER_ID, pool, resource[field], x2m_model, method))
|
||||
field_resource_ids = list(set(resource[field]))
|
||||
if model.model == x2m_model.model:
|
||||
# we need to remove current resource_id from the many2many to prevent an infinit loop
|
||||
if resource_id in field_resource_ids:
|
||||
field_resource_ids.remove(resource_id)
|
||||
data.update(self.get_data(cr, SUPERUSER_ID, pool, field_resource_ids, x2m_model, method))
|
||||
|
||||
data[(model.id, resource_id)] = {'text':values_text, 'value': values}
|
||||
return data
|
||||
|
||||
@@ -408,6 +413,10 @@ class audittrail_objects_proxy(object_proxy):
|
||||
x2m_new_values_ids = new_values.get(key, {'value': {}})['value'].get(field_name, [])
|
||||
# We use list(set(...)) to remove duplicates.
|
||||
res_ids = list(set(x2m_old_values_ids + x2m_new_values_ids))
|
||||
if model.model == x2m_model.model:
|
||||
# we need to remove current resource_id from the many2many to prevent an infinit loop
|
||||
if resource_id in res_ids:
|
||||
res_ids.remove(resource_id)
|
||||
for res_id in res_ids:
|
||||
lines.update(self.prepare_audittrail_log_line(cr, SUPERUSER_ID, pool, x2m_model, res_id, method, old_values, new_values, field_list))
|
||||
# if the value value is different than the old value: record the change
|
||||
|
||||
@@ -4,11 +4,11 @@ openerp.auth_anonymous = function(instance) {
|
||||
start: function() {
|
||||
var self = this;
|
||||
return $.when(this._super()).then(function() {
|
||||
var dblist = self._db_list || [];
|
||||
var dblist = self.db_list || [];
|
||||
if (!self.session.session_is_valid() && dblist.length === 1) {
|
||||
self.remember_credentials = false;
|
||||
// XXX get login/pass from server (via a rpc call) ?
|
||||
return self.do_login(dblist[0], 'anonymous', 'anonymous')
|
||||
return self.do_login(dblist[0], 'anonymous', 'anonymous');
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
@@ -41,7 +41,7 @@ openerp.auth_signup = function(instance) {
|
||||
on_token_loaded: function(result) {
|
||||
// select the right the database
|
||||
this.selected_db = result.db;
|
||||
this.on_db_loaded({db_list: [result.db]});
|
||||
this.on_db_loaded([result.db]);
|
||||
if (result.token) {
|
||||
// switch to signup mode, set user name and login
|
||||
this.$el.addClass("oe_login_signup");
|
||||
@@ -80,16 +80,16 @@ openerp.auth_signup = function(instance) {
|
||||
this.do_warn("Login", "No database selected !");
|
||||
return false;
|
||||
} else if (!name) {
|
||||
this.do_warn("Login", "Please enter a name.")
|
||||
this.do_warn("Login", "Please enter a name.");
|
||||
return false;
|
||||
} else if (!login) {
|
||||
this.do_warn("Login", "Please enter a username.")
|
||||
this.do_warn("Login", "Please enter a username.");
|
||||
return false;
|
||||
} else if (!password || !confirm_password) {
|
||||
this.do_warn("Login", "Please enter a password and confirm it.")
|
||||
this.do_warn("Login", "Please enter a password and confirm it.");
|
||||
return false;
|
||||
} else if (password !== confirm_password) {
|
||||
this.do_warn("Login", "Passwords do not match; please retype them.")
|
||||
this.do_warn("Login", "Passwords do not match; please retype them.");
|
||||
return false;
|
||||
}
|
||||
var params = {
|
||||
|
||||
@@ -221,7 +221,7 @@
|
||||
</sheet>
|
||||
<div class="oe_chatter">
|
||||
<field name="message_follower_ids" widget="mail_followers"/>
|
||||
<field name="message_ids" widget="mail_thread"/>
|
||||
<field name="message_ids" widget="mail_thread" placeholder="Share a message..."/>
|
||||
</div>
|
||||
</form>
|
||||
</field>
|
||||
|
||||
@@ -201,6 +201,20 @@ class users(osv.osv):
|
||||
# Return early if no one has a login name like that.
|
||||
return False
|
||||
|
||||
# Check if the authentification is made with OpenID. In this case, don't encrypt the password
|
||||
cr.execute('SELECT id FROM ir_module_module WHERE name = \'auth_openid\' and state = \'installed\'')
|
||||
if cr.rowcount:
|
||||
cr.execute( 'SELECT password, id FROM res_users WHERE login=%s AND openid_key = %s AND active',
|
||||
(login.encode('utf-8'),password.encode('utf-8')))
|
||||
if cr.rowcount:
|
||||
# Check if the encrypted password matches against the one in the db.
|
||||
cr.execute("""UPDATE res_users SET login_date=now() AT TIME ZONE 'UTC' WHERE id=%s AND openid_key=%s AND active RETURNING id""",
|
||||
(int(id), password.encode('utf-8')))
|
||||
res = cr.fetchone()
|
||||
cr.commit()
|
||||
if res:
|
||||
return res[0]
|
||||
|
||||
stored_pw = self.maybe_encrypt(cr, stored_pw, id)
|
||||
|
||||
if not stored_pw:
|
||||
|
||||
@@ -99,6 +99,8 @@ class res_partner_bank(osv.osv):
|
||||
@param iban: IBAN as string
|
||||
@return: True if IBAN is valid, False otherwise
|
||||
"""
|
||||
if not iban:
|
||||
return False
|
||||
iban = _format_iban(iban).lower()
|
||||
if iban[:2] in _ref_iban and len(iban) != len(_format_iban(_ref_iban[iban[:2]])):
|
||||
return False
|
||||
@@ -128,9 +130,9 @@ class res_partner_bank(osv.osv):
|
||||
def _construct_constraint_msg(self, cr, uid, ids, context=None):
|
||||
|
||||
def default_iban_check(iban_cn):
|
||||
return iban_cn[0] in string.ascii_lowercase and iban_cn[1] in string.ascii_lowercase
|
||||
return iban_cn and iban_cn[0] in string.ascii_lowercase and iban_cn[1] in string.ascii_lowercase
|
||||
|
||||
iban_country = self.browse(cr, uid, ids)[0].acc_number[:2].lower()
|
||||
iban_country = self.browse(cr, uid, ids)[0].acc_number and self.browse(cr, uid, ids)[0].acc_number[:2].lower()
|
||||
if default_iban_check(iban_country):
|
||||
if iban_country in _ref_iban:
|
||||
return _('The IBAN does not seem to be correct. You should have entered something like this %s'), \
|
||||
|
||||
@@ -24,7 +24,7 @@ Re-implement openerp's file import system:
|
||||
'category': 'Uncategorized',
|
||||
'website': 'http://www.openerp.com',
|
||||
'author': 'OpenERP SA',
|
||||
'depends': ['base'],
|
||||
'depends': ['web'],
|
||||
'installable': True,
|
||||
'auto_install': False,
|
||||
'css': [
|
||||
@@ -37,4 +37,5 @@ Re-implement openerp's file import system:
|
||||
'static/src/js/import.js',
|
||||
],
|
||||
'qweb': ['static/src/xml/import.xml'],
|
||||
'test': ['static/test/states.js'],
|
||||
}
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
$(document).ready(function () {
|
||||
module('foo');
|
||||
test('dummy', function () {
|
||||
ok(42);
|
||||
});
|
||||
});
|
||||
@@ -44,7 +44,6 @@ Shows you a list of applications features to install from.
|
||||
'installable': True,
|
||||
'auto_install': False,
|
||||
'images': ['images/base_setup1.jpeg','images/base_setup2.jpeg','images/base_setup3.jpeg','images/base_setup4.jpeg',],
|
||||
'js': ['static/src/js/base_setup.js'],
|
||||
'css': ['static/src/css/base_setup.css'],
|
||||
}
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
# Hungarian translation for openobject-addons
|
||||
# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012
|
||||
# This file is distributed under the same license as the openobject-addons package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, 2012.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: openobject-addons\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2011-01-11 11:14+0000\n"
|
||||
"PO-Revision-Date: 2012-11-13 16:00+0000\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: Hungarian <hu@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: 2012-11-14 04:40+0000\n"
|
||||
"X-Generator: Launchpad (build 16251)\n"
|
||||
|
||||
#. module: base_tools
|
||||
#: model:ir.module.module,shortdesc:base_tools.module_meta_information
|
||||
msgid "Common base for tools modules"
|
||||
msgstr ""
|
||||
|
||||
#. module: base_tools
|
||||
#: model:ir.module.module,description:base_tools.module_meta_information
|
||||
msgid ""
|
||||
"\n"
|
||||
" "
|
||||
msgstr ""
|
||||
@@ -0,0 +1,23 @@
|
||||
# Lithuanian translation for openobject-addons
|
||||
# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012
|
||||
# This file is distributed under the same license as the openobject-addons package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, 2012.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: openobject-addons\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2012-02-08 00:36+0000\n"
|
||||
"PO-Revision-Date: 2012-11-15 13:45+0000\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: Lithuanian <lt@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: 2012-11-16 04:36+0000\n"
|
||||
"X-Generator: Launchpad (build 16272)\n"
|
||||
|
||||
#. module: claim_from_delivery
|
||||
#: model:ir.actions.act_window,name:claim_from_delivery.action_claim_from_delivery
|
||||
msgid "Claim"
|
||||
msgstr ""
|
||||
@@ -115,7 +115,6 @@ class crm_case_section(osv.osv):
|
||||
'code': fields.char('Code', size=8),
|
||||
'active': fields.boolean('Active', help="If the active field is set to "\
|
||||
"true, it will allow you to hide the sales team without removing it."),
|
||||
'allow_unlink': fields.boolean('Allow Delete', help="Allows to delete non draft cases"),
|
||||
'change_responsible': fields.boolean('Reassign Escalated', help="When escalating to this team override the salesman with the team leader."),
|
||||
'user_id': fields.many2one('res.users', 'Team Leader'),
|
||||
'member_ids':fields.many2many('res.users', 'sale_member_rel', 'section_id', 'member_id', 'Team Members'),
|
||||
@@ -137,7 +136,6 @@ class crm_case_section(osv.osv):
|
||||
|
||||
_defaults = {
|
||||
'active': 1,
|
||||
'allow_unlink': 1,
|
||||
'stage_ids': _get_stage_common,
|
||||
'alias_domain': False, # always hide alias during creation
|
||||
}
|
||||
|
||||
@@ -79,7 +79,7 @@ class base_action_rule(osv.osv):
|
||||
write['section_id'] = action.act_section_id.id
|
||||
|
||||
if hasattr(action, 'act_categ_id') and action.act_categ_id:
|
||||
write['categ_ids'] = [4, action.act_categ_id.id]
|
||||
write['categ_ids'] = [(4, action.act_categ_id.id)]
|
||||
|
||||
model_obj.write(cr, uid, [obj.id], write, context)
|
||||
return res
|
||||
|
||||
@@ -58,9 +58,10 @@
|
||||
<field name="model">mail.group</field>
|
||||
<field name="res_id" ref="mail.group_all_employees"/>
|
||||
<field name="type">notification</field>
|
||||
<field name="subtype_id" ref="mail.mt_comment"/>
|
||||
<field name="subject">CRM application installed!</field>
|
||||
<field name="body">From the top Sales menu you can track leads and opportunities, get accurate forecast on your sales pipeline, plan meetings and phonecalls, get realtime statistics and efficiently organize the communication with your prospects.
|
||||
To manage quotations and sale orders, install the "Sales Management" application.</field>
|
||||
<field name="body"><![CDATA[<p>From the top Sales menu you can track leads and opportunities, get accurate forecast on your sales pipeline, plan meetings and phonecalls, get realtime statistics and efficiently organize the communication with your prospects.</p>
|
||||
<p>To manage quotations and sale orders, install the "Sales Management" application.</p>]]></field>
|
||||
</record>
|
||||
|
||||
<record model="mail.alias" id="default_sales_alias">
|
||||
|
||||
@@ -779,14 +779,6 @@ class crm_lead(base_stage, format_address, osv.osv):
|
||||
}
|
||||
return res
|
||||
|
||||
def unlink(self, cr, uid, ids, context=None):
|
||||
for lead in self.browse(cr, uid, ids, context):
|
||||
if (not lead.section_id.allow_unlink) and (lead.state != 'draft'):
|
||||
raise osv.except_osv(_('Error!'),
|
||||
_("You cannot delete lead '%s' because it is not in 'Draft' state. " \
|
||||
"You can still cancel it, instead of deleting it.") % lead.name)
|
||||
return super(crm_lead, self).unlink(cr, uid, ids, context)
|
||||
|
||||
def write(self, cr, uid, ids, vals, context=None):
|
||||
if vals.get('stage_id') and not vals.get('probability'):
|
||||
# change probability of lead(s) if required by stage
|
||||
|
||||
+14
-15
@@ -24,7 +24,7 @@
|
||||
parent="base.menu_base_config" sequence="45" groups="base.group_sale_salesman"/>
|
||||
|
||||
<menuitem id="base.next_id_64" name="Sales"
|
||||
parent="base.menu_reporting" sequence="1" />
|
||||
parent="base.menu_reporting" sequence="1"/>
|
||||
|
||||
<menuitem id="base.menu_sales_configuration_misc" name="Miscellaneous" parent="base.menu_base_config" sequence="81"/>
|
||||
|
||||
@@ -86,7 +86,7 @@
|
||||
<field name="parent_id"/>
|
||||
<field name="code"/>
|
||||
</group>
|
||||
|
||||
|
||||
<group>
|
||||
<field name="user_id"/>
|
||||
<field name="resource_calendar_id"/>
|
||||
@@ -102,7 +102,6 @@
|
||||
<field name="alias_name" class="oe_inline" attrs="{'required': [('alias_id', '!=', False)]}"/>@<field name="alias_domain" class="oe_inline"/>
|
||||
</div>
|
||||
<field name="change_responsible"/>
|
||||
<field name="allow_unlink"/>
|
||||
</group>
|
||||
<separator string="Team Members"/>
|
||||
<field name="member_ids" widget="many2many_kanban">
|
||||
@@ -163,7 +162,7 @@
|
||||
<field name="view_id" ref="crm_case_section_view_tree"/>
|
||||
<field name="help" type="html">
|
||||
<p class="oe_view_nocontent_create">
|
||||
Click to define a new sales team.
|
||||
Click to define a new sales team.
|
||||
</p><p>
|
||||
Use sales team to organize your different salespersons or
|
||||
departments into separate teams. Each team will work in
|
||||
@@ -203,7 +202,7 @@
|
||||
<form string="Stage" version="7.0">
|
||||
<group col="4">
|
||||
<field name="name"/>
|
||||
<field name="state" />
|
||||
<field name="state"/>
|
||||
<field name="probability"/>
|
||||
<field name="type"/>
|
||||
<field name="on_change"/>
|
||||
@@ -228,7 +227,7 @@
|
||||
</record>
|
||||
|
||||
|
||||
<!-- Case Categories Form View -->
|
||||
<!-- Case Categories Form View -->
|
||||
|
||||
<record id="crm_case_categ-view" model="ir.ui.view">
|
||||
<field name="name">crm.case.categ.form</field>
|
||||
@@ -238,7 +237,7 @@
|
||||
<group>
|
||||
<field name="name"/>
|
||||
<field name="section_id"/>
|
||||
<field name="object_id" invisible="1" />
|
||||
<field name="object_id" invisible="1"/>
|
||||
</group>
|
||||
</form>
|
||||
</field>
|
||||
@@ -297,7 +296,7 @@
|
||||
<menuitem action="crm_case_resource_type_act"
|
||||
id="menu_crm_case_resource_type_act" sequence="4"
|
||||
groups="base.group_no_one"
|
||||
parent="base.menu_crm_config_lead" />
|
||||
parent="base.menu_crm_config_lead"/>
|
||||
|
||||
<record id="crm_case_section_act_tree" model="ir.actions.act_window">
|
||||
<field name="name">Cases by Sales Team</field>
|
||||
@@ -354,13 +353,13 @@
|
||||
<button name="process_start"
|
||||
states="not running"
|
||||
string="Compute Segmentation" type="object"
|
||||
icon="gtk-execute" />
|
||||
icon="gtk-execute"/>
|
||||
<button name="process_stop" states="running"
|
||||
string="Stop Process" type="object"
|
||||
icon="gtk-cancel" />
|
||||
icon="gtk-cancel"/>
|
||||
<button name="process_continue" states="running"
|
||||
string="Continue Process" type="object"
|
||||
icon="gtk-go-forward" />
|
||||
icon="gtk-go-forward"/>
|
||||
<field name="state" widget="statusbar"/>
|
||||
</header>
|
||||
<group col="4">
|
||||
@@ -412,7 +411,7 @@
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="help" type="html">
|
||||
<p class="oe_view_nocontent_create">
|
||||
Click to define a new customer segmentation.
|
||||
Click to define a new customer segmentation.
|
||||
</p><p>
|
||||
Create specific categories which you can assign to your
|
||||
contacts to better manage your interactions with them. The
|
||||
@@ -425,7 +424,7 @@
|
||||
<menuitem action="crm_segmentation_tree-act"
|
||||
id="menu_crm_segmentation-act"
|
||||
groups="base.group_no_one" sequence="15"
|
||||
parent="base.menu_base_config" />
|
||||
parent="base.menu_base_config"/>
|
||||
|
||||
<!-- menu for the working time -->
|
||||
<menuitem action="resource.action_resource_calendar_form" id="menu_action_resource_calendar_form" parent="resource.menu_resource_config" sequence="1"/>
|
||||
@@ -466,11 +465,11 @@
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
|
||||
|
||||
<menuitem action="action_crm_payment_mode"
|
||||
id="menu_crm_payment_mode_act"
|
||||
groups="base.group_no_one"
|
||||
name="Payment Modes"
|
||||
parent="base.menu_crm_config_lead" />
|
||||
parent="base.menu_crm_config_lead"/>
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
@@ -168,7 +168,7 @@
|
||||
</sheet>
|
||||
<div class="oe_chatter">
|
||||
<field name="message_follower_ids" widget="mail_followers"/>
|
||||
<field name="message_ids" colspan="4" widget="mail_thread" nolabel="1"/>
|
||||
<field name="message_ids" widget="mail_thread" placeholder="Share a note..."/>
|
||||
</div>
|
||||
</form>
|
||||
</field>
|
||||
|
||||
@@ -95,7 +95,7 @@
|
||||
</notebook>
|
||||
</sheet>
|
||||
<div class="oe_chatter">
|
||||
<field name="message_ids" widget="mail_thread"/>
|
||||
<field name="message_ids" widget="mail_thread" placeholder="Share a note..."/>
|
||||
<field name="message_follower_ids" widget="mail_followers"/>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@@ -272,7 +272,7 @@ class abstracted_fs(object):
|
||||
if path.startswith('/'):
|
||||
path = path[1:]
|
||||
|
||||
p_parts = path.split('/') # hard-code the unix sep here, by spec.
|
||||
p_parts = path.split(os.sep)
|
||||
|
||||
assert '..' not in p_parts
|
||||
|
||||
|
||||
@@ -51,10 +51,10 @@ class document_davdir(osv.osv):
|
||||
# that might be not worth preparing.
|
||||
nctx.extra_ctx['webdav_path'] = '/'+config.get_misc('webdav','vdir','webdav')
|
||||
usr_obj = self.pool.get('res.users')
|
||||
res = usr_obj.read(cr, uid, uid, ['login','context_lang'])
|
||||
res = usr_obj.read(cr, uid, uid, ['login','lang'])
|
||||
if res:
|
||||
nctx.extra_ctx['username'] = res['login']
|
||||
nctx.extra_ctx['lang'] = res['context_lang']
|
||||
nctx.extra_ctx['lang'] = res['lang']
|
||||
# TODO group
|
||||
return
|
||||
|
||||
|
||||
@@ -28,8 +28,6 @@ from osv import osv
|
||||
from osv import fields
|
||||
import tools
|
||||
from tools.translate import _
|
||||
from tools.html_sanitize import html_sanitize
|
||||
from tools import append_content_to_html
|
||||
from urllib import quote as quote
|
||||
_logger = logging.getLogger(__name__)
|
||||
|
||||
@@ -118,7 +116,8 @@ class email_template(osv.osv):
|
||||
"of the message"),
|
||||
'subject': fields.char('Subject', translate=True, help="Subject (placeholders may be used here)",),
|
||||
'email_from': fields.char('From', help="Sender address (placeholders may be used here)"),
|
||||
'email_to': fields.char('To', help="Comma-separated recipient addresses (placeholders may be used here)"),
|
||||
'email_to': fields.char('To (Emails)', help="Comma-separated recipient addresses (placeholders may be used here)"),
|
||||
'email_recipients': fields.char('To (Partners)', help="Comma-separated ids of recipient partners (placeholders may be used here)"),
|
||||
'email_cc': fields.char('Cc', help="Carbon copy recipients (placeholders may be used here)"),
|
||||
'reply_to': fields.char('Reply-To', help="Preferred response address (placeholders may be used here)"),
|
||||
'mail_server_id': fields.many2one('ir.mail_server', 'Outgoing Mail Server', readonly=False,
|
||||
@@ -286,16 +285,16 @@ class email_template(osv.osv):
|
||||
template = self.get_email_template(cr, uid, template_id, res_id, context)
|
||||
values = {}
|
||||
for field in ['subject', 'body_html', 'email_from',
|
||||
'email_to', 'email_cc', 'reply_to']:
|
||||
'email_to', 'email_recipients', 'email_cc', 'reply_to']:
|
||||
values[field] = self.render_template(cr, uid, getattr(template, field),
|
||||
template.model, res_id, context=context) \
|
||||
or False
|
||||
if template.user_signature:
|
||||
signature = self.pool.get('res.users').browse(cr, uid, uid, context).signature
|
||||
values['body_html'] = append_content_to_html(values['body_html'], signature)
|
||||
values['body_html'] = tools.append_content_to_html(values['body_html'], signature)
|
||||
|
||||
if values['body_html']:
|
||||
values['body'] = html_sanitize(values['body_html'])
|
||||
values['body'] = tools.html_sanitize(values['body_html'])
|
||||
|
||||
values.update(mail_server_id=template.mail_server_id.id or False,
|
||||
auto_delete=template.auto_delete,
|
||||
|
||||
@@ -29,7 +29,8 @@
|
||||
<group>
|
||||
<group string="Addressing">
|
||||
<field name="email_from" required="1"/>
|
||||
<field name="email_to" required="1"/>
|
||||
<field name="email_to"/>
|
||||
<field name="email_recipients"/>
|
||||
<field name="email_cc"/>
|
||||
<field name="reply_to"/>
|
||||
<field name="user_signature"/>
|
||||
@@ -77,6 +78,7 @@
|
||||
<field name="subject"/>
|
||||
<field name="email_from"/>
|
||||
<field name="email_to"/>
|
||||
<field name="email_recipients"/>
|
||||
<field name="report_name"/>
|
||||
</tree>
|
||||
</field>
|
||||
|
||||
@@ -20,10 +20,10 @@
|
||||
##############################################################################
|
||||
|
||||
import base64
|
||||
from openerp.addons.mail.tests import test_mail
|
||||
from openerp.addons.mail.tests import test_mail_mockup
|
||||
|
||||
|
||||
class test_message_compose(test_mail.TestMailMockups):
|
||||
class test_message_compose(test_mail_mockup.TestMailMockups):
|
||||
|
||||
def setUp(self):
|
||||
super(test_message_compose, self).setUp()
|
||||
@@ -52,8 +52,8 @@ class test_message_compose(test_mail.TestMailMockups):
|
||||
# Mail data
|
||||
_subject1 = 'Pigs'
|
||||
_subject2 = 'Bird'
|
||||
_body_html1 = 'Fans of Pigs, unite !\n<pre>Admin</pre>\n'
|
||||
_body_html2 = 'I am angry !\n<pre>Admin</pre>\n'
|
||||
_body_html1 = 'Fans of Pigs, unite !\n<p>Admin</p>\n'
|
||||
_body_html2 = 'I am angry !\n<p>Admin</p>\n'
|
||||
_attachments = [
|
||||
{'name': 'First', 'datas_fname': 'first.txt', 'datas': base64.b64encode('My first attachment')},
|
||||
{'name': 'Second', 'datas_fname': 'second.txt', 'datas': base64.b64encode('My second attachment')}
|
||||
@@ -63,11 +63,16 @@ class test_message_compose(test_mail.TestMailMockups):
|
||||
# Create template on mail.group, with attachments
|
||||
group_model_id = self.registry('ir.model').search(cr, uid, [('model', '=', 'mail.group')])[0]
|
||||
email_template = self.registry('email.template')
|
||||
email_template_id = email_template.create(cr, uid, {'model_id': group_model_id,
|
||||
'name': 'Pigs Template', 'subject': '${object.name}',
|
||||
'body_html': '${object.description}', 'user_signature': True,
|
||||
email_template_id = email_template.create(cr, uid, {
|
||||
'model_id': group_model_id,
|
||||
'name': 'Pigs Template',
|
||||
'subject': '${object.name}',
|
||||
'body_html': '${object.description}',
|
||||
'user_signature': True,
|
||||
'attachment_ids': [(0, 0, _attachments[0]), (0, 0, _attachments[1])],
|
||||
'email_to': 'b@b.b c@c.c', 'email_cc': 'd@d.d'})
|
||||
'email_to': 'b@b.b c@c.c',
|
||||
'email_cc': 'd@d.d'
|
||||
})
|
||||
|
||||
# ----------------------------------------
|
||||
# CASE1: comment and save as template
|
||||
@@ -76,9 +81,9 @@ class test_message_compose(test_mail.TestMailMockups):
|
||||
# 1. Comment on pigs
|
||||
compose_id = mail_compose.create(cr, uid,
|
||||
{'subject': 'Forget me subject', 'body': '<p>Dummy body</p>'},
|
||||
{'default_composition_mode': 'comment', 'default_model': 'mail.group',
|
||||
{'default_composition_mode': 'comment',
|
||||
'default_model': 'mail.group',
|
||||
'default_res_id': self.group_pigs_id,
|
||||
'default_template_id': email_template_id,
|
||||
'active_ids': [self.group_pigs_id, self.group_bird_id]})
|
||||
compose = mail_compose.browse(cr, uid, compose_id)
|
||||
|
||||
@@ -97,8 +102,10 @@ class test_message_compose(test_mail.TestMailMockups):
|
||||
# 1. Comment on pigs
|
||||
compose_id = mail_compose.create(cr, uid,
|
||||
{'subject': 'Forget me subject', 'body': 'Dummy body'},
|
||||
{'default_composition_mode': 'comment', 'default_model': 'mail.group',
|
||||
{'default_composition_mode': 'comment',
|
||||
'default_model': 'mail.group',
|
||||
'default_res_id': self.group_pigs_id,
|
||||
'default_use_template': False,
|
||||
'default_template_id': email_template_id,
|
||||
'active_ids': [self.group_pigs_id, self.group_bird_id]})
|
||||
compose = mail_compose.browse(cr, uid, compose_id)
|
||||
@@ -135,8 +142,10 @@ class test_message_compose(test_mail.TestMailMockups):
|
||||
# 1. Mass_mail on pigs and bird, with a default_partner_ids set to check he is correctly added
|
||||
compose_id = mail_compose.create(cr, uid,
|
||||
{'subject': 'Forget me subject', 'body': 'Dummy body'},
|
||||
{'default_composition_mode': 'mass_mail', 'default_model': 'mail.group',
|
||||
{'default_composition_mode': 'mass_mail',
|
||||
'default_model': 'mail.group',
|
||||
'default_res_id': self.group_pigs_id,
|
||||
'default_use_template': False,
|
||||
'default_template_id': email_template_id,
|
||||
'default_partner_ids': [p_a_id],
|
||||
'active_ids': [self.group_pigs_id, self.group_bird_id]})
|
||||
@@ -170,3 +179,26 @@ class test_message_compose(test_mail.TestMailMockups):
|
||||
partner_ids = self.res_partner.search(cr, uid, [('email', 'in', ['b@b.b', 'c@c.c', 'd@d.d'])])
|
||||
self.assertEqual(set(message_pigs_pids), set(partner_ids), 'mail.message on pigs incorrect number of notified_partner_ids')
|
||||
self.assertEqual(set(message_bird_pids), set(partner_ids), 'mail.message on bird notified_partner_ids incorrect')
|
||||
|
||||
# ----------------------------------------
|
||||
# CASE4: test newly introduced email_recipients field
|
||||
# ----------------------------------------
|
||||
|
||||
# get already-created partners back
|
||||
p_b_id = self.res_partner.search(cr, uid, [('email', '=', 'b@b.b')])[0]
|
||||
p_c_id = self.res_partner.search(cr, uid, [('email', '=', 'c@c.c')])[0]
|
||||
p_d_id = self.res_partner.search(cr, uid, [('email', '=', 'd@d.d')])[0]
|
||||
# modify template: use email_recipients, use template and email address in email_to to test all features together
|
||||
user_model_id = self.registry('ir.model').search(cr, uid, [('model', '=', 'res.users')])[0]
|
||||
email_template.write(cr, uid, [email_template_id], {
|
||||
'model_id': user_model_id,
|
||||
'body_html': '${object.login}',
|
||||
'email_to': '${object.email} c@c',
|
||||
'email_recipients': '%i,%i' % (p_b_id, p_c_id),
|
||||
'email_cc': 'd@d',
|
||||
})
|
||||
# patner by email + partner by id (no double)
|
||||
send_to = [p_a_id, p_b_id, p_c_id, p_d_id]
|
||||
# Generate messsage with default email and partner on template
|
||||
mail_value = mail_compose.generate_email_for_composer(cr, uid, email_template_id, uid)
|
||||
self.assertEqual(set(mail_value['partner_ids']), set(send_to), 'mail.message partner_ids list created by template is incorrect')
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
<group>
|
||||
<field name="email_from" readonly="1"/>
|
||||
<field name="email_to" readonly="1"/>
|
||||
<field name="email_recipients" readonly="1"/>
|
||||
<field name="email_cc" readonly="1" attrs="{'invisible':[('email_cc','=',False)]}"/>
|
||||
<field name="reply_to" readonly="1" attrs="{'invisible':[('reply_to','=',False)]}"/>
|
||||
<field name="subject" readonly="1"/>
|
||||
|
||||
@@ -25,6 +25,21 @@ from osv import osv
|
||||
from osv import fields
|
||||
|
||||
|
||||
def _reopen(self, res_id, model):
|
||||
return {'type': 'ir.actions.act_window',
|
||||
'view_mode': 'form',
|
||||
'view_type': 'form',
|
||||
'res_id': res_id,
|
||||
'res_model': self._name,
|
||||
'target': 'new',
|
||||
# save original model in context, because selecting the list of available
|
||||
# templates requires a model in context
|
||||
'context': {
|
||||
'default_model': model,
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
class mail_compose_message(osv.TransientModel):
|
||||
_inherit = 'mail.compose.message'
|
||||
|
||||
@@ -42,18 +57,17 @@ class mail_compose_message(osv.TransientModel):
|
||||
else:
|
||||
model = context.get('default_model', context.get('active_model'))
|
||||
|
||||
if model:
|
||||
record_ids = email_template_obj.search(cr, uid, [('model', '=', model)], context=context)
|
||||
return email_template_obj.name_get(cr, uid, record_ids, context) + [(False, '')]
|
||||
return []
|
||||
record_ids = email_template_obj.search(cr, uid, [('model', '=', model)], context=context)
|
||||
return email_template_obj.name_get(cr, uid, record_ids, context) + [(False, '')]
|
||||
|
||||
def default_get(self, cr, uid, fields, context=None):
|
||||
if context is None:
|
||||
context = {}
|
||||
result = super(mail_compose_message, self).default_get(cr, uid, fields, context=context)
|
||||
result['template_id'] = context.get('default_template_id', context.get('mail.compose.template_id', False))
|
||||
|
||||
# pre-render the template if any
|
||||
if result.get('use_template'):
|
||||
if result.get('use_template') and result.get('template_id'):
|
||||
onchange_res = self.onchange_use_template(cr, uid, [], result.get('use_template'), result.get('template_id'),
|
||||
result.get('composition_mode'), result.get('model'), result.get('res_id'), context=context)
|
||||
result.update(onchange_res['value'])
|
||||
@@ -65,6 +79,10 @@ class mail_compose_message(osv.TransientModel):
|
||||
'template_id': fields.selection(_get_templates, 'Template', size=-1),
|
||||
}
|
||||
|
||||
_defaults = {
|
||||
'use_template': True,
|
||||
}
|
||||
|
||||
def onchange_template_id(self, cr, uid, ids, use_template, template_id, composition_mode, model, res_id, context=None):
|
||||
""" - use_template not set: return default_get
|
||||
- use_template set in mass_mailing: we cannot render, so return the template values
|
||||
@@ -104,7 +122,7 @@ class mail_compose_message(osv.TransientModel):
|
||||
onchange_res['partner_ids'] = [(4, partner_id) for partner_id in onchange_res.pop('partner_ids', [])]
|
||||
onchange_res['attachment_ids'] = [(4, attachment_id) for attachment_id in onchange_res.pop('attachment_ids', [])]
|
||||
record.write(onchange_res)
|
||||
return True
|
||||
return _reopen(self, record.id, record.model)
|
||||
|
||||
def onchange_use_template(self, cr, uid, ids, use_template, template_id, composition_mode, model, res_id, context=None):
|
||||
""" onchange_use_template (values: True or False). If use_template is
|
||||
@@ -136,8 +154,8 @@ class mail_compose_message(osv.TransientModel):
|
||||
'attachment_ids': [(6, 0, [att.id for att in record.attachment_ids])]
|
||||
}
|
||||
template_id = email_template.create(cr, uid, values, context=context)
|
||||
record.write({'template_id': template_id, 'use_template': True})
|
||||
return True
|
||||
record.write(record.onchange_template_id(True, template_id, record.composition_mode, record.model, record.res_id)['value'])
|
||||
return _reopen(self, record.id, record.model)
|
||||
|
||||
#------------------------------------------------------
|
||||
# Wizard validation and send
|
||||
@@ -148,15 +166,23 @@ class mail_compose_message(osv.TransientModel):
|
||||
mail.compose.message, transform email_cc and email_to into partner_ids """
|
||||
template_values = self.pool.get('email.template').generate_email(cr, uid, template_id, res_id, context=context)
|
||||
# filter template values
|
||||
fields = ['body', 'body_html', 'subject', 'email_to', 'email_cc', 'attachments']
|
||||
fields = ['body', 'body_html', 'subject', 'email_to', 'email_recipients', 'email_cc', 'attachments']
|
||||
values = dict((field, template_values[field]) for field in fields if template_values.get(field))
|
||||
values['body'] = values.pop('body_html', '')
|
||||
# transform email_to, email_cc into partner_ids
|
||||
values['partner_ids'] = []
|
||||
|
||||
mails = tools.email_split(values.pop('email_to', '') + ' ' + values.pop('email_cc', ''))
|
||||
for mail in mails:
|
||||
partner_id = self.pool.get('res.partner').find_or_create(cr, uid, mail, context=context)
|
||||
values['partner_ids'].append(partner_id)
|
||||
email_recipients = values.pop('email_recipients', '')
|
||||
if email_recipients:
|
||||
for partner_id in email_recipients.split(','):
|
||||
values['partner_ids'].append(int(partner_id))
|
||||
|
||||
values['partner_ids'] = list(set(values['partner_ids']))
|
||||
|
||||
return values
|
||||
|
||||
def render_message(self, cr, uid, wizard, res_id, context=None):
|
||||
|
||||
@@ -8,23 +8,22 @@
|
||||
<field name="inherit_id" ref="mail.email_compose_message_wizard_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<data>
|
||||
<xpath expr="//form/group" position="after">
|
||||
<group attrs="{'invisible':[('use_template','=',False)]}">
|
||||
<field name="use_template" invisible="1"
|
||||
on_change="onchange_use_template(use_template, template_id, composition_mode, model, res_id, context)"/>
|
||||
<field name="template_id"
|
||||
on_change="onchange_template_id(use_template, template_id, composition_mode, model, res_id, context)"/>
|
||||
</group>
|
||||
<xpath expr="//field[@name='content_subtype']" position="after">
|
||||
<field name="use_template" invisible="1"
|
||||
on_change="onchange_use_template(use_template, template_id, composition_mode, model, res_id, context)"/>
|
||||
</xpath>
|
||||
<xpath expr="//form/footer/button" position="after">
|
||||
<button icon="/email_template/static/src/img/email_template.png"
|
||||
type="object" name="toggle_template" string=""
|
||||
help="Use a message template"
|
||||
attrs="{'invisible':[('content_subtype','!=','html')]}"/>
|
||||
<button icon="/email_template/static/src/img/email_template_save.png"
|
||||
type="object" name="save_as_template" string=""
|
||||
help="Save as a new template"
|
||||
attrs="{'invisible':[('content_subtype','!=','html')]}"/>
|
||||
<xpath expr="//footer" position="inside">
|
||||
<group class="oe_right" col="1">
|
||||
<div attrs="{'invisible':[('use_template','=',False)]}">Use template
|
||||
<field name="template_id" attrs="{'invisible':[('use_template','=',False)]}"
|
||||
nolabel="1"
|
||||
on_change="onchange_template_id(use_template, template_id, composition_mode, model, res_id, context)"/>
|
||||
</div>
|
||||
<button icon="/email_template/static/src/img/email_template_save.png"
|
||||
type="object" name="save_as_template" string="Save as new template" class="oe_link"
|
||||
help="Save as a new template"
|
||||
attrs="{'invisible':[('content_subtype','!=','html')]}"/>
|
||||
</group>
|
||||
</xpath>
|
||||
</data>
|
||||
</field>
|
||||
|
||||
@@ -205,7 +205,7 @@
|
||||
</sheet>
|
||||
<div class="oe_chatter">
|
||||
<field name="message_follower_ids" widget="mail_followers"/>
|
||||
<field name="message_ids" colspan="4" widget="mail_thread" nolabel="1"/>
|
||||
<field name="message_ids" widget="mail_thread" placeholder="Share a note..."/>
|
||||
</div>
|
||||
</form>
|
||||
</field>
|
||||
@@ -473,7 +473,7 @@
|
||||
</sheet>
|
||||
<div class="oe_chatter">
|
||||
<field name="message_follower_ids" widget="mail_followers"/>
|
||||
<field name="message_ids" colspan="4" widget="mail_thread" nolabel="1"/>
|
||||
<field name="message_ids" widget="mail_thread" placeholder="Share a note..."/>
|
||||
</div>
|
||||
</form>
|
||||
</field>
|
||||
|
||||
@@ -14,11 +14,13 @@
|
||||
border-bottom-left-radius:3px;
|
||||
border-bottom-right-radius:3px;
|
||||
font-size: 12px;
|
||||
border-collapse: separate;
|
||||
text-align: center;
|
||||
font-weight: bold;
|
||||
color: #8A89BA;
|
||||
-webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
|
||||
background-color: #FFFFFF;
|
||||
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
|
||||
}
|
||||
.oe_event_month_year{
|
||||
border-bottom-left-radius:3px;
|
||||
|
||||
@@ -243,20 +243,20 @@ class mail_mail(osv.osv):
|
||||
|
||||
def create(self, cr, uid, values, context=None):
|
||||
if context is None:
|
||||
context={}
|
||||
context = {}
|
||||
fetchmail_server_id = context.get('fetchmail_server_id')
|
||||
if fetchmail_server_id:
|
||||
values['fetchmail_server_id'] = fetchmail_server_id
|
||||
res = super(mail_mail,self).create(cr, uid, values, context=context)
|
||||
res = super(mail_mail, self).create(cr, uid, values, context=context)
|
||||
return res
|
||||
|
||||
def write(self, cr, uid, ids, values, context=None):
|
||||
if context is None:
|
||||
context={}
|
||||
context = {}
|
||||
fetchmail_server_id = context.get('fetchmail_server_id')
|
||||
if fetchmail_server_id:
|
||||
values['fetchmail_server_id'] = server_id
|
||||
res = super(mail_mail,self).write(cr, uid, ids, values, context=context)
|
||||
values['fetchmail_server_id'] = fetchmail_server_id
|
||||
res = super(mail_mail, self).write(cr, uid, ids, values, context=context)
|
||||
return res
|
||||
|
||||
|
||||
|
||||
@@ -720,7 +720,7 @@ class fleet_vehicle_log_contract(osv.Model):
|
||||
'start_date': datetime.datetime.strftime(str_to_datetime(element.expiration_date) + datetime.timedelta(days=1), tools.DEFAULT_SERVER_DATE_FORMAT),
|
||||
'expiration_date': datetime.datetime.strftime(enddate + diffdate, tools.DEFAULT_SERVER_DATE_FORMAT),
|
||||
}
|
||||
newid = super(fleet_vehicle_log_contract, self).copy(cr, uid, [element.id], default, context=context)
|
||||
newid = super(fleet_vehicle_log_contract, self).copy(cr, uid, element.id, default, context=context)
|
||||
mod, modid = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'fleet', 'fleet_vehicle_log_contract_form')
|
||||
return {
|
||||
'name':_("Renew Contract"),
|
||||
|
||||
@@ -522,7 +522,7 @@
|
||||
<field name="name">fleet.vehicle.odometer.tree</field>
|
||||
<field name="model">fleet.vehicle.odometer</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Odometer Logs" version="7.0" editable="bottom">
|
||||
<tree string="Odometer Logs" version="7.0" editable="top">
|
||||
<field name="date" />
|
||||
<field name="vehicle_id" on_change="on_change_vehicle(vehicle_id)"/>
|
||||
<field name="value" />
|
||||
@@ -563,7 +563,7 @@
|
||||
<field name="name">Vehicles Odometer</field>
|
||||
<field name="res_model">fleet.vehicle.odometer</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form,graph</field>
|
||||
<field name="view_mode">tree,graph</field>
|
||||
<field name="context">{"search_default_groupby_vehicle" : True}</field>
|
||||
<field name="help" type="html">
|
||||
<p>
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 22 KiB |
@@ -158,6 +158,8 @@ class hr_employee(osv.osv):
|
||||
return self.write(cr, uid, [id], {'image': tools.image_resize_image_big(value)}, context=context)
|
||||
|
||||
_columns = {
|
||||
#we need a related field in order to be able to sort the employee by name
|
||||
'name_related': fields.related('resource_id', 'name', type='char', string='Name', readonly=True, store=True),
|
||||
'country_id': fields.many2one('res.country', 'Nationality'),
|
||||
'birthday': fields.date("Date of Birth"),
|
||||
'ssnid': fields.char('SSN No', size=32, help='Social Security Number'),
|
||||
@@ -207,6 +209,8 @@ class hr_employee(osv.osv):
|
||||
'last_login': fields.related('user_id', 'date', type='datetime', string='Latest Connection', readonly=1),
|
||||
}
|
||||
|
||||
_order='name_related'
|
||||
|
||||
def create(self, cr, uid, data, context=None):
|
||||
employee_id = super(hr_employee, self).create(cr, uid, data, context=context)
|
||||
try:
|
||||
|
||||
@@ -6,11 +6,11 @@
|
||||
<field name="model">mail.group</field>
|
||||
<field name="res_id" ref="mail.group_all_employees"/>
|
||||
<field name="type">notification</field>
|
||||
<field name="subtype_id" ref="mail.mt_comment"/>
|
||||
<field name="subject">Employee Directory application installed!</field>
|
||||
<field name="body">Manage your human resources with OpenERP: employees and their hierarchy, HR departments and job positions.
|
||||
|
||||
More HR features are available via extra applications: Recruitment Process (manage job positions and recruitment), Timesheet Validation (record timesheets and attendance),
|
||||
Leave Management (keep track of employee leaves), Expense Management (manage employee expenses), Employee Appraisals (organize employee surveys, where employees evaluate their subordinates or their manager).</field>
|
||||
<field name="body"><![CDATA[<p>Manage your human resources with OpenERP: employees and their hierarchy, HR departments and job positions.</p>
|
||||
<p>More HR features are available via extra applications: Recruitment Process (manage job positions and recruitment), Timesheet Validation (record timesheets and attendance),
|
||||
Leave Management (keep track of employee leaves), Expense Management (manage employee expenses), Employee Appraisals (organize employee surveys, where employees evaluate their subordinates or their manager).</p>]]></field>
|
||||
</record>
|
||||
|
||||
<record id="employee" model="hr.employee">
|
||||
|
||||
@@ -18,10 +18,11 @@
|
||||
-o-border-radius: 3px;
|
||||
-ms-border-radius: 3px;
|
||||
border-radius: 3px;
|
||||
border-collapse: separate;
|
||||
-moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
|
||||
-webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
|
||||
-o-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
|
||||
-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
|
||||
box-shadow: 0 1px 4px 3px rgba(0, 0, 0, 0.4);
|
||||
}
|
||||
|
||||
.oe_employee_picture {
|
||||
|
||||
@@ -11,9 +11,9 @@
|
||||
<field name="model">mail.group</field>
|
||||
<field name="res_id" ref="mail.group_all_employees"/>
|
||||
<field name="type">notification</field>
|
||||
<field name="subtype_id" ref="mail.mt_comment"/>
|
||||
<field name="subject">Employee Appraisals application installed!</field>
|
||||
<field name="body">Manage employee reviews: you can define an appraisal campaign with several steps, with specific evaluation surveys according to hierarchy levels.
|
||||
Evaluations filled by employees may be exported as pdf files.</field>
|
||||
<field name="body"><![CDATA[<p>Manage employee reviews: you can define an appraisal campaign with several steps, with specific evaluation surveys according to hierarchy levels. Evaluations filled by employees may be exported as pdf files.</p>]]></field>
|
||||
</record>
|
||||
|
||||
<record id="survey_2" model="survey">
|
||||
@@ -811,8 +811,8 @@ Once the form had been filled, the employee send it to his supervisor.
|
||||
<field name="comment_valid_err_msg">The comment you entered is in an invalid format.</field>
|
||||
<field name="descriptive_text">* His direct reports will be invited through OpenERP to express a feedback on their supervisor's leadership and to give their opinion about their own engagement and effectiveness, the continuous improvement and openness in action in the company, ...
|
||||
|
||||
* The employees will send back their anonymous answers to OpenERP. The data will be handled by the HR manager and a brief summary of the data will be sent to the concerned supervisor, to his team and to the supervisor's supervisor.
|
||||
* The appraiser should rate the employee’s major work accomplishments and performance according to the metric provided below :
|
||||
* The employees will send back their anonymous answers to OpenERP. The data will be handled by the HR manager and a brief summary of the data will be sent to the concerned supervisor, to his team and to the supervisor's supervisor.
|
||||
* The appraiser should rate the employee’s major work accomplishments and performance according to the metric provided below :
|
||||
|
||||
1 - Significantly exceeds standards and expectations required of the position
|
||||
2 - Exceeds standards and expectations
|
||||
|
||||
@@ -64,22 +64,22 @@ class hr_expense_expense(osv.osv):
|
||||
_description = "Expense"
|
||||
_order = "id desc"
|
||||
_columns = {
|
||||
'name': fields.char('Description', size=128),
|
||||
'name': fields.char('Description', size=128, required=True, readonly=True, states={'draft':[('readonly',False)], 'confirm':[('readonly',False)]}),
|
||||
'id': fields.integer('Sheet ID', readonly=True),
|
||||
'date': fields.date('Date', select=True),
|
||||
'date': fields.date('Date', select=True, readonly=True, states={'draft':[('readonly',False)], 'confirm':[('readonly',False)]}),
|
||||
'journal_id': fields.many2one('account.journal', 'Force Journal', help = "The journal used when the expense is done."),
|
||||
'employee_id': fields.many2one('hr.employee', "Employee", required=True),
|
||||
'employee_id': fields.many2one('hr.employee', "Employee", required=True, readonly=True, states={'draft':[('readonly',False)], 'confirm':[('readonly',False)]}),
|
||||
'user_id': fields.many2one('res.users', 'User', required=True),
|
||||
'date_confirm': fields.date('Confirmation Date', select=True, help="Date of the confirmation of the sheet expense. It's filled when the button Confirm is pressed."),
|
||||
'date_valid': fields.date('Validation Date', select=True, help="Date of the acceptation of the sheet expense. It's filled when the button Accept is pressed."),
|
||||
'user_valid': fields.many2one('res.users', 'Validation By'),
|
||||
'user_valid': fields.many2one('res.users', 'Validation By', readonly=True, states={'draft':[('readonly',False)], 'confirm':[('readonly',False)]}),
|
||||
'account_move_id': fields.many2one('account.move', 'Ledger Posting'),
|
||||
'line_ids': fields.one2many('hr.expense.line', 'expense_id', 'Expense Lines', readonly=True, states={'draft':[('readonly',False)]} ),
|
||||
'note': fields.text('Note'),
|
||||
'amount': fields.function(_amount, string='Total Amount', digits_compute= dp.get_precision('Account')),
|
||||
'voucher_id': fields.many2one('account.voucher', "Employee's Receipt"),
|
||||
'currency_id': fields.many2one('res.currency', 'Currency', required=True),
|
||||
'department_id':fields.many2one('hr.department','Department'),
|
||||
'currency_id': fields.many2one('res.currency', 'Currency', required=True, readonly=True, states={'draft':[('readonly',False)], 'confirm':[('readonly',False)]}),
|
||||
'department_id':fields.many2one('hr.department','Department', readonly=True, states={'draft':[('readonly',False)], 'confirm':[('readonly',False)]}),
|
||||
'company_id': fields.many2one('res.company', 'Company', required=True),
|
||||
'state': fields.selection([
|
||||
('draft', 'New'),
|
||||
@@ -100,6 +100,12 @@ class hr_expense_expense(osv.osv):
|
||||
'currency_id': _get_currency,
|
||||
}
|
||||
|
||||
def unlink(self, cr, uid, ids, context=None):
|
||||
for rec in self.browse(cr, uid, ids, context=context):
|
||||
if rec.state != 'draft':
|
||||
raise osv.except_osv(_('Warning!'),_('You can only delete draft expenses!'))
|
||||
return super(hr_expense_expense, self).unlink(cr, uid, ids, context)
|
||||
|
||||
def onchange_currency_id(self, cr, uid, ids, currency_id=False, company_id=False, context=None):
|
||||
res = {'value': {'journal_id': False}}
|
||||
journal_ids = self.pool.get('account.journal').search(cr, uid, [('type','=','purchase'), ('currency','=',currency_id), ('company_id', '=', company_id)], context=context)
|
||||
|
||||
@@ -6,10 +6,10 @@
|
||||
<field name="model">mail.group</field>
|
||||
<field name="res_id" ref="mail.group_all_employees"/>
|
||||
<field name="type">notification</field>
|
||||
<field name="subtype_id" ref="mail.mt_comment"/>
|
||||
<field name="subject">Expense Management application installed!</field>
|
||||
<field name="body">Manage your employees' expenses, after due validation by their manager and the accountant, then generate and pay the corresponding invoices.
|
||||
|
||||
This feature is also linked to analytic accounting and compatible with timesheet invoices, so you will be able to automatically re-invoice project-related expenses to your customers.</field>
|
||||
<field name="body"><![CDATA[<p>Manage your employees' expenses, after due validation by their manager and the accountant, then generate and pay the corresponding invoices.</p>
|
||||
<p>This feature is also linked to analytic accounting and compatible with timesheet invoices, so you will be able to automatically re-invoice project-related expenses to your customers.</p>]]></field>
|
||||
</record>
|
||||
|
||||
<!-- Resource: product.uom.categ -->
|
||||
|
||||
@@ -11,9 +11,10 @@
|
||||
<field name="model">mail.group</field>
|
||||
<field name="res_id" ref="mail.group_all_employees"/>
|
||||
<field name="type">notification</field>
|
||||
<field name="subtype_id" ref="mail.mt_comment"/>
|
||||
<field name="subject">Leave Management application installed!</field>
|
||||
<field name="body">Manage employee leaves from the top menu "Human Resources". Employees can create leave requests that are validated by their manager and/or HR officers.
|
||||
Once validated, they are visible in the employee's calendar. HR officers can define leave types and allocate leaves to employees and employee categories.</field>
|
||||
<field name="body"><![CDATA[<p>Manage employee leaves from the top menu "Human Resources". Employees can create leave requests that are validated by their manager and/or HR officers.</p>
|
||||
<p>Once validated, they are visible in the employee's calendar. HR officers can define leave types and allocate leaves to employees and employee categories.</p>]]></field>
|
||||
</record>
|
||||
|
||||
|
||||
|
||||
@@ -122,7 +122,7 @@
|
||||
</sheet>
|
||||
<div class="oe_chatter">
|
||||
<field name="message_follower_ids" widget="mail_followers"/>
|
||||
<field name="message_ids" colspan="4" widget="mail_thread" nolabel="1"/>
|
||||
<field name="message_ids" widget="mail_thread"/>
|
||||
</div>
|
||||
</form>
|
||||
</field>
|
||||
@@ -159,7 +159,7 @@
|
||||
</sheet>
|
||||
<div class="oe_chatter">
|
||||
<field name="message_follower_ids" widget="mail_followers"/>
|
||||
<field name="message_ids" colspan="4" widget="mail_thread" nolabel="1"/>
|
||||
<field name="message_ids" widget="mail_thread"/>
|
||||
</div>
|
||||
</form>
|
||||
</field>
|
||||
|
||||
@@ -359,6 +359,12 @@ class hr_payslip(osv.osv):
|
||||
def check_done(self, cr, uid, ids, context=None):
|
||||
return True
|
||||
|
||||
def unlink(self, cr, uid, ids, context=None):
|
||||
for payslip in self.browse(cr, uid, ids, context=context):
|
||||
if payslip.state not in ['draft','cancel']:
|
||||
raise osv.except_osv(_('Warning!'),_('You cannot delete a payslip which is not draft or cancelled!'))
|
||||
return super(hr_payslip, self).unlink(cr, uid, ids, context)
|
||||
|
||||
#TODO move this function into hr_contract module, on hr.employee object
|
||||
def get_contract(self, cr, uid, employee, date_from, date_to, context=None):
|
||||
"""
|
||||
|
||||
@@ -75,7 +75,7 @@
|
||||
<record id="hr_salary_rule_meal_voucher" model="hr.salary.rule">
|
||||
<field name="amount_select">fix</field>
|
||||
<field eval="10" name="amount_fix"/>
|
||||
<field name="quantity">worked_days.WORK100.number_of_days</field>
|
||||
<field name="quantity">worked_days.WORK100 and worked_days.WORK100.number_of_days</field>
|
||||
<field name="code">MA</field>
|
||||
<field name="category_id" ref="hr_payroll.ALW"/>
|
||||
<field name="register_id" ref="hr_meal_voucher_register"/>
|
||||
@@ -89,7 +89,7 @@
|
||||
<field name="category_id" ref="hr_payroll.ALW"/>
|
||||
<field name="name">Get 1% of sales</field>
|
||||
<field name="sequence" eval="17"/>
|
||||
<field name="amount_python_compute">result = (inputs.SALEURO.amount + inputs.SALASIA.amount) * 0.01</field>
|
||||
<field name="amount_python_compute">result = ((inputs.SALEURO and inputs.SALEURO.amount) + (inputs.SALASIA and inputs.SALASIA.amount)) * 0.01</field>
|
||||
</record>
|
||||
|
||||
<!-- Rule Inputs -->
|
||||
|
||||
@@ -6,10 +6,10 @@
|
||||
<field name="model">mail.group</field>
|
||||
<field name="res_id" ref="mail.group_all_employees"/>
|
||||
<field name="type">notification</field>
|
||||
<field name="subtype_id" ref="mail.mt_comment"/>
|
||||
<field name="subject">Recruitment Process application installed!</field>
|
||||
<field name="body">Manage job positions and your company's recruitment process. This application is integrated with the Survey application to help you define interviews for different jobs.
|
||||
|
||||
You can automatically receive job application though an email gateway, see the Human Resources settings.</field>
|
||||
<field name="body"><![CDATA[<p>Manage job positions and your company's recruitment process. This application is integrated with the Survey application to help you define interviews for different jobs.</p>
|
||||
<p>You can automatically receive job application though an email gateway, see the Human Resources settings.</p>]]></field>
|
||||
</record>
|
||||
|
||||
<!-- Meeting Types (for interview meetings) -->
|
||||
|
||||
@@ -184,7 +184,7 @@
|
||||
</sheet>
|
||||
<div class="oe_chatter">
|
||||
<field name="message_follower_ids" widget="mail_followers"/>
|
||||
<field name="message_ids" widget="mail_thread"/>
|
||||
<field name="message_ids" widget="mail_thread" placeholder="Share a message..."/>
|
||||
</div>
|
||||
</form>
|
||||
</field>
|
||||
|
||||
@@ -6,8 +6,9 @@
|
||||
<field name="model">mail.group</field>
|
||||
<field name="res_id" ref="mail.group_all_employees"/>
|
||||
<field name="type">notification</field>
|
||||
<field name="subtype_id" ref="mail.mt_comment"/>
|
||||
<field name="subject">Timesheet Validation application installed!</field>
|
||||
<field name="body">From the top menu "Human Resources", enter and validate timesheets and attendances.</field>
|
||||
<field name="body"><![CDATA[<p>From the top menu "Human Resources", enter and validate timesheets and attendances.</p>]]></field>
|
||||
</record>
|
||||
|
||||
<record id="ir_actions_server_timsheet_sheet" model="ir.actions.server">
|
||||
|
||||
@@ -162,7 +162,7 @@
|
||||
</notebook>
|
||||
</sheet>
|
||||
<div class="oe_chatter">
|
||||
<field name="message_ids" colspan="4" widget="mail_thread" nolabel="1"/>
|
||||
<field name="message_ids" widget="mail_thread"/>
|
||||
<field name="message_follower_ids" widget="mail_followers"/>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@@ -1,21 +1,21 @@
|
||||
# Spanish (Paraguay) translation for openobject-addons
|
||||
# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
|
||||
# Spanish (Argentina) translation for openobject-addons
|
||||
# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012
|
||||
# This file is distributed under the same license as the openobject-addons package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, 2011.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, 2012.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: openobject-addons\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2011-01-11 11:15+0000\n"
|
||||
"PO-Revision-Date: 2011-03-21 16:23+0000\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: Spanish (Paraguay) <es_PY@li.org>\n"
|
||||
"PO-Revision-Date: 2012-11-13 15:04+0000\n"
|
||||
"Last-Translator: Eduardo Alberto Calvo <Unknown>\n"
|
||||
"Language-Team: Spanish (Argentina) <es_AR@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: 2011-03-22 04:36+0000\n"
|
||||
"X-Generator: Launchpad (build 12559)\n"
|
||||
"X-Launchpad-Export-Date: 2012-11-14 04:40+0000\n"
|
||||
"X-Generator: Launchpad (build 16251)\n"
|
||||
|
||||
#. module: l10n_ar
|
||||
#: model:ir.module.module,description:l10n_ar.module_meta_information
|
||||
@@ -31,7 +31,7 @@ msgstr ""
|
||||
#. module: l10n_ar
|
||||
#: model:ir.module.module,shortdesc:l10n_ar.module_meta_information
|
||||
msgid "Argentinian Chart of Account"
|
||||
msgstr "Plan de cuentas de la Argentina"
|
||||
msgstr "Plan de cuentas de Argentina"
|
||||
|
||||
#. module: l10n_ar
|
||||
#: model:ir.actions.todo,note:l10n_ar.config_call_account_template_in_minimal
|
||||
@@ -45,7 +45,7 @@ msgid ""
|
||||
"Chart of Accounts from a Chart Template."
|
||||
msgstr ""
|
||||
"Generar el plan contable a partir de una plantilla de plan contable. Se le "
|
||||
"pedirá el nombre de la compañía, la plantilla de plan contable a utilizar, "
|
||||
"pedirá el nombre de la compañia, la plantilla de plan contable a utilizar, "
|
||||
"el número de dígitos para generar el código de las cuentas y de la cuenta "
|
||||
"bancaria, la moneda para crear los diarios. Así pues, se genere una copia "
|
||||
"exacta de la plantilla de plan contable.\n"
|
||||
|
||||
@@ -65,6 +65,8 @@ class partner_vat(osv.osv_memory):
|
||||
|
||||
partners = []
|
||||
partner_ids = obj_partner.search(cr, uid, [('vat_subjected', '!=', False), ('vat','ilike','BE%')], context=context)
|
||||
if not partner_ids:
|
||||
raise osv.except_osv(_('Error'),_('No belgian contact with a VAT number in your database.'))
|
||||
cr.execute("""SELECT sub1.partner_id, sub1.name, sub1.vat, sub1.turnover, sub2.vat_amount
|
||||
FROM (SELECT l.partner_id, p.name, p.vat, SUM(CASE WHEN c.code ='49' THEN -l.tax_amount ELSE l.tax_amount END) as turnover
|
||||
FROM account_move_line l
|
||||
@@ -190,7 +192,7 @@ class partner_vat_list(osv.osv_memory):
|
||||
addr = obj_partner.address_get(cr, uid, [obj_cmpny.partner_id.id], ['invoice'])
|
||||
if addr.get('invoice',False):
|
||||
ads = obj_partner.browse(cr, uid, [addr['invoice']], context=context)[0]
|
||||
phone = ads.phone.replace(' ','') or ''
|
||||
phone = ads.phone and ads.phone.replace(' ','') or ''
|
||||
email = ads.email or ''
|
||||
name = ads.name or ''
|
||||
city = ads.city or ''
|
||||
@@ -259,6 +261,8 @@ class partner_vat_list(osv.osv_memory):
|
||||
|
||||
# Turnover and Farmer tags are not included
|
||||
client_datas = self._get_datas(cr, uid, ids, context=context)
|
||||
if not client_datas:
|
||||
raise osv.except_osv(_('Data Insufficient!'),_('No data available for the client.'))
|
||||
data_client_info = ''
|
||||
for amount_data in client_datas:
|
||||
data_client_info += """
|
||||
@@ -309,6 +313,8 @@ class partner_vat_list(osv.osv_memory):
|
||||
datas['year'] = context['year']
|
||||
datas['limit_amount'] = context['limit_amount']
|
||||
datas['client_datas'] = self._get_datas(cr, uid, ids, context=context)
|
||||
if not datas['client_datas']:
|
||||
raise osv.except_osv(_('Error!'),_('No record to print.'))
|
||||
return {
|
||||
'type': 'ir.actions.report.xml',
|
||||
'report_name': 'partner.vat.listing.print',
|
||||
|
||||
@@ -28,6 +28,7 @@ import logging
|
||||
import re
|
||||
from traceback import format_exception
|
||||
from sys import exc_info
|
||||
from base_iban import base_iban
|
||||
_logger = logging.getLogger(__name__)
|
||||
|
||||
class account_coda_import(osv.osv_memory):
|
||||
@@ -398,6 +399,7 @@ class account_coda_import(osv.osv_memory):
|
||||
st_line['account_id'] = transfer_acc
|
||||
match = True
|
||||
elif find_partner:
|
||||
counterparty_number = base_iban._pretty_iban(base_iban._format_iban(counterparty_number))
|
||||
bank_ids = partner_bank_obj.search(cr,uid,[('acc_number','=', counterparty_number)])
|
||||
if not match and find_partner and bank_ids:
|
||||
if len(bank_ids) > 1:
|
||||
|
||||
@@ -0,0 +1,158 @@
|
||||
# Spanish translation for openobject-addons
|
||||
# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012
|
||||
# This file is distributed under the same license as the openobject-addons package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, 2012.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: openobject-addons\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2012-02-08 00:36+0000\n"
|
||||
"PO-Revision-Date: 2012-11-12 16:09+0000\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\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: 2012-11-13 05:17+0000\n"
|
||||
"X-Generator: Launchpad (build 16251)\n"
|
||||
|
||||
#. module: l10n_be_hr_payroll
|
||||
#: help:hr.employee,disabled_spouse_bool:0
|
||||
msgid "if recipient spouse is declared disabled by law"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_be_hr_payroll
|
||||
#: help:hr.employee,disabled_children_bool:0
|
||||
msgid "if recipient children is/are declared disabled by law"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_be_hr_payroll
|
||||
#: field:hr.contract,misc_onss_deduction:0
|
||||
msgid "Miscellaneous exempt ONSS "
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_be_hr_payroll
|
||||
#: model:ir.model,name:l10n_be_hr_payroll.model_hr_employee
|
||||
msgid "Employee"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_be_hr_payroll
|
||||
#: field:hr.employee,disabled_spouse_bool:0
|
||||
msgid "Disabled Spouse"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_be_hr_payroll
|
||||
#: field:hr.contract,retained_net_amount:0
|
||||
msgid "Net retained "
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_be_hr_payroll
|
||||
#: field:hr.employee,resident_bool:0
|
||||
msgid "Nonresident"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_be_hr_payroll
|
||||
#: help:hr.employee,resident_bool:0
|
||||
msgid "if recipient lives in a foreign country"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_be_hr_payroll
|
||||
#: view:hr.employee:0
|
||||
msgid "if spouse has professionnel income or not"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_be_hr_payroll
|
||||
#: view:hr.contract:0
|
||||
msgid "Miscellaneous"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_be_hr_payroll
|
||||
#: field:hr.contract,insurance_employee_deduction:0
|
||||
msgid "Insurance Group - by worker "
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_be_hr_payroll
|
||||
#: selection:hr.employee,spouse_fiscal_status:0
|
||||
msgid "With Income"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_be_hr_payroll
|
||||
#: selection:hr.employee,spouse_fiscal_status:0
|
||||
msgid "Without Income"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_be_hr_payroll
|
||||
#: field:hr.employee,disabled_children_number:0
|
||||
msgid "Number of disabled children"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_be_hr_payroll
|
||||
#: field:hr.contract,additional_net_amount:0
|
||||
msgid "Net supplements"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_be_hr_payroll
|
||||
#: constraint:hr.employee:0
|
||||
msgid "Error ! You cannot create recursive Hierarchy of Employees."
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_be_hr_payroll
|
||||
#: field:hr.contract,car_company_amount:0
|
||||
msgid "Company car employer"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_be_hr_payroll
|
||||
#: field:hr.contract,misc_advantage_amount:0
|
||||
msgid "Benefits of various nature "
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_be_hr_payroll
|
||||
#: field:hr.contract,car_employee_deduction:0
|
||||
msgid "Company Car Deduction for Worker"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_be_hr_payroll
|
||||
#: field:hr.employee,disabled_children_bool:0
|
||||
msgid "Disabled Children"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_be_hr_payroll
|
||||
#: model:ir.model,name:l10n_be_hr_payroll.model_hr_contract
|
||||
msgid "Contract"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_be_hr_payroll
|
||||
#: field:hr.contract,meal_voucher_amount:0
|
||||
msgid "Check Value Meal "
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_be_hr_payroll
|
||||
#: field:hr.contract,travel_reimbursement_amount:0
|
||||
msgid "Reimbursement of travel expenses"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_be_hr_payroll
|
||||
#: constraint:hr.contract:0
|
||||
msgid "Error! contract start-date must be lower then contract end-date."
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_be_hr_payroll
|
||||
#: field:hr.employee,spouse_fiscal_status:0
|
||||
msgid "Tax status for spouse"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_be_hr_payroll
|
||||
#: view:hr.contract:0
|
||||
msgid "by Worker"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_be_hr_payroll
|
||||
#: view:hr.employee:0
|
||||
msgid "number of dependent children declared as disabled"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_be_hr_payroll
|
||||
#: field:hr.contract,meal_voucher_employee_deduction:0
|
||||
msgid "Check Value Meal - by worker "
|
||||
msgstr ""
|
||||
@@ -0,0 +1,141 @@
|
||||
# Spanish translation for openobject-addons
|
||||
# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012
|
||||
# This file is distributed under the same license as the openobject-addons package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, 2012.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: openobject-addons\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2012-02-08 00:36+0000\n"
|
||||
"PO-Revision-Date: 2012-11-12 16:43+0000\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\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: 2012-11-13 05:17+0000\n"
|
||||
"X-Generator: Launchpad (build 16251)\n"
|
||||
|
||||
#. module: l10n_be_invoice_bba
|
||||
#: sql_constraint:account.invoice:0
|
||||
msgid "Invoice Number must be unique per Company!"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_be_invoice_bba
|
||||
#: model:ir.model,name:l10n_be_invoice_bba.model_account_invoice
|
||||
msgid "Invoice"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_be_invoice_bba
|
||||
#: constraint:res.partner:0
|
||||
msgid "Error ! You cannot create recursive associated members."
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_be_invoice_bba
|
||||
#: constraint:account.invoice:0
|
||||
msgid "Invalid BBA Structured Communication !"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_be_invoice_bba
|
||||
#: selection:res.partner,out_inv_comm_algorithm:0
|
||||
msgid "Random"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_be_invoice_bba
|
||||
#: help:res.partner,out_inv_comm_type:0
|
||||
msgid "Select Default Communication Type for Outgoing Invoices."
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_be_invoice_bba
|
||||
#: help:res.partner,out_inv_comm_algorithm:0
|
||||
msgid ""
|
||||
"Select Algorithm to generate the Structured Communication on Outgoing "
|
||||
"Invoices."
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_be_invoice_bba
|
||||
#: code:addons/l10n_be_invoice_bba/invoice.py:114
|
||||
#: code:addons/l10n_be_invoice_bba/invoice.py:140
|
||||
#, python-format
|
||||
msgid ""
|
||||
"The daily maximum of outgoing invoices with an automatically generated BBA "
|
||||
"Structured Communications has been exceeded!\n"
|
||||
"Please create manually a unique BBA Structured Communication."
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_be_invoice_bba
|
||||
#: code:addons/l10n_be_invoice_bba/invoice.py:155
|
||||
#, python-format
|
||||
msgid "Error!"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_be_invoice_bba
|
||||
#: code:addons/l10n_be_invoice_bba/invoice.py:126
|
||||
#, python-format
|
||||
msgid ""
|
||||
"The Partner should have a 3-7 digit Reference Number for the generation of "
|
||||
"BBA Structured Communications!\n"
|
||||
"Please correct the Partner record."
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_be_invoice_bba
|
||||
#: code:addons/l10n_be_invoice_bba/invoice.py:113
|
||||
#: code:addons/l10n_be_invoice_bba/invoice.py:125
|
||||
#: code:addons/l10n_be_invoice_bba/invoice.py:139
|
||||
#: code:addons/l10n_be_invoice_bba/invoice.py:167
|
||||
#: code:addons/l10n_be_invoice_bba/invoice.py:177
|
||||
#: code:addons/l10n_be_invoice_bba/invoice.py:202
|
||||
#, python-format
|
||||
msgid "Warning!"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_be_invoice_bba
|
||||
#: selection:res.partner,out_inv_comm_algorithm:0
|
||||
msgid "Customer Reference"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_be_invoice_bba
|
||||
#: field:res.partner,out_inv_comm_type:0
|
||||
msgid "Communication Type"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_be_invoice_bba
|
||||
#: code:addons/l10n_be_invoice_bba/invoice.py:178
|
||||
#: code:addons/l10n_be_invoice_bba/invoice.py:203
|
||||
#, python-format
|
||||
msgid ""
|
||||
"The BBA Structured Communication has already been used!\n"
|
||||
"Please create manually a unique BBA Structured Communication."
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_be_invoice_bba
|
||||
#: selection:res.partner,out_inv_comm_algorithm:0
|
||||
msgid "Date"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_be_invoice_bba
|
||||
#: model:ir.model,name:l10n_be_invoice_bba.model_res_partner
|
||||
msgid "Partner"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_be_invoice_bba
|
||||
#: code:addons/l10n_be_invoice_bba/invoice.py:156
|
||||
#, python-format
|
||||
msgid ""
|
||||
"Unsupported Structured Communication Type Algorithm '%s' !\n"
|
||||
"Please contact your OpenERP support channel."
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_be_invoice_bba
|
||||
#: field:res.partner,out_inv_comm_algorithm:0
|
||||
msgid "Communication Algorithm"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_be_invoice_bba
|
||||
#: code:addons/l10n_be_invoice_bba/invoice.py:168
|
||||
#, python-format
|
||||
msgid ""
|
||||
"Empty BBA Structured Communication!\n"
|
||||
"Please fill in a unique BBA Structured Communication."
|
||||
msgstr ""
|
||||
@@ -131,8 +131,8 @@
|
||||
<field name="tax_code_id" ref="tax_acq_196"/>
|
||||
<field name="tax_sign" eval="-1"/>
|
||||
|
||||
<field name="account_collected_id" ref="pcg_44566"/>
|
||||
<field name="account_paid_id" ref="pcg_44566"/>
|
||||
<field name="account_collected_id" ref="pcg_445662"/>
|
||||
<field name="account_paid_id" ref="pcg_445662"/>
|
||||
|
||||
<field name="ref_base_code_id" ref="tax_acq_196_ht"/>
|
||||
<field name="ref_base_sign" eval="1"/>
|
||||
|
||||
@@ -3903,7 +3903,7 @@
|
||||
<field name="name">Associés - Comptes courants</field>
|
||||
<field name="code">455</field>
|
||||
<field name="type">view</field>
|
||||
<field name="user_type" ref="account.data_account_type_view"/>
|
||||
<field name="user_type" ref="account.data_account_type_payable"/>
|
||||
<field name="note">Pour frais avancés personnellement</field>
|
||||
<field name="parent_id" ref="pcg_45"/>
|
||||
<field name="reconcile" eval="True"/>
|
||||
@@ -3912,8 +3912,8 @@
|
||||
<record id="pcg_4551" model="account.account.template">
|
||||
<field name="name">Principal</field>
|
||||
<field name="code">4551</field>
|
||||
<field name="type">receivable</field>
|
||||
<field name="user_type" ref="account.data_account_type_receivable"/>
|
||||
<field name="type">payable</field>
|
||||
<field name="user_type" ref="account.data_account_type_payable"/>
|
||||
<field name="parent_id" ref="pcg_455"/>
|
||||
<field name="reconcile" eval="True"/>
|
||||
</record>
|
||||
@@ -3921,8 +3921,8 @@
|
||||
<record id="pcg_4558" model="account.account.template">
|
||||
<field name="name">Intérêts courus</field>
|
||||
<field name="code">4558</field>
|
||||
<field name="type">receivable</field>
|
||||
<field name="user_type" ref="account.data_account_type_receivable"/>
|
||||
<field name="type">payable</field>
|
||||
<field name="user_type" ref="account.data_account_type_payable"/>
|
||||
<field name="parent_id" ref="pcg_455"/>
|
||||
<field name="reconcile" eval="True"/>
|
||||
</record>
|
||||
|
||||
@@ -0,0 +1,942 @@
|
||||
# Spanish translation for openobject-addons
|
||||
# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012
|
||||
# This file is distributed under the same license as the openobject-addons package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, 2012.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: openobject-addons\n"
|
||||
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"POT-Creation-Date: 2012-08-17 06:46+0000\n"
|
||||
"PO-Revision-Date: 2012-11-12 17:08+0000\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\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: 2012-11-13 05:17+0000\n"
|
||||
"X-Generator: Launchpad (build 16251)\n"
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: report:salary.detail.byyear:0
|
||||
msgid "E-mail Address"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: field:payment.advice.report,employee_bank_no:0
|
||||
msgid "Employee Bank Account"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: view:payment.advice.report:0
|
||||
msgid "Payment Advices which are in draft state"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: report:salary.detail.byyear:0
|
||||
msgid "Title"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: report:payroll.advice:0
|
||||
msgid "Payment Advice from"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: model:ir.model,name:l10n_in_hr_payroll.model_yearly_salary_detail
|
||||
msgid "Hr Salary Employee By Category Report"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: report:salary.detail.byyear:0
|
||||
msgid "Employees Salary Details"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: report:salary.detail.byyear:0
|
||||
msgid "Allowances with Basic:"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: report:salary.detail.byyear:0
|
||||
msgid "Department"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: report:salary.detail.byyear:0
|
||||
msgid "Deductions:"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: report:payroll.advice:0
|
||||
msgid "A/C no."
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: field:hr.contract,driver_salay:0
|
||||
msgid "Driver Salary"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: model:ir.actions.act_window,name:l10n_in_hr_payroll.action_yearly_salary_detail
|
||||
#: model:ir.actions.report.xml,name:l10n_in_hr_payroll.yearly_salary
|
||||
#: model:ir.ui.menu,name:l10n_in_hr_payroll.menu_yearly_salary_detail
|
||||
msgid "Yearly Salary by Employee"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: model:ir.actions.act_window,name:l10n_in_hr_payroll.act_hr_emp_payslip_list
|
||||
msgid "Payslips"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: selection:payment.advice.report,month:0
|
||||
msgid "March"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: report:paylip.details.in:0
|
||||
msgid "("
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: view:hr.payroll.advice:0
|
||||
#: field:hr.payroll.advice,company_id:0
|
||||
#: field:hr.payroll.advice.line,company_id:0
|
||||
#: view:payment.advice.report:0
|
||||
#: field:payment.advice.report,company_id:0
|
||||
msgid "Company"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: report:payroll.advice:0
|
||||
msgid "The Manager"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: view:hr.payroll.advice:0
|
||||
msgid "Letter Details"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: report:paylip.details.in:0
|
||||
msgid ","
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: view:hr.payroll.advice:0
|
||||
msgid "Set to Draft"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: help:hr.employee,number_of_year:0
|
||||
msgid "Total years of work experience"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: report:payroll.advice:0
|
||||
msgid "to"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: report:payroll.advice:0
|
||||
msgid "Total :"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: field:hr.payslip.run,available_advice:0
|
||||
msgid "Made Payment Advice?"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: view:payment.advice.report:0
|
||||
msgid "Advices which are paid using NEFT transfer"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: help:hr.contract,tds:0
|
||||
msgid "Amount for Tax Deduction at Source"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: model:ir.model,name:l10n_in_hr_payroll.model_hr_payslip
|
||||
msgid "Pay Slip"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: view:payment.advice.report:0
|
||||
#: field:payment.advice.report,day:0
|
||||
msgid "Day"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: view:payment.advice.report:0
|
||||
msgid "Month of Payment Advices"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: constraint:hr.payslip:0
|
||||
msgid "Payslip 'Date From' must be before 'Date To'."
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: field:hr.payroll.advice,batch_id:0
|
||||
msgid "Batch"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: report:paylip.details.in:0
|
||||
msgid "Code"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: view:hr.payroll.advice:0
|
||||
msgid "Other Information"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: selection:hr.payroll.advice,state:0
|
||||
#: selection:payment.advice.report,state:0
|
||||
msgid "Cancelled"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: report:payroll.advice:0
|
||||
msgid "For"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: report:paylip.details.in:0
|
||||
msgid "Details by Salary Rule Category:"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: help:hr.contract,voluntary_provident_fund:0
|
||||
msgid "VPF computed as percentage(%)"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: field:hr.payroll.advice,number:0
|
||||
#: report:paylip.details.in:0
|
||||
msgid "Reference"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: view:hr.payroll.advice:0
|
||||
#: view:payment.advice.report:0
|
||||
msgid "Group By..."
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: field:hr.contract,medical_insurance:0
|
||||
msgid "Medical Insurance"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: report:paylip.details.in:0
|
||||
msgid "Identification No"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: selection:hr.payroll.advice,state:0
|
||||
#: selection:payment.advice.report,state:0
|
||||
msgid "Confirmed"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: report:salary.detail.byyear:0
|
||||
#: report:salary.employee.bymonth:0
|
||||
msgid "From"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: field:hr.payroll.advice.line,bysal:0
|
||||
#: field:payment.advice.report,bysal:0
|
||||
#: report:payroll.advice:0
|
||||
msgid "By Salary"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: view:hr.payroll.advice:0
|
||||
#: view:payment.advice.report:0
|
||||
msgid "Confirm"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: field:hr.payroll.advice,chaque_nos:0
|
||||
#: field:payment.advice.report,cheque_nos:0
|
||||
msgid "Cheque Numbers"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: constraint:res.company:0
|
||||
msgid "Error! You can not create recursive companies."
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: model:ir.actions.act_window,name:l10n_in_hr_payroll.action_salary_employee_month
|
||||
#: model:ir.actions.report.xml,name:l10n_in_hr_payroll.hr_salary_employee_bymonth
|
||||
#: model:ir.ui.menu,name:l10n_in_hr_payroll.menu_salary_employee_month
|
||||
msgid "Yearly Salary by Head"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: code:addons/l10n_in_hr_payroll/l10n_in_hr_payroll.py:184
|
||||
#, python-format
|
||||
msgid "You can not confirm Payment advice without advice lines."
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: field:hr.payroll.advice,state:0
|
||||
#: field:payment.advice.report,state:0
|
||||
msgid "State"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: report:payroll.advice:0
|
||||
msgid "Yours Sincerely"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: help:hr.contract,medical_insurance:0
|
||||
msgid "Deduction towards company provided medical insurance"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: model:ir.model,name:l10n_in_hr_payroll.model_hr_payroll_advice_line
|
||||
msgid "Bank Advice Lines"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: report:paylip.details.in:0
|
||||
msgid "Email"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: help:hr.payslip.run,available_advice:0
|
||||
msgid ""
|
||||
"If this box is checked which means that Payment Advice exists for current "
|
||||
"batch"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: code:addons/l10n_in_hr_payroll/l10n_in_hr_payroll.py:158
|
||||
#: code:addons/l10n_in_hr_payroll/l10n_in_hr_payroll.py:184
|
||||
#: code:addons/l10n_in_hr_payroll/l10n_in_hr_payroll.py:240
|
||||
#: code:addons/l10n_in_hr_payroll/l10n_in_hr_payroll.py:257
|
||||
#, python-format
|
||||
msgid "Error !"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: view:hr.salary.employee.month:0
|
||||
#: view:yearly.salary.detail:0
|
||||
msgid "Print"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: model:ir.model,name:l10n_in_hr_payroll.model_hr_payslip_run
|
||||
msgid "Payslip Batches"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: field:hr.payroll.advice.line,debit_credit:0
|
||||
#: report:payroll.advice:0
|
||||
msgid "C/D"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: report:salary.employee.bymonth:0
|
||||
msgid "Yearly Salary Details"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: model:ir.actions.report.xml,name:l10n_in_hr_payroll.payroll_advice
|
||||
msgid "Print Advice"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: field:hr.payroll.advice,line_ids:0
|
||||
msgid "Employee Salary"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: selection:payment.advice.report,month:0
|
||||
msgid "July"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: view:res.company:0
|
||||
msgid "Configuration"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: model:ir.actions.act_window,name:l10n_in_hr_payroll.action_view_hr_bank_advice_tree
|
||||
#: model:ir.ui.menu,name:l10n_in_hr_payroll.hr_menu_payment_advice
|
||||
msgid "Payment Advices"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: model:ir.actions.act_window,name:l10n_in_hr_payroll.action_payment_advice_report_all
|
||||
#: model:ir.ui.menu,name:l10n_in_hr_payroll.menu_reporting_payment_advice
|
||||
#: view:payment.advice.report:0
|
||||
msgid "Advices Analysis"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: view:hr.salary.employee.month:0
|
||||
msgid ""
|
||||
"This wizard will print report which displays employees break-up of Net Head "
|
||||
"for a specified dates."
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: field:hr.payroll.advice.line,ifsc:0
|
||||
msgid "IFSC"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: report:paylip.details.in:0
|
||||
msgid "Date To"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: field:hr.contract,tds:0
|
||||
msgid "TDS"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: field:hr.employee,join_date:0
|
||||
msgid "Join Date"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: view:hr.payroll.advice:0
|
||||
msgid "Confirm Advices"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: constraint:hr.contract:0
|
||||
msgid "Error! Contract start-date must be less than contract end-date."
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: field:res.company,dearness_allowance:0
|
||||
msgid "Dearness Allowance"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: selection:payment.advice.report,month:0
|
||||
msgid "August"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: view:hr.contract:0
|
||||
msgid "Deduction"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: view:hr.payroll.advice:0
|
||||
msgid "Search Payment advice"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: report:payroll.advice:0
|
||||
msgid "SI. No."
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: view:payment.advice.report:0
|
||||
msgid "Payment Advices which are in confirm state"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: selection:payment.advice.report,month:0
|
||||
msgid "December"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: view:hr.payroll.advice:0
|
||||
msgid "Confirm Sheet"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: view:payment.advice.report:0
|
||||
#: field:payment.advice.report,month:0
|
||||
msgid "Month"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: report:salary.detail.byyear:0
|
||||
msgid "Employee Code"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: selection:hr.contract,city_type:0
|
||||
msgid "Non Metro"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: view:hr.salary.employee.month:0
|
||||
#: view:yearly.salary.detail:0
|
||||
msgid "or"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: model:ir.model,name:l10n_in_hr_payroll.model_hr_salary_employee_month
|
||||
msgid "Hr Salary Employee By Month Report"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: field:hr.salary.employee.month,category_id:0
|
||||
msgid "Category"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: code:addons/l10n_in_hr_payroll/l10n_in_hr_payroll.py:240
|
||||
#, python-format
|
||||
msgid ""
|
||||
"Payment advice already exists for %s, 'Set to Draft' to create a new advice."
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: view:hr.payslip.run:0
|
||||
msgid "To Advice"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: field:hr.employee,number_of_year:0
|
||||
msgid "No. of Years of Service"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: report:paylip.details.in:0
|
||||
msgid "Note"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: report:paylip.details.in:0
|
||||
msgid "Salary Rule Category"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: view:hr.payroll.advice:0
|
||||
#: selection:hr.payroll.advice,state:0
|
||||
#: view:payment.advice.report:0
|
||||
#: selection:payment.advice.report,state:0
|
||||
msgid "Draft"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: report:paylip.details.in:0
|
||||
msgid "Date From"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: field:hr.contract,voluntary_provident_fund:0
|
||||
msgid "Voluntary Provident Fund"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: report:salary.detail.byyear:0
|
||||
msgid "Employee Name"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: model:ir.model,name:l10n_in_hr_payroll.model_payment_advice_report
|
||||
msgid "Payment Advice Analysis"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: view:hr.payroll.advice:0
|
||||
#: view:payment.advice.report:0
|
||||
msgid "Status"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: field:hr.contract,city_type:0
|
||||
msgid "Type of City"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: help:res.company,dearness_allowance:0
|
||||
msgid "Check this box if your company provide Dearness Allowance to employee"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: field:hr.payroll.advice.line,ifsc_code:0
|
||||
#: field:payment.advice.report,ifsc_code:0
|
||||
#: report:payroll.advice:0
|
||||
msgid "IFSC Code"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: selection:payment.advice.report,month:0
|
||||
msgid "June"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: view:payment.advice.report:0
|
||||
#: field:payment.advice.report,nbr:0
|
||||
msgid "# Payment Lines"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: model:ir.actions.report.xml,name:l10n_in_hr_payroll.payslip_details_report
|
||||
msgid "PaySlip Details"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: view:hr.payroll.advice:0
|
||||
msgid "Payment Lines"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: field:hr.payroll.advice,date:0
|
||||
#: field:payment.advice.report,date:0
|
||||
msgid "Date"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: selection:payment.advice.report,month:0
|
||||
msgid "November"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: view:payment.advice.report:0
|
||||
msgid "Extended Filters..."
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: model:ir.actions.act_window,help:l10n_in_hr_payroll.action_payment_advice_report_all
|
||||
msgid "This report performs analysis on Payment Advices"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: selection:payment.advice.report,month:0
|
||||
msgid "October"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: report:paylip.details.in:0
|
||||
#: report:salary.detail.byyear:0
|
||||
msgid "Designation"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: selection:payment.advice.report,month:0
|
||||
msgid "January"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: view:yearly.salary.detail:0
|
||||
msgid "Pay Head Employee Breakup"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: model:ir.model,name:l10n_in_hr_payroll.model_res_company
|
||||
msgid "Companies"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: report:paylip.details.in:0
|
||||
#: report:payroll.advice:0
|
||||
msgid "Authorized Signature"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: model:ir.model,name:l10n_in_hr_payroll.model_hr_contract
|
||||
msgid "Contract"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: view:hr.payroll.advice.line:0
|
||||
msgid "Advice Lines"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: report:payroll.advice:0
|
||||
msgid "To,"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: help:hr.contract,driver_salay:0
|
||||
msgid "Check this box if you provide allowance for driver"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: view:hr.payroll.advice:0
|
||||
#: field:hr.payroll.advice.line,advice_id:0
|
||||
#: field:hr.payslip,advice_id:0
|
||||
#: model:ir.model,name:l10n_in_hr_payroll.model_hr_payroll_advice
|
||||
msgid "Bank Advice"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: report:salary.detail.byyear:0
|
||||
msgid "Other No."
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: view:hr.payroll.advice:0
|
||||
msgid "Draft Advices"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: help:hr.payroll.advice,neft:0
|
||||
msgid "Check this box if your company use online transfer for salary"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: report:salary.detail.byyear:0
|
||||
msgid "To"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: field:payment.advice.report,number:0
|
||||
msgid "Number"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: selection:payment.advice.report,month:0
|
||||
msgid "September"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: view:hr.payroll.advice:0
|
||||
#: view:hr.salary.employee.month:0
|
||||
#: view:yearly.salary.detail:0
|
||||
msgid "Cancel"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: view:payment.advice.report:0
|
||||
msgid "Day of Payment Advices"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: constraint:hr.employee:0
|
||||
msgid "Error! You cannot create recursive hierarchy of Employee(s)."
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: view:yearly.salary.detail:0
|
||||
msgid ""
|
||||
"This wizard will print report which display a pay head employee breakup for "
|
||||
"a specified dates."
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: view:hr.payslip.run:0
|
||||
msgid "Payslip Batches ready to be Adviced"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: report:paylip.details.in:0
|
||||
msgid "Pay Slip Details"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: view:payment.advice.report:0
|
||||
msgid "Total Salary"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: field:hr.payroll.advice.line,employee_id:0
|
||||
#: model:ir.model,name:l10n_in_hr_payroll.model_hr_employee
|
||||
#: view:payment.advice.report:0
|
||||
#: field:payment.advice.report,employee_id:0
|
||||
msgid "Employee"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: view:hr.payroll.advice:0
|
||||
msgid "Compute Advice"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: help:hr.employee,join_date:0
|
||||
msgid "Joining date of employee"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: report:payroll.advice:0
|
||||
msgid "Dear Sir/Madam,"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: field:hr.payroll.advice,note:0
|
||||
msgid "Description"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: report:paylip.details.in:0
|
||||
msgid ")"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: view:res.company:0
|
||||
msgid "Payroll"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: view:payment.advice.report:0
|
||||
msgid "NEFT"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: report:paylip.details.in:0
|
||||
#: report:salary.detail.byyear:0
|
||||
msgid "Address"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: view:hr.payroll.advice:0
|
||||
#: field:hr.payroll.advice,bank_id:0
|
||||
#: view:payment.advice.report:0
|
||||
#: field:payment.advice.report,bank_id:0
|
||||
#: report:payroll.advice:0
|
||||
#: report:salary.detail.byyear:0
|
||||
msgid "Bank"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: field:hr.salary.employee.month,end_date:0
|
||||
#: field:yearly.salary.detail,date_to:0
|
||||
msgid "End Date"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: selection:payment.advice.report,month:0
|
||||
msgid "February"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: sql_constraint:res.company:0
|
||||
msgid "The company name must be unique !"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: view:hr.payroll.advice:0
|
||||
#: field:hr.payroll.advice,name:0
|
||||
#: report:paylip.details.in:0
|
||||
#: field:payment.advice.report,name:0
|
||||
#: report:salary.employee.bymonth:0
|
||||
msgid "Name"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: selection:hr.contract,city_type:0
|
||||
msgid "Metro"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: view:hr.salary.employee.month:0
|
||||
#: field:hr.salary.employee.month,employee_ids:0
|
||||
#: view:yearly.salary.detail:0
|
||||
#: field:yearly.salary.detail,employee_ids:0
|
||||
msgid "Employees"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: report:paylip.details.in:0
|
||||
msgid "Bank Account"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: selection:payment.advice.report,month:0
|
||||
msgid "April"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: report:payroll.advice:0
|
||||
msgid "Name of the Employe"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: code:addons/l10n_in_hr_payroll/l10n_in_hr_payroll.py:158
|
||||
#: code:addons/l10n_in_hr_payroll/l10n_in_hr_payroll.py:257
|
||||
#, python-format
|
||||
msgid "Please define bank account for the %s employee"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: field:hr.salary.employee.month,start_date:0
|
||||
#: field:yearly.salary.detail,date_from:0
|
||||
msgid "Start Date"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: view:hr.contract:0
|
||||
msgid "Allowance"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: help:hr.payroll.advice,bank_id:0
|
||||
msgid "Select the Bank from which the salary is going to be paid"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: view:hr.salary.employee.month:0
|
||||
msgid "Employee Pay Head Breakup"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: report:salary.detail.byyear:0
|
||||
msgid "Phone No."
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: report:paylip.details.in:0
|
||||
msgid "Credit"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: field:hr.payroll.advice.line,name:0
|
||||
#: report:payroll.advice:0
|
||||
msgid "Bank Account No."
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: help:hr.payroll.advice,date:0
|
||||
msgid "Advice Date is used to search Payslips"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: selection:payment.advice.report,month:0
|
||||
msgid "May"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: view:hr.payslip.run:0
|
||||
msgid "Create Advice"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: view:payment.advice.report:0
|
||||
#: field:payment.advice.report,year:0
|
||||
msgid "Year"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: field:hr.payroll.advice,neft:0
|
||||
#: field:payment.advice.report,neft:0
|
||||
msgid "NEFT Transaction"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: report:paylip.details.in:0
|
||||
#: report:salary.detail.byyear:0
|
||||
#: report:salary.employee.bymonth:0
|
||||
msgid "Total"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: report:payroll.advice:0
|
||||
msgid "form period"
|
||||
msgstr ""
|
||||
|
||||
#. module: l10n_in_hr_payroll
|
||||
#: view:payment.advice.report:0
|
||||
msgid "Year of Payment Advices"
|
||||
msgstr ""
|
||||
@@ -1424,7 +1424,7 @@
|
||||
<field name="reconcile" eval="True"/>
|
||||
<field ref="a_15" name="parent_id"/>
|
||||
</record>
|
||||
<record id="vat_payable6" model="account.account.template">
|
||||
<record id="vat_payable_low" model="account.account.template">
|
||||
<field name="name">Btw af te dragen laag</field>
|
||||
<field name="code">1601</field>
|
||||
<field name="type">other</field>
|
||||
@@ -1432,7 +1432,7 @@
|
||||
<field name="reconcile" eval="False"/>
|
||||
<field ref="a_15" name="parent_id"/>
|
||||
</record>
|
||||
<record id="vat_payable19" model="account.account.template">
|
||||
<record id="vat_payable_high" model="account.account.template">
|
||||
<field name="name">Btw af te dragen hoog</field>
|
||||
<field name="code">1602</field>
|
||||
<field name="type">other</field>
|
||||
@@ -1448,7 +1448,7 @@
|
||||
<field name="reconcile" eval="False"/>
|
||||
<field ref="a_15" name="parent_id"/>
|
||||
</record>
|
||||
<record id="vat_refund6" model="account.account.template">
|
||||
<record id="vat_refund_low" model="account.account.template">
|
||||
<field name="name">Btw te vorderen laag</field>
|
||||
<field name="code">1611</field>
|
||||
<field name="type">other</field>
|
||||
@@ -1456,7 +1456,7 @@
|
||||
<field name="reconcile" eval="False"/>
|
||||
<field ref="a_15" name="parent_id"/>
|
||||
</record>
|
||||
<record id="vat_refund19" model="account.account.template">
|
||||
<record id="vat_refund_high" model="account.account.template">
|
||||
<field name="name">Btw te vorderen hoog</field>
|
||||
<field name="code">1612</field>
|
||||
<field name="type">other</field>
|
||||
@@ -3909,7 +3909,7 @@
|
||||
<record id="btw_code_1a" model="account.tax.code.template">
|
||||
<field name="code">1a</field>
|
||||
<field name="parent_id" ref="btw_code_binnenland"/>
|
||||
<field name="name">Leveringen/diensten belast met 19% (BTW)</field>
|
||||
<field name="name">Leveringen/diensten belast met 21% (BTW)</field>
|
||||
</record>
|
||||
<record id="btw_code_1b" model="account.tax.code.template">
|
||||
<field name="code">1b</field>
|
||||
@@ -4021,7 +4021,7 @@
|
||||
<record id="omz_code_1a" model="account.tax.code.template">
|
||||
<field name="code">1a</field>
|
||||
<field name="parent_id" ref="omz_code_binnenland"/>
|
||||
<field name="name">Leveringen/diensten belast met 19% (omzet)</field>
|
||||
<field name="name">Leveringen/diensten belast met 21% (omzet)</field>
|
||||
</record>
|
||||
<record id="omz_code_1b" model="account.tax.code.template">
|
||||
<field name="code">1b</field>
|
||||
@@ -4149,22 +4149,22 @@ TODO rubriek 1c en 1d moeten nog, zijn variabel, dus BTW percentage moet door ge
|
||||
<field name="description">6% BTW</field>
|
||||
<field eval="0.06" name="amount"/>
|
||||
<field name="type">percent</field>
|
||||
<field name="account_collected_id" ref="vat_payable6"/>
|
||||
<field name="account_paid_id" ref="vat_refund6"/>
|
||||
<field name="account_collected_id" ref="vat_payable_low"/>
|
||||
<field name="account_paid_id" ref="vat_refund_low"/>
|
||||
<field name="base_code_id" ref="omz_code_1b"/>
|
||||
<field name="tax_code_id" ref="btw_code_1b"/>
|
||||
<field name="ref_base_code_id" ref="omz_code_1b"/>
|
||||
<field name="ref_tax_code_id" ref="btw_code_1b"/>
|
||||
<field name="type_tax_use">sale</field>
|
||||
</record>
|
||||
<record id="btw_19" model="account.tax.template">
|
||||
<record id="btw_21" model="account.tax.template">
|
||||
<field name="chart_template_id" ref="l10nnl_chart_template"/>
|
||||
<field name="name">Verkopen/omzet hoog</field>
|
||||
<field name="description">19% BTW</field>
|
||||
<field eval="0.19" name="amount"/>
|
||||
<field name="description">21% BTW</field>
|
||||
<field eval="0.21" name="amount"/>
|
||||
<field name="type">percent</field>
|
||||
<field name="account_collected_id" ref="vat_payable19"/>
|
||||
<field name="account_paid_id" ref="vat_refund19"/>
|
||||
<field name="account_collected_id" ref="vat_payable_high"/>
|
||||
<field name="account_paid_id" ref="vat_refund_high"/>
|
||||
<field name="base_code_id" ref="omz_code_1a"/>
|
||||
<field name="tax_code_id" ref="btw_code_1a"/>
|
||||
<field name="ref_base_code_id" ref="omz_code_1a"/>
|
||||
@@ -4176,10 +4176,10 @@ TODO rubriek 1c en 1d moeten nog, zijn variabel, dus BTW percentage moet door ge
|
||||
<field name="chart_template_id" ref="l10nnl_chart_template"/>
|
||||
<field name="name">Verkopen/omzet overig</field>
|
||||
<field name="description">variabel BTW</field>
|
||||
<field eval="0.19" name="amount"/>
|
||||
<field eval="0.21" name="amount"/>
|
||||
<field name="type">percent</field>
|
||||
<field name="account_collected_id" ref="vat_payable19"/>
|
||||
<field name="account_paid_id" ref="vat_refund19"/>
|
||||
<field name="account_collected_id" ref="vat_payable_high"/>
|
||||
<field name="account_paid_id" ref="vat_refund_high"/>
|
||||
<field name="base_code_id" ref="omz_code_1a"/>
|
||||
<field name="tax_code_id" ref="btw_code_1a"/>
|
||||
<field name="ref_base_code_id" ref="omz_code_1c"/>
|
||||
@@ -4194,20 +4194,20 @@ TODO rubriek 1c en 1d moeten nog, zijn variabel, dus BTW percentage moet door ge
|
||||
<field name="description">6% BTW</field>
|
||||
<field eval="0.06" name="amount"/>
|
||||
<field name="type">percent</field>
|
||||
<field name="account_collected_id" ref="vat_refund6"/>
|
||||
<field name="account_paid_id" ref="vat_payable6"/>
|
||||
<field name="account_collected_id" ref="vat_refund_low"/>
|
||||
<field name="account_paid_id" ref="vat_payable_low"/>
|
||||
<field name="tax_code_id" ref="btw_code_5b"/>
|
||||
<field name="ref_tax_code_id" ref="btw_code_5b"/>
|
||||
<field name="type_tax_use">purchase</field>
|
||||
</record>
|
||||
<record id="btw_19_buy" model="account.tax.template">
|
||||
<record id="btw_21_buy" model="account.tax.template">
|
||||
<field name="chart_template_id" ref="l10nnl_chart_template"/>
|
||||
<field name="name">BTW te vorderen hoog (inkopen)</field>
|
||||
<field name="description">19% BTW</field>
|
||||
<field eval="0.19" name="amount"/>
|
||||
<field name="description">21% BTW</field>
|
||||
<field eval="0.21" name="amount"/>
|
||||
<field name="type">percent</field>
|
||||
<field name="account_collected_id" ref="vat_refund19"/>
|
||||
<field name="account_paid_id" ref="vat_payable19"/>
|
||||
<field name="account_collected_id" ref="vat_refund_high"/>
|
||||
<field name="account_paid_id" ref="vat_payable_high"/>
|
||||
<field name="tax_code_id" ref="btw_code_5b"/>
|
||||
<field name="ref_tax_code_id" ref="btw_code_5b"/>
|
||||
<field name="type_tax_use">purchase</field>
|
||||
@@ -4216,10 +4216,10 @@ TODO rubriek 1c en 1d moeten nog, zijn variabel, dus BTW percentage moet door ge
|
||||
<field name="chart_template_id" ref="l10nnl_chart_template"/>
|
||||
<field name="name">BTW te vorderen overig (inkopen)</field>
|
||||
<field name="description">variabel BTW</field>
|
||||
<field eval="0.19" name="amount"/>
|
||||
<field eval="0.21" name="amount"/>
|
||||
<field name="type">percent</field>
|
||||
<field name="account_collected_id" ref="vat_refund19"/>
|
||||
<field name="account_paid_id" ref="vat_payable19"/>
|
||||
<field name="account_collected_id" ref="vat_refund_high"/>
|
||||
<field name="account_paid_id" ref="vat_payable_high"/>
|
||||
<field name="tax_code_id" ref="btw_code_5b"/>
|
||||
<field name="ref_tax_code_id" ref="btw_code_5b"/>
|
||||
<field name="type_tax_use">purchase</field>
|
||||
@@ -4240,8 +4240,8 @@ TODO rubriek 1c en 1d moeten nog, zijn variabel, dus BTW percentage moet door ge
|
||||
<record id="btw_ink_0" model="account.tax.template">
|
||||
<field name="chart_template_id" ref="l10nnl_chart_template"/>
|
||||
<field name="name">BTW af te dragen verlegd (inkopen)</field>
|
||||
<field name="description">19% BTW verlegd</field>
|
||||
<field eval="0.19" name="amount"/>
|
||||
<field name="description">21% BTW verlegd</field>
|
||||
<field eval="0.21" name="amount"/>
|
||||
<field name="type">percent</field>
|
||||
<field name="account_collected_id" ref="vat_payable_verlegd"/>
|
||||
<field name="account_paid_id" ref="vat_refund_verlegd"/>
|
||||
@@ -4277,8 +4277,8 @@ TODO rubriek 1c en 1d moeten nog, zijn variabel, dus BTW percentage moet door ge
|
||||
<record id="btw_ink2_0" model="account.tax.template">
|
||||
<field name="chart_template_id" ref="l10nnl_chart_template"/>
|
||||
<field name="name">BTW te vorderen verlegd (inkopen)</field>
|
||||
<field name="description">19% BTW verlegd</field>
|
||||
<field eval="0.19" name="amount"/>
|
||||
<field name="description">21% BTW verlegd</field>
|
||||
<field eval="0.21" name="amount"/>
|
||||
<field name="type">percent</field>
|
||||
<field name="account_collected_id" ref="vat_refund_verlegd"/>
|
||||
<field name="account_paid_id" ref="vat_payable_verlegd"/>
|
||||
@@ -4330,8 +4330,8 @@ TODO rubriek 1c en 1d moeten nog, zijn variabel, dus BTW percentage moet door ge
|
||||
<field eval="-1.00" name="amount"/>
|
||||
<field name="type">percent</field>
|
||||
<field name="parent_id" ref="btw_I_6"/>
|
||||
<field name="account_collected_id" ref="vat_payable6"/>
|
||||
<field name="account_paid_id" ref="vat_payable6"/>
|
||||
<field name="account_collected_id" ref="vat_payable_low"/>
|
||||
<field name="account_paid_id" ref="vat_payable_low"/>
|
||||
<field eval="btw_code_4b" name="tax_code_id"/>
|
||||
<field eval="btw_code_4b" name="ref_tax_code_id"/>
|
||||
<field name="type_tax_use">purchase</field>
|
||||
@@ -4342,43 +4342,43 @@ TODO rubriek 1c en 1d moeten nog, zijn variabel, dus BTW percentage moet door ge
|
||||
<field eval="1.00" name="amount"/>
|
||||
<field name="type">percent</field>
|
||||
<field name="parent_id" ref="btw_I_6"/>
|
||||
<field name="account_collected_id" ref="vat_refund6"/>
|
||||
<field name="account_paid_id" ref="vat_refund6"/>
|
||||
<field name="account_collected_id" ref="vat_refund_low"/>
|
||||
<field name="account_paid_id" ref="vat_refund_low"/>
|
||||
<field eval="btw_code_5b" name="tax_code_id"/>
|
||||
<field eval="btw_code_5b" name="ref_tax_code_id"/>
|
||||
<field name="type_tax_use">purchase</field>
|
||||
</record>
|
||||
<record id="btw_I_19" model="account.tax.template">
|
||||
<record id="btw_I_21" model="account.tax.template">
|
||||
<field name="chart_template_id" ref="l10nnl_chart_template"/>
|
||||
<field name="name">Inkopen import binnen EU hoog</field>
|
||||
<field name="description">19% BTW import binnen EU</field>
|
||||
<field eval="0.19" name="amount"/>
|
||||
<field name="description">21% BTW import binnen EU</field>
|
||||
<field eval="0.21" name="amount"/>
|
||||
<field name="type">percent</field>
|
||||
<field eval="True" name="child_depend"/>
|
||||
<field eval="omz_code_4b" name="base_code_id"/>
|
||||
<field eval="omz_code_4b" name="ref_base_code_id"/>
|
||||
<field name="type_tax_use">purchase</field>
|
||||
</record>
|
||||
<record id="btw_I_19_1" model="account.tax.template">
|
||||
<record id="btw_I_21_1" model="account.tax.template">
|
||||
<field name="chart_template_id" ref="l10nnl_chart_template"/>
|
||||
<field name="name">Inkopen import binnen EU hoog(1)</field>
|
||||
<field eval="-1.00" name="amount"/>
|
||||
<field name="type">percent</field>
|
||||
<field name="parent_id" ref="btw_I_19"/>
|
||||
<field name="account_collected_id" ref="vat_payable19"/>
|
||||
<field name="account_paid_id" ref="vat_payable19"/>
|
||||
<field name="parent_id" ref="btw_I_21"/>
|
||||
<field name="account_collected_id" ref="vat_payable_high"/>
|
||||
<field name="account_paid_id" ref="vat_payable_high"/>
|
||||
<field eval="btw_code_4b" name="tax_code_id"/>
|
||||
<field eval="btw_code_4b" name="ref_tax_code_id"/>
|
||||
<field name="type_tax_use">purchase</field>
|
||||
</record>
|
||||
<record id="btw_I_19_2" model="account.tax.template">
|
||||
<record id="btw_I_21_2" model="account.tax.template">
|
||||
<field name="chart_template_id" ref="l10nnl_chart_template"/>
|
||||
<field name="name">Inkopen import binnen EU hoog(2)</field>
|
||||
<field eval="1.00" name="amount"/>
|
||||
<field name="type">percent</field>
|
||||
<field name="parent_id" ref="btw_I_19"/>
|
||||
<field name="account_collected_id" ref="vat_refund19"/>
|
||||
<field name="account_paid_id" ref="vat_refund19"/>
|
||||
<field name="parent_id" ref="btw_I_21"/>
|
||||
<field name="account_collected_id" ref="vat_refund_high"/>
|
||||
<field name="account_paid_id" ref="vat_refund_high"/>
|
||||
<field eval="btw_code_5b" name="tax_code_id"/>
|
||||
<field eval="btw_code_5b" name="ref_tax_code_id"/>
|
||||
<field name="type_tax_use">purchase</field>
|
||||
@@ -4400,8 +4400,8 @@ TODO rubriek 1c en 1d moeten nog, zijn variabel, dus BTW percentage moet door ge
|
||||
<field eval="-1.00" name="amount"/>
|
||||
<field name="type">percent</field>
|
||||
<field name="parent_id" ref="btw_I_overig"/>
|
||||
<field name="account_collected_id" ref="vat_payable19"/>
|
||||
<field name="account_paid_id" ref="vat_payable19"/>
|
||||
<field name="account_collected_id" ref="vat_payable_high"/>
|
||||
<field name="account_paid_id" ref="vat_payable_high"/>
|
||||
<field eval="btw_code_4b" name="tax_code_id"/>
|
||||
<field eval="btw_code_4b" name="ref_tax_code_id"/>
|
||||
<field name="type_tax_use">purchase</field>
|
||||
@@ -4412,8 +4412,8 @@ TODO rubriek 1c en 1d moeten nog, zijn variabel, dus BTW percentage moet door ge
|
||||
<field eval="1.00" name="amount"/>
|
||||
<field name="type">percent</field>
|
||||
<field name="parent_id" ref="btw_I_overig"/>
|
||||
<field name="account_collected_id" ref="vat_refund19"/>
|
||||
<field name="account_paid_id" ref="vat_refund19"/>
|
||||
<field name="account_collected_id" ref="vat_refund_high"/>
|
||||
<field name="account_paid_id" ref="vat_refund_high"/>
|
||||
<field eval="btw_code_5b" name="tax_code_id"/>
|
||||
<field eval="btw_code_5b" name="ref_tax_code_id"/>
|
||||
<field name="type_tax_use">purchase</field>
|
||||
@@ -4463,8 +4463,8 @@ TODO rubriek 1c en 1d moeten nog, zijn variabel, dus BTW percentage moet door ge
|
||||
<field eval="-1.00" name="amount"/>
|
||||
<field name="type">percent</field>
|
||||
<field name="parent_id" ref="btw_E1"/>
|
||||
<field name="account_collected_id" ref="vat_payable6"/>
|
||||
<field name="account_paid_id" ref="vat_payable6"/>
|
||||
<field name="account_collected_id" ref="vat_payable_low"/>
|
||||
<field name="account_paid_id" ref="vat_payable_low"/>
|
||||
<field eval="btw_code_4a" name="tax_code_id"/>
|
||||
<field eval="btw_code_4a" name="ref_tax_code_id"/>
|
||||
<field name="type_tax_use">purchase</field>
|
||||
@@ -4475,8 +4475,8 @@ TODO rubriek 1c en 1d moeten nog, zijn variabel, dus BTW percentage moet door ge
|
||||
<field eval="1.00" name="amount"/>
|
||||
<field name="type">percent</field>
|
||||
<field name="parent_id" ref="btw_E1"/>
|
||||
<field name="account_collected_id" ref="vat_refund6"/>
|
||||
<field name="account_paid_id" ref="vat_refund6"/>
|
||||
<field name="account_collected_id" ref="vat_refund_low"/>
|
||||
<field name="account_paid_id" ref="vat_refund_low"/>
|
||||
<field eval="btw_code_5b" name="tax_code_id"/>
|
||||
<field eval="btw_code_5b" name="ref_tax_code_id"/>
|
||||
<field name="type_tax_use">purchase</field>
|
||||
@@ -4485,7 +4485,7 @@ TODO rubriek 1c en 1d moeten nog, zijn variabel, dus BTW percentage moet door ge
|
||||
<field name="chart_template_id" ref="l10nnl_chart_template"/>
|
||||
<field name="name">Inkopen import buiten EU hoog</field>
|
||||
<field name="description">BTW import buiten EU</field>
|
||||
<field eval="0.19" name="amount"/>
|
||||
<field eval="0.21" name="amount"/>
|
||||
<field name="type">percent</field>
|
||||
<field eval="True" name="child_depend"/>
|
||||
<field eval="omz_code_4a" name="base_code_id"/>
|
||||
@@ -4498,8 +4498,8 @@ TODO rubriek 1c en 1d moeten nog, zijn variabel, dus BTW percentage moet door ge
|
||||
<field eval="-1.00" name="amount"/>
|
||||
<field name="type">percent</field>
|
||||
<field name="parent_id" ref="btw_E2"/>
|
||||
<field name="account_collected_id" ref="vat_payable19"/>
|
||||
<field name="account_paid_id" ref="vat_payable19"/>
|
||||
<field name="account_collected_id" ref="vat_payable_high"/>
|
||||
<field name="account_paid_id" ref="vat_payable_high"/>
|
||||
<field eval="btw_code_4a" name="tax_code_id"/>
|
||||
<field eval="btw_code_4a" name="ref_tax_code_id"/>
|
||||
<field name="type_tax_use">purchase</field>
|
||||
@@ -4510,8 +4510,8 @@ TODO rubriek 1c en 1d moeten nog, zijn variabel, dus BTW percentage moet door ge
|
||||
<field eval="1.00" name="amount"/>
|
||||
<field name="type">percent</field>
|
||||
<field name="parent_id" ref="btw_E2"/>
|
||||
<field name="account_collected_id" ref="vat_refund19"/>
|
||||
<field name="account_paid_id" ref="vat_refund19"/>
|
||||
<field name="account_collected_id" ref="vat_refund_high"/>
|
||||
<field name="account_paid_id" ref="vat_refund_high"/>
|
||||
<field eval="btw_code_5b" name="tax_code_id"/>
|
||||
<field eval="btw_code_5b" name="ref_tax_code_id"/>
|
||||
<field name="type_tax_use">purchase</field>
|
||||
@@ -4520,7 +4520,7 @@ TODO rubriek 1c en 1d moeten nog, zijn variabel, dus BTW percentage moet door ge
|
||||
<field name="chart_template_id" ref="l10nnl_chart_template"/>
|
||||
<field name="name">Inkopen import buiten EU overig</field>
|
||||
<field name="description">BTW import buiten EU</field>
|
||||
<field eval="0.19" name="amount"/>
|
||||
<field eval="0.21" name="amount"/>
|
||||
<field name="type">percent</field>
|
||||
<field eval="True" name="child_depend"/>
|
||||
<field eval="omz_code_4a" name="base_code_id"/>
|
||||
@@ -4533,8 +4533,8 @@ TODO rubriek 1c en 1d moeten nog, zijn variabel, dus BTW percentage moet door ge
|
||||
<field eval="-1.00" name="amount"/>
|
||||
<field name="type">percent</field>
|
||||
<field name="parent_id" ref="btw_E_overig"/>
|
||||
<field name="account_collected_id" ref="vat_payable19"/>
|
||||
<field name="account_paid_id" ref="vat_payable19"/>
|
||||
<field name="account_collected_id" ref="vat_payable_high"/>
|
||||
<field name="account_paid_id" ref="vat_payable_high"/>
|
||||
<field eval="btw_code_4a" name="tax_code_id"/>
|
||||
<field eval="btw_code_4a" name="ref_tax_code_id"/>
|
||||
<field name="type_tax_use">purchase</field>
|
||||
@@ -4545,8 +4545,8 @@ TODO rubriek 1c en 1d moeten nog, zijn variabel, dus BTW percentage moet door ge
|
||||
<field eval="1.00" name="amount"/>
|
||||
<field name="type">percent</field>
|
||||
<field name="parent_id" ref="btw_E_overig"/>
|
||||
<field name="account_collected_id" ref="vat_refund19"/>
|
||||
<field name="account_paid_id" ref="vat_refund19"/>
|
||||
<field name="account_collected_id" ref="vat_refund_high"/>
|
||||
<field name="account_paid_id" ref="vat_refund_high"/>
|
||||
<field eval="btw_code_5b" name="tax_code_id"/>
|
||||
<field eval="btw_code_5b" name="ref_tax_code_id"/>
|
||||
<field name="type_tax_use">purchase</field>
|
||||
|
||||
@@ -22,12 +22,12 @@
|
||||
import mail_message_subtype
|
||||
import mail_alias
|
||||
import mail_followers
|
||||
import mail_vote
|
||||
import mail_favorite
|
||||
import mail_message
|
||||
import mail_mail
|
||||
import mail_thread
|
||||
import mail_group
|
||||
import mail_vote
|
||||
import res_partner
|
||||
import res_users
|
||||
import report
|
||||
|
||||
@@ -7,49 +7,85 @@
|
||||
<field name="notification_email_send">none</field>
|
||||
</record>
|
||||
|
||||
<!-- Pushed to all employees -->
|
||||
<record id="message_blogpost0" model="mail.message">
|
||||
<field name="model">mail.group</field>
|
||||
<field name="res_id" ref="mail.group_all_employees"/>
|
||||
<field name="body">Your monthly meal vouchers arrived. You can get them at Christine's office.
|
||||
This month you also get 250 EUR of eco-vouchers if you have been in the company for more than a year.</field>
|
||||
<field name="body"><![CDATA[<p>Your monthly meal vouchers arrived. You can get them at Christine's office.</p>]]></field>
|
||||
<field name="type">comment</field>
|
||||
<field name="subtype_id" ref="mt_comment"/>
|
||||
<field name="author_id" ref="base.partner_root"/>
|
||||
</record>
|
||||
|
||||
<record id="message_blogpost0_comment0" model="mail.message">
|
||||
<field name="model">mail.group</field>
|
||||
<field name="res_id" ref="group_all_employees"/>
|
||||
<field name="body"><![CDATA[Great.]]></field>
|
||||
<field name="body"><![CDATA[<p>Oh, I had forgotten. This month you also get 250 EUR of eco-vouchers if you have been in the company for more than a year.</p>]]></field>
|
||||
<field name="parent_id" ref="message_blogpost0"/>
|
||||
<field name="type">comment</field>
|
||||
<field name="subtype_id" ref="mt_comment"/>
|
||||
<field name="author_id" ref="base.partner_root"/>
|
||||
</record>
|
||||
|
||||
<record id="message_blogpost0_comment1" model="mail.message">
|
||||
<field name="model">mail.group</field>
|
||||
<field name="res_id" ref="group_all_employees"/>
|
||||
<field name="body">Thanks, but where is Christine's office, if I may ask? (I'm new here)</field>
|
||||
<field name="body"><![CDATA[<p>Thanks! Could you please remind me where is Christine's office, if I may ask? I'm new here!</p>]]></field>
|
||||
<field name="parent_id" ref="message_blogpost0"/>
|
||||
<field name="type">comment</field>
|
||||
<field name="subtype_id" ref="mt_comment"/>
|
||||
<field name="author_id" ref="base.partner_demo"/>
|
||||
</record>
|
||||
|
||||
<!-- This one is starred for having mailboxes with demo data -->
|
||||
<record id="message_blogpost0_comment2" model="mail.message">
|
||||
<field name="model">mail.group</field>
|
||||
<field name="res_id" ref="group_all_employees"/>
|
||||
<field name="body">Building B3, second floor on the right :-)</field>
|
||||
<field name="body"><![CDATA[<p>Building B3, second floor on the right :-).</p>]]></field>
|
||||
<field name="parent_id" ref="message_blogpost0"/>
|
||||
<field name="type">comment</field>
|
||||
<field name="subtype_id" ref="mt_comment"/>
|
||||
<field name="author_id" ref="base.partner_root"/>
|
||||
<field name="favorite_user_ids" eval="[(6, 0, [ref('base.user_root'), ref('base.user_demo')])]"/>
|
||||
</record>
|
||||
|
||||
<record id="message_blogpost0_comment3" model="mail.message">
|
||||
<field name="model">mail.group</field>
|
||||
<field name="res_id" ref="group_all_employees"/>
|
||||
<field name="body">Great news, I need to buy a new fridge, I think I can pay it with the eco-vouchers!</field>
|
||||
<field name="body"><![CDATA[<p>Many thanks. Actually that's good news, next year I'll have to buy a new fridge, I think I will pay it with the eco-vouchers!</p>]]></field>
|
||||
<field name="parent_id" ref="message_blogpost0"/>
|
||||
<field name="type">comment</field>
|
||||
<field name="subtype_id" ref="mt_comment"/>
|
||||
<field name="author_id" ref="base.partner_demo"/>
|
||||
</record>
|
||||
|
||||
<!-- Demo user and admin conversation -->
|
||||
<record id="message_discussion" model="mail.message">
|
||||
<field name="body">Hello Demo User! I was wondering whether you had some issues with our secret task about putting cats everywhere in OpenERP.</field>
|
||||
<field name="type">comment</field>
|
||||
<field name="subtype_id" ref="mt_comment"/>
|
||||
<field name="author_id" ref="base.partner_root"/>
|
||||
<field name="partner_ids" eval="[(6, 0, [ref('base.partner_demo')])]"/>
|
||||
</record>
|
||||
<record id="message_discussion_answer1" model="mail.message">
|
||||
<field name="body">No specific issues, I think everything is clear.</field>
|
||||
<field name="parent_id" ref="message_discussion"/>
|
||||
<field name="type">comment</field>
|
||||
<field name="subtype_id" ref="mt_comment"/>
|
||||
<field name="author_id" ref="base.partner_demo"/>
|
||||
<field name="partner_ids" eval="[(6, 0, [ref('base.partner_root')])]"/>
|
||||
</record>
|
||||
<record id="message_discussion_answer2" model="mail.message">
|
||||
<field name="body">Ow, just to be sure... we were talking about lolcats, right ?</field>
|
||||
<field name="parent_id" ref="message_discussion"/>
|
||||
<field name="type">comment</field>
|
||||
<field name="subtype_id" ref="mt_comment"/>
|
||||
<field name="author_id" ref="base.partner_demo"/>
|
||||
<field name="partner_ids" eval="[(6, 0, [ref('base.partner_root')])]"/>
|
||||
</record>
|
||||
<record id="message_discussion_answer3" model="mail.message">
|
||||
<field name="body">Absolutely!</field>
|
||||
<field name="parent_id" ref="message_discussion"/>
|
||||
<field name="type">comment</field>
|
||||
<field name="subtype_id" ref="mt_comment"/>
|
||||
<field name="author_id" ref="base.partner_root"/>
|
||||
<field name="partner_ids" eval="[(6, 0, [ref('base.partner_demo')])]"/>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<record model="mail.group" id="group_all_employees">
|
||||
<field name="name">Whole Company</field>
|
||||
<field name="group_ids" eval="[(4, ref('base.group_user'))]"/>
|
||||
<field name="description">Discussion about best sales practices and deals.</field>
|
||||
<field name="description">General announces for all employees.</field>
|
||||
</record>
|
||||
|
||||
<!-- notify all employees of module installation -->
|
||||
@@ -17,12 +17,11 @@
|
||||
<field name="model">mail.group</field>
|
||||
<field name="res_id" ref="mail.group_all_employees"/>
|
||||
<field name="type">notification</field>
|
||||
<field name="subtype_id" ref="mail.mt_comment"/>
|
||||
<field name="subject">Welcome to OpenERP!</field>
|
||||
<field name="body">Your homepage is a summary of messages you received and key information about documents you follow.
|
||||
|
||||
The top menu bar contains all applications you installed. You can use this <i>Settings</i> menu to install more applications, activate others features or give access to new users.
|
||||
|
||||
To setup your preferences (name, email signature, avatar), click on the top right corner.</field>
|
||||
<field name="body"><![CDATA[<p>Your homepage is a summary of messages you received and key information about documents you follow.</p><p>
|
||||
The top menu bar contains all applications you installed. You can use the <i>Settings</i> menu to install more applications, activate others features or give access to new users.</p><p>
|
||||
To setup your preferences (name, email signature, avatar), click on the top right corner.</p>]]></field>
|
||||
</record>
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
@@ -61,10 +61,10 @@ class mail_notification(osv.Model):
|
||||
|
||||
_columns = {
|
||||
'partner_id': fields.many2one('res.partner', string='Contact',
|
||||
ondelete='cascade', required=True),
|
||||
'read': fields.boolean('Read'),
|
||||
ondelete='cascade', required=True, select=1),
|
||||
'read': fields.boolean('Read', select=1),
|
||||
'message_id': fields.many2one('mail.message', string='Message',
|
||||
ondelete='cascade', required=True),
|
||||
ondelete='cascade', required=True, select=1),
|
||||
}
|
||||
|
||||
_defaults = {
|
||||
@@ -84,11 +84,13 @@ class mail_notification(osv.Model):
|
||||
return False
|
||||
|
||||
def set_message_read(self, cr, uid, msg_ids, read=None, context=None):
|
||||
""" Set a message and its child messages as (un)read for uid.
|
||||
""" Set messages as (un)read. Technically, the notifications related
|
||||
to uid are set to (un)read. If for some msg_ids there are missing
|
||||
notifications (i.e. due to load more or thread parent fetching),
|
||||
they are created.
|
||||
|
||||
:param bool read: read / unread
|
||||
:param bool read: (un)read notification
|
||||
"""
|
||||
# TDE note: use child_of or front-end send correct values ?
|
||||
user_pid = self.pool.get('res.users').read(cr, uid, uid, ['partner_id'], context=context)['partner_id'][0]
|
||||
notif_ids = self.search(cr, uid, [
|
||||
('partner_id', '=', user_pid),
|
||||
@@ -100,10 +102,9 @@ class mail_notification(osv.Model):
|
||||
return self.write(cr, uid, notif_ids, {'read': read}, context=context)
|
||||
|
||||
# some messages do not have notifications: find which one, create notification, update read status
|
||||
exist_notification = dict.fromkeys(msg_ids, False)
|
||||
for notification in self.browse(cr, uid, notif_ids, context=context):
|
||||
exist_notification[notification.message_id] = True
|
||||
for msg_id in exist_notification.keys():
|
||||
notified_msg_ids = [notification.message_id.id for notification in self.browse(cr, uid, notif_ids, context=context)]
|
||||
to_create_msg_ids = list(set(msg_ids) - set(notified_msg_ids))
|
||||
for msg_id in to_create_msg_ids:
|
||||
self.create(cr, uid, {'partner_id': user_pid, 'read': read, 'message_id': msg_id}, context=context)
|
||||
return self.write(cr, uid, notif_ids, {'read': read}, context=context)
|
||||
|
||||
@@ -156,10 +157,10 @@ class mail_notification(osv.Model):
|
||||
# add signature
|
||||
body_html = msg.body
|
||||
# if quote_context:
|
||||
# body_html = tools.append_content_to_html(body_html, quote_context, plaintext=False)
|
||||
signature = msg.author_id and msg.author_id.user_ids[0].signature or ''
|
||||
# body_html = tools.append_content_to_html(body_html, quote_context, plaintext=False)
|
||||
signature = msg.author_id and msg.author_id.user_ids and msg.author_id.user_ids[0].signature or ''
|
||||
if signature:
|
||||
body_html = tools.append_content_to_html(body_html, signature)
|
||||
body_html = tools.append_content_to_html(body_html, signature, plaintext=True, container_tag='div')
|
||||
|
||||
mail_values = {
|
||||
'mail_message_id': msg.id,
|
||||
|
||||
@@ -130,7 +130,7 @@ class mail_group(osv.Model):
|
||||
params = {
|
||||
'search_view_id': search_ref and search_ref[1] or False,
|
||||
'domain': [('model', '=', 'mail.group'), ('res_id', '=', mail_group_id)],
|
||||
'context': {'default_model': 'mail.group', 'default_res_id': mail_group_id},
|
||||
'context': {'default_model': 'mail.group', 'default_res_id': mail_group_id, 'search_default_message_unread': True},
|
||||
'res_model': 'mail.message',
|
||||
'thread_level': 1,
|
||||
}
|
||||
|
||||
@@ -32,17 +32,18 @@
|
||||
</div>
|
||||
<div class="oe_group_details">
|
||||
<h4><a type="open"><field name="name"/></a></h4>
|
||||
<ul>
|
||||
<li><t t-raw="record.message_summary.raw_value"/></li>
|
||||
<li t-if="! record.message_is_follower.raw_value"><a name="action_follow" string="Join" type="object" class="oe_group_join">Not following</a></li>
|
||||
<li t-if="record.message_is_follower.raw_value"><a name="action_unfollow" string="Leave" type="object" class="oe_group_leave">Following</a></li>
|
||||
</ul>
|
||||
<div class="oe_grey">
|
||||
<field name="description"/>
|
||||
</div>
|
||||
<div class="oe_kanban_footer_left">
|
||||
<t t-raw="record.message_summary.raw_value"/>
|
||||
</div>
|
||||
<div class="oe_group_button">
|
||||
<button t-if="record.message_is_follower.raw_value" name="action_unfollow" type="object" class="oe_group_join">Unfollow</button>
|
||||
<button t-if="! record.message_is_follower.raw_value" name="action_follow" type="object">Join Group</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$('.oe_group_join').mouseover(function () { $(this).html('Follow'); }).mouseleave(function () { $(this).html('Not following'); });
|
||||
$('.oe_group_leave').mouseover(function () { $(this).html('Unfollow'); }).mouseleave(function () { $(this).html('Following'); });
|
||||
</script>
|
||||
</t>
|
||||
</templates>
|
||||
</kanban>
|
||||
@@ -83,7 +84,7 @@
|
||||
</sheet>
|
||||
<div class="oe_chatter">
|
||||
<field name="message_follower_ids" widget="mail_followers"/>
|
||||
<field name="message_ids" widget="mail_thread" options='{"thread_level": 1}'/>
|
||||
<field name="message_ids" widget="mail_thread" options='{"thread_level": 1}' placeholder="Send a message to the group..."/>
|
||||
</div>
|
||||
</form>
|
||||
</field>
|
||||
|
||||
+178
-141
@@ -25,6 +25,7 @@ import tools
|
||||
from email.header import decode_header
|
||||
from openerp import SUPERUSER_ID
|
||||
from openerp.osv import osv, orm, fields
|
||||
from openerp.tools import html_email_clean
|
||||
from openerp.tools.translate import _
|
||||
|
||||
_logger = logging.getLogger(__name__)
|
||||
@@ -50,8 +51,9 @@ class mail_message(osv.Model):
|
||||
_description = 'Message'
|
||||
_inherit = ['ir.needaction_mixin']
|
||||
_order = 'id desc'
|
||||
_rec_name = 'record_name'
|
||||
|
||||
_message_read_limit = 10
|
||||
_message_read_limit = 30
|
||||
_message_read_fields = ['id', 'parent_id', 'model', 'res_id', 'body', 'subject', 'date', 'to_read', 'email_from',
|
||||
'type', 'vote_user_ids', 'attachment_ids', 'author_id', 'partner_ids', 'record_name', 'favorite_user_ids']
|
||||
_message_record_name_length = 18
|
||||
@@ -120,21 +122,26 @@ class mail_message(osv.Model):
|
||||
"message, comment for other messages such as user replies"),
|
||||
'email_from': fields.char('From',
|
||||
help="Email address of the sender. This field is set when no matching partner is found for incoming emails."),
|
||||
'author_id': fields.many2one('res.partner', 'Author',
|
||||
'author_id': fields.many2one('res.partner', 'Author', select=1,
|
||||
ondelete='set null',
|
||||
help="Author of the message. If not set, email_from may hold an email address that did not match any partner."),
|
||||
'partner_ids': fields.many2many('res.partner', string='Recipients'),
|
||||
'notified_partner_ids': fields.many2many('res.partner', 'mail_notification',
|
||||
'message_id', 'partner_id', 'Recipients'),
|
||||
'message_id', 'partner_id', 'Notified partners',
|
||||
help='Partners that have a notification pushing this message in their mailboxes'),
|
||||
'attachment_ids': fields.many2many('ir.attachment', 'message_attachment_rel',
|
||||
'message_id', 'attachment_id', 'Attachments'),
|
||||
'parent_id': fields.many2one('mail.message', 'Parent Message', select=True, ondelete='set null', help="Initial thread message."),
|
||||
'parent_id': fields.many2one('mail.message', 'Parent Message', select=True,
|
||||
ondelete='set null', help="Initial thread message."),
|
||||
'child_ids': fields.one2many('mail.message', 'parent_id', 'Child Messages'),
|
||||
'model': fields.char('Related Document Model', size=128, select=1),
|
||||
'res_id': fields.integer('Related Document ID', select=1),
|
||||
'record_name': fields.function(_get_record_name, type='char',
|
||||
store=True, string='Message Record Name',
|
||||
help="Name get of the related document."),
|
||||
'notification_ids': fields.one2many('mail.notification', 'message_id', 'Notifications'),
|
||||
'notification_ids': fields.one2many('mail.notification', 'message_id',
|
||||
string='Notifications',
|
||||
help='Technical field holding the message notifications. Use notified_partner_ids to access notified partners.'),
|
||||
'subject': fields.char('Subject'),
|
||||
'date': fields.datetime('Date'),
|
||||
'message_id': fields.char('Message-Id', help='Message unique identifier', select=1, readonly=1),
|
||||
@@ -142,7 +149,8 @@ class mail_message(osv.Model):
|
||||
'to_read': fields.function(_get_to_read, fnct_search=_search_to_read,
|
||||
type='boolean', string='To read',
|
||||
help='Functional field to search for messages the current user has to read'),
|
||||
'subtype_id': fields.many2one('mail.message.subtype', 'Subtype'),
|
||||
'subtype_id': fields.many2one('mail.message.subtype', 'Subtype',
|
||||
ondelete='set null', select=1,),
|
||||
'vote_user_ids': fields.many2many('res.users', 'mail_vote',
|
||||
'message_id', 'user_id', string='Votes',
|
||||
help='Users that voted for this message'),
|
||||
@@ -200,67 +208,99 @@ class mail_message(osv.Model):
|
||||
# Message loading for web interface
|
||||
#------------------------------------------------------
|
||||
|
||||
def _message_get_dict(self, cr, uid, message, context=None):
|
||||
""" Return a dict representation of the message. This representation is
|
||||
used in the JS client code, to display the messages.
|
||||
def _message_read_dict_postprocess(self, cr, uid, messages, message_tree, context=None):
|
||||
""" Post-processing on values given by message_read. This method will
|
||||
handle partners in batch to avoid doing numerous queries.
|
||||
|
||||
:param dict message: read result of a mail.message
|
||||
:param list messages: list of message, as get_dict result
|
||||
:param dict message_tree: {[msg.id]: msg browse record}
|
||||
"""
|
||||
# TDE note: this method should be optimized, to lessen the number of queries, will be done ASAP
|
||||
is_author = False
|
||||
if message['author_id']:
|
||||
is_author = message['author_id'][0] == self.pool.get('res.users').read(cr, uid, uid, ['partner_id'], context=None)['partner_id'][0]
|
||||
author_id = message['author_id']
|
||||
elif message['email_from']:
|
||||
author_id = (0, message['email_from'])
|
||||
res_partner_obj = self.pool.get('res.partner')
|
||||
ir_attachment_obj = self.pool.get('ir.attachment')
|
||||
pid = self.pool.get('res.users').read(cr, uid, uid, ['partner_id'], context=None)['partner_id'][0]
|
||||
|
||||
has_voted = False
|
||||
if uid in message.get('vote_user_ids'):
|
||||
has_voted = True
|
||||
# 1. Aggregate partners (author_id and partner_ids) and attachments
|
||||
partner_ids = set()
|
||||
attachment_ids = set()
|
||||
for key, message in message_tree.iteritems():
|
||||
if message.author_id:
|
||||
partner_ids |= set([message.author_id.id])
|
||||
if message.partner_ids:
|
||||
partner_ids |= set([partner.id for partner in message.partner_ids])
|
||||
if message.attachment_ids:
|
||||
attachment_ids |= set([attachment.id for attachment in message.attachment_ids])
|
||||
|
||||
is_favorite = False
|
||||
if uid in message.get('favorite_user_ids'):
|
||||
is_favorite = True
|
||||
# Filter author_ids uid can see
|
||||
# partner_ids = self.pool.get('res.partner').search(cr, uid, [('id', 'in', partner_ids)], context=context)
|
||||
partners = res_partner_obj.name_get(cr, uid, list(partner_ids), context=context)
|
||||
partner_tree = dict((partner[0], partner) for partner in partners)
|
||||
|
||||
is_private = True
|
||||
if message.get('model') and message.get('res_id'):
|
||||
is_private = False
|
||||
# 2. Attachments
|
||||
attachments = ir_attachment_obj.read(cr, uid, list(attachment_ids), ['id', 'datas_fname'], context=context)
|
||||
attachments_tree = dict((attachment['id'], {'id': attachment['id'], 'filename': attachment['datas_fname']}) for attachment in attachments)
|
||||
|
||||
try:
|
||||
attachment_ids = [{'id': attach[0], 'name': attach[1]} for attach in self.pool.get('ir.attachment').name_get(cr, uid, message['attachment_ids'], context=context)]
|
||||
except (orm.except_orm, osv.except_osv):
|
||||
attachment_ids = []
|
||||
|
||||
# TDE note: should we send partner_ids ?
|
||||
# TDE note: shouldn't we separated followers and other partners ? costly to compute maybe ,
|
||||
try:
|
||||
partner_ids = self.pool.get('res.partner').name_get(cr, uid, message['partner_ids'], context=context)
|
||||
except (orm.except_orm, osv.except_osv):
|
||||
# 3. Update message dictionaries
|
||||
for message_dict in messages:
|
||||
message_id = message_dict.get('id')
|
||||
message = message_tree[message_id]
|
||||
if message.author_id:
|
||||
author = partner_tree[message.author_id.id]
|
||||
else:
|
||||
author = (0, message.email_from)
|
||||
partner_ids = []
|
||||
for partner in message.partner_ids:
|
||||
if partner.id in partner_tree:
|
||||
partner_ids.append(partner_tree[partner.id])
|
||||
attachment_ids = []
|
||||
for attachment in message.attachment_ids:
|
||||
if attachment.id in attachments_tree:
|
||||
attachment_ids.append(attachments_tree[attachment.id])
|
||||
message_dict.update({
|
||||
'is_author': pid == author[0],
|
||||
'author_id': author,
|
||||
'partner_ids': partner_ids,
|
||||
'attachment_ids': attachment_ids,
|
||||
})
|
||||
return True
|
||||
|
||||
return {
|
||||
'id': message['id'],
|
||||
'type': message['type'],
|
||||
'attachment_ids': attachment_ids,
|
||||
'body': message['body'],
|
||||
'model': message['model'],
|
||||
'res_id': message['res_id'],
|
||||
'record_name': message['record_name'],
|
||||
'subject': message['subject'],
|
||||
'date': message['date'],
|
||||
'author_id': author_id,
|
||||
'is_author': is_author,
|
||||
'partner_ids': partner_ids,
|
||||
'parent_id': False,
|
||||
'vote_nb': len(message['vote_user_ids']),
|
||||
'has_voted': has_voted,
|
||||
'is_private': is_private,
|
||||
'is_favorite': is_favorite,
|
||||
'to_read': message['to_read'],
|
||||
}
|
||||
def _message_read_dict(self, cr, uid, message, parent_id=False, context=None):
|
||||
""" Return a dict representation of the message. This representation is
|
||||
used in the JS client code, to display the messages. Partners and
|
||||
attachments related stuff will be done in post-processing in batch.
|
||||
|
||||
def _message_read_add_expandables(self, cr, uid, message_list, read_messages,
|
||||
thread_level=0, message_loaded_ids=[], domain=[], parent_id=False, context=None, limit=None):
|
||||
:param dict message: mail.message browse record
|
||||
"""
|
||||
# private message: no model, no res_id
|
||||
is_private = False
|
||||
if not message.model or not message.res_id:
|
||||
is_private = True
|
||||
# votes and favorites: res.users ids, no prefetching should be done
|
||||
vote_nb = len(message.vote_user_ids)
|
||||
has_voted = uid in [user.id for user in message.vote_user_ids]
|
||||
is_favorite = uid in [user.id for user in message.favorite_user_ids]
|
||||
|
||||
return {'id': message.id,
|
||||
'type': message.type,
|
||||
'body': html_email_clean(message.body),
|
||||
'model': message.model,
|
||||
'res_id': message.res_id,
|
||||
'record_name': message.record_name,
|
||||
'subject': message.subject,
|
||||
'date': message.date,
|
||||
'to_read': message.to_read,
|
||||
'parent_id': parent_id,
|
||||
'is_private': is_private,
|
||||
'author_id': False,
|
||||
'is_author': False,
|
||||
'partner_ids': [],
|
||||
'vote_nb': vote_nb,
|
||||
'has_voted': has_voted,
|
||||
'is_favorite': is_favorite,
|
||||
'attachment_ids': [],
|
||||
}
|
||||
|
||||
def _message_read_add_expandables(self, cr, uid, messages, message_tree, parent_tree,
|
||||
message_unload_ids=[], thread_level=0, domain=[], parent_id=False, context=None):
|
||||
""" Create expandables for message_read, to load new messages.
|
||||
1. get the expandable for new threads
|
||||
if display is flat (thread_level == 0):
|
||||
@@ -275,96 +315,82 @@ class mail_message(osv.Model):
|
||||
for each hole in the child list based on message displayed,
|
||||
create an expandable
|
||||
|
||||
:param list message_list:list of message structure for the Chatter
|
||||
:param list messages: list of message structure for the Chatter
|
||||
widget to which expandables are added
|
||||
:param dict read_messages: dict [id]: read result of the messages to
|
||||
easily have access to their values, given their ID
|
||||
:param dict message_tree: dict [id]: browse record of this message
|
||||
:param dict parent_tree: dict [parent_id]: [child_ids]
|
||||
:param list message_unload_ids: list of message_ids we do not want
|
||||
to load
|
||||
:return bool: True
|
||||
"""
|
||||
def _get_expandable(domain, message_nb, parent_id, id, model):
|
||||
def _get_expandable(domain, message_nb, parent_id, max_limit):
|
||||
return {
|
||||
'domain': domain,
|
||||
'nb_messages': message_nb,
|
||||
'type': 'expandable',
|
||||
'parent_id': parent_id,
|
||||
'id': id,
|
||||
# TDE note: why do we need model sometimes, and sometimes not ???
|
||||
'model': model,
|
||||
'max_limit': max_limit,
|
||||
}
|
||||
|
||||
# all_not_loaded_ids = []
|
||||
id_list = sorted(read_messages.keys())
|
||||
if not id_list:
|
||||
return message_list
|
||||
if not messages:
|
||||
return True
|
||||
message_ids = sorted(message_tree.keys())
|
||||
|
||||
# 1. get the expandable for new threads
|
||||
if thread_level == 0:
|
||||
exp_domain = domain + [('id', '<', min(message_loaded_ids + id_list))]
|
||||
exp_domain = domain + [('id', '<', min(message_unload_ids + message_ids))]
|
||||
else:
|
||||
exp_domain = domain + ['!', ('id', 'child_of', message_loaded_ids + id_list)]
|
||||
exp_domain = domain + ['!', ('id', 'child_of', message_unload_ids + parent_tree.keys())]
|
||||
ids = self.search(cr, uid, exp_domain, context=context, limit=1)
|
||||
if ids:
|
||||
message_list.append(_get_expandable(exp_domain, -1, parent_id, -1, None))
|
||||
# inside a thread: prepend
|
||||
if parent_id:
|
||||
messages.insert(0, _get_expandable(exp_domain, -1, parent_id, True))
|
||||
# new threads: append
|
||||
else:
|
||||
messages.append(_get_expandable(exp_domain, -1, parent_id, True))
|
||||
|
||||
# 2. get the expandables for new messages inside threads if display is not flat
|
||||
if thread_level == 0:
|
||||
return True
|
||||
for message_id in id_list:
|
||||
message = read_messages[message_id]
|
||||
for message_id in message_ids:
|
||||
message = message_tree[message_id]
|
||||
|
||||
# message is not a thread header (has a parent_id)
|
||||
# TDE note: parent_id is false is there is a parent we can not see -> ok
|
||||
if message.get('parent_id'):
|
||||
# generate only for thread header messages (TDE note: parent_id may be False is uid cannot see parent_id, seems ok)
|
||||
if message.parent_id:
|
||||
continue
|
||||
|
||||
# TDE note: check search is correctly implemented in mail.message
|
||||
not_loaded_ids = self.search(cr, uid, [
|
||||
('id', 'child_of', message['id']),
|
||||
('id', 'not in', message_loaded_ids),
|
||||
], context=context, limit=self._message_read_more_limit)
|
||||
if not not_loaded_ids:
|
||||
# check there are message for expandable
|
||||
child_ids = set([child.id for child in message.child_ids]) - set(message_unload_ids)
|
||||
child_ids = sorted(list(child_ids), reverse=True)
|
||||
if not child_ids:
|
||||
continue
|
||||
|
||||
# all_not_loaded_ids += not_loaded_ids
|
||||
# group childs not read
|
||||
id_min, id_max, nb = max(not_loaded_ids), 0, 0
|
||||
for not_loaded_id in not_loaded_ids:
|
||||
if not read_messages.get(not_loaded_id):
|
||||
# make groups of unread messages
|
||||
id_min, id_max, nb = max(child_ids), 0, 0
|
||||
for child_id in child_ids:
|
||||
if not child_id in message_ids:
|
||||
nb += 1
|
||||
if id_min > not_loaded_id:
|
||||
id_min = not_loaded_id
|
||||
if id_max < not_loaded_id:
|
||||
id_max = not_loaded_id
|
||||
if id_min > child_id:
|
||||
id_min = child_id
|
||||
if id_max < child_id:
|
||||
id_max = child_id
|
||||
elif nb > 0:
|
||||
exp_domain = [('id', '>=', id_min), ('id', '<=', id_max), ('id', 'child_of', message_id)]
|
||||
message_list.append(_get_expandable(exp_domain, nb, message_id, id_min, message.get('model')))
|
||||
id_min, id_max, nb = max(not_loaded_ids), 0, 0
|
||||
messages.append(_get_expandable(exp_domain, nb, message_id, False))
|
||||
id_min, id_max, nb = max(child_ids), 0, 0
|
||||
else:
|
||||
id_min, id_max, nb = max(not_loaded_ids), 0, 0
|
||||
id_min, id_max, nb = max(child_ids), 0, 0
|
||||
if nb > 0:
|
||||
exp_domain = [('id', '>=', id_min), ('id', '<=', id_max), ('id', 'child_of', message_id)]
|
||||
message_list.append(_get_expandable(exp_domain, nb, message_id, id_min, message.get('model')))
|
||||
|
||||
# message_loaded_ids = list(set(message_loaded_ids + read_messages.keys() + all_not_loaded_ids))
|
||||
idx = [msg.get('id') for msg in messages].index(message_id) + 1
|
||||
# messages.append(_get_expandable(exp_domain, nb, message_id, id_min))
|
||||
messages.insert(idx, _get_expandable(exp_domain, nb, message_id, False))
|
||||
|
||||
return True
|
||||
|
||||
def _get_parent(self, cr, uid, message, context=None):
|
||||
""" Tools method that tries to get the parent of a mail.message. If
|
||||
no parent, or if uid has no access right on the parent, False
|
||||
is returned.
|
||||
|
||||
:param dict message: read result of a mail.message
|
||||
"""
|
||||
if not message['parent_id']:
|
||||
return False
|
||||
parent_id = message['parent_id'][0]
|
||||
try:
|
||||
return self.read(cr, uid, parent_id, self._message_read_fields, context=context)
|
||||
except (orm.except_orm, osv.except_osv):
|
||||
return False
|
||||
|
||||
def message_read(self, cr, uid, ids=None, domain=None, message_unload_ids=None, thread_level=0, context=None, parent_id=False, limit=None):
|
||||
def message_read(self, cr, uid, ids=None, domain=None, message_unload_ids=None,
|
||||
thread_level=0, context=None, parent_id=False, limit=None):
|
||||
""" Read messages from mail.message, and get back a list of structured
|
||||
messages to be displayed as discussion threads. If IDs is set,
|
||||
fetch these records. Otherwise use the domain to fetch messages.
|
||||
@@ -388,46 +414,56 @@ class mail_message(osv.Model):
|
||||
ancestors and expandables
|
||||
:return list: list of message structure for the Chatter widget
|
||||
"""
|
||||
# print 'message_read', ids, domain, message_unload_ids, thread_level, context, parent_id, limit
|
||||
assert thread_level in [0, 1], 'message_read() thread_level should be 0 (flat) or 1 (1 level of thread); given %s.' % thread_level
|
||||
domain = domain if domain is not None else []
|
||||
message_unload_ids = message_unload_ids if message_unload_ids is not None else []
|
||||
if message_unload_ids:
|
||||
domain += [('id', 'not in', message_unload_ids)]
|
||||
limit = limit or self._message_read_limit
|
||||
read_messages = {}
|
||||
message_tree = {}
|
||||
message_list = []
|
||||
parent_tree = {}
|
||||
|
||||
# no specific IDS given: fetch messages according to the domain, add their parents if uid has access to
|
||||
if ids is None:
|
||||
ids = self.search(cr, uid, domain, context=context, limit=limit)
|
||||
for message in self.read(cr, uid, ids, self._message_read_fields, context=context):
|
||||
message_id = message['id']
|
||||
|
||||
# if not in tree and not in message_loaded list
|
||||
if not message_id in read_messages and not message_id in message_unload_ids:
|
||||
read_messages[message_id] = message
|
||||
message_list.append(self._message_get_dict(cr, uid, message, context=context))
|
||||
# fetch parent if threaded, sort messages
|
||||
for message in self.browse(cr, uid, ids, context=context):
|
||||
message_id = message.id
|
||||
if message_id in message_tree:
|
||||
continue
|
||||
message_tree[message_id] = message
|
||||
|
||||
# get the older ancestor the user can read, update its ancestor field
|
||||
if not thread_level:
|
||||
message_list[-1]['parent_id'] = parent_id
|
||||
continue
|
||||
parent = self._get_parent(cr, uid, message, context=context)
|
||||
while parent and parent.get('id') != parent_id:
|
||||
message_list[-1]['parent_id'] = parent.get('id')
|
||||
message = parent
|
||||
parent = self._get_parent(cr, uid, message, context=context)
|
||||
# if in thread: add its ancestor to the list of messages
|
||||
if not message['id'] in read_messages and not message['id'] in message_unload_ids:
|
||||
read_messages[message['id']] = message
|
||||
message_list.append(self._message_get_dict(cr, uid, message, context=context))
|
||||
# find parent_id
|
||||
if thread_level == 0:
|
||||
tree_parent_id = parent_id
|
||||
else:
|
||||
tree_parent_id = message_id
|
||||
parent = message
|
||||
while parent.parent_id and parent.parent_id.id != parent_id:
|
||||
parent = parent.parent_id
|
||||
tree_parent_id = parent.id
|
||||
if not parent.id in message_tree:
|
||||
message_tree[parent.id] = parent
|
||||
# newest messages first
|
||||
parent_tree.setdefault(tree_parent_id, [])
|
||||
if tree_parent_id != message_id:
|
||||
parent_tree[tree_parent_id].append(self._message_read_dict(cr, uid, message_tree[message_id], parent_id=tree_parent_id, context=context))
|
||||
|
||||
if thread_level:
|
||||
for key, message_id_list in parent_tree.iteritems():
|
||||
message_id_list.sort(key=lambda item: item['id'])
|
||||
message_id_list.insert(0, self._message_read_dict(cr, uid, message_tree[key], context=context))
|
||||
|
||||
parent_list = parent_tree.items()
|
||||
parent_list = sorted(parent_list, key=lambda item: max([msg.get('id') for msg in item[1]]) if item[1] else item[0], reverse=True)
|
||||
message_list = [message for (key, msg_list) in parent_list for message in msg_list]
|
||||
|
||||
# get the child expandable messages for the tree
|
||||
message_list = sorted(message_list, key=lambda k: k['id'])
|
||||
self._message_read_add_expandables(cr, uid, message_list, read_messages, thread_level=thread_level,
|
||||
message_loaded_ids=message_unload_ids, domain=domain, parent_id=parent_id, context=context, limit=limit)
|
||||
|
||||
self._message_read_dict_postprocess(cr, uid, message_list, message_tree, context=context)
|
||||
self._message_read_add_expandables(cr, uid, message_list, message_tree, parent_tree,
|
||||
thread_level=thread_level, message_unload_ids=message_unload_ids, domain=domain, parent_id=parent_id, context=context)
|
||||
return message_list
|
||||
|
||||
# TDE Note: do we need this ?
|
||||
@@ -461,7 +497,6 @@ class mail_message(osv.Model):
|
||||
- otherwise: remove the id
|
||||
"""
|
||||
# Rules do not apply to administrator
|
||||
# print '_search', uid, args
|
||||
if uid == SUPERUSER_ID:
|
||||
return super(mail_message, self)._search(cr, uid, args, offset=offset, limit=limit, order=order,
|
||||
context=context, count=count, access_rights_uid=access_rights_uid)
|
||||
@@ -599,6 +634,8 @@ class mail_message(osv.Model):
|
||||
def create(self, cr, uid, values, context=None):
|
||||
if not values.get('message_id') and values.get('res_id') and values.get('model'):
|
||||
values['message_id'] = tools.generate_tracking_message_id('%(res_id)s-%(model)s' % values)
|
||||
elif not values.get('message_id'):
|
||||
values['message_id'] = tools.generate_tracking_message_id('private')
|
||||
newid = super(mail_message, self).create(cr, uid, values, context)
|
||||
self._notify(cr, SUPERUSER_ID, newid, context=context)
|
||||
return newid
|
||||
@@ -729,7 +766,7 @@ class mail_message(osv.Model):
|
||||
], context=context)
|
||||
fol_objs = fol_obj.read(cr, uid, fol_ids, ['partner_id'], context=context)
|
||||
partners_to_notify |= set(fol['partner_id'][0] for fol in fol_objs)
|
||||
# when writing to a wall
|
||||
# remove me from notified partners, unless the message is written on my own wall
|
||||
if message.get('author_id') and message.get('model') == "res.partner" and message.get('res_id') == message.get('author_id')[0]:
|
||||
partners_to_notify |= set([message.get('author_id')[0]])
|
||||
elif message.get('author_id'):
|
||||
|
||||
@@ -59,21 +59,26 @@
|
||||
<field name="type"/>
|
||||
<field name="author_id"/>
|
||||
<field name="partner_ids"/>
|
||||
<filter string="Read"
|
||||
name="message_read" help="Show messages to read"
|
||||
domain="[('to_read', '=', False)]"/>
|
||||
<filter string="Unread"
|
||||
name="message_unread" help="Show messages to read"
|
||||
domain="[('to_read', '=', True)]"/>
|
||||
<separator/>
|
||||
<filter string="Comments"
|
||||
name="comments" help="Comments"
|
||||
domain="[('type', '=', 'comment')]"/>
|
||||
<filter string="Has attachments"
|
||||
name="attachments"
|
||||
domain="[('attachment_ids', '!=', False)]"/>
|
||||
<filter string="Notifications"
|
||||
name="notifications" help="Notifications"
|
||||
domain="[('type', '=', 'notification')]"/>
|
||||
<filter string="Emails"
|
||||
name="emails" help="Emails"
|
||||
domain="[('type', '=', 'email')]"/>
|
||||
<separator/>
|
||||
<filter string="Has attachments"
|
||||
name="attachments"
|
||||
domain="[('attachment_ids', '!=', False)]"/>
|
||||
</search>
|
||||
</field>
|
||||
</record>
|
||||
@@ -84,7 +89,6 @@
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="search_view_id" ref="view_message_search"/>
|
||||
<field name="context">{'search_default_to_read_message':True}</field>
|
||||
</record>
|
||||
|
||||
<!-- Add menu entry in Settings/Email -->
|
||||
|
||||
+91
-43
@@ -74,17 +74,17 @@ class mail_thread(osv.AbstractModel):
|
||||
- message_unread: has uid unread message for the document
|
||||
- message_summary: html snippet summarizing the Chatter for kanban views """
|
||||
res = dict((id, dict(message_unread=False, message_summary='')) for id in ids)
|
||||
user_pid = self.pool.get('res.users').read(cr, uid, uid, ['partner_id'], context=context)['partner_id'][0]
|
||||
|
||||
# search for unread messages, by reading directly mail.notification, as SUPERUSER
|
||||
notif_obj = self.pool.get('mail.notification')
|
||||
notif_ids = notif_obj.search(cr, SUPERUSER_ID, [
|
||||
('partner_id.user_ids', 'in', [uid]),
|
||||
('message_id.res_id', 'in', ids),
|
||||
('message_id.model', '=', self._name),
|
||||
('read', '=', False)
|
||||
], context=context)
|
||||
for notif in notif_obj.browse(cr, SUPERUSER_ID, notif_ids, context=context):
|
||||
res[notif.message_id.res_id]['message_unread'] = True
|
||||
# search for unread messages, directly in SQL to improve performances
|
||||
cr.execute(""" SELECT m.res_id FROM mail_message m
|
||||
RIGHT JOIN mail_notification n
|
||||
ON (n.message_id = m.id AND n.partner_id = %s AND n.read = False)
|
||||
WHERE m.model = %s AND m.res_id in %s""",
|
||||
(user_pid, self._name, tuple(ids),))
|
||||
msg_ids = [result[0] for result in cr.fetchall()]
|
||||
for msg_id in msg_ids:
|
||||
res[msg_id]['message_unread'] = True
|
||||
|
||||
for thread in self.browse(cr, uid, ids, context=context):
|
||||
cls = res[thread.id]['message_unread'] and ' class="oe_kanban_mail_new"' or ''
|
||||
@@ -319,10 +319,12 @@ class mail_thread(osv.AbstractModel):
|
||||
"""
|
||||
assert isinstance(message, Message), 'message must be an email.message.Message at this point'
|
||||
message_id = message.get('Message-Id')
|
||||
references = decode_header(message, 'References')
|
||||
in_reply_to = decode_header(message, 'In-Reply-To')
|
||||
|
||||
# 1. Verify if this is a reply to an existing thread
|
||||
references = decode_header(message, 'References') or decode_header(message, 'In-Reply-To')
|
||||
ref_match = references and tools.reference_re.search(references)
|
||||
thread_references = references or in_reply_to
|
||||
ref_match = thread_references and tools.reference_re.search(thread_references)
|
||||
if ref_match:
|
||||
thread_id = int(ref_match.group(1))
|
||||
model = ref_match.group(2) or model
|
||||
@@ -333,6 +335,14 @@ class mail_thread(osv.AbstractModel):
|
||||
message_id, model, thread_id, custom_values, uid)
|
||||
return [(model, thread_id, custom_values, uid)]
|
||||
|
||||
# Verify this is a reply to a private message
|
||||
message_ids = self.pool.get('mail.message').search(cr, uid, [('message_id', '=', in_reply_to)], limit=1, context=context)
|
||||
if message_ids:
|
||||
message = self.pool.get('mail.message').browse(cr, uid, message_ids[0], context=context)
|
||||
_logger.debug('Routing mail with Message-Id %s: direct reply to a private message: %s, custom_values: %s, uid: %s',
|
||||
message_id, message.id, custom_values, uid)
|
||||
return [(False, 0, custom_values, uid)]
|
||||
|
||||
# 2. Look for a matching mail.alias entry
|
||||
# Delivered-To is a safe bet in most modern MTAs, but we have to fallback on To + Cc values
|
||||
# for all the odd MTAs out there, as there is no standard header for the envelope's `rcpt_to` value.
|
||||
@@ -376,14 +386,19 @@ class mail_thread(osv.AbstractModel):
|
||||
def message_process(self, cr, uid, model, message, custom_values=None,
|
||||
save_original=False, strip_attachments=False,
|
||||
thread_id=None, context=None):
|
||||
"""Process an incoming RFC2822 email message, relying on
|
||||
``mail.message.parse()`` for the parsing operation,
|
||||
and ``message_route()`` to figure out the target model.
|
||||
""" Process an incoming RFC2822 email message, relying on
|
||||
``mail.message.parse()`` for the parsing operation,
|
||||
and ``message_route()`` to figure out the target model.
|
||||
|
||||
Once the target model is known, its ``message_new`` method
|
||||
is called with the new message (if the thread record did not exist)
|
||||
Once the target model is known, its ``message_new`` method
|
||||
is called with the new message (if the thread record did not exist)
|
||||
or its ``message_update`` method (if it did).
|
||||
|
||||
There is a special case where the target model is False: a reply
|
||||
to a private message. In this case, we skip the message_new /
|
||||
message_update step, to just post a new message using mail_thread
|
||||
message_post.
|
||||
|
||||
:param string model: the fallback model to use if the message
|
||||
does not match any of the currently configured mail aliases
|
||||
(may be None if a matching alias is supposed to be present)
|
||||
@@ -425,15 +440,19 @@ class mail_thread(osv.AbstractModel):
|
||||
for model, thread_id, custom_values, user_id in routes:
|
||||
if self._name != model:
|
||||
context.update({'thread_model': model})
|
||||
model_pool = self.pool.get(model)
|
||||
assert thread_id and hasattr(model_pool, 'message_update') or hasattr(model_pool, 'message_new'), \
|
||||
"Undeliverable mail with Message-Id %s, model %s does not accept incoming emails" % \
|
||||
(msg['message_id'], model)
|
||||
if thread_id and hasattr(model_pool, 'message_update'):
|
||||
model_pool.message_update(cr, user_id, [thread_id], msg, context=context)
|
||||
if model:
|
||||
model_pool = self.pool.get(model)
|
||||
assert thread_id and hasattr(model_pool, 'message_update') or hasattr(model_pool, 'message_new'), \
|
||||
"Undeliverable mail with Message-Id %s, model %s does not accept incoming emails" % \
|
||||
(msg['message_id'], model)
|
||||
if thread_id and hasattr(model_pool, 'message_update'):
|
||||
model_pool.message_update(cr, user_id, [thread_id], msg, context=context)
|
||||
else:
|
||||
thread_id = model_pool.message_new(cr, user_id, msg, custom_values, context=context)
|
||||
else:
|
||||
thread_id = model_pool.message_new(cr, user_id, msg, custom_values, context=context)
|
||||
model_pool.message_post(cr, uid, [thread_id], context=context, **msg)
|
||||
assert thread_id == 0, "Posting a message without model should be with a null res_id, to create a private message."
|
||||
model_pool = self.pool.get('mail.thread')
|
||||
model_pool.message_post_user_api(cr, uid, [thread_id], context=context, content_subtype='html', **msg)
|
||||
return thread_id
|
||||
|
||||
def message_new(self, cr, uid, msg_dict, custom_values=None, context=None):
|
||||
@@ -501,7 +520,7 @@ class mail_thread(osv.AbstractModel):
|
||||
body = tools.ustr(body, encoding, errors='replace')
|
||||
if message.get_content_type() == 'text/plain':
|
||||
# text/plain -> <pre/>
|
||||
body = tools.append_content_to_html(u'', body)
|
||||
body = tools.append_content_to_html(u'', body, preserve=True)
|
||||
else:
|
||||
alternative = (message.get_content_type() == 'multipart/alternative')
|
||||
for part in message.walk():
|
||||
@@ -516,7 +535,7 @@ class mail_thread(osv.AbstractModel):
|
||||
# 2) text/plain -> <pre/>
|
||||
if part.get_content_type() == 'text/plain' and (not alternative or not body):
|
||||
body = tools.append_content_to_html(body, tools.ustr(part.get_payload(decode=True),
|
||||
encoding, errors='replace'))
|
||||
encoding, errors='replace'), preserve=True)
|
||||
# 3) text/html -> raw
|
||||
elif part.get_content_type() == 'text/html':
|
||||
html = tools.ustr(part.get_payload(decode=True), encoding, errors='replace')
|
||||
@@ -556,7 +575,6 @@ class mail_thread(osv.AbstractModel):
|
||||
"""
|
||||
msg_dict = {
|
||||
'type': 'email',
|
||||
'subtype': 'mail.mt_comment',
|
||||
'author_id': False,
|
||||
}
|
||||
if not isinstance(message, Message):
|
||||
@@ -588,7 +606,7 @@ class mail_thread(osv.AbstractModel):
|
||||
else:
|
||||
msg_dict['email_from'] = message.get('from')
|
||||
partner_ids = self._message_find_partners(cr, uid, message, ['From', 'To', 'Cc'], context=context)
|
||||
msg_dict['partner_ids'] = partner_ids
|
||||
msg_dict['partner_ids'] = [(4, partner_id) for partner_id in partner_ids]
|
||||
|
||||
if 'Date' in message:
|
||||
date_hdr = decode(message.get('Date'))
|
||||
@@ -629,7 +647,8 @@ class mail_thread(osv.AbstractModel):
|
||||
mail.message ID. Extra keyword arguments will be used as default
|
||||
column values for the new mail.message record.
|
||||
Auto link messages for same id and object
|
||||
:param int thread_id: thread ID to post into, or list with one ID
|
||||
:param int thread_id: thread ID to post into, or list with one ID;
|
||||
if False/0, mail.message model will also be set as False
|
||||
:param str body: body of the message, usually raw HTML that will
|
||||
be sanitized
|
||||
:param str subject: optional subject
|
||||
@@ -639,10 +658,13 @@ class mail_thread(osv.AbstractModel):
|
||||
``(name,content)``, where content is NOT base64 encoded
|
||||
:return: ID of newly created mail.message
|
||||
"""
|
||||
context = context or {}
|
||||
attachments = attachments or []
|
||||
if context is None:
|
||||
context = {}
|
||||
if attachments is None:
|
||||
attachments = {}
|
||||
|
||||
assert (not thread_id) or isinstance(thread_id, (int, long)) or \
|
||||
(isinstance(thread_id, (list, tuple)) and len(thread_id) == 1), "Invalid thread_id"
|
||||
(isinstance(thread_id, (list, tuple)) and len(thread_id) == 1), "Invalid thread_id; should be 0, False, an ID or a list with one ID"
|
||||
if isinstance(thread_id, (list, tuple)):
|
||||
thread_id = thread_id and thread_id[0]
|
||||
mail_message = self.pool.get('mail.message')
|
||||
@@ -682,7 +704,6 @@ class mail_thread(osv.AbstractModel):
|
||||
# avoid loops when finding ancestors
|
||||
processed_list = []
|
||||
if message_ids:
|
||||
_counter, _counter_max = 0, 200
|
||||
message = mail_message.browse(cr, SUPERUSER_ID, message_ids[0], context=context)
|
||||
while (message.parent_id and message.parent_id.id not in processed_list):
|
||||
processed_list.append(message.parent_id.id)
|
||||
@@ -707,18 +728,45 @@ class mail_thread(osv.AbstractModel):
|
||||
|
||||
return mail_message.create(cr, uid, values, context=context)
|
||||
|
||||
def message_post_api(self, cr, uid, thread_id, body='', subject=False, parent_id=False, attachment_ids=None, context=None):
|
||||
""" Wrapper on message_post, used only in Chatter (JS). The purpose is
|
||||
to handle attachments.
|
||||
# TDE FIXME: body is plaintext: convert it into html
|
||||
def message_post_user_api(self, cr, uid, thread_id, body='', subject=False, parent_id=False,
|
||||
attachment_ids=None, context=None, content_subtype='plaintext', **kwargs):
|
||||
""" Wrapper on message_post, used for user input :
|
||||
- mail gateway
|
||||
- quick reply in Chatter (refer to mail.js), not
|
||||
the mail.compose.message wizard
|
||||
The purpose is to perform some pre- and post-processing:
|
||||
- if body is plaintext: convert it into html
|
||||
- if parent_id: handle reply to a previous message by adding the
|
||||
parent partners to the message
|
||||
- type and subtype: comment and mail.mt_comment by default
|
||||
- attachment_ids: supposed not attached to any document; attach them
|
||||
to the related document. Should only be set by Chatter.
|
||||
"""
|
||||
new_message_id = self.message_post(cr, uid, thread_id=thread_id, body=body, subject=subject, type='comment',
|
||||
subtype='mail.mt_comment', parent_id=parent_id, context=context)
|
||||
ir_attachment = self.pool.get('ir.attachment')
|
||||
mail_message = self.pool.get('mail.message')
|
||||
|
||||
# HACK FIXME: Chatter: attachments linked to the document (not done JS-side), load the message
|
||||
# 1. Pre-processing: body, partner_ids, type and subtype
|
||||
if content_subtype == 'plaintext':
|
||||
body = tools.plaintext2html(body)
|
||||
|
||||
partner_ids = kwargs.pop('partner_ids', [])
|
||||
if parent_id:
|
||||
parent_message = self.pool.get('mail.message').browse(cr, uid, parent_id, context=context)
|
||||
partner_ids += [(4, partner.id) for partner in parent_message.partner_ids]
|
||||
# TDE FIXME HACK: mail.thread -> private message
|
||||
if self._name == 'mail.thread' and parent_message.author_id.id:
|
||||
partner_ids.append((4, parent_message.author_id.id))
|
||||
|
||||
message_type = kwargs.pop('type', 'comment')
|
||||
message_subtype = kwargs.pop('subtype', 'mail.mt_comment')
|
||||
|
||||
# 2. Post message
|
||||
new_message_id = self.message_post(cr, uid, thread_id=thread_id, body=body, subject=subject, type=message_type,
|
||||
subtype=message_subtype, parent_id=parent_id, context=context, partner_ids=partner_ids, **kwargs)
|
||||
|
||||
# 3. Post-processing
|
||||
# HACK TDE FIXME: Chatter: attachments linked to the document (not done JS-side), load the message
|
||||
if attachment_ids:
|
||||
ir_attachment = self.pool.get('ir.attachment')
|
||||
mail_message = self.pool.get('mail.message')
|
||||
filtered_attachment_ids = ir_attachment.search(cr, SUPERUSER_ID, [
|
||||
('res_model', '=', 'mail.compose.message'),
|
||||
('res_id', '=', 0),
|
||||
|
||||
@@ -4,48 +4,126 @@
|
||||
<record id="action_mail_inbox_feeds" model="ir.actions.client">
|
||||
<field name="name">Inbox</field>
|
||||
<field name="tag">mail.wall</field>
|
||||
<field name="params" eval=""{'domain': [('notification_ids.partner_id.user_ids', 'in', [uid]), ('to_read', '=', True)],
|
||||
'context': {'default_model': 'res.users', 'default_res_id': uid, 'typeof_thread': 'inbox'} }""/>
|
||||
<field name="res_model">mail.message</field>
|
||||
<field name="context">{
|
||||
'default_model': 'res.users',
|
||||
'default_res_id': uid,
|
||||
}</field>
|
||||
<field name="params" eval=""{
|
||||
'domain': [
|
||||
('notification_ids.partner_id.user_ids', 'in', [uid]),
|
||||
('to_read', '=', True),
|
||||
('favorite_user_ids', 'not in', [uid])
|
||||
],
|
||||
'view_mailbox': True,
|
||||
'view_inbox': True,
|
||||
'read_action': 'read'
|
||||
}""/>
|
||||
<field name="help" type="html">
|
||||
<p>
|
||||
<b>Good Job!</b> Your inbox is empty.
|
||||
</p><p>
|
||||
Your inbox contains private messages or emails sent to you
|
||||
as well as information related to documents or people you
|
||||
follow.
|
||||
</p>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_mail_to_me_feeds" model="ir.actions.client">
|
||||
<field name="name">To: me</field>
|
||||
<field name="tag">mail.wall</field>
|
||||
<field name="params" eval=""{'domain': [('partner_ids.user_ids', 'in', [uid]), ('to_read', '=', True), ('author_id.user_ids', 'in', [uid])],
|
||||
'context': {'default_model': 'res.users', 'default_res_id': uid, 'typeof_thread': 'inbox'} }""/>
|
||||
<field name="res_model">mail.message</field>
|
||||
<field name="context">{
|
||||
'default_model': 'res.users',
|
||||
'default_res_id': uid,
|
||||
'search_default_message_unread': True
|
||||
}</field>
|
||||
<field name="params" eval=""{
|
||||
'domain': [('partner_ids.user_ids', 'in', [uid])],
|
||||
'view_mailbox': True,
|
||||
'read_action': 'read', }""/>
|
||||
<field name="help" type="html">
|
||||
<p>
|
||||
<b>No private message.</b>
|
||||
</p><p>
|
||||
This list contains messages sent to you.
|
||||
</p>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_mail_star_feeds" model="ir.actions.client">
|
||||
<field name="name">Favorites</field>
|
||||
<field name="name">Todo</field>
|
||||
<field name="tag">mail.wall</field>
|
||||
<field name="params" eval=""{'domain': [('favorite_user_ids.user_ids', 'in', [uid])],
|
||||
'context': {'default_model': 'res.users', 'default_res_id': uid, 'typeof_thread': 'stared'} }""/>
|
||||
<field name="res_model">mail.message</field>
|
||||
<field name="context">{
|
||||
'default_model': 'res.users',
|
||||
'default_res_id': uid,
|
||||
'search_default_message_unread': True
|
||||
}</field>
|
||||
<field name="params" eval=""{
|
||||
'domain': [('favorite_user_ids', 'in', [uid])],
|
||||
'view_mailbox': True,
|
||||
'read_action': 'read', }""/>
|
||||
<field name="help" type="html">
|
||||
<p>
|
||||
<b>No todo!</b>
|
||||
</p><p>
|
||||
When you process messages in your inbox, you can mark some
|
||||
as <i>todo</i>. From this menu, you can process all your todo.
|
||||
</p>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_mail_archives_feeds" model="ir.actions.client">
|
||||
<field name="name">Archives</field>
|
||||
<field name="tag">mail.wall</field>
|
||||
<field name="params" eval=""{'domain': [('notification_ids.partner_id.user_ids', 'in', [uid]), ('to_read', '=', False)],
|
||||
'context': {'default_model': 'res.users', 'default_res_id': uid, 'typeof_thread': 'archives'} }""/>
|
||||
<field name="context">{
|
||||
'default_model': 'res.users',
|
||||
'default_res_id': uid,
|
||||
'search_default_message_read': True
|
||||
}</field>
|
||||
<field name="params" eval=""{
|
||||
'domain': [('notification_ids.partner_id.user_ids', 'in', [uid])],
|
||||
'view_mailbox': True,
|
||||
'read_action': 'unread', }""/>
|
||||
<field name="help" type="html">
|
||||
<p>
|
||||
No message found.
|
||||
</p>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="action_mail_sent_feeds" model="ir.actions.client">
|
||||
<field name="name">Sent</field>
|
||||
<field name="tag">mail.wall</field>
|
||||
<field name="params" eval=""{'domain': [('author_id.user_ids', 'in', [uid])],
|
||||
'context': {'default_model': 'res.users', 'default_res_id': uid, 'typeof_thread': 'send'} }""/>
|
||||
<field name="context">{
|
||||
'default_model': 'res.users',
|
||||
'default_res_id': uid
|
||||
}</field>
|
||||
<field name="params" eval=""{
|
||||
'domain': [('author_id.user_ids', 'in', [uid])],
|
||||
'view_mailbox': True, }""/>
|
||||
<field name="help" type="html">
|
||||
<p>
|
||||
<b>No message sent yet.</b>
|
||||
</p><p>
|
||||
Click on the top-right icon to compose a message. This
|
||||
message will be sent by email if it's an internal contact.
|
||||
</p>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- MENU -->
|
||||
|
||||
<!-- Top menu item -->
|
||||
<menuitem name="Emails"
|
||||
<menuitem name="Messaging"
|
||||
id="mail.mail_feeds_main"
|
||||
groups="base.group_user"
|
||||
sequence="10"/>
|
||||
|
||||
<!-- Left-side menu: Feeds -->
|
||||
<menuitem id="mail.mail_feeds" name="Messages" parent="mail.mail_feeds_main" groups="base.group_user" sequence="10"/>
|
||||
<menuitem id="mail.mail_feeds" name="Messaging" parent="mail.mail_feeds_main" groups="base.group_user" sequence="10"/>
|
||||
<menuitem id="mail_my_stuff" name="Organizer" parent="mail.mail_feeds_main"/>
|
||||
|
||||
<record id="mail_inboxfeeds" model="ir.ui.menu">
|
||||
@@ -61,7 +139,7 @@
|
||||
<field name="parent_id" ref="mail.mail_feeds"/>
|
||||
</record>
|
||||
<record id="mail_starfeeds" model="ir.ui.menu">
|
||||
<field name="name">Favorites</field>
|
||||
<field name="name">Todo</field>
|
||||
<field name="sequence" eval="14"/>
|
||||
<field name="action" ref="action_mail_star_feeds"/>
|
||||
<field name="parent_id" ref="mail.mail_feeds"/>
|
||||
|
||||
@@ -42,4 +42,23 @@ class res_partner_mail(osv.Model):
|
||||
'notification_email_send': lambda *args: 'comment'
|
||||
}
|
||||
|
||||
def message_post(self, cr, uid, thread_id, body='', subject=None, type='notification',
|
||||
subtype=None, parent_id=False, attachments=None, context=None, **kwargs):
|
||||
""" Override related to res.partner. In case of email message, set it as
|
||||
private:
|
||||
- add the target partner in the message partner_ids
|
||||
- set thread_id as None, because this will trigger the 'private'
|
||||
aspect of the message (model=False, res_id=False)
|
||||
"""
|
||||
if isinstance(thread_id, (list, tuple)):
|
||||
thread_id = thread_id[0]
|
||||
if type == 'email':
|
||||
partner_ids = kwargs.get('partner_ids', [])
|
||||
if thread_id not in partner_ids:
|
||||
partner_ids.append((4, thread_id))
|
||||
kwargs['partner_ids'] = partner_ids
|
||||
thread_id = False
|
||||
return super(res_partner_mail, self).message_post(cr, uid, thread_id, body=body, subject=subject,
|
||||
type=type, subtype=subtype, parent_id=parent_id, attachments=attachments, context=context, **kwargs)
|
||||
|
||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||
|
||||
@@ -91,8 +91,10 @@ class res_users(osv.Model):
|
||||
return user_id
|
||||
|
||||
def _create_welcome_message(self, cr, uid, user, context=None):
|
||||
company_name = user.company_id.name if user.company_id else _('the company')
|
||||
body = _('%s has joined %s.') % (user.name, company_name)
|
||||
if not self.has_group(cr, uid, 'base.group_user'):
|
||||
return False
|
||||
company_name = user.company_id.name if user.company_id else ''
|
||||
body = _('%s has joined the %s network.') % (user.name, company_name)
|
||||
# TODO change SUPERUSER_ID into user.id but catch errors
|
||||
return self.pool.get('res.partner').message_post(cr, SUPERUSER_ID, [user.partner_id.id],
|
||||
body=body, context=context)
|
||||
@@ -111,7 +113,8 @@ class res_users(osv.Model):
|
||||
alias_pool.unlink(cr, uid, alias_ids, context=context)
|
||||
return res
|
||||
|
||||
def message_post_api(self, cr, uid, thread_id, body='', subject=False, parent_id=False, attachment_ids=None, context=None):
|
||||
def message_post_user_api(self, cr, uid, thread_id, body='', subject=False, parent_id=False,
|
||||
attachment_ids=None, context=None, content_subtype='plaintext', **kwargs):
|
||||
""" Redirect the posting of message on res.users to the related partner.
|
||||
This is done because when giving the context of Chatter on the
|
||||
various mailboxes, we do not have access to the current partner_id.
|
||||
@@ -122,8 +125,8 @@ class res_users(osv.Model):
|
||||
if isinstance(thread_id, (list, tuple)):
|
||||
thread_id = thread_id[0]
|
||||
partner_id = self.pool.get('res.users').read(cr, uid, thread_id, ['partner_id'], context=context)['partner_id'][0]
|
||||
return self.pool.get('res.partner').message_post_api(cr, uid, partner_id, body=body, subject=subject,
|
||||
parent_id=parent_id, attachment_ids=attachment_ids, context=context)
|
||||
return self.pool.get('res.partner').message_post_user_api(cr, uid, partner_id, body=body, subject=subject,
|
||||
parent_id=parent_id, attachment_ids=attachment_ids, context=context, content_subtype=content_subtype, **kwargs)
|
||||
|
||||
def message_post(self, cr, uid, thread_id, context=None, **kwargs):
|
||||
""" Redirect the posting of message on res.users to the related partner.
|
||||
@@ -143,6 +146,7 @@ class res_users(osv.Model):
|
||||
return self.pool.get('res.partner').message_update(cr, uid, [partner_id], msg_dict,
|
||||
update_vals=update_vals, context=context)
|
||||
|
||||
|
||||
class res_users_mail_group(osv.Model):
|
||||
""" Update of res.users class
|
||||
- if adding groups to an user, check mail.groups linked to this user
|
||||
|
||||
@@ -7,12 +7,13 @@ access_mail_mail_system,mail.mail.system,model_mail_mail,base.group_system,1,1,1
|
||||
access_mail_followers_all,mail.followers.all,model_mail_followers,,1,0,0,0
|
||||
access_mail_followers_system,mail.followers.system,model_mail_followers,base.group_system,1,1,1,1
|
||||
access_mail_notification_all,mail.notification.all,model_mail_notification,,1,0,0,0
|
||||
access_mail_notification_aystem,mail.notification.system,model_mail_notification,base.group_system,1,1,1,1
|
||||
access_mail_notification_group_user,mail.notification.user,model_mail_notification,base.group_user,1,1,1,0
|
||||
access_mail_notification_system,mail.notification.system,model_mail_notification,base.group_system,1,1,1,1
|
||||
access_mail_group_all,mail.group.all,model_mail_group,,1,0,0,0
|
||||
access_mail_group_user,mail.group.user,model_mail_group,base.group_user,1,1,1,1
|
||||
access_mail_alias_all,mail.alias.all,model_mail_alias,,1,0,0,0
|
||||
access_mail_alias_user,mail.alias,model_mail_alias,base.group_user,1,1,1,0
|
||||
access_mail_alias_system,mail.alias,model_mail_alias,base.group_system,1,1,1,1
|
||||
access_mail_alias_user,mail.alias.user,model_mail_alias,base.group_user,1,1,1,0
|
||||
access_mail_alias_system,mail.alias.system,model_mail_alias,base.group_system,1,1,1,1
|
||||
access_mail_message_subtype_all,mail.message.subtype.all,model_mail_message_subtype,,1,0,0,0
|
||||
access_mail_vote_all,mail.vote.all,model_mail_vote,,1,1,1,1
|
||||
access_mail_favorite_all,mail.favorite.all,model_mail_favorite,,1,1,1,1
|
||||
|
||||
|
@@ -10,7 +10,7 @@
|
||||
<field name="domain_force">['|', '|', ('public', '=', 'public'), ('message_follower_ids', 'in', [user.partner_id.id]), '&', ('public','=','groups'), ('group_public_id','in', [g.id for g in user.groups_id])]</field>
|
||||
</record>
|
||||
|
||||
<record id="mail_followers_read_own" model="ir.rule">
|
||||
<record id="mail_followers_read_write_own" model="ir.rule">
|
||||
<field name="name">mail.followers: read and write its own entries</field>
|
||||
<field name="model_id" ref="model_mail_followers"/>
|
||||
<field name="domain_force">[('partner_id', '=', user.partner_id.id)]</field>
|
||||
@@ -18,6 +18,14 @@
|
||||
<field name="perm_unlink" eval="False"/>
|
||||
</record>
|
||||
|
||||
<record id="mail_notification_read_write_own" model="ir.rule">
|
||||
<field name="name">mail.notification: read and write its own entries</field>
|
||||
<field name="model_id" ref="model_mail_notification"/>
|
||||
<field name="domain_force">[('partner_id', '=', user.partner_id.id)]</field>
|
||||
<field name="perm_create" eval="False"/>
|
||||
<field name="perm_unlink" eval="False"/>
|
||||
</record>
|
||||
|
||||
<!--
|
||||
This rule can not be uncommented, because we have a more wide method in mail.message. When we implement a many2one_variable field, we will be able to uncomment this.
|
||||
<record id="mail_message_read_partner_or_author" model="ir.rule">
|
||||
|
||||
@@ -1,7 +1,36 @@
|
||||
/* ------------ TOPBAR MAIL BUTTON --------------- */
|
||||
|
||||
/* FIXME this css is not very pretty because it uses a
|
||||
* 'button' element wich comes with a lot of inappropriate
|
||||
* styling. Entypo is also a headache to center properly
|
||||
* */
|
||||
|
||||
.openerp .oe_topbar_item.oe_topbar_compose_full_email{
|
||||
padding: 0px;
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
}
|
||||
.openerp .oe_topbar_item.oe_topbar_compose_full_email button{
|
||||
position: relative;
|
||||
top: -3px; /* centering entypo ... urgh */
|
||||
box-sizing: border-box;
|
||||
border: none;
|
||||
box-shadow: none;
|
||||
color: white;
|
||||
background: none;
|
||||
text-shadow: 0px 1px 2px black;
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
padding: 0px;
|
||||
margin: 0px
|
||||
border-radius: 0px;
|
||||
}
|
||||
|
||||
/* ------------ MAIL WIDGET --------------- */
|
||||
.openerp .oe_mail, .openerp .oe_mail *{
|
||||
box-sizing: border-box;
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.openerp .oe_mail {
|
||||
display: block;
|
||||
@@ -42,9 +71,10 @@
|
||||
}
|
||||
.openerp .oe_mail .oe_msg .oe_msg_footer{
|
||||
padding-left: 4px;
|
||||
padding-top: 3px;
|
||||
overflow: hidden;
|
||||
opacity:0.8;
|
||||
-webkit-transition: opacity 0.2s linear;
|
||||
margin-bottom: 4px;
|
||||
font-size: 11px;
|
||||
}
|
||||
.openerp .oe_mail .oe_msg .oe_msg_content{
|
||||
display: block;
|
||||
@@ -57,6 +87,13 @@
|
||||
margin-bottom: 0px;
|
||||
margin-top: 2px;
|
||||
}
|
||||
.openerp .oe_mail .oe_msg .oe_msg_content .oe_msg_body p:first-of-type {
|
||||
margin-top: 0px;
|
||||
}
|
||||
|
||||
.openerp .oe_mail .oe_msg .oe_msg_content .oe_msg_body p {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
/* a) Indented Messages */
|
||||
|
||||
@@ -80,18 +117,24 @@
|
||||
.openerp .oe_mail .oe_msg.oe_msg_indented .oe_msg_content{
|
||||
padding-top:2px;
|
||||
}
|
||||
.openerp .oe_mail .oe_msg.oe_msg_indented .oe_msg_footer{
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
/* b) Votes (likes) */
|
||||
|
||||
.openerp .oe_mail .oe_mail_vote_count{
|
||||
display: inline;
|
||||
position: relative;
|
||||
background: #7C7BAD;
|
||||
color: white;
|
||||
background: white;
|
||||
box-shadow: 0px 0px 0px 1px rgba(124, 123, 173, 0.36) inset;
|
||||
color: #7c7bad;
|
||||
text-shadow: none;
|
||||
border-radius: 3px;
|
||||
margin: 0px;
|
||||
padding-left: 3px;
|
||||
padding-right: 18px;
|
||||
margin-right: 3px;
|
||||
padding-right: 15px;
|
||||
margin-right: 5px;
|
||||
}
|
||||
.openerp .oe_mail .oe_mail_vote_count .oe_e{
|
||||
position: absolute;
|
||||
@@ -102,12 +145,6 @@
|
||||
|
||||
/* c) Message action icons */
|
||||
|
||||
.openerp .oe_mail .oe_msg.oe_msg_unread .oe_unread{
|
||||
display:none;
|
||||
}
|
||||
.openerp .oe_mail .oe_msg.oe_msg_read .oe_read{
|
||||
display:none;
|
||||
}
|
||||
.openerp .oe_mail .oe_msg .oe_msg_icons{
|
||||
float: right;
|
||||
margin-top: 4px;
|
||||
@@ -115,6 +152,9 @@
|
||||
margin-left: 8px;
|
||||
height: 24px;
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
.openerp .oe_mail .oe_msg .oe_msg_icons span{
|
||||
float:right;
|
||||
@@ -128,10 +168,16 @@
|
||||
color: #FFF;
|
||||
text-shadow: 0px 1px #AAA,0px -1px #AAA, -1px 0px #AAA, 1px 0px #AAA, 0px 3px 3px rgba(0,0,0,0.1);
|
||||
-webkit-transition: all 0.2s linear;
|
||||
-moz-transition: all 0.2s linear;
|
||||
-o-transition: all 0.2s linear;
|
||||
transition: all 0.2s linear;
|
||||
}
|
||||
.openerp .oe_mail .oe_msg:hover .oe_msg_icons a{
|
||||
opacity: 1;
|
||||
-webkit-transition: all 0.1s linear;
|
||||
-moz-transition: all 0.1s linear;
|
||||
-o-transition: all 0.1s linear;
|
||||
transition: all 0.1s linear;
|
||||
}
|
||||
.openerp .oe_mail .oe_msg .oe_msg_icons .oe_star:hover a{
|
||||
color: #FFF6C0;
|
||||
@@ -155,7 +201,7 @@
|
||||
}
|
||||
.openerp .oe_mail .oe_msg .oe_msg_content textarea{
|
||||
width: 100%;
|
||||
height: 32px;
|
||||
height: 64px;
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
resize: vertical;
|
||||
@@ -171,6 +217,150 @@
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
/* --------------------- ATTACHMENTS --------------------- */
|
||||
|
||||
.openerp .oe_mail .oe_msg_attachment_list{
|
||||
display: none;
|
||||
margin-top: 12px;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
.openerp .oe_mail .oe_msg_composer .oe_msg_attachment_list{
|
||||
display: block;
|
||||
}
|
||||
.openerp .oe_mail .oe_attachment{
|
||||
display: inline-block;
|
||||
width: 100px;
|
||||
margin: 2px;
|
||||
min-height: 80px;
|
||||
position: relative;
|
||||
border-radius: 3px;
|
||||
text-align: center;
|
||||
vertical-align: top;
|
||||
}
|
||||
.openerp .oe_mail .oe_attachment .oe_name{
|
||||
display: inline-block;
|
||||
max-width: 100%;
|
||||
padding: 1px 3px;
|
||||
margin-top: 50px;
|
||||
margin-bottom: 5px;
|
||||
background: rgba(124, 123, 173, 0.13);
|
||||
overflow: hidden;
|
||||
color: #4c4c4c;
|
||||
text-shadow: none;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.openerp .oe_mail .oe_attachment.oe_preview{
|
||||
background: url( data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAJ0lEQVQYV2MsLS39z4AGLCws0IUYGIeCwrVr12J45sSJE5ieGQIKAbuZKf/EMCs7AAAAAElFTkSuQmCC );
|
||||
}
|
||||
.openerp .oe_mail .oe_attachment .oe_progress_bar{
|
||||
display: none;
|
||||
position: absolute;
|
||||
top: 18px;
|
||||
left: 16px;
|
||||
right: 16px;
|
||||
height: 17px;
|
||||
line-height: 13px;
|
||||
padding: 0px;
|
||||
background: #4BBD00;
|
||||
color: white;
|
||||
text-align: center;
|
||||
border-radius: 3px;
|
||||
border: solid 1px rgba(0,0,0,0.2);
|
||||
box-shadow: 0px 3px 10px rgba(0, 0, 0, 0.34);
|
||||
-webkit-animation: oe_mail_attach_loading_anim 0.75s infinite linear;
|
||||
-moz-animation: oe_mail_attach_loading_anim 0.75s infinite linear;
|
||||
-o-animation: oe_mail_attach_loading_anim 0.75s infinite linear;
|
||||
animation: oe_mail_attach_loading_anim 0.75s infinite linear;
|
||||
}
|
||||
.openerp .oe_mail .oe_attachment.oe_uploading .oe_progress_bar{
|
||||
display: block;
|
||||
}
|
||||
@-webkit-keyframes oe_mail_attach_loading_anim{
|
||||
0% { background: #4BBD00 }
|
||||
50% { background: #009123 }
|
||||
100% { background: #4BBD00 }
|
||||
}
|
||||
@-moz-keyframes oe_mail_attach_loading_anim{
|
||||
0% { background: #4BBD00 }
|
||||
50% { background: #009123 }
|
||||
100% { background: #4BBD00 }
|
||||
}
|
||||
@-o-keyframes oe_mail_attach_loading_anim{
|
||||
0% { background: #4BBD00 }
|
||||
50% { background: #009123 }
|
||||
100% { background: #4BBD00 }
|
||||
}
|
||||
@keyframes oe_mail_attach_loading_anim{
|
||||
0% { background: #4BBD00 }
|
||||
50% { background: #009123 }
|
||||
100% { background: #4BBD00 }
|
||||
}
|
||||
.openerp .oe_mail .oe_attachment.oe_preview .oe_name{
|
||||
position: absolute;
|
||||
bottom: 0px;
|
||||
margin: 0px;
|
||||
left: 0px;
|
||||
right: 0px;
|
||||
max-height: 64px;
|
||||
background: rgba(0,0,0,0.8);
|
||||
color: white;
|
||||
border-top-left-radius: 0px;
|
||||
border-top-right-radius: 0px;
|
||||
opacity: 0;
|
||||
-webkit-transition: opacity 0.2s linear;
|
||||
-moz-transition: opacity 0.2s linear;
|
||||
-o-transition: opacity 0.2s linear;
|
||||
transition: opacity 0.2s linear;
|
||||
}
|
||||
.openerp .oe_mail .oe_attachment.oe_preview:hover .oe_name{
|
||||
opacity: 1;
|
||||
-webkit-transition: opacity 0.2s linear;
|
||||
-moz-transition: opacity 0.2s linear;
|
||||
-o-transition: opacity 0.2s linear;
|
||||
transition: opacity 0.2s linear;
|
||||
}
|
||||
.openerp .oe_mail .oe_attachment img{
|
||||
position: absolute;
|
||||
width: 48px;
|
||||
height: 48px;
|
||||
top: 0px;
|
||||
left: 50%;
|
||||
margin-left: -24px;
|
||||
}
|
||||
.openerp .oe_mail .oe_attachment.oe_preview img{
|
||||
display: block;
|
||||
position: relative;
|
||||
margin:0px;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
border-radius: 3px;
|
||||
margin-left: -50px;
|
||||
}
|
||||
.openerp .oe_mail .oe_attachment .oe_delete{
|
||||
display: none;
|
||||
}
|
||||
.openerp .oe_mail .oe_msg_composer .oe_attachment .oe_delete{
|
||||
display: block;
|
||||
position: absolute;
|
||||
top: -7px;
|
||||
right: 0px;
|
||||
color: black;
|
||||
text-shadow: 1px 0px white, -1px 0px white, 0px 1px white, 0px -1px white;
|
||||
cursor: pointer;
|
||||
opacity: 0;
|
||||
-webkit-transition: opacity 0.2s linear;
|
||||
-moz-transition: opacity 0.2s linear;
|
||||
-o-transition: opacity 0.2s linear;
|
||||
transition: opacity 0.2s linear;
|
||||
}
|
||||
.openerp .oe_mail .oe_msg_composer .oe_attachment:hover .oe_delete{
|
||||
opacity: 1;
|
||||
-webkit-transition: opacity 0.2s linear;
|
||||
-moz-transition: opacity 0.2s linear;
|
||||
-o-transition: opacity 0.2s linear;
|
||||
transition: opacity 0.2s linear;
|
||||
}
|
||||
/* ---------------- MESSAGE QUICK COMPOSER --------------- */
|
||||
|
||||
.openerp .oe_mail .oe_msg_composer .oe_msg_footer{
|
||||
@@ -178,37 +368,6 @@
|
||||
padding-top: 2px;
|
||||
padding-bottom:6px;
|
||||
}
|
||||
.openerp .oe_mail .oe_msg_attachments.oe_hidden,
|
||||
.openerp .oe_mail .oe_msg_images.oe_hidden{
|
||||
margin:0px;
|
||||
border: none;
|
||||
display: none;
|
||||
}
|
||||
.openerp .oe_mail .oe_msg_attachments{
|
||||
margin-bottom: 4px;
|
||||
margin-right: 0px;
|
||||
font-size: 12px;
|
||||
border-radius: 2px;
|
||||
border: solid 1px rgba(124,123,173,0.14);
|
||||
}
|
||||
.openerp .oe_mail .oe_msg_attachments .oe_attachment{
|
||||
padding: 2px;
|
||||
padding-left: 4px;
|
||||
padding-right: 4px;
|
||||
}
|
||||
.openerp .oe_mail .oe_msg_attachments .oe_attachment .oe_e{
|
||||
font-size: 23px;
|
||||
margin-top: -5px;
|
||||
}
|
||||
.openerp .oe_mail .oe_msg_attachments .oe_attachment .oe_e:hover{
|
||||
text-decoration: none;
|
||||
}
|
||||
.openerp .oe_mail .oe_msg_attachments .oe_attachment:nth-child(odd){
|
||||
background:white;
|
||||
}
|
||||
.openerp .oe_mail .oe_msg_attachments .oe_attachment:nth-child(even){
|
||||
background: #F4F5FA;
|
||||
}
|
||||
.openerp .oe_mail .oe_msg_images {
|
||||
display: block;
|
||||
}
|
||||
@@ -222,11 +381,13 @@
|
||||
.openerp .oe_mail .oe_msg_footer button.oe_attach{
|
||||
width: 24px;
|
||||
overflow: hidden;
|
||||
filter:none;
|
||||
}
|
||||
.openerp .oe_mail .oe_msg_footer button.oe_attach .oe_e{
|
||||
position: relative;
|
||||
top: -1px;
|
||||
left: -9px;
|
||||
filter:none;
|
||||
}
|
||||
.openerp .oe_mail .oe_hidden_input_file, .openerp .oe_mail .oe_hidden_input_file form{
|
||||
display:inline;
|
||||
@@ -235,11 +396,13 @@
|
||||
width:24px;
|
||||
overflow:hidden;
|
||||
float: right;
|
||||
filter:none;
|
||||
}
|
||||
.openerp .oe_mail .oe_msg_footer button.oe_full .oe_e{
|
||||
position: relative;
|
||||
top: -1px;
|
||||
left: -9px;
|
||||
filter:none;
|
||||
}
|
||||
.openerp .oe_mail button.oe_attach, .openerp .oe_mail button.oe_full{
|
||||
background: transparent;
|
||||
@@ -247,6 +410,7 @@
|
||||
box-shadow: none;
|
||||
border: none;
|
||||
text-shadow: none;
|
||||
filter:none;
|
||||
}
|
||||
.openerp .oe_mail .oe_attach_label{
|
||||
color: #7C7BAD;
|
||||
@@ -258,6 +422,7 @@
|
||||
height: 28px;
|
||||
width: 52px;
|
||||
margin-top: -6px;
|
||||
filter:none;
|
||||
}
|
||||
.openerp .oe_mail .oe_mail_list_recipients{
|
||||
font-size: 12px;
|
||||
@@ -269,6 +434,7 @@
|
||||
|
||||
.openerp .oe_mail .oe_msg_content.oe_msg_more_message{
|
||||
text-align: right;
|
||||
cursor: pointer;
|
||||
}
|
||||
.openerp .oe_mail .oe_msg_content.oe_msg_more_message .oe_separator{
|
||||
height: 0;
|
||||
@@ -280,7 +446,7 @@
|
||||
}
|
||||
.openerp .oe_mail .oe_msg_more_message .oe_msg_fetch_more {
|
||||
background: white;
|
||||
margin-right: 280px;
|
||||
margin-right: 210px;
|
||||
padding-left: 8px;
|
||||
padding-right: 8px;
|
||||
text-decoration: none;
|
||||
@@ -298,6 +464,7 @@
|
||||
padding-top: 5px;
|
||||
width: 160px;
|
||||
float: right;
|
||||
margin-right: 16px;
|
||||
}
|
||||
|
||||
/* a) THE FOLLOW BUTTON */
|
||||
@@ -308,9 +475,23 @@
|
||||
width:100%;
|
||||
}
|
||||
.openerp .oe_followers button.oe_follower.oe_following{
|
||||
color: white;
|
||||
background-color: #3465A4;
|
||||
background-image: -webkit-linear-gradient(top, #729FCF, #3465A4);
|
||||
background-image: -moz-linear-gradient(top, #729FCF, #3465A4);
|
||||
background-image: -ms-linear-gradient(top, #729FCF, #3465A4);
|
||||
background-image: -o-linear-gradient(top, #729FCF, #3465A4);
|
||||
background-image: linear-gradient(to bottom, #729FCF, #3465A4);
|
||||
}
|
||||
.openerp .oe_followers button.oe_follower.oe_following:hover{
|
||||
color: white;
|
||||
filter:none;
|
||||
background-color: #A21A1A;
|
||||
background-image: -webkit-linear-gradient(top, #DF3F3F, #A21A1A);
|
||||
background-image: -moz-linear-gradient(top, #DF3F3F, #A21A1A);
|
||||
background-image: -ms-linear-gradient(top, #DF3F3F, #A21A1A);
|
||||
background-image: -o-linear-gradient(top, #DF3F3F, #A21A1A);
|
||||
background-image: linear-gradient(to bottom, #DF3F3F, #A21A1A);
|
||||
}
|
||||
|
||||
.openerp .oe_followers button.oe_follower .oe_follow,
|
||||
@@ -371,12 +552,17 @@
|
||||
|
||||
.openerp .oe_record_thread{
|
||||
display: block;
|
||||
margin-right: 180px;
|
||||
margin-left: 16px;
|
||||
margin-right: 212px;
|
||||
}
|
||||
|
||||
/* ----------- INBOX INTEGRATION ----------- */
|
||||
|
||||
.openerp .oe_mail_wall .oe_mail{
|
||||
margin: 16px;
|
||||
width: 720px;
|
||||
width: 600px;
|
||||
}
|
||||
|
||||
.openerp .oe_mail .oe_view_nocontent > p {
|
||||
padding-left: 15px;
|
||||
}
|
||||
|
||||
@@ -44,20 +44,23 @@
|
||||
text-align: center;
|
||||
overflow: hidden;
|
||||
-moz-border-radius: 3px;
|
||||
border-collapse: separate;
|
||||
-webkit-border-radius: 3px;
|
||||
-o-border-radius: 3px;
|
||||
-ms-border-radius: 3px;
|
||||
border-radius: 3px;
|
||||
border-collapse: separate;
|
||||
-moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
|
||||
-webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
|
||||
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
|
||||
-o-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
|
||||
-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
|
||||
}
|
||||
|
||||
.oe_group_photo {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
clip: rect(0px, 100px, 100px, 0px);
|
||||
border:none;
|
||||
}
|
||||
|
||||
.oe_group_details {
|
||||
@@ -68,30 +71,31 @@
|
||||
min-height: 120px;
|
||||
}
|
||||
|
||||
.oe_group_details a, .oe_group_details a:hover {
|
||||
font-weight: bold;
|
||||
color: #4c4c4c;
|
||||
}
|
||||
|
||||
.oe_group_details h4 {
|
||||
margin: 0;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.oe_group_details h4 a {
|
||||
color: #4c4c4c;
|
||||
}
|
||||
|
||||
.oe_group_details h4 a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.oe_group_details ul {
|
||||
margin: 3px 0 5px;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
.oe_group_details li {
|
||||
.openerp .oe_group_details li {
|
||||
margin: 2px 0;
|
||||
}
|
||||
|
||||
.openerp .oe_group_button {
|
||||
padding-top: 7px;
|
||||
}
|
||||
|
||||
.openerp .oe_group_button .oe_group_join {
|
||||
color: white;
|
||||
background-color: #3465A4;
|
||||
background-image: -webkit-linear-gradient(top, #729FCF, #3465A4);
|
||||
background-image: -moz-linear-gradient(top, #729FCF, #3465A4);
|
||||
background-image: -ms-linear-gradient(top, #729FCF, #3465A4);
|
||||
background-image: -o-linear-gradient(top, #729FCF, #3465A4);
|
||||
background-image: linear-gradient(to bottom, #729FCF, #3465A4);
|
||||
}
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 3.1 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 2.4 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 2.2 KiB |
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user