[MERGE]:merged with main addons

bzr revid: ssu@tinyerp.com-20121025101308-4h46y6lgyaxctz2m
This commit is contained in:
Saurang Suthar 2012-10-25 15:43:08 +05:30
commit a0e65cecc8
221 changed files with 2063 additions and 1451 deletions

View File

@ -1007,7 +1007,7 @@ class account_period(osv.osv):
'date_stop': fields.date('End of Period', required=True, states={'done':[('readonly',True)]}),
'fiscalyear_id': fields.many2one('account.fiscalyear', 'Fiscal Year', required=True, states={'done':[('readonly',True)]}, select=True),
'state': fields.selection([('draft','Open'), ('done','Closed')], 'Status', readonly=True,
help='When monthly periods are created. The state is \'Draft\'. At the end of monthly period it is in \'Done\' state.'),
help='When monthly periods are created. The status is \'Draft\'. At the end of monthly period it is in \'Done\' status.'),
'company_id': fields.related('fiscalyear_id', 'company_id', type='many2one', relation='res.company', string='Company', store=True, readonly=True)
}
_defaults = {
@ -1134,7 +1134,7 @@ class account_journal_period(osv.osv):
'icon': fields.function(_icon_get, string='Icon', type='char', size=32),
'active': fields.boolean('Active', required=True, help="If the active field is set to False, it will allow you to hide the journal period without removing it."),
'state': fields.selection([('draft','Draft'), ('printed','Printed'), ('done','Done')], 'Status', required=True, readonly=True,
help='When journal period is created. The state is \'Draft\'. If a report is printed it comes to \'Printed\' state. When all transactions are done, it comes in \'Done\' state.'),
help='When journal period is created. The status is \'Draft\'. If a report is printed it comes to \'Printed\' status. When all transactions are done, it comes in \'Done\' status.'),
'fiscalyear_id': fields.related('period_id', 'fiscalyear_id', string='Fiscal Year', type='many2one', relation='account.fiscalyear'),
'company_id': fields.related('journal_id', 'company_id', type='many2one', relation='res.company', string='Company', store=True, readonly=True)
}
@ -1282,7 +1282,7 @@ class account_move(osv.osv):
'period_id': fields.many2one('account.period', 'Period', required=True, states={'posted':[('readonly',True)]}),
'journal_id': fields.many2one('account.journal', 'Journal', required=True, states={'posted':[('readonly',True)]}),
'state': fields.selection([('draft','Unposted'), ('posted','Posted')], 'Status', required=True, readonly=True,
help='All manually created new journal entries are usually in the state \'Unposted\', but you can set the option to skip that state on the related journal. In that case, they will behave as journal entries automatically created by the system on document validation (invoices, bank statements...) and will be created in \'Posted\' state.'),
help='All manually created new journal entries are usually in the status \'Unposted\', but you can set the option to skip that status on the related journal. In that case, they will behave as journal entries automatically created by the system on document validation (invoices, bank statements...) and will be created in \'Posted\' status.'),
'line_id': fields.one2many('account.move.line', 'move_id', 'Entries', states={'posted':[('readonly',True)]}),
'to_check': fields.boolean('To Review', help='Check this box if you are unsure of that journal entry and if you want to note it as \'to be reviewed\' by an accounting expert.'),
'partner_id': fields.related('line_id', 'partner_id', type="many2one", relation="res.partner", string="Partner", store=True),
@ -1431,6 +1431,9 @@ class account_move(osv.osv):
if 'line_id' in vals:
c = context.copy()
c['novalidate'] = True
c['period_id'] = vals['period_id']
c['journal_id'] = vals['journal_id']
c['date'] = vals['date']
result = super(account_move, self).create(cr, uid, vals, c)
self.validate(cr, uid, [result], context)
else:

View File

@ -123,8 +123,8 @@ class account_bank_statement(osv.osv):
('open','Open'), # used by cash statements
('confirm', 'Closed')],
'Status', required=True, readonly="1",
help='When new statement is created the state will be \'Draft\'.\n'
'And after getting confirmation from the bank it will be in \'Confirmed\' state.'),
help='When new statement is created the status will be \'Draft\'.\n'
'And after getting confirmation from the bank it will be in \'Confirmed\' status.'),
'currency': fields.function(_currency, string='Currency',
type='many2one', relation='res.currency'),
'account_id': fields.related('journal_id', 'default_debit_account_id', type='many2one', relation='account.account', string='Account used in this journal', readonly=True, help='used in statement reconciliation domain, but shouldn\'t be used elswhere.'),

View File

@ -185,6 +185,7 @@ class account_invoice(osv.osv):
_columns = {
'name': fields.char('Description', size=64, select=True, readonly=True, states={'draft':[('readonly',False)]}),
'origin': fields.char('Source Document', size=64, help="Reference of the document that produced this invoice.", readonly=True, states={'draft':[('readonly',False)]}),
'supplier_invoice_number': fields.char('Supplier Invoice Number', size=64, help="The reference of this invoice as provided by the supplier.", readonly=True, states={'draft':[('readonly',False)]}),
'type': fields.selection([
('out_invoice','Customer Invoice'),
('in_invoice','Supplier Invoice'),
@ -206,12 +207,12 @@ class account_invoice(osv.osv):
('open','Open'),
('paid','Paid'),
('cancel','Cancelled'),
],'State', select=True, readonly=True,
help=' * The \'Draft\' state is used when a user is encoding a new and unconfirmed Invoice. \
\n* The \'Pro-forma\' when invoice is in Pro-forma state,invoice does not have an invoice number. \
\n* The \'Open\' state is used when user create invoice,a invoice number is generated.Its in open state till user does not pay invoice. \
\n* The \'Paid\' state is set automatically when the invoice is paid. Its related journal entries may or may not be reconciled. \
\n* The \'Cancelled\' state is used when user cancel invoice.'),
],'Status', select=True, readonly=True,
help=' * The \'Draft\' status is used when a user is encoding a new and unconfirmed Invoice. \
\n* The \'Pro-forma\' when invoice is in Pro-forma status,invoice does not have an invoice number. \
\n* The \'Open\' status is used when user create invoice,a invoice number is generated.Its in open status till user does not pay invoice. \
\n* The \'Paid\' status is set automatically when the invoice is paid. Its related journal entries may or may not be reconciled. \
\n* The \'Cancelled\' status is used when user cancel invoice.'),
'sent': fields.boolean('Sent', readonly=True, help="It indicates that the invoice has been sent."),
'date_invoice': fields.date('Invoice Date', readonly=True, states={'draft':[('readonly',False)]}, select=True, help="Keep empty to use the current date"),
'date_due': fields.date('Due Date', readonly=True, states={'draft':[('readonly',False)]}, select=True,
@ -1359,7 +1360,7 @@ class account_invoice_line(osv.osv):
_description = "Invoice Line"
_columns = {
'name': fields.text('Description', required=True),
'origin': fields.char('Source', size=256, help="Reference of the document that produced this invoice."),
'origin': fields.char('Source Document', size=256, help="Reference of the document that produced this invoice."),
'sequence': fields.integer('Sequence', help="Gives the sequence of this line when displaying the invoice."),
'invoice_id': fields.many2one('account.invoice', 'Invoice Reference', ondelete='cascade', select=True),
'uos_id': fields.many2one('product.uom', 'Unit of Measure', ondelete='set null'),

View File

@ -143,13 +143,11 @@
<field name="arch" type="xml">
<form string="Supplier Invoice" version="7.0">
<header>
<span groups="base.group_user">
<button name="invoice_open" states="draft,proforma2" string="Validate" class="oe_highlight"/>
<button name="%(action_account_invoice_refund)d" type='action' string='Ask Refund' states='open,paid' />
<button name="invoice_open" states="draft,proforma2" string="Validate" class="oe_highlight" groups="account.group_account_invoice"/>
<button name="%(action_account_invoice_refund)d" type='action' string='Ask Refund' states='open,paid' groups="account.group_account_invoice"/>
<button name="invoice_cancel" states="draft,proforma2,sale,open" string="Cancel" groups="base.group_no_one"/>
<button name="action_cancel_draft" states="cancel" string="Set to Draft" type="object"/>
<button name="action_cancel_draft" states="cancel" string="Set to Draft" type="object" groups="account.group_account_invoice"/>
<button name='%(action_account_state_open)d' type='action' string='Re-Open' groups="account.group_account_invoice" attrs="{'invisible':['|', ('state','&lt;&gt;','paid'), ('reconciled', '=', True)]}" help="This button only appears when the state of the invoice is 'paid' (showing that it has been fully reconciled) and auto-computed boolean 'reconciled' is False (depicting that it's not the case anymore). In other words, the invoice has been dereconciled and it does not fit anymore the 'paid' state. You should press this button to re-open it and let it continue its normal process after having resolved the eventual exceptions it may have created."/>
</span>
<field name="state" widget="statusbar" statusbar_visible="draft,open,paid" statusbar_colors='{"proforma":"blue","proforma2":"blue"}'/>
</header>
<sheet string="Supplier Invoice">
@ -170,12 +168,15 @@
context="{'default_customer': 0, 'search_default_supplier': 1, 'default_supplier': 1}"
domain="[('supplier', '=', True)]"/>
<field name="fiscal_position" widget="selection"/>
<field name="origin"/>
<label for="reference_type"/>
<div>
<group>
<field name="origin"/>
<field name="supplier_invoice_number"/>
</group>
<label for="reference_type"/>
<div>
<field name="reference_type" class="oe_inline oe_edit_only"/>
<field name="reference" class="oe_inline"/>
</div>
</div>
</group>
<group>
<field name="date_invoice"/>
@ -291,20 +292,18 @@
<field name="arch" type="xml">
<form string="Invoice" version="7.0">
<header>
<span groups="base.group_user">
<button name="action_invoice_sent" type="object" string="Send by Email" attrs="{'invisible':['|',('sent','=',True), ('state', '!=', 'open')]}" class="oe_highlight"/>
<button name="invoice_print" string="Print Invoice" type="object" attrs="{'invisible':['|',('sent','=',True), ('state', '!=', 'open')]}" class="oe_highlight"/>
<button name="action_invoice_sent" type="object" string="Send by Email" attrs="{'invisible':['|',('sent','=',False), ('state', '!=', 'open')]}"/>
<button name="invoice_print" string="Print Invoice" type="object" attrs="{'invisible':['|',('sent','=',False), ('state', '!=', 'open')]}"/>
<button name="invoice_open" states="draft" string="Validate" class="oe_highlight"/>
<button name="invoice_open" states="proforma2" string="Validate"/>
<button name="invoice_proforma2" states="draft" string="PRO-FORMA" groups="account.group_proforma_invoices"/>
<button name="%(action_account_invoice_refund)d" type='action' string='Refund Invoice' states='open,proforma2,paid'/>
<button name="invoice_cancel" states="draft,proforma2,open" string="Cancel" groups="base.group_no_one"/>
<button name="action_cancel_draft" states="cancel" string="Reset to Draft" type="object"/>
<button name='%(action_account_state_open)d' type='action' string='Re-Open' groups="account.group_account_invoice" attrs="{'invisible':['|', ('state','&lt;&gt;','paid'), ('reconciled', '=', True)]}" help="This button only appears when the state of the invoice is 'paid' (showing that it has been fully reconciled) and auto-computed boolean 'reconciled' is False (depicting that it's not the case anymore). In other words, the invoice has been dereconciled and it does not fit anymore the 'paid' state. You should press this button to re-open it and let it continue its normal process after having resolved the eventual exceptions it may have created."/>
<!--button name="%(account_invoices)d" string="Print Invoice" type="action" states="open,paid,proforma,sale,proforma2"/-->
</span>
<button name="action_invoice_sent" type="object" string="Send by Email" attrs="{'invisible':['|',('sent','=',True), ('state', '!=', 'open')]}" class="oe_highlight" groups="base.group_user"/>
<button name="invoice_print" string="Print Invoice" type="object" attrs="{'invisible':['|',('sent','=',True), ('state', '!=', 'open')]}" class="oe_highlight" groups="base.group_user"/>
<button name="action_invoice_sent" type="object" string="Send by Email" attrs="{'invisible':['|',('sent','=',False), ('state', '!=', 'open')]}" groups="base.group_user"/>
<button name="invoice_print" string="Print Invoice" type="object" attrs="{'invisible':['|',('sent','=',False), ('state', '!=', 'open')]}" groups="base.group_user"/>
<button name="invoice_open" states="draft" string="Validate" class="oe_highlight" groups="base.group_user"/>
<button name="invoice_open" states="proforma2" string="Validate" groups="base.group_user"/>
<button name="invoice_proforma2" states="draft" string="PRO-FORMA" groups="account.group_proforma_invoices"/>
<button name="%(action_account_invoice_refund)d" type='action' string='Refund Invoice' states='open,proforma2,paid' groups="base.group_user"/>
<button name="invoice_cancel" states="draft,proforma2,open" string="Cancel" groups="base.group_no_one"/>
<button name="action_cancel_draft" states="cancel" string="Reset to Draft" type="object" groups="base.group_user"/>
<button name='%(action_account_state_open)d' type='action' string='Re-Open' groups="account.group_account_invoice" attrs="{'invisible':['|', ('state','&lt;&gt;','paid'), ('reconciled', '=', True)]}" help="This button only appears when the state of the invoice is 'paid' (showing that it has been fully reconciled) and auto-computed boolean 'reconciled' is False (depicting that it's not the case anymore). In other words, the invoice has been dereconciled and it does not fit anymore the 'paid' state. You should press this button to re-open it and let it continue its normal process after having resolved the eventual exceptions it may have created."/>
<!--button name="%(account_invoices)d" string="Print Invoice" type="action" states="open,paid,proforma,sale,proforma2"/-->
<field name="state" widget="statusbar" nolabel="1" statusbar_visible="draft,open,paid" statusbar_colors='{"proforma":"blue","proforma2":"blue"}'/>
</header>
<sheet string="Invoice">
@ -449,7 +448,7 @@
<field name="model">account.invoice</field>
<field name="arch" type="xml">
<search string="Search Invoice">
<field name="number" string="Invoice" filter_domain="['|', ('number','ilike',self),('origin','ilike',self)]"/>
<field name="number" string="Invoice" filter_domain="['|','|', ('number','ilike',self), ('origin','ilike',self), ('supplier_invoice_number', 'ilike', self)]"/>
<filter name="draft" icon="terp-document-new" string="Draft" domain="[('state','=','draft')]" help="Draft Invoices"/>
<filter name="proforma" icon="terp-gtk-media-pause" string="Proforma" domain="[('state','=','proforma2')]" help="Proforma Invoices" groups="account.group_proforma_invoices"/>
<filter name="invoices" icon="terp-dolar" string="Invoices" domain="[('state','not in',['draft','cancel'])]" help="Proforma/Open/Paid Invoices"/>

View File

@ -1234,16 +1234,16 @@ class account_move_line(osv.osv):
vals['company_id'] = company_id[0]
if ('account_id' in vals) and not account_obj.read(cr, uid, vals['account_id'], ['active'])['active']:
raise osv.except_osv(_('Bad Account!'), _('You cannot use an inactive account.'))
if 'journal_id' in vals:
if 'journal_id' in vals and vals['journal_id']:
context['journal_id'] = vals['journal_id']
if 'period_id' in vals:
if 'period_id' in vals and vals['period_id']:
context['period_id'] = vals['period_id']
if ('journal_id' not in context) and ('move_id' in vals) and vals['move_id']:
m = move_obj.browse(cr, uid, vals['move_id'])
context['journal_id'] = m.journal_id.id
context['period_id'] = m.period_id.id
#we need to treat the case where a value is given in the context for period_id as a string
if 'period_id' not in context or not isinstance(context.get('period_id', ''), (int, long)):
if 'period_id' in context and not isinstance(context.get('period_id', ''), (int, long)):
period_candidate_ids = self.pool.get('account.period').name_search(cr, uid, name=context.get('period_id',''))
if len(period_candidate_ids) != 1:
raise osv.except_osv(_('Error!'), _('No period found or more than one period found for the given date.'))
@ -1253,6 +1253,9 @@ class account_move_line(osv.osv):
self._update_journal_check(cr, uid, context['journal_id'], context['period_id'], context)
move_id = vals.get('move_id', False)
journal = journal_obj.browse(cr, uid, context['journal_id'], context=context)
vals['journal_id'] = vals.get('journal_id') or context.get('journal_id')
vals['period_id'] = vals.get('period_id') or context.get('period_id')
vals['date'] = vals.get('date') or context.get('date')
if not move_id:
if journal.centralisation:
#Check for centralisation

View File

@ -1862,7 +1862,7 @@
<field name="model_id"/>
<group expand="0" string="Group By...">
<filter string="Model" icon="terp-folder-orange" domain="[]" context="{'group_by':'model_id'}"/>
<filter string="State" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
<filter string="Status" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
</group>
</search>
</field>
@ -2414,32 +2414,6 @@
<field name="view_mode">form</field>
<field name="target">new</field>
</record>
<record id="ir_actions_server_action_wizard_multi_chart" model="ir.actions.server">
<field name="type">ir.actions.server</field>
<field name="condition">True</field>
<field name="state">code</field>
<field name="model_id" ref="base.model_ir_actions_todo"/>
<field eval="5" name="sequence"/>
<field name="code">
# check for unconfigured companies
account_installer_obj = self.pool.get('account.installer')
account_installer_obj.check_unconfigured_cmp(cr, uid, context=context)
action_ids = []
# fetch the act_window actions related to chart of account configuration
# we use ir.actions.todo to enable the possibility for other modules to insert their own
# wizards during the configuration process
ref = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'account', 'action_wizard_multi_chart')
if ref:
action_ids += [ref[1]]
ref = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'account', 'action_account_configuration_installer')
if ref:
action_ids += [ref[1]]
todo_ids = pool.get('ir.actions.todo').search(cr, uid, [('action_id', 'in', action_ids)], context=context)
pool.get('ir.actions.todo').write(cr, uid, todo_ids, {'state':'open'}, context=context)
action = pool.get('res.config').next(cr, uid, [], context)
</field>
<field name="name">New Company Financial Setting</field>
</record>
<record id="account_account_graph" model="ir.ui.view">
<field name="name">account.account.graph</field>

View File

@ -119,15 +119,6 @@ class account_installer(osv.osv_memory):
self.execute_simple(cr, uid, ids, context)
super(account_installer, self).execute(cr, uid, ids, context=context)
def action_next(self, cr, uid, ids, context=None):
next = self.execute(cr, uid, ids, context=context)
for installer in self.browse(cr, uid, ids, context=context):
if installer.charts == 'l10n_be':
return {'type': 'ir.actions.act_window_close'}
else :
if next : return next
return self.next(cr, uid, ids, context=context)
def execute_simple(self, cr, uid, ids, context=None):
if context is None:
context = {}

View File

@ -91,7 +91,7 @@ class account_invoice_report(osv.osv):
('open','Open'),
('paid','Done'),
('cancel','Cancelled')
], 'Invoice State', readonly=True),
], 'Invoice Status', readonly=True),
'date_due': fields.date('Due Date', readonly=True),
'account_id': fields.many2one('account.account', 'Account',readonly=True),
'account_line_id': fields.many2one('account.account', 'Account Line',readonly=True),

View File

@ -129,7 +129,7 @@
</td>
<td>
<para style="terp_default_9">[[ o.title.name or '' ]] [[ o.name ]]</para>
<para style="terp_default_9">[[ display_address(o.partner_id) ]]</para>
<para style="terp_default_9">[[ display_address(o) ]]</para>
<para style="terp_default_9">
<font color="white"> </font>
</para>

View File

@ -11,7 +11,7 @@ openerp.account = function (instance) {
this._super.apply(this, arguments);
var self = this;
this.current_partner = null;
this.do_select.add(function() {
this.on('record_selected', this, function() {
if (self.get_selected_ids().length === 0) {
self.$(".oe_account_recon_reconcile").attr("disabled", "");
} else {
@ -19,7 +19,7 @@ openerp.account = function (instance) {
}
});
},
on_loaded: function() {
load_list: function() {
var self = this;
var tmp = this._super.apply(this, arguments);
if (this.partners) {
@ -102,7 +102,6 @@ openerp.account = function (instance) {
action_id: result[1],
context: additional_context
}).then(function (result) {
result = result.result;
result.context = _.extend(result.context || {}, additional_context);
result.flags = result.flags || {};
result.flags.new_window = true;
@ -121,6 +120,10 @@ openerp.account = function (instance) {
self.do_search(self.last_domain, self.last_context, self.last_group_by);
});
},
do_select: function (ids, records) {
this.trigger('record_selected')
this._super.apply(this, arguments);
},
});
};

View File

@ -11,21 +11,18 @@
-
!record {model: account.move, id: account_move_0}:
date: !eval time.strftime('%Y-%m-%d')
period_id: account.period_6
journal_id: account.bank_journal
line_id:
- account_id: account.cash
amount_currency: 0.0
credit: 2000.0
date: !eval time.strftime('%Y-%m-%d')
debit: 0.0
journal_id: account.bank_journal
name: Basic Computer
partner_id: base.res_partner_12
period_id: account.period_6
ref: '2011010'
tax_amount: 0.0
name: /
period_id: account.period_6
ref: '2011010'
state: draft
-
@ -110,4 +107,4 @@
partial_reconcile = self.trans_rec_reconcile_partial_reconcile(cr, uid, [ref('account_move_line_reconcile0')], {'lang': u'en_US',
'active_model': 'account.move.line', 'active_ids': ids, 'tz': False, 'active_id': ids[0]})
move_line = move_line_obj.browse(cr, uid, ids)
assert move_line[0].reconcile_partial_id, "Partial reconcilation is not done"
assert move_line[0].reconcile_partial_id, "Partial reconcilation is not done"

View File

@ -226,9 +226,9 @@ class account_asset_asset(osv.osv):
'child_ids': fields.one2many('account.asset.asset', 'parent_id', 'Children Assets'),
'purchase_date': fields.date('Purchase Date', required=True, readonly=True, states={'draft':[('readonly',False)]}),
'state': fields.selection([('draft','Draft'),('open','Running'),('close','Close')], 'Status', required=True,
help="When an asset is created, the state is 'Draft'.\n" \
"If the asset is confirmed, the state goes in 'Running' and the depreciation lines can be posted in the accounting.\n" \
"You can manually close an asset when the depreciation is over. If the last line of depreciation is posted, the asset automatically goes in that state."),
help="When an asset is created, the status is 'Draft'.\n" \
"If the asset is confirmed, the status goes in 'Running' and the depreciation lines can be posted in the accounting.\n" \
"You can manually close an asset when the depreciation is over. If the last line of depreciation is posted, the asset automatically goes in that status."),
'active': fields.boolean('Active'),
'partner_id': fields.many2one('res.partner', 'Partner', readonly=True, states={'draft':[('readonly',False)]}),
'method': fields.selection([('linear','Linear'),('degressive','Degressive')], 'Computation Method', required=True, readonly=True, states={'draft':[('readonly',False)]}, help="Choose the method to use to compute the amount of depreciation lines.\n"\

View File

@ -1,38 +1,23 @@
# Spanish translation for openobject-addons
# Copyright (c) 2010 Rosetta Contributors and Canonical Ltd 2010
# Spanish (Mexico) 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>, 2010.
# 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: 2010-11-23 09:43+0000\n"
"Last-Translator: Jordi Esteve (www.zikzakmedia.com) "
"<jesteve@zikzakmedia.com>\n"
"Language-Team: Spanish <es@li.org>\n"
"POT-Creation-Date: 2012-02-08 00:35+0000\n"
"PO-Revision-Date: 2012-10-22 17:44+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Spanish (Mexico) <es_MX@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-09-05 05:48+0000\n"
"X-Generator: Launchpad (build 13830)\n"
"X-Launchpad-Export-Date: 2012-10-23 04:48+0000\n"
"X-Generator: Launchpad (build 16179)\n"
#. module: account_cancel
#: model:ir.module.module,description:account_cancel.module_meta_information
msgid ""
"\n"
" Module adds 'Allow cancelling entries' field on form view of account "
"journal. If set to true it allows user to cancel entries & invoices.\n"
" "
msgstr ""
"\n"
" Este módulo añade el campo 'Permitir la cancelación de asientos' en la "
"vista de formulario de los diarios contables. Si está marcado, permite a los "
"usuarios cancelar los asientos y las facturas.\n"
" "
#. module: account_cancel
#: model:ir.module.module,shortdesc:account_cancel.module_meta_information
msgid "Account Cancel"
msgstr "Cancelar asientos/facturas"
#: view:account.invoice:0
msgid "Cancel"
msgstr "Cancelar"

View File

@ -95,7 +95,7 @@ class payment_order(osv.osv):
('cancel', 'Cancelled'),
('open', 'Confirmed'),
('done', 'Done')], 'Status', select=True,
help='When an order is placed the state is \'Draft\'.\n Once the bank is confirmed the state is set to \'Confirmed\'.\n Then the order is paid the state is \'Done\'.'),
help='When an order is placed the status is \'Draft\'.\n Once the bank is confirmed the status is set to \'Confirmed\'.\n Then the order is paid the status is \'Done\'.'),
'line_ids': fields.one2many('payment.line', 'order_id', 'Payment lines', states={'done': [('readonly', True)]}),
'total': fields.function(_total, string="Total", type='float'),
'user_id': fields.many2one('res.users', 'Responsible', required=True, states={'done': [('readonly', True)]}),

View File

@ -293,10 +293,10 @@ class account_voucher(osv.osv):
('proforma','Pro-forma'),
('posted','Posted')
], 'Status', readonly=True, size=32,
help=' * The \'Draft\' state is used when a user is encoding a new and unconfirmed Voucher. \
\n* The \'Pro-forma\' when voucher is in Pro-forma state,voucher does not have an voucher number. \
\n* The \'Posted\' state is used when user create voucher,a voucher number is generated and voucher entries are created in account \
\n* The \'Cancelled\' state is used when user cancel voucher.'),
help=' * The \'Draft\' status is used when a user is encoding a new and unconfirmed Voucher. \
\n* The \'Pro-forma\' when voucher is in Pro-forma status,voucher does not have an voucher number. \
\n* The \'Posted\' status is used when user create voucher,a voucher number is generated and voucher entries are created in account \
\n* The \'Cancelled\' status is used when user cancel voucher.'),
'amount': fields.float('Total', digits_compute=dp.get_precision('Account'), required=True, readonly=True, states={'draft':[('readonly',False)]}),
'tax_amount':fields.float('Tax Amount', digits_compute=dp.get_precision('Account'), readonly=True, states={'draft':[('readonly',False)]}),
'reference': fields.char('Ref #', size=64, readonly=True, states={'draft':[('readonly',False)]}, help="Transaction reference number."),
@ -1422,7 +1422,7 @@ class account_voucher_line(osv.osv):
}
def onchange_reconcile(self, cr, uid, ids, reconcile, amount, amount_unreconciled, context=None):
vals = { 'amount': 0.0}
vals = {'amount': 0.0}
if reconcile:
vals = { 'amount': amount_unreconciled}
return {'value': vals}

View File

@ -52,7 +52,7 @@ class sale_receipt_report(osv.osv):
('proforma','Pro-forma'),
('posted','Posted'),
('cancel','Cancelled')
], 'Voucher State', readonly=True),
], 'Voucher Status', readonly=True),
'pay_now':fields.selection([
('pay_now','Pay Directly'),
('pay_later','Pay Later or Group Funds'),

View File

@ -53,7 +53,6 @@
account_id: account.cash
amount: 1000.0
company_id: base.main_company
currency_id: base.EUR
journal_id: account.bank_journal
name: Voucher Axelor
narration: PC Assemble SC234

View File

@ -45,7 +45,6 @@
'account_id': ref('account.cash'),
'amount': 450.0,
'company_id': ref('base.main_company'),
'currency_id': ref('base.EUR'),
'journal_id': ref('account.bank_journal'),
'partner_id': ref('base.res_partner_19'),
'period_id': ref('account.period_8'),
@ -53,6 +52,10 @@
}
if not res['value']['line_cr_ids']:
res['value']['line_cr_ids'] = [{'type': 'cr', 'account_id': ref('account.a_recv'),}]
#clients aren't sending value of readonly fields in the view, and there is a good reason for that, so here the
#create should only use values of fields that are not readonly. That's why i'm removing some of these values
del(res['value']['line_cr_ids'][0]['date_original'])
del(res['value']['line_cr_ids'][0]['date_due'])
res['value']['line_cr_ids'][0]['amount'] = 450.0
vals['line_cr_ids'] = [(0,0,i) for i in res['value']['line_cr_ids']]
id = self.create(cr, uid, vals)

View File

@ -53,7 +53,6 @@
'account_id': ref('account.cash'),
'amount': 30000.0,
'company_id': ref('base.main_company'),
'currency_id': ref('base.EUR'),
'journal_id': ref('account.bank_journal'),
'partner_id': ref('base.res_partner_19'),
'period_id': ref('account.period_8'),

View File

@ -255,27 +255,27 @@ class account_analytic_account(osv.osv):
if context is None:
context={}
if context.get('current_model') == 'project.project':
cr.execute("select analytic_account_id from project_project")
project_ids = [x[0] for x in cr.fetchall()]
project_obj = self.pool.get("account.analytic.account")
project_ids = project_obj.search(cr, uid, args)
return self.name_get(cr, uid, project_ids, context=context)
if name:
account = self.search(cr, uid, [('code', '=', name)] + args, limit=limit, context=context)
if not account:
account_ids = self.search(cr, uid, [('code', '=', name)] + args, limit=limit, context=context)
if not account_ids:
names=map(lambda i : i.strip(),name.split('/'))
for i in range(len(names)):
dom=[('name', operator, names[i])]
if i>0:
dom+=[('id','child_of',account)]
account = self.search(cr, uid, dom, limit=limit, context=context)
newacc = account
dom+=[('id','child_of',account_ids)]
account_ids = self.search(cr, uid, dom, limit=limit, context=context)
newacc = account_ids
while newacc:
newacc = self.search(cr, uid, [('parent_id', 'in', newacc)], limit=limit, context=context)
account += newacc
account_ids += newacc
if args:
account = self.search(cr, uid, [('id', 'in', account)] + args, limit=limit, context=context)
account_ids = self.search(cr, uid, [('id', 'in', account_ids)] + args, limit=limit, context=context)
else:
account = self.search(cr, uid, args, limit=limit, context=context)
return self.name_get(cr, uid, account, context=context)
account_ids = self.search(cr, uid, args, limit=limit, context=context)
return self.name_get(cr, uid, account_ids, context=context)
def create(self, cr, uid, vals, context=None):
contract = super(account_analytic_account, self).create(cr, uid, vals, context=context)

View File

@ -32,13 +32,23 @@ import datetime
from osv import fields, osv
from tools.translate import _
from itertools import groupby
from operator import itemgetter
FIELD_STATES = [('clear', 'Clear'), ('anonymized', 'Anonymized'), ('not_existing', 'Not Existing')]
ANONYMIZATION_STATES = FIELD_STATES + [('unstable', 'Unstable')]
WIZARD_ANONYMIZATION_STATES = [('clear', 'Clear'), ('anonymized', 'Anonymized'), ('unstable', 'Unstable')]
ANONYMIZATION_HISTORY_STATE = [('started', 'Started'), ('done', 'Done'), ('in_exception', 'Exception occured')]
ANONYMIZATION_DIRECTION = [('clear -> anonymized', 'clear -> anonymized'), ('anonymized -> clear', 'anonymized -> clear')]
def group(lst, cols):
if isinstance(cols, basestring):
cols = [cols]
return dict((k, [v for v in itr]) for k, itr in groupby(sorted(lst, key=itemgetter(*cols)), itemgetter(*cols)))
class ir_model_fields_anonymization(osv.osv):
_name = 'ir.model.fields.anonymization'
_rec_name = 'field_id'
@ -207,8 +217,6 @@ class ir_model_fields_anonymization(osv.osv):
'state': lambda *a: 'clear',
}
ir_model_fields_anonymization()
class ir_model_fields_anonymization_history(osv.osv):
_name = 'ir.model.fields.anonymization.history'
@ -223,8 +231,6 @@ class ir_model_fields_anonymization_history(osv.osv):
'filepath': fields.char(string='File path', size=256, readonly=True),
}
ir_model_fields_anonymization_history()
class ir_model_fields_anonymize_wizard(osv.osv_memory):
_name = 'ir.model.fields.anonymize.wizard'
@ -250,8 +256,8 @@ class ir_model_fields_anonymize_wizard(osv.osv_memory):
'name': fields.char(size=64, string='File Name'),
'summary': fields.function(_get_summary, type='text', string='Summary'),
'file_export': fields.binary(string='Export'),
'file_import': fields.binary(string='Import'),
'state': fields.function(_get_state, string='Status', type='selection', selection=ANONYMIZATION_STATES, readonly=False),
'file_import': fields.binary(string='Import', help="This is the file created by the anonymization process. It should have the '.pickle' extention."),
'state': fields.function(_get_state, string='Status', type='selection', selection=WIZARD_ANONYMIZATION_STATES, readonly=False),
'msg': fields.text(string='Message'),
}
@ -319,6 +325,7 @@ class ir_model_fields_anonymize_wizard(osv.osv_memory):
# clicked in the menu and the fields are already anonymized
placeholder.addnext(etree.Element('newline'))
placeholder.addnext(etree.Element('field', {'name': 'file_import', 'required': "1"}))
placeholder.addnext(etree.Element('label', {'string': 'Anonymization file'}))
eview.remove(placeholder)
elif step == 'just_anonymized':
# we just ran the anonymization process, we need the file export field
@ -500,7 +507,6 @@ class ir_model_fields_anonymize_wizard(osv.osv_memory):
def reverse_anonymize_database(self, cr, uid, ids, context=None):
"""Set the 'clear' state to defined fields"""
ir_model_fields_anonymization_model = self.pool.get('ir.model.fields.anonymization')
anonymization_history_model = self.pool.get('ir.model.fields.anonymization.history')
@ -524,23 +530,46 @@ class ir_model_fields_anonymize_wizard(osv.osv_memory):
wizards = self.browse(cr, uid, ids, context=context)
for wizard in wizards:
if not wizard.file_import:
msg = "It is not possible to reverse the anonymization process without supplying anonymization export file."
msg = "It is not possible to reverse the anonymization process without supplying the anonymization export file."
self._raise_after_history_update(cr, uid, history_id, 'Error !', msg)
# reverse the anonymization:
# load the pickle file content into a data structure:
data = pickle.loads(base64.decodestring(wizard.file_import))
migration_fix_obj = self.pool.get('ir.model.fields.anonymization.migration.fix')
fix_ids = migration_fix_obj.search(cr, uid, [('target_version', '=', '7.0')])
fixes = migration_fix_obj.read(cr, uid, fix_ids, ['model_name', 'field_name', 'query', 'query_type', 'sequence'])
fixes = group(fixes, ('model_name', 'field_name'))
for line in data:
table_name = self.pool.get(line['model_id'])._table
sql = "update %(table)s set %(field)s = %%(value)s where id = %%(id)s" % {
'table': table_name,
'field': line['field_id'],
}
cr.execute(sql, {
'value': line['value'],
'id': line['id']
})
# check if custom sql exists:
key = (line['model_id'], line['field_id'])
custom_updates = fixes.get(key)
if custom_updates:
custom_updates.sort(itemgetter('sequence'))
queries = [(record['query'], record['query_type']) for record in custom_updates if record['query_type']]
else:
queries = [("update %(table)s set %(field)s = %%(value)s where id = %%(id)s" % {
'table': table_name,
'field': line['field_id'],
}, 'sql')]
for query in queries:
if query[1] == 'sql':
sql = query[0]
cr.execute(sql, {
'value': line['value'],
'id': line['id']
})
elif query[1] == 'python':
raw_code = query[0]
code = raw_code % line
eval(code)
else:
raise Exception("Unknown query type '%s'. Valid types are: sql, python." % (query['query_type'], ))
# update the anonymization fields:
ir_model_fields_anonymization_model = self.pool.get('ir.model.fields.anonymization')
@ -589,7 +618,19 @@ class ir_model_fields_anonymize_wizard(osv.osv_memory):
res = None
return res
ir_model_fields_anonymize_wizard()
class ir_model_fields_anonymization_migration_fix(osv.osv):
_name = 'ir.model.fields.anonymization.migration.fix'
_order = "sequence"
_columns = {
'target_version': fields.char('Target Version'),
'model_name': fields.char('Model'),
'field_name': fields.char('Field'),
'query': fields.text('Query'),
'query_type': fields.selection(string='Query', selection=[('sql', 'sql'), ('python', 'python')]),
'sequence': fields.integer('Sequence'),
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -14,7 +14,6 @@
<field name="model_id" on_change="onchange_model_id(model_id)" />
<field name="model_name" on_change="onchange_model_name(model_name)" />
<field name="field_id"
on_change="onchange_field_id(field_id, model_name)"
domain="[('model_id','=',model_id), ('ttype', 'not in', ['function', 'binary', 'many2many', 'many2one', 'one2many', 'reference'])]" />
<field name="field_name" on_change="onchange_field_name(field_name, model_name)" />

View File

@ -14,8 +14,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-10-22 04:40+0000\n"
"X-Generator: Launchpad (build 16165)\n"
"X-Launchpad-Export-Date: 2012-10-23 04:48+0000\n"
"X-Generator: Launchpad (build 16179)\n"
#. module: anonymization
#: model:ir.model,name:anonymization.model_ir_model_fields_anonymize_wizard

View File

@ -138,7 +138,7 @@ class res_users(osv.Model):
for user in self.browse(cr, uid, ids, context))
_columns = {
'state': fields.function(_get_state, string='State', type='selection',
'state': fields.function(_get_state, string='Status', type='selection',
selection=[('new', 'New'), ('active', 'Active'), ('reset', 'Resetting Password')]),
}

View File

@ -19,15 +19,16 @@
#
##############################################################################
from osv import fields, osv, orm
from tools.translate import _
from datetime import datetime
from datetime import timedelta
import re
import time
from osv import fields, osv, orm
from tools.translate import _
from tools.safe_eval import safe_eval
from tools import ustr
import pooler
import re
import time
import tools
@ -48,32 +49,21 @@ class base_action_rule(osv.osv):
_description = 'Action Rules'
def _state_get(self, cr, uid, context=None):
""" Get State
@param self: The object pointer
@param cr: the current row, from the database cursor,
@param uid: the current users ID for security checks,
@param context: A standard dictionary for contextual values """
""" Get State """
return self.state_get(cr, uid, context=context)
def state_get(self, cr, uid, context=None):
""" Get State
@param self: The object pointer
@param cr: the current row, from the database cursor,
@param uid: the current users ID for security checks,
@param context: A standard dictionary for contextual values """
""" Get State """
return [('', '')]
def priority_get(self, cr, uid, context=None):
""" Get Priority
@param self: The object pointer
@param cr: the current row, from the database cursor,
@param uid: the current users ID for security checks,
@param context: A standard dictionary for contextual values """
""" Get Priority """
return [('', '')]
_columns = {
'name': fields.char('Rule Name', size=64, required=True),
'model_id': fields.many2one('ir.model', 'Object', required=True),
'model_id': fields.many2one('ir.model', 'Related Document Model', required=True, domain=[('osv_memory','=', False)]),
'model': fields.related('model_id', 'model', type="char", size=256, string='Model'),
'create_date': fields.datetime('Create Date', readonly=1),
'active': fields.boolean('Active', help="If the active field is set to False,\
it will allow you to hide the rule without removing it."),
@ -82,6 +72,7 @@ when displaying a list of rules."),
'trg_date_type': fields.selection([
('none', 'None'),
('create', 'Creation Date'),
('write', 'Last Modified Date'),
('action_last', 'Last Action Date'),
('date', 'Date'),
('deadline', 'Deadline'),
@ -98,78 +89,39 @@ trigger date, like sending a reminder 15 minutes before a meeting."),
'trg_state_from': fields.selection(_state_get, 'Status', size=16),
'trg_state_to': fields.selection(_state_get, 'Button Pressed', size=16),
'act_method': fields.char('Call Object Method', size=64),
'act_user_id': fields.many2one('res.users', 'Set Responsible to'),
'act_state': fields.selection(_state_get, 'Set State to', size=16),
'act_email_cc': fields.char('Add Watchers (Cc)', size=250, help="\
These people will receive a copy of the future communication between partner \
and users by email"),
'act_remind_partner': fields.boolean('Remind Partner', help="Check \
this if you want the rule to send a reminder by email to the partner."),
'act_remind_user': fields.boolean('Remind Responsible', help="Check \
this if you want the rule to send a reminder by email to the user."),
'act_reply_to': fields.char('Reply-To', size=64),
'act_remind_attach': fields.boolean('Remind with Attachment', help="Check this if you want that all documents attached to the object be attached to the reminder email sent."),
'act_mail_to_user': fields.boolean('Mail to Responsible', help="Check\
this if you want the rule to send an email to the responsible person."),
'act_mail_to_watchers': fields.boolean('Mail to Watchers (CC)',
help="Check this if you want \
the rule to mark CC(mail to any other person defined in actions)."),
'act_mail_to_email': fields.char('Mail to these Emails', size=128, \
help="Email-id of the persons whom mail is to be sent"),
'act_mail_body': fields.text('Mail body', help="Content of mail"),
'act_followers': fields.many2many("res.partner", string="Set Followers"),
'regex_name': fields.char('Regex on Resource Name', size=128, help="Regular expression for matching name of the resource\
\ne.g.: 'urgent.*' will search for records having name starting with the string 'urgent'\
\nNote: This is case sensitive search."),
'server_action_id': fields.many2one('ir.actions.server', 'Server Action', help="Describes the action name.\neg:on which object which action to be taken on basis of which condition"),
'filter_id':fields.many2one('ir.filters', 'Filter', required=False),
'act_email_from' : fields.char('Email From', size=64, required=False,
help="Use a python expression to specify the right field on which one than we will use for the 'From' field of the header"),
'act_email_to' : fields.char('Email To', size=64, required=False,
help="Use a python expression to specify the right field on which one than we will use for the 'To' field of the header"),
'server_action_ids': fields.one2many('ir.actions.server', 'action_rule_id', 'Server Action', help="Define Server actions.\neg:Email Reminders, Call Object Service, etc.."), #TODO: set domain [('model_id','=',model_id)]
'filter_id':fields.many2one('ir.filters', 'Filter', required=False), #TODO: set domain [('model_id','=',model_id.model)]
'last_run': fields.datetime('Last Run', readonly=1),
}
_defaults = {
'active': lambda *a: True,
'trg_date_type': lambda *a: 'none',
'trg_date_range_type': lambda *a: 'day',
'act_mail_to_user': lambda *a: 0,
'act_remind_partner': lambda *a: 0,
'act_remind_user': lambda *a: 0,
'act_mail_to_watchers': lambda *a: 0,
'active': True,
'trg_date_type': 'none',
'trg_date_range_type': 'day',
}
_order = 'sequence'
def onchange_model_id(self, cr, uid, ids, name):
#This is not a good solution as it will affect the domain only on onchange
res = {'domain':{'filter_id':[]}}
if name:
model_name = self.pool.get('ir.model').read(cr, uid, [name], ['model'])
if model_name:
mod_name = model_name[0]['model']
res['domain'] = {'filter_id': [('model_id','=',mod_name)]}
else:
res['value'] = {'filter_id':False}
return res
def post_action(self, cr, uid, ids, model, context=None):
# Searching for action rules
cr.execute("SELECT model.model, rule.id FROM base_action_rule rule \
LEFT JOIN ir_model model on (model.id = rule.model_id) \
WHERE active")
WHERE active and model = %s", (model,))
res = cr.fetchall()
# Check if any rule matching with current object
for obj_name, rule_id in res:
if not (model == obj_name):
continue # TODO add this condition in the WHERE clause above.
else:
obj = self.pool.get(obj_name)
# If the rule doesn't involve a time condition, run it immediately
# Otherwise we let the scheduler run the action
if self.browse(cr, uid, rule_id, context=context).trg_date_type == 'none':
self._action(cr, uid, [rule_id], obj.browse(cr, uid, ids, context=context), context=context)
obj = self.pool.get(obj_name)
# If the rule doesn't involve a time condition, run it immediately
# Otherwise we let the scheduler run the action
if self.browse(cr, uid, rule_id, context=context).trg_date_type == 'none':
self._action(cr, uid, [rule_id], obj.browse(cr, uid, ids, context=context), context=context)
return True
def _create(self, old_create, model, context=None):
@ -232,24 +184,30 @@ the rule to mark CC(mail to any other person defined in actions)."),
"""
This Function is call by scheduler.
"""
rule_pool = self.pool.get('base.action.rule')
rule_ids = rule_pool.search(cr, uid, [], context=context)
rule_ids = self.search(cr, uid, [], context=context)
self._register_hook(cr, uid, rule_ids, context=context)
rules = self.browse(cr, uid, rule_ids, context=context)
for rule in rules:
if context is None:
context = {}
for rule in self.browse(cr, uid, rule_ids, context=context):
model = rule.model_id.model
model_pool = self.pool.get(model)
last_run = False
if rule.last_run:
last_run = get_datetime(rule.last_run)
now = datetime.now()
for obj_id in model_pool.search(cr, uid, [], context=context):
obj = model_pool.browse(cr, uid, obj_id, context=context)
ctx = dict(context)
if rule.filter_id and rule.model_id.model == rule.filter_id.model_id:
ctx.update(eval(rule.filter_id.context))
obj_ids = model_pool.search(cr, uid, eval(rule.filter_id.domain), context=ctx)
else:
obj_ids = model_pool.search(cr, uid, [], context=ctx)
for obj in model_pool.browse(cr, uid, obj_ids, context=ctx):
# Calculate when this action should next occur for this object
base = False
if rule.trg_date_type=='create' and hasattr(obj, 'create_date'):
base = obj.create_date
elif rule.trg_date_type=='write' and hasattr(obj, 'write_date'):
base = obj.write_date
elif (rule.trg_date_type=='action_last'
and hasattr(obj, 'create_date')):
if hasattr(obj, 'date_action_last') and obj.date_action_last:
@ -275,73 +233,25 @@ the rule to mark CC(mail to any other person defined in actions)."),
delay = fnct[rule.trg_date_range_type](rule.trg_date_range)
action_date = base + delay
if (not last_run or (last_run <= action_date < now)):
self._action(cr, uid, [rule.id], [obj], context=context)
rule_pool.write(cr, uid, [rule.id], {'last_run': now},
context=context)
def format_body(self, body):
""" Foramat Action rule's body
@param self: The object pointer """
return body and tools.ustr(body) or ''
def format_mail(self, obj, body):
data = {
'object_id': obj.id,
'object_subject': hasattr(obj, 'name') and obj.name or False,
'object_date': hasattr(obj, 'date') and obj.date or False,
'object_description': hasattr(obj, 'description') and obj.description or False,
'object_user': hasattr(obj, 'user_id') and (obj.user_id and obj.user_id.name) or '/',
'object_user_email': hasattr(obj, 'user_id') and (obj.user_id and \
obj.user_id.email) or '/',
'object_user_phone': hasattr(obj, 'partner_address_id') and (obj.partner_address_id and \
obj.partner_address_id.phone) or '/',
'partner': hasattr(obj, 'partner_id') and (obj.partner_id and obj.partner_id.name) or '/',
'partner_email': hasattr(obj, 'partner_address_id') and (obj.partner_address_id and\
obj.partner_address_id.email) or '/',
}
return self.format_body(body % data)
def email_send(self, cr, uid, obj, emails, body, emailfrom=None, context=None):
if not emailfrom:
emailfrom = tools.config.get('email_from')
body = self.format_mail(obj, body)
if not emailfrom and hasattr(obj, 'user_id') and obj.user_id and obj.user_id.email:
emailfrom = obj.user_id.email
emailfrom = tools.ustr(emailfrom)
reply_to = emailfrom
if not emailfrom:
raise osv.except_osv(_('Error!'),
_("Missing default email address or missing email on responsible user"))
return self.pool.get('mail.mail').create(cr, uid,
{ 'email_from': emailfrom,
'email_to': emails.join(','),
'reply_to': reply_to,
'state': 'outgoing',
'subject': '[%d] %s' % (obj.id, tools.ustr(obj.name)),
'body_html': '<pre>%s</pre>' % body,
'res_id': obj.id,
'model': obj._table_name,
'auto_delete': True
}, context=context)
try:
self._action(cr, uid, [rule.id], obj, context=ctx)
self.write(cr, uid, [rule.id], {'last_run': now}, context=context)
except Exception, e:
import traceback
print traceback.format_exc()
def do_check(self, cr, uid, action, obj, context=None):
""" check Action
@param self: The object pointer
@param cr: the current row, from the database cursor,
@param uid: the current users ID for security checks,
@param context: A standard dictionary for contextual values """
""" check Action """
if context is None:
context = {}
ok = True
if action.filter_id:
if action.model_id.model == action.filter_id.model_id:
context.update(eval(action.filter_id.context))
obj_ids = obj._table.search(cr, uid, eval(action.filter_id.domain), context=context)
if not obj.id in obj_ids:
ok = False
else:
ok = False
if action.filter_id and action.model_id.model == action.filter_id.model_id:
ctx = dict(context)
ctx.update(eval(action.filter_id.context))
obj_ids = self.pool.get(action.model_id.model).search(cr, uid, eval(action.filter_id.domain), context=ctx)
ok = ok and obj.id in obj_ids
if getattr(obj, 'user_id', False):
ok = ok and (not action.trg_user_id.id or action.trg_user_id.id==obj.user_id.id)
if getattr(obj, 'partner_id', False):
@ -372,120 +282,62 @@ the rule to mark CC(mail to any other person defined in actions)."),
ok = ok and regex_n
return ok
def do_action(self, cr, uid, action, model_obj, obj, context=None):
""" Do Action
@param self: The object pointer
@param cr: the current row, from the database cursor,
@param uid: the current users ID for security checks,
@param action: pass action
@param model_obj: pass Model object
@param context: A standard dictionary for contextual values """
def do_action(self, cr, uid, action, obj, context=None):
""" Do Action """
if context is None:
context = {}
ctx = dict(context)
model_obj = self.pool.get(action.model_id.model)
action_server_obj = self.pool.get('ir.actions.server')
if action.server_action_ids:
ctx.update({'active_model': action.model_id.model, 'active_id':obj.id, 'active_ids':[obj.id]})
action_server_obj.run(cr, uid, [x.id for x in action.server_action_ids], context=ctx)
if action.server_action_id:
context.update({'active_id':obj.id, 'active_ids':[obj.id]})
self.pool.get('ir.actions.server').run(cr, uid, [action.server_action_id.id], context)
write = {}
if hasattr(obj, 'user_id') and action.act_user_id:
obj.user_id = action.act_user_id
write['user_id'] = action.act_user_id.id
if hasattr(obj, 'date_action_last'):
write['date_action_last'] = time.strftime('%Y-%m-%d %H:%M:%S')
if hasattr(obj, 'state') and action.act_state:
obj.state = action.act_state
write['state'] = action.act_state
if hasattr(obj, 'categ_id') and action.act_categ_id:
obj.categ_id = action.act_categ_id
write['categ_id'] = action.act_categ_id.id
model_obj.write(cr, uid, [obj.id], write, context)
if hasattr(model_obj, 'remind_user') and action.act_remind_user:
model_obj.remind_user(cr, uid, [obj.id], context, attach=action.act_remind_attach)
if hasattr(model_obj, 'remind_partner') and action.act_remind_partner:
model_obj.remind_partner(cr, uid, [obj.id], context, attach=action.act_remind_attach)
if action.act_method:
getattr(model_obj, 'act_method')(cr, uid, [obj.id], action, context)
emails = []
if hasattr(obj, 'user_id') and action.act_mail_to_user:
if obj.user_id:
emails.append(obj.user_id.email)
if action.act_mail_to_watchers:
emails += (action.act_email_cc or '').split(',')
if action.act_mail_to_email:
emails += (action.act_mail_to_email or '').split(',')
locals_for_emails = {
'user' : self.pool.get('res.users').browse(cr, uid, uid, context=context),
'obj' : obj,
}
if action.act_email_to:
emails.append(safe_eval(action.act_email_to, {}, locals_for_emails))
emails = filter(None, emails)
if len(emails) and action.act_mail_body:
emails = list(set(emails))
email_from = safe_eval(action.act_email_from, {}, locals_for_emails)
emails = tools.email_split(','.join(filter(None, emails)))
email_froms = tools.email_split(email_from)
if email_froms:
self.email_send(cr, uid, obj, emails, action.act_mail_body, emailfrom=email_froms[0])
if hasattr(obj, 'state') and hasattr(obj, 'message_post') and action.act_state:
model_obj.message_post(cr, uid, [obj], _(action.act_state), context=context)
if hasattr(obj, 'message_subscribe') and action.act_followers:
exits_followers = [x.id for x in obj.message_follower_ids]
new_followers = [x.id for x in action.act_followers if x.id not in exits_followers]
if new_followers:
model_obj.message_subscribe(cr, uid, [obj.id], new_followers, context=context)
return True
def _action(self, cr, uid, ids, objects, scrit=None, context=None):
""" Do Action
@param self: The object pointer
@param cr: the current row, from the database cursor,
@param uid: the current users ID for security checks,
@param ids: List of Basic Action Rules IDs,
@param objects: pass objects
@param context: A standard dictionary for contextual values """
""" Do Action """
if context is None:
context = {}
context.update({'action': True})
if not scrit:
scrit = []
if not isinstance(objects, list):
objects = [objects]
for action in self.browse(cr, uid, ids, context=context):
for obj in objects:
if self.do_check(cr, uid, action, obj, context=context):
model_obj = self.pool.get(action.model_id.model)
self.do_action(cr, uid, action, model_obj, obj, context=context)
self.do_action(cr, uid, action, obj, context=context)
context.update({'action': False})
return True
def _check_mail(self, cr, uid, ids, context=None):
""" Check Mail
@param self: The object pointer
@param cr: the current row, from the database cursor,
@param uid: the current users ID for security checks,
@param ids: List of Action Rules IDs
@param context: A standard dictionary for contextual values """
empty = orm.browse_null()
rule_obj = self.pool.get('base.action.rule')
for rule in self.browse(cr, uid, ids, context=context):
if rule.act_mail_body:
try:
rule_obj.format_mail(empty, rule.act_mail_body)
except (ValueError, KeyError, TypeError):
return False
return True
_constraints = [
(_check_mail, 'Error ! The mail is not well formated.', ['act_mail_body']),
]
base_action_rule()
class actions_server(osv.osv):
_inherit = 'ir.actions.server'
_columns = {
'action_rule_id': fields.many2one("base.action.rule", string="Action Rule")
}
actions_server()
class ir_cron(osv.osv):
_inherit = 'ir.cron'

View File

@ -15,8 +15,9 @@
<sheet>
<group col="4">
<field name="name"/>
<field name="model_id" on_change="onchange_model_id(model_id)"/>
<field name="filter_id" />
<field name="model_id"/>
<field name="model" invisible="1"/>
<field name="filter_id" domain="[('model_id','=',model)]" context="{'default_model_id': model}"/>
<field name="sequence"/>
<field name="active"/>
</group>
@ -31,62 +32,40 @@
<field name="trg_partner_id"/>
<field name="trg_partner_categ_id"/>
</group>
<group string="Conditions on States">
<group name="state" string="Conditions on Status">
<field name="trg_state_from"/>
<field name="trg_state_to"/>
</group>
<group string="Conditions on Timing">
<group name="timing" string="Conditions on Timing">
<field name="trg_date_type"/>
<group attrs="{'invisible': [('trg_date_type', '=', 'none')]}">
<field name="trg_date_range" string="Delay After Trigger Date"/>
<field name="trg_date_range_type"/>
</group>
<field name="trg_date_range" string="Delay After Trigger Date" attrs="{'invisible': [('trg_date_type', '=', 'none')]}"/>
<field name="trg_date_range_type" attrs="{'invisible': [('trg_date_type', '=', 'none')]}"/>
</group>
</group>
<separator string="Note"/>
<label string="The rule uses the AND operator. The model must match all non-empty fields so that the rule executes the action described in the 'Actions' tab." />
<group string="Note">
<label string="The rule uses the AND operator. The model must match all non-empty fields so that the rule executes the action described in the 'Actions' tab." />
</group>
</page>
<page string="Actions">
<group string="Fields to Change" col="4">
<group name="action_followers">
<field name="act_followers" widget="many2many_tags"/>
</group>
<group name="action_field" col="4" string="Fields to Change">
<field name="act_user_id"/>
<field name="act_state"/>
</group>
<group col="2" string="Server Action to be Triggered">
<field name="server_action_id"/>
<group name="action_server" string="Server Actions to be Triggered (eg. Email Reminder, Call Object Method, etc...)" >
<field name="server_action_ids" domain="[('model_id','=', model_id)]" nolabel="1" context="{'default_model_id': model_id}">
<tree string="Server Actions">
<field name="sequence"/>
<field name="name"/>
<field name="state"/>
</tree>
</field>
</group>
</page>
<page string="Email Actions">
<group col="4">
<separator colspan="4" string="Email Reminders"/>
<field name="act_remind_partner"/>
<field name="act_remind_attach"/>
<field name="act_remind_user"/>
<group col="2" colspan="2" attrs="{'invisible': [('act_remind_user','=',False)]}">
<field name="act_reply_to" attrs="{'required':[('act_remind_user','=',True)]}"/>
</group>
<separator colspan="4" string="Email Information"/>
<field name="act_email_from" />
<field name="act_email_to" />
<field name="act_mail_to_user"/>
<field colspan="4" name="act_mail_to_email"/>
<field name="act_mail_to_watchers"/>
<field colspan="4" name="act_email_cc"/>
<separator colspan="4" string="Email Body"/>
<field colspan="4" name="act_mail_body" height="250"
nolabel="1" attrs="{'required':[('act_remind_user','=',True)]}" />
<separator colspan="4" string="Special Keywords to be Used in the Body"/>
<label align="0.0" string="%%(object_id)s = Object ID" colspan="2"/>
<label align="0.0" string="%%(object_subject)s = Object subject" colspan="2"/>
<label align="0.0" string="%%(object_description)s = Object description" colspan="2"/>
<label align="0.0" string="%%(object_date)s = Creation date" colspan="2"/>
<label align="0.0" string="%%(partner)s = Partner name" colspan="2"/>
<label align="0.0" string="%%(partner_email)s = Partner Email" colspan="2"/>
<label align="0.0" string="%%(object_user)s = Responsible name" colspan="2"/>
<label align="0.0" string="%%(object_user_email)s = Responsible Email" colspan="2"/>
<label align="0.0" string="%%(object_user_phone)s = Responsible phone" colspan="2"/>
</group>
</page>
</notebook>
</page>
</notebook>
</sheet>
</form>
</field>

View File

@ -1023,10 +1023,10 @@ rule or repeating pattern of time to exclude from the recurring rule."),
'rrule': fields.function(_get_rulestring, type='char', size=124, \
fnct_inv=_rrule_write, store=True, string='Recurrent Rule'),
'rrule_type': fields.selection([
('daily', 'Daily'),
('weekly', 'Weekly'),
('monthly', 'Monthly'),
('yearly', 'Yearly')
('daily', 'Day(s)'),
('weekly', 'Week(s)'),
('monthly', 'Month(s)'),
('yearly', 'Year(s)')
], 'Recurrency', states={'done': [('readonly', True)]},
help="Let the event automatically repeat at that interval"),
'alarm_id': fields.many2one('res.alarm', 'Reminder', states={'done': [('readonly', True)]},

View File

@ -1,121 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<!-- Attendee form view -->
<record id="base_calendar_attendee_form_view" model="ir.ui.view">
<field name="name">calendar.attendee.form</field>
<field name="model">calendar.attendee</field>
<field name="arch" type="xml">
<form string="Invitation details" version="7.0">
<header>
<button name="do_tentative" states="needs-action,declined,accepted" string="Uncertain" type="object" class="oe_highlight"/>
<button name="do_accept" string="Accept" states="needs-action,tentative,declined" type="object" class="oe_highlight"/>
<button name="do_decline" string="Decline" states="needs-action,tentative,accepted" type="object" class="oe_highlight"/>
<field name="state" widget="statusbar"
statusbar_visible="tentative,needs-action,accepted" statusbar_colors='{"proforma":"blue"}'/>
</header>
<sheet>
<div class="oe_title">
<label for="email" string="Invitation To" class="oe_edit_only"/>
<h1>
<field name="email" class="oe_inline"/>
(<field name="language" class="oe_inline"/>)
</h1>
<h2>
From <field name="event_date" class="oe_inline"/>
to <field name="event_end_date" class="oe_inline"/>
</h2>
</div>
<group>
<group>
<field name="sent_by_uid" string="Invitation From"/>
<field name="user_id" string="Invited User"/>
<field name="partner_id" string="Contact"/>
</group>
<group>
<field name="cutype" string="Invitation Type"/>
<field name="role" string="Role"/>
<field name="rsvp"/>
<field name="ref" readonly="1"/>
</group>
</group>
<group>
<group string="Delegated From">
<field name="parent_ids" readonly="1" nolabel="1"/>
</group>
<group string="Delegated To" >
<field name="child_ids" readonly="1" nolabel="1"/>
</group>
</group>
</sheet>
</form>
</field>
</record>
<!-- Attendee tree view -->
<record id="base_calendar_attendee_tree_view" model="ir.ui.view">
<field name="name">calendar.attendee.tree</field>
<field name="model">calendar.attendee</field>
<field name="arch" type="xml">
<tree string="Invitation details">
<field name="sent_by_uid" string="Invitation From"/>
<field name="role" string="My Role"/>
<field name="user_id" invisible="1"/>
<field name="partner_id" invisible="1"/>
<field name="cutype" string="Invitation Type"/>
<field name="state"/>
<field name="rsvp" string="Required to Join"/>
</tree>
</field>
</record>
<!-- Attendee search view -->
<record id="base_calendar_attendee_search_view" model="ir.ui.view">
<field name="name">calendar.attendee.search</field>
<field name="model">calendar.attendee</field>
<field name="arch" type="xml">
<search string="Search Invitations">
<field name="email" string="Email"/>
<field name="event_date"/>
<filter icon="terp-gtk-jump-to-ltr" name="toreview" string="To Review" domain="[('state','=', 'needs-action')]" help="Invitations To Review"/>
<filter icon="terp-check" string="Accepted" domain="[('state','=', 'accepted')]" help="Accepted Invitations"/>
<filter icon="terp-dialog-close" string="Declined" domain="[('state','=', 'declined')]" help="Declined Invitations"/>
<filter icon="gtk-sort-descending" string="Delegated" domain="[('state','=', 'delegated')]" help="Delegated Invitations"/>
<field name="user_id" string="Responsible"/>
<field name="cutype" string="Invitation type"/>
<group expand="0" string="Group By...">
<filter string="Responsible" icon="terp-personal" domain="[]" context="{'group_by':'user_id'}"/>
<filter string="Contact" icon="terp-personal" domain="[]" context="{'group_by':'partner_id'}"/>
<filter string="Type" icon="terp-stock_symbol-selection" help="Invitation Type" domain="[]" context="{'group_by':'cutype'}"/>
<filter string="Role" icon="terp-gtk-select-all" domain="[]" context="{'group_by':'role'}"/>
<filter string="Required Reply" icon="terp-mail-replied" domain="[]" context="{'group_by':'rsvp'}"/>
<filter string="Status" icon="terp-stock_effects-object-colorize" help="Invitation Type"
domain="[]" context="{'group_by':'state'}"/>
</group>
</search>
</field>
</record>
<record id="action_view_attendee_form" model="ir.actions.act_window">
<field name="name">Event Invitations</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">calendar.attendee</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_id" ref="base_calendar.base_calendar_attendee_tree_view"/>
<field name="context">{'default_sent_by_uid': uid}</field>
</record>
<!-- Calendar's menu -->
<menuitem id="base.menu_calendar_configuration" name="Calendar"
parent="base.menu_base_config" sequence="50" groups="base.group_no_one"/>
<!-- Invitation menu -->
<menuitem id="menu_attendee_invitations"
parent="base.menu_calendar_configuration"
sequence="10" action="action_view_attendee_form"/>
<!-- Alarm form view -->
<record id="res_alarm_form_view" model="ir.ui.view">
<field name="name">res.alarm.form</field>

View File

@ -86,7 +86,7 @@
</h2>
</div>
<notebook>
<page string="Meeting Detail">
<page string="Meeting Details">
<group>
<group>
<field name="date" string="Starting at"/>

View File

@ -140,18 +140,20 @@ class users(osv.osv):
# Add handlers for 'input_pw' field.
def set_pw(self, cr, uid, id, name, value, args, context):
if not value:
raise osv.except_osv(_('Error!'), _("You have to specify a password."))
if value:
obj = pooler.get_pool(cr.dbname).get('res.users')
if not hasattr(obj, "_salt_cache"):
obj._salt_cache = {}
obj = pooler.get_pool(cr.dbname).get('res.users')
if not hasattr(obj, "_salt_cache"):
obj._salt_cache = {}
salt = obj._salt_cache[id] = gen_salt()
encrypted = encrypt_md5(value, salt)
salt = obj._salt_cache[id] = gen_salt()
encrypted = encrypt_md5(value, salt)
else:
#setting a password to '' is allowed. It can be used to inactivate the classic log-in of the user
#while the access can still be granted by another login method (openid...)
encrypted = ''
cr.execute('update res_users set password=%s where id=%s',
(encrypted.encode('utf-8'), int(id)))
cr.commit()
del value
def get_pw( self, cr, uid, ids, name, args, context ):

View File

@ -156,5 +156,11 @@
border-right: 1px solid #D0D0D0;
}
.oe_import .oe_import_error_report > p {
background: #efc9cb;
}
.oe_import .select2-results {
font-size: 12px;
}

View File

@ -38,7 +38,7 @@ openerp.base_import = function (instance) {
// if true, the 'Import', 'Export', etc... buttons will be shown
instance.web.ListView.prototype.defaults.import_enabled = true;
instance.web.ListView.include({
on_loaded: function () {
load_list: function () {
var self = this;
var add_button = false;
if (!this.$buttons) {

View File

@ -302,50 +302,13 @@ class base_stage(object):
rule_ids = rule_obj.search(cr, uid, [('model_id','=',model_ids[0])], context=context)
return rule_obj._action(cr, uid, rule_ids, cases, scrit=scrit, context=context)
def remind_partner(self, cr, uid, ids, context=None, attach=False):
return self.remind_user(cr, uid, ids, context, attach,
destination=False)
def remind_user(self, cr, uid, ids, context=None, attach=False, destination=True):
if hasattr(self, 'message_post'):
for case in self.browse(cr, uid, ids, context=context):
if destination:
recipient_id = case.user_id.partner_id.id
else:
if not case.email_from:
return False
recipient_id = self.pool.get('res.partner').find_or_create(cr, uid, case.email_from, context=context)
body = case.description or ""
for message in case.message_ids:
if message.type == 'email' and message.body:
body = message.body
break
body = self.format_body(body)
attach_to_send = {}
if attach:
attach_ids = self.pool.get('ir.attachment').search(cr, uid, [('res_model', '=', self._name), ('res_id', '=', case.id)])
attach_to_send = self.pool.get('ir.attachment').read(cr, uid, attach_ids, ['datas_fname', 'datas'])
attach_to_send = dict(map(lambda x: (x['datas_fname'], x['datas'].decode('base64')), attach_to_send))
subject = "Reminder: [%s] %s" % (case.id, case.name)
self.message_post(cr, uid, case.id, body=body,
subject=subject, attachments=attach_to_send,
partner_ids=[recipient_id], context=context)
return True
def _check(self, cr, uid, ids=False, context=None):
""" Function called by the scheduler to process cases for date actions.
Must be overriden by inheriting classes.
"""
return True
def format_body(self, body):
return self.pool.get('base.action.rule').format_body(body)
def format_mail(self, obj, body):
return self.pool.get('base.action.rule').format_mail(obj, body)
# ******************************
# Notifications
# ******************************

View File

@ -11,7 +11,7 @@
<label for="vat"/>
<div>
<field name="vat" on_change="vat_change(vat)" placeholder="e.g. BE0477472701" class="oe_inline"/>
<button colspan="2" name="button_check_vat" string="Check VAT" type="object" icon="gtk-execute" class="oe_inline"/>
<button colspan="2" name="button_check_vat" string="Check Validity" type="object" icon="gtk-execute" class="oe_inline"/>
<field name="vat_subjected" class="oe_inline"/>
</div>
</field>

View File

@ -85,7 +85,6 @@ Dashboard for CRM will include:
'crm_lead_view.xml',
'crm_lead_menu.xml',
'crm_meeting_view.xml',
'crm_meeting_menu.xml',
'crm_meeting_shortcut_data.xml',
@ -107,6 +106,7 @@ Dashboard for CRM will include:
'crm_demo.xml',
'crm_lead_demo.xml',
'crm_phonecall_demo.xml',
'crm_action_rule_demo.xml',
],
'test': [
'test/process/communication_with_customer.yml',

View File

@ -77,7 +77,7 @@ class crm_case_stage(osv.osv):
help="Link between stages and sales teams. When set, this limitate the current stage to the selected sales teams."),
'state': fields.selection(AVAILABLE_STATES, 'Related Status', required=True,
help="The status of your document will automatically change regarding the selected stage. " \
"For example, if a stage is related to the state 'Close', when your document reaches this stage, it is automatically closed."),
"For example, if a stage is related to the status 'Close', when your document reaches this stage, it is automatically closed."),
'case_default': fields.boolean('Common to All Teams',
help="If you check this field, this stage will be proposed by default on each sales team. It will not assign this stage to existing teams."),
'fold': fields.boolean('Hide in Views when Empty',

View File

@ -41,24 +41,15 @@ class base_action_rule(osv.osv):
'regex_history' : fields.char('Regular Expression on Case History', size=128),
'act_section_id': fields.many2one('crm.case.section', 'Set Team to'),
'act_categ_id': fields.many2one('crm.case.categ', 'Set Category to'),
'act_mail_to_partner': fields.boolean('Mail to Partner',
help="Check this if you want the rule to send an email to the partner."),
}
def email_send(self, cr, uid, obj, emails, body, emailfrom=tools.config.get('email_from', False), context=None):
mail_id = super(base_action_rule, self).email_send(cr, uid, obj, emails, body, emailfrom=emailfrom, context=context)
if mail_id and hasattr(obj, 'section_id') and obj.section_id and obj.section_id.alias_id:
reply_to = obj.section_id.alias_id.name_get()[0][1]
self.pool.get('mail.mail').write(cr, uid, [mail_id], {'reply_to': reply_to}, context=context)
return mail_id
def do_check(self, cr, uid, action, obj, context=None):
ok = super(base_action_rule, self).do_check(cr, uid, action, obj, context=context)
if hasattr(obj, 'section_id'):
ok = ok and (not action.trg_section_id or action.trg_section_id.id == obj.section_id.id)
if hasattr(obj, 'categ_id'):
ok = ok and (not action.trg_categ_id or action.trg_categ_id.id == obj.categ_id.id)
if hasattr(obj, 'categ_ids'):
ok = ok and (not action.trg_categ_id or action.trg_categ_id.id in [x.id for x in obj.categ_ids])
#Cheking for history
regex = action.regex_history
@ -80,36 +71,18 @@ class base_action_rule(osv.osv):
ok = ok and res_count
return ok
def do_action(self, cr, uid, action, model_obj, obj, context=None):
def do_action(self, cr, uid, action, obj, context=None):
res = super(base_action_rule, self).do_action(cr, uid, action, obj, context=context)
model_obj = self.pool.get(action.model_id.model)
write = {}
if hasattr(action, 'act_section_id') and action.act_section_id:
obj.section_id = action.act_section_id
write['section_id'] = action.act_section_id.id
if hasattr(obj, 'email_cc') and action.act_email_cc:
if '@' in (obj.email_cc or ''):
emails = obj.email_cc.split(",")
if obj.act_email_cc not in emails:# and '<'+str(action.act_email_cc)+">" not in emails:
write['email_cc'] = obj.email_cc + ',' + obj.act_email_cc
else:
write['email_cc'] = obj.act_email_cc
# Put state change by rule in communication history
if hasattr(obj, 'state') and hasattr(obj, 'message_post') and action.act_state:
model_obj.message_post(cr, uid, [obj], _(action.act_state), context=context)
if hasattr(action, 'act_categ_id') and action.act_categ_id:
write['categ_ids'] = [4, action.act_categ_id.id]
model_obj.write(cr, uid, [obj.id], write, context)
super(base_action_rule, self).do_action(cr, uid, action, model_obj, obj, context=context)
emails = []
if hasattr(obj, 'email_from') and action.act_mail_to_partner:
emails.append(obj.email_from)
emails = filter(None, emails)
if len(emails) and action.act_mail_body:
emails = list(set(emails))
self.email_send(cr, uid, obj, emails, action.act_mail_body)
return True
return res
def state_get(self, cr, uid, context=None):
"""Gets available states for crm"""

View File

@ -0,0 +1,83 @@
<?xml version="1.0"?>
<openerp>
<data noupdate="1">
<!-- email server actions -->
<record id="action_email_reminder_lead" model="ir.actions.server">
<field name="name">Reminder to User</field>
<field name="model_id" ref="model_crm_lead"/>
<field name="condition">True</field>
<field name="type">ir.actions.server</field>
<field name="state">email</field>
<field name="email">object.user_id.email</field>
<field name="subject">Reminder on Lead: [[object.id ]] [[object.partner_id and 'of ' +object.partner_id.name or '']]</field>
<field name="message">Hello [[object.user_id.name]],
can you check following lead, it's not open since 5 days ?
Lead: [[object.id ]]
Description:
[[object.description]]
Thanks,
</field>
</record>
<record id="action_email_reminder_customer_lead" model="ir.actions.server">
<field name="name">Reminder to Customer</field>
<field name="model_id" ref="model_crm_lead"/>
<field name="condition">True</field>
<field name="type">ir.actions.server</field>
<field name="state">email</field>
<field name="email">object.email_from</field>
<field name="subject">Reminder on Lead: [[object.id ]]</field>
<field name="message">Hello [[object.partner_id and object.partner_id.name or '']],
your following lead is not open since 5 days.
Lead: [[object.id ]]
Description:
[[object.description]]
Thanks,
</field>
</record>
<record id="filter_draft_lead" model="ir.filters">
<field name="name">Filter on leads which are draft.</field>
<field name="model_id">crm.lead</field>
<field name="domain">[('state','=','draft')]</field>
</record>
<!-- automated actions -->
<record id="rule_set_reminder_lead" model="base.action.rule">
<field name="name">Set Auto Reminder on leads which are not open since 5 days.</field>
<field name="model_id" ref="model_crm_lead"/>
<field name="sequence">1</field>
<field name="filter_id" ref="filter_draft_lead"/>
<field name="trg_date_type">create</field>
<field name="trg_date_range">5</field>
<field name="trg_date_range_type">day</field>
<field name="server_action_ids" eval="[(6,0,[ref('action_email_reminder_customer_lead'), ref('action_email_reminder_lead')])]"/>
</record>
<record id="filter_usa_lead" model="ir.filters">
<field name="name">Filter on leads which come from USA.</field>
<field name="model_id">crm.lead</field>
<field name="domain">[('country_id','=','United States')]</field>
</record>
<record id="rule_set_followers_lead" model="base.action.rule">
<field name="name">Set Auto Followers on leads which are urgent and come from USA.</field>
<field name="model_id" ref="model_crm_lead"/>
<field name="sequence">2</field>
<field name="regex_name">urgent.*</field>
<field name="filter_id" ref="filter_usa_lead"/>
<field name="act_followers" eval="[(6,0,[ref('base.res_partner_4'), ref('base.res_partner_5'), ref('base.res_partner_6')])]"/>
<field name="act_user_id" ref="base.user_root"/>
<field name="act_section_id" ref="section_sales_department"/>
<field name="trg_date_type">create</field>
<field name="trg_date_range">0</field>
<field name="trg_date_range_type">minutes</field>
</record>
</data>
</openerp>

View File

@ -7,53 +7,21 @@
<field name="model">base.action.rule</field>
<field name="inherit_id" ref="base_action_rule.view_base_action_rule_form"/>
<field name="arch" type="xml">
<group name="partner" position="after">
<group col="2" colspan="2">
<separator colspan="4" string="Condition on Communication History"/>
<xpath expr="//group[@name='partner']" position="after">
<group name="case" string="Conditions on Case Fields">
<field name="trg_section_id" widget="selection"/>
<field name="trg_categ_id"/>
</group>
<group name="communication" string="Conditions on Communication History">
<field name="regex_history"/>
<field name="trg_max_history"/>
</group>
</group>
</field>
</record>
<record id="view_base_action_rule_line_form2" model="ir.ui.view">
<field name="name">base.action.rule.form2.inherit</field>
<field name="model">base.action.rule</field>
<field name="inherit_id" ref="base_action_rule.view_base_action_rule_form"/>
<field name="arch" type="xml">
<group name="partner" position="after">
<group col="2" colspan="2">
<separator colspan="4" string="Condition Case Fields"/>
<field name="trg_section_id" widget="selection"/>
<field name="trg_categ_id"/>
</group>
</group>
</field>
</record>
<record id="view_base_action_rule_line_form3" model="ir.ui.view">
<field name="name">base.action.rule.form3.inherit</field>
<field name="model">base.action.rule</field>
<field name="inherit_id" ref="base_action_rule.view_base_action_rule_form"/>
<field name="arch" type="xml">
<field name="act_user_id" position="after">
</xpath>
<xpath expr="//field[@name='act_user_id']" position="after">
<field name="act_section_id"/>
<field name="act_categ_id"/>
</field>
</xpath>
</field>
</record>
<record id="view_base_action_rule_line_form4" model="ir.ui.view">
<field name="name">base.action.rule.form4.inherit</field>
<field name="model">base.action.rule</field>
<field name="inherit_id" ref="base_action_rule.view_base_action_rule_form"/>
<field name="arch" type="xml">
<field name="act_mail_to_user" position="after">
<field name="act_mail_to_partner"/>
</field>
</field>
</record>
</data>
</openerp>

View File

@ -223,11 +223,11 @@ class crm_lead(base_stage, format_address, osv.osv):
'day_close': fields.function(_compute_day, string='Days to Close', \
multi='day_close', type="float", store=True),
'state': fields.related('stage_id', 'state', type="selection", store=True,
selection=crm.AVAILABLE_STATES, string="State", readonly=True,
help='The state is set to \'Draft\', when a case is created.\
If the case is in progress the state is set to \'Open\'.\
When the case is over, the state is set to \'Done\'.\
If the case needs to be reviewed then the state is \
selection=crm.AVAILABLE_STATES, string="Status", readonly=True,
help='The Status is set to \'Draft\', when a case is created.\
If the case is in progress the Status is set to \'Open\'.\
When the case is over, the Status is set to \'Done\'.\
If the case needs to be reviewed then the Status is \
set to \'Pending\'.'),
# Only used for type opportunity

View File

@ -1,18 +0,0 @@
<?xml version="1.0"?>
<openerp>
<data>
<!-- Calendar Attendee Form View -->
<record id="attendee_form_view_inherit" model="ir.ui.view">
<field name="name">calendar.attendee.form.inherit</field>
<field name="model">calendar.attendee</field>
<field name="inherit_id" ref="base_calendar.base_calendar_attendee_form_view"/>
<field name="arch" type="xml">
<field name="ref" position="after">
<field name="categ_id" string="Event Type"/>
</field>
</field>
</record>
</data>
</openerp>

View File

@ -50,10 +50,10 @@ class crm_phonecall(base_state, osv.osv):
('cancel', 'Cancelled'),
('done', 'Held'),],
string='Status', size=16, readonly=True,
help='The state is set to \'Todo\', when a case is created.\
If the case is in progress the state is set to \'Open\'.\
When the call is over, the state is set to \'Held\'.\
If the call needs to be done then the state is set to \'Not Held\'.'),
help='The status is set to \'Todo\', when a case is created.\
If the case is in progress the status is set to \'Open\'.\
When the call is over, the status is set to \'Held\'.\
If the call needs to be done then the status is set to \'Not Held\'.'),
'email_from': fields.char('Email', size=128, help="These people will receive email."),
'date_open': fields.datetime('Opened', readonly=True),
# phonecall fields

View File

@ -123,7 +123,7 @@
OpenERP allows you to easily define all the calls to be done
by your sales team and follow up based on their summary.
</p><p>
You can use the import feature to massicely import a new list of
You can use the import feature to massively import a new list of
prospects to qualify.
</p>
</field>

View File

@ -70,19 +70,19 @@
<field name="date"/>
<field name="name"/>
<field name="partner_id"/>
<field name="partner_phone"/>
<field name="user_id"/>
<field name="categ_id" invisible="1"/>
<field name="create_date" invisible="1"/>
<field name="opportunity_id" invisible="1"/>
<button string="Meeting"
states="open,pending" icon="gtk-redo"
name="action_make_meeting" type="object"/>
<button string="Convert to Opportunity"
name="%(phonecall2opportunity_act)d"
states="open,pending"
icon="gtk-index"
type="action" attrs="{'invisible':[('opportunity_id','!=',False)]}"/>
<button string="Meeting"
states="open,pending" icon="gtk-redo"
name="action_make_meeting" type="object"/>
<field name="partner_phone"/>
<field name="user_id"/>
<field name="categ_id" invisible="1"/>
<field name="create_date" invisible="1"/>
<field name="opportunity_id" invisible="1"/>
<field name="state"/>
<button name="case_open" string="Confirm" type="object"
states="draft,pending" icon="gtk-go-forward"/>

View File

@ -87,7 +87,7 @@ class crm_phonecall2phonecall(osv.osv_memory):
if 'user_id' in fields:
res.update({'user_id': phonecall.user_id and phonecall.user_id.id or False})
if 'date' in fields:
res.update({'date': phonecall.date})
res.update({'date': False})
if 'section_id' in fields:
res.update({'section_id': phonecall.section_id and phonecall.section_id.id or False})
if 'categ_id' in fields:

View File

@ -50,7 +50,7 @@ class crm_claim_stage(osv.osv):
'sequence': fields.integer('Sequence', help="Used to order stages. Lower is better."),
'section_ids':fields.many2many('crm.case.section', 'section_claim_stage_rel', 'stage_id', 'section_id', string='Sections',
help="Link between stages and sales teams. When set, this limitate the current stage to the selected sales teams."),
'state': fields.selection(crm.AVAILABLE_STATES, 'State', required=True, help="The related state for the stage. The state of your document will automatically change regarding the selected stage. For example, if a stage is related to the state 'Close', when your document reaches this stage, it will be automatically have the 'closed' state."),
'state': fields.selection(crm.AVAILABLE_STATES, 'Status', required=True, help="The related status for the stage. The status of your document will automatically change regarding the selected stage. For example, if a stage is related to the status 'Close', when your document reaches this stage, it will be automatically have the 'closed' status."),
'case_refused': fields.boolean('Refused stage',
help='Refused stages are specific stages for done.'),
'case_default': fields.boolean('Common to All Teams',
@ -108,11 +108,11 @@ class crm_claim(base_stage, osv.osv):
domain="['|', ('section_ids', '=', section_id), ('case_default', '=', True)]"),
'cause': fields.text('Root Cause'),
'state': fields.related('stage_id', 'state', type="selection", store=True,
selection=crm.AVAILABLE_STATES, string="State", readonly=True,
help='The state is set to \'Draft\', when a case is created.\
If the case is in progress the state is set to \'Open\'.\
When the case is over, the state is set to \'Done\'.\
If the case needs to be reviewed then the state is \
selection=crm.AVAILABLE_STATES, string="Status", readonly=True,
help='The status is set to \'Draft\', when a case is created.\
If the case is in progress the status is set to \'Open\'.\
When the case is over, the status is set to \'Done\'.\
If the case needs to be reviewed then the status is \
set to \'Pending\'.'),
}
@ -124,7 +124,8 @@ class crm_claim(base_stage, osv.osv):
'date': fields.datetime.now,
'company_id': lambda s, cr, uid, c: s.pool.get('res.company')._company_default_get(cr, uid, 'crm.case', context=c),
'priority': lambda *a: crm.AVAILABLE_PRIORITIES[2][0],
'active': lambda *a: 1
'active': lambda *a: 1,
'stage_id':lambda s, cr, uid, c: s._get_default_stage_id(cr, uid, c)
}
def stage_find(self, cr, uid, cases, section_id, domain=[], order='sequence', context=None):

View File

@ -102,16 +102,20 @@
<field name="arch" type="xml">
<form string="Claim" version="7.0">
<header>
<span groups="base.group_user">
<button name="case_open" string="Open" type="object" class="oe_highlight"
states="draft,pending" />
<button name="case_close" string="Done" type="object" class="oe_highlight"
states="open,pending"/>
<button name="case_reset" string="Reset to Draft" type="object"
states="cancel,done"/>
<button name="case_cancel" string="Cancel" type="object"
states="draft,open,pending"/>
</span>
<button name="case_open" string="Open" type="object" class="oe_highlight"
states="draft,pending" groups="base.group_user"/>
<button name="case_close" string="Done" type="object" class="oe_highlight"
states="open,pending" groups="base.group_user"/>
<button name="case_refuse" string="Refuse" type="object" class="oe_highlight"
states="draft,open,pending" groups="base.group_user"/>
<button name="stage_previous" string="Previous Stage" type="object" groups="base.group_user"
states="open,pending" icon="gtk-go-back" attrs="{'invisible': [('stage_id','=', False)]}"/>
<button name="stage_next" string="Next Stage" type="object" groups="base.group_user"
states="open,pending" icon="gtk-go-forward" attrs="{'invisible': [('stage_id','=', False)]}"/>
<button name="case_reset" string="Reset to Draft" type="object" groups="base.group_user"
states="cancel,done"/>
<button name="case_cancel" string="Cancel" type="object" groups="base.group_user"
states="draft,open,pending"/>
<field name="stage_id" widget="statusbar"
on_change="onchange_stage_id(stage_id)"/>
</header>

View File

@ -8,14 +8,14 @@ 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: 2011-03-16 00:04+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"PO-Revision-Date: 2012-10-24 05:01+0000\n"
"Last-Translator: Chertykov Denis <chertykov@gmail.com>\n"
"Language-Team: Russian <ru@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-10-19 05:33+0000\n"
"X-Generator: Launchpad (build 16165)\n"
"X-Launchpad-Export-Date: 2012-10-25 05:35+0000\n"
"X-Generator: Launchpad (build 16179)\n"
#. module: crm_claim
#: field:crm.claim.report,nbr:0
@ -85,12 +85,12 @@ msgstr ""
#: code:addons/crm_claim/crm_claim.py:132
#, python-format
msgid "The claim '%s' has been opened."
msgstr ""
msgstr "Претензия '%s' была открыта"
#. module: crm_claim
#: view:crm.claim:0
msgid "Date Closed"
msgstr ""
msgstr "Дата закрытия"
#. module: crm_claim
#: view:crm.claim.report:0
@ -151,12 +151,12 @@ msgstr "Ссылка"
#. module: crm_claim
#: view:crm.claim.report:0
msgid "Date of claim"
msgstr ""
msgstr "Дата претензии"
#. module: crm_claim
#: view:crm.claim:0
msgid "All pending Claims"
msgstr ""
msgstr "Все ожидающие претензии"
#. module: crm_claim
#: view:crm.claim.report:0
@ -187,7 +187,7 @@ msgstr "Контрагент"
#. module: crm_claim
#: view:crm.claim.report:0
msgid "Month of claim"
msgstr ""
msgstr "Месяц претензии"
#. module: crm_claim
#: selection:crm.claim,type_action:0
@ -227,7 +227,7 @@ msgstr "Отправить новое эл. письмо"
#: selection:crm.claim,state:0
#: view:crm.claim.report:0
msgid "New"
msgstr ""
msgstr "Новый"
#. module: crm_claim
#: view:crm.claim:0
@ -254,7 +254,7 @@ msgstr "Следующее действие"
#. module: crm_claim
#: view:crm.claim.report:0
msgid "My Sales Team(s)"
msgstr ""
msgstr "Мои отделы продаж"
#. module: crm_claim
#: model:crm.case.stage,name:crm_claim.stage_claim3
@ -321,7 +321,7 @@ msgstr "Контакт"
#. module: crm_claim
#: view:crm.claim.report:0
msgid "Month-1"
msgstr ""
msgstr "Месяц-1"
#. module: crm_claim
#: model:ir.actions.act_window,name:crm_claim.action_report_crm_claim
@ -380,7 +380,7 @@ msgstr "Дата изменения"
#. module: crm_claim
#: view:crm.claim.report:0
msgid "Year of claim"
msgstr ""
msgstr "Год претензи"
#. module: crm_claim
#: view:crm.claim.report:0
@ -402,7 +402,7 @@ msgstr "Значение претензии"
#. module: crm_claim
#: view:crm.claim:0
msgid "Responsible User"
msgstr ""
msgstr "Ответственный пользователь"
#. module: crm_claim
#: help:crm.claim,email_cc:0
@ -474,7 +474,7 @@ msgstr "Июнь"
#. module: crm_claim
#: view:res.partner:0
msgid "Partners Claim"
msgstr ""
msgstr "Претензии партнера"
#. module: crm_claim
#: field:crm.claim,partner_phone:0
@ -489,7 +489,7 @@ msgstr "Пользователь"
#. module: crm_claim
#: field:crm.claim,active:0
msgid "Active"
msgstr ""
msgstr "Активен"
#. module: crm_claim
#: selection:crm.claim.report,month:0
@ -621,13 +621,13 @@ msgstr "Открыть"
#. module: crm_claim
#: view:crm.claim:0
msgid "New Claims"
msgstr ""
msgstr "Новые претензии"
#. module: crm_claim
#: view:crm.claim:0
#: selection:crm.claim,state:0
msgid "In Progress"
msgstr "Выполняется"
msgstr "В работе"
#. module: crm_claim
#: view:crm.claim:0
@ -638,17 +638,17 @@ msgstr "Ответственный"
#. module: crm_claim
#: view:crm.claim.report:0
msgid "Claims created in current year"
msgstr ""
msgstr "Претензии созданные в текущем году"
#. module: crm_claim
#: view:crm.claim:0
msgid "Unassigned Claims"
msgstr ""
msgstr "Не назначенные претензии"
#. module: crm_claim
#: view:crm.claim.report:0
msgid "Claims created in current month"
msgstr ""
msgstr "Претензии созданные в текущем месяце"
#. module: crm_claim
#: field:crm.claim.report,delay_expected:0
@ -718,7 +718,7 @@ msgstr "Выполненные действия"
#. module: crm_claim
#: view:crm.claim.report:0
msgid "Claims created in last month"
msgstr ""
msgstr "Претензии созданные в прошлом месяце"
#. module: crm_claim
#: model:crm.case.stage,name:crm_claim.stage_claim5
@ -760,7 +760,7 @@ msgstr "Год"
#. module: crm_claim
#: view:crm.claim.report:0
msgid "My company"
msgstr ""
msgstr "Моя компания"
#. module: crm_claim
#: selection:crm.claim.report,month:0
@ -780,7 +780,7 @@ msgstr "Идентификатор"
#. module: crm_claim
#: constraint:res.partner:0
msgid "Error ! You cannot create recursive associated members."
msgstr ""
msgstr "Ошибка! Вы не можете создавать рекурсивные ссылки на участников."
#. module: crm_claim
#: view:crm.claim:0
@ -810,7 +810,7 @@ msgstr "Дата создания"
#. module: crm_claim
#: view:crm.claim:0
msgid "In Progress Claims"
msgstr ""
msgstr "Претензии \"В работе\""
#~ msgid "Probability"
#~ msgstr "Вероятность"

View File

@ -73,10 +73,10 @@ class crm_helpdesk(base_state, base_stage, osv.osv):
('object_id.model', '=', 'crm.helpdesk')]"),
'duration': fields.float('Duration', states={'done': [('readonly', True)]}),
'state': fields.selection(crm.AVAILABLE_STATES, 'Status', size=16, readonly=True,
help='The state is set to \'Draft\', when a case is created.\
\nIf the case is in progress the state is set to \'Open\'.\
\nWhen the case is over, the state is set to \'Done\'.\
\nIf the case needs to be reviewed then the state is set to \'Pending\'.'),
help='The status is set to \'Draft\', when a case is created.\
\nIf the case is in progress the status is set to \'Open\'.\
\nWhen the case is over, the status is set to \'Done\'.\
\nIf the case needs to be reviewed then the status is set to \'Pending\'.'),
}
_defaults = {

View File

@ -8,14 +8,14 @@ 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: 2010-12-20 08:54+0000\n"
"PO-Revision-Date: 2012-10-24 05:08+0000\n"
"Last-Translator: Chertykov Denis <chertykov@gmail.com>\n"
"Language-Team: Russian <ru@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-10-19 05:34+0000\n"
"X-Generator: Launchpad (build 16165)\n"
"X-Launchpad-Export-Date: 2012-10-25 05:35+0000\n"
"X-Generator: Launchpad (build 16179)\n"
#. module: crm_helpdesk
#: field:crm.helpdesk.report,delay_close:0
@ -46,7 +46,7 @@ msgstr "Март"
#. module: crm_helpdesk
#: view:crm.helpdesk.report:0
msgid "Helpdesk requests occurred in current year"
msgstr ""
msgstr "Запросы на техподдержку в текущем году"
#. module: crm_helpdesk
#: field:crm.helpdesk,company_id:0
@ -80,7 +80,7 @@ msgstr "Добавить внутреннею заметку"
#. module: crm_helpdesk
#: view:crm.helpdesk.report:0
msgid "Date of helpdesk requests"
msgstr ""
msgstr "Дата запросов техподдержки"
#. module: crm_helpdesk
#: view:crm.helpdesk:0
@ -95,7 +95,7 @@ msgstr "Сообщения"
#. module: crm_helpdesk
#: view:crm.helpdesk.report:0
msgid "My company"
msgstr ""
msgstr "Моя компания"
#. module: crm_helpdesk
#: selection:crm.helpdesk,state:0
@ -156,7 +156,7 @@ msgstr "Раздел"
#. module: crm_helpdesk
#: view:crm.helpdesk.report:0
msgid "Helpdesk requests occurred in last month"
msgstr ""
msgstr "последний месяц"
#. module: crm_helpdesk
#: view:crm.helpdesk:0
@ -166,14 +166,14 @@ msgstr "Отправить новое эл. письмо"
#. module: crm_helpdesk
#: view:crm.helpdesk:0
msgid "Helpdesk requests during last 7 days"
msgstr ""
msgstr "Запросы на техподдержку за последние 7 дней"
#. module: crm_helpdesk
#: view:crm.helpdesk:0
#: selection:crm.helpdesk,state:0
#: view:crm.helpdesk.report:0
msgid "New"
msgstr ""
msgstr "Новый"
#. module: crm_helpdesk
#: model:ir.model,name:crm_helpdesk.model_crm_helpdesk_report
@ -207,7 +207,7 @@ msgstr "# Писем"
#: view:crm.helpdesk:0
#: view:crm.helpdesk.report:0
msgid "My Sales Team(s)"
msgstr ""
msgstr "Мои отделы продаж"
#. module: crm_helpdesk
#: field:crm.helpdesk,create_date:0
@ -252,7 +252,7 @@ msgstr "Категории"
#. module: crm_helpdesk
#: view:crm.helpdesk:0
msgid "New Helpdesk Request"
msgstr ""
msgstr "Новый запрос техподдержки"
#. module: crm_helpdesk
#: view:crm.helpdesk:0
@ -267,13 +267,13 @@ msgstr "Даты"
#. module: crm_helpdesk
#: view:crm.helpdesk.report:0
msgid "Month of helpdesk requests"
msgstr ""
msgstr "Месяц запросов техподдержки"
#. module: crm_helpdesk
#: code:addons/crm_helpdesk/crm_helpdesk.py:101
#, python-format
msgid "No Subject"
msgstr ""
msgstr "Без темы"
#. module: crm_helpdesk
#: view:crm.helpdesk.report:0
@ -283,12 +283,12 @@ msgstr "№ техподдержки"
#. module: crm_helpdesk
#: view:crm.helpdesk:0
msgid "All pending Helpdesk Request"
msgstr ""
msgstr "Все ожидающие запросы техподдержки"
#. module: crm_helpdesk
#: view:crm.helpdesk.report:0
msgid "Year of helpdesk requests"
msgstr ""
msgstr "Год запросов техподдержки"
#. module: crm_helpdesk
#: view:crm.helpdesk:0
@ -324,7 +324,7 @@ msgstr "Дата изменения"
#. module: crm_helpdesk
#: view:crm.helpdesk.report:0
msgid "Helpdesk requests occurred in current month"
msgstr ""
msgstr "Запросы техподдержки в текущем месяце"
#. module: crm_helpdesk
#: view:crm.helpdesk.report:0
@ -345,7 +345,7 @@ msgstr "Категория"
#. module: crm_helpdesk
#: view:crm.helpdesk:0
msgid "Responsible User"
msgstr ""
msgstr "Ответственный пользователь"
#. module: crm_helpdesk
#: view:crm.helpdesk:0
@ -361,7 +361,7 @@ msgstr "Планируемые затраты"
#. module: crm_helpdesk
#: help:crm.helpdesk,channel_id:0
msgid "Communication channel."
msgstr ""
msgstr "Канал общения"
#. module: crm_helpdesk
#: help:crm.helpdesk,email_cc:0
@ -575,7 +575,7 @@ msgstr "Дерево поддержи"
#. module: crm_helpdesk
#: selection:crm.helpdesk,state:0
msgid "In Progress"
msgstr ""
msgstr "В работе"
#. module: crm_helpdesk
#: view:crm.helpdesk:0
@ -660,7 +660,7 @@ msgstr "Название"
#. module: crm_helpdesk
#: view:crm.helpdesk.report:0
msgid "Month-1"
msgstr ""
msgstr "Месяц-1"
#. module: crm_helpdesk
#: model:ir.ui.menu,name:crm_helpdesk.menu_help_support_main
@ -699,17 +699,17 @@ msgstr ""
#. module: crm_helpdesk
#: view:crm.helpdesk:0
msgid "Todays's Helpdesk Requests"
msgstr ""
msgstr "Запросы техподдержки за сегодня"
#. module: crm_helpdesk
#: view:crm.helpdesk:0
msgid "Request Date"
msgstr ""
msgstr "Дата запроса"
#. module: crm_helpdesk
#: view:crm.helpdesk:0
msgid "Open Helpdesk Request"
msgstr ""
msgstr "Открыть запрос техподдержки"
#. module: crm_helpdesk
#: selection:crm.helpdesk,priority:0

View File

@ -87,7 +87,7 @@ class res_partner(osv.osv):
help="Gives the probability to assign a lead to this partner. (0 means no assignation.)"),
'opportunity_assigned_ids': fields.one2many('crm.lead', 'partner_assigned_id',\
'Assigned Opportunities'),
'grade_id': fields.many2one('res.partner.grade', 'Partner Grade'),
'grade_id': fields.many2one('res.partner.grade', 'Partner Level'),
'activation' : fields.many2one('res.partner.activation', 'Activation', select=1),
'date_partnership' : fields.date('Partnership Date'),
'date_review' : fields.date('Latest Partner Review'),

View File

@ -7,14 +7,14 @@ msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2012-02-08 01:37+0100\n"
"PO-Revision-Date: 2012-08-13 12:11+0000\n"
"PO-Revision-Date: 2012-10-24 05:09+0000\n"
"Last-Translator: Chertykov Denis <chertykov@gmail.com>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-10-19 05:39+0000\n"
"X-Generator: Launchpad (build 16165)\n"
"X-Launchpad-Export-Date: 2012-10-25 05:35+0000\n"
"X-Generator: Launchpad (build 16179)\n"
#. module: document_page
#: field:document.page.type,template:0
@ -270,7 +270,7 @@ msgstr "История всех страниц"
#. module: document_page
#: model:ir.model,name:document_page.model_wiki_wiki
msgid "document.page"
msgstr ""
msgstr "document.page"
#. module: document_page
#: help:document.page.type,method:0
@ -285,7 +285,7 @@ msgstr "Закрыть"
#. module: document_page
#: model:ir.model,name:document_page.model_wizard_wiki_history_show_diff
msgid "wizard.document.page.history.show_diff"
msgstr ""
msgstr "wizard.document.page.history.show_diff"
#. module: document_page
#: field:document.page.history,wiki_id:0
@ -357,7 +357,7 @@ msgstr "Это существенные изменения ?"
#: model:ir.model,name:document_page.model_wiki_groups
#: model:ir.ui.menu,name:document_page.menu_action_wiki_groups view:document.page.type:0
msgid "Document Types"
msgstr ""
msgstr "Типы документов"
#. module: document_page
#: view:document.page:0
@ -374,7 +374,7 @@ msgstr "Изменено"
#: field:document.page,type:0
#, python-format
msgid "Type"
msgstr ""
msgstr "Тип"
#. module: document_page
#: view:document.page.type:0 view:document.page.page.open:0

View File

@ -201,7 +201,7 @@ class event_event(osv.osv):
('confirm', 'Confirmed'),
('done', 'Done')],
'Status', readonly=True, required=True,
help='If event is created, the state is \'Draft\'.If event is confirmed for the particular dates the state is set to \'Confirmed\'. If the event is over, the state is set to \'Done\'.If event is cancelled the state is set to \'Cancelled\'.'),
help='If event is created, the status is \'Draft\'.If event is confirmed for the particular dates the status is set to \'Confirmed\'. If the event is over, the status is set to \'Done\'.If event is cancelled the status is set to \'Cancelled\'.'),
'email_registration_id' : fields.many2one('email.template','Registration Confirmation Email', help='This field contains the template of the mail that will be automatically sent each time a registration for this event is confirmed.'),
'email_confirmation_id' : fields.many2one('email.template','Event Confirmation Email', help="If you set an email template, each participant will receive this email announcing the confirmation of the event."),
'reply_to': fields.char('Reply-To Email', size=64, readonly=False, states={'done': [('readonly', True)]}, help="The email address of the organizer is likely to be put here, with the effect to be in the 'Reply-To' of the mails sent automatically at event or registrations confirmation. You can also put the email address of your mail gateway if you use one."),
@ -330,7 +330,7 @@ class event_registration(osv.osv):
_inherit = ['ir.needaction_mixin','mail.thread']
_columns = {
'id': fields.integer('ID'),
'origin': fields.char('Source', size=124,readonly=True,help="Name of the sale order which create the registration"),
'origin': fields.char('Source Document', size=124,readonly=True,help="Name of the sale order which create the registration"),
'nb_register': fields.integer('Number of Participants', required=True, readonly=True, states={'draft': [('readonly', False)]}),
'event_id': fields.many2one('event.event', 'Event', required=True, readonly=True, states={'draft': [('readonly', False)]}),
'partner_id': fields.many2one('res.partner', 'Partner', states={'done': [('readonly', True)]}),

View File

@ -15,7 +15,7 @@
id="event_main_menu"
groups="base.group_user"
sequence="80"/>
<menuitem name="Events Organisation" id="base.menu_event_main" parent="event_main_menu"/>
<menuitem name="Events Organization" id="base.menu_event_main" parent="event_main_menu"/>
<!-- EVENTS -->
@ -100,12 +100,10 @@
<field name="arch" type="xml">
<form string="Events" version="7.0">
<header>
<span groups="base.group_user">
<button string="Confirm Event" name="button_confirm" states="draft" type="object" class="oe_highlight"/>
<button string="Event Ended" name="button_done" states="confirm" type="object" class="oe_highlight"/>
<button string="Set To Draft" name="button_draft" states="cancel,done" type="object" />
<button string="Cancel Event" name="button_cancel" states="draft,confirm" type="object"/>
</span>
<button string="Confirm Event" name="button_confirm" states="draft" type="object" class="oe_highlight" groups="base.group_user"/>
<button string="Event Ended" name="button_done" states="confirm" type="object" class="oe_highlight" groups="base.group_user"/>
<button string="Set To Draft" name="button_draft" states="cancel,done" type="object" groups="base.group_user"/>
<button string="Cancel Event" name="button_cancel" states="draft,confirm" type="object" groups="base.group_user"/>
<field name="state" widget="statusbar" statusbar_visible="draft,confirm,done"/>
</header>
<sheet>
@ -221,7 +219,7 @@
<field name="arch" type="xml">
<tree string="Events" fonts="bold:message_unread==True" colors="red:(register_min and register_min&gt;register_current) or (register_max and register_max&lt;register_current);grey:state=='cancel'">
<field name="name" string="Name"/>
<field name="type"/>
<field name="type" string="Event Category"/>
<field name="date_begin"/>
<field name="date_end"/>
<field name="register_current"/>
@ -269,17 +267,17 @@
<t t-if="record.country_id.raw_value">@<field name="country_id"/><br/></t>
<t t-if="record.user_id.raw_value">Organized by <field name="user_id"/><br/></t>
<t t-if="record.register_avail.raw_value lte 10 and record.register_avail.raw_value gt 0"><i>Only</i></t>
<t t-if="record.register_avail.raw_value == 0"><i>No ticket available.</i></t>
<t t-if="record.register_avail.raw_value != 0">
<t t-if="record.register_avail.raw_value == 9999"><i>No ticket available.</i></t>
<t t-if="record.register_avail.raw_value != 9999">
<i><b><t t-if="record.register_avail.raw_value != 9999"><field name="register_avail"/></t></b></i>
<i>
<t t-if="record.register_avail.raw_value > 1">tickets </t>
<t t-if="record.register_avail.raw_value == 1 || !record.register_avail.raw_value > 1">ticket </t>
<t t-if="record.register_avail.raw_value lte 1">ticket </t>
available.
</i>
</t>
</p>
<t t-if="record.register_avail.raw_value != 0">
<t t-if="record.register_avail.raw_value gt 0 and record.register_avail.raw_value lt 9999">
<t t-if="!record.is_subscribed.raw_value">
<input t-att-id="record.id.raw_value" type="text" name="subscribe" class="no_of_seats" value="1" onchange="document.getElementById('btn_sub' +this.id).setAttribute('data-context',JSON.stringify({'ticket':this.value}))"/>
<button t-att-id="'btn_sub'+record.id.raw_value" type="object" name="subscribe_to_event" class="oe_subscribe_button">

View File

@ -8,7 +8,7 @@
<form string="Configure Moodle" version="7.0">
<header>
<button type="object" name="configure_moodle"
string="Configure Moodle" class="oe_highlight" />
string="Apply" class="oe_highlight" />
or
<button string="Cancel" class="oe_link" special="cancel" />
</header>
@ -16,12 +16,12 @@
<separator string="Server" colspan="4"/>
<field name="server_moodle"/>
<newline/>
<separator string="Connexion with a Token" colspan="4"/>
<separator string="Connection with a Token" colspan="4"/>
<label string="The easiest way to connect OpenERP with a moodle server is to create a 'token' in Moodle. It will be used to authenticate OpenERP as a trustable application." colspan="4"/>
<field name="moodle_token"/>
<newline/>
<separator string="Connexion with Password and Username" colspan="4"/>
<label string="Another approach is to create a user for OpenERP in Moodle. If you do so, make sure that this user has enough access rights" colspan="4"/>
<separator string="Connection with username and password" colspan="4"/>
<label string="Another approach is to create a user for OpenERP in Moodle. If you do so, make sure that this user has appropriate access rights." colspan="4"/>
<field name="moodle_username"/>
<field name="moodle_password"/>
</group>

View File

@ -40,7 +40,7 @@ class sale_order_line(osv.osv):
'event_id': fields.many2one('event.event', 'Event', help="Choose an event and it will automatically create a registration for this event."),
#those 2 fields are used for dynamic domains and filled by onchange
'event_type_id': fields.related('event_type_id', type='many2one', relation="event.type", string="Event Type"),
'event_ok': fields.related('event_ok', string='event_ok', type='boolean'),
'event_ok': fields.related('product_id', 'event_ok', string='event_ok', type='boolean'),
}
def product_id_change(self, cr, uid, ids,

View File

@ -231,7 +231,7 @@ class hr_employee(osv.osv):
def onchange_address_id(self, cr, uid, ids, address, context=None):
if address:
address = self.pool.get('res.partner').browse(cr, uid, address, context=context)
return {'value': {'work_email': address.email, 'work_phone': address.phone, 'mobile_phone': address.mobile}}
return {'value': {'work_phone': address.phone, 'mobile_phone': address.mobile}}
return {'value': {}}
def onchange_company(self, cr, uid, ids, company, context=None):

View File

@ -7,14 +7,14 @@ msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2012-02-08 01:37+0100\n"
"PO-Revision-Date: 2012-10-21 21:20+0000\n"
"Last-Translator: mchip <mifchip@gmail.com>\n"
"PO-Revision-Date: 2012-10-22 07:48+0000\n"
"Last-Translator: nanothole <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-22 04:40+0000\n"
"X-Generator: Launchpad (build 16165)\n"
"X-Launchpad-Export-Date: 2012-10-23 04:48+0000\n"
"X-Generator: Launchpad (build 16179)\n"
#. module: hr
#: model:process.node,name:hr.process_node_openerpuser0
@ -56,7 +56,7 @@ msgstr ""
#. module: hr
#: model:ir.actions.act_window,name:hr.view_department_form_installer
msgid "Create Your Departments"
msgstr ""
msgstr "Sukurkite padalinius"
#. module: hr
#: model:ir.actions.act_window,help:hr.action_hr_job
@ -77,12 +77,12 @@ msgstr "Padalinys"
#. module: hr
#: view:hr.job:0
msgid "Mark as Old"
msgstr ""
msgstr "Pažymeti kaip sena"
#. module: hr
#: view:hr.job:0
msgid "Jobs"
msgstr ""
msgstr "Darbai"
#. module: hr
#: view:hr.job:0
@ -185,12 +185,12 @@ msgstr ""
#. module: hr
#: model:ir.ui.menu,name:hr.menu_open_view_attendance_reason_new_config
msgid "Attendance"
msgstr ""
msgstr "Lankomumas"
#. module: hr
#: view:hr.employee:0
msgid "Social IDs"
msgstr ""
msgstr "SODRA Nr."
#. module: hr
#: field:hr.employee,work_phone:0
@ -227,7 +227,7 @@ msgstr "Darbuotojas"
#. module: hr
#: model:process.node,note:hr.process_node_employeecontact0
msgid "Other information"
msgstr ""
msgstr "Kita informacija"
#. module: hr
#: field:hr.employee,work_email:0
@ -237,7 +237,7 @@ msgstr "Darbo el. paštas"
#. module: hr
#: field:hr.employee,birthday:0
msgid "Date of Birth"
msgstr ""
msgstr "Gimimo data"
#. module: hr
#: model:ir.ui.menu,name:hr.menu_hr_reporting
@ -253,7 +253,7 @@ msgstr ""
#. module: hr
#: view:hr.employee:0 field:hr.employee,job_id:0 view:hr.job:0
msgid "Job"
msgstr ""
msgstr "Darbas"
#. module: hr
#: field:hr.department,member_ids:0
@ -268,7 +268,7 @@ msgstr "Nustatymai"
#. module: hr
#: view:hr.employee:0 field:hr.employee,category_ids:0
msgid "Categories"
msgstr ""
msgstr "Kategorijos"
#. module: hr
#: field:hr.job,expected_employees:0
@ -799,3 +799,6 @@ msgstr ""
#~ msgstr ""
#~ "Objekto pavadinimas turi prasidėti su x_ ir jame negali būti specialiųjų "
#~ "ženklų!"
#~ msgid "Work E-mail"
#~ msgstr "Darbinis el. paštas"

View File

@ -283,7 +283,7 @@
<form string="Interview Appraisal" version="7.0">
<header>
<button string="Cancel" name="survey_req_cancel" type="object"
states="draft,waiting_answer"/>
states="draft,waiting_answer" class="oe_left"/>
<button string="Print Survey" name="action_print_survey" type="object"
states="draft" context="{'survey_id': survey_id, 'response_id': [response], 'response_no':0}"
attrs="{'readonly':[('survey_id','=',False)]}" class="oe_highlight"/>

View File

@ -233,7 +233,7 @@ hr_expense_expense()
class product_product(osv.osv):
_inherit = "product.product"
_columns = {
'hr_expense_ok': fields.boolean('Can Constitute an Expense', help="Determines if the product can be visible in the list of product within a selection from an HR expense sheet line."),
'hr_expense_ok': fields.boolean('Can be Expensed', help="Determines if the product can be visible in the list of product within a selection from an HR expense sheet line."),
}
def on_change_hr_expense_ok(self, cr, uid, id, hr_expense_ok):

View File

@ -10,7 +10,7 @@
<record id="product_expense_installer_tree_view" model="ir.ui.view">
<field name="name">product.product.tree</field>
<field name="model">product.product</field>
<field eval="7" name="priority"/>
<field eval="37" name="priority"/>
<field name="arch" type="xml">
<tree editable="bottom" string="Products">
<field name="name"/>

View File

@ -115,10 +115,10 @@ class hr_holidays(osv.osv):
_columns = {
'name': fields.char('Description', size=64),
'state': fields.selection([('draft', 'To Submit'), ('cancel', 'Cancelled'),('confirm', 'To Approve'), ('refuse', 'Refused'), ('validate1', 'Second Approval'), ('validate', 'Approved')],
'State', readonly=True, help='The state is set to \'To Submit\', when a holiday request is created.\
\nThe state is \'To Approve\', when holiday request is confirmed by user.\
\nThe state is \'Refused\', when holiday request is refused by manager.\
\nThe state is \'Approved\', when holiday request is approved by manager.'),
'Status', readonly=True, help='The status is set to \'To Submit\', when a holiday request is created.\
\nThe status is \'To Approve\', when holiday request is confirmed by user.\
\nThe status is \'Refused\', when holiday request is refused by manager.\
\nThe status is \'Approved\', when holiday request is approved by manager.'),
'user_id':fields.related('employee_id', 'user_id', type='many2one', relation='res.users', string='User', store=True),
'date_from': fields.datetime('Start Date', readonly=True, states={'draft':[('readonly',False)], 'confirm':[('readonly',False)]}, select=True),
'date_to': fields.datetime('End Date', readonly=True, states={'draft':[('readonly',False)], 'confirm':[('readonly',False)]}),

View File

@ -272,10 +272,10 @@ class hr_payslip(osv.osv):
('done', 'Done'),
('cancel', 'Rejected'),
], 'Status', select=True, readonly=True,
help='* When the payslip is created the state is \'Draft\'.\
\n* If the payslip is under verification, the state is \'Waiting\'. \
\n* If the payslip is confirmed then state is set to \'Done\'.\
\n* When user cancel payslip the state is \'Rejected\'.'),
help='* When the payslip is created the status is \'Draft\'.\
\n* If the payslip is under verification, the status is \'Waiting\'. \
\n* If the payslip is confirmed then status is set to \'Done\'.\
\n* When user cancel payslip the status is \'Rejected\'.'),
# 'line_ids': fields.one2many('hr.payslip.line', 'slip_id', 'Payslip Line', required=False, readonly=True, states={'draft': [('readonly', False)]}),
'line_ids': one2many_mod2('hr.payslip.line', 'slip_id', 'Payslip Lines', readonly=True, states={'draft':[('readonly',False)]}),
'company_id': fields.many2one('res.company', 'Company', required=False, readonly=True, states={'draft': [('readonly', False)]}),

View File

@ -6,12 +6,12 @@
<field name="name">applicants.status.tree</field>
<field name="model">hr.applicant</field>
<field name="arch" type="xml">
<tree colors="blue:state == 'draft';black:state in ('open','pending','done','cancel');" string="Applicants Status">
<tree string="Applicants Status">
<field name="create_date"/>
<field name="job_id"/>
<field name="partner_name"/>
<field name="stage_id"/>
<field name="state" groups="base.group_no_one"/>
<field name="user_id"/>
</tree>
</field>
</record>
@ -32,7 +32,7 @@
<field name="inherit_id" ref="hr.board_hr_form"/>
<field name="arch" type="xml">
<xpath expr="/form/board/column[1]" position="inside">
<action name="%(action_applicants_status)d" string="Applicants To be Processed"/>
<action name="%(action_applicants_status)d" string="Applications to be Processed"/>
</xpath>
</field>
</record>

View File

@ -62,7 +62,7 @@ class hr_recruitment_stage(osv.osv):
'name': fields.char('Name', size=64, required=True, translate=True),
'sequence': fields.integer('Sequence', help="Gives the sequence order when displaying a list of stages."),
'department_id':fields.many2one('hr.department', 'Specific to a Department', help="Stages of the recruitment process may be different per department. If this stage is common to all departments, keep this field empty."),
'state': fields.selection(AVAILABLE_STATES, 'State', required=True, help="The related state for the stage. The state of your document will automatically change according to the selected stage. Example, a stage is related to the state 'Close', when your document reach this stage, it will be automatically closed."),
'state': fields.selection(AVAILABLE_STATES, 'Status', required=True, help="The related status for the stage. The status of your document will automatically change according to the selected stage. Example, a stage is related to the status 'Close', when your document reach this stage, it will be automatically closed."),
'fold': fields.boolean('Hide in views if empty', help="This stage is not visible, for example in status bar or kanban view, when there are no records in that stage to display."),
'requirements': fields.text('Requirements'),
}
@ -189,11 +189,11 @@ class hr_applicant(base_stage, osv.Model):
'stage_id': fields.many2one ('hr.recruitment.stage', 'Stage',
domain="['&', ('fold', '=', False), '|', ('department_id', '=', department_id), ('department_id', '=', False)]"),
'state': fields.related('stage_id', 'state', type="selection", store=True,
selection=AVAILABLE_STATES, string="State", readonly=True,
help='The state is set to \'Draft\', when a case is created.\
If the case is in progress the state is set to \'Open\'.\
When the case is over, the state is set to \'Done\'.\
If the case needs to be reviewed then the state is \
selection=AVAILABLE_STATES, string="Status", readonly=True,
help='The status is set to \'Draft\', when a case is created.\
If the case is in progress the status is set to \'Open\'.\
When the case is over, the status is set to \'Done\'.\
If the case needs to be reviewed then the status is \
set to \'Pending\'.'),
'categ_ids': fields.many2many('hr.applicant_category', string='Tags'),
'company_id': fields.many2one('res.company', 'Company'),

View File

@ -17,7 +17,6 @@
priority: '3'
user_id: base.user_demo
partner_name: 'Marie Justine'
state: 'open'
partner_mobile: '9988774455'
job_id: hr.job_developer
stage_id: stage_job4
@ -41,7 +40,6 @@
type_id: degree_bac5
user_id: base.user_root
partner_name: 'Sandra Elvis'
state: 'cancel'
stage_id: stage_job6
name: 'More than 5 yrs Experience in PHP'
-
@ -50,7 +48,6 @@
type_id: degree_licenced
user_id: base.user_demo
partner_name: 'John Bruno'
state: 'done'
job_id: hr.job_developer
color: 5
stage_id: stage_job5
@ -61,8 +58,6 @@
type_id: degree_licenced
priority: '4'
partner_name: 'David Armstrong'
state: 'pending'
state: open
partner_mobile: '9966332214'
job_id: hr.job_developer
stage_id: stage_job2
@ -73,7 +68,6 @@
date: !eval time.strftime('%Y-%m-12 17:49:19')
type_id: degree_bac5
partner_name: 'Tina Augustie'
state: 'open'
partner_mobile: '9898745745'
job_id: hr.job_developer
stage_id: stage_job4
@ -85,7 +79,6 @@
date: !eval time.strftime('%Y-%m-12 17:49:19')
type_id: degree_bac5
partner_name: 'Shane Williams'
state: 'open'
partner_mobile: '9812398524'
stage_id: stage_job4
name: 'Programmer'

View File

@ -41,7 +41,7 @@ class hr_recruitment_report(osv.osv):
_columns = {
'user_id': fields.many2one('res.users', 'User', readonly=True),
'nbr': fields.integer('# of Applications', readonly=True),
'state': fields.selection(AVAILABLE_STATES, 'State', size=16, readonly=True),
'state': fields.selection(AVAILABLE_STATES, 'Status', size=16, readonly=True),
'month':fields.selection([('01', 'January'), ('02', 'February'), \
('03', 'March'), ('04', 'April'),\
('05', 'May'), ('06', 'June'), \

View File

@ -23,7 +23,7 @@
import time
uid = ref('base.user_demo')
new_id = self.create(cr, uid, {'emp_id': ref('hr.employee_qdp'), 'name': 'Quentin Paolino',
'server_date': time.strftime('%Y-%m-%d %H:%M:%S'), 'state': 'present'})
'server_date': time.strftime('%Y-%m-%d %H:%M:%S')})
self.sign_in_result(cr, uid, [new_id], context)
-
I change my project "Thymbra" and I click on the "Change Work" button of this wizard

View File

@ -33,7 +33,7 @@ class hr_so_project(osv.osv_memory):
'date': fields.datetime('Closing Date'),
'analytic_amount': fields.float('Minimum Analytic Amount'),
'name': fields.char('Employees name', size=32, required=True, readonly=True),
'state': fields.related('emp_id', 'state', string='Current state', type='char', required=True, readonly=True),
'state': fields.related('emp_id', 'state', string='Current Status', type='char', required=True, readonly=True),
'server_date': fields.datetime('Current Date', required=True, readonly=True),
'emp_id': fields.many2one('hr.employee', 'Employee ID')
}
@ -111,7 +111,7 @@ class hr_si_project(osv.osv_memory):
_description = 'Sign In By Project'
_columns = {
'name': fields.char('Employees name', size=32, readonly=True),
'state': fields.related('emp_id', 'state', string='Current state', type='char', required=True, readonly=True),
'state': fields.related('emp_id', 'state', string='Current Status', type='char', required=True, readonly=True),
'date': fields.datetime('Starting Date'),
'server_date': fields.datetime('Current Date', readonly=True),
'emp_id': fields.many2one('hr.employee', 'Employee ID')

View File

@ -129,17 +129,18 @@ class account_analytic_line(osv.osv):
def _default_journal(self, cr, uid, context=None):
proxy = self.pool.get('hr.employee')
record_ids = proxy.search(cr, uid, [('user_id', '=', uid)], context=context)
employee = proxy.browse(cr, uid, record_ids[0], context=context)
return employee.journal_id and employee.journal_id.id or False
if record_ids:
employee = proxy.browse(cr, uid, record_ids[0], context=context)
return employee.journal_id and employee.journal_id.id or False
return False
def _default_general_account(self, cr, uid, context=None):
proxy = self.pool.get('hr.employee')
record_ids = proxy.search(cr, uid, [('user_id', '=', uid)], context=context)
if not record_ids:
raise osv.except_osv(_('Error!'), _('Please create an employee associated to this user.'))
employee = proxy.browse(cr, uid, record_ids[0], context=context)
if employee.product_id and employee.product_id.property_account_income:
return employee.product_id.property_account_income.id
if record_ids:
employee = proxy.browse(cr, uid, record_ids[0], context=context)
if employee.product_id and employee.product_id.property_account_income:
return employee.product_id.property_account_income.id
return False
_defaults = {

View File

@ -206,9 +206,9 @@ class hr_timesheet_sheet(osv.osv):
('draft','Open'),
('confirm','Waiting Approval'),
('done','Approved')], 'Status', select=True, required=True, readonly=True,
help=' * The \'Draft\' state is used when a user is encoding a new and unconfirmed timesheet. \
\n* The \'Confirmed\' state is used for to confirm the timesheet by user. \
\n* The \'Done\' state is used when users timesheet is accepted by his/her senior.'),
help=' * The \'Draft\' status is used when a user is encoding a new and unconfirmed timesheet. \
\n* The \'Confirmed\' status is used for to confirm the timesheet by user. \
\n* The \'Done\' status is used when users timesheet is accepted by his/her senior.'),
'state_attendance' : fields.related('employee_id', 'state', type='selection', selection=[('absent', 'Absent'), ('present', 'Present')], string='Current Status', readonly=True),
'total_attendance': fields.function(_total, method=True, string='Total Attendance', multi="_total"),
'total_timesheet': fields.function(_total, method=True, string='Total Timesheet', multi="_total"),

View File

@ -54,18 +54,18 @@
</header>
<sheet>
<label for="employee_id" class="oe_edit_only"/>
<h1><field name="employee_id" on_change="onchange_employee_id(employee_id)"/></h1>
<h1><field name="employee_id" on_change="onchange_employee_id(employee_id)" class="oe_inline"/></h1>
<group>
<group>
<label for="date_from" string="Timesheet Period"/>
<div><field name="date_from"/> to <field name="date_to"/></div>
<div><field name="date_from" class="oe_inline"/> to <field name="date_to" class="oe_inline"/></div>
<field name="name" invisible="1"/>
<field name="department_id"/>
<field name="department_id" invisible="1"/>
<field name="company_id" groups="base.group_multi_company"/>
</group>
<group>
<field name="total_attendance" widget="float_time" groups="base.group_hr_attendance"/>
<field name="total_timesheet" widget="float_time"/>
<field name="total_timesheet" widget="float_time" groups="base.group_hr_attendance"/>
<field name="total_difference" widget="float_time" groups="base.group_hr_attendance"/>
<field name="user_id" invisible="1"/>
</group>
@ -76,8 +76,8 @@
</widget>
</page>
<page string="Daily">
<group colspan="4" col="3">
<field context="{'user_id':user_id}" name="attendances_ids" nolabel="1" groups="base.group_hr_attendance">
<group groups="base.group_hr_attendance">
<field context="{'user_id':user_id}" name="attendances_ids" nolabel="1">
<tree string="Attendances" editable="bottom">
<field name="name"/>
<field name="action"/>
@ -85,21 +85,19 @@
</tree>
</field>
<group>
<div align="right" groups="base.group_hr_manager,base.group_hr_attendance">
<button name="attendance_action_change" attrs="{'invisible': [('state_attendance', '=', 'present')]}" type="object" string="Sign In" groups="base.group_hr_attendance"/>
<button name="attendance_action_change" attrs="{'invisible': ['|', ('state_attendance','=',False), ('state_attendance', '=', 'absent')]}" type="object" string="Sign Out" groups="base.group_hr_attendance"/>
<field name="state_attendance" nolabel="1"/>
<div align="right" groups="base.group_hr_manager">
<button name="attendance_action_change" attrs="{'invisible': [('state_attendance', '=', 'present')]}" type="object" string="Sign In"/>
<button name="attendance_action_change" attrs="{'invisible': ['|', ('state_attendance','=',False), ('state_attendance', '=', 'absent')]}" type="object" string="Sign Out"/>
</div>
</group>
</group>
<group col="4">
<field name="state_attendance" groups="base.group_hr_attendance"/>
</group>
<field colspan="4" context="{'user_id':user_id}" name="timesheet_ids" nolabel="1">
<field context="{'user_id':user_id}" name="timesheet_ids" nolabel="1">
<tree editable="top" string="Timesheet Lines">
<field name="date"/>
<field domain="[('type','in',['normal', 'contract']), ('state', '&lt;&gt;', 'close'),('use_timesheets','=',1)]" name="account_id" on_change="on_change_account_id(account_id, user_id)" context="{'default_use_timesheets': 1}"/>
<field name="name"/>
<field name="unit_amount" on_change="on_change_unit_amount(product_id, unit_amount, False, product_uom_id,journal_id)" widget="float_time"/>
<field name="unit_amount" on_change="on_change_unit_amount(product_id, unit_amount, False, product_uom_id,journal_id)" widget="float_time" string="Hours"/>
<field name="to_invoice" widget="selection"/>
<field invisible="1" name="journal_id"/>
<field invisible="1" name="product_id" domain="[('type','=','service')]" on_change="on_change_unit_amount(product_id, unit_amount, False, product_uom_id,journal_id)"/>
@ -123,13 +121,13 @@
</form>
</field>
</page>
<page string="Summary">
<field colspan="4" name="period_ids" nolabel="1">
<page string="Summary" groups="base.group_hr_attendance">
<field name="period_ids">
<tree colors="red:total_difference&lt;0.1;blue:total_difference&gt;=0.1" string="Period">
<field name="name"/>
<field name="total_attendance" widget="float_time" groups="base.group_hr_attendance"/>
<field name="total_attendance" widget="float_time"/>
<field name="total_timesheet" widget="float_time"/>
<field name="total_difference" widget="float_time" groups="base.group_hr_attendance"/>
<field name="total_difference" widget="float_time"/>
</tree>
</field>
</page>

File diff suppressed because it is too large Load Diff

View File

@ -12,7 +12,7 @@
<t t-esc="date.toString('MMM d')"/>
</th>
</t>
<th class="oe_timesheet_weekly_date_head">TOTAL</th>
<th class="oe_timesheet_weekly_date_head">Total</th>
</tr>
<tr t-foreach="widget.accounts" t-as="account">
<td class="oe_timesheet_weekly_account"><t t-esc="widget.account_names[account.account]"/></td>
@ -36,8 +36,8 @@
<tr>
<td>
<div class="oe_timesheet_weekly_adding_tot">
<div class="oe_timesheet_weekly_adding"><button>Add Row</button></div>
<div class="oe_timesheet_weekly_tottot"><span>TOTAL</span></div>
<div class="oe_timesheet_weekly_adding"><button>Add a Project</button></div>
<div class="oe_timesheet_weekly_tottot"><span>Total</span></div>
</div>
</td>
<t t-set="day_count" t-value="0"/>
@ -53,4 +53,4 @@
</table>
</div>
</t>
</templates>
</templates>

View File

@ -2,13 +2,9 @@
<openerp>
<data>
<record id="config_call_account_template_ar" model="ir.actions.todo">
<field name="name">Generate Chart of Accounts from a Chart Template</field>
<field name="note">Generate Chart of Accounts from a Chart Template. You will be asked to pass the name of the company, the chart template to follow, the no. of digits to generate the code for your accounts and Bank account, currency to create Journals. Thus,the pure copy of chart Template is generated.
This is the same wizard that runs from Financial Management/Configuration/Financial Accounting/Financial Accounts/Generate Chart of Accounts from a Chart Template.</field>
<field name="action_id" ref="account.action_wizard_multi_chart"/>
<field name="type">automatic</field>
</record>
<record id="account.action_wizard_multi_chart_todo" model="ir.actions.todo">
<field name="state">open</field>
</record>
</data>
</openerp>

View File

@ -1,12 +1,8 @@
<openerp>
<data>
<record id="config_call_account_template_at" model="ir.actions.todo">
<field name="name">Generate Chart of Accounts from a Chart Template</field>
<field name="note">Generate Chart of Accounts from a Chart Template. You will be asked to pass the name of the company, the chart template to follow, the no. of digits to generate the code for your accounts and Bank account, currency to create Journals. Thus,the pure copy of chart Template is generated.
This is the same wizard that runs from Financial Management/Configuration/Financial Accounting/Financial Accounts/Generate Chart of Accounts from a Chart Template.</field>
<field name="action_id" ref="account.action_wizard_multi_chart"/>
<field name="type">automatic</field>
<record id="account.action_wizard_multi_chart_todo" model="ir.actions.todo">
<field name="state">open</field>
</record>
</data>

View File

@ -1,10 +1,6 @@
-
!record {model: ir.actions.todo, id: config_call_account_template}:
action_id: account.action_wizard_multi_chart
type: automatic
-
!python {model: ir.actions.todo}: |
install_todo = self.browse(cr, uid, ref('l10n_be.config_call_account_template'))
install_todo = self.browse(cr, uid, ref('account.action_wizard_multi_chart_todo'))
if install_todo.state == 'open':
wiz = self.pool.get('wizard.multi.charts.accounts')
values = {

View File

@ -1,13 +1,9 @@
<openerp>
<data>
<record id="config_call_account_template_ca" model="ir.actions.todo">
<field name="name">Generate Chart of Accounts from a Chart Template</field>
<field name="note">Generate Chart of Accounts from a Chart Template. You will be asked to pass the name of the company, the chart template to follow, the no. of digits to generate the code for your accounts and Bank account, currency to create Journals. Thus,the pure copy of chart Template is generated.
This is the same wizard that runs from Financial Management/Configuration/Financial Accounting/Financial Accounts/Generate Chart of Accounts from a Chart Template.</field>
<field name="action_id" ref="account.action_wizard_multi_chart"/>
<field name="type">automatic</field>
</record>
<record id="account.action_wizard_multi_chart_todo" model="ir.actions.todo">
<field name="state">open</field>
</record>
</data>
</openerp>

View File

@ -1,13 +1,7 @@
<openerp>
<data>
<record id="config_call_account_template_l10n_ch" model="ir.actions.todo">
<field name="name">Generate Chart of Accounts for l10n_ch</field>
<field name="note">Generate Chart of Accounts from a Chart Template. Please let the nuber to 0 for Swiss charts.
This is the same wizard that runs from Financial Management/Configuration/Financial Accounting/Financial
Accounts/Generate Chart of Accounts from a Chart Template.</field>
<field name="action_id" ref="account.action_wizard_multi_chart"/>
<field name="sequence">4</field>
<field name="type">automatic</field>
<record id="account.action_wizard_multi_chart_todo" model="ir.actions.todo">
<field name="state">open</field>
</record>
</data>
</openerp>

View File

@ -1,14 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="config_call_account_template_cl" model="ir.actions.todo">
<field name="name">Generate Chart of Accounts from a Chart Template</field>
<field name="note">Generate Chart of Accounts from a Chart Template. You will be asked to pass the name of the company, the chart template to follow, the no. of digits to generate the code for your accounts and Bank account, currency to create Journals. Thus,the pure copy of chart Template is generated.
This is the same wizard that runs from Financial Management/Configuration/Financial Accounting/Financial Accounts/Generate Chart of Accounts from a Chart Template.</field>
<field name="action_id" ref="account.action_wizard_multi_chart"/>
<field name="type">automatic</field>
</record>
<record id="account.action_wizard_multi_chart_todo" model="ir.actions.todo">
<field name="state">open</field>
</record>
</data>
</openerp>

View File

@ -1,12 +1,7 @@
<openerp>
<data>
<record id="config_call_account_template_cn_chart" model="ir.actions.todo">
<field name="name">Generate Chart of Accounts from a Chart Template</field>
<field name="note">Generate Chart of Accounts from a Chart Template. You will be asked to pass the name of the company, the chart template to follow, the no. of digits to generate the code for your accounts and Bank account, currency to create Journals. Thus,the pure copy of chart Template is generated.
This is the same wizard that runs from Financial Management/Configuration/Financial Accounting/Financial Accounts/Generate Chart of Accounts from a Chart Template.</field>
<field name="action_id" ref="account.action_wizard_multi_chart"/>
<field name="type">automatic</field>
<record id="account.action_wizard_multi_chart_todo" model="ir.actions.todo">
<field name="state">open</field>
</record>
</data>

View File

@ -1,10 +1,8 @@
<openerp>
<data>
<record id="config_call_account_template" model="ir.actions.todo">
<field name="action_id" ref="account.action_wizard_multi_chart"/>
<field name="type">automatic</field>
</record>
<record id="account.action_wizard_multi_chart_todo" model="ir.actions.todo">
<field name="state">open</field>
</record>
</data>
</openerp>

View File

@ -1,12 +1,9 @@
<openerp>
<data>
<record id="config_call_account_template_de" model="ir.actions.todo">
<field name="name">Generiert Kontenplan aus Vorlage</field>
<field name="note">Der Assistent generiert einen Kontenplan auf Basis eines Templates (Vorlage). Sie werden aufgefordert den Namen der Firma einzugeben, sowie die entsprechende Kontenvorlage zu wählen. Ausserdem können Sie für die Initialisierung der Journale die gewünschte Stellenanzahl der Konten, sowie die Hauptwährung Ihres Betriebes auswählen. Dieser Assistent ist identisch mit dem Open ERP Menü Finanzen/Konfiguration/Finanzkonten/Erzeuge Konten aus Vorlage.</field>
<field name="action_id" ref="account.action_wizard_multi_chart"/>
<field name="type">automatic</field>
</record>
<record id="account.action_wizard_multi_chart_todo" model="ir.actions.todo">
<field name="state">open</field>
</record>
</data>
</openerp>

View File

@ -1,13 +1,8 @@
<openerp>
<data>
<record id="config_call_account_template_ec" model="ir.actions.todo">
<field name="name">Generate Chart of Accounts from a Chart Template</field>
<field name="note">Generate Chart of Accounts from a Chart Template. You will be asked to pass the name of the company, the chart template to follow, the no. of digits to generate the code for your accounts and Bank account, currency to create Journals. Thus,the pure copy of chart Template is generated.
This is the same wizard that runs from Financial Management/Configuration/Financial Accounting/Financial Accounts/Generate Chart of Accounts from a Chart Template.</field>
<field name="action_id" ref="account.action_wizard_multi_chart"/>
<field name="type">automatic</field>
</record>
<record id="account.action_wizard_multi_chart_todo" model="ir.actions.todo">
<field name="state">open</field>
</record>
</data>
</openerp>

View File

@ -1,9 +1,7 @@
<openerp>
<data noupdate="1">
<record id="config_call_account_template" model="ir.actions.todo">
<field name="action_id" ref="account.action_wizard_multi_chart"/>
<field name="type">automatic</field>
<record id="account.action_wizard_multi_chart_todo" model="ir.actions.todo">
<field name="state">open</field>
</record>
</data>

View File

@ -1,12 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<!-- This ir.actions.todo triggers the screen "Generate your chart of account
from a chart template" in the install wizard of the l10n_fr module -->
<record id="config_call_account_template_fr" model="ir.actions.todo">
<field name="action_id" ref="account.action_wizard_multi_chart"/>
<field name="type">automatic</field>
</record>
<record id="account.action_wizard_multi_chart_todo" model="ir.actions.todo">
<field name="state">open</field>
</record>
</data>
</openerp>

View File

@ -1,12 +1,7 @@
<openerp>
<data>
<record id="config_call_account_template_gr" model="ir.actions.todo">
<field name="name">Generate Chart of Accounts from a Chart Template</field>
<field name="note">Generate Chart of Accounts from a Chart Template. You will be asked to pass the name of the company, the chart template to follow, the no. of digits to generate the code for your accounts and Bank account, currency to create Journals. Thus,the pure copy of chart Template is generated.
This is the same wizard that runs from Financial Management/Configuration/Financial Accounting/Financial Accounts/Generate Chart of Accounts from a Chart Template.</field>
<field name="action_id" ref="account.action_wizard_multi_chart"/>
<field name="type">automatic</field>
<record id="account.action_wizard_multi_chart_todo" model="ir.actions.todo">
<field name="state">open</field>
</record>
</data>

View File

@ -1,14 +1,8 @@
<openerp>
<data noupdate="1">
<record id="config_call_account_template_gt_minimal" model="ir.actions.todo">
<field name="name">Generar la nomenclatura contable a partir de un modelo</field>
<field name="note">Generar la nomenclatura contable a partir de un modelo. Deberá seleccionar una compañía, el modelo a utilizar, el número de digitos a usar en la nomenclatura, la moneda para crear los diarios.</field>
<!--<field name="name">Generate Chart of Accounts from a Chart Template</field>
<field name="note">Generate Chart of Accounts from a Chart Template. You will be asked to pass the name of the company, the chart template to follow, the no. of digits to generate the code for your accounts and Bank account, currency to create Journals. Thus, the pure copy of chart Template is generated.
This is the same wizard that runs from Financial Management/Configuration/Financial Accounting/Financial Accounts/Generate Chart of Accounts from a Chart Template.</field>-->
<field name="action_id" ref="account.action_wizard_multi_chart"/>
<field name="type">automatic</field>
<record id="account.action_wizard_multi_chart_todo" model="ir.actions.todo">
<field name="state">open</field>
</record>
<!-- Moneda Quetzal -->

View File

@ -2,13 +2,7 @@
<openerp>
<data noupdate="1">
<record id="config_call_account_template_hn_minimal" model="ir.actions.todo">
<field name="name">Generar la nomenclatura contable a partir de un modelo</field>
<field name="note">Generar la nomenclatura contable a partir de un modelo. Deberá seleccionar una compañía, el modelo a utilizar, el número de digitos a usar en la nomenclatura, la moneda para crear los diarios.</field>
<!--<field name="name">Generate Chart of Accounts from a Chart Template</field>
<field name="note">Generate Chart of Accounts from a Chart Template. You will be asked to pass the name of the company, the chart template to follow, the no. of digits to generate the code for your accounts and Bank account, currency to create Journals. Thus, the pure copy of chart Template is generated.
This is the same wizard that runs from Financial Management/Configuration/Financial Accounting/Financial Accounts/Generate Chart of Accounts from a Chart Template.</field>-->
<field name="action_id" ref="account.action_wizard_multi_chart"/>
<record id="account.action_wizard_multi_chart_todo" model="ir.actions.todo">
<field name="state">open</field>
</record>

View File

@ -1,13 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="config_call_account_template_in_minimal" model="ir.actions.todo">
<field name="name">Generate Chart of Accounts from a Chart Template</field>
<field name="note">Generate Chart of Accounts from a Chart Template. You will be asked to pass the name of the company, the chart template to follow, the no. of digits to generate the code for your accounts and Bank account, currency to create Journals. Thus,the pure copy of chart Template is generated.
This is the same wizard that runs from Financial Management/Configuration/Financial Accounting/Financial Accounts/Generate Chart of Accounts from a Chart Template.</field>
<field name="action_id" ref="account.action_wizard_multi_chart"/>
<field name="type">automatic</field>
<record id="account.action_wizard_multi_chart_todo" model="ir.actions.todo">
<field name="state">open</field>
</record>
</data>

View File

@ -65,7 +65,7 @@ class payroll_advice(osv.osv):
('draft', 'Draft'),
('confirm', 'Confirmed'),
('cancel', 'Cancelled'),
], 'State', select=True, readonly=True),
], 'Status', select=True, readonly=True),
'number':fields.char('Reference', size=16, readonly=True),
'line_ids':fields.one2many('hr.payroll.advice.line', 'advice_id', 'Employee Salary', states={'draft': [('readonly', False)]}, readonly=True),
'chaque_nos':fields.char('Cheque Numbers', size=256),

View File

@ -38,7 +38,7 @@ class payment_advice_report(osv.osv):
('draft', 'Draft'),
('confirm', 'Confirmed'),
('cancel', 'Cancelled'),
], 'State', select=True, readonly=True),
], 'Status', select=True, readonly=True),
'employee_id': fields.many2one('hr.employee', 'Employee', readonly=True),
'nbr': fields.integer('# Payment Lines', readonly=True),
'number':fields.char('Number', size=16, readonly=True),

View File

@ -39,7 +39,7 @@ class payslip_report(osv.osv):
('draft', 'Draft'),
('done', 'Done'),
('cancel', 'Rejected'),
], 'State', readonly=True),
], 'Status', readonly=True),
'employee_id': fields.many2one('hr.employee', 'Employee', readonly=True),
'nbr': fields.integer('# Payslip lines', readonly=True),
'number': fields.char('Number', size=16, readonly=True),

View File

@ -1,12 +1,7 @@
<openerp>
<data>
<record id="config_call_account_template_generic" model="ir.actions.todo">
<field name="name">Generate Chart of Accounts from a Chart Template</field>
<field name="note">Generate Chart of Accounts from a Chart Template. You will be asked to pass the name of the company, the chart template to follow, the no. of digits to generate the code for your accounts and Bank account, currency to create Journals. Thus,the pure copy of chart Template is generated.
This is the same wizard that runs from Financial Management/Configuration/Financial Accounting/Financial Accounts/Generate Chart of Accounts from a Chart Template.</field>
<field name="action_id" ref="account.action_wizard_multi_chart"/>
<field name="type">automatic</field>
<record id="account.action_wizard_multi_chart_todo" model="ir.actions.todo">
<field name="state">open</field>
</record>
</data>
</openerp>

View File

@ -1,10 +1,8 @@
<openerp>
<data>
<record id="config_call_account_template_lu" model="ir.actions.todo">
<field name="action_id" ref="account.action_wizard_multi_chart"/>
<field name="type">automatic</field>
</record>
<record id="account.action_wizard_multi_chart_todo" model="ir.actions.todo">
<field name="state">open</field>
</record>
</data>
</openerp>

View File

@ -1,10 +1,8 @@
<openerp>
<data>
<record id="config_call_account_template_ma" model="ir.actions.todo">
<field name="action_id" ref="account.action_wizard_multi_chart"/>
<field name="type">automatic</field>
</record>
<record id="account.action_wizard_multi_chart_todo" model="ir.actions.todo">
<field name="state">open</field>
</record>
</data>
</openerp>

View File

@ -1,28 +1,41 @@
# Spanish translation for openobject-addons
# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
# Spanish (Mexico) 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-07 06:07+0000\n"
"PO-Revision-Date: 2011-02-15 15:37+0000\n"
"POT-Creation-Date: 2011-12-23 09:56+0000\n"
"PO-Revision-Date: 2012-10-22 22:58+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Spanish <es@li.org>\n"
"Language-Team: Spanish (Mexico) <es_MX@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-09-05 05:58+0000\n"
"X-Generator: Launchpad (build 13830)\n"
"X-Launchpad-Export-Date: 2012-10-24 04:55+0000\n"
"X-Generator: Launchpad (build 16179)\n"
#. module: l10n_mx
#: model:ir.module.module,description:l10n_mx.module_meta_information
msgid ""
"This is the module to manage the accounting chart for Mexico in Open ERP."
msgstr ""
"Este es el módulo para gestionar el plan contable para Méjico en Open ERP."
#: model:account.account.type,name:l10n_mx.account_type_receivable
msgid "Receivable"
msgstr "Por cobrar"
#. module: l10n_mx
#: model:account.account.type,name:l10n_mx.account_type_equity
msgid "Equity"
msgstr "Capital"
#. module: l10n_mx
#: model:account.account.type,name:l10n_mx.account_type_tax
msgid "Tax"
msgstr "Impuesto"
#. module: l10n_mx
#: model:account.account.type,name:l10n_mx.account_type_cash
msgid "Cash"
msgstr "Efectivo"
#. module: l10n_mx
#: model:ir.actions.todo,note:l10n_mx.config_call_account_template_mx_chart
@ -35,16 +48,28 @@ msgid ""
"Management/Configuration/Financial Accounting/Financial Accounts/Generate "
"Chart of Accounts from a Chart Template."
msgstr ""
"Generar Plan Contable a partir de una plantilla de Plan. Se le preguntará "
"por el nombre de la compañía, la plantilla de plan contable a seguir, el no. "
"de dígitos para generar el código de sus cuentas y la cuenta bancaria, la "
"divisa para crear Diarios. Por lo tanto, la copia exacta de la plantilla de "
"plan contable será generada.\n"
"Este es el mismo asistente que se ejecuta desde Gestión "
"Financiera/Configuración/Contabilidad Financiera/Contabilidad "
"Financiera/Generar Plan Contable a partir de una Plantilla de Plan."
#. module: l10n_mx
#: model:ir.module.module,shortdesc:l10n_mx.module_meta_information
msgid "Mexico - Chart of Account"
msgstr "Méjico - Plan Contable"
#: model:account.account.type,name:l10n_mx.account_type_payable
msgid "Payable"
msgstr "A pagar"
#. module: l10n_mx
#: model:account.account.type,name:l10n_mx.account_type_asset
msgid "Asset"
msgstr "Activo"
#. module: l10n_mx
#: model:account.account.type,name:l10n_mx.account_type_income
msgid "Income"
msgstr "Ingreso"
#. module: l10n_mx
#: model:account.account.type,name:l10n_mx.account_type_expense
msgid "Expense"
msgstr "Gasto"
#. module: l10n_mx
#: model:account.account.type,name:l10n_mx.account_type_view
msgid "View"
msgstr "Vista"

View File

@ -1,12 +1,7 @@
<openerp>
<data>
<record id="config_call_account_template_mx_chart" model="ir.actions.todo">
<field name="name">Generate Chart of Accounts from a Chart Template</field>
<field name="note">Generate Chart of Accounts from a Chart Template. You will be asked to pass the name of the company, the chart template to follow, the no. of digits to generate the code for your accounts and Bank account, currency to create Journals. Thus,the pure copy of chart Template is generated.
This is the same wizard that runs from Financial Management/Configuration/Financial Accounting/Financial Accounts/Generate Chart of Accounts from a Chart Template.</field>
<field name="action_id" ref="account.action_wizard_multi_chart"/>
<field name="type">automatic</field>
<record id="account.action_wizard_multi_chart_todo" model="ir.actions.todo">
<field name="state">open</field>
</record>
</data>

View File

@ -1,19 +1,8 @@
<openerp>
<data>
<record id="config_call_account_template" model="ir.actions.todo">
<field name="name">Genereer Grootboekrekingschema vanuit het Nederlandse Grootboek Template</field>
<field name="note">Na installatie van deze module word de configuratie wizard voor "Accounting" aangeroepen.
* U krijgt een lijst met grootboektemplates aangeboden waarin zich ook het Nederlandse grootboekschema bevind.
* Als de configuratie wizard start, wordt u gevraagd om de naam van uw bedrijf in te voeren, welke grootboekschema te installeren, uit hoeveel cijfers een grootboekrekening mag bestaan, het rekeningnummer van uw bank en de currency om Journalen te creeren.
Let op!! -&gt; De template van het Nederlandse rekeningschema is opgebouwd uit 4 cijfers. Dit is het minimale aantal welk u moet invullen, u mag het aantal verhogen. De extra cijfers worden dan achter het rekeningnummer aangevult met "nullen"
* Dit is dezelfe configuratie wizard welke aangeroepen kan worden via Financial Management/Configuration/Financial Accounting/Financial Accounts/Generate Chart of Accounts from a Chart Template.
</field>
<field name="action_id" ref="account.action_wizard_multi_chart"/>
<field name="type">automatic</field>
</record>
<record id="account.action_wizard_multi_chart_todo" model="ir.actions.todo">
<field name="state">open</field>
</record>
</data>
</openerp>

View File

@ -2,12 +2,8 @@
<openerp>
<data>
<record id="config_call_account_template_pe" model="ir.actions.todo">
<field name="name">Generate Chart of Accounts from a Chart Template</field>
<field name="note">Generate Chart of Accounts from a Chart Template. You will be asked to pass the name of the company, the chart template to follow, the no. of digits to generate the code for your accounts and Bank account, currency to create Journals. Thus,the pure copy of chart Template is generated.
This is the same wizard that runs from Financial Management/Configuration/Financial Accounting/Financial Accounts/Generate Chart of Accounts from a Chart Template.</field>
<field name="action_id" ref="account.action_wizard_multi_chart"/>
<field name="type">automatic</field>
<record id="account.action_wizard_multi_chart_todo" model="ir.actions.todo">
<field name="state">open</field>
</record>
</data>

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